!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e=e||self).AlgoliaAnalytics={})}(this,function(e){"use strict";var n=function(){try{return Boolean(navigator.cookieEnabled)}catch(e){return!1}},t=function(){try{return Boolean(navigator.sendBeacon)}catch(e){return!1}},i=function(){try{return Boolean(XMLHttpRequest)}catch(e){return!1}},o=function(e){return void 0===e},r=function(e){return"string"==typeof e},s=function(e){return"number"==typeof e},a=function(e){return"function"==typeof e};function u(e){return function(n){var t=this;if(!this._userHasOptedOut){if(!this._hasCredentials)throw new Error("Before calling any methods on the analytics, you first need to call the 'init' function with appId and apiKey parameters");var i=n.map(function(e){var n,i,r=e.filters,s=function(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o0;)t[i]=arguments[i+1];e&&a(n[e])?n[e].apply(n,t):console.warn("The method `"+e+"` doesn't exist.")}),o=e[t];o.queue=o.queue||[];var r=o.queue;r.forEach(function(e){var n=[].slice.call(e),t=n[0],o=n.slice(1);i.apply(void 0,[t].concat(o))}),r.push=function(e){var n=[].slice.call(e),t=n[0],o=n.slice(1);i.apply(void 0,[t].concat(o))}}}function m(e){var n=new x({requestFn:e});return"undefined"!=typeof window&&T.call(n,window),n}var j=m(function(){if(t())return w;if(i())return _;throw new Error("Could not find a supported HTTP request client in this environment.")}());e.createInsightsClient=m,e.default=j,Object.defineProperty(e,"__esModule",{value:!0})});