Socket
Socket
Sign inDemoInstall

algoliasearch

Package Overview
Dependencies
Maintainers
3
Versions
374
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

algoliasearch - npm Package Compare versions

Comparing version 3.3.2 to 3.4.0

examples/javascript.html

2

bower.json
{
"name": "algoliasearch",
"version": "3.3.2",
"version": "3.4.0",
"homepage": "https://github.com/algolia/algoliasearch-client-js",

@@ -5,0 +5,0 @@ "authors": [

@@ -1,75 +0,78 @@

/*! algoliasearch 3.3.2 | © 2014, 2015 Algolia SAS | github.com/algolia/algoliasearch-client-js */
(function(g){var m;"undefined"!==typeof window?m=window:"undefined"!==typeof self&&(m=self);m.ALGOLIA_MIGRATION_LAYER=g()})(function(){return function m(e,k,c){function b(f,p){if(!k[f]){if(!e[f]){var n="function"==typeof require&&require;if(!p&&n)return n(f,!0);if(l)return l(f,!0);n=Error("Cannot find module '"+f+"'");throw n.code="MODULE_NOT_FOUND",n;}n=k[f]={exports:{}};e[f][0].call(n.exports,function(c){var l=e[f][1][c];return b(l?l:c)},n,n.exports,m,e,k,c)}return k[f].exports}for(var l="function"==
typeof require&&require,f=0;f<c.length;f++)b(c[f]);return b}({1:[function(m,e,k){function c(f,b){for(var c in b)f.setAttribute(c,b[c])}function b(f,b){f.onload=function(){this.onerror=this.onload=null;b(null,f)};f.onerror=function(){this.onerror=this.onload=null;b(Error("Failed to load "+this.src),f)}}function l(f,b){f.onreadystatechange=function(){if("complete"==this.readyState||"loaded"==this.readyState)this.onreadystatechange=null,b(null,f)}}e.exports=function(f,e,p){var n=document.head||document.getElementsByTagName("head")[0],
k=document.createElement("script");"function"===typeof e&&(p=e,e={});e=e||{};p=p||function(){};k.type=e.type||"text/javascript";k.charset=e.charset||"utf8";k.async="async"in e?!!e.async:!0;k.src=f;e.attrs&&c(k,e.attrs);e.text&&(k.text=""+e.text);("onload"in k?b:l)(k,p);k.onload||b(k,p);n.appendChild(k)}},{}],2:[function(m,e,k){e.exports=function(c){c=new RegExp("cdn\\.jsdelivr\\.net/algoliasearch/latest/"+c.replace(".","\\.")+"(?:\\.min)?\\.js$");for(var b=document.getElementsByTagName("script"),
l=!1,f=0,e=b.length;f<e;f++)if(b[f].src&&c.test(b[f].src)){l=!0;break}return l}},{}],3:[function(m,e,k){(function(c){function b(b){return function(){var f="AlgoliaSearch: loaded V2 script using "+b;c.console&&c.console.log&&c.console.log(f)}}e.exports=function(l){var f=m(1);l="//cdn.jsdelivr.net/algoliasearch/2/"+l+".min.js";c.console&&(c.console.warn?c.console.warn("-- AlgoliaSearch `latest` warning --\nWarning, you are using the `latest` version string from jsDelivr to load the AlgoliaSearch library.\nUsing `latest` is no more recommended, you should load //cdn.jsdelivr.net/algoliasearch/2/algoliasearch.min.js\n\nAlso, we updated the AlgoliaSearch JavaScript client to V3. If you want to upgrade,\nplease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch `latest` warning --"):
c.console.log&&c.console.log("-- AlgoliaSearch `latest` warning --\nWarning, you are using the `latest` version string from jsDelivr to load the AlgoliaSearch library.\nUsing `latest` is no more recommended, you should load //cdn.jsdelivr.net/algoliasearch/2/algoliasearch.min.js\n\nAlso, we updated the AlgoliaSearch JavaScript client to V3. If you want to upgrade,\nplease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch `latest` warning --"));
try{document.write("<script>window.ALGOLIA_SUPPORTS_DOCWRITE = true\x3c/script>"),!0===c.ALGOLIA_SUPPORTS_DOCWRITE?(document.write('<script src="'+l+'">\x3c/script>'),b("document.write")()):f(l,b("DOMElement"))}catch(e){f(l,b("DOMElement"))}}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{1:1}],4:[function(m,e,k){(function(c){e.exports=function(){c.AlgoliaSearch=function(){throw Error("-- AlgoliaSearch V2 => V3 error --\nYou are trying to use a new version of the AlgoliaSearch JavaScript client with an old notation.\nPlease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch V2 => V3 error --");
};c.AlgoliaSearchHelper=function(){throw Error("-- AlgoliaSearch V2 => V3 error --\nYou are trying to use a new version of the AlgoliaSearch JavaScript client with an old notation.\nPlease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch V2 => V3 error --");};AlgoliaExplainResults=function(){throw Error("-- AlgoliaSearch V2 => V3 error --\nYou are trying to use a new version of the AlgoliaSearch JavaScript client with an old notation.\nPlease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch V2 => V3 error --");
}}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],5:[function(m,e,k){e=m(2);k=m(3);m=m(4);e("algoliasearch.angular")?k("algoliasearch.angular"):m()},{2:2,3:3,4:4}]},{},[5])(5)});
(function e$$0(m,e,k){function c(f,l){if(!e[f]){if(!m[f]){var p="function"==typeof require&&require;if(!l&&p)return p(f,!0);if(b)return b(f,!0);p=Error("Cannot find module '"+f+"'");throw p.code="MODULE_NOT_FOUND",p;}p=e[f]={exports:{}};m[f][0].call(p.exports,function(b){var l=m[f][1][b];return c(l?l:b)},p,p.exports,e$$0,m,e,k)}return e[f].exports}for(var b="function"==typeof require&&require,l=0;l<k.length;l++)c(k[l]);return c})({1:[function(g,m,e){function k(){if(!l){l=!0;for(var f,c=b.length;c;){f=
b;b=[];for(var e=-1;++e<c;)f[e]();c=b.length}l=!1}}function c(){}g=m.exports={};var b=[],l=!1;g.nextTick=function(f){b.push(f);l||setTimeout(k,0)};g.title="browser";g.browser=!0;g.env={};g.argv=[];g.version="";g.versions={};g.on=c;g.addListener=c;g.once=c;g.off=c;g.removeListener=c;g.removeAllListeners=c;g.emit=c;g.binding=function(f){throw Error("process.binding is not supported");};g.cwd=function(){return"/"};g.chdir=function(f){throw Error("process.chdir is not supported");};g.umask=function(){return 0}},
{}],2:[function(g,m,e){m.exports=function(c,b,l,f){l=l||"=";var e={};if("string"!==typeof c||0===c.length)return e;var p=/\+/g;c=c.split(b||"&");b=1E3;f&&"number"===typeof f.maxKeys&&(b=f.maxKeys);f=c.length;0<b&&f>b&&(f=b);for(b=0;b<f;++b){var n=c[b].replace(p,"%20"),g=n.indexOf(l),m;0<=g?(m=n.substr(0,g),n=n.substr(g+1)):(m=n,n="");m=decodeURIComponent(m);n=decodeURIComponent(n);Object.prototype.hasOwnProperty.call(e,m)?k(e[m])?e[m].push(n):e[m]=[e[m],n]:e[m]=n}return e};var k=Array.isArray||function(c){return"[object Array]"===
Object.prototype.toString.call(c)}},{}],3:[function(g,m,e){function k(f,b){if(f.map)return f.map(b);for(var c=[],l=0;l<f.length;l++)c.push(b(f[l],l));return c}var c=function(f){switch(typeof f){case "string":return f;case "boolean":return f?"true":"false";case "number":return isFinite(f)?f:"";default:return""}};m.exports=function(f,e,p,g){e=e||"&";p=p||"=";null===f&&(f=void 0);return"object"===typeof f?k(l(f),function(l){var g=encodeURIComponent(c(l))+p;return b(f[l])?k(f[l],function(a){return g+
encodeURIComponent(c(a))}).join(e):g+encodeURIComponent(c(f[l]))}).join(e):g?encodeURIComponent(c(g))+p+encodeURIComponent(c(f)):""};var b=Array.isArray||function(f){return"[object Array]"===Object.prototype.toString.call(f)},l=Object.keys||function(f){var b=[],c;for(c in f)Object.prototype.hasOwnProperty.call(f,c)&&b.push(c);return b}},{}],4:[function(g,m,e){e.decode=e.parse=g(2);e.encode=e.stringify=g(3)},{2:2,3:3}],5:[function(g,m,e){function k(){var b;try{b=c.debug}catch(f){}return b}e=m.exports=
g(6);e.log=function(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)};e.formatArgs=function(){var b=arguments,f=this.useColors;b[0]=(f?"%c":"")+this.namespace+(f?" %c":" ")+b[0]+(f?"%c ":" ")+"+"+e.humanize(this.diff);if(!f)return b;var f="color: "+this.color,b=[b[0],f,"color: inherit"].concat(Array.prototype.slice.call(b,1)),c=0,g=0;b[0].replace(/%[a-z%]/g,function(b){"%%"!==b&&(c++,"%c"===b&&(g=c))});b.splice(g,0,f);return b};e.save=function(b){try{null==
b?c.removeItem("debug"):c.debug=b}catch(f){}};e.load=k;e.useColors=function(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)};var c;if("undefined"!==typeof chrome&&"undefined"!==typeof chrome.storage)c=chrome.storage.local;else a:{try{c=window.localStorage;break a}catch(b){}c=void 0}e.colors="lightseagreen forestgreen goldenrod dodgerblue darkorchid crimson".split(" ");
e.formatters.j=function(b){return JSON.stringify(b)};e.enable(k())},{6:6}],6:[function(g,m,e){e=m.exports=function(b){function l(){}function f(){var b=+new Date;f.diff=b-(c||b);f.prev=c;c=f.curr=b;null==f.useColors&&(f.useColors=e.useColors());null==f.color&&f.useColors&&(f.color=e.colors[k++%e.colors.length]);var l=Array.prototype.slice.call(arguments);l[0]=e.coerce(l[0]);"string"!==typeof l[0]&&(l=["%o"].concat(l));var g=0;l[0]=l[0].replace(/%([a-z%])/g,function(b,a){if("%%"===b)return b;g++;var d=
e.formatters[a];"function"===typeof d&&(b=d.call(f,l[g]),l.splice(g,1),g--);return b});"function"===typeof e.formatArgs&&(l=e.formatArgs.apply(f,l));(f.log||e.log||console.log.bind(console)).apply(f,l)}l.enabled=!1;f.enabled=!0;var g=e.enabled(b)?f:l;g.namespace=b;return g};e.coerce=function(b){return b instanceof Error?b.stack||b.message:b};e.disable=function(){e.enable("")};e.enable=function(b){e.save(b);for(var c=(b||"").split(/[\s,]+/),f=c.length,g=0;g<f;g++)c[g]&&(b=c[g].replace(/\*/g,".*?"),
"-"===b[0]?e.skips.push(new RegExp("^"+b.substr(1)+"$")):e.names.push(new RegExp("^"+b+"$")))};e.enabled=function(b){var c,f;c=0;for(f=e.skips.length;c<f;c++)if(e.skips[c].test(b))return!1;c=0;for(f=e.names.length;c<f;c++)if(e.names[c].test(b))return!0;return!1};e.humanize=g(7);e.names=[];e.skips=[];e.formatters={};var k=0,c},{7:7}],7:[function(g,m,e){function k(b){if(b=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(b)){var c=
parseFloat(b[1]);switch((b[2]||"ms").toLowerCase()){case "years":case "year":case "yrs":case "yr":case "y":return 315576E5*c;case "days":case "day":case "d":return 864E5*c;case "hours":case "hour":case "hrs":case "hr":case "h":return 36E5*c;case "minutes":case "minute":case "mins":case "min":case "m":return 6E4*c;case "seconds":case "second":case "secs":case "sec":case "s":return 1E3*c;case "milliseconds":case "millisecond":case "msecs":case "msec":case "ms":return c}}}function c(b,c,f){if(!(b<c))return b<
1.5*c?Math.floor(b/c)+" "+f:Math.ceil(b/c)+" "+f+"s"}m.exports=function(b,e){e=e||{};return"string"==typeof b?k(b):e.long?c(b,864E5,"day")||c(b,36E5,"hour")||c(b,6E4,"minute")||c(b,1E3,"second")||b+" ms":864E5<=b?Math.round(b/864E5)+"d":36E5<=b?Math.round(b/36E5)+"h":6E4<=b?Math.round(b/6E4)+"m":1E3<=b?Math.round(b/1E3)+"s":b+"ms"}},{}],8:[function(g,m,e){(function(e,c){(function(){function b(a){return"function"===typeof a}function g(){return function(){e.nextTick(n)}}function f(){var a=0,d=new J(n),
h=document.createTextNode("");d.observe(h,{characterData:!0});return function(){h.data=a=++a%2}}function w(){var a=new MessageChannel;a.port1.onmessage=n;return function(){a.port2.postMessage(0)}}function p(){return function(){setTimeout(n,1)}}function n(){for(var a=0;a<z;a+=2)(0,A[a])(A[a+1]),A[a]=void 0,A[a+1]=void 0;z=0}function r(){}function u(a,d,h,b){try{a.call(d,h,b)}catch(c){return c}}function a(a,d,b){B(function(a){var c=!1,f=u(b,d,function(b){c||(c=!0,d!==b?h(a,b):v(a,b))},function(d){c||
(c=!0,t(a,d))},"Settle: "+(a._label||" unknown promise"));!c&&f&&(c=!0,t(a,f))},a)}function d(a,d){1===d._state?v(a,d._result):2===a._state?t(a,d._result):C(d,void 0,function(d){h(a,d)},function(d){t(a,d)})}function h(h,c){if(h===c)t(h,new TypeError("You cannot resolve a promise with itself"));else if("function"===typeof c||"object"===typeof c&&null!==c)if(c.constructor===h.constructor)d(h,c);else{var f;try{f=c.then}catch(e){D.error=e,f=D}f===D?t(h,D.error):void 0===f?v(h,c):b(f)?a(h,c,f):v(h,c)}else v(h,
c)}function q(a){a._onerror&&a._onerror(a._result);G(a)}function v(a,d){void 0===a._state&&(a._result=d,a._state=1,0!==a._subscribers.length&&B(G,a))}function t(a,d){void 0===a._state&&(a._state=2,a._result=d,B(q,a))}function C(a,d,h,b){var c=a._subscribers,f=c.length;a._onerror=null;c[f]=d;c[f+1]=h;c[f+2]=b;0===f&&a._state&&B(G,a)}function G(a){var d=a._subscribers,h=a._state;if(0!==d.length){for(var b,c,f=a._result,e=0;e<d.length;e+=3)b=d[e],c=d[e+h],b?K(h,b,c,f):c(f);a._subscribers.length=0}}function E(){this.error=
null}function K(a,d,c,f){var e=b(c),q,g,l,k;if(e){try{q=c(f)}catch(m){H.error=m,q=H}q===H?(k=!0,g=q.error,q=null):l=!0;if(d===q){t(d,new TypeError("A promises callback cannot return that same promise."));return}}else q=f,l=!0;void 0===d._state&&(e&&l?h(d,q):k?t(d,g):1===a?v(d,q):2===a&&t(d,q))}function N(a,d){try{d(function(d){h(a,d)},function(d){t(a,d)})}catch(b){t(a,b)}}function x(a,d,h,b){this._instanceConstructor=a;this.promise=new a(r,b);this._abortOnReject=h;this._validateInput(d)?(this._input=
d,this._remaining=this.length=d.length,this._init(),0===this.length?v(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&v(this.promise,this._result))):t(this.promise,this._validationError())}function y(a){this._id=O++;this._result=this._state=void 0;this._subscribers=[];if(r!==a){if(!b(a))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof y))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
N(this,a)}}var L=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)},z=0,B=function(a,d){A[z]=a;A[z+1]=d;z+=2;2===z&&M()},F="undefined"!==typeof window?window:{},J=F.MutationObserver||F.WebKitMutationObserver,F="undefined"!==typeof Uint8ClampedArray&&"undefined"!==typeof importScripts&&"undefined"!==typeof MessageChannel,A=Array(1E3),M;M="undefined"!==typeof e&&"[object process]"==={}.toString.call(e)?g():J?f():F?w():p();var D=new E,H=new E;x.prototype._validateInput=
function(a){return L(a)};x.prototype._validationError=function(){return Error("Array Methods must be provided an Array")};x.prototype._init=function(){this._result=Array(this.length)};x.prototype._enumerate=function(){for(var a=this.length,d=this.promise,h=this._input,b=0;void 0===d._state&&b<a;b++)this._eachEntry(h[b],b)};x.prototype._eachEntry=function(a,d){var h=this._instanceConstructor;"object"===typeof a&&null!==a?a.constructor===h&&void 0!==a._state?(a._onerror=null,this._settledAt(a._state,
d,a._result)):this._willSettleAt(h.resolve(a),d):(this._remaining--,this._result[d]=this._makeResult(1,d,a))};x.prototype._settledAt=function(a,d,h){var b=this.promise;void 0===b._state&&(this._remaining--,this._abortOnReject&&2===a?t(b,h):this._result[d]=this._makeResult(a,d,h));0===this._remaining&&v(b,this._result)};x.prototype._makeResult=function(a,d,h){return h};x.prototype._willSettleAt=function(a,d){var h=this;C(a,void 0,function(a){h._settledAt(1,d,a)},function(a){h._settledAt(2,d,a)})};
var O=0;y.all=function(a,d){return(new x(this,a,!0,d)).promise};y.race=function(a,d){function b(a){h(f,a)}function c(a){t(f,a)}var f=new this(r,d);if(!L(a))return t(f,new TypeError("You must pass an array to race.")),f;for(var e=a.length,q=0;void 0===f._state&&q<e;q++)C(this.resolve(a[q]),void 0,b,c);return f};y.resolve=function(a,d){if(a&&"object"===typeof a&&a.constructor===this)return a;var b=new this(r,d);h(b,a);return b};y.reject=function(a,d){var h=new this(r,d);t(h,a);return h};y.prototype=
{constructor:y,then:function(a,d){var h=this._state;if(1===h&&!a||2===h&&!d)return this;var b=new this.constructor(r),c=this._result;if(h){var f=arguments[h-1];B(function(){K(h,b,f,c)})}else C(this,b,a,d);return b},"catch":function(a){return this.then(null,a)}};var I={Promise:y,polyfill:function(){var a;a="undefined"!==typeof c?c:"undefined"!==typeof window&&window.document?window:self;"Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var d;
new a.Promise(function(a){d=a});return b(d)}()||(a.Promise=y)}};"function"===typeof define&&define.amd?define(function(){return I}):"undefined"!==typeof m&&m.exports?m.exports=I:"undefined"!==typeof this&&(this.ES6Promise=I)}).call(this)}).call(this,g(1),"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{1:1}],9:[function(g,m,e){var k=Object.prototype.hasOwnProperty,c=Object.prototype.toString,b=g(10),l=function(b){if(!b||"[object Object]"!==
c.call(b))return!1;var e=k.call(b,"constructor"),g=b.constructor&&b.constructor.prototype&&k.call(b.constructor.prototype,"isPrototypeOf");if(b.constructor&&!e&&!g)return!1;for(var l in b);return void 0===l||k.call(b,l)};m.exports=function w(){var c,e,g,k,a,d=arguments[0],h=1,q=arguments.length,v=!1;if("boolean"===typeof d)v=d,d=arguments[1]||{},h=2;else if("object"!==typeof d&&"function"!==typeof d||null==d)d={};for(;h<q;++h)if(c=arguments[h],null!=c)for(e in c)g=d[e],k=c[e],d!==k&&(v&&k&&(l(k)||
(a=b(k)))?(a?(a=!1,g=g&&b(g)?g:[]):g=g&&l(g)?g:{},d[e]=w(v,g,k)):void 0!==k&&(d[e]=k));return d}},{10:10}],10:[function(g,m,e){m.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},{}],11:[function(g,m,e){var k=Object.prototype.hasOwnProperty,c=Object.prototype.toString;m.exports=function(b,e,f){if("[object Function]"!==c.call(e))throw new TypeError("iterator must be a function");var g=b.length;if(g===+g)for(var m=0;m<g;m++)e.call(f,b[m],m,b);else for(m in b)k.call(b,
m)&&e.call(f,b[m],m,b)}},{}],12:[function(g,m,e){m.exports="function"===typeof Object.create?function(e,c){e.super_=c;e.prototype=Object.create(c.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,c){e.super_=c;var b=function(){};b.prototype=c.prototype;e.prototype=new b;e.prototype.constructor=e}},{}],13:[function(g,m,e){(function(e){function c(a,d,h){var c=g(9);if(!a)throw Error("algoliasearch: Please provide an application ID. Usage: algoliasearch(applicationID, apiKey, opts)");
if(!d)throw Error("algoliasearch: Please provide an API key. Usage: algoliasearch(applicationID, apiKey, opts)");this.applicationID=a;this.apiKey=d;a=[this.applicationID+"-1.algolianet.com",this.applicationID+"-2.algolianet.com",this.applicationID+"-3.algolianet.com"];this.hosts={read:[],write:[]};this.hostIndex={read:0,write:0};h=h||{};d=h.protocol||"https:";var f=void 0===h.timeout?2E3:h.timeout;/:$/.test(d)||(d+=":");if("http:"!==h.protocol&&"https:"!==h.protocol)throw Error("algoliasearch: protocol must be `http:` or `https:` (was `"+
h.protocol+"`)");h.hosts?(this.hosts.read=c([],h.hosts),this.hosts.write=c([],h.hosts)):(this.hosts.read=[this.applicationID+"-dsn.algolia.net"].concat(a),this.hosts.write=[this.applicationID+".algolia.net"].concat(a));this.hosts.read=b(this.hosts.read,l(d));this.hosts.write=b(this.hosts.write,l(d));this.requestTimeout=f;this.extraHeaders=[];this.cache={};this._ua=h._ua;this._useCache=void 0===h._useCache?!0:h._useCache;this._setTimeout=h._setTimeout;r("init done, %j",this)}function b(a,d){for(var h=
[],b=0;b<a.length;++b)h.push(d(a[b],b));return h}function l(a){return function(d){return a+"//"+d.toLowerCase()}}function f(){throw Error("algoliasearch: Not implemented in this environment.\nIf you feel this is a mistake, write to support@algolia.com");}function w(a,d){var h=a.toLowerCase().replace(".","").replace("()","");return"algoliasearch: `"+a+"` was replaced by `"+d+"`. Please see https://github.com/algolia/algoliasearch-client-js/wiki/Deprecated#"+h}function p(a,d){d(a,0)}function n(a,d){var h=
!1;return function(){h||(console.log(d),h=!0);return a.apply(this,arguments)}}m.exports=c;"development"===e.env.NODE_ENV&&g(5).enable("algoliasearch*");var r=g(5)("algoliasearch"),u=g(11);c.prototype={deleteIndex:function(a,d){return this._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(a),hostType:"write",callback:d})},moveIndex:function(a,d,h){d={operation:"move",destination:d};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(a)+"/operation",body:d,
hostType:"write",callback:h})},copyIndex:function(a,d,h){d={operation:"copy",destination:d};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(a)+"/operation",body:d,hostType:"write",callback:h})},getLogs:function(a,d,h){if(0===arguments.length||"function"===typeof a)h=a,a=0,d=10;else if(1===arguments.length||"function"===typeof d)h=d,d=10;return this._jsonRequest({method:"GET",url:"/1/logs?offset="+a+"&length="+d,hostType:"read",callback:h})},listIndexes:function(a,d){var h=
"";void 0===a||"function"===typeof a?d=a:h="?page="+a;return this._jsonRequest({method:"GET",url:"/1/indexes"+h,hostType:"read",callback:d})},initIndex:function(a){return new this.Index(this,a)},listUserKeys:function(a){return this._jsonRequest({method:"GET",url:"/1/keys",hostType:"read",callback:a})},getUserKeyACL:function(a,d){return this._jsonRequest({method:"GET",url:"/1/keys/"+a,hostType:"read",callback:d})},deleteUserKey:function(a,d){return this._jsonRequest({method:"DELETE",url:"/1/keys/"+
a,hostType:"write",callback:d})},addUserKey:function(a,d,h){if(1===arguments.length||"function"===typeof d)h=d,d=null;var b={acl:a};d&&(b.validity=d.validity,b.maxQueriesPerIPPerHour=d.maxQueriesPerIPPerHour,b.maxHitsPerQuery=d.maxHitsPerQuery,b.indexes=d.indexes);return this._jsonRequest({method:"POST",url:"/1/keys",body:b,hostType:"write",callback:h})},addUserKeyWithValidity:n(function(a,d,b){return this.addUserKey(a,d,b)},w("client.addUserKeyWithValidity()","client.addUserKey()")),updateUserKey:function(a,
d,b,c){if(2===arguments.length||"function"===typeof b)c=b,b=null;var f={acl:d};b&&(f.validity=b.validity,f.maxQueriesPerIPPerHour=b.maxQueriesPerIPPerHour,f.maxHitsPerQuery=b.maxHitsPerQuery,f.indexes=b.indexes);return this._jsonRequest({method:"PUT",url:"/1/keys/"+a,body:f,hostType:"write",callback:c})},setSecurityTags:function(a){if("[object Array]"===Object.prototype.toString.call(a)){for(var d=[],b=0;b<a.length;++b)if("[object Array]"===Object.prototype.toString.call(a[b])){for(var c=[],f=0;f<
a[b].length;++f)c.push(a[b][f]);d.push("("+c.join(",")+")")}else d.push(a[b]);a=d.join(",")}this.securityTags=a},setUserToken:function(a){this.userToken=a},startQueriesBatch:n(function(){this._batch=[]},w("client.startQueriesBatch()","client.search()")),addQueryInBatch:n(function(a,d,b){this._batch.push({indexName:a,query:d,params:b})},w("client.addQueryInBatch()","client.search()")),clearCache:function(){this.cache={}},sendQueriesBatch:n(function(a){return this.search(this._batch,a)},w("client.sendQueriesBatch()",
"client.search()")),setRequestTimeout:function(a){a&&(this.requestTimeout=parseInt(a,10))},search:function(a,d){var h=this,c={requests:b(a,function(a){var d="";void 0!==a.query&&(d+="query="+encodeURIComponent(a.query));return{indexName:a.indexName,params:h._getSearchParams(a.params,d)}})};return this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",body:c,hostType:"read",callback:d})},destroy:f,enableRateLimitForward:f,disableRateLimitForward:f,useSecuredAPIKey:f,disableSecuredAPIKey:f,
generateSecuredApiKey:f,Index:function(a,d){this.indexName=d;this.as=a;this.typeAheadValueOption=this.typeAheadArgs=null;this.cache={}},setExtraHeader:function(a,d){this.extraHeaders.push({name:a.toLowerCase(),value:d})},_sendQueriesBatch:function(a,d){return this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",body:a,hostType:"read",fallback:{method:"GET",url:"/1/indexes/*",body:{params:function(){for(var d="",b=0;b<a.requests.length;++b)var c="/1/indexes/"+encodeURIComponent(a.requests[b].indexName)+
"?"+a.requests[b].params,d=d+(b+"="+encodeURIComponent(c)+"&");return d}()}},callback:d})},_jsonRequest:function(a){function d(g,k){function p(){e.hostIndex[a.hostType]=++e.hostIndex[a.hostType]%e.hosts[a.hostType].length;l+=1;k.timeout=e.requestTimeout*(l+1);return d(g,k)}var n;e._useCache&&(n=a.url);e._useCache&&c&&(n+="_body_"+k.body);if(e._useCache&&f&&void 0!==f[n])return b("serving response from cache"),e._promise.resolve(f[n]);if(l>=e.hosts[a.hostType].length){if(!a.fallback||!e._request.fallback||
m)return e._promise.reject(Error("Cannot connect to the AlgoliaSearch API. Send an email to support@algolia.com to report and resolve the issue."));l=0;k.method=a.fallback.method;k.url=a.fallback.url;k.jsonBody=a.fallback.body;k.jsonBody&&(k.body=JSON.stringify(a.fallback.body));k.timeout=e.requestTimeout*(l+1);e.hostIndex[a.hostType]=0;m=e.useFallback=!0;return d(e._request.fallback,k)}return g.call(e,e.hosts[a.hostType][e.hostIndex[a.hostType]]+k.url,{body:c,jsonBody:a.body,method:k.method,headers:e._computeRequestHeaders(),
timeout:k.timeout,debug:b}).then(function(a){if(a instanceof Error)return b("error: %s",a.message),p();b("received response: %j",a);var d=a&&a.body&&a.body.message&&a.body.status||a.statusCode||a&&a.body&&200,c=200===d||201===d,d=!c&&4!==Math.floor(d/100)&&1!==Math.floor(d/100);e._useCache&&c&&f&&(f[n]=a.body);return c?a.body:d?p():e._promise.reject(Error(a.body&&a.body.message||"Unknown error"))},function(c){b("error: %s, stack: %s",c.message,c.stack);e.useFallback?(e.hostIndex[a.hostType]=++e.hostIndex[a.hostType]%
e.hosts[a.hostType].length,l+=1):l=e.hosts[a.hostType].length;return d(g,k)})}var b=g(5)("algoliasearch:"+a.url),c,f=a.cache,e=this,l=0,m=!1;void 0!==a.body&&(c=JSON.stringify(a.body));b("request start");var k=e.useFallback&&a.fallback,n=k?a.fallback:a,k=d(k?e._request.fallback:e._request,{url:n.url,method:n.method,body:c,jsonBody:a.body,timeout:e.requestTimeout*(l+1)});if(a.callback)k.then(function(d){p(function(){a.callback(null,d)},e._setTimeout||setTimeout)},function(d){p(function(){a.callback(d)},
e._setTimeout||setTimeout)});else return k},_getSearchParams:function(a,d){if(this._isUndefined(a)||null===a)return d;for(var b in a)null!==b&&a.hasOwnProperty(b)&&(d+=""===d?"":"&",d+=b+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(a[b])?JSON.stringify(a[b]):a[b]));return d},_isUndefined:function(a){return void 0===a},_computeRequestHeaders:function(){var a={"x-algolia-api-key":this.apiKey,"x-algolia-application-id":this.applicationID,"x-user-agent":this._ua};this.userToken&&
(a["x-algolia-usertoken"]=this.userToken);this.securityTags&&(a["x-algolia-tagfilters"]=this.securityTags);this.extraHeaders&&u(this.extraHeaders,function(d){a[d.name]=d.value});return a}};c.prototype.Index.prototype={clearCache:function(){this.cache={}},addObject:function(a,d,b){if(1===arguments.length||"function"===typeof d)b=d,d=void 0;return this.as._jsonRequest({method:void 0!==d?"PUT":"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+(void 0!==d?"/"+encodeURIComponent(d):""),body:a,
hostType:"write",callback:b})},addObjects:function(a,d){for(var b={requests:[]},c=0;c<a.length;++c)b.requests.push({action:"addObject",body:a[c]});return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:b,hostType:"write",callback:d})},getObject:function(a,d,b){if(1===arguments.length||"function"===typeof d)b=d,d=void 0;var c="";if(void 0!==d)for(var c="?attributes=",e=0;e<d.length;++e)0!==e&&(c+=","),c+=d[e];return this.as._jsonRequest({method:"GET",
url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(a)+c,hostType:"read",callback:b})},getObjects:function(a,d){var c=this,e={requests:b(a,function(a){return{indexName:c.indexName,objectID:a}})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/*/objects",hostType:"read",body:e,callback:d})},partialUpdateObject:function(a,d){return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(a.objectID)+"/partial",
body:a,hostType:"write",callback:d})},partialUpdateObjects:function(a,d){for(var b={requests:[]},c=0;c<a.length;++c)b.requests.push({action:"partialUpdateObject",objectID:a[c].objectID,body:a[c]});return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:b,hostType:"write",callback:d})},saveObject:function(a,d){return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(a.objectID),body:a,
hostType:"write",callback:d})},saveObjects:function(a,d){for(var b={requests:[]},c=0;c<a.length;++c)b.requests.push({action:"updateObject",objectID:a[c].objectID,body:a[c]});return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:b,hostType:"write",callback:d})},deleteObject:function(a,d){if("function"===typeof a||"string"!==typeof a&&"number"!==typeof a){var b=Error("Cannot delete an object without an objectID");d=a;return"function"===typeof d?
d(b):this.as._promise.reject(b)}return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(a),hostType:"write",callback:d})},deleteObjects:function(a,d){var c={requests:b(a,function(a){return{action:"deleteObject",objectID:a,body:{objectID:a}}})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:c,hostType:"write",callback:d})},deleteByQuery:function(a,d,c){function e(a){return g.waitTask(a.taskID)}
function f(){return g.deleteByQuery(a,d)}var g=this,l=g.as;if(1===arguments.length||"function"===typeof d)c=d,d={};d.attributesToRetrieve="objectID";d.hitsPerPage=1E3;this.clearCache();var k=this.search(a,d).then(function(a){if(0===a.nbHits)return a;a=b(a.hits,function(a){return a.objectID});return g.deleteObjects(a).then(e).then(f)});if(!c)return k;k.then(function(){p(function(){c(null)},l._setTimeout||setTimeout)},function(a){p(function(){c(a)},l._setTimeout||setTimeout)})},search:function(a,d,
b){if("function"===typeof a&&"object"===typeof d||"object"===typeof b)throw Error("algoliasearch: index.search usage is index.search(query, params, cb)");if(0===arguments.length||"function"===typeof a)b=a,a="";else if(1===arguments.length||"function"===typeof d)b=d,d=void 0;if("object"===typeof a&&null!==a)d=a,a=void 0;else if(void 0===a||null===a)a="";var c="";void 0!==a&&(c+="query="+encodeURIComponent(a));void 0!==d&&(c=this.as._getSearchParams(d,c));return this._search(c,b)},browse:function(a,
d,b){if(1===arguments.length||"function"===typeof d)b=d,d=void 0;var c="?page="+a;this.as._isUndefined(d)||(c+="&hitsPerPage="+d);return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse"+c,hostType:"read",callback:b})},ttAdapter:function(a){var d=this;return function(b,c){d.search(b,a,function(a,d){a?c(a):c(d.hits)})}},waitTask:function(a,d){var b=this,c=b.as,e=this.as._jsonRequest({method:"GET",hostType:"read",url:"/1/indexes/"+encodeURIComponent(b.indexName)+
"/task/"+a}).then(function(d){return"published"!==d.status?b.as._promise.delay(100).then(function(){return b.waitTask(a)}):d});if(!d)return e;e.then(function(a){p(function(){d(null,a)},c._setTimeout||setTimeout)},function(a){p(function(){d(a)},c._setTimeout||setTimeout)})},clearIndex:function(a){return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/clear",hostType:"write",callback:a})},getSettings:function(a){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+
encodeURIComponent(this.indexName)+"/settings",hostType:"read",callback:a})},setSettings:function(a,d){return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/settings",hostType:"write",body:a,callback:d})},listUserKeys:function(a){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",hostType:"read",callback:a})},getUserKeyACL:function(a,d){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+
"/keys/"+a,hostType:"read",callback:d})},deleteUserKey:function(a,d){return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+a,hostType:"write",callback:d})},addUserKey:function(a,d,b){if(1===arguments.length||"function"===typeof d)b=d,d=null;var c={acl:a};d&&(c.validity=d.validity,c.maxQueriesPerIPPerHour=d.maxQueriesPerIPPerHour,c.maxHitsPerQuery=d.maxHitsPerQuery);return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+
"/keys",body:c,hostType:"write",callback:b})},addUserKeyWithValidity:n(function(a,d,b){return this.addUserKey(a,d,b)},w("index.addUserKeyWithValidity()","index.addUserKey()")),updateUserKey:function(a,d,b,c){if(2===arguments.length||"function"===typeof b)c=b,b=null;var e={acl:d};b&&(e.validity=b.validity,e.maxQueriesPerIPPerHour=b.maxQueriesPerIPPerHour,e.maxHitsPerQuery=b.maxHitsPerQuery);return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+a,body:e,
hostType:"write",callback:c})},_search:function(a,b){return this.as._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params:a},hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params:a}},callback:b})},as:null,indexName:null,typeAheadArgs:null,typeAheadValueOption:null}}).call(this,g(1))},{1:1,11:11,5:5,9:9}],14:[function(g,m,e){m.exports=function(c,b,e){function f(){b.debug("JSONP: success");
v||a||(v=!0,u||(b.debug("JSONP: Fail. Script loaded but did not call the callback"),m(),e(Error("Failed to load JSONP script"))))}function g(){"loaded"!==this.readyState&&"complete"!==this.readyState||f()}function m(){clearTimeout(t);h.onload=null;h.onreadystatechange=null;h.onerror=null;d.removeChild(h);try{delete window[q],delete window[q+"_loaded"]}catch(a){window[q]=null,window[q+"_loaded"]=null}}function n(){b.debug("JSONP: Script timeout");a=!0;m();e(Error("Timeout - Could not connect to endpoint "+
c))}function r(){b.debug("JSONP: Script error");v||a||(m(),e(Error("Failed to load JSONP script")))}if("GET"!==b.method)e(Error("Method "+b.method+" "+c+" is not supported by JSONP."));else{b.debug("JSONP: start");var u=!1,a=!1;k+=1;var d=document.getElementsByTagName("head")[0],h=document.createElement("script"),q="algoliaJSONP_"+k,v=!1;window[q]=function(b){try{delete window[q]}catch(d){window[q]=void 0}a||(u=!0,m(),e(null,{body:b}))};c+="&callback="+q;b.jsonBody&&b.jsonBody.params&&(c+="&"+b.jsonBody.params);
var t=setTimeout(n,b.timeout);h.onreadystatechange=g;h.onload=f;h.onerror=r;h.async=!0;h.defer=!0;h.src=c;d.appendChild(h)}};var k=0},{}],15:[function(g,m,e){(function(e){var c=g(12),b=g(13),l=g(18),f=g(14);window.algoliasearch=g(16);e.angular.module("algoliasearch",[]).service("algolia",["$http","$q","$timeout",function(e,k,m){function r(a,b,c){var e=g(9),f=g(17);c=e(!0,{},c)||{};void 0===c.protocol&&(c.protocol=f());c._ua=r.ua;return new u(a,b,c)}function u(){b.apply(this,arguments)}r.version=g(19);
r.ua="Algolia for AngularJS "+r.version;c(u,b);u.prototype._request=function(a,b){var c=k.defer(),f=c.resolve,g=c.reject,t,r=b.body;a=l(a,b.headers);var u=k.defer(),E=u.promise;m(function(){t=!0;u.resolve("test");f(Error("Timeout - Could not connect to endpoint "+a))},b.timeout);e({url:a,method:b.method,data:r,cache:!1,timeout:E}).then(function(a){f({statusCode:a.status,body:a.data})},function(a){t||(0===a.status?g(Error("Network error")):f({body:a.data,statusCode:a.status}))});return c.promise};
u.prototype._request.fallback=function(a,b){a=l(a,b.headers);var c=k.defer(),e=c.resolve,g=c.reject;f(a,b,function(a,b){a?g(a):e(b)});return c.promise};u.prototype._promise={reject:function(a){return k.reject(a)},resolve:function(a){return k.when(a)},delay:function(a){var b=k.defer();m(b.resolve,a);return b.promise}};return{Client:function(a,b,c){return r(a,b,c)},ua:r.ua,version:r.version}}])}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?
window:{})},{12:12,13:13,14:14,16:16,17:17,18:18,19:19,9:9}],16:[function(g,m,e){(function(e){function c(a,e,f){var k=g(9),l=g(17);f=k(!0,{},f)||{};void 0===f.protocol&&(f.protocol=l());f._ua=c.ua;return new b(a,e,f)}function b(){w.apply(this,arguments)}m.exports=c;var l=g(12),f=e.Promise||g(8).Promise,w=g(13),p=g(18),n=g(14);c.version=g(19);c.ua="Algolia for vanilla JavaScript "+c.version;var r="XDomainRequest"in window,u="withCredentials"in new XMLHttpRequest,a="timeout"in new XMLHttpRequest;l(b,
w);b.prototype._request=function(b,c){return new f(function(e,f){function g(){if(!x){a||clearTimeout(w);var b=null;try{b=JSON.parse(n.responseText)}catch(c){}e({body:b,statusCode:n.status})}}function k(b){x||(a||clearTimeout(w),f(Error("Could not connect to host, error was:"+b)))}function l(){a||(x=!0,n.abort());e(Error("Timeout - Could not connect to endpoint "+b))}if(u||r){b=p(b,c.headers);var m=c.body,n=u?new XMLHttpRequest:new XDomainRequest,w,x;n instanceof XMLHttpRequest?n.open(c.method,b,!0):
n.open(c.method,b);u&&m&&"GET"!==c.method&&n.setRequestHeader("content-type","application/x-www-form-urlencoded");n.onprogress=function(){};n.onload=g;n.onerror=k;a?(n.timeout=c.timeout,n.ontimeout=l):w=setTimeout(l,c.timeout);n.send(m)}else f(Error("CORS not supported"))})};b.prototype._request.fallback=function(a,b){a=p(a,b.headers);return new f(function(c,e){n(a,b,function(a,b){a?e(a):c(b)})})};b.prototype._promise={reject:function(a){return f.reject(a)},resolve:function(a){return f.resolve(a)},
delay:function(a){return new f(function(b){setTimeout(b,a)})}}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{12:12,13:13,14:14,17:17,18:18,19:19,8:8,9:9}],17:[function(g,m,e){(function(e){m.exports=function(){var c=e.document.location.protocol;"http:"!==c&&"https:"!==c&&(c="http:");return c}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],18:[function(g,
m,e){m.exports=function(c,b){c=/\?/.test(c)?c+"&":c+"?";return c+k.encode(b)};var k=g(4)},{4:4}],19:[function(g,m,e){m.exports="3.3.2"},{}]},{},[15]);
/*! algoliasearch 3.4.0 | © 2014, 2015 Algolia SAS | github.com/algolia/algoliasearch-client-js */
(function(g){var k;"undefined"!==typeof window?k=window:"undefined"!==typeof self&&(k=self);k.ALGOLIA_MIGRATION_LAYER=g()})(function(){return function k(e,n,b){function c(f,m){if(!n[f]){if(!e[f]){var p="function"==typeof require&&require;if(!m&&p)return p(f,!0);if(l)return l(f,!0);p=Error("Cannot find module '"+f+"'");throw p.code="MODULE_NOT_FOUND",p;}p=n[f]={exports:{}};e[f][0].call(p.exports,function(b){var l=e[f][1][b];return c(l?l:b)},p,p.exports,k,e,n,b)}return n[f].exports}for(var l="function"==
typeof require&&require,f=0;f<b.length;f++)c(b[f]);return c}({1:[function(k,e,n){function b(f,c){for(var b in c)f.setAttribute(b,c[b])}function c(f,c){f.onload=function(){this.onerror=this.onload=null;c(null,f)};f.onerror=function(){this.onerror=this.onload=null;c(Error("Failed to load "+this.src),f)}}function l(f,c){f.onreadystatechange=function(){if("complete"==this.readyState||"loaded"==this.readyState)this.onreadystatechange=null,c(null,f)}}e.exports=function(f,q,m){var p=document.head||document.getElementsByTagName("head")[0],
e=document.createElement("script");"function"===typeof q&&(m=q,q={});q=q||{};m=m||function(){};e.type=q.type||"text/javascript";e.charset=q.charset||"utf8";e.async="async"in q?!!q.async:!0;e.src=f;q.attrs&&b(e,q.attrs);q.text&&(e.text=""+q.text);("onload"in e?c:l)(e,m);e.onload||c(e,m);p.appendChild(e)}},{}],2:[function(k,e,n){e.exports=function(b){b=new RegExp("cdn\\.jsdelivr\\.net/algoliasearch/latest/"+b.replace(".","\\.")+"(?:\\.min)?\\.js$");for(var c=document.getElementsByTagName("script"),
l=!1,f=0,e=c.length;f<e;f++)if(c[f].src&&b.test(c[f].src)){l=!0;break}return l}},{}],3:[function(k,e,n){(function(b){function c(c){return function(){var f="AlgoliaSearch: loaded V2 script using "+c;b.console&&b.console.log&&b.console.log(f)}}e.exports=function(l){var f=k(1);l="//cdn.jsdelivr.net/algoliasearch/2/"+l+".min.js";b.console&&(b.console.warn?b.console.warn("-- AlgoliaSearch `latest` warning --\nWarning, you are using the `latest` version string from jsDelivr to load the AlgoliaSearch library.\nUsing `latest` is no more recommended, you should load //cdn.jsdelivr.net/algoliasearch/2/algoliasearch.min.js\n\nAlso, we updated the AlgoliaSearch JavaScript client to V3. If you want to upgrade,\nplease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch `latest` warning --"):
b.console.log&&b.console.log("-- AlgoliaSearch `latest` warning --\nWarning, you are using the `latest` version string from jsDelivr to load the AlgoliaSearch library.\nUsing `latest` is no more recommended, you should load //cdn.jsdelivr.net/algoliasearch/2/algoliasearch.min.js\n\nAlso, we updated the AlgoliaSearch JavaScript client to V3. If you want to upgrade,\nplease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch `latest` warning --"));
try{document.write("<script>window.ALGOLIA_SUPPORTS_DOCWRITE = true\x3c/script>"),!0===b.ALGOLIA_SUPPORTS_DOCWRITE?(document.write('<script src="'+l+'">\x3c/script>'),c("document.write")()):f(l,c("DOMElement"))}catch(e){f(l,c("DOMElement"))}}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{1:1}],4:[function(k,e,n){(function(b){e.exports=function(){b.AlgoliaSearch=function(){throw Error("-- AlgoliaSearch V2 => V3 error --\nYou are trying to use a new version of the AlgoliaSearch JavaScript client with an old notation.\nPlease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch V2 => V3 error --");
};b.AlgoliaSearchHelper=function(){throw Error("-- AlgoliaSearch V2 => V3 error --\nYou are trying to use a new version of the AlgoliaSearch JavaScript client with an old notation.\nPlease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch V2 => V3 error --");};AlgoliaExplainResults=function(){throw Error("-- AlgoliaSearch V2 => V3 error --\nYou are trying to use a new version of the AlgoliaSearch JavaScript client with an old notation.\nPlease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch V2 => V3 error --");
}}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],5:[function(k,e,n){e=k(2);n=k(3);k=k(4);e("algoliasearch.angular")?n("algoliasearch.angular"):k()},{2:2,3:3,4:4}]},{},[5])(5)});
(function e$$0(k,e,n){function b(f,l){if(!e[f]){if(!k[f]){var m="function"==typeof require&&require;if(!l&&m)return m(f,!0);if(c)return c(f,!0);m=Error("Cannot find module '"+f+"'");throw m.code="MODULE_NOT_FOUND",m;}m=e[f]={exports:{}};k[f][0].call(m.exports,function(c){var l=k[f][1][c];return b(l?l:c)},m,m.exports,e$$0,k,e,n)}return e[f].exports}for(var c="function"==typeof require&&require,l=0;l<n.length;l++)b(n[l]);return b})({1:[function(g,k,e){function n(){if(!l){l=!0;for(var f,b=c.length;b;){f=
c;c=[];for(var e=-1;++e<b;)f[e]();b=c.length}l=!1}}function b(){}g=k.exports={};var c=[],l=!1;g.nextTick=function(f){c.push(f);l||setTimeout(n,0)};g.title="browser";g.browser=!0;g.env={};g.argv=[];g.version="";g.versions={};g.on=b;g.addListener=b;g.once=b;g.off=b;g.removeListener=b;g.removeAllListeners=b;g.emit=b;g.binding=function(f){throw Error("process.binding is not supported");};g.cwd=function(){return"/"};g.chdir=function(f){throw Error("process.chdir is not supported");};g.umask=function(){return 0}},
{}],2:[function(g,k,e){k.exports=function(b,c,l,f){l=l||"=";var e={};if("string"!==typeof b||0===b.length)return e;var m=/\+/g;b=b.split(c||"&");c=1E3;f&&"number"===typeof f.maxKeys&&(c=f.maxKeys);f=b.length;0<c&&f>c&&(f=c);for(c=0;c<f;++c){var p=b[c].replace(m,"%20"),g=p.indexOf(l),k;0<=g?(k=p.substr(0,g),p=p.substr(g+1)):(k=p,p="");k=decodeURIComponent(k);p=decodeURIComponent(p);Object.prototype.hasOwnProperty.call(e,k)?n(e[k])?e[k].push(p):e[k]=[e[k],p]:e[k]=p}return e};var n=Array.isArray||function(b){return"[object Array]"===
Object.prototype.toString.call(b)}},{}],3:[function(g,k,e){function n(f,c){if(f.map)return f.map(c);for(var b=[],l=0;l<f.length;l++)b.push(c(f[l],l));return b}var b=function(f){switch(typeof f){case "string":return f;case "boolean":return f?"true":"false";case "number":return isFinite(f)?f:"";default:return""}};k.exports=function(f,e,m,p){e=e||"&";m=m||"=";null===f&&(f=void 0);return"object"===typeof f?n(l(f),function(l){var p=encodeURIComponent(b(l))+m;return c(f[l])?n(f[l],function(a){return p+
encodeURIComponent(b(a))}).join(e):p+encodeURIComponent(b(f[l]))}).join(e):p?encodeURIComponent(b(p))+m+encodeURIComponent(b(f)):""};var c=Array.isArray||function(f){return"[object Array]"===Object.prototype.toString.call(f)},l=Object.keys||function(f){var c=[],b;for(b in f)Object.prototype.hasOwnProperty.call(f,b)&&c.push(b);return c}},{}],4:[function(g,k,e){e.decode=e.parse=g(2);e.encode=e.stringify=g(3)},{2:2,3:3}],5:[function(g,k,e){function n(){var c;try{c=b.debug}catch(f){}return c}e=k.exports=
g(6);e.log=function(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)};e.formatArgs=function(){var c=arguments,f=this.useColors;c[0]=(f?"%c":"")+this.namespace+(f?" %c":" ")+c[0]+(f?"%c ":" ")+"+"+e.humanize(this.diff);if(!f)return c;var f="color: "+this.color,c=[c[0],f,"color: inherit"].concat(Array.prototype.slice.call(c,1)),b=0,m=0;c[0].replace(/%[a-z%]/g,function(c){"%%"!==c&&(b++,"%c"===c&&(m=b))});c.splice(m,0,f);return c};e.save=function(c){try{null==
c?b.removeItem("debug"):b.debug=c}catch(f){}};e.load=n;e.useColors=function(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)};var b;if("undefined"!==typeof chrome&&"undefined"!==typeof chrome.storage)b=chrome.storage.local;else a:{try{b=window.localStorage;break a}catch(c){}b=void 0}e.colors="lightseagreen forestgreen goldenrod dodgerblue darkorchid crimson".split(" ");
e.formatters.j=function(c){return JSON.stringify(c)};e.enable(n())},{6:6}],6:[function(g,k,e){e=k.exports=function(c){function l(){}function f(){var c=+new Date;f.diff=c-(b||c);f.prev=b;b=f.curr=c;null==f.useColors&&(f.useColors=e.useColors());null==f.color&&f.useColors&&(f.color=e.colors[n++%e.colors.length]);var l=Array.prototype.slice.call(arguments);l[0]=e.coerce(l[0]);"string"!==typeof l[0]&&(l=["%o"].concat(l));var g=0;l[0]=l[0].replace(/%([a-z%])/g,function(c,a){if("%%"===c)return c;g++;var d=
e.formatters[a];"function"===typeof d&&(c=d.call(f,l[g]),l.splice(g,1),g--);return c});"function"===typeof e.formatArgs&&(l=e.formatArgs.apply(f,l));(f.log||e.log||console.log.bind(console)).apply(f,l)}l.enabled=!1;f.enabled=!0;var g=e.enabled(c)?f:l;g.namespace=c;return g};e.coerce=function(c){return c instanceof Error?c.stack||c.message:c};e.disable=function(){e.enable("")};e.enable=function(c){e.save(c);for(var b=(c||"").split(/[\s,]+/),f=b.length,g=0;g<f;g++)b[g]&&(c=b[g].replace(/\*/g,".*?"),
"-"===c[0]?e.skips.push(new RegExp("^"+c.substr(1)+"$")):e.names.push(new RegExp("^"+c+"$")))};e.enabled=function(c){var b,f;b=0;for(f=e.skips.length;b<f;b++)if(e.skips[b].test(c))return!1;b=0;for(f=e.names.length;b<f;b++)if(e.names[b].test(c))return!0;return!1};e.humanize=g(7);e.names=[];e.skips=[];e.formatters={};var n=0,b},{7:7}],7:[function(g,k,e){function n(c){if(c=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(c)){var b=
parseFloat(c[1]);switch((c[2]||"ms").toLowerCase()){case "years":case "year":case "yrs":case "yr":case "y":return 315576E5*b;case "days":case "day":case "d":return 864E5*b;case "hours":case "hour":case "hrs":case "hr":case "h":return 36E5*b;case "minutes":case "minute":case "mins":case "min":case "m":return 6E4*b;case "seconds":case "second":case "secs":case "sec":case "s":return 1E3*b;case "milliseconds":case "millisecond":case "msecs":case "msec":case "ms":return b}}}function b(c,b,f){if(!(c<b))return c<
1.5*b?Math.floor(c/b)+" "+f:Math.ceil(c/b)+" "+f+"s"}k.exports=function(c,e){e=e||{};return"string"==typeof c?n(c):e.long?b(c,864E5,"day")||b(c,36E5,"hour")||b(c,6E4,"minute")||b(c,1E3,"second")||c+" ms":864E5<=c?Math.round(c/864E5)+"d":36E5<=c?Math.round(c/36E5)+"h":6E4<=c?Math.round(c/6E4)+"m":1E3<=c?Math.round(c/1E3)+"s":c+"ms"}},{}],8:[function(g,k,e){(function(e,b){(function(){function c(a){return"function"===typeof a}function l(){return function(){e.nextTick(p)}}function f(){var a=0,d=new K(p),
h=document.createTextNode("");d.observe(h,{characterData:!0});return function(){h.data=a=++a%2}}function g(){var a=new MessageChannel;a.port1.onmessage=p;return function(){a.port2.postMessage(0)}}function m(){return function(){setTimeout(p,1)}}function p(){for(var a=0;a<z;a+=2)(0,A[a])(A[a+1]),A[a]=void 0,A[a+1]=void 0;z=0}function w(){}function r(a,d,h,c){try{a.call(d,h,c)}catch(b){return b}}function a(a,d,c){B(function(a){var b=!1,f=r(c,d,function(c){b||(b=!0,d!==c?h(a,c):v(a,c))},function(d){b||
(b=!0,u(a,d))},"Settle: "+(a._label||" unknown promise"));!b&&f&&(b=!0,u(a,f))},a)}function d(a,d){1===d._state?v(a,d._result):2===a._state?u(a,d._result):D(d,void 0,function(d){h(a,d)},function(d){u(a,d)})}function h(h,b){if(h===b)u(h,new TypeError("You cannot resolve a promise with itself"));else if("function"===typeof b||"object"===typeof b&&null!==b)if(b.constructor===h.constructor)d(h,b);else{var f;try{f=b.then}catch(t){E.error=t,f=E}f===E?u(h,E.error):void 0===f?v(h,b):c(f)?a(h,b,f):v(h,b)}else v(h,
b)}function t(a){a._onerror&&a._onerror(a._result);H(a)}function v(a,d){void 0===a._state&&(a._result=d,a._state=1,0!==a._subscribers.length&&B(H,a))}function u(a,d){void 0===a._state&&(a._state=2,a._result=d,B(t,a))}function D(a,d,h,c){var b=a._subscribers,f=b.length;a._onerror=null;b[f]=d;b[f+1]=h;b[f+2]=c;0===f&&a._state&&B(H,a)}function H(a){var d=a._subscribers,h=a._state;if(0!==d.length){for(var b,c,f=a._result,t=0;t<d.length;t+=3)b=d[t],c=d[t+h],b?F(h,b,c,f):c(f);a._subscribers.length=0}}function C(){this.error=
null}function F(a,d,b,f){var t=c(b),e,l,g,m;if(t){try{e=b(f)}catch(k){I.error=k,e=I}e===I?(m=!0,l=e.error,e=null):g=!0;if(d===e){u(d,new TypeError("A promises callback cannot return that same promise."));return}}else e=f,g=!0;void 0===d._state&&(t&&g?h(d,e):m?u(d,l):1===a?v(d,e):2===a&&u(d,e))}function N(a,d){try{d(function(d){h(a,d)},function(d){u(a,d)})}catch(b){u(a,b)}}function y(a,d,h,b){this._instanceConstructor=a;this.promise=new a(w,b);this._abortOnReject=h;this._validateInput(d)?(this._input=
d,this._remaining=this.length=d.length,this._init(),0===this.length?v(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&v(this.promise,this._result))):u(this.promise,this._validationError())}function x(a){this._id=O++;this._result=this._state=void 0;this._subscribers=[];if(w!==a){if(!c(a))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof x))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
N(this,a)}}var L=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)},z=0,B=function(a,d){A[z]=a;A[z+1]=d;z+=2;2===z&&M()},G="undefined"!==typeof window?window:{},K=G.MutationObserver||G.WebKitMutationObserver,G="undefined"!==typeof Uint8ClampedArray&&"undefined"!==typeof importScripts&&"undefined"!==typeof MessageChannel,A=Array(1E3),M;M="undefined"!==typeof e&&"[object process]"==={}.toString.call(e)?l():K?f():G?g():m();var E=new C,I=new C;y.prototype._validateInput=
function(a){return L(a)};y.prototype._validationError=function(){return Error("Array Methods must be provided an Array")};y.prototype._init=function(){this._result=Array(this.length)};y.prototype._enumerate=function(){for(var a=this.length,d=this.promise,h=this._input,b=0;void 0===d._state&&b<a;b++)this._eachEntry(h[b],b)};y.prototype._eachEntry=function(a,d){var h=this._instanceConstructor;"object"===typeof a&&null!==a?a.constructor===h&&void 0!==a._state?(a._onerror=null,this._settledAt(a._state,
d,a._result)):this._willSettleAt(h.resolve(a),d):(this._remaining--,this._result[d]=this._makeResult(1,d,a))};y.prototype._settledAt=function(a,d,h){var b=this.promise;void 0===b._state&&(this._remaining--,this._abortOnReject&&2===a?u(b,h):this._result[d]=this._makeResult(a,d,h));0===this._remaining&&v(b,this._result)};y.prototype._makeResult=function(a,d,h){return h};y.prototype._willSettleAt=function(a,d){var h=this;D(a,void 0,function(a){h._settledAt(1,d,a)},function(a){h._settledAt(2,d,a)})};
var O=0;x.all=function(a,d){return(new y(this,a,!0,d)).promise};x.race=function(a,d){function b(a){h(f,a)}function c(a){u(f,a)}var f=new this(w,d);if(!L(a))return u(f,new TypeError("You must pass an array to race.")),f;for(var t=a.length,e=0;void 0===f._state&&e<t;e++)D(this.resolve(a[e]),void 0,b,c);return f};x.resolve=function(a,d){if(a&&"object"===typeof a&&a.constructor===this)return a;var b=new this(w,d);h(b,a);return b};x.reject=function(a,d){var h=new this(w,d);u(h,a);return h};x.prototype=
{constructor:x,then:function(a,d){var h=this._state;if(1===h&&!a||2===h&&!d)return this;var b=new this.constructor(w),c=this._result;if(h){var f=arguments[h-1];B(function(){F(h,b,f,c)})}else D(this,b,a,d);return b},"catch":function(a){return this.then(null,a)}};var J={Promise:x,polyfill:function(){var a;a="undefined"!==typeof b?b:"undefined"!==typeof window&&window.document?window:self;"Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var d;
new a.Promise(function(a){d=a});return c(d)}()||(a.Promise=x)}};"function"===typeof define&&define.amd?define(function(){return J}):"undefined"!==typeof k&&k.exports?k.exports=J:"undefined"!==typeof this&&(this.ES6Promise=J)}).call(this)}).call(this,g(1),"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{1:1}],9:[function(g,k,e){var n=Object.prototype.hasOwnProperty,b=Object.prototype.toString,c=function(c){return"function"===typeof Array.isArray?
Array.isArray(c):"[object Array]"===b.call(c)},l=function(c){if(!c||"[object Object]"!==b.call(c))return!1;var e=n.call(c,"constructor"),l=c.constructor&&c.constructor.prototype&&n.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!e&&!l)return!1;for(var g in c);return void 0===g||n.call(c,g)};k.exports=function q(){var b,e,g,k,a,d=arguments[0],h=1,t=arguments.length,v=!1;if("boolean"===typeof d)v=d,d=arguments[1]||{},h=2;else if("object"!==typeof d&&"function"!==typeof d||null==d)d=
{};for(;h<t;++h)if(b=arguments[h],null!=b)for(e in b)g=d[e],k=b[e],d!==k&&(v&&k&&(l(k)||(a=c(k)))?(a?(a=!1,g=g&&c(g)?g:[]):g=g&&l(g)?g:{},d[e]=q(v,g,k)):void 0!==k&&(d[e]=k));return d}},{}],10:[function(g,k,e){var n=Object.prototype.hasOwnProperty,b=Object.prototype.toString;k.exports=function(c,e,f){if("[object Function]"!==b.call(e))throw new TypeError("iterator must be a function");var g=c.length;if(g===+g)for(var k=0;k<g;k++)e.call(f,c[k],k,c);else for(k in c)n.call(c,k)&&e.call(f,c[k],k,c)}},
{}],11:[function(g,k,e){k.exports="function"===typeof Object.create?function(e,b){e.super_=b;e.prototype=Object.create(b.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,b){e.super_=b;var c=function(){};c.prototype=b.prototype;e.prototype=new c;e.prototype.constructor=e}},{}],12:[function(g,k,e){function n(a,d,h){var f=g(9);if(!a)throw new r.AlgoliaSearchError("Please provide an application ID. Usage: algoliasearch(applicationID, apiKey, opts)");if(!d)throw new r.AlgoliaSearchError("Please provide an API key. Usage: algoliasearch(applicationID, apiKey, opts)");
this.applicationID=a;this.apiKey=d;a=[this.applicationID+"-1.algolianet.com",this.applicationID+"-2.algolianet.com",this.applicationID+"-3.algolianet.com"];this.hosts={read:[],write:[]};this.hostIndex={read:0,write:0};h=h||{};d=h.protocol||"https:";var e=void 0===h.timeout?2E3:h.timeout;/:$/.test(d)||(d+=":");if("http:"!==h.protocol&&"https:"!==h.protocol)throw new r.AlgoliaSearchError("protocol must be `http:` or `https:` (was `"+h.protocol+"`)");h.hosts?(this.hosts.read=f([],h.hosts),this.hosts.write=
f([],h.hosts)):(this.hosts.read=[this.applicationID+"-dsn.algolia.net"].concat(a),this.hosts.write=[this.applicationID+".algolia.net"].concat(a));this.hosts.read=b(this.hosts.read,c(d));this.hosts.write=b(this.hosts.write,c(d));this.requestTimeout=e;this.extraHeaders=[];this.cache={};this._ua=h._ua;this._useCache=void 0===h._useCache?!0:h._useCache;this._setTimeout=h._setTimeout;p("init done, %j",this)}function b(a,d){for(var h=[],b=0;b<a.length;++b)h.push(d(a[b],b));return h}function c(a){return function(d){return a+
"//"+d.toLowerCase()}}function l(){throw new r.AlgoliaSearchError("Not implemented in this environment.\nIf you feel this is a mistake, write to support@algolia.com");}function f(a,d){var h=a.toLowerCase().replace(".","").replace("()","");return"algoliasearch: `"+a+"` was replaced by `"+d+"`. Please see https://github.com/algolia/algoliasearch-client-js/wiki/Deprecated#"+h}function q(a,d){d(a,0)}function m(a,d){var h=!1;return function(){h||(console.log(d),h=!0);return a.apply(this,arguments)}}k.exports=
n;var p=g(5)("algoliasearch"),w=g(10),r=g(18);n.prototype={deleteIndex:function(a,d){return this._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(a),hostType:"write",callback:d})},moveIndex:function(a,d,h){d={operation:"move",destination:d};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(a)+"/operation",body:d,hostType:"write",callback:h})},copyIndex:function(a,d,h){d={operation:"copy",destination:d};return this._jsonRequest({method:"POST",url:"/1/indexes/"+
encodeURIComponent(a)+"/operation",body:d,hostType:"write",callback:h})},getLogs:function(a,d,h){if(0===arguments.length||"function"===typeof a)h=a,a=0,d=10;else if(1===arguments.length||"function"===typeof d)h=d,d=10;return this._jsonRequest({method:"GET",url:"/1/logs?offset="+a+"&length="+d,hostType:"read",callback:h})},listIndexes:function(a,d){var h="";void 0===a||"function"===typeof a?d=a:h="?page="+a;return this._jsonRequest({method:"GET",url:"/1/indexes"+h,hostType:"read",callback:d})},initIndex:function(a){return new this.Index(this,
a)},listUserKeys:function(a){return this._jsonRequest({method:"GET",url:"/1/keys",hostType:"read",callback:a})},getUserKeyACL:function(a,d){return this._jsonRequest({method:"GET",url:"/1/keys/"+a,hostType:"read",callback:d})},deleteUserKey:function(a,d){return this._jsonRequest({method:"DELETE",url:"/1/keys/"+a,hostType:"write",callback:d})},addUserKey:function(a,d,h){if(1===arguments.length||"function"===typeof d)h=d,d=null;var b={acl:a};d&&(b.validity=d.validity,b.maxQueriesPerIPPerHour=d.maxQueriesPerIPPerHour,
b.maxHitsPerQuery=d.maxHitsPerQuery,b.indexes=d.indexes,b.description=d.description,d.queryParameters&&(b.queryParameters=this._getSearchParams(d.queryParameters,"")),b.referers=d.referers);return this._jsonRequest({method:"POST",url:"/1/keys",body:b,hostType:"write",callback:h})},addUserKeyWithValidity:m(function(a,d,h){return this.addUserKey(a,d,h)},f("client.addUserKeyWithValidity()","client.addUserKey()")),updateUserKey:function(a,d,h,b){if(2===arguments.length||"function"===typeof h)b=h,h=null;
var c={acl:d};h&&(c.validity=h.validity,c.maxQueriesPerIPPerHour=h.maxQueriesPerIPPerHour,c.maxHitsPerQuery=h.maxHitsPerQuery,c.indexes=h.indexes,c.description=h.description,h.queryParameters&&(c.queryParameters=this._getSearchParams(h.queryParameters,"")),c.referers=h.referers);return this._jsonRequest({method:"PUT",url:"/1/keys/"+a,body:c,hostType:"write",callback:b})},setSecurityTags:function(a){if("[object Array]"===Object.prototype.toString.call(a)){for(var d=[],b=0;b<a.length;++b)if("[object Array]"===
Object.prototype.toString.call(a[b])){for(var c=[],f=0;f<a[b].length;++f)c.push(a[b][f]);d.push("("+c.join(",")+")")}else d.push(a[b]);a=d.join(",")}this.securityTags=a},setUserToken:function(a){this.userToken=a},startQueriesBatch:m(function(){this._batch=[]},f("client.startQueriesBatch()","client.search()")),addQueryInBatch:m(function(a,d,b){this._batch.push({indexName:a,query:d,params:b})},f("client.addQueryInBatch()","client.search()")),clearCache:function(){this.cache={}},sendQueriesBatch:m(function(a){return this.search(this._batch,
a)},f("client.sendQueriesBatch()","client.search()")),setRequestTimeout:function(a){a&&(this.requestTimeout=parseInt(a,10))},search:function(a,d){var h=this,c={requests:b(a,function(a){var d="";void 0!==a.query&&(d+="query="+encodeURIComponent(a.query));return{indexName:a.indexName,params:h._getSearchParams(a.params,d)}})};return this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",body:c,hostType:"read",callback:d})},batch:function(a,d){return this._jsonRequest({method:"POST",
url:"/1/indexes/*/batch",body:{requests:a},hostType:"write",callback:d})},destroy:l,enableRateLimitForward:l,disableRateLimitForward:l,useSecuredAPIKey:l,disableSecuredAPIKey:l,generateSecuredApiKey:l,Index:function(a,d){this.indexName=d;this.as=a;this.typeAheadValueOption=this.typeAheadArgs=null;this.cache={}},setExtraHeader:function(a,d){this.extraHeaders.push({name:a.toLowerCase(),value:d})},_sendQueriesBatch:function(a,d){return this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",
body:a,hostType:"read",fallback:{method:"GET",url:"/1/indexes/*",body:{params:function(){for(var d="",b=0;b<a.requests.length;++b)var c="/1/indexes/"+encodeURIComponent(a.requests[b].indexName)+"?"+a.requests[b].params,d=d+(b+"="+encodeURIComponent(c)+"&");return d}()}},callback:d})},_jsonRequest:function(a){function d(g,m){function n(){e.hostIndex[a.hostType]=++e.hostIndex[a.hostType]%e.hosts[a.hostType].length;l+=1;m.timeout=e.requestTimeout*(l+1);return d(g,m)}var p;e._useCache&&(p=a.url);e._useCache&&
c&&(p+="_body_"+m.body);if(e._useCache&&f&&void 0!==f[p])return b("serving response from cache"),e._promise.resolve(JSON.parse(JSON.stringify(f[p])));if(l>=e.hosts[a.hostType].length){if(!a.fallback||!e._request.fallback||k)return e._promise.reject(new r.AlgoliaSearchError("Cannot connect to the AlgoliaSearch API. Send an email to support@algolia.com to report and resolve the issue."));l=0;m.method=a.fallback.method;m.url=a.fallback.url;m.jsonBody=a.fallback.body;m.jsonBody&&(m.body=JSON.stringify(a.fallback.body));
m.timeout=e.requestTimeout*(l+1);e.hostIndex[a.hostType]=0;k=e.useFallback=!0;return d(e._request.fallback,m)}return g.call(e,e.hosts[a.hostType][e.hostIndex[a.hostType]]+m.url,{body:c,jsonBody:a.body,method:m.method,headers:e._computeRequestHeaders(),timeout:m.timeout,debug:b}).then(function(a){b("received response: %j",a);var d=a&&a.body&&a.body.message&&a.body.status||a.statusCode||a&&a.body&&200,c=200===d||201===d,d=!c&&4!==Math.floor(d/100)&&1!==Math.floor(d/100);e._useCache&&c&&f&&(f[p]=a.body);
if(c)return a.body;if(d)return n();a=new r.AlgoliaSearchError(a.body&&a.body.message);return e._promise.reject(a)},function(c){b("error: %s, stack: %s",c.message,c.stack);if(c instanceof r.RequestTimeout)return b("timedout"),n();c instanceof r.AlgoliaSearchError||(c=new r.Unknown(c&&c.message,c));if(c instanceof r.Unknown||c instanceof r.UnparsableJSON||!g.fallback&&c instanceof r.Network)return e._promise.reject(c);e.useFallback?(e.hostIndex[a.hostType]=++e.hostIndex[a.hostType]%e.hosts[a.hostType].length,
l+=1):l=e.hosts[a.hostType].length;return d(g,m)})}var b=g(5)("algoliasearch:"+a.url),c,f=a.cache,e=this,l=0,k=!1;void 0!==a.body&&(c=JSON.stringify(a.body));b("request start");var m=e.useFallback&&a.fallback,n=m?a.fallback:a,m=d(m?e._request.fallback:e._request,{url:n.url,method:n.method,body:c,jsonBody:a.body,timeout:e.requestTimeout*(l+1)});if(a.callback)m.then(function(d){q(function(){a.callback(null,d)},e._setTimeout||setTimeout)},function(d){q(function(){a.callback(d)},e._setTimeout||setTimeout)});
else return m},_getSearchParams:function(a,d){if(this._isUndefined(a)||null===a)return d;for(var b in a)null!==b&&a.hasOwnProperty(b)&&(d+=""===d?"":"&",d+=b+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(a[b])?JSON.stringify(a[b]):a[b]));return d},_isUndefined:function(a){return void 0===a},_computeRequestHeaders:function(){var a={"x-algolia-api-key":this.apiKey,"x-algolia-application-id":this.applicationID,"x-algolia-agent":this._ua};this.userToken&&(a["x-algolia-usertoken"]=
this.userToken);this.securityTags&&(a["x-algolia-tagfilters"]=this.securityTags);this.extraHeaders&&w(this.extraHeaders,function(d){a[d.name]=d.value});return a}};n.prototype.Index.prototype={clearCache:function(){this.cache={}},addObject:function(a,d,b){if(1===arguments.length||"function"===typeof d)b=d,d=void 0;return this.as._jsonRequest({method:void 0!==d?"PUT":"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+(void 0!==d?"/"+encodeURIComponent(d):""),body:a,hostType:"write",callback:b})},
addObjects:function(a,d){for(var b={requests:[]},c=0;c<a.length;++c)b.requests.push({action:"addObject",body:a[c]});return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:b,hostType:"write",callback:d})},getObject:function(a,d,b){if(1===arguments.length||"function"===typeof d)b=d,d=void 0;var c="";if(void 0!==d)for(var c="?attributes=",e=0;e<d.length;++e)0!==e&&(c+=","),c+=d[e];return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+
"/"+encodeURIComponent(a)+c,hostType:"read",callback:b})},getObjects:function(a,d,c){var e=this;if(1===arguments.length||"function"===typeof d)c=d,d=void 0;var f={requests:b(a,function(a){a={indexName:e.indexName,objectID:a};d&&(a.attributesToRetrieve=d.join(","));return a})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/*/objects",hostType:"read",body:f,callback:c})},partialUpdateObject:function(a,d){return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+
"/"+encodeURIComponent(a.objectID)+"/partial",body:a,hostType:"write",callback:d})},partialUpdateObjects:function(a,d){for(var b={requests:[]},c=0;c<a.length;++c)b.requests.push({action:"partialUpdateObject",objectID:a[c].objectID,body:a[c]});return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:b,hostType:"write",callback:d})},saveObject:function(a,d){return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+
"/"+encodeURIComponent(a.objectID),body:a,hostType:"write",callback:d})},saveObjects:function(a,d){for(var b={requests:[]},c=0;c<a.length;++c)b.requests.push({action:"updateObject",objectID:a[c].objectID,body:a[c]});return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:b,hostType:"write",callback:d})},deleteObject:function(a,d){if("function"===typeof a||"string"!==typeof a&&"number"!==typeof a){var b=new r.AlgoliaSearchError("Cannot delete an object without an objectID");
d=a;return"function"===typeof d?d(b):this.as._promise.reject(b)}return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(a),hostType:"write",callback:d})},deleteObjects:function(a,d){var c={requests:b(a,function(a){return{action:"deleteObject",objectID:a,body:{objectID:a}}})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:c,hostType:"write",callback:d})},deleteByQuery:function(a,
d,c){function e(a){return g.waitTask(a.taskID)}function f(){return g.deleteByQuery(a,d)}var g=this,l=g.as;if(1===arguments.length||"function"===typeof d)c=d,d={};d.attributesToRetrieve="objectID";d.hitsPerPage=1E3;this.clearCache();var k=this.search(a,d).then(function(a){if(0===a.nbHits)return a;a=b(a.hits,function(a){return a.objectID});return g.deleteObjects(a).then(e).then(f)});if(!c)return k;k.then(function(){q(function(){c(null)},l._setTimeout||setTimeout)},function(a){q(function(){c(a)},l._setTimeout||
setTimeout)})},search:function(a,d,b){if("function"===typeof a&&"object"===typeof d||"object"===typeof b)throw new r.AlgoliaSearchError("index.search usage is index.search(query, params, cb)");if(0===arguments.length||"function"===typeof a)b=a,a="";else if(1===arguments.length||"function"===typeof d)b=d,d=void 0;if("object"===typeof a&&null!==a)d=a,a=void 0;else if(void 0===a||null===a)a="";var c="";void 0!==a&&(c+="query="+encodeURIComponent(a));void 0!==d&&(c=this.as._getSearchParams(d,c));return this._search(c,
b)},browse:function(a,d,b){if(1===arguments.length||"function"===typeof d)b=d,d=void 0;var c="?page="+a;this.as._isUndefined(d)||(c+="&hitsPerPage="+d);return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse"+c,hostType:"read",callback:b})},ttAdapter:function(a){var d=this;return function(b,c){d.search(b,a,function(a,d){a?c(a):c(d.hits)})}},waitTask:function(a,d){var b=this,c=b.as,e=this.as._jsonRequest({method:"GET",hostType:"read",url:"/1/indexes/"+
encodeURIComponent(b.indexName)+"/task/"+a}).then(function(d){return"published"!==d.status?b.as._promise.delay(100).then(function(){return b.waitTask(a)}):d});if(!d)return e;e.then(function(a){q(function(){d(null,a)},c._setTimeout||setTimeout)},function(a){q(function(){d(a)},c._setTimeout||setTimeout)})},clearIndex:function(a){return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/clear",hostType:"write",callback:a})},getSettings:function(a){return this.as._jsonRequest({method:"GET",
url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/settings",hostType:"read",callback:a})},setSettings:function(a,d){return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/settings",hostType:"write",body:a,callback:d})},listUserKeys:function(a){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",hostType:"read",callback:a})},getUserKeyACL:function(a,d){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+
encodeURIComponent(this.indexName)+"/keys/"+a,hostType:"read",callback:d})},deleteUserKey:function(a,d){return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+a,hostType:"write",callback:d})},addUserKey:function(a,d,b){if(1===arguments.length||"function"===typeof d)b=d,d=null;var c={acl:a};d&&(c.validity=d.validity,c.maxQueriesPerIPPerHour=d.maxQueriesPerIPPerHour,c.maxHitsPerQuery=d.maxHitsPerQuery,c.description=d.description,d.queryParameters&&
(c.queryParameters=this.as._getSearchParams(d.queryParameters,"")),c.referers=d.referers);return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",body:c,hostType:"write",callback:b})},addUserKeyWithValidity:m(function(a,d,b){return this.addUserKey(a,d,b)},f("index.addUserKeyWithValidity()","index.addUserKey()")),updateUserKey:function(a,d,b,c){if(2===arguments.length||"function"===typeof b)c=b,b=null;var e={acl:d};b&&(e.validity=b.validity,e.maxQueriesPerIPPerHour=
b.maxQueriesPerIPPerHour,e.maxHitsPerQuery=b.maxHitsPerQuery,e.description=b.description,b.queryParameters&&(e.queryParameters=this.as._getSearchParams(b.queryParameters,"")),e.referers=b.referers);return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+a,body:e,hostType:"write",callback:c})},_search:function(a,d){return this.as._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params:a},
hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params:a}},callback:d})},as:null,indexName:null,typeAheadArgs:null,typeAheadValueOption:null}},{10:10,18:18,5:5,9:9}],13:[function(g,k,e){k.exports=function(b,c,e){function f(){c.debug("JSONP: success");v||a||(v=!0,r||(c.debug("JSONP: Fail. Script loaded but did not call the callback"),k(),e(Error("Failed to load JSONP script"))))}function g(){"loaded"!==this.readyState&&"complete"!==this.readyState||
f()}function k(){clearTimeout(u);h.onload=null;h.onreadystatechange=null;h.onerror=null;d.removeChild(h);try{delete window[t],delete window[t+"_loaded"]}catch(a){window[t]=null,window[t+"_loaded"]=null}}function p(){c.debug("JSONP: Script timeout");a=!0;k();e(Error("Timeout - Could not connect to endpoint "+b))}function w(){c.debug("JSONP: Script error");v||a||(k(),e(Error("Failed to load JSONP script")))}if("GET"!==c.method)e(Error("Method "+c.method+" "+b+" is not supported by JSONP."));else{c.debug("JSONP: start");
var r=!1,a=!1;n+=1;var d=document.getElementsByTagName("head")[0],h=document.createElement("script"),t="algoliaJSONP_"+n,v=!1;window[t]=function(d){try{delete window[t]}catch(b){window[t]=void 0}a||(r=!0,k(),e(null,{body:d}))};b+="&callback="+t;c.jsonBody&&c.jsonBody.params&&(b+="&"+c.jsonBody.params);var u=setTimeout(p,c.timeout);h.onreadystatechange=g;h.onload=f;h.onerror=w;h.async=!0;h.defer=!0;h.src=b;d.appendChild(h)}};var n=0},{}],14:[function(g,k,e){(function(e){var b=g(11),c=g(12),l=g(18),
f=g(17),k=g(13);window.algoliasearch=g(15);e.angular.module("algoliasearch",[]).service("algolia",["$http","$q","$timeout",function(e,p,n){function r(d,b,c){var e=g(9),f=g(16);c=e(!0,{},c)||{};void 0===c.protocol&&(c.protocol=f());c._ua=r.ua;return new a(d,b,c)}function a(){c.apply(this,arguments)}r.version=g(19);r.ua="Algolia for AngularJS "+r.version;b(a,c);a.prototype._request=function(a,b){var c=p.defer(),g=c.resolve,k=c.reject,q,r=b.body;a=f(a,b.headers);var C=p.defer(),F=C.promise;n(function(){q=
!0;C.resolve("test");k(new l.RequestTimeout)},b.timeout);e({url:a,method:b.method,data:r,cache:!1,timeout:F}).then(function(a){g({statusCode:a.status,body:a.data})},function(a){q||(0===a.status?k(new l.Network({more:a})):g({body:a.data,statusCode:a.status}))});return c.promise};a.prototype._request.fallback=function(a,b){a=f(a,b.headers);var c=p.defer(),e=c.resolve,g=c.reject;k(a,b,function(a,b){a?g(new l.JSONP(a.message)):e(b)});return c.promise};a.prototype._promise={reject:function(a){return p.reject(a)},
resolve:function(a){return p.when(a)},delay:function(a){var b=p.defer();n(b.resolve,a);return b.promise}};return{Client:function(a,b,c){return r(a,b,c)},ua:r.ua,version:r.version}}])}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{11:11,12:12,13:13,15:15,16:16,17:17,18:18,19:19,9:9}],15:[function(g,k,e){(function(e){function b(a,d,e){var f=g(9),k=g(16);e=f(!0,{},e)||{};void 0===e.protocol&&(e.protocol=k());e._ua=b.ua;return new c(a,
d,e)}function c(){q.apply(this,arguments)}k.exports=b;var l=g(11),f=e.Promise||g(8).Promise,q=g(12),m=g(18),p=g(17),w=g(13);b.version=g(19);b.ua="Algolia for vanilla JavaScript "+b.version;var r="XDomainRequest"in window,a="withCredentials"in new XMLHttpRequest,d="timeout"in new XMLHttpRequest;l(c,q);c.prototype._request=function(b,c){return new f(function(e,f){function g(){if(!x){d||clearTimeout(w);var a;try{a={body:JSON.parse(q.responseText),statusCode:q.status}}catch(b){a=new m.UnparsableJSON({more:q.responseText})}a instanceof
m.UnparsableJSON?f(a):e(a)}}function k(a){x||(d||clearTimeout(w),f(new m.Network({more:a})))}function l(){d||(x=!0,q.abort());f(new m.RequestTimeout)}if(a||r){b=p(b,c.headers);var n=c.body,q=a?new XMLHttpRequest:new XDomainRequest,w,x;q instanceof XMLHttpRequest?q.open(c.method,b,!0):q.open(c.method,b);a&&n&&"GET"!==c.method&&q.setRequestHeader("content-type","application/x-www-form-urlencoded");q.onprogress=function(){};q.onload=g;q.onerror=k;d?(q.timeout=c.timeout,q.ontimeout=l):w=setTimeout(l,
c.timeout);q.send(n)}else f(new m.Network("CORS not supported"))})};c.prototype._request.fallback=function(a,b){a=p(a,b.headers);return new f(function(c,d){w(a,b,function(a,b){a?d(new m.JSONP(a.message)):c(b)})})};c.prototype._promise={reject:function(a){return f.reject(a)},resolve:function(a){return f.resolve(a)},delay:function(a){return new f(function(b){setTimeout(b,a)})}}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{11:11,
12:12,13:13,16:16,17:17,18:18,19:19,8:8,9:9}],16:[function(g,k,e){(function(e){k.exports=function(){var b=e.document.location.protocol;"http:"!==b&&"https:"!==b&&(b="http:");return b}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],17:[function(g,k,e){k.exports=function(b,c){b=/\?/.test(b)?b+"&":b+"?";return b+n.encode(c)};var n=g(4)},{4:4}],18:[function(g,k,e){function n(b,e){var g=this;"function"===typeof Error.captureStackTrace?
Error.captureStackTrace(this,this.constructor):g.stack=Error().stack||"Cannot get a stacktrace, browser is too old";this.name=this.constructor.name;this.message=b||"Unknown error";e&&c(e,function(b,c){g[c]=b})}function b(b,c){function e(){var g=Array.prototype.slice.call(arguments,0);"string"!==typeof g[0]&&g.unshift(c);n.apply(this,g);this.name="AlgoliaSearch"+b+"Error"}l(e,n);return e}var c=g(10),l=g(11);l(n,Error);k.exports={AlgoliaSearchError:n,UnparsableJSON:b("UnparsableJSON","Could not parse the incoming response as JSON, see err.more for details"),
RequestTimeout:b("RequestTimeout","Request timedout before getting a response"),Network:b("Network","Network issue, see err.more for details"),JSONP:b("JSONP","JSONP failed"),Unknown:b("Unknown","Unknown error occured")}},{10:10,11:11}],19:[function(g,k,e){k.exports="3.4.0"},{}]},{},[14]);

@@ -1,75 +0,78 @@

/*! algoliasearch 3.3.2 | © 2014, 2015 Algolia SAS | github.com/algolia/algoliasearch-client-js */
(function(g){var h;"undefined"!==typeof window?h=window:"undefined"!==typeof self&&(h=self);h.ALGOLIA_MIGRATION_LAYER=g()})(function(){return function h(d,n,c){function b(f,p){if(!n[f]){if(!d[f]){var l="function"==typeof require&&require;if(!p&&l)return l(f,!0);if(k)return k(f,!0);l=Error("Cannot find module '"+f+"'");throw l.code="MODULE_NOT_FOUND",l;}l=n[f]={exports:{}};d[f][0].call(l.exports,function(c){var k=d[f][1][c];return b(k?k:c)},l,l.exports,h,d,n,c)}return n[f].exports}for(var k="function"==
typeof require&&require,f=0;f<c.length;f++)b(c[f]);return b}({1:[function(h,d,n){function c(f,b){for(var c in b)f.setAttribute(c,b[c])}function b(f,b){f.onload=function(){this.onerror=this.onload=null;b(null,f)};f.onerror=function(){this.onerror=this.onload=null;b(Error("Failed to load "+this.src),f)}}function k(f,b){f.onreadystatechange=function(){if("complete"==this.readyState||"loaded"==this.readyState)this.onreadystatechange=null,b(null,f)}}d.exports=function(f,d,p){var l=document.head||document.getElementsByTagName("head")[0],
q=document.createElement("script");"function"===typeof d&&(p=d,d={});d=d||{};p=p||function(){};q.type=d.type||"text/javascript";q.charset=d.charset||"utf8";q.async="async"in d?!!d.async:!0;q.src=f;d.attrs&&c(q,d.attrs);d.text&&(q.text=""+d.text);("onload"in q?b:k)(q,p);q.onload||b(q,p);l.appendChild(q)}},{}],2:[function(h,d,n){d.exports=function(c){c=new RegExp("cdn\\.jsdelivr\\.net/algoliasearch/latest/"+c.replace(".","\\.")+"(?:\\.min)?\\.js$");for(var b=document.getElementsByTagName("script"),
k=!1,f=0,d=b.length;f<d;f++)if(b[f].src&&c.test(b[f].src)){k=!0;break}return k}},{}],3:[function(h,d,n){(function(c){function b(b){return function(){var f="AlgoliaSearch: loaded V2 script using "+b;c.console&&c.console.log&&c.console.log(f)}}d.exports=function(k){var f=h(1);k="//cdn.jsdelivr.net/algoliasearch/2/"+k+".min.js";c.console&&(c.console.warn?c.console.warn("-- AlgoliaSearch `latest` warning --\nWarning, you are using the `latest` version string from jsDelivr to load the AlgoliaSearch library.\nUsing `latest` is no more recommended, you should load //cdn.jsdelivr.net/algoliasearch/2/algoliasearch.min.js\n\nAlso, we updated the AlgoliaSearch JavaScript client to V3. If you want to upgrade,\nplease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch `latest` warning --"):
c.console.log&&c.console.log("-- AlgoliaSearch `latest` warning --\nWarning, you are using the `latest` version string from jsDelivr to load the AlgoliaSearch library.\nUsing `latest` is no more recommended, you should load //cdn.jsdelivr.net/algoliasearch/2/algoliasearch.min.js\n\nAlso, we updated the AlgoliaSearch JavaScript client to V3. If you want to upgrade,\nplease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch `latest` warning --"));
try{document.write("<script>window.ALGOLIA_SUPPORTS_DOCWRITE = true\x3c/script>"),!0===c.ALGOLIA_SUPPORTS_DOCWRITE?(document.write('<script src="'+k+'">\x3c/script>'),b("document.write")()):f(k,b("DOMElement"))}catch(d){f(k,b("DOMElement"))}}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{1:1}],4:[function(h,d,n){(function(c){d.exports=function(){c.AlgoliaSearch=function(){throw Error("-- AlgoliaSearch V2 => V3 error --\nYou are trying to use a new version of the AlgoliaSearch JavaScript client with an old notation.\nPlease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch V2 => V3 error --");
};c.AlgoliaSearchHelper=function(){throw Error("-- AlgoliaSearch V2 => V3 error --\nYou are trying to use a new version of the AlgoliaSearch JavaScript client with an old notation.\nPlease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch V2 => V3 error --");};AlgoliaExplainResults=function(){throw Error("-- AlgoliaSearch V2 => V3 error --\nYou are trying to use a new version of the AlgoliaSearch JavaScript client with an old notation.\nPlease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch V2 => V3 error --");
}}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],5:[function(h,d,n){d=h(2);n=h(3);h=h(4);d("algoliasearch.jquery")?n("algoliasearch.jquery"):h()},{2:2,3:3,4:4}]},{},[5])(5)});
(function e$$0(h,d,n){function c(f,k){if(!d[f]){if(!h[f]){var p="function"==typeof require&&require;if(!k&&p)return p(f,!0);if(b)return b(f,!0);p=Error("Cannot find module '"+f+"'");throw p.code="MODULE_NOT_FOUND",p;}p=d[f]={exports:{}};h[f][0].call(p.exports,function(b){var k=h[f][1][b];return c(k?k:b)},p,p.exports,e$$0,h,d,n)}return d[f].exports}for(var b="function"==typeof require&&require,k=0;k<n.length;k++)c(n[k]);return c})({1:[function(g,h,d){function n(){if(!k){k=!0;for(var f,c=b.length;c;){f=
b;b=[];for(var d=-1;++d<c;)f[d]();c=b.length}k=!1}}function c(){}g=h.exports={};var b=[],k=!1;g.nextTick=function(f){b.push(f);k||setTimeout(n,0)};g.title="browser";g.browser=!0;g.env={};g.argv=[];g.version="";g.versions={};g.on=c;g.addListener=c;g.once=c;g.off=c;g.removeListener=c;g.removeAllListeners=c;g.emit=c;g.binding=function(f){throw Error("process.binding is not supported");};g.cwd=function(){return"/"};g.chdir=function(f){throw Error("process.chdir is not supported");};g.umask=function(){return 0}},
{}],2:[function(g,h,d){h.exports=function(c,b,k,f){k=k||"=";var d={};if("string"!==typeof c||0===c.length)return d;var p=/\+/g;c=c.split(b||"&");b=1E3;f&&"number"===typeof f.maxKeys&&(b=f.maxKeys);f=c.length;0<b&&f>b&&(f=b);for(b=0;b<f;++b){var l=c[b].replace(p,"%20"),g=l.indexOf(k),h;0<=g?(h=l.substr(0,g),l=l.substr(g+1)):(h=l,l="");h=decodeURIComponent(h);l=decodeURIComponent(l);Object.prototype.hasOwnProperty.call(d,h)?n(d[h])?d[h].push(l):d[h]=[d[h],l]:d[h]=l}return d};var n=Array.isArray||function(c){return"[object Array]"===
Object.prototype.toString.call(c)}},{}],3:[function(g,h,d){function n(f,b){if(f.map)return f.map(b);for(var c=[],d=0;d<f.length;d++)c.push(b(f[d],d));return c}var c=function(f){switch(typeof f){case "string":return f;case "boolean":return f?"true":"false";case "number":return isFinite(f)?f:"";default:return""}};h.exports=function(f,d,g,l){d=d||"&";g=g||"=";null===f&&(f=void 0);return"object"===typeof f?n(k(f),function(k){var l=encodeURIComponent(c(k))+g;return b(f[k])?n(f[k],function(a){return l+
encodeURIComponent(c(a))}).join(d):l+encodeURIComponent(c(f[k]))}).join(d):l?encodeURIComponent(c(l))+g+encodeURIComponent(c(f)):""};var b=Array.isArray||function(f){return"[object Array]"===Object.prototype.toString.call(f)},k=Object.keys||function(f){var b=[],c;for(c in f)Object.prototype.hasOwnProperty.call(f,c)&&b.push(c);return b}},{}],4:[function(g,h,d){d.decode=d.parse=g(2);d.encode=d.stringify=g(3)},{2:2,3:3}],5:[function(g,h,d){function n(){var b;try{b=c.debug}catch(f){}return b}d=h.exports=
g(6);d.log=function(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)};d.formatArgs=function(){var b=arguments,f=this.useColors;b[0]=(f?"%c":"")+this.namespace+(f?" %c":" ")+b[0]+(f?"%c ":" ")+"+"+d.humanize(this.diff);if(!f)return b;var f="color: "+this.color,b=[b[0],f,"color: inherit"].concat(Array.prototype.slice.call(b,1)),c=0,g=0;b[0].replace(/%[a-z%]/g,function(b){"%%"!==b&&(c++,"%c"===b&&(g=c))});b.splice(g,0,f);return b};d.save=function(b){try{null==
b?c.removeItem("debug"):c.debug=b}catch(f){}};d.load=n;d.useColors=function(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)};var c;if("undefined"!==typeof chrome&&"undefined"!==typeof chrome.storage)c=chrome.storage.local;else a:{try{c=window.localStorage;break a}catch(b){}c=void 0}d.colors="lightseagreen forestgreen goldenrod dodgerblue darkorchid crimson".split(" ");
d.formatters.j=function(b){return JSON.stringify(b)};d.enable(n())},{6:6}],6:[function(g,h,d){d=h.exports=function(b){function k(){}function f(){var b=+new Date;f.diff=b-(c||b);f.prev=c;c=f.curr=b;null==f.useColors&&(f.useColors=d.useColors());null==f.color&&f.useColors&&(f.color=d.colors[n++%d.colors.length]);var k=Array.prototype.slice.call(arguments);k[0]=d.coerce(k[0]);"string"!==typeof k[0]&&(k=["%o"].concat(k));var g=0;k[0]=k[0].replace(/%([a-z%])/g,function(b,a){if("%%"===b)return b;g++;var e=
d.formatters[a];"function"===typeof e&&(b=e.call(f,k[g]),k.splice(g,1),g--);return b});"function"===typeof d.formatArgs&&(k=d.formatArgs.apply(f,k));(f.log||d.log||console.log.bind(console)).apply(f,k)}k.enabled=!1;f.enabled=!0;var g=d.enabled(b)?f:k;g.namespace=b;return g};d.coerce=function(b){return b instanceof Error?b.stack||b.message:b};d.disable=function(){d.enable("")};d.enable=function(b){d.save(b);for(var c=(b||"").split(/[\s,]+/),f=c.length,g=0;g<f;g++)c[g]&&(b=c[g].replace(/\*/g,".*?"),
"-"===b[0]?d.skips.push(new RegExp("^"+b.substr(1)+"$")):d.names.push(new RegExp("^"+b+"$")))};d.enabled=function(b){var c,f;c=0;for(f=d.skips.length;c<f;c++)if(d.skips[c].test(b))return!1;c=0;for(f=d.names.length;c<f;c++)if(d.names[c].test(b))return!0;return!1};d.humanize=g(7);d.names=[];d.skips=[];d.formatters={};var n=0,c},{7:7}],7:[function(g,h,d){function n(b){if(b=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(b)){var c=
parseFloat(b[1]);switch((b[2]||"ms").toLowerCase()){case "years":case "year":case "yrs":case "yr":case "y":return 315576E5*c;case "days":case "day":case "d":return 864E5*c;case "hours":case "hour":case "hrs":case "hr":case "h":return 36E5*c;case "minutes":case "minute":case "mins":case "min":case "m":return 6E4*c;case "seconds":case "second":case "secs":case "sec":case "s":return 1E3*c;case "milliseconds":case "millisecond":case "msecs":case "msec":case "ms":return c}}}function c(b,c,f){if(!(b<c))return b<
1.5*c?Math.floor(b/c)+" "+f:Math.ceil(b/c)+" "+f+"s"}h.exports=function(b,d){d=d||{};return"string"==typeof b?n(b):d.long?c(b,864E5,"day")||c(b,36E5,"hour")||c(b,6E4,"minute")||c(b,1E3,"second")||b+" ms":864E5<=b?Math.round(b/864E5)+"d":36E5<=b?Math.round(b/36E5)+"h":6E4<=b?Math.round(b/6E4)+"m":1E3<=b?Math.round(b/1E3)+"s":b+"ms"}},{}],8:[function(g,h,d){(function(d,c){(function(){function b(a){return"function"===typeof a}function g(){return function(){d.nextTick(l)}}function f(){var a=0,e=new I(l),
b=document.createTextNode("");e.observe(b,{characterData:!0});return function(){b.data=a=++a%2}}function t(){var a=new MessageChannel;a.port1.onmessage=l;return function(){a.port2.postMessage(0)}}function p(){return function(){setTimeout(l,1)}}function l(){for(var a=0;a<z;a+=2)(0,A[a])(A[a+1]),A[a]=void 0,A[a+1]=void 0;z=0}function q(){}function x(a,e,b,m){try{a.call(e,b,m)}catch(c){return c}}function a(a,e,b){B(function(a){var c=!1,f=x(b,e,function(b){c||(c=!0,e!==b?m(a,b):v(a,b))},function(e){c||
(c=!0,u(a,e))},"Settle: "+(a._label||" unknown promise"));!c&&f&&(c=!0,u(a,f))},a)}function e(a,e){1===e._state?v(a,e._result):2===a._state?u(a,e._result):C(e,void 0,function(e){m(a,e)},function(e){u(a,e)})}function m(m,c){if(m===c)u(m,new TypeError("You cannot resolve a promise with itself"));else if("function"===typeof c||"object"===typeof c&&null!==c)if(c.constructor===m.constructor)e(m,c);else{var f;try{f=c.then}catch(d){D.error=d,f=D}f===D?u(m,D.error):void 0===f?v(m,c):b(f)?a(m,c,f):v(m,c)}else v(m,
c)}function r(a){a._onerror&&a._onerror(a._result);F(a)}function v(a,e){void 0===a._state&&(a._result=e,a._state=1,0!==a._subscribers.length&&B(F,a))}function u(a,e){void 0===a._state&&(a._state=2,a._result=e,B(r,a))}function C(a,e,b,m){var c=a._subscribers,f=c.length;a._onerror=null;c[f]=e;c[f+1]=b;c[f+2]=m;0===f&&a._state&&B(F,a)}function F(a){var e=a._subscribers,b=a._state;if(0!==e.length){for(var m,c,f=a._result,d=0;d<e.length;d+=3)m=e[d],c=e[d+b],m?J(b,m,c,f):c(f);a._subscribers.length=0}}function K(){this.error=
null}function J(a,e,c,f){var d=b(c),r,g,k,h;if(d){try{r=c(f)}catch(l){G.error=l,r=G}r===G?(h=!0,g=r.error,r=null):k=!0;if(e===r){u(e,new TypeError("A promises callback cannot return that same promise."));return}}else r=f,k=!0;void 0===e._state&&(d&&k?m(e,r):h?u(e,g):1===a?v(e,r):2===a&&u(e,r))}function N(a,e){try{e(function(e){m(a,e)},function(e){u(a,e)})}catch(b){u(a,b)}}function w(a,e,b,m){this._instanceConstructor=a;this.promise=new a(q,m);this._abortOnReject=b;this._validateInput(e)?(this._input=
e,this._remaining=this.length=e.length,this._init(),0===this.length?v(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&v(this.promise,this._result))):u(this.promise,this._validationError())}function y(a){this._id=O++;this._result=this._state=void 0;this._subscribers=[];if(q!==a){if(!b(a))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof y))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
N(this,a)}}var L=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)},z=0,B=function(a,e){A[z]=a;A[z+1]=e;z+=2;2===z&&M()},E="undefined"!==typeof window?window:{},I=E.MutationObserver||E.WebKitMutationObserver,E="undefined"!==typeof Uint8ClampedArray&&"undefined"!==typeof importScripts&&"undefined"!==typeof MessageChannel,A=Array(1E3),M;M="undefined"!==typeof d&&"[object process]"==={}.toString.call(d)?g():I?f():E?t():p();var D=new K,G=new K;w.prototype._validateInput=
function(a){return L(a)};w.prototype._validationError=function(){return Error("Array Methods must be provided an Array")};w.prototype._init=function(){this._result=Array(this.length)};w.prototype._enumerate=function(){for(var a=this.length,e=this.promise,b=this._input,m=0;void 0===e._state&&m<a;m++)this._eachEntry(b[m],m)};w.prototype._eachEntry=function(a,e){var b=this._instanceConstructor;"object"===typeof a&&null!==a?a.constructor===b&&void 0!==a._state?(a._onerror=null,this._settledAt(a._state,
e,a._result)):this._willSettleAt(b.resolve(a),e):(this._remaining--,this._result[e]=this._makeResult(1,e,a))};w.prototype._settledAt=function(a,e,b){var m=this.promise;void 0===m._state&&(this._remaining--,this._abortOnReject&&2===a?u(m,b):this._result[e]=this._makeResult(a,e,b));0===this._remaining&&v(m,this._result)};w.prototype._makeResult=function(a,e,b){return b};w.prototype._willSettleAt=function(a,e){var b=this;C(a,void 0,function(a){b._settledAt(1,e,a)},function(a){b._settledAt(2,e,a)})};
var O=0;y.all=function(a,e){return(new w(this,a,!0,e)).promise};y.race=function(a,e){function b(a){m(f,a)}function c(a){u(f,a)}var f=new this(q,e);if(!L(a))return u(f,new TypeError("You must pass an array to race.")),f;for(var d=a.length,r=0;void 0===f._state&&r<d;r++)C(this.resolve(a[r]),void 0,b,c);return f};y.resolve=function(a,e){if(a&&"object"===typeof a&&a.constructor===this)return a;var b=new this(q,e);m(b,a);return b};y.reject=function(a,e){var b=new this(q,e);u(b,a);return b};y.prototype=
{constructor:y,then:function(a,e){var b=this._state;if(1===b&&!a||2===b&&!e)return this;var m=new this.constructor(q),c=this._result;if(b){var f=arguments[b-1];B(function(){J(b,m,f,c)})}else C(this,m,a,e);return m},"catch":function(a){return this.then(null,a)}};var H={Promise:y,polyfill:function(){var a;a="undefined"!==typeof c?c:"undefined"!==typeof window&&window.document?window:self;"Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var e;
new a.Promise(function(a){e=a});return b(e)}()||(a.Promise=y)}};"function"===typeof define&&define.amd?define(function(){return H}):"undefined"!==typeof h&&h.exports?h.exports=H:"undefined"!==typeof this&&(this.ES6Promise=H)}).call(this)}).call(this,g(1),"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{1:1}],9:[function(g,h,d){var n=Object.prototype.hasOwnProperty,c=Object.prototype.toString,b=g(10),k=function(b){if(!b||"[object Object]"!==
c.call(b))return!1;var d=n.call(b,"constructor"),g=b.constructor&&b.constructor.prototype&&n.call(b.constructor.prototype,"isPrototypeOf");if(b.constructor&&!d&&!g)return!1;for(var k in b);return void 0===k||n.call(b,k)};h.exports=function t(){var c,d,g,h,a,e=arguments[0],m=1,r=arguments.length,v=!1;if("boolean"===typeof e)v=e,e=arguments[1]||{},m=2;else if("object"!==typeof e&&"function"!==typeof e||null==e)e={};for(;m<r;++m)if(c=arguments[m],null!=c)for(d in c)g=e[d],h=c[d],e!==h&&(v&&h&&(k(h)||
(a=b(h)))?(a?(a=!1,g=g&&b(g)?g:[]):g=g&&k(g)?g:{},e[d]=t(v,g,h)):void 0!==h&&(e[d]=h));return e}},{10:10}],10:[function(g,h,d){h.exports=Array.isArray||function(d){return"[object Array]"==Object.prototype.toString.call(d)}},{}],11:[function(g,h,d){var n=Object.prototype.hasOwnProperty,c=Object.prototype.toString;h.exports=function(b,d,f){if("[object Function]"!==c.call(d))throw new TypeError("iterator must be a function");var g=b.length;if(g===+g)for(var h=0;h<g;h++)d.call(f,b[h],h,b);else for(h in b)n.call(b,
h)&&d.call(f,b[h],h,b)}},{}],12:[function(g,h,d){h.exports="function"===typeof Object.create?function(d,c){d.super_=c;d.prototype=Object.create(c.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}})}:function(d,c){d.super_=c;var b=function(){};b.prototype=c.prototype;d.prototype=new b;d.prototype.constructor=d}},{}],13:[function(g,h,d){(function(d){function c(a,e,m){var c=g(9);if(!a)throw Error("algoliasearch: Please provide an application ID. Usage: algoliasearch(applicationID, apiKey, opts)");
if(!e)throw Error("algoliasearch: Please provide an API key. Usage: algoliasearch(applicationID, apiKey, opts)");this.applicationID=a;this.apiKey=e;a=[this.applicationID+"-1.algolianet.com",this.applicationID+"-2.algolianet.com",this.applicationID+"-3.algolianet.com"];this.hosts={read:[],write:[]};this.hostIndex={read:0,write:0};m=m||{};e=m.protocol||"https:";var f=void 0===m.timeout?2E3:m.timeout;/:$/.test(e)||(e+=":");if("http:"!==m.protocol&&"https:"!==m.protocol)throw Error("algoliasearch: protocol must be `http:` or `https:` (was `"+
m.protocol+"`)");m.hosts?(this.hosts.read=c([],m.hosts),this.hosts.write=c([],m.hosts)):(this.hosts.read=[this.applicationID+"-dsn.algolia.net"].concat(a),this.hosts.write=[this.applicationID+".algolia.net"].concat(a));this.hosts.read=b(this.hosts.read,k(e));this.hosts.write=b(this.hosts.write,k(e));this.requestTimeout=f;this.extraHeaders=[];this.cache={};this._ua=m._ua;this._useCache=void 0===m._useCache?!0:m._useCache;this._setTimeout=m._setTimeout;q("init done, %j",this)}function b(a,e){for(var b=
[],c=0;c<a.length;++c)b.push(e(a[c],c));return b}function k(a){return function(e){return a+"//"+e.toLowerCase()}}function f(){throw Error("algoliasearch: Not implemented in this environment.\nIf you feel this is a mistake, write to support@algolia.com");}function t(a,e){var b=a.toLowerCase().replace(".","").replace("()","");return"algoliasearch: `"+a+"` was replaced by `"+e+"`. Please see https://github.com/algolia/algoliasearch-client-js/wiki/Deprecated#"+b}function p(a,e){e(a,0)}function l(a,e){var b=
!1;return function(){b||(console.log(e),b=!0);return a.apply(this,arguments)}}h.exports=c;"development"===d.env.NODE_ENV&&g(5).enable("algoliasearch*");var q=g(5)("algoliasearch"),x=g(11);c.prototype={deleteIndex:function(a,e){return this._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(a),hostType:"write",callback:e})},moveIndex:function(a,e,b){e={operation:"move",destination:e};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(a)+"/operation",body:e,
hostType:"write",callback:b})},copyIndex:function(a,e,b){e={operation:"copy",destination:e};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(a)+"/operation",body:e,hostType:"write",callback:b})},getLogs:function(a,e,b){if(0===arguments.length||"function"===typeof a)b=a,a=0,e=10;else if(1===arguments.length||"function"===typeof e)b=e,e=10;return this._jsonRequest({method:"GET",url:"/1/logs?offset="+a+"&length="+e,hostType:"read",callback:b})},listIndexes:function(a,e){var b=
"";void 0===a||"function"===typeof a?e=a:b="?page="+a;return this._jsonRequest({method:"GET",url:"/1/indexes"+b,hostType:"read",callback:e})},initIndex:function(a){return new this.Index(this,a)},listUserKeys:function(a){return this._jsonRequest({method:"GET",url:"/1/keys",hostType:"read",callback:a})},getUserKeyACL:function(a,e){return this._jsonRequest({method:"GET",url:"/1/keys/"+a,hostType:"read",callback:e})},deleteUserKey:function(a,e){return this._jsonRequest({method:"DELETE",url:"/1/keys/"+
a,hostType:"write",callback:e})},addUserKey:function(a,e,b){if(1===arguments.length||"function"===typeof e)b=e,e=null;var c={acl:a};e&&(c.validity=e.validity,c.maxQueriesPerIPPerHour=e.maxQueriesPerIPPerHour,c.maxHitsPerQuery=e.maxHitsPerQuery,c.indexes=e.indexes);return this._jsonRequest({method:"POST",url:"/1/keys",body:c,hostType:"write",callback:b})},addUserKeyWithValidity:l(function(a,e,b){return this.addUserKey(a,e,b)},t("client.addUserKeyWithValidity()","client.addUserKey()")),updateUserKey:function(a,
e,b,c){if(2===arguments.length||"function"===typeof b)c=b,b=null;var f={acl:e};b&&(f.validity=b.validity,f.maxQueriesPerIPPerHour=b.maxQueriesPerIPPerHour,f.maxHitsPerQuery=b.maxHitsPerQuery,f.indexes=b.indexes);return this._jsonRequest({method:"PUT",url:"/1/keys/"+a,body:f,hostType:"write",callback:c})},setSecurityTags:function(a){if("[object Array]"===Object.prototype.toString.call(a)){for(var e=[],b=0;b<a.length;++b)if("[object Array]"===Object.prototype.toString.call(a[b])){for(var c=[],f=0;f<
a[b].length;++f)c.push(a[b][f]);e.push("("+c.join(",")+")")}else e.push(a[b]);a=e.join(",")}this.securityTags=a},setUserToken:function(a){this.userToken=a},startQueriesBatch:l(function(){this._batch=[]},t("client.startQueriesBatch()","client.search()")),addQueryInBatch:l(function(a,e,b){this._batch.push({indexName:a,query:e,params:b})},t("client.addQueryInBatch()","client.search()")),clearCache:function(){this.cache={}},sendQueriesBatch:l(function(a){return this.search(this._batch,a)},t("client.sendQueriesBatch()",
"client.search()")),setRequestTimeout:function(a){a&&(this.requestTimeout=parseInt(a,10))},search:function(a,e){var c=this,f={requests:b(a,function(a){var e="";void 0!==a.query&&(e+="query="+encodeURIComponent(a.query));return{indexName:a.indexName,params:c._getSearchParams(a.params,e)}})};return this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",body:f,hostType:"read",callback:e})},destroy:f,enableRateLimitForward:f,disableRateLimitForward:f,useSecuredAPIKey:f,disableSecuredAPIKey:f,
generateSecuredApiKey:f,Index:function(a,e){this.indexName=e;this.as=a;this.typeAheadValueOption=this.typeAheadArgs=null;this.cache={}},setExtraHeader:function(a,e){this.extraHeaders.push({name:a.toLowerCase(),value:e})},_sendQueriesBatch:function(a,e){return this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",body:a,hostType:"read",fallback:{method:"GET",url:"/1/indexes/*",body:{params:function(){for(var e="",b=0;b<a.requests.length;++b)var c="/1/indexes/"+encodeURIComponent(a.requests[b].indexName)+
"?"+a.requests[b].params,e=e+(b+"="+encodeURIComponent(c)+"&");return e}()}},callback:e})},_jsonRequest:function(a){function e(g,l){function n(){d.hostIndex[a.hostType]=++d.hostIndex[a.hostType]%d.hosts[a.hostType].length;h+=1;l.timeout=d.requestTimeout*(h+1);return e(g,l)}var q;d._useCache&&(q=a.url);d._useCache&&c&&(q+="_body_"+l.body);if(d._useCache&&f&&void 0!==f[q])return b("serving response from cache"),d._promise.resolve(f[q]);if(h>=d.hosts[a.hostType].length){if(!a.fallback||!d._request.fallback||
k)return d._promise.reject(Error("Cannot connect to the AlgoliaSearch API. Send an email to support@algolia.com to report and resolve the issue."));h=0;l.method=a.fallback.method;l.url=a.fallback.url;l.jsonBody=a.fallback.body;l.jsonBody&&(l.body=JSON.stringify(a.fallback.body));l.timeout=d.requestTimeout*(h+1);d.hostIndex[a.hostType]=0;k=d.useFallback=!0;return e(d._request.fallback,l)}return g.call(d,d.hosts[a.hostType][d.hostIndex[a.hostType]]+l.url,{body:c,jsonBody:a.body,method:l.method,headers:d._computeRequestHeaders(),
timeout:l.timeout,debug:b}).then(function(a){if(a instanceof Error)return b("error: %s",a.message),n();b("received response: %j",a);var e=a&&a.body&&a.body.message&&a.body.status||a.statusCode||a&&a.body&&200,c=200===e||201===e,e=!c&&4!==Math.floor(e/100)&&1!==Math.floor(e/100);d._useCache&&c&&f&&(f[q]=a.body);return c?a.body:e?n():d._promise.reject(Error(a.body&&a.body.message||"Unknown error"))},function(c){b("error: %s, stack: %s",c.message,c.stack);d.useFallback?(d.hostIndex[a.hostType]=++d.hostIndex[a.hostType]%
d.hosts[a.hostType].length,h+=1):h=d.hosts[a.hostType].length;return e(g,l)})}var b=g(5)("algoliasearch:"+a.url),c,f=a.cache,d=this,h=0,k=!1;void 0!==a.body&&(c=JSON.stringify(a.body));b("request start");var l=d.useFallback&&a.fallback,n=l?a.fallback:a,l=e(l?d._request.fallback:d._request,{url:n.url,method:n.method,body:c,jsonBody:a.body,timeout:d.requestTimeout*(h+1)});if(a.callback)l.then(function(e){p(function(){a.callback(null,e)},d._setTimeout||setTimeout)},function(e){p(function(){a.callback(e)},
d._setTimeout||setTimeout)});else return l},_getSearchParams:function(a,e){if(this._isUndefined(a)||null===a)return e;for(var b in a)null!==b&&a.hasOwnProperty(b)&&(e+=""===e?"":"&",e+=b+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(a[b])?JSON.stringify(a[b]):a[b]));return e},_isUndefined:function(a){return void 0===a},_computeRequestHeaders:function(){var a={"x-algolia-api-key":this.apiKey,"x-algolia-application-id":this.applicationID,"x-user-agent":this._ua};this.userToken&&
(a["x-algolia-usertoken"]=this.userToken);this.securityTags&&(a["x-algolia-tagfilters"]=this.securityTags);this.extraHeaders&&x(this.extraHeaders,function(e){a[e.name]=e.value});return a}};c.prototype.Index.prototype={clearCache:function(){this.cache={}},addObject:function(a,e,b){if(1===arguments.length||"function"===typeof e)b=e,e=void 0;return this.as._jsonRequest({method:void 0!==e?"PUT":"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+(void 0!==e?"/"+encodeURIComponent(e):""),body:a,
hostType:"write",callback:b})},addObjects:function(a,e){for(var b={requests:[]},c=0;c<a.length;++c)b.requests.push({action:"addObject",body:a[c]});return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:b,hostType:"write",callback:e})},getObject:function(a,b,c){if(1===arguments.length||"function"===typeof b)c=b,b=void 0;var d="";if(void 0!==b)for(var d="?attributes=",f=0;f<b.length;++f)0!==f&&(d+=","),d+=b[f];return this.as._jsonRequest({method:"GET",
url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(a)+d,hostType:"read",callback:c})},getObjects:function(a,e){var c=this,d={requests:b(a,function(a){return{indexName:c.indexName,objectID:a}})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/*/objects",hostType:"read",body:d,callback:e})},partialUpdateObject:function(a,b){return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(a.objectID)+"/partial",
body:a,hostType:"write",callback:b})},partialUpdateObjects:function(a,b){for(var c={requests:[]},d=0;d<a.length;++d)c.requests.push({action:"partialUpdateObject",objectID:a[d].objectID,body:a[d]});return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:c,hostType:"write",callback:b})},saveObject:function(a,b){return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(a.objectID),body:a,
hostType:"write",callback:b})},saveObjects:function(a,b){for(var c={requests:[]},d=0;d<a.length;++d)c.requests.push({action:"updateObject",objectID:a[d].objectID,body:a[d]});return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:c,hostType:"write",callback:b})},deleteObject:function(a,b){if("function"===typeof a||"string"!==typeof a&&"number"!==typeof a){var c=Error("Cannot delete an object without an objectID");b=a;return"function"===typeof b?
b(c):this.as._promise.reject(c)}return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(a),hostType:"write",callback:b})},deleteObjects:function(a,e){var c={requests:b(a,function(a){return{action:"deleteObject",objectID:a,body:{objectID:a}}})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:c,hostType:"write",callback:e})},deleteByQuery:function(a,e,c){function d(a){return g.waitTask(a.taskID)}
function f(){return g.deleteByQuery(a,e)}var g=this,h=g.as;if(1===arguments.length||"function"===typeof e)c=e,e={};e.attributesToRetrieve="objectID";e.hitsPerPage=1E3;this.clearCache();var k=this.search(a,e).then(function(a){if(0===a.nbHits)return a;a=b(a.hits,function(a){return a.objectID});return g.deleteObjects(a).then(d).then(f)});if(!c)return k;k.then(function(){p(function(){c(null)},h._setTimeout||setTimeout)},function(a){p(function(){c(a)},h._setTimeout||setTimeout)})},search:function(a,b,
c){if("function"===typeof a&&"object"===typeof b||"object"===typeof c)throw Error("algoliasearch: index.search usage is index.search(query, params, cb)");if(0===arguments.length||"function"===typeof a)c=a,a="";else if(1===arguments.length||"function"===typeof b)c=b,b=void 0;if("object"===typeof a&&null!==a)b=a,a=void 0;else if(void 0===a||null===a)a="";var d="";void 0!==a&&(d+="query="+encodeURIComponent(a));void 0!==b&&(d=this.as._getSearchParams(b,d));return this._search(d,c)},browse:function(a,
b,c){if(1===arguments.length||"function"===typeof b)c=b,b=void 0;var d="?page="+a;this.as._isUndefined(b)||(d+="&hitsPerPage="+b);return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse"+d,hostType:"read",callback:c})},ttAdapter:function(a){var b=this;return function(c,d){b.search(c,a,function(a,b){a?d(a):d(b.hits)})}},waitTask:function(a,b){var c=this,d=c.as,f=this.as._jsonRequest({method:"GET",hostType:"read",url:"/1/indexes/"+encodeURIComponent(c.indexName)+
"/task/"+a}).then(function(b){return"published"!==b.status?c.as._promise.delay(100).then(function(){return c.waitTask(a)}):b});if(!b)return f;f.then(function(a){p(function(){b(null,a)},d._setTimeout||setTimeout)},function(a){p(function(){b(a)},d._setTimeout||setTimeout)})},clearIndex:function(a){return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/clear",hostType:"write",callback:a})},getSettings:function(a){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+
encodeURIComponent(this.indexName)+"/settings",hostType:"read",callback:a})},setSettings:function(a,b){return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/settings",hostType:"write",body:a,callback:b})},listUserKeys:function(a){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",hostType:"read",callback:a})},getUserKeyACL:function(a,b){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+
"/keys/"+a,hostType:"read",callback:b})},deleteUserKey:function(a,b){return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+a,hostType:"write",callback:b})},addUserKey:function(a,b,c){if(1===arguments.length||"function"===typeof b)c=b,b=null;var d={acl:a};b&&(d.validity=b.validity,d.maxQueriesPerIPPerHour=b.maxQueriesPerIPPerHour,d.maxHitsPerQuery=b.maxHitsPerQuery);return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+
"/keys",body:d,hostType:"write",callback:c})},addUserKeyWithValidity:l(function(a,b,c){return this.addUserKey(a,b,c)},t("index.addUserKeyWithValidity()","index.addUserKey()")),updateUserKey:function(a,b,c,d){if(2===arguments.length||"function"===typeof c)d=c,c=null;var f={acl:b};c&&(f.validity=c.validity,f.maxQueriesPerIPPerHour=c.maxQueriesPerIPPerHour,f.maxHitsPerQuery=c.maxHitsPerQuery);return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+a,body:f,
hostType:"write",callback:d})},_search:function(a,b){return this.as._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params:a},hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params:a}},callback:b})},as:null,indexName:null,typeAheadArgs:null,typeAheadValueOption:null}}).call(this,g(1))},{1:1,11:11,5:5,9:9}],14:[function(g,h,d){h.exports=function(c,b,d){function f(){b.debug("JSONP: success");
v||a||(v=!0,x||(b.debug("JSONP: Fail. Script loaded but did not call the callback"),h(),d(Error("Failed to load JSONP script"))))}function g(){"loaded"!==this.readyState&&"complete"!==this.readyState||f()}function h(){clearTimeout(u);m.onload=null;m.onreadystatechange=null;m.onerror=null;e.removeChild(m);try{delete window[r],delete window[r+"_loaded"]}catch(a){window[r]=null,window[r+"_loaded"]=null}}function l(){b.debug("JSONP: Script timeout");a=!0;h();d(Error("Timeout - Could not connect to endpoint "+
c))}function q(){b.debug("JSONP: Script error");v||a||(h(),d(Error("Failed to load JSONP script")))}if("GET"!==b.method)d(Error("Method "+b.method+" "+c+" is not supported by JSONP."));else{b.debug("JSONP: start");var x=!1,a=!1;n+=1;var e=document.getElementsByTagName("head")[0],m=document.createElement("script"),r="algoliaJSONP_"+n,v=!1;window[r]=function(b){try{delete window[r]}catch(c){window[r]=void 0}a||(x=!0,h(),d(null,{body:b}))};c+="&callback="+r;b.jsonBody&&b.jsonBody.params&&(c+="&"+b.jsonBody.params);
var u=setTimeout(l,b.timeout);m.onreadystatechange=g;m.onload=f;m.onerror=q;m.async=!0;m.defer=!0;m.src=c;e.appendChild(m)}};var n=0},{}],15:[function(g,h,d){(function(d){function c(d,f,a){var e=g(9),h=g(17);a=e(!0,{},a)||{};void 0===a.protocol&&(a.protocol=h());a._ua=c.ua;return new b(d,f,a)}function b(){f.apply(this,arguments)}var h=g(12),f=g(13),t=g(18),p=g(14);window.algoliasearch=g(16);c.version=g(19);c.ua="Algolia for jQuery "+c.version;var l=d.jQuery;l.algolia={Client:c,ua:c.ua,version:c.version};
h(b,f);b.prototype._request=function(b,c){return l.Deferred(function(a){var d=c.body;b=t(b,c.headers);l.ajax(b,{type:c.method,timeout:c.timeout,dataType:"json",data:d,complete:function(c,d){"timeout"===d?a.resolve(Error("Timeout - Could not connect to endpoint "+b)):0===c.status?a.reject(Error("Network error")):a.resolve({statusCode:c.status,body:c.responseJSON})}})}).promise()};b.prototype._request.fallback=function(b,c){b=t(b,c.headers);return l.Deferred(function(a){p(b,c,function(b,c){b?a.reject(b):
a.resolve(c)})}).promise()};b.prototype._promise={reject:function(b){return l.Deferred(function(c){c.reject(b)}).promise()},resolve:function(b){return l.Deferred(function(c){c.resolve(b)}).promise()},delay:function(b){return l.Deferred(function(c){setTimeout(function(){c.resolve()},b)}).promise()}}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{12:12,13:13,14:14,16:16,17:17,18:18,19:19,9:9}],16:[function(g,h,d){(function(d){function c(a,
d,f){var h=g(9),k=g(17);f=h(!0,{},f)||{};void 0===f.protocol&&(f.protocol=k());f._ua=c.ua;return new b(a,d,f)}function b(){t.apply(this,arguments)}h.exports=c;var k=g(12),f=d.Promise||g(8).Promise,t=g(13),p=g(18),l=g(14);c.version=g(19);c.ua="Algolia for vanilla JavaScript "+c.version;var q="XDomainRequest"in window,x="withCredentials"in new XMLHttpRequest,a="timeout"in new XMLHttpRequest;k(b,t);b.prototype._request=function(b,c){return new f(function(d,f){function g(){if(!w){a||clearTimeout(t);var b=
null;try{b=JSON.parse(n.responseText)}catch(c){}d({body:b,statusCode:n.status})}}function h(b){w||(a||clearTimeout(t),f(Error("Could not connect to host, error was:"+b)))}function k(){a||(w=!0,n.abort());d(Error("Timeout - Could not connect to endpoint "+b))}if(x||q){b=p(b,c.headers);var l=c.body,n=x?new XMLHttpRequest:new XDomainRequest,t,w;n instanceof XMLHttpRequest?n.open(c.method,b,!0):n.open(c.method,b);x&&l&&"GET"!==c.method&&n.setRequestHeader("content-type","application/x-www-form-urlencoded");
n.onprogress=function(){};n.onload=g;n.onerror=h;a?(n.timeout=c.timeout,n.ontimeout=k):t=setTimeout(k,c.timeout);n.send(l)}else f(Error("CORS not supported"))})};b.prototype._request.fallback=function(a,b){a=p(a,b.headers);return new f(function(c,d){l(a,b,function(a,b){a?d(a):c(b)})})};b.prototype._promise={reject:function(a){return f.reject(a)},resolve:function(a){return f.resolve(a)},delay:function(a){return new f(function(b){setTimeout(b,a)})}}}).call(this,"undefined"!==typeof global?global:"undefined"!==
typeof self?self:"undefined"!==typeof window?window:{})},{12:12,13:13,14:14,17:17,18:18,19:19,8:8,9:9}],17:[function(g,h,d){(function(d){h.exports=function(){var c=d.document.location.protocol;"http:"!==c&&"https:"!==c&&(c="http:");return c}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],18:[function(g,h,d){h.exports=function(c,b){c=/\?/.test(c)?c+"&":c+"?";return c+n.encode(b)};var n=g(4)},{4:4}],19:[function(g,h,d){h.exports=
"3.3.2"},{}]},{},[15]);
/*! algoliasearch 3.4.0 | © 2014, 2015 Algolia SAS | github.com/algolia/algoliasearch-client-js */
(function(g){var n;"undefined"!==typeof window?n=window:"undefined"!==typeof self&&(n=self);n.ALGOLIA_MIGRATION_LAYER=g()})(function(){return function n(f,m,b){function c(e,l){if(!m[e]){if(!f[e]){var q="function"==typeof require&&require;if(!l&&q)return q(e,!0);if(h)return h(e,!0);q=Error("Cannot find module '"+e+"'");throw q.code="MODULE_NOT_FOUND",q;}q=m[e]={exports:{}};f[e][0].call(q.exports,function(b){var h=f[e][1][b];return c(h?h:b)},q,q.exports,n,f,m,b)}return m[e].exports}for(var h="function"==
typeof require&&require,e=0;e<b.length;e++)c(b[e]);return c}({1:[function(n,f,m){function b(e,c){for(var b in c)e.setAttribute(b,c[b])}function c(e,c){e.onload=function(){this.onerror=this.onload=null;c(null,e)};e.onerror=function(){this.onerror=this.onload=null;c(Error("Failed to load "+this.src),e)}}function h(e,c){e.onreadystatechange=function(){if("complete"==this.readyState||"loaded"==this.readyState)this.onreadystatechange=null,c(null,e)}}f.exports=function(e,p,l){var f=document.head||document.getElementsByTagName("head")[0],
m=document.createElement("script");"function"===typeof p&&(l=p,p={});p=p||{};l=l||function(){};m.type=p.type||"text/javascript";m.charset=p.charset||"utf8";m.async="async"in p?!!p.async:!0;m.src=e;p.attrs&&b(m,p.attrs);p.text&&(m.text=""+p.text);("onload"in m?c:h)(m,l);m.onload||c(m,l);f.appendChild(m)}},{}],2:[function(n,f,m){f.exports=function(b){b=new RegExp("cdn\\.jsdelivr\\.net/algoliasearch/latest/"+b.replace(".","\\.")+"(?:\\.min)?\\.js$");for(var c=document.getElementsByTagName("script"),
h=!1,e=0,p=c.length;e<p;e++)if(c[e].src&&b.test(c[e].src)){h=!0;break}return h}},{}],3:[function(n,f,m){(function(b){function c(c){return function(){var e="AlgoliaSearch: loaded V2 script using "+c;b.console&&b.console.log&&b.console.log(e)}}f.exports=function(h){var e=n(1);h="//cdn.jsdelivr.net/algoliasearch/2/"+h+".min.js";b.console&&(b.console.warn?b.console.warn("-- AlgoliaSearch `latest` warning --\nWarning, you are using the `latest` version string from jsDelivr to load the AlgoliaSearch library.\nUsing `latest` is no more recommended, you should load //cdn.jsdelivr.net/algoliasearch/2/algoliasearch.min.js\n\nAlso, we updated the AlgoliaSearch JavaScript client to V3. If you want to upgrade,\nplease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch `latest` warning --"):
b.console.log&&b.console.log("-- AlgoliaSearch `latest` warning --\nWarning, you are using the `latest` version string from jsDelivr to load the AlgoliaSearch library.\nUsing `latest` is no more recommended, you should load //cdn.jsdelivr.net/algoliasearch/2/algoliasearch.min.js\n\nAlso, we updated the AlgoliaSearch JavaScript client to V3. If you want to upgrade,\nplease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch `latest` warning --"));
try{document.write("<script>window.ALGOLIA_SUPPORTS_DOCWRITE = true\x3c/script>"),!0===b.ALGOLIA_SUPPORTS_DOCWRITE?(document.write('<script src="'+h+'">\x3c/script>'),c("document.write")()):e(h,c("DOMElement"))}catch(p){e(h,c("DOMElement"))}}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{1:1}],4:[function(n,f,m){(function(b){f.exports=function(){b.AlgoliaSearch=function(){throw Error("-- AlgoliaSearch V2 => V3 error --\nYou are trying to use a new version of the AlgoliaSearch JavaScript client with an old notation.\nPlease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch V2 => V3 error --");
};b.AlgoliaSearchHelper=function(){throw Error("-- AlgoliaSearch V2 => V3 error --\nYou are trying to use a new version of the AlgoliaSearch JavaScript client with an old notation.\nPlease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch V2 => V3 error --");};AlgoliaExplainResults=function(){throw Error("-- AlgoliaSearch V2 => V3 error --\nYou are trying to use a new version of the AlgoliaSearch JavaScript client with an old notation.\nPlease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch V2 => V3 error --");
}}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],5:[function(n,f,m){f=n(2);m=n(3);n=n(4);f("algoliasearch.jquery")?m("algoliasearch.jquery"):n()},{2:2,3:3,4:4}]},{},[5])(5)});
(function e$$0(n,f,m){function b(e,h){if(!f[e]){if(!n[e]){var l="function"==typeof require&&require;if(!h&&l)return l(e,!0);if(c)return c(e,!0);l=Error("Cannot find module '"+e+"'");throw l.code="MODULE_NOT_FOUND",l;}l=f[e]={exports:{}};n[e][0].call(l.exports,function(c){var h=n[e][1][c];return b(h?h:c)},l,l.exports,e$$0,n,f,m)}return f[e].exports}for(var c="function"==typeof require&&require,h=0;h<m.length;h++)b(m[h]);return b})({1:[function(g,n,f){function m(){if(!h){h=!0;for(var e,b=c.length;b;){e=
c;c=[];for(var l=-1;++l<b;)e[l]();b=c.length}h=!1}}function b(){}g=n.exports={};var c=[],h=!1;g.nextTick=function(e){c.push(e);h||setTimeout(m,0)};g.title="browser";g.browser=!0;g.env={};g.argv=[];g.version="";g.versions={};g.on=b;g.addListener=b;g.once=b;g.off=b;g.removeListener=b;g.removeAllListeners=b;g.emit=b;g.binding=function(e){throw Error("process.binding is not supported");};g.cwd=function(){return"/"};g.chdir=function(e){throw Error("process.chdir is not supported");};g.umask=function(){return 0}},
{}],2:[function(g,n,f){n.exports=function(b,c,h,e){h=h||"=";var f={};if("string"!==typeof b||0===b.length)return f;var l=/\+/g;b=b.split(c||"&");c=1E3;e&&"number"===typeof e.maxKeys&&(c=e.maxKeys);e=b.length;0<c&&e>c&&(e=c);for(c=0;c<e;++c){var q=b[c].replace(l,"%20"),g=q.indexOf(h),r;0<=g?(r=q.substr(0,g),q=q.substr(g+1)):(r=q,q="");r=decodeURIComponent(r);q=decodeURIComponent(q);Object.prototype.hasOwnProperty.call(f,r)?m(f[r])?f[r].push(q):f[r]=[f[r],q]:f[r]=q}return f};var m=Array.isArray||function(b){return"[object Array]"===
Object.prototype.toString.call(b)}},{}],3:[function(g,n,f){function m(e,c){if(e.map)return e.map(c);for(var b=[],h=0;h<e.length;h++)b.push(c(e[h],h));return b}var b=function(e){switch(typeof e){case "string":return e;case "boolean":return e?"true":"false";case "number":return isFinite(e)?e:"";default:return""}};n.exports=function(e,f,l,g){f=f||"&";l=l||"=";null===e&&(e=void 0);return"object"===typeof e?m(h(e),function(h){var g=encodeURIComponent(b(h))+l;return c(e[h])?m(e[h],function(a){return g+
encodeURIComponent(b(a))}).join(f):g+encodeURIComponent(b(e[h]))}).join(f):g?encodeURIComponent(b(g))+l+encodeURIComponent(b(e)):""};var c=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},h=Object.keys||function(e){var c=[],b;for(b in e)Object.prototype.hasOwnProperty.call(e,b)&&c.push(b);return c}},{}],4:[function(g,n,f){f.decode=f.parse=g(2);f.encode=f.stringify=g(3)},{2:2,3:3}],5:[function(g,n,f){function m(){var c;try{c=b.debug}catch(e){}return c}f=n.exports=
g(6);f.log=function(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)};f.formatArgs=function(){var c=arguments,e=this.useColors;c[0]=(e?"%c":"")+this.namespace+(e?" %c":" ")+c[0]+(e?"%c ":" ")+"+"+f.humanize(this.diff);if(!e)return c;var e="color: "+this.color,c=[c[0],e,"color: inherit"].concat(Array.prototype.slice.call(c,1)),b=0,m=0;c[0].replace(/%[a-z%]/g,function(c){"%%"!==c&&(b++,"%c"===c&&(m=b))});c.splice(m,0,e);return c};f.save=function(c){try{null==
c?b.removeItem("debug"):b.debug=c}catch(e){}};f.load=m;f.useColors=function(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)};var b;if("undefined"!==typeof chrome&&"undefined"!==typeof chrome.storage)b=chrome.storage.local;else a:{try{b=window.localStorage;break a}catch(c){}b=void 0}f.colors="lightseagreen forestgreen goldenrod dodgerblue darkorchid crimson".split(" ");
f.formatters.j=function(c){return JSON.stringify(c)};f.enable(m())},{6:6}],6:[function(g,n,f){f=n.exports=function(c){function h(){}function e(){var c=+new Date;e.diff=c-(b||c);e.prev=b;b=e.curr=c;null==e.useColors&&(e.useColors=f.useColors());null==e.color&&e.useColors&&(e.color=f.colors[m++%f.colors.length]);var h=Array.prototype.slice.call(arguments);h[0]=f.coerce(h[0]);"string"!==typeof h[0]&&(h=["%o"].concat(h));var g=0;h[0]=h[0].replace(/%([a-z%])/g,function(c,a){if("%%"===c)return c;g++;var d=
f.formatters[a];"function"===typeof d&&(c=d.call(e,h[g]),h.splice(g,1),g--);return c});"function"===typeof f.formatArgs&&(h=f.formatArgs.apply(e,h));(e.log||f.log||console.log.bind(console)).apply(e,h)}h.enabled=!1;e.enabled=!0;var g=f.enabled(c)?e:h;g.namespace=c;return g};f.coerce=function(c){return c instanceof Error?c.stack||c.message:c};f.disable=function(){f.enable("")};f.enable=function(c){f.save(c);for(var b=(c||"").split(/[\s,]+/),e=b.length,g=0;g<e;g++)b[g]&&(c=b[g].replace(/\*/g,".*?"),
"-"===c[0]?f.skips.push(new RegExp("^"+c.substr(1)+"$")):f.names.push(new RegExp("^"+c+"$")))};f.enabled=function(c){var b,e;b=0;for(e=f.skips.length;b<e;b++)if(f.skips[b].test(c))return!1;b=0;for(e=f.names.length;b<e;b++)if(f.names[b].test(c))return!0;return!1};f.humanize=g(7);f.names=[];f.skips=[];f.formatters={};var m=0,b},{7:7}],7:[function(g,n,f){function m(c){if(c=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(c)){var b=
parseFloat(c[1]);switch((c[2]||"ms").toLowerCase()){case "years":case "year":case "yrs":case "yr":case "y":return 315576E5*b;case "days":case "day":case "d":return 864E5*b;case "hours":case "hour":case "hrs":case "hr":case "h":return 36E5*b;case "minutes":case "minute":case "mins":case "min":case "m":return 6E4*b;case "seconds":case "second":case "secs":case "sec":case "s":return 1E3*b;case "milliseconds":case "millisecond":case "msecs":case "msec":case "ms":return b}}}function b(c,b,e){if(!(c<b))return c<
1.5*b?Math.floor(c/b)+" "+e:Math.ceil(c/b)+" "+e+"s"}n.exports=function(c,f){f=f||{};return"string"==typeof c?m(c):f.long?b(c,864E5,"day")||b(c,36E5,"hour")||b(c,6E4,"minute")||b(c,1E3,"second")||c+" ms":864E5<=c?Math.round(c/864E5)+"d":36E5<=c?Math.round(c/36E5)+"h":6E4<=c?Math.round(c/6E4)+"m":1E3<=c?Math.round(c/1E3)+"s":c+"ms"}},{}],8:[function(g,n,f){(function(f,b){(function(){function c(a){return"function"===typeof a}function g(){return function(){f.nextTick(q)}}function e(){var a=0,d=new I(q),
k=document.createTextNode("");d.observe(k,{characterData:!0});return function(){k.data=a=++a%2}}function p(){var a=new MessageChannel;a.port1.onmessage=q;return function(){a.port2.postMessage(0)}}function l(){return function(){setTimeout(q,1)}}function q(){for(var a=0;a<z;a+=2)(0,A[a])(A[a+1]),A[a]=void 0,A[a+1]=void 0;z=0}function u(){}function r(a,d,k,c){try{a.call(d,k,c)}catch(b){return b}}function a(a,d,c){B(function(a){var b=!1,e=r(c,d,function(c){b||(b=!0,d!==c?k(a,c):w(a,c))},function(d){b||
(b=!0,v(a,d))},"Settle: "+(a._label||" unknown promise"));!b&&e&&(b=!0,v(a,e))},a)}function d(a,d){1===d._state?w(a,d._result):2===a._state?v(a,d._result):C(d,void 0,function(d){k(a,d)},function(d){v(a,d)})}function k(k,b){if(k===b)v(k,new TypeError("You cannot resolve a promise with itself"));else if("function"===typeof b||"object"===typeof b&&null!==b)if(b.constructor===k.constructor)d(k,b);else{var e;try{e=b.then}catch(t){D.error=t,e=D}e===D?v(k,D.error):void 0===e?w(k,b):c(e)?a(k,b,e):w(k,b)}else w(k,
b)}function t(a){a._onerror&&a._onerror(a._result);F(a)}function w(a,d){void 0===a._state&&(a._result=d,a._state=1,0!==a._subscribers.length&&B(F,a))}function v(a,d){void 0===a._state&&(a._state=2,a._result=d,B(t,a))}function C(a,d,k,b){var c=a._subscribers,e=c.length;a._onerror=null;c[e]=d;c[e+1]=k;c[e+2]=b;0===e&&a._state&&B(F,a)}function F(a){var d=a._subscribers,k=a._state;if(0!==d.length){for(var c,b,e=a._result,t=0;t<d.length;t+=3)c=d[t],b=d[t+k],c?J(k,c,b,e):b(e);a._subscribers.length=0}}function K(){this.error=
null}function J(a,d,b,e){var t=c(b),f,g,h,m;if(t){try{f=b(e)}catch(l){G.error=l,f=G}f===G?(m=!0,g=f.error,f=null):h=!0;if(d===f){v(d,new TypeError("A promises callback cannot return that same promise."));return}}else f=e,h=!0;void 0===d._state&&(t&&h?k(d,f):m?v(d,g):1===a?w(d,f):2===a&&v(d,f))}function N(a,d){try{d(function(d){k(a,d)},function(d){v(a,d)})}catch(b){v(a,b)}}function y(a,d,k,b){this._instanceConstructor=a;this.promise=new a(u,b);this._abortOnReject=k;this._validateInput(d)?(this._input=
d,this._remaining=this.length=d.length,this._init(),0===this.length?w(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&w(this.promise,this._result))):v(this.promise,this._validationError())}function x(a){this._id=O++;this._result=this._state=void 0;this._subscribers=[];if(u!==a){if(!c(a))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof x))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
N(this,a)}}var L=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)},z=0,B=function(a,d){A[z]=a;A[z+1]=d;z+=2;2===z&&M()},E="undefined"!==typeof window?window:{},I=E.MutationObserver||E.WebKitMutationObserver,E="undefined"!==typeof Uint8ClampedArray&&"undefined"!==typeof importScripts&&"undefined"!==typeof MessageChannel,A=Array(1E3),M;M="undefined"!==typeof f&&"[object process]"==={}.toString.call(f)?g():I?e():E?p():l();var D=new K,G=new K;y.prototype._validateInput=
function(a){return L(a)};y.prototype._validationError=function(){return Error("Array Methods must be provided an Array")};y.prototype._init=function(){this._result=Array(this.length)};y.prototype._enumerate=function(){for(var a=this.length,d=this.promise,k=this._input,b=0;void 0===d._state&&b<a;b++)this._eachEntry(k[b],b)};y.prototype._eachEntry=function(a,d){var k=this._instanceConstructor;"object"===typeof a&&null!==a?a.constructor===k&&void 0!==a._state?(a._onerror=null,this._settledAt(a._state,
d,a._result)):this._willSettleAt(k.resolve(a),d):(this._remaining--,this._result[d]=this._makeResult(1,d,a))};y.prototype._settledAt=function(a,d,k){var b=this.promise;void 0===b._state&&(this._remaining--,this._abortOnReject&&2===a?v(b,k):this._result[d]=this._makeResult(a,d,k));0===this._remaining&&w(b,this._result)};y.prototype._makeResult=function(a,d,k){return k};y.prototype._willSettleAt=function(a,d){var k=this;C(a,void 0,function(a){k._settledAt(1,d,a)},function(a){k._settledAt(2,d,a)})};
var O=0;x.all=function(a,d){return(new y(this,a,!0,d)).promise};x.race=function(a,d){function b(a){k(e,a)}function c(a){v(e,a)}var e=new this(u,d);if(!L(a))return v(e,new TypeError("You must pass an array to race.")),e;for(var t=a.length,f=0;void 0===e._state&&f<t;f++)C(this.resolve(a[f]),void 0,b,c);return e};x.resolve=function(a,d){if(a&&"object"===typeof a&&a.constructor===this)return a;var b=new this(u,d);k(b,a);return b};x.reject=function(a,d){var k=new this(u,d);v(k,a);return k};x.prototype=
{constructor:x,then:function(a,d){var k=this._state;if(1===k&&!a||2===k&&!d)return this;var b=new this.constructor(u),c=this._result;if(k){var e=arguments[k-1];B(function(){J(k,b,e,c)})}else C(this,b,a,d);return b},"catch":function(a){return this.then(null,a)}};var H={Promise:x,polyfill:function(){var a;a="undefined"!==typeof b?b:"undefined"!==typeof window&&window.document?window:self;"Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var d;
new a.Promise(function(a){d=a});return c(d)}()||(a.Promise=x)}};"function"===typeof define&&define.amd?define(function(){return H}):"undefined"!==typeof n&&n.exports?n.exports=H:"undefined"!==typeof this&&(this.ES6Promise=H)}).call(this)}).call(this,g(1),"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{1:1}],9:[function(g,n,f){var m=Object.prototype.hasOwnProperty,b=Object.prototype.toString,c=function(c){return"function"===typeof Array.isArray?
Array.isArray(c):"[object Array]"===b.call(c)},h=function(c){if(!c||"[object Object]"!==b.call(c))return!1;var f=m.call(c,"constructor"),g=c.constructor&&c.constructor.prototype&&m.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!f&&!g)return!1;for(var h in c);return void 0===h||m.call(c,h)};n.exports=function p(){var b,f,g,m,a,d=arguments[0],k=1,t=arguments.length,w=!1;if("boolean"===typeof d)w=d,d=arguments[1]||{},k=2;else if("object"!==typeof d&&"function"!==typeof d||null==d)d=
{};for(;k<t;++k)if(b=arguments[k],null!=b)for(f in b)g=d[f],m=b[f],d!==m&&(w&&m&&(h(m)||(a=c(m)))?(a?(a=!1,g=g&&c(g)?g:[]):g=g&&h(g)?g:{},d[f]=p(w,g,m)):void 0!==m&&(d[f]=m));return d}},{}],10:[function(g,n,f){var m=Object.prototype.hasOwnProperty,b=Object.prototype.toString;n.exports=function(c,f,e){if("[object Function]"!==b.call(f))throw new TypeError("iterator must be a function");var g=c.length;if(g===+g)for(var l=0;l<g;l++)f.call(e,c[l],l,c);else for(l in c)m.call(c,l)&&f.call(e,c[l],l,c)}},
{}],11:[function(g,n,f){n.exports="function"===typeof Object.create?function(f,b){f.super_=b;f.prototype=Object.create(b.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}})}:function(f,b){f.super_=b;var c=function(){};c.prototype=b.prototype;f.prototype=new c;f.prototype.constructor=f}},{}],12:[function(g,n,f){function m(a,d,k){var e=g(9);if(!a)throw new r.AlgoliaSearchError("Please provide an application ID. Usage: algoliasearch(applicationID, apiKey, opts)");if(!d)throw new r.AlgoliaSearchError("Please provide an API key. Usage: algoliasearch(applicationID, apiKey, opts)");
this.applicationID=a;this.apiKey=d;a=[this.applicationID+"-1.algolianet.com",this.applicationID+"-2.algolianet.com",this.applicationID+"-3.algolianet.com"];this.hosts={read:[],write:[]};this.hostIndex={read:0,write:0};k=k||{};d=k.protocol||"https:";var f=void 0===k.timeout?2E3:k.timeout;/:$/.test(d)||(d+=":");if("http:"!==k.protocol&&"https:"!==k.protocol)throw new r.AlgoliaSearchError("protocol must be `http:` or `https:` (was `"+k.protocol+"`)");k.hosts?(this.hosts.read=e([],k.hosts),this.hosts.write=
e([],k.hosts)):(this.hosts.read=[this.applicationID+"-dsn.algolia.net"].concat(a),this.hosts.write=[this.applicationID+".algolia.net"].concat(a));this.hosts.read=b(this.hosts.read,c(d));this.hosts.write=b(this.hosts.write,c(d));this.requestTimeout=f;this.extraHeaders=[];this.cache={};this._ua=k._ua;this._useCache=void 0===k._useCache?!0:k._useCache;this._setTimeout=k._setTimeout;q("init done, %j",this)}function b(a,d){for(var k=[],b=0;b<a.length;++b)k.push(d(a[b],b));return k}function c(a){return function(d){return a+
"//"+d.toLowerCase()}}function h(){throw new r.AlgoliaSearchError("Not implemented in this environment.\nIf you feel this is a mistake, write to support@algolia.com");}function e(a,d){var k=a.toLowerCase().replace(".","").replace("()","");return"algoliasearch: `"+a+"` was replaced by `"+d+"`. Please see https://github.com/algolia/algoliasearch-client-js/wiki/Deprecated#"+k}function p(a,d){d(a,0)}function l(a,d){var k=!1;return function(){k||(console.log(d),k=!0);return a.apply(this,arguments)}}n.exports=
m;var q=g(5)("algoliasearch"),u=g(10),r=g(18);m.prototype={deleteIndex:function(a,d){return this._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(a),hostType:"write",callback:d})},moveIndex:function(a,d,k){d={operation:"move",destination:d};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(a)+"/operation",body:d,hostType:"write",callback:k})},copyIndex:function(a,d,k){d={operation:"copy",destination:d};return this._jsonRequest({method:"POST",url:"/1/indexes/"+
encodeURIComponent(a)+"/operation",body:d,hostType:"write",callback:k})},getLogs:function(a,d,k){if(0===arguments.length||"function"===typeof a)k=a,a=0,d=10;else if(1===arguments.length||"function"===typeof d)k=d,d=10;return this._jsonRequest({method:"GET",url:"/1/logs?offset="+a+"&length="+d,hostType:"read",callback:k})},listIndexes:function(a,d){var k="";void 0===a||"function"===typeof a?d=a:k="?page="+a;return this._jsonRequest({method:"GET",url:"/1/indexes"+k,hostType:"read",callback:d})},initIndex:function(a){return new this.Index(this,
a)},listUserKeys:function(a){return this._jsonRequest({method:"GET",url:"/1/keys",hostType:"read",callback:a})},getUserKeyACL:function(a,d){return this._jsonRequest({method:"GET",url:"/1/keys/"+a,hostType:"read",callback:d})},deleteUserKey:function(a,d){return this._jsonRequest({method:"DELETE",url:"/1/keys/"+a,hostType:"write",callback:d})},addUserKey:function(a,d,k){if(1===arguments.length||"function"===typeof d)k=d,d=null;var b={acl:a};d&&(b.validity=d.validity,b.maxQueriesPerIPPerHour=d.maxQueriesPerIPPerHour,
b.maxHitsPerQuery=d.maxHitsPerQuery,b.indexes=d.indexes,b.description=d.description,d.queryParameters&&(b.queryParameters=this._getSearchParams(d.queryParameters,"")),b.referers=d.referers);return this._jsonRequest({method:"POST",url:"/1/keys",body:b,hostType:"write",callback:k})},addUserKeyWithValidity:l(function(a,d,b){return this.addUserKey(a,d,b)},e("client.addUserKeyWithValidity()","client.addUserKey()")),updateUserKey:function(a,d,b,c){if(2===arguments.length||"function"===typeof b)c=b,b=null;
var e={acl:d};b&&(e.validity=b.validity,e.maxQueriesPerIPPerHour=b.maxQueriesPerIPPerHour,e.maxHitsPerQuery=b.maxHitsPerQuery,e.indexes=b.indexes,e.description=b.description,b.queryParameters&&(e.queryParameters=this._getSearchParams(b.queryParameters,"")),e.referers=b.referers);return this._jsonRequest({method:"PUT",url:"/1/keys/"+a,body:e,hostType:"write",callback:c})},setSecurityTags:function(a){if("[object Array]"===Object.prototype.toString.call(a)){for(var d=[],b=0;b<a.length;++b)if("[object Array]"===
Object.prototype.toString.call(a[b])){for(var c=[],e=0;e<a[b].length;++e)c.push(a[b][e]);d.push("("+c.join(",")+")")}else d.push(a[b]);a=d.join(",")}this.securityTags=a},setUserToken:function(a){this.userToken=a},startQueriesBatch:l(function(){this._batch=[]},e("client.startQueriesBatch()","client.search()")),addQueryInBatch:l(function(a,d,b){this._batch.push({indexName:a,query:d,params:b})},e("client.addQueryInBatch()","client.search()")),clearCache:function(){this.cache={}},sendQueriesBatch:l(function(a){return this.search(this._batch,
a)},e("client.sendQueriesBatch()","client.search()")),setRequestTimeout:function(a){a&&(this.requestTimeout=parseInt(a,10))},search:function(a,d){var c=this,e={requests:b(a,function(a){var d="";void 0!==a.query&&(d+="query="+encodeURIComponent(a.query));return{indexName:a.indexName,params:c._getSearchParams(a.params,d)}})};return this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",body:e,hostType:"read",callback:d})},batch:function(a,d){return this._jsonRequest({method:"POST",
url:"/1/indexes/*/batch",body:{requests:a},hostType:"write",callback:d})},destroy:h,enableRateLimitForward:h,disableRateLimitForward:h,useSecuredAPIKey:h,disableSecuredAPIKey:h,generateSecuredApiKey:h,Index:function(a,d){this.indexName=d;this.as=a;this.typeAheadValueOption=this.typeAheadArgs=null;this.cache={}},setExtraHeader:function(a,d){this.extraHeaders.push({name:a.toLowerCase(),value:d})},_sendQueriesBatch:function(a,d){return this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",
body:a,hostType:"read",fallback:{method:"GET",url:"/1/indexes/*",body:{params:function(){for(var d="",b=0;b<a.requests.length;++b)var c="/1/indexes/"+encodeURIComponent(a.requests[b].indexName)+"?"+a.requests[b].params,d=d+(b+"="+encodeURIComponent(c)+"&");return d}()}},callback:d})},_jsonRequest:function(a){function d(g,l){function n(){f.hostIndex[a.hostType]=++f.hostIndex[a.hostType]%f.hosts[a.hostType].length;h+=1;l.timeout=f.requestTimeout*(h+1);return d(g,l)}var p;f._useCache&&(p=a.url);f._useCache&&
c&&(p+="_body_"+l.body);if(f._useCache&&e&&void 0!==e[p])return b("serving response from cache"),f._promise.resolve(JSON.parse(JSON.stringify(e[p])));if(h>=f.hosts[a.hostType].length){if(!a.fallback||!f._request.fallback||m)return f._promise.reject(new r.AlgoliaSearchError("Cannot connect to the AlgoliaSearch API. Send an email to support@algolia.com to report and resolve the issue."));h=0;l.method=a.fallback.method;l.url=a.fallback.url;l.jsonBody=a.fallback.body;l.jsonBody&&(l.body=JSON.stringify(a.fallback.body));
l.timeout=f.requestTimeout*(h+1);f.hostIndex[a.hostType]=0;m=f.useFallback=!0;return d(f._request.fallback,l)}return g.call(f,f.hosts[a.hostType][f.hostIndex[a.hostType]]+l.url,{body:c,jsonBody:a.body,method:l.method,headers:f._computeRequestHeaders(),timeout:l.timeout,debug:b}).then(function(a){b("received response: %j",a);var d=a&&a.body&&a.body.message&&a.body.status||a.statusCode||a&&a.body&&200,c=200===d||201===d,d=!c&&4!==Math.floor(d/100)&&1!==Math.floor(d/100);f._useCache&&c&&e&&(e[p]=a.body);
if(c)return a.body;if(d)return n();a=new r.AlgoliaSearchError(a.body&&a.body.message);return f._promise.reject(a)},function(c){b("error: %s, stack: %s",c.message,c.stack);if(c instanceof r.RequestTimeout)return b("timedout"),n();c instanceof r.AlgoliaSearchError||(c=new r.Unknown(c&&c.message,c));if(c instanceof r.Unknown||c instanceof r.UnparsableJSON||!g.fallback&&c instanceof r.Network)return f._promise.reject(c);f.useFallback?(f.hostIndex[a.hostType]=++f.hostIndex[a.hostType]%f.hosts[a.hostType].length,
h+=1):h=f.hosts[a.hostType].length;return d(g,l)})}var b=g(5)("algoliasearch:"+a.url),c,e=a.cache,f=this,h=0,m=!1;void 0!==a.body&&(c=JSON.stringify(a.body));b("request start");var l=f.useFallback&&a.fallback,n=l?a.fallback:a,l=d(l?f._request.fallback:f._request,{url:n.url,method:n.method,body:c,jsonBody:a.body,timeout:f.requestTimeout*(h+1)});if(a.callback)l.then(function(d){p(function(){a.callback(null,d)},f._setTimeout||setTimeout)},function(d){p(function(){a.callback(d)},f._setTimeout||setTimeout)});
else return l},_getSearchParams:function(a,d){if(this._isUndefined(a)||null===a)return d;for(var b in a)null!==b&&a.hasOwnProperty(b)&&(d+=""===d?"":"&",d+=b+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(a[b])?JSON.stringify(a[b]):a[b]));return d},_isUndefined:function(a){return void 0===a},_computeRequestHeaders:function(){var a={"x-algolia-api-key":this.apiKey,"x-algolia-application-id":this.applicationID,"x-algolia-agent":this._ua};this.userToken&&(a["x-algolia-usertoken"]=
this.userToken);this.securityTags&&(a["x-algolia-tagfilters"]=this.securityTags);this.extraHeaders&&u(this.extraHeaders,function(d){a[d.name]=d.value});return a}};m.prototype.Index.prototype={clearCache:function(){this.cache={}},addObject:function(a,d,b){if(1===arguments.length||"function"===typeof d)b=d,d=void 0;return this.as._jsonRequest({method:void 0!==d?"PUT":"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+(void 0!==d?"/"+encodeURIComponent(d):""),body:a,hostType:"write",callback:b})},
addObjects:function(a,d){for(var b={requests:[]},c=0;c<a.length;++c)b.requests.push({action:"addObject",body:a[c]});return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:b,hostType:"write",callback:d})},getObject:function(a,d,b){if(1===arguments.length||"function"===typeof d)b=d,d=void 0;var c="";if(void 0!==d)for(var c="?attributes=",e=0;e<d.length;++e)0!==e&&(c+=","),c+=d[e];return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+
"/"+encodeURIComponent(a)+c,hostType:"read",callback:b})},getObjects:function(a,d,c){var e=this;if(1===arguments.length||"function"===typeof d)c=d,d=void 0;var f={requests:b(a,function(a){a={indexName:e.indexName,objectID:a};d&&(a.attributesToRetrieve=d.join(","));return a})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/*/objects",hostType:"read",body:f,callback:c})},partialUpdateObject:function(a,d){return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+
"/"+encodeURIComponent(a.objectID)+"/partial",body:a,hostType:"write",callback:d})},partialUpdateObjects:function(a,d){for(var b={requests:[]},c=0;c<a.length;++c)b.requests.push({action:"partialUpdateObject",objectID:a[c].objectID,body:a[c]});return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:b,hostType:"write",callback:d})},saveObject:function(a,d){return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+
"/"+encodeURIComponent(a.objectID),body:a,hostType:"write",callback:d})},saveObjects:function(a,d){for(var b={requests:[]},c=0;c<a.length;++c)b.requests.push({action:"updateObject",objectID:a[c].objectID,body:a[c]});return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:b,hostType:"write",callback:d})},deleteObject:function(a,d){if("function"===typeof a||"string"!==typeof a&&"number"!==typeof a){var b=new r.AlgoliaSearchError("Cannot delete an object without an objectID");
d=a;return"function"===typeof d?d(b):this.as._promise.reject(b)}return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(a),hostType:"write",callback:d})},deleteObjects:function(a,d){var c={requests:b(a,function(a){return{action:"deleteObject",objectID:a,body:{objectID:a}}})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:c,hostType:"write",callback:d})},deleteByQuery:function(a,
d,c){function e(a){return g.waitTask(a.taskID)}function f(){return g.deleteByQuery(a,d)}var g=this,h=g.as;if(1===arguments.length||"function"===typeof d)c=d,d={};d.attributesToRetrieve="objectID";d.hitsPerPage=1E3;this.clearCache();var l=this.search(a,d).then(function(a){if(0===a.nbHits)return a;a=b(a.hits,function(a){return a.objectID});return g.deleteObjects(a).then(e).then(f)});if(!c)return l;l.then(function(){p(function(){c(null)},h._setTimeout||setTimeout)},function(a){p(function(){c(a)},h._setTimeout||
setTimeout)})},search:function(a,d,b){if("function"===typeof a&&"object"===typeof d||"object"===typeof b)throw new r.AlgoliaSearchError("index.search usage is index.search(query, params, cb)");if(0===arguments.length||"function"===typeof a)b=a,a="";else if(1===arguments.length||"function"===typeof d)b=d,d=void 0;if("object"===typeof a&&null!==a)d=a,a=void 0;else if(void 0===a||null===a)a="";var c="";void 0!==a&&(c+="query="+encodeURIComponent(a));void 0!==d&&(c=this.as._getSearchParams(d,c));return this._search(c,
b)},browse:function(a,d,b){if(1===arguments.length||"function"===typeof d)b=d,d=void 0;var c="?page="+a;this.as._isUndefined(d)||(c+="&hitsPerPage="+d);return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse"+c,hostType:"read",callback:b})},ttAdapter:function(a){var d=this;return function(b,c){d.search(b,a,function(a,d){a?c(a):c(d.hits)})}},waitTask:function(a,d){var b=this,c=b.as,e=this.as._jsonRequest({method:"GET",hostType:"read",url:"/1/indexes/"+
encodeURIComponent(b.indexName)+"/task/"+a}).then(function(d){return"published"!==d.status?b.as._promise.delay(100).then(function(){return b.waitTask(a)}):d});if(!d)return e;e.then(function(a){p(function(){d(null,a)},c._setTimeout||setTimeout)},function(a){p(function(){d(a)},c._setTimeout||setTimeout)})},clearIndex:function(a){return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/clear",hostType:"write",callback:a})},getSettings:function(a){return this.as._jsonRequest({method:"GET",
url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/settings",hostType:"read",callback:a})},setSettings:function(a,d){return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/settings",hostType:"write",body:a,callback:d})},listUserKeys:function(a){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",hostType:"read",callback:a})},getUserKeyACL:function(a,d){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+
encodeURIComponent(this.indexName)+"/keys/"+a,hostType:"read",callback:d})},deleteUserKey:function(a,d){return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+a,hostType:"write",callback:d})},addUserKey:function(a,d,b){if(1===arguments.length||"function"===typeof d)b=d,d=null;var c={acl:a};d&&(c.validity=d.validity,c.maxQueriesPerIPPerHour=d.maxQueriesPerIPPerHour,c.maxHitsPerQuery=d.maxHitsPerQuery,c.description=d.description,d.queryParameters&&
(c.queryParameters=this.as._getSearchParams(d.queryParameters,"")),c.referers=d.referers);return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",body:c,hostType:"write",callback:b})},addUserKeyWithValidity:l(function(a,b,c){return this.addUserKey(a,b,c)},e("index.addUserKeyWithValidity()","index.addUserKey()")),updateUserKey:function(a,b,c,e){if(2===arguments.length||"function"===typeof c)e=c,c=null;var f={acl:b};c&&(f.validity=c.validity,f.maxQueriesPerIPPerHour=
c.maxQueriesPerIPPerHour,f.maxHitsPerQuery=c.maxHitsPerQuery,f.description=c.description,c.queryParameters&&(f.queryParameters=this.as._getSearchParams(c.queryParameters,"")),f.referers=c.referers);return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+a,body:f,hostType:"write",callback:e})},_search:function(a,b){return this.as._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params:a},
hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params:a}},callback:b})},as:null,indexName:null,typeAheadArgs:null,typeAheadValueOption:null}},{10:10,18:18,5:5,9:9}],13:[function(g,n,f){n.exports=function(b,c,f){function e(){c.debug("JSONP: success");w||a||(w=!0,r||(c.debug("JSONP: Fail. Script loaded but did not call the callback"),l(),f(Error("Failed to load JSONP script"))))}function g(){"loaded"!==this.readyState&&"complete"!==this.readyState||
e()}function l(){clearTimeout(v);k.onload=null;k.onreadystatechange=null;k.onerror=null;d.removeChild(k);try{delete window[t],delete window[t+"_loaded"]}catch(a){window[t]=null,window[t+"_loaded"]=null}}function n(){c.debug("JSONP: Script timeout");a=!0;l();f(Error("Timeout - Could not connect to endpoint "+b))}function u(){c.debug("JSONP: Script error");w||a||(l(),f(Error("Failed to load JSONP script")))}if("GET"!==c.method)f(Error("Method "+c.method+" "+b+" is not supported by JSONP."));else{c.debug("JSONP: start");
var r=!1,a=!1;m+=1;var d=document.getElementsByTagName("head")[0],k=document.createElement("script"),t="algoliaJSONP_"+m,w=!1;window[t]=function(b){try{delete window[t]}catch(c){window[t]=void 0}a||(r=!0,l(),f(null,{body:b}))};b+="&callback="+t;c.jsonBody&&c.jsonBody.params&&(b+="&"+c.jsonBody.params);var v=setTimeout(n,c.timeout);k.onreadystatechange=g;k.onload=e;k.onerror=u;k.async=!0;k.defer=!0;k.src=b;d.appendChild(k)}};var m=0},{}],14:[function(g,n,f){(function(f){function b(e,a,d){var f=g(9),
h=g(16);d=f(!0,{},d)||{};void 0===d.protocol&&(d.protocol=h());d._ua=b.ua;return new c(e,a,d)}function c(){e.apply(this,arguments)}var h=g(11),e=g(12),n=g(18),l=g(17),q=g(13);window.algoliasearch=g(15);b.version=g(19);b.ua="Algolia for jQuery "+b.version;var u=f.jQuery;u.algolia={Client:b,ua:b.ua,version:b.version};h(c,e);c.prototype._request=function(b,a){return u.Deferred(function(c){var e=a.body;b=l(b,a.headers);u.ajax(b,{type:a.method,timeout:a.timeout,dataType:"json",data:e,complete:function(a,
b){"timeout"===b?c.reject(new n.RequestTimeout):0===a.status?c.reject(new n.Network({more:a})):c.resolve({statusCode:a.status,body:a.responseJSON})}})}).promise()};c.prototype._request.fallback=function(b,a){b=l(b,a.headers);return u.Deferred(function(c){q(b,a,function(a,b){a?c.reject(new n.JSONP(a.message)):c.resolve(b)})}).promise()};c.prototype._promise={reject:function(b){return u.Deferred(function(a){a.reject(b)}).promise()},resolve:function(b){return u.Deferred(function(a){a.resolve(b)}).promise()},
delay:function(b){return u.Deferred(function(a){setTimeout(function(){a.resolve()},b)}).promise()}}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{11:11,12:12,13:13,15:15,16:16,17:17,18:18,19:19,9:9}],15:[function(g,n,f){(function(f){function b(a,d,e){var f=g(9),h=g(16);e=f(!0,{},e)||{};void 0===e.protocol&&(e.protocol=h());e._ua=b.ua;return new c(a,d,e)}function c(){p.apply(this,arguments)}n.exports=b;var h=g(11),e=f.Promise||
g(8).Promise,p=g(12),l=g(18),q=g(17),u=g(13);b.version=g(19);b.ua="Algolia for vanilla JavaScript "+b.version;var r="XDomainRequest"in window,a="withCredentials"in new XMLHttpRequest,d="timeout"in new XMLHttpRequest;h(c,p);c.prototype._request=function(b,c){return new e(function(e,f){function g(){if(!x){d||clearTimeout(u);var a;try{a={body:JSON.parse(p.responseText),statusCode:p.status}}catch(b){a=new l.UnparsableJSON({more:p.responseText})}a instanceof l.UnparsableJSON?f(a):e(a)}}function h(a){x||
(d||clearTimeout(u),f(new l.Network({more:a})))}function m(){d||(x=!0,p.abort());f(new l.RequestTimeout)}if(a||r){b=q(b,c.headers);var n=c.body,p=a?new XMLHttpRequest:new XDomainRequest,u,x;p instanceof XMLHttpRequest?p.open(c.method,b,!0):p.open(c.method,b);a&&n&&"GET"!==c.method&&p.setRequestHeader("content-type","application/x-www-form-urlencoded");p.onprogress=function(){};p.onload=g;p.onerror=h;d?(p.timeout=c.timeout,p.ontimeout=m):u=setTimeout(m,c.timeout);p.send(n)}else f(new l.Network("CORS not supported"))})};
c.prototype._request.fallback=function(a,b){a=q(a,b.headers);return new e(function(c,d){u(a,b,function(a,b){a?d(new l.JSONP(a.message)):c(b)})})};c.prototype._promise={reject:function(a){return e.reject(a)},resolve:function(a){return e.resolve(a)},delay:function(a){return new e(function(b){setTimeout(b,a)})}}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{11:11,12:12,13:13,16:16,17:17,18:18,19:19,8:8,9:9}],16:[function(g,n,f){(function(f){n.exports=
function(){var b=f.document.location.protocol;"http:"!==b&&"https:"!==b&&(b="http:");return b}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],17:[function(g,n,f){n.exports=function(b,c){b=/\?/.test(b)?b+"&":b+"?";return b+m.encode(c)};var m=g(4)},{4:4}],18:[function(g,n,f){function m(b,f){var g=this;"function"===typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):g.stack=Error().stack||"Cannot get a stacktrace, browser is too old";
this.name=this.constructor.name;this.message=b||"Unknown error";f&&c(f,function(b,c){g[c]=b})}function b(b,c){function f(){var g=Array.prototype.slice.call(arguments,0);"string"!==typeof g[0]&&g.unshift(c);m.apply(this,g);this.name="AlgoliaSearch"+b+"Error"}h(f,m);return f}var c=g(10),h=g(11);h(m,Error);n.exports={AlgoliaSearchError:m,UnparsableJSON:b("UnparsableJSON","Could not parse the incoming response as JSON, see err.more for details"),RequestTimeout:b("RequestTimeout","Request timedout before getting a response"),
Network:b("Network","Network issue, see err.more for details"),JSONP:b("JSONP","JSONP failed"),Unknown:b("Unknown","Unknown error occured")}},{10:10,11:11}],19:[function(g,n,f){n.exports="3.4.0"},{}]},{},[14]);

@@ -1,72 +0,76 @@

/*! algoliasearch 3.3.2 | © 2014, 2015 Algolia SAS | github.com/algolia/algoliasearch-client-js */
(function(C){var c;"undefined"!==typeof window?c=window:"undefined"!==typeof self&&(c=self);c.ALGOLIA_MIGRATION_LAYER=C()})(function(){return function c(h,e,m){function g(d,k){if(!e[d]){if(!h[d]){var p="function"==typeof require&&require;if(!k&&p)return p(d,!0);if(b)return b(d,!0);p=Error("Cannot find module '"+d+"'");throw p.code="MODULE_NOT_FOUND",p;}p=e[d]={exports:{}};h[d][0].call(p.exports,function(b){var k=h[d][1][b];return g(k?k:b)},p,p.exports,c,h,e,m)}return e[d].exports}for(var b="function"==
typeof require&&require,k=0;k<m.length;k++)g(m[k]);return g}({1:[function(c,h,e){function m(b,d){for(var g in d)b.setAttribute(g,d[g])}function g(b,d){b.onload=function(){this.onerror=this.onload=null;d(null,b)};b.onerror=function(){this.onerror=this.onload=null;d(Error("Failed to load "+this.src),b)}}function b(b,d){b.onreadystatechange=function(){if("complete"==this.readyState||"loaded"==this.readyState)this.onreadystatechange=null,d(null,b)}}h.exports=function(k,d,c){var p=document.head||document.getElementsByTagName("head")[0],
e=document.createElement("script");"function"===typeof d&&(c=d,d={});d=d||{};c=c||function(){};e.type=d.type||"text/javascript";e.charset=d.charset||"utf8";e.async="async"in d?!!d.async:!0;e.src=k;d.attrs&&m(e,d.attrs);d.text&&(e.text=""+d.text);("onload"in e?g:b)(e,c);e.onload||g(e,c);p.appendChild(e)}},{}],2:[function(c,h,e){h.exports=function(e){e=new RegExp("cdn\\.jsdelivr\\.net/algoliasearch/latest/"+e.replace(".","\\.")+"(?:\\.min)?\\.js$");for(var g=document.getElementsByTagName("script"),
b=!1,k=0,d=g.length;k<d;k++)if(g[k].src&&e.test(g[k].src)){b=!0;break}return b}},{}],3:[function(c,h,e){(function(e){function g(b){return function(){var k="AlgoliaSearch: loaded V2 script using "+b;e.console&&e.console.log&&e.console.log(k)}}h.exports=function(b){var k=c(1);b="//cdn.jsdelivr.net/algoliasearch/2/"+b+".min.js";e.console&&(e.console.warn?e.console.warn("-- AlgoliaSearch `latest` warning --\nWarning, you are using the `latest` version string from jsDelivr to load the AlgoliaSearch library.\nUsing `latest` is no more recommended, you should load //cdn.jsdelivr.net/algoliasearch/2/algoliasearch.min.js\n\nAlso, we updated the AlgoliaSearch JavaScript client to V3. If you want to upgrade,\nplease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch `latest` warning --"):
e.console.log&&e.console.log("-- AlgoliaSearch `latest` warning --\nWarning, you are using the `latest` version string from jsDelivr to load the AlgoliaSearch library.\nUsing `latest` is no more recommended, you should load //cdn.jsdelivr.net/algoliasearch/2/algoliasearch.min.js\n\nAlso, we updated the AlgoliaSearch JavaScript client to V3. If you want to upgrade,\nplease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch `latest` warning --"));
try{document.write("<script>window.ALGOLIA_SUPPORTS_DOCWRITE = true\x3c/script>"),!0===e.ALGOLIA_SUPPORTS_DOCWRITE?(document.write('<script src="'+b+'">\x3c/script>'),g("document.write")()):k(b,g("DOMElement"))}catch(d){k(b,g("DOMElement"))}}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{1:1}],4:[function(c,h,e){(function(e){h.exports=function(){e.AlgoliaSearch=function(){throw Error("-- AlgoliaSearch V2 => V3 error --\nYou are trying to use a new version of the AlgoliaSearch JavaScript client with an old notation.\nPlease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch V2 => V3 error --");
};e.AlgoliaSearchHelper=function(){throw Error("-- AlgoliaSearch V2 => V3 error --\nYou are trying to use a new version of the AlgoliaSearch JavaScript client with an old notation.\nPlease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch V2 => V3 error --");};AlgoliaExplainResults=function(){throw Error("-- AlgoliaSearch V2 => V3 error --\nYou are trying to use a new version of the AlgoliaSearch JavaScript client with an old notation.\nPlease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch V2 => V3 error --");
}}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],5:[function(c,h,e){h=c(2);e=c(3);c=c(4);h("algoliasearch")?e("algoliasearch"):c()},{2:2,3:3,4:4}]},{},[5])(5)});
(function(C){"object"===typeof exports&&"undefined"!==typeof module?module.exports=C():"function"===typeof define&&define.amd?define([],C):("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:this).algoliasearch=C()})(function(){return function c(h,e,m){function g(d,k){if(!e[d]){if(!h[d]){var p="function"==typeof require&&require;if(!k&&p)return p(d,!0);if(b)return b(d,!0);p=Error("Cannot find module '"+d+"'");throw p.code="MODULE_NOT_FOUND",p;}p=e[d]=
{exports:{}};h[d][0].call(p.exports,function(b){var k=h[d][1][b];return g(k?k:b)},p,p.exports,c,h,e,m)}return e[d].exports}for(var b="function"==typeof require&&require,k=0;k<m.length;k++)g(m[k]);return g}({1:[function(c,h,e){function m(){if(!k){k=!0;for(var d,e=b.length;e;){d=b;b=[];for(var g=-1;++g<e;)d[g]();e=b.length}k=!1}}function g(){}c=h.exports={};var b=[],k=!1;c.nextTick=function(d){b.push(d);k||setTimeout(m,0)};c.title="browser";c.browser=!0;c.env={};c.argv=[];c.version="";c.versions={};
c.on=g;c.addListener=g;c.once=g;c.off=g;c.removeListener=g;c.removeAllListeners=g;c.emit=g;c.binding=function(d){throw Error("process.binding is not supported");};c.cwd=function(){return"/"};c.chdir=function(d){throw Error("process.chdir is not supported");};c.umask=function(){return 0}},{}],2:[function(c,h,e){h.exports=function(e,b,k,d){k=k||"=";var c={};if("string"!==typeof e||0===e.length)return c;var p=/\+/g;e=e.split(b||"&");b=1E3;d&&"number"===typeof d.maxKeys&&(b=d.maxKeys);d=e.length;0<b&&
d>b&&(d=b);for(b=0;b<d;++b){var n=e[b].replace(p,"%20"),h=n.indexOf(k),r;0<=h?(r=n.substr(0,h),n=n.substr(h+1)):(r=n,n="");r=decodeURIComponent(r);n=decodeURIComponent(n);Object.prototype.hasOwnProperty.call(c,r)?m(c[r])?c[r].push(n):c[r]=[c[r],n]:c[r]=n}return c};var m=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],3:[function(c,h,e){function m(d,b){if(d.map)return d.map(b);for(var e=[],k=0;k<d.length;k++)e.push(b(d[k],k));return e}var g=function(d){switch(typeof d){case "string":return d;
case "boolean":return d?"true":"false";case "number":return isFinite(d)?d:"";default:return""}};h.exports=function(d,e,c,h){e=e||"&";c=c||"=";null===d&&(d=void 0);return"object"===typeof d?m(k(d),function(k){var h=encodeURIComponent(g(k))+c;return b(d[k])?m(d[k],function(a){return h+encodeURIComponent(g(a))}).join(e):h+encodeURIComponent(g(d[k]))}).join(e):h?encodeURIComponent(g(h))+c+encodeURIComponent(g(d)):""};var b=Array.isArray||function(d){return"[object Array]"===Object.prototype.toString.call(d)},
k=Object.keys||function(d){var b=[],e;for(e in d)Object.prototype.hasOwnProperty.call(d,e)&&b.push(e);return b}},{}],4:[function(c,h,e){e.decode=e.parse=c(2);e.encode=e.stringify=c(3)},{2:2,3:3}],5:[function(c,h,e){function m(){var b;try{b=g.debug}catch(d){}return b}e=h.exports=c(6);e.log=function(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)};e.formatArgs=function(){var b=arguments,d=this.useColors;b[0]=(d?"%c":"")+this.namespace+(d?
" %c":" ")+b[0]+(d?"%c ":" ")+"+"+e.humanize(this.diff);if(!d)return b;var d="color: "+this.color,b=[b[0],d,"color: inherit"].concat(Array.prototype.slice.call(b,1)),c=0,g=0;b[0].replace(/%[a-z%]/g,function(b){"%%"!==b&&(c++,"%c"===b&&(g=c))});b.splice(g,0,d);return b};e.save=function(b){try{null==b?g.removeItem("debug"):g.debug=b}catch(d){}};e.load=m;e.useColors=function(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||
navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)};var g;if("undefined"!==typeof chrome&&"undefined"!==typeof chrome.storage)g=chrome.storage.local;else a:{try{g=window.localStorage;break a}catch(b){}g=void 0}e.colors="lightseagreen forestgreen goldenrod dodgerblue darkorchid crimson".split(" ");e.formatters.j=function(b){return JSON.stringify(b)};e.enable(m())},{6:6}],6:[function(c,h,e){e=h.exports=function(b){function k(){}function d(){var b=+new Date;d.diff=
b-(g||b);d.prev=g;g=d.curr=b;null==d.useColors&&(d.useColors=e.useColors());null==d.color&&d.useColors&&(d.color=e.colors[m++%e.colors.length]);var c=Array.prototype.slice.call(arguments);c[0]=e.coerce(c[0]);"string"!==typeof c[0]&&(c=["%o"].concat(c));var k=0;c[0]=c[0].replace(/%([a-z%])/g,function(b,a){if("%%"===b)return b;k++;var f=e.formatters[a];"function"===typeof f&&(b=f.call(d,c[k]),c.splice(k,1),k--);return b});"function"===typeof e.formatArgs&&(c=e.formatArgs.apply(d,c));(d.log||e.log||
console.log.bind(console)).apply(d,c)}k.enabled=!1;d.enabled=!0;var c=e.enabled(b)?d:k;c.namespace=b;return c};e.coerce=function(b){return b instanceof Error?b.stack||b.message:b};e.disable=function(){e.enable("")};e.enable=function(b){e.save(b);for(var c=(b||"").split(/[\s,]+/),d=c.length,g=0;g<d;g++)c[g]&&(b=c[g].replace(/\*/g,".*?"),"-"===b[0]?e.skips.push(new RegExp("^"+b.substr(1)+"$")):e.names.push(new RegExp("^"+b+"$")))};e.enabled=function(b){var c,d;c=0;for(d=e.skips.length;c<d;c++)if(e.skips[c].test(b))return!1;
c=0;for(d=e.names.length;c<d;c++)if(e.names[c].test(b))return!0;return!1};e.humanize=c(7);e.names=[];e.skips=[];e.formatters={};var m=0,g},{7:7}],7:[function(c,h,e){function m(b){if(b=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(b)){var c=parseFloat(b[1]);switch((b[2]||"ms").toLowerCase()){case "years":case "year":case "yrs":case "yr":case "y":return 315576E5*c;case "days":case "day":case "d":return 864E5*c;case "hours":case "hour":case "hrs":case "hr":case "h":return 36E5*
c;case "minutes":case "minute":case "mins":case "min":case "m":return 6E4*c;case "seconds":case "second":case "secs":case "sec":case "s":return 1E3*c;case "milliseconds":case "millisecond":case "msecs":case "msec":case "ms":return c}}}function g(b,c,d){if(!(b<c))return b<1.5*c?Math.floor(b/c)+" "+d:Math.ceil(b/c)+" "+d+"s"}h.exports=function(b,c){c=c||{};return"string"==typeof b?m(b):c.long?g(b,864E5,"day")||g(b,36E5,"hour")||g(b,6E4,"minute")||g(b,1E3,"second")||b+" ms":864E5<=b?Math.round(b/864E5)+
"d":36E5<=b?Math.round(b/36E5)+"h":6E4<=b?Math.round(b/6E4)+"m":1E3<=b?Math.round(b/1E3)+"s":b+"ms"}},{}],8:[function(c,h,e){(function(c,e){(function(){function b(a){return"function"===typeof a}function k(){return function(){c.nextTick(n)}}function d(){var a=0,f=new I(n),b=document.createTextNode("");f.observe(b,{characterData:!0});return function(){b.data=a=++a%2}}function v(){var a=new MessageChannel;a.port1.onmessage=n;return function(){a.port2.postMessage(0)}}function p(){return function(){setTimeout(n,
1)}}function n(){for(var a=0;a<z;a+=2)(0,B[a])(B[a+1]),B[a]=void 0,B[a+1]=void 0;z=0}function x(){}function r(a,f,b,l){try{a.call(f,b,l)}catch(d){return d}}function a(a,f,b){D(function(a){var d=!1,c=r(b,f,function(b){d||(d=!0,f!==b?l(a,b):u(a,b))},function(f){d||(d=!0,t(a,f))},"Settle: "+(a._label||" unknown promise"));!d&&c&&(d=!0,t(a,c))},a)}function f(a,f){1===f._state?u(a,f._result):2===a._state?t(a,f._result):E(f,void 0,function(f){l(a,f)},function(f){t(a,f)})}function l(l,d){if(l===d)t(l,new TypeError("You cannot resolve a promise with itself"));
else if("function"===typeof d||"object"===typeof d&&null!==d)if(d.constructor===l.constructor)f(l,d);else{var c;try{c=d.then}catch(e){F.error=e,c=F}c===F?t(l,F.error):void 0===c?u(l,d):b(c)?a(l,d,c):u(l,d)}else u(l,d)}function q(a){a._onerror&&a._onerror(a._result);G(a)}function u(a,f){void 0===a._state&&(a._result=f,a._state=1,0!==a._subscribers.length&&D(G,a))}function t(a,f){void 0===a._state&&(a._state=2,a._result=f,D(q,a))}function E(a,f,b,l){var d=a._subscribers,c=d.length;a._onerror=null;d[c]=
f;d[c+1]=b;d[c+2]=l;0===c&&a._state&&D(G,a)}function G(a){var f=a._subscribers,b=a._state;if(0!==f.length){for(var l,d,c=a._result,e=0;e<f.length;e+=3)l=f[e],d=f[e+b],l?J(b,l,d,c):d(c);a._subscribers.length=0}}function K(){this.error=null}function J(a,f,d,c){var e=b(d),q,g,k,h;if(e){try{q=d(c)}catch(p){H.error=p,q=H}q===H?(h=!0,g=q.error,q=null):k=!0;if(f===q){t(f,new TypeError("A promises callback cannot return that same promise."));return}}else q=c,k=!0;void 0===f._state&&(e&&k?l(f,q):h?t(f,g):
1===a?u(f,q):2===a&&t(f,q))}function N(a,f){try{f(function(f){l(a,f)},function(f){t(a,f)})}catch(b){t(a,b)}}function w(a,f,b,l){this._instanceConstructor=a;this.promise=new a(x,l);this._abortOnReject=b;this._validateInput(f)?(this._input=f,this._remaining=this.length=f.length,this._init(),0===this.length?u(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&u(this.promise,this._result))):t(this.promise,this._validationError())}function y(a){this._id=O++;this._result=
this._state=void 0;this._subscribers=[];if(x!==a){if(!b(a))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof y))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");N(this,a)}}var L=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)},z=0,D=function(a,f){B[z]=a;B[z+1]=f;z+=2;2===z&&M()},A=
"undefined"!==typeof window?window:{},I=A.MutationObserver||A.WebKitMutationObserver,A="undefined"!==typeof Uint8ClampedArray&&"undefined"!==typeof importScripts&&"undefined"!==typeof MessageChannel,B=Array(1E3),M;M="undefined"!==typeof c&&"[object process]"==={}.toString.call(c)?k():I?d():A?v():p();var F=new K,H=new K;w.prototype._validateInput=function(a){return L(a)};w.prototype._validationError=function(){return Error("Array Methods must be provided an Array")};w.prototype._init=function(){this._result=
Array(this.length)};w.prototype._enumerate=function(){for(var a=this.length,f=this.promise,b=this._input,l=0;void 0===f._state&&l<a;l++)this._eachEntry(b[l],l)};w.prototype._eachEntry=function(a,f){var b=this._instanceConstructor;"object"===typeof a&&null!==a?a.constructor===b&&void 0!==a._state?(a._onerror=null,this._settledAt(a._state,f,a._result)):this._willSettleAt(b.resolve(a),f):(this._remaining--,this._result[f]=this._makeResult(1,f,a))};w.prototype._settledAt=function(a,f,b){var l=this.promise;
void 0===l._state&&(this._remaining--,this._abortOnReject&&2===a?t(l,b):this._result[f]=this._makeResult(a,f,b));0===this._remaining&&u(l,this._result)};w.prototype._makeResult=function(a,f,b){return b};w.prototype._willSettleAt=function(a,f){var b=this;E(a,void 0,function(a){b._settledAt(1,f,a)},function(a){b._settledAt(2,f,a)})};var O=0;y.all=function(a,f){return(new w(this,a,!0,f)).promise};y.race=function(a,f){function b(a){l(c,a)}function d(a){t(c,a)}var c=new this(x,f);if(!L(a))return t(c,new TypeError("You must pass an array to race.")),
c;for(var e=a.length,q=0;void 0===c._state&&q<e;q++)E(this.resolve(a[q]),void 0,b,d);return c};y.resolve=function(a,f){if(a&&"object"===typeof a&&a.constructor===this)return a;var b=new this(x,f);l(b,a);return b};y.reject=function(a,f){var b=new this(x,f);t(b,a);return b};y.prototype={constructor:y,then:function(a,f){var b=this._state;if(1===b&&!a||2===b&&!f)return this;var l=new this.constructor(x),d=this._result;if(b){var c=arguments[b-1];D(function(){J(b,l,c,d)})}else E(this,l,a,f);return l},"catch":function(a){return this.then(null,
a)}};A={Promise:y,polyfill:function(){var a;a="undefined"!==typeof e?e:"undefined"!==typeof window&&window.document?window:self;"Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var f;new a.Promise(function(a){f=a});return b(f)}()||(a.Promise=y)}};"undefined"!==typeof h&&h.exports?h.exports=A:"undefined"!==typeof this&&(this.ES6Promise=A)}).call(this)}).call(this,c(1),"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==
typeof window?window:{})},{1:1}],9:[function(c,h,e){var m=Object.prototype.hasOwnProperty,g=Object.prototype.toString,b=c(10),k=function(b){if(!b||"[object Object]"!==g.call(b))return!1;var c=m.call(b,"constructor"),e=b.constructor&&b.constructor.prototype&&m.call(b.constructor.prototype,"isPrototypeOf");if(b.constructor&&!c&&!e)return!1;for(var k in b);return void 0===k||m.call(b,k)};h.exports=function v(){var c,e,g,h,a,f=arguments[0],l=1,q=arguments.length,u=!1;if("boolean"===typeof f)u=f,f=arguments[1]||
{},l=2;else if("object"!==typeof f&&"function"!==typeof f||null==f)f={};for(;l<q;++l)if(c=arguments[l],null!=c)for(e in c)g=f[e],h=c[e],f!==h&&(u&&h&&(k(h)||(a=b(h)))?(a?(a=!1,g=g&&b(g)?g:[]):g=g&&k(g)?g:{},f[e]=v(u,g,h)):void 0!==h&&(f[e]=h));return f}},{10:10}],10:[function(c,h,e){h.exports=Array.isArray||function(c){return"[object Array]"==Object.prototype.toString.call(c)}},{}],11:[function(c,h,e){var m=Object.prototype.hasOwnProperty,g=Object.prototype.toString;h.exports=function(b,c,d){if("[object Function]"!==
g.call(c))throw new TypeError("iterator must be a function");var e=b.length;if(e===+e)for(var h=0;h<e;h++)c.call(d,b[h],h,b);else for(h in b)m.call(b,h)&&c.call(d,b[h],h,b)}},{}],12:[function(c,h,e){h.exports="function"===typeof Object.create?function(c,e){c.super_=e;c.prototype=Object.create(e.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}})}:function(c,e){c.super_=e;var b=function(){};b.prototype=e.prototype;c.prototype=new b;c.prototype.constructor=c}},{}],13:[function(c,
h,e){(function(e){function g(a,f,l){var d=c(9);if(!a)throw Error("algoliasearch: Please provide an application ID. Usage: algoliasearch(applicationID, apiKey, opts)");if(!f)throw Error("algoliasearch: Please provide an API key. Usage: algoliasearch(applicationID, apiKey, opts)");this.applicationID=a;this.apiKey=f;a=[this.applicationID+"-1.algolianet.com",this.applicationID+"-2.algolianet.com",this.applicationID+"-3.algolianet.com"];this.hosts={read:[],write:[]};this.hostIndex={read:0,write:0};l=l||
{};f=l.protocol||"https:";var e=void 0===l.timeout?2E3:l.timeout;/:$/.test(f)||(f+=":");if("http:"!==l.protocol&&"https:"!==l.protocol)throw Error("algoliasearch: protocol must be `http:` or `https:` (was `"+l.protocol+"`)");l.hosts?(this.hosts.read=d([],l.hosts),this.hosts.write=d([],l.hosts)):(this.hosts.read=[this.applicationID+"-dsn.algolia.net"].concat(a),this.hosts.write=[this.applicationID+".algolia.net"].concat(a));this.hosts.read=b(this.hosts.read,k(f));this.hosts.write=b(this.hosts.write,
k(f));this.requestTimeout=e;this.extraHeaders=[];this.cache={};this._ua=l._ua;this._useCache=void 0===l._useCache?!0:l._useCache;this._setTimeout=l._setTimeout;x("init done, %j",this)}function b(a,f){for(var b=[],c=0;c<a.length;++c)b.push(f(a[c],c));return b}function k(a){return function(f){return a+"//"+f.toLowerCase()}}function d(){throw Error("algoliasearch: Not implemented in this environment.\nIf you feel this is a mistake, write to support@algolia.com");}function v(a,f){var b=a.toLowerCase().replace(".",
"").replace("()","");return"algoliasearch: `"+a+"` was replaced by `"+f+"`. Please see https://github.com/algolia/algoliasearch-client-js/wiki/Deprecated#"+b}function p(a,f){f(a,0)}function n(a,f){var b=!1;return function(){b||(console.log(f),b=!0);return a.apply(this,arguments)}}h.exports=g;"development"===e.env.NODE_ENV&&c(5).enable("algoliasearch*");var x=c(5)("algoliasearch"),r=c(11);g.prototype={deleteIndex:function(a,f){return this._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(a),
hostType:"write",callback:f})},moveIndex:function(a,f,b){f={operation:"move",destination:f};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(a)+"/operation",body:f,hostType:"write",callback:b})},copyIndex:function(a,f,b){f={operation:"copy",destination:f};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(a)+"/operation",body:f,hostType:"write",callback:b})},getLogs:function(a,f,b){if(0===arguments.length||"function"===typeof a)b=a,a=0,f=10;else if(1===
arguments.length||"function"===typeof f)b=f,f=10;return this._jsonRequest({method:"GET",url:"/1/logs?offset="+a+"&length="+f,hostType:"read",callback:b})},listIndexes:function(a,f){var b="";void 0===a||"function"===typeof a?f=a:b="?page="+a;return this._jsonRequest({method:"GET",url:"/1/indexes"+b,hostType:"read",callback:f})},initIndex:function(a){return new this.Index(this,a)},listUserKeys:function(a){return this._jsonRequest({method:"GET",url:"/1/keys",hostType:"read",callback:a})},getUserKeyACL:function(a,
f){return this._jsonRequest({method:"GET",url:"/1/keys/"+a,hostType:"read",callback:f})},deleteUserKey:function(a,f){return this._jsonRequest({method:"DELETE",url:"/1/keys/"+a,hostType:"write",callback:f})},addUserKey:function(a,f,b){if(1===arguments.length||"function"===typeof f)b=f,f=null;var c={acl:a};f&&(c.validity=f.validity,c.maxQueriesPerIPPerHour=f.maxQueriesPerIPPerHour,c.maxHitsPerQuery=f.maxHitsPerQuery,c.indexes=f.indexes);return this._jsonRequest({method:"POST",url:"/1/keys",body:c,hostType:"write",
callback:b})},addUserKeyWithValidity:n(function(a,f,b){return this.addUserKey(a,f,b)},v("client.addUserKeyWithValidity()","client.addUserKey()")),updateUserKey:function(a,f,b,c){if(2===arguments.length||"function"===typeof b)c=b,b=null;var d={acl:f};b&&(d.validity=b.validity,d.maxQueriesPerIPPerHour=b.maxQueriesPerIPPerHour,d.maxHitsPerQuery=b.maxHitsPerQuery,d.indexes=b.indexes);return this._jsonRequest({method:"PUT",url:"/1/keys/"+a,body:d,hostType:"write",callback:c})},setSecurityTags:function(a){if("[object Array]"===
Object.prototype.toString.call(a)){for(var f=[],b=0;b<a.length;++b)if("[object Array]"===Object.prototype.toString.call(a[b])){for(var c=[],d=0;d<a[b].length;++d)c.push(a[b][d]);f.push("("+c.join(",")+")")}else f.push(a[b]);a=f.join(",")}this.securityTags=a},setUserToken:function(a){this.userToken=a},startQueriesBatch:n(function(){this._batch=[]},v("client.startQueriesBatch()","client.search()")),addQueryInBatch:n(function(a,f,b){this._batch.push({indexName:a,query:f,params:b})},v("client.addQueryInBatch()",
"client.search()")),clearCache:function(){this.cache={}},sendQueriesBatch:n(function(a){return this.search(this._batch,a)},v("client.sendQueriesBatch()","client.search()")),setRequestTimeout:function(a){a&&(this.requestTimeout=parseInt(a,10))},search:function(a,f){var c=this,d={requests:b(a,function(a){var f="";void 0!==a.query&&(f+="query="+encodeURIComponent(a.query));return{indexName:a.indexName,params:c._getSearchParams(a.params,f)}})};return this._jsonRequest({cache:this.cache,method:"POST",
url:"/1/indexes/*/queries",body:d,hostType:"read",callback:f})},destroy:d,enableRateLimitForward:d,disableRateLimitForward:d,useSecuredAPIKey:d,disableSecuredAPIKey:d,generateSecuredApiKey:d,Index:function(a,f){this.indexName=f;this.as=a;this.typeAheadValueOption=this.typeAheadArgs=null;this.cache={}},setExtraHeader:function(a,f){this.extraHeaders.push({name:a.toLowerCase(),value:f})},_sendQueriesBatch:function(a,f){return this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",
body:a,hostType:"read",fallback:{method:"GET",url:"/1/indexes/*",body:{params:function(){for(var f="",b=0;b<a.requests.length;++b)var c="/1/indexes/"+encodeURIComponent(a.requests[b].indexName)+"?"+a.requests[b].params,f=f+(b+"="+encodeURIComponent(c)+"&");return f}()}},callback:f})},_jsonRequest:function(a){function f(c,m){function p(){g.hostIndex[a.hostType]=++g.hostIndex[a.hostType]%g.hosts[a.hostType].length;h+=1;m.timeout=g.requestTimeout*(h+1);return f(c,m)}var n;g._useCache&&(n=a.url);g._useCache&&
d&&(n+="_body_"+m.body);if(g._useCache&&e&&void 0!==e[n])return b("serving response from cache"),g._promise.resolve(e[n]);if(h>=g.hosts[a.hostType].length){if(!a.fallback||!g._request.fallback||k)return g._promise.reject(Error("Cannot connect to the AlgoliaSearch API. Send an email to support@algolia.com to report and resolve the issue."));h=0;m.method=a.fallback.method;m.url=a.fallback.url;m.jsonBody=a.fallback.body;m.jsonBody&&(m.body=JSON.stringify(a.fallback.body));m.timeout=g.requestTimeout*
(h+1);g.hostIndex[a.hostType]=0;k=g.useFallback=!0;return f(g._request.fallback,m)}return c.call(g,g.hosts[a.hostType][g.hostIndex[a.hostType]]+m.url,{body:d,jsonBody:a.body,method:m.method,headers:g._computeRequestHeaders(),timeout:m.timeout,debug:b}).then(function(a){if(a instanceof Error)return b("error: %s",a.message),p();b("received response: %j",a);var f=a&&a.body&&a.body.message&&a.body.status||a.statusCode||a&&a.body&&200,c=200===f||201===f,f=!c&&4!==Math.floor(f/100)&&1!==Math.floor(f/100);
g._useCache&&c&&e&&(e[n]=a.body);return c?a.body:f?p():g._promise.reject(Error(a.body&&a.body.message||"Unknown error"))},function(d){b("error: %s, stack: %s",d.message,d.stack);g.useFallback?(g.hostIndex[a.hostType]=++g.hostIndex[a.hostType]%g.hosts[a.hostType].length,h+=1):h=g.hosts[a.hostType].length;return f(c,m)})}var b=c(5)("algoliasearch:"+a.url),d,e=a.cache,g=this,h=0,k=!1;void 0!==a.body&&(d=JSON.stringify(a.body));b("request start");var m=g.useFallback&&a.fallback,n=m?a.fallback:a,m=f(m?
g._request.fallback:g._request,{url:n.url,method:n.method,body:d,jsonBody:a.body,timeout:g.requestTimeout*(h+1)});if(a.callback)m.then(function(f){p(function(){a.callback(null,f)},g._setTimeout||setTimeout)},function(f){p(function(){a.callback(f)},g._setTimeout||setTimeout)});else return m},_getSearchParams:function(a,f){if(this._isUndefined(a)||null===a)return f;for(var b in a)null!==b&&a.hasOwnProperty(b)&&(f+=""===f?"":"&",f+=b+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(a[b])?
JSON.stringify(a[b]):a[b]));return f},_isUndefined:function(a){return void 0===a},_computeRequestHeaders:function(){var a={"x-algolia-api-key":this.apiKey,"x-algolia-application-id":this.applicationID,"x-user-agent":this._ua};this.userToken&&(a["x-algolia-usertoken"]=this.userToken);this.securityTags&&(a["x-algolia-tagfilters"]=this.securityTags);this.extraHeaders&&r(this.extraHeaders,function(b){a[b.name]=b.value});return a}};g.prototype.Index.prototype={clearCache:function(){this.cache={}},addObject:function(a,
b,c){if(1===arguments.length||"function"===typeof b)c=b,b=void 0;return this.as._jsonRequest({method:void 0!==b?"PUT":"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+(void 0!==b?"/"+encodeURIComponent(b):""),body:a,hostType:"write",callback:c})},addObjects:function(a,b){for(var c={requests:[]},d=0;d<a.length;++d)c.requests.push({action:"addObject",body:a[d]});return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:c,hostType:"write",
callback:b})},getObject:function(a,b,c){if(1===arguments.length||"function"===typeof b)c=b,b=void 0;var d="";if(void 0!==b)for(var d="?attributes=",e=0;e<b.length;++e)0!==e&&(d+=","),d+=b[e];return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(a)+d,hostType:"read",callback:c})},getObjects:function(a,f){var c=this,d={requests:b(a,function(a){return{indexName:c.indexName,objectID:a}})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/*/objects",
hostType:"read",body:d,callback:f})},partialUpdateObject:function(a,b){return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(a.objectID)+"/partial",body:a,hostType:"write",callback:b})},partialUpdateObjects:function(a,b){for(var c={requests:[]},d=0;d<a.length;++d)c.requests.push({action:"partialUpdateObject",objectID:a[d].objectID,body:a[d]});return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+
"/batch",body:c,hostType:"write",callback:b})},saveObject:function(a,b){return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(a.objectID),body:a,hostType:"write",callback:b})},saveObjects:function(a,b){for(var c={requests:[]},d=0;d<a.length;++d)c.requests.push({action:"updateObject",objectID:a[d].objectID,body:a[d]});return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:c,hostType:"write",
callback:b})},deleteObject:function(a,b){if("function"===typeof a||"string"!==typeof a&&"number"!==typeof a){var c=Error("Cannot delete an object without an objectID");b=a;return"function"===typeof b?b(c):this.as._promise.reject(c)}return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(a),hostType:"write",callback:b})},deleteObjects:function(a,f){var c={requests:b(a,function(a){return{action:"deleteObject",objectID:a,body:{objectID:a}}})};
return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:c,hostType:"write",callback:f})},deleteByQuery:function(a,f,c){function d(a){return g.waitTask(a.taskID)}function e(){return g.deleteByQuery(a,f)}var g=this,h=g.as;if(1===arguments.length||"function"===typeof f)c=f,f={};f.attributesToRetrieve="objectID";f.hitsPerPage=1E3;this.clearCache();var k=this.search(a,f).then(function(a){if(0===a.nbHits)return a;a=b(a.hits,function(a){return a.objectID});
return g.deleteObjects(a).then(d).then(e)});if(!c)return k;k.then(function(){p(function(){c(null)},h._setTimeout||setTimeout)},function(a){p(function(){c(a)},h._setTimeout||setTimeout)})},search:function(a,b,c){if("function"===typeof a&&"object"===typeof b||"object"===typeof c)throw Error("algoliasearch: index.search usage is index.search(query, params, cb)");if(0===arguments.length||"function"===typeof a)c=a,a="";else if(1===arguments.length||"function"===typeof b)c=b,b=void 0;if("object"===typeof a&&
null!==a)b=a,a=void 0;else if(void 0===a||null===a)a="";var d="";void 0!==a&&(d+="query="+encodeURIComponent(a));void 0!==b&&(d=this.as._getSearchParams(b,d));return this._search(d,c)},browse:function(a,b,c){if(1===arguments.length||"function"===typeof b)c=b,b=void 0;var d="?page="+a;this.as._isUndefined(b)||(d+="&hitsPerPage="+b);return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse"+d,hostType:"read",callback:c})},ttAdapter:function(a){var b=this;
return function(c,d){b.search(c,a,function(a,b){a?d(a):d(b.hits)})}},waitTask:function(a,b){var c=this,d=c.as,e=this.as._jsonRequest({method:"GET",hostType:"read",url:"/1/indexes/"+encodeURIComponent(c.indexName)+"/task/"+a}).then(function(b){return"published"!==b.status?c.as._promise.delay(100).then(function(){return c.waitTask(a)}):b});if(!b)return e;e.then(function(a){p(function(){b(null,a)},d._setTimeout||setTimeout)},function(a){p(function(){b(a)},d._setTimeout||setTimeout)})},clearIndex:function(a){return this.as._jsonRequest({method:"POST",
/*! algoliasearch 3.4.0 | © 2014, 2015 Algolia SAS | github.com/algolia/algoliasearch-client-js */
(function(C){var c;"undefined"!==typeof window?c=window:"undefined"!==typeof self&&(c=self);c.ALGOLIA_MIGRATION_LAYER=C()})(function(){return function c(k,f,n){function g(d,h){if(!f[d]){if(!k[d]){var m="function"==typeof require&&require;if(!h&&m)return m(d,!0);if(b)return b(d,!0);m=Error("Cannot find module '"+d+"'");throw m.code="MODULE_NOT_FOUND",m;}m=f[d]={exports:{}};k[d][0].call(m.exports,function(b){var h=k[d][1][b];return g(h?h:b)},m,m.exports,c,k,f,n)}return f[d].exports}for(var b="function"==
typeof require&&require,h=0;h<n.length;h++)g(n[h]);return g}({1:[function(c,k,f){function n(b,d){for(var g in d)b.setAttribute(g,d[g])}function g(b,d){b.onload=function(){this.onerror=this.onload=null;d(null,b)};b.onerror=function(){this.onerror=this.onload=null;d(Error("Failed to load "+this.src),b)}}function b(b,d){b.onreadystatechange=function(){if("complete"==this.readyState||"loaded"==this.readyState)this.onreadystatechange=null,d(null,b)}}k.exports=function(h,d,c){var m=document.head||document.getElementsByTagName("head")[0],
p=document.createElement("script");"function"===typeof d&&(c=d,d={});d=d||{};c=c||function(){};p.type=d.type||"text/javascript";p.charset=d.charset||"utf8";p.async="async"in d?!!d.async:!0;p.src=h;d.attrs&&n(p,d.attrs);d.text&&(p.text=""+d.text);("onload"in p?g:b)(p,c);p.onload||g(p,c);m.appendChild(p)}},{}],2:[function(c,k,f){k.exports=function(c){c=new RegExp("cdn\\.jsdelivr\\.net/algoliasearch/latest/"+c.replace(".","\\.")+"(?:\\.min)?\\.js$");for(var g=document.getElementsByTagName("script"),
b=!1,h=0,d=g.length;h<d;h++)if(g[h].src&&c.test(g[h].src)){b=!0;break}return b}},{}],3:[function(c,k,f){(function(f){function g(b){return function(){var g="AlgoliaSearch: loaded V2 script using "+b;f.console&&f.console.log&&f.console.log(g)}}k.exports=function(b){var h=c(1);b="//cdn.jsdelivr.net/algoliasearch/2/"+b+".min.js";f.console&&(f.console.warn?f.console.warn("-- AlgoliaSearch `latest` warning --\nWarning, you are using the `latest` version string from jsDelivr to load the AlgoliaSearch library.\nUsing `latest` is no more recommended, you should load //cdn.jsdelivr.net/algoliasearch/2/algoliasearch.min.js\n\nAlso, we updated the AlgoliaSearch JavaScript client to V3. If you want to upgrade,\nplease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch `latest` warning --"):
f.console.log&&f.console.log("-- AlgoliaSearch `latest` warning --\nWarning, you are using the `latest` version string from jsDelivr to load the AlgoliaSearch library.\nUsing `latest` is no more recommended, you should load //cdn.jsdelivr.net/algoliasearch/2/algoliasearch.min.js\n\nAlso, we updated the AlgoliaSearch JavaScript client to V3. If you want to upgrade,\nplease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch `latest` warning --"));
try{document.write("<script>window.ALGOLIA_SUPPORTS_DOCWRITE = true\x3c/script>"),!0===f.ALGOLIA_SUPPORTS_DOCWRITE?(document.write('<script src="'+b+'">\x3c/script>'),g("document.write")()):h(b,g("DOMElement"))}catch(d){h(b,g("DOMElement"))}}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{1:1}],4:[function(c,k,f){(function(c){k.exports=function(){c.AlgoliaSearch=function(){throw Error("-- AlgoliaSearch V2 => V3 error --\nYou are trying to use a new version of the AlgoliaSearch JavaScript client with an old notation.\nPlease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch V2 => V3 error --");
};c.AlgoliaSearchHelper=function(){throw Error("-- AlgoliaSearch V2 => V3 error --\nYou are trying to use a new version of the AlgoliaSearch JavaScript client with an old notation.\nPlease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch V2 => V3 error --");};AlgoliaExplainResults=function(){throw Error("-- AlgoliaSearch V2 => V3 error --\nYou are trying to use a new version of the AlgoliaSearch JavaScript client with an old notation.\nPlease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch V2 => V3 error --");
}}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],5:[function(c,k,f){k=c(2);f=c(3);c=c(4);k("algoliasearch")?f("algoliasearch"):c()},{2:2,3:3,4:4}]},{},[5])(5)});
(function(C){"object"===typeof exports&&"undefined"!==typeof module?module.exports=C():"function"===typeof define&&define.amd?define([],C):("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:this).algoliasearch=C()})(function(){return function c(k,f,n){function g(d,h){if(!f[d]){if(!k[d]){var m="function"==typeof require&&require;if(!h&&m)return m(d,!0);if(b)return b(d,!0);m=Error("Cannot find module '"+d+"'");throw m.code="MODULE_NOT_FOUND",m;}m=f[d]=
{exports:{}};k[d][0].call(m.exports,function(b){var h=k[d][1][b];return g(h?h:b)},m,m.exports,c,k,f,n)}return f[d].exports}for(var b="function"==typeof require&&require,h=0;h<n.length;h++)g(n[h]);return g}({1:[function(c,k,f){function n(){if(!h){h=!0;for(var d,g=b.length;g;){d=b;b=[];for(var c=-1;++c<g;)d[c]();g=b.length}h=!1}}function g(){}c=k.exports={};var b=[],h=!1;c.nextTick=function(d){b.push(d);h||setTimeout(n,0)};c.title="browser";c.browser=!0;c.env={};c.argv=[];c.version="";c.versions={};
c.on=g;c.addListener=g;c.once=g;c.off=g;c.removeListener=g;c.removeAllListeners=g;c.emit=g;c.binding=function(d){throw Error("process.binding is not supported");};c.cwd=function(){return"/"};c.chdir=function(d){throw Error("process.chdir is not supported");};c.umask=function(){return 0}},{}],2:[function(c,k,f){k.exports=function(g,b,h,d){h=h||"=";var c={};if("string"!==typeof g||0===g.length)return c;var f=/\+/g;g=g.split(b||"&");b=1E3;d&&"number"===typeof d.maxKeys&&(b=d.maxKeys);d=g.length;0<b&&
d>b&&(d=b);for(b=0;b<d;++b){var p=g[b].replace(f,"%20"),k=p.indexOf(h),q;0<=k?(q=p.substr(0,k),p=p.substr(k+1)):(q=p,p="");q=decodeURIComponent(q);p=decodeURIComponent(p);Object.prototype.hasOwnProperty.call(c,q)?n(c[q])?c[q].push(p):c[q]=[c[q],p]:c[q]=p}return c};var n=Array.isArray||function(g){return"[object Array]"===Object.prototype.toString.call(g)}},{}],3:[function(c,k,f){function n(d,b){if(d.map)return d.map(b);for(var g=[],h=0;h<d.length;h++)g.push(b(d[h],h));return g}var g=function(d){switch(typeof d){case "string":return d;
case "boolean":return d?"true":"false";case "number":return isFinite(d)?d:"";default:return""}};k.exports=function(d,c,f,p){c=c||"&";f=f||"=";null===d&&(d=void 0);return"object"===typeof d?n(h(d),function(h){var p=encodeURIComponent(g(h))+f;return b(d[h])?n(d[h],function(a){return p+encodeURIComponent(g(a))}).join(c):p+encodeURIComponent(g(d[h]))}).join(c):p?encodeURIComponent(g(p))+f+encodeURIComponent(g(d)):""};var b=Array.isArray||function(d){return"[object Array]"===Object.prototype.toString.call(d)},
h=Object.keys||function(d){var b=[],h;for(h in d)Object.prototype.hasOwnProperty.call(d,h)&&b.push(h);return b}},{}],4:[function(c,k,f){f.decode=f.parse=c(2);f.encode=f.stringify=c(3)},{2:2,3:3}],5:[function(c,k,f){function n(){var b;try{b=g.debug}catch(d){}return b}f=k.exports=c(6);f.log=function(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)};f.formatArgs=function(){var b=arguments,d=this.useColors;b[0]=(d?"%c":"")+this.namespace+(d?
" %c":" ")+b[0]+(d?"%c ":" ")+"+"+f.humanize(this.diff);if(!d)return b;var d="color: "+this.color,b=[b[0],d,"color: inherit"].concat(Array.prototype.slice.call(b,1)),g=0,c=0;b[0].replace(/%[a-z%]/g,function(b){"%%"!==b&&(g++,"%c"===b&&(c=g))});b.splice(c,0,d);return b};f.save=function(b){try{null==b?g.removeItem("debug"):g.debug=b}catch(d){}};f.load=n;f.useColors=function(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||
navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)};var g;if("undefined"!==typeof chrome&&"undefined"!==typeof chrome.storage)g=chrome.storage.local;else a:{try{g=window.localStorage;break a}catch(b){}g=void 0}f.colors="lightseagreen forestgreen goldenrod dodgerblue darkorchid crimson".split(" ");f.formatters.j=function(b){return JSON.stringify(b)};f.enable(n())},{6:6}],6:[function(c,k,f){f=k.exports=function(b){function h(){}function d(){var b=+new Date;d.diff=
b-(g||b);d.prev=g;g=d.curr=b;null==d.useColors&&(d.useColors=f.useColors());null==d.color&&d.useColors&&(d.color=f.colors[n++%f.colors.length]);var c=Array.prototype.slice.call(arguments);c[0]=f.coerce(c[0]);"string"!==typeof c[0]&&(c=["%o"].concat(c));var h=0;c[0]=c[0].replace(/%([a-z%])/g,function(b,a){if("%%"===b)return b;h++;var e=f.formatters[a];"function"===typeof e&&(b=e.call(d,c[h]),c.splice(h,1),h--);return b});"function"===typeof f.formatArgs&&(c=f.formatArgs.apply(d,c));(d.log||f.log||
console.log.bind(console)).apply(d,c)}h.enabled=!1;d.enabled=!0;var c=f.enabled(b)?d:h;c.namespace=b;return c};f.coerce=function(b){return b instanceof Error?b.stack||b.message:b};f.disable=function(){f.enable("")};f.enable=function(b){f.save(b);for(var c=(b||"").split(/[\s,]+/),d=c.length,g=0;g<d;g++)c[g]&&(b=c[g].replace(/\*/g,".*?"),"-"===b[0]?f.skips.push(new RegExp("^"+b.substr(1)+"$")):f.names.push(new RegExp("^"+b+"$")))};f.enabled=function(b){var c,d;c=0;for(d=f.skips.length;c<d;c++)if(f.skips[c].test(b))return!1;
c=0;for(d=f.names.length;c<d;c++)if(f.names[c].test(b))return!0;return!1};f.humanize=c(7);f.names=[];f.skips=[];f.formatters={};var n=0,g},{7:7}],7:[function(c,k,f){function n(b){if(b=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(b)){var c=parseFloat(b[1]);switch((b[2]||"ms").toLowerCase()){case "years":case "year":case "yrs":case "yr":case "y":return 315576E5*c;case "days":case "day":case "d":return 864E5*c;case "hours":case "hour":case "hrs":case "hr":case "h":return 36E5*
c;case "minutes":case "minute":case "mins":case "min":case "m":return 6E4*c;case "seconds":case "second":case "secs":case "sec":case "s":return 1E3*c;case "milliseconds":case "millisecond":case "msecs":case "msec":case "ms":return c}}}function g(b,c,d){if(!(b<c))return b<1.5*c?Math.floor(b/c)+" "+d:Math.ceil(b/c)+" "+d+"s"}k.exports=function(b,c){c=c||{};return"string"==typeof b?n(b):c.long?g(b,864E5,"day")||g(b,36E5,"hour")||g(b,6E4,"minute")||g(b,1E3,"second")||b+" ms":864E5<=b?Math.round(b/864E5)+
"d":36E5<=b?Math.round(b/36E5)+"h":6E4<=b?Math.round(b/6E4)+"m":1E3<=b?Math.round(b/1E3)+"s":b+"ms"}},{}],8:[function(c,k,f){(function(c,g){(function(){function b(a){return"function"===typeof a}function f(){return function(){c.nextTick(p)}}function d(){var a=0,e=new I(p),l=document.createTextNode("");e.observe(l,{characterData:!0});return function(){l.data=a=++a%2}}function r(){var a=new MessageChannel;a.port1.onmessage=p;return function(){a.port2.postMessage(0)}}function m(){return function(){setTimeout(p,
1)}}function p(){for(var a=0;a<z;a+=2)(0,B[a])(B[a+1]),B[a]=void 0,B[a+1]=void 0;z=0}function w(){}function q(a,e,l,b){try{a.call(e,l,b)}catch(c){return c}}function a(a,e,b){D(function(a){var c=!1,d=q(b,e,function(b){c||(c=!0,e!==b?l(a,b):v(a,b))},function(e){c||(c=!0,u(a,e))},"Settle: "+(a._label||" unknown promise"));!c&&d&&(c=!0,u(a,d))},a)}function e(a,e){1===e._state?v(a,e._result):2===a._state?u(a,e._result):E(e,void 0,function(e){l(a,e)},function(e){u(a,e)})}function l(l,c){if(l===c)u(l,new TypeError("You cannot resolve a promise with itself"));
else if("function"===typeof c||"object"===typeof c&&null!==c)if(c.constructor===l.constructor)e(l,c);else{var d;try{d=c.then}catch(g){F.error=g,d=F}d===F?u(l,F.error):void 0===d?v(l,c):b(d)?a(l,c,d):v(l,c)}else v(l,c)}function t(a){a._onerror&&a._onerror(a._result);G(a)}function v(a,e){void 0===a._state&&(a._result=e,a._state=1,0!==a._subscribers.length&&D(G,a))}function u(a,e){void 0===a._state&&(a._state=2,a._result=e,D(t,a))}function E(a,e,l,b){var c=a._subscribers,d=c.length;a._onerror=null;c[d]=
e;c[d+1]=l;c[d+2]=b;0===d&&a._state&&D(G,a)}function G(a){var e=a._subscribers,l=a._state;if(0!==e.length){for(var b,c,d=a._result,g=0;g<e.length;g+=3)b=e[g],c=e[g+l],b?J(l,b,c,d):c(d);a._subscribers.length=0}}function K(){this.error=null}function J(a,e,c,d){var g=b(c),t,f,h,m;if(g){try{t=c(d)}catch(k){H.error=k,t=H}t===H?(m=!0,f=t.error,t=null):h=!0;if(e===t){u(e,new TypeError("A promises callback cannot return that same promise."));return}}else t=d,h=!0;void 0===e._state&&(g&&h?l(e,t):m?u(e,f):
1===a?v(e,t):2===a&&u(e,t))}function N(a,e){try{e(function(e){l(a,e)},function(e){u(a,e)})}catch(b){u(a,b)}}function y(a,e,l,b){this._instanceConstructor=a;this.promise=new a(w,b);this._abortOnReject=l;this._validateInput(e)?(this._input=e,this._remaining=this.length=e.length,this._init(),0===this.length?v(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&v(this.promise,this._result))):u(this.promise,this._validationError())}function x(a){this._id=O++;this._result=
this._state=void 0;this._subscribers=[];if(w!==a){if(!b(a))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof x))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");N(this,a)}}var L=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)},z=0,D=function(a,e){B[z]=a;B[z+1]=e;z+=2;2===z&&M()},A=
"undefined"!==typeof window?window:{},I=A.MutationObserver||A.WebKitMutationObserver,A="undefined"!==typeof Uint8ClampedArray&&"undefined"!==typeof importScripts&&"undefined"!==typeof MessageChannel,B=Array(1E3),M;M="undefined"!==typeof c&&"[object process]"==={}.toString.call(c)?f():I?d():A?r():m();var F=new K,H=new K;y.prototype._validateInput=function(a){return L(a)};y.prototype._validationError=function(){return Error("Array Methods must be provided an Array")};y.prototype._init=function(){this._result=
Array(this.length)};y.prototype._enumerate=function(){for(var a=this.length,e=this.promise,l=this._input,b=0;void 0===e._state&&b<a;b++)this._eachEntry(l[b],b)};y.prototype._eachEntry=function(a,e){var l=this._instanceConstructor;"object"===typeof a&&null!==a?a.constructor===l&&void 0!==a._state?(a._onerror=null,this._settledAt(a._state,e,a._result)):this._willSettleAt(l.resolve(a),e):(this._remaining--,this._result[e]=this._makeResult(1,e,a))};y.prototype._settledAt=function(a,e,l){var b=this.promise;
void 0===b._state&&(this._remaining--,this._abortOnReject&&2===a?u(b,l):this._result[e]=this._makeResult(a,e,l));0===this._remaining&&v(b,this._result)};y.prototype._makeResult=function(a,e,l){return l};y.prototype._willSettleAt=function(a,e){var l=this;E(a,void 0,function(a){l._settledAt(1,e,a)},function(a){l._settledAt(2,e,a)})};var O=0;x.all=function(a,e){return(new y(this,a,!0,e)).promise};x.race=function(a,e){function b(a){l(d,a)}function c(a){u(d,a)}var d=new this(w,e);if(!L(a))return u(d,new TypeError("You must pass an array to race.")),
d;for(var g=a.length,t=0;void 0===d._state&&t<g;t++)E(this.resolve(a[t]),void 0,b,c);return d};x.resolve=function(a,e){if(a&&"object"===typeof a&&a.constructor===this)return a;var b=new this(w,e);l(b,a);return b};x.reject=function(a,e){var l=new this(w,e);u(l,a);return l};x.prototype={constructor:x,then:function(a,e){var l=this._state;if(1===l&&!a||2===l&&!e)return this;var b=new this.constructor(w),c=this._result;if(l){var d=arguments[l-1];D(function(){J(l,b,d,c)})}else E(this,b,a,e);return b},"catch":function(a){return this.then(null,
a)}};A={Promise:x,polyfill:function(){var a;a="undefined"!==typeof g?g:"undefined"!==typeof window&&window.document?window:self;"Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var e;new a.Promise(function(a){e=a});return b(e)}()||(a.Promise=x)}};"undefined"!==typeof k&&k.exports?k.exports=A:"undefined"!==typeof this&&(this.ES6Promise=A)}).call(this)}).call(this,c(1),"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==
typeof window?window:{})},{1:1}],9:[function(c,k,f){var n=Object.prototype.hasOwnProperty,g=Object.prototype.toString,b=function(b){return"function"===typeof Array.isArray?Array.isArray(b):"[object Array]"===g.call(b)},h=function(b){if(!b||"[object Object]"!==g.call(b))return!1;var c=n.call(b,"constructor"),f=b.constructor&&b.constructor.prototype&&n.call(b.constructor.prototype,"isPrototypeOf");if(b.constructor&&!c&&!f)return!1;for(var h in b);return void 0===h||n.call(b,h)};k.exports=function r(){var c,
g,f,k,a,e=arguments[0],l=1,t=arguments.length,v=!1;if("boolean"===typeof e)v=e,e=arguments[1]||{},l=2;else if("object"!==typeof e&&"function"!==typeof e||null==e)e={};for(;l<t;++l)if(c=arguments[l],null!=c)for(g in c)f=e[g],k=c[g],e!==k&&(v&&k&&(h(k)||(a=b(k)))?(a?(a=!1,f=f&&b(f)?f:[]):f=f&&h(f)?f:{},e[g]=r(v,f,k)):void 0!==k&&(e[g]=k));return e}},{}],10:[function(c,k,f){var n=Object.prototype.hasOwnProperty,g=Object.prototype.toString;k.exports=function(b,c,d){if("[object Function]"!==g.call(c))throw new TypeError("iterator must be a function");
var f=b.length;if(f===+f)for(var k=0;k<f;k++)c.call(d,b[k],k,b);else for(k in b)n.call(b,k)&&c.call(d,b[k],k,b)}},{}],11:[function(c,k,f){k.exports="function"===typeof Object.create?function(c,g){c.super_=g;c.prototype=Object.create(g.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}})}:function(c,g){c.super_=g;var b=function(){};b.prototype=g.prototype;c.prototype=new b;c.prototype.constructor=c}},{}],12:[function(c,k,f){function n(a,e,l){var d=c(9);if(!a)throw new q.AlgoliaSearchError("Please provide an application ID. Usage: algoliasearch(applicationID, apiKey, opts)");
if(!e)throw new q.AlgoliaSearchError("Please provide an API key. Usage: algoliasearch(applicationID, apiKey, opts)");this.applicationID=a;this.apiKey=e;a=[this.applicationID+"-1.algolianet.com",this.applicationID+"-2.algolianet.com",this.applicationID+"-3.algolianet.com"];this.hosts={read:[],write:[]};this.hostIndex={read:0,write:0};l=l||{};e=l.protocol||"https:";var f=void 0===l.timeout?2E3:l.timeout;/:$/.test(e)||(e+=":");if("http:"!==l.protocol&&"https:"!==l.protocol)throw new q.AlgoliaSearchError("protocol must be `http:` or `https:` (was `"+
l.protocol+"`)");l.hosts?(this.hosts.read=d([],l.hosts),this.hosts.write=d([],l.hosts)):(this.hosts.read=[this.applicationID+"-dsn.algolia.net"].concat(a),this.hosts.write=[this.applicationID+".algolia.net"].concat(a));this.hosts.read=g(this.hosts.read,b(e));this.hosts.write=g(this.hosts.write,b(e));this.requestTimeout=f;this.extraHeaders=[];this.cache={};this._ua=l._ua;this._useCache=void 0===l._useCache?!0:l._useCache;this._setTimeout=l._setTimeout;p("init done, %j",this)}function g(a,e){for(var b=
[],c=0;c<a.length;++c)b.push(e(a[c],c));return b}function b(a){return function(e){return a+"//"+e.toLowerCase()}}function h(){throw new q.AlgoliaSearchError("Not implemented in this environment.\nIf you feel this is a mistake, write to support@algolia.com");}function d(a,e){var b=a.toLowerCase().replace(".","").replace("()","");return"algoliasearch: `"+a+"` was replaced by `"+e+"`. Please see https://github.com/algolia/algoliasearch-client-js/wiki/Deprecated#"+b}function r(a,e){e(a,0)}function m(a,
e){var b=!1;return function(){b||(console.log(e),b=!0);return a.apply(this,arguments)}}k.exports=n;var p=c(5)("algoliasearch"),w=c(10),q=c(17);n.prototype={deleteIndex:function(a,e){return this._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(a),hostType:"write",callback:e})},moveIndex:function(a,e,b){e={operation:"move",destination:e};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(a)+"/operation",body:e,hostType:"write",callback:b})},copyIndex:function(a,
e,b){e={operation:"copy",destination:e};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(a)+"/operation",body:e,hostType:"write",callback:b})},getLogs:function(a,e,b){if(0===arguments.length||"function"===typeof a)b=a,a=0,e=10;else if(1===arguments.length||"function"===typeof e)b=e,e=10;return this._jsonRequest({method:"GET",url:"/1/logs?offset="+a+"&length="+e,hostType:"read",callback:b})},listIndexes:function(a,e){var b="";void 0===a||"function"===typeof a?e=a:b="?page="+
a;return this._jsonRequest({method:"GET",url:"/1/indexes"+b,hostType:"read",callback:e})},initIndex:function(a){return new this.Index(this,a)},listUserKeys:function(a){return this._jsonRequest({method:"GET",url:"/1/keys",hostType:"read",callback:a})},getUserKeyACL:function(a,e){return this._jsonRequest({method:"GET",url:"/1/keys/"+a,hostType:"read",callback:e})},deleteUserKey:function(a,e){return this._jsonRequest({method:"DELETE",url:"/1/keys/"+a,hostType:"write",callback:e})},addUserKey:function(a,
e,b){if(1===arguments.length||"function"===typeof e)b=e,e=null;var c={acl:a};e&&(c.validity=e.validity,c.maxQueriesPerIPPerHour=e.maxQueriesPerIPPerHour,c.maxHitsPerQuery=e.maxHitsPerQuery,c.indexes=e.indexes,c.description=e.description,e.queryParameters&&(c.queryParameters=this._getSearchParams(e.queryParameters,"")),c.referers=e.referers);return this._jsonRequest({method:"POST",url:"/1/keys",body:c,hostType:"write",callback:b})},addUserKeyWithValidity:m(function(a,e,b){return this.addUserKey(a,
e,b)},d("client.addUserKeyWithValidity()","client.addUserKey()")),updateUserKey:function(a,e,b,c){if(2===arguments.length||"function"===typeof b)c=b,b=null;var d={acl:e};b&&(d.validity=b.validity,d.maxQueriesPerIPPerHour=b.maxQueriesPerIPPerHour,d.maxHitsPerQuery=b.maxHitsPerQuery,d.indexes=b.indexes,d.description=b.description,b.queryParameters&&(d.queryParameters=this._getSearchParams(b.queryParameters,"")),d.referers=b.referers);return this._jsonRequest({method:"PUT",url:"/1/keys/"+a,body:d,hostType:"write",
callback:c})},setSecurityTags:function(a){if("[object Array]"===Object.prototype.toString.call(a)){for(var e=[],b=0;b<a.length;++b)if("[object Array]"===Object.prototype.toString.call(a[b])){for(var c=[],d=0;d<a[b].length;++d)c.push(a[b][d]);e.push("("+c.join(",")+")")}else e.push(a[b]);a=e.join(",")}this.securityTags=a},setUserToken:function(a){this.userToken=a},startQueriesBatch:m(function(){this._batch=[]},d("client.startQueriesBatch()","client.search()")),addQueryInBatch:m(function(a,e,b){this._batch.push({indexName:a,
query:e,params:b})},d("client.addQueryInBatch()","client.search()")),clearCache:function(){this.cache={}},sendQueriesBatch:m(function(a){return this.search(this._batch,a)},d("client.sendQueriesBatch()","client.search()")),setRequestTimeout:function(a){a&&(this.requestTimeout=parseInt(a,10))},search:function(a,e){var b=this,c={requests:g(a,function(a){var e="";void 0!==a.query&&(e+="query="+encodeURIComponent(a.query));return{indexName:a.indexName,params:b._getSearchParams(a.params,e)}})};return this._jsonRequest({cache:this.cache,
method:"POST",url:"/1/indexes/*/queries",body:c,hostType:"read",callback:e})},batch:function(a,e){return this._jsonRequest({method:"POST",url:"/1/indexes/*/batch",body:{requests:a},hostType:"write",callback:e})},destroy:h,enableRateLimitForward:h,disableRateLimitForward:h,useSecuredAPIKey:h,disableSecuredAPIKey:h,generateSecuredApiKey:h,Index:function(a,e){this.indexName=e;this.as=a;this.typeAheadValueOption=this.typeAheadArgs=null;this.cache={}},setExtraHeader:function(a,e){this.extraHeaders.push({name:a.toLowerCase(),
value:e})},_sendQueriesBatch:function(a,e){return this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",body:a,hostType:"read",fallback:{method:"GET",url:"/1/indexes/*",body:{params:function(){for(var e="",b=0;b<a.requests.length;++b)var c="/1/indexes/"+encodeURIComponent(a.requests[b].indexName)+"?"+a.requests[b].params,e=e+(b+"="+encodeURIComponent(c)+"&");return e}()}},callback:e})},_jsonRequest:function(a){function e(c,m){function n(){f.hostIndex[a.hostType]=++f.hostIndex[a.hostType]%
f.hosts[a.hostType].length;h+=1;m.timeout=f.requestTimeout*(h+1);return e(c,m)}var p;f._useCache&&(p=a.url);f._useCache&&d&&(p+="_body_"+m.body);if(f._useCache&&g&&void 0!==g[p])return b("serving response from cache"),f._promise.resolve(JSON.parse(JSON.stringify(g[p])));if(h>=f.hosts[a.hostType].length){if(!a.fallback||!f._request.fallback||k)return f._promise.reject(new q.AlgoliaSearchError("Cannot connect to the AlgoliaSearch API. Send an email to support@algolia.com to report and resolve the issue."));
h=0;m.method=a.fallback.method;m.url=a.fallback.url;m.jsonBody=a.fallback.body;m.jsonBody&&(m.body=JSON.stringify(a.fallback.body));m.timeout=f.requestTimeout*(h+1);f.hostIndex[a.hostType]=0;k=f.useFallback=!0;return e(f._request.fallback,m)}return c.call(f,f.hosts[a.hostType][f.hostIndex[a.hostType]]+m.url,{body:d,jsonBody:a.body,method:m.method,headers:f._computeRequestHeaders(),timeout:m.timeout,debug:b}).then(function(a){b("received response: %j",a);var e=a&&a.body&&a.body.message&&a.body.status||
a.statusCode||a&&a.body&&200,c=200===e||201===e,e=!c&&4!==Math.floor(e/100)&&1!==Math.floor(e/100);f._useCache&&c&&g&&(g[p]=a.body);if(c)return a.body;if(e)return n();a=new q.AlgoliaSearchError(a.body&&a.body.message);return f._promise.reject(a)},function(d){b("error: %s, stack: %s",d.message,d.stack);if(d instanceof q.RequestTimeout)return b("timedout"),n();d instanceof q.AlgoliaSearchError||(d=new q.Unknown(d&&d.message,d));if(d instanceof q.Unknown||d instanceof q.UnparsableJSON||!c.fallback&&
d instanceof q.Network)return f._promise.reject(d);f.useFallback?(f.hostIndex[a.hostType]=++f.hostIndex[a.hostType]%f.hosts[a.hostType].length,h+=1):h=f.hosts[a.hostType].length;return e(c,m)})}var b=c(5)("algoliasearch:"+a.url),d,g=a.cache,f=this,h=0,k=!1;void 0!==a.body&&(d=JSON.stringify(a.body));b("request start");var m=f.useFallback&&a.fallback,n=m?a.fallback:a,m=e(m?f._request.fallback:f._request,{url:n.url,method:n.method,body:d,jsonBody:a.body,timeout:f.requestTimeout*(h+1)});if(a.callback)m.then(function(e){r(function(){a.callback(null,
e)},f._setTimeout||setTimeout)},function(e){r(function(){a.callback(e)},f._setTimeout||setTimeout)});else return m},_getSearchParams:function(a,e){if(this._isUndefined(a)||null===a)return e;for(var b in a)null!==b&&a.hasOwnProperty(b)&&(e+=""===e?"":"&",e+=b+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(a[b])?JSON.stringify(a[b]):a[b]));return e},_isUndefined:function(a){return void 0===a},_computeRequestHeaders:function(){var a={"x-algolia-api-key":this.apiKey,"x-algolia-application-id":this.applicationID,
"x-algolia-agent":this._ua};this.userToken&&(a["x-algolia-usertoken"]=this.userToken);this.securityTags&&(a["x-algolia-tagfilters"]=this.securityTags);this.extraHeaders&&w(this.extraHeaders,function(e){a[e.name]=e.value});return a}};n.prototype.Index.prototype={clearCache:function(){this.cache={}},addObject:function(a,e,b){if(1===arguments.length||"function"===typeof e)b=e,e=void 0;return this.as._jsonRequest({method:void 0!==e?"PUT":"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+(void 0!==
e?"/"+encodeURIComponent(e):""),body:a,hostType:"write",callback:b})},addObjects:function(a,e){for(var b={requests:[]},c=0;c<a.length;++c)b.requests.push({action:"addObject",body:a[c]});return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:b,hostType:"write",callback:e})},getObject:function(a,b,c){if(1===arguments.length||"function"===typeof b)c=b,b=void 0;var d="";if(void 0!==b)for(var d="?attributes=",g=0;g<b.length;++g)0!==g&&(d+=","),d+=
b[g];return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(a)+d,hostType:"read",callback:c})},getObjects:function(a,b,c){var d=this;if(1===arguments.length||"function"===typeof b)c=b,b=void 0;var f={requests:g(a,function(a){a={indexName:d.indexName,objectID:a};b&&(a.attributesToRetrieve=b.join(","));return a})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/*/objects",hostType:"read",body:f,callback:c})},partialUpdateObject:function(a,
b){return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(a.objectID)+"/partial",body:a,hostType:"write",callback:b})},partialUpdateObjects:function(a,b){for(var c={requests:[]},d=0;d<a.length;++d)c.requests.push({action:"partialUpdateObject",objectID:a[d].objectID,body:a[d]});return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:c,hostType:"write",callback:b})},saveObject:function(a,
b){return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(a.objectID),body:a,hostType:"write",callback:b})},saveObjects:function(a,b){for(var c={requests:[]},d=0;d<a.length;++d)c.requests.push({action:"updateObject",objectID:a[d].objectID,body:a[d]});return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:c,hostType:"write",callback:b})},deleteObject:function(a,b){if("function"===typeof a||
"string"!==typeof a&&"number"!==typeof a){var c=new q.AlgoliaSearchError("Cannot delete an object without an objectID");b=a;return"function"===typeof b?b(c):this.as._promise.reject(c)}return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(a),hostType:"write",callback:b})},deleteObjects:function(a,b){var c={requests:g(a,function(a){return{action:"deleteObject",objectID:a,body:{objectID:a}}})};return this.as._jsonRequest({method:"POST",
url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:c,hostType:"write",callback:b})},deleteByQuery:function(a,b,c){function d(a){return h.waitTask(a.taskID)}function f(){return h.deleteByQuery(a,b)}var h=this,k=h.as;if(1===arguments.length||"function"===typeof b)c=b,b={};b.attributesToRetrieve="objectID";b.hitsPerPage=1E3;this.clearCache();var m=this.search(a,b).then(function(a){if(0===a.nbHits)return a;a=g(a.hits,function(a){return a.objectID});return h.deleteObjects(a).then(d).then(f)});
if(!c)return m;m.then(function(){r(function(){c(null)},k._setTimeout||setTimeout)},function(a){r(function(){c(a)},k._setTimeout||setTimeout)})},search:function(a,b,c){if("function"===typeof a&&"object"===typeof b||"object"===typeof c)throw new q.AlgoliaSearchError("index.search usage is index.search(query, params, cb)");if(0===arguments.length||"function"===typeof a)c=a,a="";else if(1===arguments.length||"function"===typeof b)c=b,b=void 0;if("object"===typeof a&&null!==a)b=a,a=void 0;else if(void 0===
a||null===a)a="";var d="";void 0!==a&&(d+="query="+encodeURIComponent(a));void 0!==b&&(d=this.as._getSearchParams(b,d));return this._search(d,c)},browse:function(a,b,c){if(1===arguments.length||"function"===typeof b)c=b,b=void 0;var d="?page="+a;this.as._isUndefined(b)||(d+="&hitsPerPage="+b);return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse"+d,hostType:"read",callback:c})},ttAdapter:function(a){var b=this;return function(c,d){b.search(c,a,function(a,
b){a?d(a):d(b.hits)})}},waitTask:function(a,b){var c=this,d=c.as,g=this.as._jsonRequest({method:"GET",hostType:"read",url:"/1/indexes/"+encodeURIComponent(c.indexName)+"/task/"+a}).then(function(b){return"published"!==b.status?c.as._promise.delay(100).then(function(){return c.waitTask(a)}):b});if(!b)return g;g.then(function(a){r(function(){b(null,a)},d._setTimeout||setTimeout)},function(a){r(function(){b(a)},d._setTimeout||setTimeout)})},clearIndex:function(a){return this.as._jsonRequest({method:"POST",
url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/clear",hostType:"write",callback:a})},getSettings:function(a){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/settings",hostType:"read",callback:a})},setSettings:function(a,b){return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/settings",hostType:"write",body:a,callback:b})},listUserKeys:function(a){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+
encodeURIComponent(this.indexName)+"/keys",hostType:"read",callback:a})},getUserKeyACL:function(a,b){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+a,hostType:"read",callback:b})},deleteUserKey:function(a,b){return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+a,hostType:"write",callback:b})},addUserKey:function(a,b,c){if(1===arguments.length||"function"===typeof b)c=b,b=null;var d={acl:a};
b&&(d.validity=b.validity,d.maxQueriesPerIPPerHour=b.maxQueriesPerIPPerHour,d.maxHitsPerQuery=b.maxHitsPerQuery);return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",body:d,hostType:"write",callback:c})},addUserKeyWithValidity:n(function(a,b,c){return this.addUserKey(a,b,c)},v("index.addUserKeyWithValidity()","index.addUserKey()")),updateUserKey:function(a,b,c,d){if(2===arguments.length||"function"===typeof c)d=c,c=null;var e={acl:b};c&&(e.validity=
c.validity,e.maxQueriesPerIPPerHour=c.maxQueriesPerIPPerHour,e.maxHitsPerQuery=c.maxHitsPerQuery);return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+a,body:e,hostType:"write",callback:d})},_search:function(a,b){return this.as._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params:a},hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params:a}},
callback:b})},as:null,indexName:null,typeAheadArgs:null,typeAheadValueOption:null}}).call(this,c(1))},{1:1,11:11,5:5,9:9}],14:[function(c,h,e){h.exports=function(c,b,e){function d(){b.debug("JSONP: success");u||a||(u=!0,r||(b.debug("JSONP: Fail. Script loaded but did not call the callback"),p(),e(Error("Failed to load JSONP script"))))}function h(){"loaded"!==this.readyState&&"complete"!==this.readyState||d()}function p(){clearTimeout(t);l.onload=null;l.onreadystatechange=null;l.onerror=null;f.removeChild(l);
try{delete window[q],delete window[q+"_loaded"]}catch(a){window[q]=null,window[q+"_loaded"]=null}}function n(){b.debug("JSONP: Script timeout");a=!0;p();e(Error("Timeout - Could not connect to endpoint "+c))}function x(){b.debug("JSONP: Script error");u||a||(p(),e(Error("Failed to load JSONP script")))}if("GET"!==b.method)e(Error("Method "+b.method+" "+c+" is not supported by JSONP."));else{b.debug("JSONP: start");var r=!1,a=!1;m+=1;var f=document.getElementsByTagName("head")[0],l=document.createElement("script"),
q="algoliaJSONP_"+m,u=!1;window[q]=function(b){try{delete window[q]}catch(c){window[q]=void 0}a||(r=!0,p(),e(null,{body:b}))};c+="&callback="+q;b.jsonBody&&b.jsonBody.params&&(c+="&"+b.jsonBody.params);var t=setTimeout(n,b.timeout);l.onreadystatechange=h;l.onload=d;l.onerror=x;l.async=!0;l.defer=!0;l.src=c;f.appendChild(l)}};var m=0},{}],15:[function(c,h,e){(function(e){function g(a,d,e){var h=c(9),k=c(16);e=h(!0,{},e)||{};void 0===e.protocol&&(e.protocol=k());e._ua=g.ua;return new b(a,d,e)}function b(){v.apply(this,
arguments)}h.exports=g;var k=c(12),d=e.Promise||c(8).Promise,v=c(13),p=c(17),n=c(14);g.version=c(18);g.ua="Algolia for vanilla JavaScript "+g.version;var x="XDomainRequest"in window,r="withCredentials"in new XMLHttpRequest,a="timeout"in new XMLHttpRequest;k(b,v);b.prototype._request=function(b,c){return new d(function(d,e){function g(){if(!w){a||clearTimeout(v);var b=null;try{b=JSON.parse(n.responseText)}catch(c){}d({body:b,statusCode:n.status})}}function h(b){w||(a||clearTimeout(v),e(Error("Could not connect to host, error was:"+
b)))}function k(){a||(w=!0,n.abort());d(Error("Timeout - Could not connect to endpoint "+b))}if(r||x){b=p(b,c.headers);var m=c.body,n=r?new XMLHttpRequest:new XDomainRequest,v,w;n instanceof XMLHttpRequest?n.open(c.method,b,!0):n.open(c.method,b);r&&m&&"GET"!==c.method&&n.setRequestHeader("content-type","application/x-www-form-urlencoded");n.onprogress=function(){};n.onload=g;n.onerror=h;a?(n.timeout=c.timeout,n.ontimeout=k):v=setTimeout(k,c.timeout);n.send(m)}else e(Error("CORS not supported"))})};
b.prototype._request.fallback=function(a,b){a=p(a,b.headers);return new d(function(c,d){n(a,b,function(a,b){a?d(a):c(b)})})};b.prototype._promise={reject:function(a){return d.reject(a)},resolve:function(a){return d.resolve(a)},delay:function(a){return new d(function(b){setTimeout(b,a)})}}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{12:12,13:13,14:14,16:16,17:17,18:18,8:8,9:9}],16:[function(c,h,e){(function(c){h.exports=function(){var e=
c.document.location.protocol;"http:"!==e&&"https:"!==e&&(e="http:");return e}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],17:[function(c,h,e){h.exports=function(c,b){c=/\?/.test(c)?c+"&":c+"?";return c+m.encode(b)};var m=c(4)},{4:4}],18:[function(c,h,e){h.exports="3.3.2"},{}]},{},[15])(15)});
b&&(d.validity=b.validity,d.maxQueriesPerIPPerHour=b.maxQueriesPerIPPerHour,d.maxHitsPerQuery=b.maxHitsPerQuery,d.description=b.description,b.queryParameters&&(d.queryParameters=this.as._getSearchParams(b.queryParameters,"")),d.referers=b.referers);return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",body:d,hostType:"write",callback:c})},addUserKeyWithValidity:m(function(a,b,c){return this.addUserKey(a,b,c)},d("index.addUserKeyWithValidity()","index.addUserKey()")),
updateUserKey:function(a,b,c,d){if(2===arguments.length||"function"===typeof c)d=c,c=null;var g={acl:b};c&&(g.validity=c.validity,g.maxQueriesPerIPPerHour=c.maxQueriesPerIPPerHour,g.maxHitsPerQuery=c.maxHitsPerQuery,g.description=c.description,c.queryParameters&&(g.queryParameters=this.as._getSearchParams(c.queryParameters,"")),g.referers=c.referers);return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+a,body:g,hostType:"write",callback:d})},_search:function(a,
b){return this.as._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params:a},hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params:a}},callback:b})},as:null,indexName:null,typeAheadArgs:null,typeAheadValueOption:null}},{10:10,17:17,5:5,9:9}],13:[function(c,k,f){k.exports=function(c,b,f){function d(){b.debug("JSONP: success");v||a||(v=!0,q||(b.debug("JSONP: Fail. Script loaded but did not call the callback"),
m(),f(Error("Failed to load JSONP script"))))}function k(){"loaded"!==this.readyState&&"complete"!==this.readyState||d()}function m(){clearTimeout(u);l.onload=null;l.onreadystatechange=null;l.onerror=null;e.removeChild(l);try{delete window[t],delete window[t+"_loaded"]}catch(a){window[t]=null,window[t+"_loaded"]=null}}function p(){b.debug("JSONP: Script timeout");a=!0;m();f(Error("Timeout - Could not connect to endpoint "+c))}function w(){b.debug("JSONP: Script error");v||a||(m(),f(Error("Failed to load JSONP script")))}
if("GET"!==b.method)f(Error("Method "+b.method+" "+c+" is not supported by JSONP."));else{b.debug("JSONP: start");var q=!1,a=!1;n+=1;var e=document.getElementsByTagName("head")[0],l=document.createElement("script"),t="algoliaJSONP_"+n,v=!1;window[t]=function(b){try{delete window[t]}catch(c){window[t]=void 0}a||(q=!0,m(),f(null,{body:b}))};c+="&callback="+t;b.jsonBody&&b.jsonBody.params&&(c+="&"+b.jsonBody.params);var u=setTimeout(p,b.timeout);l.onreadystatechange=k;l.onload=d;l.onerror=w;l.async=
!0;l.defer=!0;l.src=c;e.appendChild(l)}};var n=0},{}],14:[function(c,k,f){(function(f){function g(a,d,e){var f=c(9),h=c(15);e=f(!0,{},e)||{};void 0===e.protocol&&(e.protocol=h());e._ua=g.ua;return new b(a,d,e)}function b(){r.apply(this,arguments)}k.exports=g;var h=c(11),d=f.Promise||c(8).Promise,r=c(12),m=c(17),p=c(16),w=c(13);g.version=c(18);g.ua="Algolia for vanilla JavaScript "+g.version;var q="XDomainRequest"in window,a="withCredentials"in new XMLHttpRequest,e="timeout"in new XMLHttpRequest;h(b,
r);b.prototype._request=function(b,c){return new d(function(d,f){function g(){if(!x){e||clearTimeout(w);var a;try{a={body:JSON.parse(r.responseText),statusCode:r.status}}catch(b){a=new m.UnparsableJSON({more:r.responseText})}a instanceof m.UnparsableJSON?f(a):d(a)}}function h(a){x||(e||clearTimeout(w),f(new m.Network({more:a})))}function k(){e||(x=!0,r.abort());f(new m.RequestTimeout)}if(a||q){b=p(b,c.headers);var n=c.body,r=a?new XMLHttpRequest:new XDomainRequest,w,x;r instanceof XMLHttpRequest?
r.open(c.method,b,!0):r.open(c.method,b);a&&n&&"GET"!==c.method&&r.setRequestHeader("content-type","application/x-www-form-urlencoded");r.onprogress=function(){};r.onload=g;r.onerror=h;e?(r.timeout=c.timeout,r.ontimeout=k):w=setTimeout(k,c.timeout);r.send(n)}else f(new m.Network("CORS not supported"))})};b.prototype._request.fallback=function(a,b){a=p(a,b.headers);return new d(function(c,d){w(a,b,function(a,b){a?d(new m.JSONP(a.message)):c(b)})})};b.prototype._promise={reject:function(a){return d.reject(a)},
resolve:function(a){return d.resolve(a)},delay:function(a){return new d(function(b){setTimeout(b,a)})}}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{11:11,12:12,13:13,15:15,16:16,17:17,18:18,8:8,9:9}],15:[function(c,k,f){(function(c){k.exports=function(){var f=c.document.location.protocol;"http:"!==f&&"https:"!==f&&(f="http:");return f}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==
typeof window?window:{})},{}],16:[function(c,k,f){k.exports=function(c,b){c=/\?/.test(c)?c+"&":c+"?";return c+n.encode(b)};var n=c(4)},{4:4}],17:[function(c,k,f){function n(c,f){var g=this;"function"===typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):g.stack=Error().stack||"Cannot get a stacktrace, browser is too old";this.name=this.constructor.name;this.message=c||"Unknown error";f&&b(f,function(b,c){g[c]=b})}function g(b,c){function f(){var g=Array.prototype.slice.call(arguments,
0);"string"!==typeof g[0]&&g.unshift(c);n.apply(this,g);this.name="AlgoliaSearch"+b+"Error"}h(f,n);return f}var b=c(10),h=c(11);h(n,Error);k.exports={AlgoliaSearchError:n,UnparsableJSON:g("UnparsableJSON","Could not parse the incoming response as JSON, see err.more for details"),RequestTimeout:g("RequestTimeout","Request timedout before getting a response"),Network:g("Network","Network issue, see err.more for details"),JSONP:g("JSONP","JSONP failed"),Unknown:g("Unknown","Unknown error occured")}},
{10:10,11:11}],18:[function(c,k,f){k.exports="3.4.0"},{}]},{},[14])(14)});
{
"name": "algoliasearch",
"version": "3.3.2",
"version": "3.4.0",
"description": "AlgoliaSearch API JavaScript client",

@@ -11,8 +11,10 @@ "main": "index.js",

"build": "PACKAGE_VERSION=$(json -f src/version.json) ./scripts/build",
"release": "git clean dist/ -f && git checkout dist/ && ./scripts/release && npm run build",
"test": "npm run test-phantom | tap-spec && npm run test-node | tap-spec && npm run lint",
"release": "git clean dist/ -f && git checkout dist/ && ./scripts/release && APP_ENV=production npm run build",
"test": "npm run test-phantom && npm run test-node && npm run lint",
"test-browser": "./scripts/test-browser",
"test-node": "node test/run-node.js",
"test-phantom": "zuul --phantom -- test/run-browser.js",
"test-ci-browser": "DEBUG=zuul* zuul --tunnel ngrok -- test/run-browser.js",
"dev": "NODE_ENV=development DEBUG=zuul* zuul --no-coverage --local 8080 -- test/run-browser.js",
"test-phantom": "DEBUG=zuul* zuul --no-coverage --phantom -- test/run-browser.js",
"test-node-integration": "node test/run-integration.js",
"test-browser-integration": "DEBUG=zuul* zuul --no-coverage -- test/run-integration.js",
"dev": "APP_ENV=development DEBUG=zuul* zuul --no-coverage --local 8080 -- test/run-browser.js",
"examples": "http-server . -a 0.0.0.0",

@@ -55,3 +57,3 @@ "lint": "eslint --quiet test/"

"es6-promise": "2.0.1",
"extend": "http://github.com/vvo/node-extend/tarball/765671f5fb7a4c0018ff1425961eccc5dcad0df8",
"extend": "2.0.1",
"foreach": "2.0.5",

@@ -64,3 +66,3 @@ "inherits": "2.0.1",

"devDependencies": {
"angular": "1.3.14",
"angular": "1.3.15",
"async": "0.9.0",

@@ -77,3 +79,3 @@ "bowser": "0.7.2",

"domready": "0.3.0",
"eslint": "0.15.0",
"eslint": "0.21.1",
"express": "4.12.1",

@@ -83,7 +85,7 @@ "faux-jax": "4.0.0-beta.2",

"jQuery-ajaxTransport-XDomainRequest": "http://github.com/MoonScript/jQuery-ajaxTransport-XDomainRequest/tarball/1.0.4",
"jquery": "2.1.3",
"jquery": "2.1.4",
"json": "9.0.3",
"json-loader": "0.5.1",
"lodash": "3.5.0",
"lodash-compat": "3.5.0",
"lodash": "3.8.0",
"lodash-compat": "3.8.0",
"morgan": "1.5.1",

@@ -96,3 +98,2 @@ "mversion": "1.10.0",

"sinon": "1.12.2",
"tap-spec": "3.0.0",
"tape": "4.0.0",

@@ -102,3 +103,3 @@ "url-parse": "1.0.0",

"xhr": "2.0.1",
"zuul": "2.1.1",
"zuul": "3.0.0",
"zuul-ngrok": "3.0.0"

@@ -105,0 +106,0 @@ },

@@ -756,3 +756,4 @@ # Algolia Search API Client for JavaScript

indexName: 'categories',
query: 'search in categories index', {
query: 'search in categories index',
params: {
hitsPerPage: 3

@@ -762,3 +763,4 @@ }

indexName: 'products',
query: 'first search in products', {
query: 'first search in products',
params: {
hitsPerPage: 3,

@@ -769,3 +771,4 @@ tagFilters: 'promotion'

indexName: 'products',
query: 'another search in products', {
query: 'another search in products',
params: {
hitsPerPage: 10

@@ -803,2 +806,4 @@ }

The resulting JSON answer contains a ```results``` array storing the underlying queries answers. The answers order is the same than the requests order.
You can specify a strategy to optimize your multiple queries:

@@ -1072,4 +1077,19 @@ - **none**: Execute the sequence of queries until the end.

We expose a method to perform this type of batch:
```js
client.batch([{
action: 'addObject',
indexName: 'clients',
body: {
name: 'Bill'
}
}, {
action: 'udpateObject',
indexName: 'fruits',
body: {
objectID: '29138',
name: 'banana'
}
}], cb)
```
The attribute **action** can have these values:

@@ -1076,0 +1096,0 @@ - addObject

@@ -8,2 +8,3 @@ // This is the AngularJS Algolia Search module

var AlgoliaSearch = require('../../AlgoliaSearch');
var errors = require('../../errors');
var inlineHeaders = require('../inline-headers');

@@ -63,3 +64,3 @@ var JSONPRequest = require('../JSONP-request');

timeoutDeferred.resolve('test');
resolve(new Error('Timeout - Could not connect to endpoint ' + url));
reject(new errors.RequestTimeout());
}, opts.timeout);

@@ -85,3 +86,7 @@

if (response.status === 0) {
reject(new Error('Network error'));
reject(
new errors.Network({
more: response
})
);
return;

@@ -108,3 +113,3 @@ }

if (err) {
reject(err);
reject(new errors.JSONP(err.message));
return;

@@ -116,3 +121,3 @@ }

return deferred.promise
return deferred.promise;
};

@@ -119,0 +124,0 @@

@@ -8,2 +8,3 @@ // This is the jQuery Algolia Search module

var AlgoliaSearch = require('../../AlgoliaSearch');
var errors = require('../../errors');
var inlineHeaders = require('../inline-headers');

@@ -58,3 +59,3 @@ var JSONPRequest = require('../JSONP-request');

if (textStatus === 'timeout') {
deferred.resolve(new Error('Timeout - Could not connect to endpoint ' + url));
deferred.reject(new errors.RequestTimeout());
return;

@@ -64,3 +65,7 @@ }

if (jqXHR.status === 0) {
deferred.reject(new Error('Network error'));
deferred.reject(
new errors.Network({
more: jqXHR
})
);
return;

@@ -84,3 +89,3 @@ }

if (err) {
deferred.reject(err);
deferred.reject(new errors.JSONP(err.message));
return;

@@ -87,0 +92,0 @@ }

@@ -10,2 +10,3 @@ // This is the standalone browser build entry point

var AlgoliaSearch = require('../../AlgoliaSearch');
var errors = require('../../errors');
var inlineHeaders = require('../inline-headers');

@@ -52,3 +53,3 @@ var JSONPRequest = require('../JSONP-request');

// very old browser, not supported
reject(new Error('CORS not supported'));
reject(new errors.Network('CORS not supported'));
return;

@@ -111,12 +112,18 @@ }

var response = null;
var out;
try {
response = JSON.parse(req.responseText);
} catch(e) {}
out = {
body: JSON.parse(req.responseText),
statusCode: req.status
};
} catch(e) {
out = new errors.UnparsableJSON({more: req.responseText});
}
resolve({
body: response,
statusCode: req.status
});
if (out instanceof errors.UnparsableJSON) {
reject(out);
} else {
resolve(out);
}
}

@@ -136,3 +143,7 @@

// - unallowed cross domain request
reject(new Error('Could not connect to host, error was:' + event));
reject(
new errors.Network({
more: event
})
);
}

@@ -146,5 +157,4 @@

resolve(new Error('Timeout - Could not connect to endpoint ' + url));
reject(new errors.RequestTimeout());
}
});

@@ -159,3 +169,3 @@ };

if (err) {
reject(err);
reject(new errors.JSONP(err.message));
return;

@@ -162,0 +172,0 @@ }

@@ -12,6 +12,7 @@ // This is the Node.JS entry point

var AlgoliaSearchServer = require('./AlgoliaSearchServer');
var errors = require('../../errors');
// does not work on node < 0.8
if (semver.satisfies(process.version, '<=0.7')) {
throw new Error('algoliasearch: Node.js version ' + process.version + ' is not supported');
throw new errors.AlgoliaSearchError('Node.js version ' + process.version + ' is not supported');
}

@@ -109,14 +110,5 @@

debugInterval = setInterval(debugBytesSent, 100);
req.socket.once('end', function stopDebug() {
opts.debug('socket end');
debugBytesSent();
clearInterval(debugInterval);
});
req.socket.once('end', stopDebug);
req.socket.once('close', stopDebug);
});
function debugBytesSent() {
var remaining = Buffer.byteLength(body) + Buffer.byteLength(req._header);
var sent = req.socket.bytesWritten;
opts.debug('sent/remaining bytes: %d/%d', sent, remaining);
}
}

@@ -130,14 +122,27 @@ }

res.on('data', data);
res.once('end', end);
res.on('data', onData);
res.once('end', onEnd);
function data(chunk) {
function onData(chunk) {
chunks.push(chunk);
}
function end() {
resolve({
statusCode: res.statusCode,
body: JSON.parse(Buffer.concat(chunks))
});
function onEnd() {
var data = Buffer.concat(chunks).toString();
var out;
try {
out = {
body: JSON.parse(data),
statusCode: res.statusCode
};
} catch(e) {
out = new errors.UnparsableJSON({more: data});
}
if (out instanceof errors.UnparsableJSON) {
reject(out);
} else {
resolve(out);
}
}

@@ -150,6 +155,7 @@ }

if (timedOut) {
opts.debug('request had already timedout')
return;
}
reject(err);
reject(new errors.Network(err.message, err));
}

@@ -161,4 +167,18 @@

req.abort();
resolve(new Error('Timeout'));
reject(new errors.RequestTimeout());
}
function debugBytesSent() {
var remaining = Buffer.byteLength(body) + Buffer.byteLength(req._header);
var sent = req.socket.bytesWritten;
opts.debug('sent/remaining bytes: %d/%d', sent, remaining);
}
function stopDebug() {
req.socket.removeListener('end', stopDebug);
req.socket.removeListener('close', stopDebug);
opts.debug('socket end');
debugBytesSent();
clearInterval(debugInterval);
}
});

@@ -165,0 +185,0 @@ };

@@ -1,1 +0,1 @@

"3.3.2"
"3.4.0"

@@ -67,3 +67,3 @@ var test = require('tape');

'x-algolia-application-id': 'AngularJSSuccess',
'x-user-agent': algolia.ua
'x-algolia-agent': algolia.ua
},

@@ -70,0 +70,0 @@ 'requestURL query matches'

@@ -68,3 +68,3 @@ var test = require('tape');

'x-algolia-application-id': 'jquery-success-applicationID',
'x-user-agent': global.$.algolia.ua
'x-algolia-agent': global.$.algolia.ua
},

@@ -71,0 +71,0 @@ 'requestURL query matches'

@@ -24,2 +24,3 @@ var test = require('tape');

'addUserKeyWithValidity',
'batch',
'updateUserKey',

@@ -26,0 +27,0 @@ 'clearCache',

@@ -20,3 +20,3 @@ var test = require('tape');

var requestTimeout = 500;
var requestTimeout = 1000;
var fixture = createFixture({

@@ -23,0 +23,0 @@ clientOptions: {

@@ -20,3 +20,8 @@ module.exports = [{

maxHitsPerQuery: 0,
indexes: ['le chat', 'black']
indexes: ['le chat', 'black'],
description: 'Le chat is black',
queryParameters: {
tagFilters: 'public'
},
referers: ['*.algolia.com']
}],

@@ -31,3 +36,6 @@ action: 'write',

maxHitsPerQuery: 0,
indexes: ['le chat', 'black']
indexes: ['le chat', 'black'],
description: 'Le chat is black',
queryParameters: 'tagFilters=public',
referers: ['*.algolia.com']
},

@@ -34,0 +42,0 @@ URL: {pathname: '/1/keys'}

@@ -23,3 +23,8 @@ var fauxJax = require('faux-jax');

maxHitsPerQuery: 0,
indexes: ['le chat', 'black']
indexes: ['le chat', 'black'],
description: 'Le chat is black',
queryParameters: {
tagFilters: 'public'
},
referers: ['*.algolia.com']
}],

@@ -34,3 +39,6 @@ action: 'write',

maxHitsPerQuery: 0,
indexes: ['le chat', 'black']
indexes: ['le chat', 'black'],
description: 'Le chat is black',
queryParameters: 'tagFilters=public',
referers: ['*.algolia.com']
},

@@ -37,0 +45,0 @@ URL: {pathname: '/1/keys/WOOmom'}

@@ -23,3 +23,8 @@ module.exports = [{

maxQueriesPerIPPerHour: 9000,
maxHitsPerQuery: 0
maxHitsPerQuery: 0,
description: 'Le chat is black',
queryParameters: {
tagFilters: 'public'
},
referers: ['*.algolia.com']
}],

@@ -33,3 +38,6 @@ action: 'write',

maxQueriesPerIPPerHour: 9000,
maxHitsPerQuery: 0
maxHitsPerQuery: 0,
description: 'Le chat is black',
queryParameters: 'tagFilters=public',
referers: ['*.algolia.com']
},

@@ -36,0 +44,0 @@ URL: {

@@ -1,2 +0,2 @@

module.exports = {
module.exports = [{
testName: 'index.getObjects(objectIDs, cb)',

@@ -23,2 +23,26 @@ object: 'index',

}
};
}, {
testName: 'index.getObjects(objectIDs, attributesToRetrieve, cb)',
object: 'index',
methodName: 'getObjects',
callArguments: [['100', '101'], ['some', 'attr']],
indexName: 'getObjects',
action: 'read',
expectedRequest: {
method: 'POST',
body: {
requests: [{
indexName: 'getObjects',
objectID: '100',
attributesToRetrieve: 'some,attr'
}, {
indexName: 'getObjects',
objectID: '101',
attributesToRetrieve: 'some,attr'
}]
},
URL: {
pathname: '/1/indexes/*/objects'
}
}
}];

@@ -26,3 +26,8 @@ var fauxJax = require('faux-jax');

maxQueriesPerIPPerHour: 9000,
maxHitsPerQuery: 0
maxHitsPerQuery: 0,
description: 'Le chat is black',
queryParameters: {
tagFilters: 'public'
},
referers: ['*.algolia.com']
}],

@@ -36,3 +41,6 @@ action: 'write',

maxQueriesPerIPPerHour: 9000,
maxHitsPerQuery: 0
maxHitsPerQuery: 0,
description: 'Le chat is black',
queryParameters: 'tagFilters=public',
referers: ['*.algolia.com']
},

@@ -39,0 +47,0 @@ URL: {

@@ -41,3 +41,3 @@ module.exports = computeExpectedRequest;

expectedRequest.headers['x-algolia-application-id'] = credentials.applicationID;
expectedRequest.headers['x-user-agent'] = algoliasearch.ua;
expectedRequest.headers['x-algolia-agent'] = algoliasearch.ua;
expectedRequest.headers.accept = 'application/json';

@@ -56,3 +56,3 @@ }

'x-algolia-application-id': credentials.applicationID,
'x-user-agent': algoliasearch.ua
'x-algolia-agent': algoliasearch.ua
};

@@ -59,0 +59,0 @@ } else {

@@ -1,10 +0,8 @@

module.exports = getHitsResponse;
module.exports = getFakeHitsResponse;
var Chance = require('chance');
var random = require('lodash-compat/number/random');
var times = require('lodash-compat/utility/times');
var chance = new Chance();
var getFakeObjects = require('./get-fake-objects');
function getHitsResponse() {
function getFakeHitsResponse() {
var nbHits = random(1, 10);

@@ -18,3 +16,3 @@

body: {
hits: times(nbHits, getOneHit),
hits: getFakeObjects(nbHits),
nbHits: nbHits,

@@ -27,9 +25,1 @@ page: 0,

}
function getOneHit() {
return {
objectID: chance.word({length: 10}),
description: chance.paragraph({sentences: random(1, 3)}),
popularity: random(1, 100)
};
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc