{"version":3,"sources":["node_modules/browser-pack/_prelude.js","lib/constants.js","lib/plugins/autotrack.js","lib/plugins/clean-url-tracker.js","lib/plugins/event-tracker.js","lib/plugins/impression-tracker.js","lib/plugins/media-query-tracker.js","lib/plugins/outbound-form-tracker.js","lib/plugins/outbound-link-tracker.js","lib/plugins/page-visibility-tracker.js","lib/plugins/social-widget-tracker.js","lib/plugins/url-change-tracker.js","lib/provide.js","lib/usage.js","lib/utilities.js","node_modules/date-now/index.js","node_modules/debounce/index.js","node_modules/dom-utils/lib/closest.js","node_modules/dom-utils/lib/delegate.js","node_modules/dom-utils/lib/get-attributes.js","node_modules/dom-utils/lib/matches.js","node_modules/dom-utils/lib/parents.js","node_modules/dom-utils/lib/parse-url.js","node_modules/object-assign/index.js"],"names":["e","t","n","r","s","o","u","a","require","i","f","Error","code","l","exports","call","length","1","module","VERSION","DEV_ID","VERSION_PARAM","USAGE_PARAM","NULL_DIMENSION","Autotrack","console","error","provide","CleanUrlTracker","tracker","opts","usage","track","plugins","CLEAN_URL_TRACKER","this","assign","stripQuery","queryDimensionIndex","indexFilename","trailingSlash","overrideTrackerBuildHitTask","parseUrl","constants","prototype","cleanUrlTask","model","location","get","page","url","oldPath","pathname","newPath","parts","split","join","replace","isFilename","test","substr","set","query","search","originalTrackerBuildHitTask","bind","remove","originalTrackerSendHitTask","EventTracker","EVENT_TRACKER","window","addEventListener","events","fieldsObj","attributePrefix","hitFilter","handleEvents","selector","delegates","forEach","event","delegate","document","composed","useCapture","createFieldsObj","getAttributeFields","element","prefix","type","getAttribute","defaultFields","transport","attributeFields","userFields","hitType","send","Object","keys","key","destroy","ImpressionTracker","IMPRESSION_TRACKER","IntersectionObserver","MutationObserver","elements","rootMargin","handleDomMutations","handleIntersectionChanges","handleDomElementAdded","handleDomElementRemoved","items","elementMap","thresholdMap","domReady","observeElements","isTargetVisible","threshold","record","intersectionRect","top","bottom","left","right","intersectionRatio","getItemFromElement","trackFirstImpressionOnly","id","data","deriveDataFromElements","concat","item","observer","getElementById","observe","mutationObserver","body","childList","subtree","requestAnimationFrame","unobserveElements","itemsToKeep","itemsToRemove","itemInItems","some","itemToRemove","push","unobserveAllElements","dataToKeep","dataToRemove","unobserve","disconnect","observeElement","intersectionObserver","mutations","mutation","removedEl","k","removedNodes","walkNodeTree","addedEl","j","addedNodes","node","callback","nodeType","child","childNodes","records","target","handleImpression","eventCategory","eventAction","eventLabel","MediaQueryTracker","MEDIA_QUERY_TRACKER","matchMedia","definitions","changeTemplate","changeTimeout","isObject","toArray","changeListeners","processMediaQueries","getMediaListener","media","mediaMap","debounce","definition","name","dimensionIndex","mediaName","getMatchName","addChangeListeners","match","matches","mql","fn","handleChanges","addListener","newValue","oldValue","listener","removeListener","OutboundFormTracker","OUTBOUND_FORM_TRACKER","formSelector","shouldTrackOutboundForm","handleFormSubmits","withTimeout","form","action","href","navigator","sendBeacon","preventDefault","hitCallback","submit","hostname","protocol","slice","OutboundLinkTracker","OUTBOUND_LINK_TRACKER","linkSelector","shouldTrackOutboundLink","handleLinkInteractions","link","PageVisibilityTracker","PAGE_VISIBILITY_TRACKER","sessionTimeout","DEFAULT_SESSION_TIMEOUT","hiddenMetricIndex","visibleMetricIndex","visibilityState","lastVisibilityChangeTime","Date","handleVisibilityStateChange","overrideTrackerSendMethod","overrideTrackerSendHitTask","prevVisibilityState","sessionHasTimedOut","timeDeltaInSeconds","Math","round","eventValue","nonInteraction","metric","minutesSinceLastHit","lastHitTime","originalTrackerSendMethod","args","Array","arguments","firstArg","isPageview","apply","removeEventListener","SocialWidgetTracker","SOCIAL_WIDGET_TRACKER","addWidgetListeners","addTwitterEventHandlers","handleTweetEvents","handleFollowEvents","handleLikeEvents","handleUnlikeEvents","readyState","FB","addFacebookEventHandlers","twttr","ready","err","removeTwitterEventHandlers","unbind","Event","subscribe","removeFacebookEventHandlers","unsubscribe","region","socialNetwork","socialAction","socialTarget","screenName","screen_name","UrlChangeTracker","URL_CHANGE_TRACKER","history","pushState","shouldTrackUrlChange","path","getPath","updateTrackerData","originalPushState","state","title","originalReplaceState","replaceState","shouldSendPageview","setTimeout","utilities","gaDevIds","pluginName","pluginConstructor","gaAlias","gaplugins","capitalize","convertHexToBin","hex","parseInt","toString","convertBinToHex","bin","padZeros","str","len","toAdd","flipBitOn","index","trackPlugin","pluginIndex","usageHex","usageBin","PLUGIN_COUNT","trackVersion","plugin","getAttributes","opt_tracker","opt_hitFilter","opt_target","originalBuildHitTask","buildHitTask","attributes","attribute","indexOf","value","field","camelCase","wait","called","p1","toUpperCase","charAt","isArray","now","getTime","func","immediate","later","last","timestamp","timeout","result","context","callNow","parents","shouldCheckSelf","parent","parentElements","closest","ancestor","eventType","composedPath","delegateTarget","attrs","map","attr","matchesSelector","nativeMatches","nodes","parentNode","querySelectorAll","proto","Element","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","list","HTTP_PORT","HTTPS_PORT","DEFAULT_PORT","RegExp","createElement","cache","port","host","origin","hash","fragment","toObject","val","undefined","TypeError","shouldUseNative","test1","String","getOwnPropertyNames","test2","fromCharCode","order2","test3","letter","getOwnPropertySymbols","hasOwnProperty","propIsEnumerable","propertyIsEnumerable","source","from","symbols","to"],"mappings":";;;;;;;;;;;;;;;;;;CAAA,QAAAA,GAAAC,EAAAC,EAAAC,GAAA,QAAAC,GAAAC,EAAAC,GAAA,IAAAJ,EAAAG,GAAA,CAAA,IAAAJ,EAAAI,GAAA,CAAA,GAAAE,GAAA,kBAAAC,UAAAA,OAAA,KAAAF,GAAAC,EAAA,MAAAA,GAAAF,GAAA,EAAA,IAAAI,EAAA,MAAAA,GAAAJ,GAAA,EAAA,IAAAK,GAAA,GAAAC,OAAA,uBAAAN,EAAA,IAAA,MAAAK,GAAAE,KAAA,mBAAAF,EAAA,GAAAG,GAAAX,EAAAG,IAAAS,WAAAb,GAAAI,GAAA,GAAAU,KAAAF,EAAAC,QAAA,SAAAd,GAAA,GAAAE,GAAAD,EAAAI,GAAA,GAAAL,EAAA,OAAAI,GAA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AMA,MAAA+Y","file":"autotrack.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o 0 || i.bottom > 0 || i.left > 0 || i.right > 0;\n }\n else {\n return record.intersectionRatio >= threshold;\n }\n}\n\n/**\n * Creates an item by merging the passed element with the item defaults.\n * If the passed element is just a string, that string is treated as\n * the item ID.\n * @param {Object|string} element The element to convert to an item.\n * @return {Object} The item object.\n */\nfunction getItemFromElement(element) {\n return assign({threshold: 0, trackFirstImpressionOnly: true},\n typeof element == 'string' ? {id: element} : element);\n\n}\n\n\n","/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar assign = require('object-assign');\nvar debounce = require('debounce');\nvar constants = require('../constants');\nvar provide = require('../provide');\nvar usage = require('../usage');\nvar createFieldsObj = require('../utilities').createFieldsObj;\nvar isObject = require('../utilities').isObject;\nvar toArray = require('../utilities').toArray;\n\n\n/**\n * Declares the MediaQueryListener instance cache.\n */\nvar mediaMap = {};\n\n\n/**\n * Registers media query tracking.\n * @constructor\n * @param {Object} tracker Passed internally by analytics.js\n * @param {?Object} opts Passed by the require command.\n */\nfunction MediaQueryTracker(tracker, opts) {\n\n usage.track(tracker, usage.plugins.MEDIA_QUERY_TRACKER);\n\n // Feature detects to prevent errors in unsupporting browsers.\n if (!window.matchMedia) return;\n\n this.opts = assign({\n definitions: null,\n changeTemplate: this.changeTemplate,\n changeTimeout: 1000,\n fieldsObj: {},\n hitFilter: null\n }, opts);\n\n // Exits early if media query data doesn't exist.\n if (!isObject(this.opts.definitions)) return;\n\n this.opts.definitions = toArray(this.opts.definitions);\n this.tracker = tracker;\n this.changeListeners = [];\n\n this.processMediaQueries();\n}\n\n\n/**\n * Loops through each media query definition, sets the custom dimenion data,\n * and adds the change listeners.\n */\nMediaQueryTracker.prototype.processMediaQueries = function() {\n this.opts.definitions.forEach(function(definition) {\n // Only processes definitions with a name and index.\n if (definition.name && definition.dimensionIndex) {\n var mediaName = this.getMatchName(definition);\n this.tracker.set('dimension' + definition.dimensionIndex, mediaName);\n\n this.addChangeListeners(definition);\n }\n }.bind(this));\n};\n\n\n/**\n * Takes a definition object and return the name of the matching media item.\n * If no match is found, the NULL_DIMENSION value is returned.\n * @param {Object} definition A set of named media queries associated\n * with a single custom dimension.\n * @return {string} The name of the matched media or NULL_DIMENSION.\n */\nMediaQueryTracker.prototype.getMatchName = function(definition) {\n var match;\n\n definition.items.forEach(function(item) {\n if (getMediaListener(item.media).matches) {\n match = item;\n }\n });\n return match ? match.name : constants.NULL_DIMENSION;\n};\n\n\n/**\n * Adds change listeners to each media query in the definition list.\n * Debounces the changes to prevent unnecessary hits from being sent.\n * @param {Object} definition A set of named media queries associated\n * with a single custom dimension\n */\nMediaQueryTracker.prototype.addChangeListeners = function(definition) {\n definition.items.forEach(function(item) {\n var mql = getMediaListener(item.media);\n var fn = debounce(function() {\n this.handleChanges(definition);\n }.bind(this), this.opts.changeTimeout);\n\n mql.addListener(fn);\n this.changeListeners.push({mql: mql, fn: fn});\n }.bind(this));\n};\n\n\n/**\n * Handles changes to the matched media. When the new value differs from\n * the old value, a change event is sent.\n * @param {Object} definition A set of named media queries associated\n * with a single custom dimension\n */\nMediaQueryTracker.prototype.handleChanges = function(definition) {\n var newValue = this.getMatchName(definition);\n var oldValue = this.tracker.get('dimension' + definition.dimensionIndex);\n\n if (newValue !== oldValue) {\n this.tracker.set('dimension' + definition.dimensionIndex, newValue);\n\n var defaultFields = {\n eventCategory: definition.name,\n eventAction: 'change',\n eventLabel: this.opts.changeTemplate(oldValue, newValue)\n };\n this.tracker.send('event', createFieldsObj(\n defaultFields, this.opts.fieldsObj, this.tracker, this.opts.hitFilter));\n }\n};\n\n\n/**\n * Removes all event listeners and instance properties.\n */\nMediaQueryTracker.prototype.remove = function() {\n for (var i = 0, listener; listener = this.changeListeners[i]; i++) {\n listener.mql.removeListener(listener.fn);\n }\n};\n\n\n/**\n * Sets the default formatting of the change event label.\n * This can be overridden by setting the `changeTemplate` option.\n * @param {string} oldValue The value of the media query prior to the change.\n * @param {string} newValue The value of the media query after the change.\n * @return {string} The formatted event label.\n */\nMediaQueryTracker.prototype.changeTemplate = function(oldValue, newValue) {\n return oldValue + ' => ' + newValue;\n};\n\n\n/**\n * Accepts a media query and returns a MediaQueryListener object.\n * Caches the values to avoid multiple unnecessary instances.\n * @param {string} media A media query value.\n * @return {MediaQueryListener} The matched media.\n */\nfunction getMediaListener(media) {\n // Returns early if the media is cached.\n if (mediaMap[media]) return mediaMap[media];\n\n mediaMap[media] = window.matchMedia(media);\n return mediaMap[media];\n}\n\n\nprovide('mediaQueryTracker', MediaQueryTracker);\n","/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar assign = require('object-assign');\nvar delegate = require('dom-utils/lib/delegate');\nvar parseUrl = require('dom-utils/lib/parse-url');\nvar provide = require('../provide');\nvar usage = require('../usage');\nvar createFieldsObj = require('../utilities').createFieldsObj;\nvar getAttributeFields = require('../utilities').getAttributeFields;\nvar withTimeout = require('../utilities').withTimeout;\n\n\n/**\n * Registers outbound form tracking.\n * @constructor\n * @param {Object} tracker Passed internally by analytics.js\n * @param {?Object} opts Passed by the require command.\n */\nfunction OutboundFormTracker(tracker, opts) {\n\n usage.track(tracker, usage.plugins.OUTBOUND_FORM_TRACKER);\n\n // Feature detects to prevent errors in unsupporting browsers.\n if (!window.addEventListener) return;\n\n this.opts = assign({\n formSelector: 'form',\n shouldTrackOutboundForm: this.shouldTrackOutboundForm,\n fieldsObj: {},\n attributePrefix: 'ga-',\n hitFilter: null\n }, opts);\n\n this.tracker = tracker;\n\n this.delegate = delegate(document, 'submit', 'form',\n this.handleFormSubmits.bind(this), {composed: true, useCapture: true});\n}\n\n\n/**\n * Handles all submits on form elements. A form submit is considered outbound\n * if its action attribute starts with http and does not contain\n * location.hostname.\n * When the beacon transport method is not available, the event's default\n * action is prevented and re-emitted after the hit is sent.\n * @param {Event} event The DOM submit event.\n * @param {Element} form The delegated event target.\n */\nOutboundFormTracker.prototype.handleFormSubmits = function(event, form) {\n\n var action = parseUrl(form.action).href;\n var defaultFields = {\n transport: 'beacon',\n eventCategory: 'Outbound Form',\n eventAction: 'submit',\n eventLabel: action\n };\n\n if (this.opts.shouldTrackOutboundForm(form, parseUrl)) {\n\n if (!navigator.sendBeacon) {\n // Stops the submit and waits until the hit is complete (with timeout)\n // for browsers that don't support beacon.\n event.preventDefault();\n defaultFields.hitCallback = withTimeout(function() {\n form.submit();\n });\n }\n\n var userFields = assign({}, this.opts.fieldsObj,\n getAttributeFields(form, this.opts.attributePrefix));\n\n this.tracker.send('event', createFieldsObj(\n defaultFields, userFields, this.tracker, this.opts.hitFilter, form));\n }\n};\n\n\n/**\n * Determines whether or not the tracker should send a hit when a form is\n * submitted. By default, forms with an action attribute that starts with\n * \"http\" and doesn't contain the current hostname are tracked.\n * @param {Element} form The form that was submitted.\n * @param {Function} parseUrl A cross-browser utility method for url parsing.\n * @return {boolean} Whether or not the form should be tracked.\n */\nOutboundFormTracker.prototype.shouldTrackOutboundForm =\n function(form, parseUrl) {\n\n var url = parseUrl(form.action);\n return url.hostname != location.hostname &&\n url.protocol.slice(0, 4) == 'http';\n};\n\n\n/**\n * Removes all event listeners and instance properties.\n */\nOutboundFormTracker.prototype.remove = function() {\n this.delegate.destroy();\n};\n\n\nprovide('outboundFormTracker', OutboundFormTracker);\n","/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar assign = require('object-assign');\nvar delegate = require('dom-utils/lib/delegate');\nvar parseUrl = require('dom-utils/lib/parse-url');\nvar provide = require('../provide');\nvar usage = require('../usage');\nvar createFieldsObj = require('../utilities').createFieldsObj;\nvar getAttributeFields = require('../utilities').getAttributeFields;\n\n\n/**\n * Registers outbound link tracking on a tracker object.\n * @constructor\n * @param {Object} tracker Passed internally by analytics.js\n * @param {?Object} opts Passed by the require command.\n */\nfunction OutboundLinkTracker(tracker, opts) {\n\n usage.track(tracker, usage.plugins.OUTBOUND_LINK_TRACKER);\n\n // Feature detects to prevent errors in unsupporting browsers.\n if (!window.addEventListener) return;\n\n this.opts = assign({\n events: ['click'],\n linkSelector: 'a, area',\n shouldTrackOutboundLink: this.shouldTrackOutboundLink,\n fieldsObj: {},\n attributePrefix: 'ga-',\n hitFilter: null\n }, opts);\n\n this.tracker = tracker;\n\n // Binds methods.\n this.handleLinkInteractions = this.handleLinkInteractions.bind(this);\n\n // Creates a mapping of events to their delegates\n this.delegates = {};\n this.opts.events.forEach(function(event) {\n this.delegates[event] = delegate(document, event, this.opts.linkSelector,\n this.handleLinkInteractions, {composed: true, useCapture: true});\n }.bind(this));\n}\n\n\n/**\n * Handles all interactions on link elements. A link is considered an outbound\n * link if its hostname property does not match location.hostname. When the\n * beacon transport method is not available, the links target is set to\n * \"_blank\" to ensure the hit can be sent.\n * @param {Event} event The DOM click event.\n * @param {Element} link The delegated event target.\n */\nOutboundLinkTracker.prototype.handleLinkInteractions = function(event, link) {\n\n if (this.opts.shouldTrackOutboundLink(link, parseUrl)) {\n // Opens outbound links in a new tab if the browser doesn't support\n // the beacon transport method.\n if (!navigator.sendBeacon) {\n link.target = '_blank';\n }\n\n var href = link.getAttribute('href') || link.getAttribute('xlink:href');\n var url = parseUrl(href);\n\n var defaultFields = {\n transport: 'beacon',\n eventCategory: 'Outbound Link',\n eventAction: event.type,\n eventLabel: url.href\n };\n\n var userFields = assign({}, this.opts.fieldsObj,\n getAttributeFields(link, this.opts.attributePrefix));\n\n this.tracker.send('event', createFieldsObj(\n defaultFields, userFields, this.tracker, this.opts.hitFilter, link));\n }\n};\n\n\n/**\n * Determines whether or not the tracker should send a hit when a link is\n * clicked. By default links with a hostname property not equal to the current\n * hostname are tracked.\n * @param {Element} link The link that was clicked on.\n * @param {Function} parseUrl A cross-browser utility method for url parsing.\n * @return {boolean} Whether or not the link should be tracked.\n */\nOutboundLinkTracker.prototype.shouldTrackOutboundLink =\n function(link, parseUrl) {\n\n var href = link.getAttribute('href') || link.getAttribute('xlink:href');\n var url = parseUrl(href);\n return url.hostname != location.hostname &&\n url.protocol.slice(0, 4) == 'http';\n};\n\n\n/**\n * Removes all event listeners and instance properties.\n */\nOutboundLinkTracker.prototype.remove = function() {\n Object.keys(this.delegates).forEach(function(key) {\n this.delegates[key].destroy();\n }.bind(this));\n};\n\n\nprovide('outboundLinkTracker', OutboundLinkTracker);\n","/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar assign = require('object-assign');\nvar provide = require('../provide');\nvar usage = require('../usage');\nvar createFieldsObj = require('../utilities').createFieldsObj;\nvar isObject = require('../utilities').isObject;\n\n\nvar DEFAULT_SESSION_TIMEOUT = 30; // 30 minutes.\n\n\n/**\n * Registers outbound link tracking on tracker object.\n * @constructor\n * @param {Object} tracker Passed internally by analytics.js\n * @param {?Object} opts Passed by the require command.\n */\nfunction PageVisibilityTracker(tracker, opts) {\n\n usage.track(tracker, usage.plugins.PAGE_VISIBILITY_TRACKER);\n\n // Feature detects to prevent errors in unsupporting browsers.\n if (!window.addEventListener) return;\n\n this.opts = assign({\n sessionTimeout: DEFAULT_SESSION_TIMEOUT,\n changeTemplate: this.changeTemplate,\n hiddenMetricIndex: null,\n visibleMetricIndex: null,\n fieldsObj: {},\n hitFilter: null\n }, opts);\n\n this.tracker = tracker;\n this.visibilityState = document.visibilityState;\n\n // Consider the plugin creation to be the start of the visibility change\n // time calculations.\n this.lastVisibilityChangeTime = +new Date;\n\n // Binds methods to `this`.\n this.handleVisibilityStateChange =\n this.handleVisibilityStateChange.bind(this);\n\n this.overrideTrackerSendMethod();\n this.overrideTrackerSendHitTask();\n\n document.addEventListener(\n 'visibilitychange', this.handleVisibilityStateChange);\n}\n\n\n/**\n * Handles changes to `document.visibilityState`. This method sends events when\n * the visibility state changes during active sessions (active meaning the\n * session has not timed out). If the session has timed out, a return to a\n * visibility state of visible will trigger a new pageview (instead of a\n * visibility change event). Lastly, this method keeps track of the elapsed\n * time a document's visibility state was visible and sends that as the event\n * value for hidden events, allowing you to more accurately derive how long\n * a user spent active during a session.\n */\nPageVisibilityTracker.prototype.handleVisibilityStateChange = function() {\n\n var defaultFields;\n this.prevVisibilityState = this.visibilityState;\n this.visibilityState = document.visibilityState;\n\n if (this.sessionHasTimedOut()) {\n // Prevents sending 'hidden' state hits when the session has timed out.\n if (this.visibilityState == 'hidden') return;\n\n if (this.visibilityState == 'visible') {\n // If the session has timed out, a transition to \"visible\" should be\n // considered a new pageview and a new session.\n defaultFields = {transport: 'beacon'};\n this.tracker.send('pageview', createFieldsObj(defaultFields,\n this.opts.fieldsObj, this.tracker, this.opts.hitFilter));\n }\n }\n else {\n // Rounds the time up to the nearest second. If the rounded value is zero\n // use 1 instead since unset metrics default to 0.\n var timeDeltaInSeconds = Math.round(\n (new Date - this.lastVisibilityChangeTime) / 1000) || 1;\n\n defaultFields = {\n transport: 'beacon',\n eventCategory: 'Page Visibility',\n eventAction: 'change',\n eventLabel: this.opts.changeTemplate(\n this.prevVisibilityState, this.visibilityState),\n eventValue: timeDeltaInSeconds\n };\n\n // Changes to hidden are non interaction hits by default\n if (this.visibilityState == 'hidden') defaultFields.nonInteraction = true;\n\n // If a custom metric was specified for the current visibility state,\n // give it the same as the event value.\n var metric = this.opts[this.prevVisibilityState + 'MetricIndex'];\n if (metric) defaultFields['metric' + metric] = timeDeltaInSeconds;\n\n this.tracker.send('event', createFieldsObj(defaultFields,\n this.opts.fieldsObj, this.tracker, this.opts.hitFilter));\n }\n\n // Updates the time the last visibility state change event occurred, so\n // change events can report the delta.\n this.lastVisibilityChangeTime = +new Date;\n};\n\n\n/**\n * Returns true if the session has not timed out. A session timeout occurs when\n * more than `this.opts.sessionTimeout` minutes has elapsed since the\n * tracker sent the previous hit.\n * @return {boolean} True if the session has timed out.\n */\nPageVisibilityTracker.prototype.sessionHasTimedOut = function() {\n var minutesSinceLastHit = (new Date - this.lastHitTime) / (60 * 1000);\n return this.opts.sessionTimeout < minutesSinceLastHit;\n};\n\n\n/**\n * Overrides the `tracker.send` method to send a pageview hit before the\n * current hit being sent if the session has timed out and the current hit is\n * not a pageview itself.\n */\nPageVisibilityTracker.prototype.overrideTrackerSendMethod = function() {\n this.originalTrackerSendMethod = this.tracker.send;\n\n this.tracker.send = function() {\n var args = Array.prototype.slice.call(arguments);\n var firstArg = args[0];\n var hitType = isObject(firstArg) ? firstArg.hitType : firstArg;\n var isPageview = hitType == 'pageview';\n\n if (!isPageview && this.sessionHasTimedOut()) {\n var defaultFields = {transport: 'beacon'};\n this.originalTrackerSendMethod.call(this.tracker, 'pageview',\n createFieldsObj(defaultFields, this.opts.fieldsObj,\n this.tracker, this.opts.hitFilter));\n }\n\n this.originalTrackerSendMethod.apply(this.tracker, args);\n }.bind(this);\n};\n\n\n/**\n * Overrides the tracker's `sendHitTask` to record the time of the previous\n * hit. This is used to determine whether or not a session has timed out.\n */\nPageVisibilityTracker.prototype.overrideTrackerSendHitTask = function() {\n this.originalTrackerSendHitTask = this.tracker.get('sendHitTask');\n this.lastHitTime = +new Date;\n\n this.tracker.set('sendHitTask', function(model) {\n this.originalTrackerSendHitTask(model);\n this.lastHitTime = +new Date;\n }.bind(this));\n};\n\n\n/**\n * Sets the default formatting of the change event label.\n * This can be overridden by setting the `changeTemplate` option.\n * @param {string} oldValue The value of the media query prior to the change.\n * @param {string} newValue The value of the media query after the change.\n * @return {string} The formatted event label.\n */\nPageVisibilityTracker.prototype.changeTemplate = function(oldValue, newValue) {\n return oldValue + ' => ' + newValue;\n};\n\n\n/**\n * Removes all event listeners and instance properties.\n */\n PageVisibilityTracker.prototype.remove = function() {\n this.tracker.set('sendHitTask', this.originalTrackerSendHitTask);\n this.tracker.send = this.originalTrackerSendMethod;\n\n document.removeEventListener(\n 'visibilitychange', this.handleVisibilityStateChange);\n};\n\n\nprovide('pageVisibilityTracker', PageVisibilityTracker);\n","/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/* global FB, twttr */\n\n\nvar assign = require('object-assign');\nvar provide = require('../provide');\nvar usage = require('../usage');\nvar createFieldsObj = require('../utilities').createFieldsObj;\n\n\n/**\n * Registers social tracking on tracker object.\n * Supports both declarative social tracking via HTML attributes as well as\n * tracking for social events when using official Twitter or Facebook widgets.\n * @constructor\n * @param {Object} tracker Passed internally by analytics.js\n * @param {?Object} opts Passed by the require command.\n */\nfunction SocialWidgetTracker(tracker, opts) {\n\n usage.track(tracker, usage.plugins.SOCIAL_WIDGET_TRACKER);\n\n // Feature detects to prevent errors in unsupporting browsers.\n if (!window.addEventListener) return;\n\n this.opts = assign({\n fieldsObj: {},\n hitFilter: null\n }, opts);\n\n this.tracker = tracker;\n\n // Binds methods to `this`.\n this.addWidgetListeners = this.addWidgetListeners.bind(this);\n this.addTwitterEventHandlers = this.addTwitterEventHandlers.bind(this);\n this.handleTweetEvents = this.handleTweetEvents.bind(this);\n this.handleFollowEvents = this.handleFollowEvents.bind(this);\n this.handleLikeEvents = this.handleLikeEvents.bind(this);\n this.handleUnlikeEvents = this.handleUnlikeEvents.bind(this);\n\n if (document.readyState != 'complete') {\n // Adds the widget listeners after the window's `load` event fires.\n // If loading widgets using the officially recommended snippets, they\n // will be available at `window.load`. If not users can call the\n // `addWidgetListeners` method manually.\n window.addEventListener('load', this.addWidgetListeners);\n }\n else {\n this.addWidgetListeners();\n }\n}\n\n\n/**\n * Invokes the methods to add Facebook and Twitter widget event listeners.\n * Ensures the respective global namespaces are present before adding.\n */\nSocialWidgetTracker.prototype.addWidgetListeners = function() {\n if (window.FB) this.addFacebookEventHandlers();\n if (window.twttr) this.addTwitterEventHandlers();\n};\n\n\n/**\n * Adds event handlers for the \"tweet\" and \"follow\" events emitted by the\n * official tweet and follow buttons. Note: this does not capture tweet or\n * follow events emitted by other Twitter widgets (tweet, timeline, etc.).\n */\nSocialWidgetTracker.prototype.addTwitterEventHandlers = function() {\n try {\n twttr.ready(function() {\n twttr.events.bind('tweet', this.handleTweetEvents);\n twttr.events.bind('follow', this.handleFollowEvents);\n }.bind(this));\n } catch(err) {}\n};\n\n\n/**\n * Removes event handlers for the \"tweet\" and \"follow\" events emitted by the\n * official tweet and follow buttons.\n */\nSocialWidgetTracker.prototype.removeTwitterEventHandlers = function() {\n try {\n twttr.ready(function() {\n twttr.events.unbind('tweet', this.handleTweetEvents);\n twttr.events.unbind('follow', this.handleFollowEvents);\n }.bind(this));\n } catch(err) {}\n};\n\n\n/**\n * Adds event handlers for the \"like\" and \"unlike\" events emitted by the\n * official Facebook like button.\n */\nSocialWidgetTracker.prototype.addFacebookEventHandlers = function() {\n try {\n FB.Event.subscribe('edge.create', this.handleLikeEvents);\n FB.Event.subscribe('edge.remove', this.handleUnlikeEvents);\n } catch(err) {}\n};\n\n\n/**\n * Removes event handlers for the \"like\" and \"unlike\" events emitted by the\n * official Facebook like button.\n */\nSocialWidgetTracker.prototype.removeFacebookEventHandlers = function() {\n try {\n FB.Event.unsubscribe('edge.create', this.handleLikeEvents);\n FB.Event.unsubscribe('edge.remove', this.handleUnlikeEvents);\n } catch(err) {}\n};\n\n\n/**\n * Handles `tweet` events emitted by the Twitter JS SDK.\n * @param {Object} event The Twitter event object passed to the handler.\n */\nSocialWidgetTracker.prototype.handleTweetEvents = function(event) {\n // Ignores tweets from widgets that aren't the tweet button.\n if (event.region != 'tweet') return;\n\n var url = event.data.url || event.target.getAttribute('data-url') ||\n location.href;\n\n var defaultFields = {\n transport: 'beacon',\n socialNetwork: 'Twitter',\n socialAction: 'tweet',\n socialTarget: url\n };\n this.tracker.send('social', createFieldsObj(defaultFields,\n this.opts.fieldsObj, this.tracker, this.opts.hitFilter));\n};\n\n\n/**\n * Handles `follow` events emitted by the Twitter JS SDK.\n * @param {Object} event The Twitter event object passed to the handler.\n */\nSocialWidgetTracker.prototype.handleFollowEvents = function(event) {\n // Ignore follows from widgets that aren't the follow button.\n if (event.region != 'follow') return;\n\n var screenName = event.data.screen_name ||\n event.target.getAttribute('data-screen-name');\n\n var defaultFields = {\n transport: 'beacon',\n socialNetwork: 'Twitter',\n socialAction: 'follow',\n socialTarget: screenName\n };\n this.tracker.send('social', createFieldsObj(defaultFields,\n this.opts.fieldsObj, this.tracker, this.opts.hitFilter));\n};\n\n\n/**\n * Handles `like` events emitted by the Facebook JS SDK.\n * @param {string} url The URL corresponding to the like event.\n */\nSocialWidgetTracker.prototype.handleLikeEvents = function(url) {\n var defaultFields = {\n transport: 'beacon',\n socialNetwork: 'Facebook',\n socialAction: 'like',\n socialTarget: url\n };\n this.tracker.send('social', createFieldsObj(defaultFields,\n this.opts.fieldsObj, this.tracker, this.opts.hitFilter));\n};\n\n\n/**\n * Handles `unlike` events emitted by the Facebook JS SDK.\n * @param {string} url The URL corresponding to the unlike event.\n */\nSocialWidgetTracker.prototype.handleUnlikeEvents = function(url) {\n var defaultFields = {\n transport: 'beacon',\n socialNetwork: 'Facebook',\n socialAction: 'unlike',\n socialTarget: url\n };\n this.tracker.send('social', createFieldsObj(defaultFields,\n this.opts.fieldsObj, this.tracker, this.opts.hitFilter));\n};\n\n\n/**\n * Removes all event listeners and instance properties.\n */\nSocialWidgetTracker.prototype.remove = function() {\n window.removeEventListener('load', this.addWidgetListeners);\n this.removeFacebookEventHandlers();\n this.removeTwitterEventHandlers();\n};\n\n\nprovide('socialWidgetTracker', SocialWidgetTracker);\n","/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar assign = require('object-assign');\nvar provide = require('../provide');\nvar usage = require('../usage');\nvar createFieldsObj = require('../utilities').createFieldsObj;\nvar isObject = require('../utilities').isObject;\n\n\n/**\n * Adds handler for the history API methods\n * @constructor\n * @param {Object} tracker Passed internally by analytics.js\n * @param {?Object} opts Passed by the require command.\n */\nfunction UrlChangeTracker(tracker, opts) {\n\n usage.track(tracker, usage.plugins.URL_CHANGE_TRACKER);\n\n // Feature detects to prevent errors in unsupporting browsers.\n if (!history.pushState || !window.addEventListener) return;\n\n this.opts = assign({\n shouldTrackUrlChange: this.shouldTrackUrlChange,\n fieldsObj: {},\n hitFilter: null\n }, opts);\n\n this.tracker = tracker;\n\n // Sets the initial page field.\n // Don't set this on the tracker yet so campaign data can be retreived\n // from the location field.\n this.path = getPath();\n\n this.updateTrackerData = this.updateTrackerData.bind(this);\n\n // Overrides history.pushState.\n this.originalPushState = history.pushState;\n history.pushState = function(state, title) {\n // Sets the document title for reference later.\n // TODO(philipwalton): consider using WeakMap for this to not conflict\n // with any user-defined property also called \"title\".\n if (isObject(state) && title) state.title = title;\n\n this.originalPushState.apply(history, arguments);\n this.updateTrackerData();\n }.bind(this);\n\n // Overrides history.repaceState.\n this.originalReplaceState = history.replaceState;\n history.replaceState = function(state, title) {\n // Sets the document title for reference later.\n // TODO(philipwalton): consider using WeakMap for this to not conflict\n // with any user-defined property also called \"title\".\n if (isObject(state) && title) state.title = title;\n\n this.originalReplaceState.apply(history, arguments);\n this.updateTrackerData(false);\n }.bind(this);\n\n // Handles URL changes via user interaction.\n window.addEventListener('popstate', this.updateTrackerData);\n}\n\n\n/**\n * Updates the page and title fields on the tracker if necessary and\n * optionally sends a pageview.\n * @param {boolean} shouldSendPageview Indicates whether the tracker should\n * send a pageview after updating the URL.\n */\nUrlChangeTracker.prototype.updateTrackerData = function(shouldSendPageview) {\n\n // Sets the default.\n shouldSendPageview = shouldSendPageview === false ? false : true;\n\n // Calls the update logic asychronously to help ensure user callbacks\n // happen first.\n setTimeout(function() {\n\n var oldPath = this.path;\n var newPath = getPath();\n\n if (oldPath != newPath &&\n this.opts.shouldTrackUrlChange.call(this, newPath, oldPath)) {\n\n this.path = newPath;\n this.tracker.set({\n page: newPath,\n title: isObject(history.state) && history.state.title || document.title\n });\n\n if (shouldSendPageview) {\n var defaultFields = {transport: 'beacon'};\n this.tracker.send('pageview', createFieldsObj(defaultFields,\n this.opts.fieldsObj, this.tracker, this.opts.hitFilter));\n }\n }\n }.bind(this), 0);\n};\n\n\n/**\n * Determines whether or not the tracker should send a hit with the new page\n * data. This default implementation can be overrided in the config options.\n * @param {string} newPath The path prior to the URL change.\n * @param {string} oldPath The path after the URL change.\n * @return {boolean} Whether or not the URL change should be tracked.\n */\nUrlChangeTracker.prototype.shouldTrackUrlChange = function(newPath, oldPath) {\n return newPath && oldPath;\n};\n\n\n/**\n * Removes all event listeners and instance properties.\n */\nUrlChangeTracker.prototype.remove = function() {\n window.removeEventListener('popstate', this.updateTrackerData);\n history.replaceState = this.originalReplaceState;\n history.pushState = this.originalPushState;\n\n this.tracker = null;\n this.opts = null;\n this.path = null;\n\n this.updateTrackerData = null;\n this.originalReplaceState = null;\n this.originalPushState = null;\n};\n\n\n/**\n * @return {string} The path value of the current URL.\n */\nfunction getPath() {\n return location.pathname + location.search;\n}\n\n\nprovide('urlChangeTracker', UrlChangeTracker);\n","/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar constants = require('./constants');\nvar utilities = require('./utilities');\n\n\n// Adds the dev ID to the list of dev IDs if any plugin is used.\n(window.gaDevIds = window.gaDevIds || []).push(constants.DEV_ID);\n\n\n/**\n * Provides a plugin for use with analytics.js, accounting for the possibility\n * that the global command queue has been renamed or not yet defined.\n * @param {string} pluginName The plugin name identifier.\n * @param {Function} pluginConstructor The plugin constructor function.\n */\nmodule.exports = function providePlugin(pluginName, pluginConstructor) {\n var gaAlias = window['GoogleAnalyticsObject'] || 'ga';\n window[gaAlias] = window[gaAlias] || function() {\n (window[gaAlias]['q'] = window[gaAlias]['q'] || []).push(arguments);\n };\n\n // Formally provides the plugin for use with analytics.js.\n window[gaAlias]('provide', pluginName, pluginConstructor);\n\n // Registers the plugin on the global gaplugins object.\n window.gaplugins = window.gaplugins || {};\n window.gaplugins[utilities.capitalize(pluginName)] = pluginConstructor;\n};\n","/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar constants = require('./constants');\n\n\nvar plugins = {\n CLEAN_URL_TRACKER: 1,\n EVENT_TRACKER: 2,\n IMPRESSION_TRACKER: 3,\n MEDIA_QUERY_TRACKER: 4,\n OUTBOUND_FORM_TRACKER: 5,\n OUTBOUND_LINK_TRACKER: 6,\n PAGE_VISIBILITY_TRACKER: 7,\n SOCIAL_WIDGET_TRACKER: 8,\n URL_CHANGE_TRACKER: 9\n};\nvar PLUGIN_COUNT = 9;\n\n\n/**\n * Converts a hexadecimal string to a binary string.\n * @param {string} hex A hexadecimal numeric string.\n * @return {string} a binary numeric string.\n */\nfunction convertHexToBin(hex) {\n return parseInt(hex || '0', 16).toString(2);\n}\n\n\n/**\n * Converts a binary string to a hexadecimal string.\n * @param {string} bin A binary numeric string.\n * @return {string} a hexadecimal numeric string.\n */\nfunction convertBinToHex(bin) {\n return parseInt(bin || '0', 2).toString(16);\n}\n\n\n/**\n * Adds leading zeros to a string if it's less than a minimum length.\n * @param {string} str A string to pad.\n * @param {number} len The minimum length of the string\n * @return {string} The padded string.\n */\nfunction padZeros(str, len) {\n if (str.length < len) {\n var toAdd = len - str.length;\n while (toAdd) {\n str = '0' + str;\n toAdd--;\n }\n }\n return str;\n}\n\n\n/**\n * Accepts a binary numeric string and flips the digit from 0 to 1 at the\n * specified index.\n * @param {string} str The binary numeric string.\n * @param {number} index The index to flip the bit.\n * @return {string} The new binary string with the bit flipped on\n */\nfunction flipBitOn(str, index) {\n return str.substr(0, index) + 1 + str.substr(index + 1);\n}\n\n\n/**\n * Accepts a tracker and a plugin index and flips the bit at the specified\n * index on the tracker's usage parameter.\n * @param {Object} tracker An analytics.js tracker.\n * @param {number} pluginIndex The index of the plugin in the global list.\n */\nfunction trackPlugin(tracker, pluginIndex) {\n var usageHex = tracker.get(constants.USAGE_PARAM);\n var usageBin = padZeros(convertHexToBin(usageHex), PLUGIN_COUNT);\n\n // Flip the bit of the plugin being tracked.\n usageBin = flipBitOn(usageBin, PLUGIN_COUNT - pluginIndex);\n\n // Stores the modified usage string back on the tracker.\n tracker.set(constants.USAGE_PARAM, convertBinToHex(usageBin));\n}\n\n\n/**\n * Accepts a tracker and adds the current version to the version param.\n * @param {Object} tracker An analytics.js tracker.\n */\nfunction trackVersion(tracker) {\n tracker.set(constants.VERSION_PARAM, constants.VERSION);\n}\n\n\nmodule.exports = {\n track: function(tracker, plugin) {\n trackVersion(tracker);\n trackPlugin(tracker, plugin);\n },\n plugins: plugins\n};\n","/**\n * Copyright 2016 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar assign = require('object-assign');\nvar getAttributes = require('dom-utils/lib/get-attributes');\n\n\nvar utilities = {\n\n\n /**\n * Accepts default and user override fields and an optional tracker, hit\n * filter, and target element and returns a single object that can be used in\n * `ga('send', ...)` commands.\n * @param {Object} defaultFields The default fields to return.\n * @param {Object} userFields Fields set by the user to override the defaults.\n * @param {Object} opt_tracker The tracker object to apply the hit filter to.\n * @param {Function} opt_hitFilter A filter function that gets\n * called with the tracker model right before the `buildHitTask`. It can\n * be used to modify the model for the current hit only.\n * @param {Element} opt_target If the hit originated from an interaction\n * with a DOM element, hitFilter is invoked with that element as the\n * second argument.\n * @return {Object} The final fields object.\n */\n createFieldsObj: function(\n defaultFields, userFields, opt_tracker, opt_hitFilter, opt_target) {\n\n if (typeof opt_hitFilter == 'function') {\n var originalBuildHitTask = opt_tracker.get('buildHitTask');\n return {\n buildHitTask: function(model) {\n model.set(defaultFields, null, true);\n model.set(userFields, null, true);\n opt_hitFilter(model, opt_target);\n originalBuildHitTask(model);\n }\n };\n }\n else {\n return assign({}, defaultFields, userFields);\n }\n },\n\n\n /**\n * Retrieves the attributes from an DOM element and returns a fields object\n * for all attributes matching the passed prefix string.\n * @param {Element} element The DOM element to get attributes from.\n * @param {string} prefix An attribute prefix. Only the attributes matching\n * the prefix will be returned on the fields object.\n * @return {Object} An object of analytics.js fields and values\n */\n getAttributeFields: function(element, prefix) {\n var attributes = getAttributes(element);\n var attributeFields = {};\n\n Object.keys(attributes).forEach(function(attribute) {\n\n // The `on` prefix is used for event handling but isn't a field.\n if (attribute.indexOf(prefix) === 0 && attribute != prefix + 'on') {\n\n var value = attributes[attribute];\n\n // Detects Boolean value strings.\n if (value == 'true') value = true;\n if (value == 'false') value = false;\n\n var field = utilities.camelCase(attribute.slice(prefix.length));\n attributeFields[field] = value;\n }\n });\n\n return attributeFields;\n },\n\n\n domReady: function(callback) {\n if (document.readyState == 'loading') {\n document.addEventListener('DOMContentLoaded', function fn() {\n document.removeEventListener('DOMContentLoaded', fn);\n callback();\n });\n } else {\n callback();\n }\n },\n\n\n /**\n * Accepts a function and returns a wrapped version of the function that is\n * expected to be called elsewhere in the system. If it's not called\n * elsewhere after the timeout period, it's called regardless. The wrapper\n * function also prevents the callback from being called more than once.\n * @param {Function} callback The function to call.\n * @param {number} wait How many milliseconds to wait before invoking\n * the callback.\n * @returns {Function} The wrapped version of the passed function.\n */\n withTimeout: function(callback, wait) {\n var called = false;\n var fn = function() {\n if (!called) {\n called = true;\n callback();\n }\n };\n setTimeout(fn, wait || 2000);\n return fn;\n },\n\n\n /**\n * Accepts a string containing hyphen or underscore word separators and\n * converts it to camelCase.\n * @param {string} str The string to camelCase.\n * @return {string} The camelCased version of the string.\n */\n camelCase: function(str) {\n return str.replace(/[\\-\\_]+(\\w?)/g, function(match, p1) {\n return p1.toUpperCase();\n });\n },\n\n\n /**\n * Capitalizes the first letter of a string.\n * @param {string} str The input string.\n * @return {string} The capitalized string\n */\n capitalize: function(str) {\n return str.charAt(0).toUpperCase() + str.slice(1);\n },\n\n\n /**\n * Indicates whether the passed variable is a JavaScript object.\n * @param {*} value The input variable to test.\n * @return {boolean} Whether or not the test is an object.\n */\n isObject: function(value) {\n return typeof value == 'object' && value !== null;\n },\n\n\n /**\n * Indicates whether the passed variable is a JavaScript array.\n * @param {*} value The input variable to test.\n * @return {boolean} Whether or not the value is an array.\n */\n isArray: Array.isArray || function(value) {\n return Object.prototype.toString.call(value) === '[object Array]';\n },\n\n\n /**\n * Accepts a value that may or may not be an array. If it is not an array,\n * it is returned as the first item in a single-item array.\n * @param {*} value The value to convert to an array if it is not.\n * @return {Array} The array-ified value.\n */\n toArray: function(value) {\n return utilities.isArray(value) ? value : [value];\n }\n};\n\nmodule.exports = utilities;\n","module.exports = Date.now || now\n\nfunction now() {\n return new Date().getTime()\n}\n","\n/**\n * Module dependencies.\n */\n\nvar now = require('date-now');\n\n/**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * N milliseconds. If `immediate` is passed, trigger the function on the\n * leading edge, instead of the trailing.\n *\n * @source underscore.js\n * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/\n * @param {Function} function to wrap\n * @param {Number} timeout in ms (`100`)\n * @param {Boolean} whether to execute at the beginning (`false`)\n * @api public\n */\n\nmodule.exports = function debounce(func, wait, immediate){\n var timeout, args, context, timestamp, result;\n if (null == wait) wait = 100;\n\n function later() {\n var last = now() - timestamp;\n\n if (last < wait && last > 0) {\n timeout = setTimeout(later, wait - last);\n } else {\n timeout = null;\n if (!immediate) {\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n }\n }\n };\n\n return function debounced() {\n context = this;\n args = arguments;\n timestamp = now();\n var callNow = immediate && !timeout;\n if (!timeout) timeout = setTimeout(later, wait);\n if (callNow) {\n result = func.apply(context, args);\n context = args = null;\n }\n\n return result;\n };\n};\n","var matches = require('./matches');\nvar parents = require('./parents');\n\n/**\n * Gets the closest parent element that matches the passed selector.\n * @param {Element} element The element whose parents to check.\n * @param {string} selector The CSS selector to match against.\n * @param {boolean} shouldCheckSelf True if the selector should test against\n * the passed element itself.\n * @return {?Element} The matching element or undefined.\n */\nmodule.exports = function closest(element, selector, shouldCheckSelf) {\n if (!(element && element.nodeType == 1 && selector)) return;\n\n var parentElements =\n (shouldCheckSelf ? [element] : []).concat(parents(element));\n\n for (var i = 0, parent; parent = parentElements[i]; i++) {\n if (matches(parent, selector)) return parent;\n }\n};\n","var closest = require('./closest');\nvar matches = require('./matches');\n\n/**\n * Delegates the handling of events for an element matching a selector to an\n * ancestor of the matching element.\n * @param {Element} ancestor The ancestor element to add the listener to.\n * @param {string} eventType The event type to listen to.\n * @param {string} selector A CSS selector to match against child elements.\n * @param {Function} callback A function to run any time the event happens.\n * @param {Object} opts A configuration options object. The available options:\n * - useCapture: If true, bind to the event capture phase.\n * - deep: If true, delegate into shadow trees.\n * @return {Object} The delegate object. It contains a destroy method.\n */\n module.exports = function delegate(\n ancestor, eventType, selector, callback, opts) {\n\n opts = opts || {};\n\n // Defines the event listener.\n var listener = function(event) {\n\n // If opts.composed is true and the event originated from inside a Shadow\n // tree, check the composed path nodes.\n if (opts.composed && typeof event.composedPath == 'function') {\n var composedPath = event.composedPath();\n for (var i = 0, node; node = composedPath[i]; i++) {\n if (node.nodeType == 1 && matches(node, selector)) {\n delegateTarget = node;\n }\n }\n }\n // Otherwise check the parents.\n else {\n var delegateTarget = closest(event.target, selector, true);\n }\n\n if (delegateTarget) {\n callback.call(delegateTarget, event, delegateTarget);\n }\n };\n\n ancestor.addEventListener(eventType, listener, opts.useCapture);\n\n return {\n destroy: function() {\n ancestor.removeEventListener(eventType, listener, opts.useCapture);\n }\n };\n};\n","/**\n * Gets all attributes of an element as a plain JavaScriot object.\n * @param {Element} element The element whose attributes to get.\n * @return {Object} An object whose keys are the attribute keys and whose\n * values are the attribute values. If no attributes exist, an empty\n * object is returned.\n */\nmodule.exports = function getAttributes(element) {\n var attrs = {};\n\n // Validate input.\n if (!(element && element.nodeType == 1)) return attrs;\n\n // Return an empty object if there are no attributes.\n var map = element.attributes;\n if (map.length === 0) return {};\n\n for (var i = 0, attr; attr = map[i]; i++) {\n attrs[attr.name] = attr.value;\n }\n return attrs;\n};\n","var proto = window.Element.prototype;\nvar nativeMatches = proto.matches ||\n proto.matchesSelector ||\n proto.webkitMatchesSelector ||\n proto.mozMatchesSelector ||\n proto.msMatchesSelector ||\n proto.oMatchesSelector;\n\n\n/**\n * Tests whether a DOM element matches a selector. This polyfills the native\n * Element.prototype.matches method across browsers.\n * @param {Element} element The DOM element to test.\n * @param {string} selector The CSS selector to test element against.\n * @return {boolean} True if the selector matches.\n */\n function matchesSelector(element, selector) {\n if (typeof selector != 'string') return false;\n if (nativeMatches) return nativeMatches.call(element, selector);\n var nodes = element.parentNode.querySelectorAll(selector);\n for (var i = 0, node; node = nodes[i]; i++) {\n if (node == element) return true;\n }\n return false;\n}\n\n\n/**\n * Tests if a DOM elements matches any of the test DOM elements or selectors.\n * @param {Element} element The DOM element to test.\n * @param {Element|string|Array} test A DOM element, a CSS\n * selector, or an array of DOM elements or CSS selectors to match against.\n * @return {boolean} True of any part of the test matches.\n */\nmodule.exports = function matches(element, test) {\n // Validate input.\n if (element && element.nodeType == 1 && test) {\n // if test is a string or DOM element test it.\n if (typeof test == 'string' || test.nodeType == 1) {\n return element == test || matchesSelector(element, test);\n }\n // if it has a length property iterate over the items\n // and return true if any match.\n else if ('length' in test) {\n for (var i = 0, item; item = test[i]; i++) {\n if (element == item || matchesSelector(element, item)) return true;\n }\n }\n }\n // Still here? Return false\n return false;\n};\n","/**\n * Returns an array of a DOM element's parent elements.\n * @param {Element} element The DOM element whose parents to get.\n * @return {Array} An array of all parent elemets, or an empty array if no\n * parent elements are found.\n */\nmodule.exports = function parents(element) {\n var list = [];\n while (element && element.parentNode && element.parentNode.nodeType == 1) {\n list.push(element = element.parentNode);\n }\n return list;\n};\n","var HTTP_PORT = '80';\nvar HTTPS_PORT = '443';\nvar DEFAULT_PORT = RegExp(':(' + HTTP_PORT + '|' + HTTPS_PORT + ')$');\n\n\nvar a = document.createElement('a');\nvar cache = {};\n\n\n/**\n * Parses the given url and returns an object mimicing a `Location` object.\n * @param {string} url The url to parse.\n * @return {Object} An object with the same properties as a `Location`\n * plus the convience properties `path` and `query`.\n */\nmodule.exports = function parseUrl(url) {\n\n // All falsy values (as well as \".\") should map to the current URL.\n url = (!url || url == '.') ? location.href : url;\n\n if (cache[url]) return cache[url];\n\n a.href = url;\n\n // When parsing file relative paths (e.g. `../index.html`), IE will correctly\n // resolve the `href` property but will keep the `..` in the `path` property.\n // It will also not include the `host` or `hostname` properties. Furthermore,\n // IE will sometimes return no protocol or just a colon, especially for things\n // like relative protocol URLs (e.g. \"//google.com\").\n // To workaround all of these issues, we reparse with the full URL from the\n // `href` property.\n if (url.charAt(0) == '.' || url.charAt(0) == '/') return parseUrl(a.href);\n\n // Don't include default ports.\n var port = (a.port == HTTP_PORT || a.port == HTTPS_PORT) ? '' : a.port;\n\n // PhantomJS sets the port to \"0\" when using the file: protocol.\n port = port == '0' ? '' : port;\n\n // Sometimes IE incorrectly includes a port for default ports\n // (e.g. `:80` or `:443`) even when no port is specified in the URL.\n // http://bit.ly/1rQNoMg\n var host = a.host.replace(DEFAULT_PORT, '');\n\n // Not all browser support `origin` so we have to build it.\n var origin = a.origin ? a.origin : a.protocol + '//' + host;\n\n // Sometimes IE doesn't include the leading slash for pathname.\n // http://bit.ly/1rQNoMg\n var pathname = a.pathname.charAt(0) == '/' ? a.pathname : '/' + a.pathname;\n\n return cache[url] = {\n hash: a.hash,\n host: host,\n hostname: a.hostname,\n href: a.href,\n origin: origin,\n pathname: pathname,\n port: port,\n protocol: a.protocol,\n search: a.search,\n\n // Expose additional helpful properties not part of the Location object.\n fragment: a.hash.slice(1), // The hash without the starting \"#\".\n path: pathname + a.search, // The pathname and the search query (w/o hash).\n query: a.search.slice(1) // The search without the starting \"?\".\n };\n};\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n"]}