/*!
 * Attaches Performance Navigation Timing data to Snowplow events v4.7.0 (https://docs.snowplow.io/)
 * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang
 * Licensed under BSD-3-Clause
 */

"use strict";!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).snowplowPerformanceNavigationTiming={})}(this,(function(e){function n(e){return[{schema:"iglu:org.w3/PerformanceNavigationTiming/jsonschema/1-0-0",data:"entryType duration nextHopProtocol workerStart redirectStart redirectEnd fetchStart domainLookupStart domainLookupEnd connectStart secureConnectionStart connectEnd requestStart responseStart responseEnd transferSize encodedBodySize decodedBodySize serverTiming unloadEventStart unloadEventEnd domInteractive domContentLoadedEventStart domContentLoadedEventEnd domComplete loadEventStart loadEventEnd type redirectCount activationStart deliveryType".split(" ").reduce((function(n,t){var o=e[t];return"serverTiming"===t&&Array.isArray(o)?n[t]=o.length?o.map((function(e){return{description:e.description,duration:e.duration,name:e.name}})):void 0:o&&(n[t]=o),n}),{})}]}var t;e.PerformanceNavigationTimingPlugin=function(){return{activateBrowserPlugin:function(){"undefined"!=typeof PerformanceObserver&&new PerformanceObserver((function(e){0<(e=e.getEntries()[0]).loadEventEnd&&(t=n(e))})).observe({type:"navigation",buffered:!0})},contexts:function(){var e;return(e=t)||(e=(e=window.performance||window.mozPerformance||window.msPerformance||window.webkitPerformance||{}).getEntriesByType&&(e=e.getEntriesByType("navigation")[0])?n(e):[]),e}}},Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=index.umd.min.js.map
