algoliasearch-rails 1.14.1 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
- /*! algoliasearch 3.7.5 | © 2014, 2015 Algolia SAS | github.com/algolia/algoliasearch-client-js */
2
- !function(e){var t;"undefined"!=typeof window?t=window:"undefined"!=typeof self&&(t=self),t.ALGOLIA_MIGRATION_LAYER=e()}(function(){return function e(t,n,r){function o(s,a){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[s]={exports:{}};t[s][0].call(l.exports,function(e){var n=t[s][1][e];return o(n?n:e)},l,l.exports,e,t,n,r)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(e,t,n){function r(e,t){for(var n in t)e.setAttribute(n,t[n])}function o(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function i(e,t){e.onreadystatechange=function(){("complete"==this.readyState||"loaded"==this.readyState)&&(this.onreadystatechange=null,t(null,e))}}t.exports=function(e,t,n){var s=document.head||document.getElementsByTagName("head")[0],a=document.createElement("script");"function"==typeof t&&(n=t,t={}),t=t||{},n=n||function(){},a.type=t.type||"text/javascript",a.charset=t.charset||"utf8",a.async="async"in t?!!t.async:!0,a.src=e,t.attrs&&r(a,t.attrs),t.text&&(a.text=""+t.text);var u="onload"in a?o:i;u(a,n),a.onload||o(a,n),s.appendChild(a)}},{}],2:[function(e,t,n){"use strict";function r(e){for(var t=new RegExp("cdn\\.jsdelivr\\.net/algoliasearch/latest/"+e.replace(".","\\.")+"(?:\\.min)?\\.js$"),n=document.getElementsByTagName("script"),r=!1,o=0,i=n.length;i>o;o++)if(n[o].src&&t.test(n[o].src)){r=!0;break}return r}t.exports=r},{}],3:[function(e,t,n){"use strict";function r(t){var n=e(1),r="//cdn.jsdelivr.net/algoliasearch/2/"+t+".min.js",i="-- 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 --";window.console&&(window.console.warn?window.console.warn(i):window.console.log&&window.console.log(i));try{document.write("<script>window.ALGOLIA_SUPPORTS_DOCWRITE = true</script>"),window.ALGOLIA_SUPPORTS_DOCWRITE===!0?(document.write('<script src="'+r+'"></script>'),o("document.write")()):n(r,o("DOMElement"))}catch(s){n(r,o("DOMElement"))}}function o(e){return function(){var t="AlgoliaSearch: loaded V2 script using "+e;window.console&&window.console.log&&window.console.log(t)}}t.exports=r},{1:1}],4:[function(e,t,n){"use strict";function r(){var e="-- 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 --";window.AlgoliaSearch=function(){throw new Error(e)},window.AlgoliaSearchHelper=function(){throw new Error(e)},window.AlgoliaExplainResults=function(){throw new Error(e)}}t.exports=r},{}],5:[function(e,t,n){"use strict";function r(t){var n=e(2),r=e(3),o=e(4);n(t)?r(t):o()}r("algoliasearch")},{2:2,3:3,4:4}]},{},[5])(5)}),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.algoliasearch=e()}}(function(){var e;return function t(e,n,r){function o(s,a){if(!n[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[s]={exports:{}};e[s][0].call(l.exports,function(t){var n=e[s][1][t];return o(n?n:t)},l,l.exports,t,e,n,r)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function o(e){return"function"==typeof e}function i(e){return"number"==typeof e}function s(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!i(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,i,u,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[e],a(n))return!1;if(o(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,i=new Array(r-1),u=1;r>u;u++)i[u-1]=arguments[u];n.apply(this,i)}else if(s(n)){for(r=arguments.length,i=new Array(r-1),u=1;r>u;u++)i[u-1]=arguments[u];for(c=n.slice(),r=c.length,u=0;r>u;u++)c[u].apply(this,i)}return!0},r.prototype.addListener=function(e,t){var n;if(!o(t))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,o(t.listener)?t.listener:t),this._events[e]?s(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,s(this._events[e])&&!this._events[e].warned){var n;n=a(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,n&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())}return this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}if(!o(t))throw TypeError("listener must be a function");var r=!1;return n.listener=t,this.on(e,n),this},r.prototype.removeListener=function(e,t){var n,r,i,a;if(!o(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],i=n.length,r=-1,n===t||o(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(s(n)){for(a=i;a-->0;)if(n[a]===t||n[a].listener&&n[a].listener===t){r=a;break}if(0>r)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],o(n))this.removeListener(e,n);else for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?o(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.listenerCount=function(e,t){var n;return n=e._events&&e._events[t]?o(e._events[t])?1:e._events[t].length:0}},{}],2:[function(e,t,n){function r(){l=!1,a.length?c=a.concat(c):f=-1,c.length&&o()}function o(){if(!l){var e=setTimeout(r);l=!0;for(var t=c.length;t;){for(a=c,c=[];++f<t;)a[f].run();f=-1,t=c.length}a=null,l=!1,clearTimeout(e)}}function i(e,t){this.fun=e,this.array=t}function s(){}var a,u=t.exports={},c=[],l=!1,f=-1;u.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new i(e,t)),1!==c.length||l||setTimeout(o,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=s,u.addListener=s,u.once=s,u.off=s,u.removeListener=s,u.removeAllListeners=s,u.emit=s,u.binding=function(e){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(e){throw new Error("process.chdir is not supported")},u.umask=function(){return 0}},{}],3:[function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,n,i){t=t||"&",n=n||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t);var u=1e3;i&&"number"==typeof i.maxKeys&&(u=i.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var l=0;c>l;++l){var f,d,p,h,y=e[l].replace(a,"%20"),m=y.indexOf(n);m>=0?(f=y.substr(0,m),d=y.substr(m+1)):(f=y,d=""),p=decodeURIComponent(f),h=decodeURIComponent(d),r(s,p)?o(s[p])?s[p].push(h):s[p]=[s[p],h]:s[p]=h}return s};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],4:[function(e,t,n){"use strict";function r(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var o=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,n,a){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?r(s(e),function(s){var a=encodeURIComponent(o(s))+n;return i(e[s])?r(e[s],function(e){return a+encodeURIComponent(o(e))}).join(t):a+encodeURIComponent(o(e[s]))}).join(t):a?encodeURIComponent(o(a))+n+encodeURIComponent(o(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},{}],5:[function(e,t,n){"use strict";n.decode=n.parse=e(3),n.encode=n.stringify=e(4)},{3:3,4:4}],6:[function(e,t,n){function r(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function o(){var e=arguments,t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+n.humanize(this.diff),!t)return e;var r="color: "+this.color;e=[e[0],r,"color: inherit"].concat(Array.prototype.slice.call(e,1));var o=0,i=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))}),e.splice(i,0,r),e}function i(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(e){try{null==e?n.storage.removeItem("debug"):n.storage.debug=e}catch(t){}}function a(){var e;try{e=n.storage.debug}catch(t){}return e}function u(){try{return window.localStorage}catch(e){}}n=t.exports=e(7),n.log=i,n.formatArgs=o,n.save=s,n.load=a,n.useColors=r,n.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:u(),n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(e){return JSON.stringify(e)},n.enable(a())},{7:7}],7:[function(e,t,n){function r(){return n.colors[l++%n.colors.length]}function o(e){function t(){}function o(){var e=o,t=+new Date,i=t-(c||t);e.diff=i,e.prev=c,e.curr=t,c=t,null==e.useColors&&(e.useColors=n.useColors()),null==e.color&&e.useColors&&(e.color=r());var s=Array.prototype.slice.call(arguments);s[0]=n.coerce(s[0]),"string"!=typeof s[0]&&(s=["%o"].concat(s));var a=0;s[0]=s[0].replace(/%([a-z%])/g,function(t,r){if("%%"===t)return t;a++;var o=n.formatters[r];if("function"==typeof o){var i=s[a];t=o.call(e,i),s.splice(a,1),a--}return t}),"function"==typeof n.formatArgs&&(s=n.formatArgs.apply(e,s));var u=o.log||n.log||console.log.bind(console);u.apply(e,s)}t.enabled=!1,o.enabled=!0;var i=n.enabled(e)?o:t;return i.namespace=e,i}function i(e){n.save(e);for(var t=(e||"").split(/[\s,]+/),r=t.length,o=0;r>o;o++)t[o]&&(e=t[o].replace(/\*/g,".*?"),"-"===e[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")))}function s(){n.enable("")}function a(e){var t,r;for(t=0,r=n.skips.length;r>t;t++)if(n.skips[t].test(e))return!1;for(t=0,r=n.names.length;r>t;t++)if(n.names[t].test(e))return!0;return!1}function u(e){return e instanceof Error?e.stack||e.message:e}n=t.exports=o,n.coerce=u,n.disable=s,n.enable=i,n.enabled=a,n.humanize=e(8),n.names=[],n.skips=[],n.formatters={};var c,l=0},{8:8}],8:[function(e,t,n){function r(e){if(e=""+e,!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*f;case"days":case"day":case"d":return n*l;case"hours":case"hour":case"hrs":case"hr":case"h":return n*c;case"minutes":case"minute":case"mins":case"min":case"m":return n*u;case"seconds":case"second":case"secs":case"sec":case"s":return n*a;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}}}function o(e){return e>=l?Math.round(e/l)+"d":e>=c?Math.round(e/c)+"h":e>=u?Math.round(e/u)+"m":e>=a?Math.round(e/a)+"s":e+"ms"}function i(e){return s(e,l,"day")||s(e,c,"hour")||s(e,u,"minute")||s(e,a,"second")||e+" ms"}function s(e,t,n){return t>e?void 0:1.5*t>e?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}var a=1e3,u=60*a,c=60*u,l=24*c,f=365.25*l;t.exports=function(e,t){return t=t||{},"string"==typeof e?r(e):t["long"]?i(e):o(e)}},{}],9:[function(t,n,r){(function(r,o){(function(){"use strict";function i(e){return"function"==typeof e||"object"==typeof e&&null!==e}function s(e){return"function"==typeof e}function a(e){return"object"==typeof e&&null!==e}function u(e){G=e}function c(e){X=e}function l(){var e=r.nextTick,t=r.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(t)&&"0"===t[1]&&"10"===t[2]&&(e=setImmediate),function(){e(y)}}function f(){return function(){Q(y)}}function d(){var e=0,t=new Z(y),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function p(){var e=new MessageChannel;return e.port1.onmessage=y,function(){e.port2.postMessage(0)}}function h(){return function(){setTimeout(y,1)}}function y(){for(var e=0;W>e;e+=2){var t=ne[e],n=ne[e+1];t(n),ne[e]=void 0,ne[e+1]=void 0}W=0}function m(){try{var e=t,n=e("vertx");return Q=n.runOnLoop||n.runOnContext,f()}catch(r){return h()}}function v(){}function g(){return new TypeError("You cannot resolve a promise with itself")}function b(){return new TypeError("A promises callback cannot return that same promise.")}function w(e){try{return e.then}catch(t){return se.error=t,se}}function x(e,t,n,r){try{e.call(t,n,r)}catch(o){return o}}function _(e,t,n){X(function(e){var r=!1,o=x(n,t,function(n){r||(r=!0,t!==n?A(e,n):O(e,n))},function(t){r||(r=!0,k(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&o&&(r=!0,k(e,o))},e)}function j(e,t){t._state===oe?O(e,t._result):t._state===ie?k(e,t._result):P(t,void 0,function(t){A(e,t)},function(t){k(e,t)})}function T(e,t){if(t.constructor===e.constructor)j(e,t);else{var n=w(t);n===se?k(e,se.error):void 0===n?O(e,t):s(n)?_(e,t,n):O(e,t)}}function A(e,t){e===t?k(e,g()):i(t)?T(e,t):O(e,t)}function S(e){e._onerror&&e._onerror(e._result),I(e)}function O(e,t){e._state===re&&(e._result=t,e._state=oe,0!==e._subscribers.length&&X(I,e))}function k(e,t){e._state===re&&(e._state=ie,e._result=t,X(S,e))}function P(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+oe]=n,o[i+ie]=r,0===i&&e._state&&X(I,e)}function I(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r,o,i=e._result,s=0;s<t.length;s+=3)r=t[s],o=t[s+n],r?q(n,r,o,i):o(i);e._subscribers.length=0}}function R(){this.error=null}function E(e,t){try{return e(t)}catch(n){return ae.error=n,ae}}function q(e,t,n,r){var o,i,a,u,c=s(n);if(c){if(o=E(n,r),o===ae?(u=!0,i=o.error,o=null):a=!0,t===o)return void k(t,b())}else o=r,a=!0;t._state!==re||(c&&a?A(t,o):u?k(t,i):e===oe?O(t,o):e===ie&&k(t,o))}function U(e,t){try{t(function(t){A(e,t)},function(t){k(e,t)})}catch(n){k(e,n)}}function C(e,t){var n=this;n._instanceConstructor=e,n.promise=new e(v),n._validateInput(t)?(n._input=t,n.length=t.length,n._remaining=t.length,n._init(),0===n.length?O(n.promise,n._result):(n.length=n.length||0,n._enumerate(),0===n._remaining&&O(n.promise,n._result))):k(n.promise,n._validationError())}function N(e){return new ue(this,e).promise}function L(e){function t(e){A(o,e)}function n(e){k(o,e)}var r=this,o=new r(v);if(!V(e))return k(o,new TypeError("You must pass an array to race.")),o;for(var i=e.length,s=0;o._state===re&&i>s;s++)P(r.resolve(e[s]),void 0,t,n);return o}function D(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(v);return A(n,e),n}function M(e){var t=this,n=new t(v);return k(n,e),n}function H(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function F(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function B(e){this._id=pe++,this._state=void 0,this._result=void 0,this._subscribers=[],v!==e&&(s(e)||H(),this instanceof B||F(),U(this,e))}function J(){var e;if("undefined"!=typeof o)e=o;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=e.Promise;(!n||"[object Promise]"!==Object.prototype.toString.call(n.resolve())||n.cast)&&(e.Promise=he)}var K;K=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var Q,G,$,V=K,W=0,X=({}.toString,function(e,t){ne[W]=e,ne[W+1]=t,W+=2,2===W&&(G?G(y):$())}),Y="undefined"!=typeof window?window:void 0,z=Y||{},Z=z.MutationObserver||z.WebKitMutationObserver,ee="undefined"!=typeof r&&"[object process]"==={}.toString.call(r),te="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,ne=new Array(1e3);$=ee?l():Z?d():te?p():void 0===Y&&"function"==typeof t?m():h();var re=void 0,oe=1,ie=2,se=new R,ae=new R;C.prototype._validateInput=function(e){return V(e)},C.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},C.prototype._init=function(){this._result=new Array(this.length)};var ue=C;C.prototype._enumerate=function(){for(var e=this,t=e.length,n=e.promise,r=e._input,o=0;n._state===re&&t>o;o++)e._eachEntry(r[o],o)},C.prototype._eachEntry=function(e,t){var n=this,r=n._instanceConstructor;a(e)?e.constructor===r&&e._state!==re?(e._onerror=null,n._settledAt(e._state,t,e._result)):n._willSettleAt(r.resolve(e),t):(n._remaining--,n._result[t]=e)},C.prototype._settledAt=function(e,t,n){var r=this,o=r.promise;o._state===re&&(r._remaining--,e===ie?k(o,n):r._result[t]=n),0===r._remaining&&O(o,r._result)},C.prototype._willSettleAt=function(e,t){var n=this;P(e,void 0,function(e){n._settledAt(oe,t,e)},function(e){n._settledAt(ie,t,e)})};var ce=N,le=L,fe=D,de=M,pe=0,he=B;B.all=ce,B.race=le,B.resolve=fe,B.reject=de,B._setScheduler=u,B._setAsap=c,B._asap=X,B.prototype={constructor:B,then:function(e,t){var n=this,r=n._state;if(r===oe&&!e||r===ie&&!t)return this;var o=new this.constructor(v),i=n._result;if(r){var s=arguments[r-1];X(function(){q(r,o,s,i)})}else P(n,o,e,t);return o},"catch":function(e){return this.then(null,e)}};var ye=J,me={Promise:he,polyfill:ye};"function"==typeof e&&e.amd?e(function(){return me}):"undefined"!=typeof n&&n.exports?n.exports=me:"undefined"!=typeof this&&(this.ES6Promise=me),ye()}).call(this)}).call(this,t(2),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],10:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],11:[function(e,t,n){var r=e(14),o=e(18),i=e(30),s=i(r,o);t.exports=s},{14:14,18:18,30:30}],12:[function(e,t,n){function r(e,t){if("function"!=typeof e)throw new TypeError(o);return t=i(void 0===t?e.length-1:+t||0,0),function(){for(var n=arguments,r=-1,o=i(n.length-t,0),s=Array(o);++r<o;)s[r]=n[t+r];switch(t){case 0:return e.call(this,s);case 1:return e.call(this,n[0],s);case 2:return e.call(this,n[0],n[1],s)}var a=Array(t+1);for(r=-1;++r<t;)a[r]=n[r];return a[t]=s,e.apply(this,a)}}var o="Expected a function",i=Math.max;t.exports=r},{}],13:[function(e,t,n){function r(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}t.exports=r},{}],14:[function(e,t,n){function r(e,t){for(var n=-1,r=e.length;++n<r&&t(e[n],n,e)!==!1;);return e}t.exports=r},{}],15:[function(e,t,n){function r(e,t){return null==t?e:o(t,i(t),e)}var o=e(17),i=e(55);t.exports=r},{17:17,55:55}],16:[function(e,t,n){function r(e,t,n,y,m,v,g){var w;if(n&&(w=m?n(e,y,m):n(e)),void 0!==w)return w;if(!p(e))return e;var x=f(e);if(x){if(w=u(e),!t)return o(e,w)}else{var j=M.call(e),T=j==b;if(j!=_&&j!=h&&(!T||m))return L[j]?c(e,j,t):m?e:{};if(d(e))return m?e:{};if(w=l(T?{}:e),!t)return s(w,e)}v||(v=[]),g||(g=[]);for(var A=v.length;A--;)if(v[A]==e)return g[A];return v.push(e),g.push(w),(x?i:a)(e,function(o,i){w[i]=r(o,t,n,i,e,v,g)}),w}var o=e(13),i=e(14),s=e(15),a=e(21),u=e(33),c=e(34),l=e(35),f=e(47),d=e(37),p=e(50),h="[object Arguments]",y="[object Array]",m="[object Boolean]",v="[object Date]",g="[object Error]",b="[object Function]",w="[object Map]",x="[object Number]",_="[object Object]",j="[object RegExp]",T="[object Set]",A="[object String]",S="[object WeakMap]",O="[object ArrayBuffer]",k="[object Float32Array]",P="[object Float64Array]",I="[object Int8Array]",R="[object Int16Array]",E="[object Int32Array]",q="[object Uint8Array]",U="[object Uint8ClampedArray]",C="[object Uint16Array]",N="[object Uint32Array]",L={};L[h]=L[y]=L[O]=L[m]=L[v]=L[k]=L[P]=L[I]=L[R]=L[E]=L[x]=L[_]=L[j]=L[A]=L[q]=L[U]=L[C]=L[N]=!0,L[g]=L[b]=L[w]=L[T]=L[S]=!1;var D=Object.prototype,M=D.toString;t.exports=r},{13:13,14:14,15:15,21:21,33:33,34:34,35:35,37:37,47:47,50:50}],17:[function(e,t,n){function r(e,t,n){n||(n={});for(var r=-1,o=t.length;++r<o;){var i=t[r];n[i]=e[i]}return n}t.exports=r},{}],18:[function(e,t,n){var r=e(21),o=e(28),i=o(r);t.exports=i},{21:21,28:28}],19:[function(e,t,n){var r=e(29),o=r();t.exports=o},{29:29}],20:[function(e,t,n){function r(e,t){return o(e,t,i)}var o=e(19),i=e(56);t.exports=r},{19:19,56:56}],21:[function(e,t,n){function r(e,t){return o(e,t,i)}var o=e(19),i=e(55);t.exports=r},{19:19,55:55}],22:[function(e,t,n){function r(e,t,n,d,p){if(!u(e))return e;var h=a(t)&&(s(t)||l(t)),y=h?void 0:f(t);return o(y||t,function(o,s){if(y&&(s=o,o=t[s]),c(o))d||(d=[]),p||(p=[]),i(e,t,s,r,n,d,p);else{var a=e[s],u=n?n(a,o,s,e,t):void 0,l=void 0===u;l&&(u=o),void 0===u&&(!h||s in e)||!l&&(u===u?u===a:a!==a)||(e[s]=u)}}),e}var o=e(14),i=e(23),s=e(47),a=e(36),u=e(50),c=e(41),l=e(53),f=e(55);t.exports=r},{14:14,23:23,36:36,41:41,47:47,50:50,53:53,55:55}],23:[function(e,t,n){function r(e,t,n,r,f,d,p){for(var h=d.length,y=t[n];h--;)if(d[h]==y)return void(e[n]=p[h]);var m=e[n],v=f?f(m,y,n,e,t):void 0,g=void 0===v;g&&(v=y,a(y)&&(s(y)||c(y))?v=s(m)?m:a(m)?o(m):[]:u(y)||i(y)?v=i(m)?l(m):u(m)?m:{}:g=!1),d.push(y),p.push(v),g?e[n]=r(v,y,f,d,p):(v===v?v!==m:m===m)&&(e[n]=v)}var o=e(13),i=e(46),s=e(47),a=e(36),u=e(51),c=e(53),l=e(54);t.exports=r},{13:13,36:36,46:46,47:47,51:51,53:53,54:54}],24:[function(e,t,n){function r(e){return function(t){return null==t?void 0:o(t)[e]}}var o=e(43);t.exports=r},{43:43}],25:[function(e,t,n){function r(e,t,n){if("function"!=typeof e)return o;if(void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,o){return e.call(t,n,r,o)};case 4:return function(n,r,o,i){return e.call(t,n,r,o,i)};case 5:return function(n,r,o,i,s){return e.call(t,n,r,o,i,s)}}return function(){return e.apply(t,arguments)}}var o=e(59);t.exports=r},{59:59}],26:[function(e,t,n){(function(e){function n(e){var t=new r(e.byteLength),n=new o(t);return n.set(new o(e)),t}var r=e.ArrayBuffer,o=e.Uint8Array;t.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],27:[function(e,t,n){function r(e){return s(function(t,n){var r=-1,s=null==t?0:n.length,a=s>2?n[s-2]:void 0,u=s>2?n[2]:void 0,c=s>1?n[s-1]:void 0;for("function"==typeof a?(a=o(a,c,5),s-=2):(a="function"==typeof c?c:void 0,s-=a?1:0),u&&i(n[0],n[1],u)&&(a=3>s?void 0:a,s=1);++r<s;){var l=n[r];l&&e(t,l,a)}return t})}var o=e(25),i=e(39),s=e(12);t.exports=r},{12:12,25:25,39:39}],28:[function(e,t,n){function r(e,t){return function(n,r){var a=n?o(n):0;if(!i(a))return e(n,r);for(var u=t?a:-1,c=s(n);(t?u--:++u<a)&&r(c[u],u,c)!==!1;);return n}}var o=e(31),i=e(40),s=e(43);t.exports=r},{31:31,40:40,43:43}],29:[function(e,t,n){function r(e){return function(t,n,r){for(var i=o(t),s=r(t),a=s.length,u=e?a:-1;e?u--:++u<a;){var c=s[u];if(n(i[c],c,i)===!1)break}return t}}var o=e(43);t.exports=r},{43:43}],30:[function(e,t,n){function r(e,t){return function(n,r,s){return"function"==typeof r&&void 0===s&&i(n)?e(n,r):t(n,o(r,s,3))}}var o=e(25),i=e(47);t.exports=r},{25:25,47:47}],31:[function(e,t,n){var r=e(24),o=r("length");t.exports=o},{24:24}],32:[function(e,t,n){function r(e,t){var n=null==e?void 0:e[t];return o(n)?n:void 0}var o=e(49);t.exports=r},{49:49}],33:[function(e,t,n){function r(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&i.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var o=Object.prototype,i=o.hasOwnProperty;t.exports=r},{}],34:[function(e,t,n){(function(n){function r(e,t,n){var r=e.constructor;switch(t){case l:return o(e);case i:case s:return new r(+e);case f:case d:case p:case h:case y:case m:case v:case g:case b:r instanceof r&&(r=_[t]);var x=e.buffer;return new r(n?o(x):x,e.byteOffset,e.length);case a:case c:return new r(e);case u:var j=new r(e.source,w.exec(e));j.lastIndex=e.lastIndex}return j}var o=e(26),i="[object Boolean]",s="[object Date]",a="[object Number]",u="[object RegExp]",c="[object String]",l="[object ArrayBuffer]",f="[object Float32Array]",d="[object Float64Array]",p="[object Int8Array]",h="[object Int16Array]",y="[object Int32Array]",m="[object Uint8Array]",v="[object Uint8ClampedArray]",g="[object Uint16Array]",b="[object Uint32Array]",w=/\w*$/,x=n.Uint8Array,_={};_[f]=n.Float32Array,_[d]=n.Float64Array,_[p]=n.Int8Array,_[h]=n.Int16Array,_[y]=n.Int32Array,_[m]=x,_[v]=n.Uint8ClampedArray,_[g]=n.Uint16Array,_[b]=n.Uint32Array,t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{26:26}],35:[function(e,t,n){function r(e){var t=e.constructor;return"function"==typeof t&&t instanceof t||(t=Object),new t}t.exports=r},{}],36:[function(e,t,n){function r(e){return null!=e&&i(o(e))}var o=e(31),i=e(40);t.exports=r},{31:31,40:40}],37:[function(e,t,n){var r=function(){try{Object({toString:0}+"")}catch(e){return function(){return!1}}return function(e){return"function"!=typeof e.toString&&"string"==typeof(e+"")}}();t.exports=r},{}],38:[function(e,t,n){function r(e,t){return e="number"==typeof e||o.test(e)?+e:-1,t=null==t?i:t,e>-1&&e%1==0&&t>e}var o=/^\d+$/,i=9007199254740991;t.exports=r},{}],39:[function(e,t,n){function r(e,t,n){if(!s(n))return!1;var r=typeof t;if("number"==r?o(n)&&i(t,n.length):"string"==r&&t in n){var a=n[t];return e===e?e===a:a!==a}return!1}var o=e(36),i=e(38),s=e(50);t.exports=r},{36:36,38:38,50:50}],40:[function(e,t,n){function r(e){return"number"==typeof e&&e>-1&&e%1==0&&o>=e}var o=9007199254740991;t.exports=r},{}],41:[function(e,t,n){function r(e){return!!e&&"object"==typeof e}t.exports=r},{}],42:[function(e,t,n){function r(e){for(var t=c(e),n=t.length,r=n&&e.length,l=!!r&&a(r)&&(i(e)||o(e)||u(e)),d=-1,p=[];++d<n;){var h=t[d];(l&&s(h,r)||f.call(e,h))&&p.push(h)}return p}var o=e(46),i=e(47),s=e(38),a=e(40),u=e(52),c=e(56),l=Object.prototype,f=l.hasOwnProperty;t.exports=r},{38:38,40:40,46:46,47:47,52:52,56:56}],43:[function(e,t,n){function r(e){if(s.unindexedChars&&i(e)){for(var t=-1,n=e.length,r=Object(e);++t<n;)r[t]=e.charAt(t);return r}return o(e)?e:Object(e)}var o=e(50),i=e(52),s=e(58);t.exports=r},{50:50,52:52,58:58}],44:[function(e,t,n){function r(e,t,n,r){return t&&"boolean"!=typeof t&&s(e,t,n)?t=!1:"function"==typeof t&&(r=n,n=t,t=!1),"function"==typeof n?o(e,t,i(n,r,1)):o(e,t)}var o=e(16),i=e(25),s=e(39);t.exports=r},{16:16,25:25,39:39}],45:[function(e,t,n){function r(e,t,n){return"function"==typeof t?o(e,!0,i(t,n,1)):o(e,!0)}var o=e(16),i=e(25);t.exports=r},{16:16,25:25}],46:[function(e,t,n){function r(e){return i(e)&&o(e)&&a.call(e,"callee")&&!u.call(e,"callee")}var o=e(36),i=e(41),s=Object.prototype,a=s.hasOwnProperty,u=s.propertyIsEnumerable;t.exports=r},{36:36,41:41}],47:[function(e,t,n){var r=e(32),o=e(40),i=e(41),s="[object Array]",a=Object.prototype,u=a.toString,c=r(Array,"isArray"),l=c||function(e){return i(e)&&o(e.length)&&u.call(e)==s};t.exports=l},{32:32,40:40,41:41}],48:[function(e,t,n){function r(e){return o(e)&&a.call(e)==i}var o=e(50),i="[object Function]",s=Object.prototype,a=s.toString;t.exports=r},{50:50}],49:[function(e,t,n){function r(e){return null==e?!1:o(e)?f.test(c.call(e)):s(e)&&(i(e)?f:a).test(e)}var o=e(48),i=e(37),s=e(41),a=/^\[object .+?Constructor\]$/,u=Object.prototype,c=Function.prototype.toString,l=u.hasOwnProperty,f=RegExp("^"+c.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=r},{37:37,41:41,48:48}],50:[function(e,t,n){function r(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}t.exports=r},{}],51:[function(e,t,n){function r(e){var t;if(!a(e)||d.call(e)!=c||s(e)||i(e)||!f.call(e,"constructor")&&(t=e.constructor,"function"==typeof t&&!(t instanceof t)))return!1;var n;return u.ownLast?(o(e,function(e,t,r){return n=f.call(r,t),!1}),n!==!1):(o(e,function(e,t){n=t}),void 0===n||f.call(e,n))}var o=e(20),i=e(46),s=e(37),a=e(41),u=e(58),c="[object Object]",l=Object.prototype,f=l.hasOwnProperty,d=l.toString;t.exports=r},{20:20,37:37,41:41,46:46,58:58}],52:[function(e,t,n){function r(e){return"string"==typeof e||o(e)&&a.call(e)==i}var o=e(41),i="[object String]",s=Object.prototype,a=s.toString;t.exports=r},{41:41}],53:[function(e,t,n){function r(e){return i(e)&&o(e.length)&&!!P[R.call(e)]}var o=e(40),i=e(41),s="[object Arguments]",a="[object Array]",u="[object Boolean]",c="[object Date]",l="[object Error]",f="[object Function]",d="[object Map]",p="[object Number]",h="[object Object]",y="[object RegExp]",m="[object Set]",v="[object String]",g="[object WeakMap]",b="[object ArrayBuffer]",w="[object Float32Array]",x="[object Float64Array]",_="[object Int8Array]",j="[object Int16Array]",T="[object Int32Array]",A="[object Uint8Array]",S="[object Uint8ClampedArray]",O="[object Uint16Array]",k="[object Uint32Array]",P={};P[w]=P[x]=P[_]=P[j]=P[T]=P[A]=P[S]=P[O]=P[k]=!0,P[s]=P[a]=P[b]=P[u]=P[c]=P[l]=P[f]=P[d]=P[p]=P[h]=P[y]=P[m]=P[v]=P[g]=!1;var I=Object.prototype,R=I.toString;t.exports=r},{40:40,41:41}],54:[function(e,t,n){function r(e){return o(e,i(e))}var o=e(17),i=e(56);t.exports=r},{17:17,56:56}],55:[function(e,t,n){var r=e(32),o=e(36),i=e(50),s=e(42),a=e(58),u=r(Object,"keys"),c=u?function(e){var t=null==e?void 0:e.constructor;return"function"==typeof t&&t.prototype===e||("function"==typeof e?a.enumPrototypes:o(e))?s(e):i(e)?u(e):[];
3
- }:s;t.exports=c},{32:32,36:36,42:42,50:50,58:58}],56:[function(e,t,n){function r(e){if(null==e)return[];l(e)||(e=Object(e));var t=e.length;t=t&&c(t)&&(s(e)||i(e)||f(e))&&t||0;for(var n=e.constructor,r=-1,o=a(n)&&n.prototype||T,p=o===e,h=Array(t),y=t>0,v=d.enumErrorProps&&(e===j||e instanceof Error),g=d.enumPrototypes&&a(e);++r<t;)h[r]=r+"";for(var w in e)g&&"prototype"==w||v&&("message"==w||"name"==w)||y&&u(w,t)||"constructor"==w&&(p||!S.call(e,w))||h.push(w);if(d.nonEnumShadows&&e!==T){var P=e===A?x:e===j?m:O.call(e),I=k[P]||k[b];for(P==b&&(o=T),t=_.length;t--;){w=_[t];var R=I[w];p&&R||(R?!S.call(e,w):e[w]===o[w])||h.push(w)}}return h}var o=e(14),i=e(46),s=e(47),a=e(48),u=e(38),c=e(40),l=e(50),f=e(52),d=e(58),p="[object Array]",h="[object Boolean]",y="[object Date]",m="[object Error]",v="[object Function]",g="[object Number]",b="[object Object]",w="[object RegExp]",x="[object String]",_=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],j=Error.prototype,T=Object.prototype,A=String.prototype,S=T.hasOwnProperty,O=T.toString,k={};k[p]=k[y]=k[g]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},k[h]=k[x]={constructor:!0,toString:!0,valueOf:!0},k[m]=k[v]=k[w]={constructor:!0,toString:!0},k[b]={constructor:!0},o(_,function(e){for(var t in k)if(S.call(k,t)){var n=k[t];n[e]=S.call(n,e)}}),t.exports=r},{14:14,38:38,40:40,46:46,47:47,48:48,50:50,52:52,58:58}],57:[function(e,t,n){var r=e(22),o=e(27),i=o(r);t.exports=i},{22:22,27:27}],58:[function(e,t,n){var r=Array.prototype,o=Error.prototype,i=Object.prototype,s=i.propertyIsEnumerable,a=r.splice,u={};!function(e){var t=function(){this.x=e},n={0:e,length:e},r=[];t.prototype={valueOf:e,y:e};for(var i in new t)r.push(i);u.enumErrorProps=s.call(o,"message")||s.call(o,"name"),u.enumPrototypes=s.call(t,"prototype"),u.nonEnumShadows=!/valueOf/.test(r),u.ownLast="x"!=r[0],u.spliceObjects=(a.call(n,0,1),!n[0]),u.unindexedChars="x"[0]+Object("x")[0]!="xx"}(1,0),t.exports=u},{}],59:[function(e,t,n){function r(e){return e}t.exports=r},{}],60:[function(e,t,n){(function(n){"use strict";function r(t,n,r){var s=e(6)("algoliasearch"),a=e(44),u=e(47),c="Usage: algoliasearch(applicationID, apiKey, opts)";if(!t)throw new f.AlgoliaSearchError("Please provide an application ID. "+c);if(!n)throw new f.AlgoliaSearchError("Please provide an API key. "+c);this.applicationID=t,this.apiKey=n;var l=[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},r=r||{};var d=r.protocol||"https:",p=void 0===r.timeout?2e3:r.timeout;if(/:$/.test(d)||(d+=":"),"http:"!==r.protocol&&"https:"!==r.protocol)throw new f.AlgoliaSearchError("protocol must be `http:` or `https:` (was `"+r.protocol+"`)");r.hosts?u(r.hosts)?(this.hosts.read=a(r.hosts),this.hosts.write=a(r.hosts)):(this.hosts.read=a(r.hosts.read),this.hosts.write=a(r.hosts.write)):(this.hosts.read=[this.applicationID+"-dsn.algolia.net"].concat(l),this.hosts.write=[this.applicationID+".algolia.net"].concat(l)),this.hosts.read=o(this.hosts.read,i(d)),this.hosts.write=o(this.hosts.write,i(d)),this.requestTimeout=p,this.extraHeaders=[],this.cache={},this._ua=r._ua,this._useCache=void 0===r._useCache?!0:r._useCache,this._setTimeout=r._setTimeout,s("init done, %j",this)}function o(e,t){for(var n=[],r=0;r<e.length;++r)n.push(t(e[r],r));return n}function i(e){return function(t){return e+"//"+t.toLowerCase()}}function s(){var e="Not implemented in this environment.\nIf you feel this is a mistake, write to support@algolia.com";throw new f.AlgoliaSearchError(e)}function a(e,t){var n=e.toLowerCase().replace(".","").replace("()","");return"algoliasearch: `"+e+"` was replaced by `"+t+"`. Please see https://github.com/algolia/algoliasearch-client-js/wiki/Deprecated#"+n}function u(e,t){t(e,0)}function c(e,t){function n(){return r||(console.log(t),r=!0),e.apply(this,arguments)}var r=!1;return n}function l(e){if(void 0===Array.prototype.toJSON)return JSON.stringify(e);var t=Array.prototype.toJSON;delete Array.prototype.toJSON;var n=JSON.stringify(e);return Array.prototype.toJSON=t,n}t.exports=r;var f=e(66);r.prototype={deleteIndex:function(e,t){return this._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(e),hostType:"write",callback:t})},moveIndex:function(e,t,n){var r={operation:"move",destination:t};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(e)+"/operation",body:r,hostType:"write",callback:n})},copyIndex:function(e,t,n){var r={operation:"copy",destination:t};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(e)+"/operation",body:r,hostType:"write",callback:n})},getLogs:function(e,t,n){return 0===arguments.length||"function"==typeof e?(n=e,e=0,t=10):(1===arguments.length||"function"==typeof t)&&(n=t,t=10),this._jsonRequest({method:"GET",url:"/1/logs?offset="+e+"&length="+t,hostType:"read",callback:n})},listIndexes:function(e,t){var n="";return void 0===e||"function"==typeof e?t=e:n="?page="+e,this._jsonRequest({method:"GET",url:"/1/indexes"+n,hostType:"read",callback:t})},initIndex:function(e){return new this.Index(this,e)},listUserKeys:function(e){return this._jsonRequest({method:"GET",url:"/1/keys",hostType:"read",callback:e})},getUserKeyACL:function(e,t){return this._jsonRequest({method:"GET",url:"/1/keys/"+e,hostType:"read",callback:t})},deleteUserKey:function(e,t){return this._jsonRequest({method:"DELETE",url:"/1/keys/"+e,hostType:"write",callback:t})},addUserKey:function(e,t,n){(1===arguments.length||"function"==typeof t)&&(n=t,t=null);var r={acl:e};return t&&(r.validity=t.validity,r.maxQueriesPerIPPerHour=t.maxQueriesPerIPPerHour,r.maxHitsPerQuery=t.maxHitsPerQuery,r.indexes=t.indexes,r.description=t.description,t.queryParameters&&(r.queryParameters=this._getSearchParams(t.queryParameters,"")),r.referers=t.referers),this._jsonRequest({method:"POST",url:"/1/keys",body:r,hostType:"write",callback:n})},addUserKeyWithValidity:c(function(e,t,n){return this.addUserKey(e,t,n)},a("client.addUserKeyWithValidity()","client.addUserKey()")),updateUserKey:function(e,t,n,r){(2===arguments.length||"function"==typeof n)&&(r=n,n=null);var o={acl:t};return n&&(o.validity=n.validity,o.maxQueriesPerIPPerHour=n.maxQueriesPerIPPerHour,o.maxHitsPerQuery=n.maxHitsPerQuery,o.indexes=n.indexes,o.description=n.description,n.queryParameters&&(o.queryParameters=this._getSearchParams(n.queryParameters,"")),o.referers=n.referers),this._jsonRequest({method:"PUT",url:"/1/keys/"+e,body:o,hostType:"write",callback:r})},setSecurityTags:function(e){if("[object Array]"===Object.prototype.toString.call(e)){for(var t=[],n=0;n<e.length;++n)if("[object Array]"===Object.prototype.toString.call(e[n])){for(var r=[],o=0;o<e[n].length;++o)r.push(e[n][o]);t.push("("+r.join(",")+")")}else t.push(e[n]);e=t.join(",")}this.securityTags=e},setUserToken:function(e){this.userToken=e},startQueriesBatch:c(function(){this._batch=[]},a("client.startQueriesBatch()","client.search()")),addQueryInBatch:c(function(e,t,n){this._batch.push({indexName:e,query:t,params:n})},a("client.addQueryInBatch()","client.search()")),clearCache:function(){this.cache={}},sendQueriesBatch:c(function(e){return this.search(this._batch,e)},a("client.sendQueriesBatch()","client.search()")),setRequestTimeout:function(e){e&&(this.requestTimeout=parseInt(e,10))},search:function(e,t){var n=this,r={requests:o(e,function(e){var t="";return void 0!==e.query&&(t+="query="+encodeURIComponent(e.query)),{indexName:e.indexName,params:n._getSearchParams(e.params,t)}})};return this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",body:r,hostType:"read",callback:t})},batch:function(e,t){return this._jsonRequest({method:"POST",url:"/1/indexes/*/batch",body:{requests:e},hostType:"write",callback:t})},destroy:s,enableRateLimitForward:s,disableRateLimitForward:s,useSecuredAPIKey:s,disableSecuredAPIKey:s,generateSecuredApiKey:s,Index:function(e,t){this.indexName=t,this.as=e,this.typeAheadArgs=null,this.typeAheadValueOption=null,this.cache={}},setExtraHeader:function(e,t){this.extraHeaders.push({name:e.toLowerCase(),value:t})},_sendQueriesBatch:function(e,t){function n(){for(var t="",n=0;n<e.requests.length;++n){var r="/1/indexes/"+encodeURIComponent(e.requests[n].indexName)+"?"+e.requests[n].params;t+=n+"="+encodeURIComponent(r)+"&"}return t}return this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",body:e,hostType:"read",fallback:{method:"GET",url:"/1/indexes/*",body:{params:n()}},callback:t})},_jsonRequest:function(t){function r(e,u){function p(e){var t=e&&e.body&&e.body.message&&e.body.status||e.statusCode||e&&e.body&&200;i("received response: statusCode: %s, computed statusCode: %d, headers: %j",e.statusCode,t,e.headers),n.env.DEBUG&&-1!==n.env.DEBUG.indexOf("debugBody")&&i("body: %j",e.body);var r=200===t||201===t,o=!r&&4!==Math.floor(t/100)&&1!==Math.floor(t/100);if(a._useCache&&r&&s&&(s[m]=e.body),r)return e.body;if(o)return c+=1,y();var u=new f.AlgoliaSearchError(e.body&&e.body.message);return a._promise.reject(u)}function h(n){return i("error: %s, stack: %s",n.message,n.stack),n instanceof f.AlgoliaSearchError||(n=new f.Unknown(n&&n.message,n)),c+=1,n instanceof f.Unknown||n instanceof f.UnparsableJSON||!e.fallback&&n instanceof f.Network||c>=a.hosts[t.hostType].length&&(d||!t.fallback||!a._request.fallback)?a._promise.reject(n):(a.hostIndex[t.hostType]=++a.hostIndex[t.hostType]%a.hosts[t.hostType].length,n instanceof f.RequestTimeout?y():(a._request.fallback&&!a.useFallback&&(a.useFallback=!0),r(e,u)))}function y(){return a.hostIndex[t.hostType]=++a.hostIndex[t.hostType]%a.hosts[t.hostType].length,u.timeout=a.requestTimeout*(c+1),r(e,u)}var m;if(a._useCache&&(m=t.url),a._useCache&&o&&(m+="_body_"+u.body),a._useCache&&s&&void 0!==s[m])return i("serving response from cache"),a._promise.resolve(JSON.parse(l(s[m])));if(c>=a.hosts[t.hostType].length||a.useFallback&&!d)return t.fallback&&a._request.fallback&&!d?(i("switching to fallback"),c=0,u.method=t.fallback.method,u.url=t.fallback.url,u.jsonBody=t.fallback.body,u.jsonBody&&(u.body=l(u.jsonBody)),u.timeout=a.requestTimeout*(c+1),a.hostIndex[t.hostType]=0,d=!0,r(a._request.fallback,u)):(i("could not get any response"),a._promise.reject(new f.AlgoliaSearchError("Cannot connect to the AlgoliaSearch API. Send an email to support@algolia.com to report and resolve the issue. Application id was: "+a.applicationID)));var v=a.hosts[t.hostType][a.hostIndex[t.hostType]]+u.url,g={body:o,jsonBody:t.body,method:u.method,headers:a._computeRequestHeaders(),timeout:u.timeout,debug:i};return i("method: %s, url: %s, headers: %j, timeout: %d",g.method,v,g.headers,g.timeout),e===a._request.fallback&&i("using fallback"),e.call(a,v,g).then(p,h)}var o,i=e(6)("algoliasearch:"+t.url),s=t.cache,a=this,c=0,d=!1;void 0!==t.body&&(o=l(t.body)),i("request start");var p=a.useFallback&&t.fallback,h=p?t.fallback:t,y=r(p?a._request.fallback:a._request,{url:h.url,method:h.method,body:o,jsonBody:t.body,timeout:a.requestTimeout*(c+1)});return t.callback?void y.then(function(e){u(function(){t.callback(null,e)},a._setTimeout||setTimeout)},function(e){u(function(){t.callback(e)},a._setTimeout||setTimeout)}):y},_getSearchParams:function(e,t){if(this._isUndefined(e)||null===e)return t;for(var n in e)null!==n&&void 0!==e[n]&&e.hasOwnProperty(n)&&(t+=""===t?"":"&",t+=n+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(e[n])?l(e[n]):e[n]));return t},_isUndefined:function(e){return void 0===e},_computeRequestHeaders:function(){var t=e(11),n={"x-algolia-api-key":this.apiKey,"x-algolia-application-id":this.applicationID,"x-algolia-agent":this._ua};return this.userToken&&(n["x-algolia-usertoken"]=this.userToken),this.securityTags&&(n["x-algolia-tagfilters"]=this.securityTags),this.extraHeaders&&t(this.extraHeaders,function(e){n[e.name]=e.value}),n}},r.prototype.Index.prototype={clearCache:function(){this.cache={}},addObject:function(e,t,n){var r=this;return(1===arguments.length||"function"==typeof t)&&(n=t,t=void 0),this.as._jsonRequest({method:void 0!==t?"PUT":"POST",url:"/1/indexes/"+encodeURIComponent(r.indexName)+(void 0!==t?"/"+encodeURIComponent(t):""),body:e,hostType:"write",callback:n})},addObjects:function(e,t){for(var n=this,r={requests:[]},o=0;o<e.length;++o){var i={action:"addObject",body:e[o]};r.requests.push(i)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/batch",body:r,hostType:"write",callback:t})},getObject:function(e,t,n){var r=this;(1===arguments.length||"function"==typeof t)&&(n=t,t=void 0);var o="";if(void 0!==t){o="?attributes=";for(var i=0;i<t.length;++i)0!==i&&(o+=","),o+=t[i]}return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/"+encodeURIComponent(e)+o,hostType:"read",callback:n})},getObjects:function(e,t,n){var r=this;(1===arguments.length||"function"==typeof t)&&(n=t,t=void 0);var i={requests:o(e,function(e){var n={indexName:r.indexName,objectID:e};return t&&(n.attributesToRetrieve=t.join(",")),n})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/*/objects",hostType:"read",body:i,callback:n})},partialUpdateObject:function(e,t){var n=this;return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/"+encodeURIComponent(e.objectID)+"/partial",body:e,hostType:"write",callback:t})},partialUpdateObjects:function(e,t){for(var n=this,r={requests:[]},o=0;o<e.length;++o){var i={action:"partialUpdateObject",objectID:e[o].objectID,body:e[o]};r.requests.push(i)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/batch",body:r,hostType:"write",callback:t})},saveObject:function(e,t){var n=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/"+encodeURIComponent(e.objectID),body:e,hostType:"write",callback:t})},saveObjects:function(e,t){for(var n=this,r={requests:[]},o=0;o<e.length;++o){var i={action:"updateObject",objectID:e[o].objectID,body:e[o]};r.requests.push(i)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/batch",body:r,hostType:"write",callback:t})},deleteObject:function(e,t){if("function"==typeof e||"string"!=typeof e&&"number"!=typeof e){var n=new f.AlgoliaSearchError("Cannot delete an object without an objectID");return t=e,"function"==typeof t?t(n):this.as._promise.reject(n)}var r=this;return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/"+encodeURIComponent(e),hostType:"write",callback:t})},deleteObjects:function(e,t){var n=this,r={requests:o(e,function(e){return{action:"deleteObject",objectID:e,body:{objectID:e}}})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/batch",body:r,hostType:"write",callback:t})},deleteByQuery:function(e,t,n){function r(e){if(0===e.nbHits)return e;var t=o(e.hits,function(e){return e.objectID});return l.deleteObjects(t).then(i).then(s)}function i(e){return l.waitTask(e.taskID)}function s(){return l.deleteByQuery(e,t)}function a(){u(function(){n(null)},f._setTimeout||setTimeout)}function c(e){u(function(){n(e)},f._setTimeout||setTimeout)}var l=this,f=l.as;(1===arguments.length||"function"==typeof t)&&(n=t,t={}),t.attributesToRetrieve="objectID",t.hitsPerPage=1e3,this.clearCache();var d=this.search(e,t).then(r);return n?void d.then(a,c):d},search:function(e,t,n){if("function"==typeof e&&"object"==typeof t||"object"==typeof n)throw new f.AlgoliaSearchError("index.search usage is index.search(query, params, cb)");0===arguments.length||"function"==typeof e?(n=e,e=""):(1===arguments.length||"function"==typeof t)&&(n=t,t=void 0),"object"==typeof e&&null!==e?(t=e,e=void 0):(void 0===e||null===e)&&(e="");var r="";return void 0!==e&&(r+="query="+encodeURIComponent(e)),void 0!==t&&(r=this.as._getSearchParams(t,r)),this._search(r,n)},browse:function(t,n,r){var o,i,s=e(57),a=this;0===arguments.length||1===arguments.length&&"function"==typeof arguments[0]?(o=0,r=arguments[0],t=void 0):"number"==typeof arguments[0]?(o=arguments[0],"number"==typeof arguments[1]?i=arguments[1]:"function"==typeof arguments[1]&&(r=arguments[1],i=void 0),t=void 0,n=void 0):"object"==typeof arguments[0]?("function"==typeof arguments[1]&&(r=arguments[1]),n=arguments[0],t=void 0):"string"==typeof arguments[0]&&"function"==typeof arguments[1]&&(r=arguments[1],n=void 0),n=s({},n||{},{page:o,hitsPerPage:i,query:t});var u=this.as._getSearchParams(n,"");return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(a.indexName)+"/browse?"+u,hostType:"read",callback:r})},browseFrom:function(e,t){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse?cursor="+e,hostType:"read",callback:t})},browseAll:function(t,n){function r(e){if(!a._stopped){var t;t=void 0!==e?"cursor="+encodeURIComponent(e):l,u._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(c.indexName)+"/browse?"+t,hostType:"read",callback:o})}}function o(e,t){return a._stopped?void 0:e?void a._error(e):(a._result(t),void 0===t.cursor?void a._end():void r(t.cursor))}"object"==typeof t&&(n=t,t=void 0);var i=e(57),s=e(61),a=new s,u=this.as,c=this,l=u._getSearchParams(i({},n||{},{query:t}),"");return r(),a},ttAdapter:function(e){var t=this;return function(n,r,o){var i;i="function"==typeof o?o:r,t.search(n,e,function(e,t){return e?void i(e):void i(t.hits)})}},waitTask:function(e,t){function n(){return l._jsonRequest({method:"GET",hostType:"read",url:"/1/indexes/"+encodeURIComponent(c.indexName)+"/task/"+e}).then(function(e){a++;var t=i*a*a;return t>s&&(t=s),"published"!==e.status?l._promise.delay(t).then(n):e})}function r(e){u(function(){t(null,e)},l._setTimeout||setTimeout)}function o(e){u(function(){t(e)},l._setTimeout||setTimeout)}var i=100,s=5e3,a=0,c=this,l=c.as,f=n();return t?void f.then(r,o):f},clearIndex:function(e){var t=this;return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/clear",hostType:"write",callback:e})},getSettings:function(e){var t=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/settings",hostType:"read",callback:e})},setSettings:function(e,t){var n=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/settings",hostType:"write",body:e,callback:t})},listUserKeys:function(e){var t=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/keys",hostType:"read",callback:e})},getUserKeyACL:function(e,t){var n=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/keys/"+e,hostType:"read",callback:t})},deleteUserKey:function(e,t){var n=this;return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/keys/"+e,hostType:"write",callback:t})},addUserKey:function(e,t,n){(1===arguments.length||"function"==typeof t)&&(n=t,t=null);var r={acl:e};return t&&(r.validity=t.validity,r.maxQueriesPerIPPerHour=t.maxQueriesPerIPPerHour,r.maxHitsPerQuery=t.maxHitsPerQuery,r.description=t.description,t.queryParameters&&(r.queryParameters=this.as._getSearchParams(t.queryParameters,"")),r.referers=t.referers),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",body:r,hostType:"write",callback:n})},addUserKeyWithValidity:c(function(e,t,n){return this.addUserKey(e,t,n)},a("index.addUserKeyWithValidity()","index.addUserKey()")),updateUserKey:function(e,t,n,r){(2===arguments.length||"function"==typeof n)&&(r=n,n=null);var o={acl:t};return n&&(o.validity=n.validity,o.maxQueriesPerIPPerHour=n.maxQueriesPerIPPerHour,o.maxHitsPerQuery=n.maxHitsPerQuery,o.description=n.description,n.queryParameters&&(o.queryParameters=this.as._getSearchParams(n.queryParameters,"")),o.referers=n.referers),this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+e,body:o,hostType:"write",callback:r})},_search:function(e,t){return this.as._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params:e},hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params:e}},callback:t})},as:null,indexName:null,typeAheadArgs:null,typeAheadValueOption:null}}).call(this,e(2))},{11:11,2:2,44:44,47:47,57:57,6:6,61:61,66:66}],61:[function(e,t,n){"use strict";function r(){}t.exports=r;var o=e(10),i=e(1).EventEmitter;o(r,i),r.prototype.stop=function(){this._stopped=!0,this._clean()},r.prototype._end=function(){this.emit("end"),this._clean()},r.prototype._error=function(e){this.emit("error",e),this._clean()},r.prototype._result=function(e){this.emit("result",e)},r.prototype._clean=function(){this.removeAllListeners("stop"),this.removeAllListeners("end"),this.removeAllListeners("error"),this.removeAllListeners("result")}},{1:1,10:10}],62:[function(e,t,n){"use strict";function r(t,n,i){var s=e(45),a=e(63);return i=s(i||{}),void 0===i.protocol&&(i.protocol=a()),i._ua=i._ua||r.ua,new o(t,n,i)}function o(){a.apply(this,arguments)}t.exports=r;var i=e(10),s=window.Promise||e(9).Promise,a=e(60),u=e(66),c=e(64),l=e(65);r.version=e(67),r.ua="Algolia for vanilla JavaScript "+r.version,window.__algolia={debug:e(6),algoliasearch:r};var f={hasXMLHttpRequest:"XMLHttpRequest"in window,hasXDomainRequest:"XDomainRequest"in window,cors:"withCredentials"in new XMLHttpRequest,timeout:"timeout"in new XMLHttpRequest};i(o,a),o.prototype._request=function(e,t){return new s(function(n,r){function o(){if(!l){f.timeout||clearTimeout(a);var e;try{e={body:JSON.parse(p.responseText),statusCode:p.status,headers:p.getAllResponseHeaders&&p.getAllResponseHeaders()||{}}}catch(t){e=new u.UnparsableJSON({more:p.responseText})}e instanceof u.UnparsableJSON?r(e):n(e)}}function i(e){l||(f.timeout||clearTimeout(a),r(new u.Network({more:e})))}function s(){f.timeout||(l=!0,p.abort()),r(new u.RequestTimeout)}if(!f.cors&&!f.hasXDomainRequest)return void r(new u.Network("CORS not supported"));e=c(e,t.headers);var a,l,d=t.body,p=f.cors?new XMLHttpRequest:new XDomainRequest;p instanceof XMLHttpRequest?p.open(t.method,e,!0):p.open(t.method,e),f.cors&&(d&&("POST"===t.method?p.setRequestHeader("content-type","application/x-www-form-urlencoded"):p.setRequestHeader("content-type","application/json")),p.setRequestHeader("accept","application/json")),p.onprogress=function(){},p.onload=o,p.onerror=i,f.timeout?(p.timeout=t.timeout,p.ontimeout=s):a=setTimeout(s,t.timeout),p.send(d)})},o.prototype._request.fallback=function(e,t){return e=c(e,t.headers),new s(function(n,r){l(e,t,function(e,t){return e?void r(e):void n(t)})})},o.prototype._promise={reject:function(e){return s.reject(e)},resolve:function(e){return s.resolve(e)},delay:function(e){return new s(function(t){setTimeout(t,e)})}}},{10:10,45:45,6:6,60:60,63:63,64:64,65:65,66:66,67:67,9:9}],63:[function(e,t,n){"use strict";function r(){var e=window.document.location.protocol;return"http:"!==e&&"https:"!==e&&(e="http:"),e}t.exports=r},{}],64:[function(e,t,n){"use strict";function r(e,t){return e+=/\?/.test(e)?"&":"?",e+o.encode(t)}t.exports=r;var o=e(5)},{5:5}],65:[function(e,t,n){"use strict";function r(e,t,n){function r(){t.debug("JSONP: success"),y||f||(y=!0,l||(t.debug("JSONP: Fail. Script loaded but did not call the callback"),a(),n(new o.JSONPScriptFail)))}function s(){("loaded"===this.readyState||"complete"===this.readyState)&&r()}function a(){clearTimeout(m),p.onload=null,p.onreadystatechange=null,p.onerror=null,d.removeChild(p);try{delete window[h],delete window[h+"_loaded"]}catch(e){window[h]=null,window[h+"_loaded"]=null}}function u(){t.debug("JSONP: Script timeout"),f=!0,a(),n(new o.RequestTimeout)}function c(){t.debug("JSONP: Script error"),y||f||(a(),n(new o.JSONPScriptError))}if("GET"!==t.method)return void n(new Error("Method "+t.method+" "+e+" is not supported by JSONP."));t.debug("JSONP: start");var l=!1,f=!1;i+=1;var d=document.getElementsByTagName("head")[0],p=document.createElement("script"),h="algoliaJSONP_"+i,y=!1;window[h]=function(e){try{delete window[h]}catch(t){window[h]=void 0}f||(l=!0,a(),n(null,{body:e}))},e+="&callback="+h,t.jsonBody&&t.jsonBody.params&&(e+="&"+t.jsonBody.params);var m=setTimeout(u,t.timeout);p.onreadystatechange=s,p.onload=r,p.onerror=c,p.async=!0,p.defer=!0,p.src=e,d.appendChild(p)}t.exports=r;var o=e(66),i=0},{66:66}],66:[function(e,t,n){"use strict";function r(t,n){var r=e(11),o=this;"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):o.stack=(new Error).stack||"Cannot get a stacktrace, browser is too old",this.name=this.constructor.name,this.message=t||"Unknown error",n&&r(n,function(e,t){o[t]=e})}function o(e,t){function n(){var n=Array.prototype.slice.call(arguments,0);"string"!=typeof n[0]&&n.unshift(t),r.apply(this,n),this.name="AlgoliaSearch"+e+"Error"}return i(n,r),n}var i=e(10);i(r,Error),t.exports={AlgoliaSearchError:r,UnparsableJSON:o("UnparsableJSON","Could not parse the incoming response as JSON, see err.more for details"),RequestTimeout:o("RequestTimeout","Request timedout before getting a response"),Network:o("Network","Network issue, see err.more for details"),JSONPScriptFail:o("JSONPScriptFail","<script> was loaded but did not call our provided callback"),JSONPScriptError:o("JSONPScriptError","<script> unable to load due to an `error` event on it"),Unknown:o("Unknown","Unknown error occured")}},{10:10,11:11}],67:[function(e,t,n){t.exports="3.7.5"},{}]},{},[62])(62)});
1
+ /*! algoliasearch 3.18.0 | © 2014, 2015 Algolia SAS | github.com/algolia/algoliasearch-client-js */
2
+ !function(e){var t;"undefined"!=typeof window?t=window:"undefined"!=typeof self&&(t=self),t.ALGOLIA_MIGRATION_LAYER=e()}(function(){return function e(t,o,r){function n(i,a){if(!o[i]){if(!t[i]){var c="function"==typeof require&&require;if(!a&&c)return c(i,!0);if(s)return s(i,!0);var u=new Error("Cannot find module '"+i+"'");throw u.code="MODULE_NOT_FOUND",u}var l=o[i]={exports:{}};t[i][0].call(l.exports,function(e){var o=t[i][1][e];return n(o?o:e)},l,l.exports,e,t,o,r)}return o[i].exports}for(var s="function"==typeof require&&require,i=0;i<r.length;i++)n(r[i]);return n}({1:[function(e,t,o){function r(e,t){for(var o in t)e.setAttribute(o,t[o])}function n(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function s(e,t){e.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,t(null,e))}}t.exports=function(e,t,o){var i=document.head||document.getElementsByTagName("head")[0],a=document.createElement("script");"function"==typeof t&&(o=t,t={}),t=t||{},o=o||function(){},a.type=t.type||"text/javascript",a.charset=t.charset||"utf8",a.async=!("async"in t)||!!t.async,a.src=e,t.attrs&&r(a,t.attrs),t.text&&(a.text=""+t.text);var c="onload"in a?n:s;c(a,o),a.onload||n(a,o),i.appendChild(a)}},{}],2:[function(e,t,o){"use strict";function r(e){for(var t=new RegExp("cdn\\.jsdelivr\\.net/algoliasearch/latest/"+e.replace(".","\\.")+"(?:\\.min)?\\.js$"),o=document.getElementsByTagName("script"),r=!1,n=0,s=o.length;n<s;n++)if(o[n].src&&t.test(o[n].src)){r=!0;break}return r}t.exports=r},{}],3:[function(e,t,o){"use strict";function r(t){var o=e(1),r="//cdn.jsdelivr.net/algoliasearch/2/"+t+".min.js",s="-- 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 --";window.console&&(window.console.warn?window.console.warn(s):window.console.log&&window.console.log(s));try{document.write("<script>window.ALGOLIA_SUPPORTS_DOCWRITE = true</script>"),window.ALGOLIA_SUPPORTS_DOCWRITE===!0?(document.write('<script src="'+r+'"></script>'),n("document.write")()):o(r,n("DOMElement"))}catch(i){o(r,n("DOMElement"))}}function n(e){return function(){var t="AlgoliaSearch: loaded V2 script using "+e;window.console&&window.console.log&&window.console.log(t)}}t.exports=r},{1:1}],4:[function(e,t,o){"use strict";function r(){var e="-- 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 --";window.AlgoliaSearch=function(){throw new Error(e)},window.AlgoliaSearchHelper=function(){throw new Error(e)},window.AlgoliaExplainResults=function(){throw new Error(e)}}t.exports=r},{}],5:[function(e,t,o){"use strict";function r(t){var o=e(2),r=e(3),n=e(4);o(t)?r(t):n()}r("algoliasearch")},{2:2,3:3,4:4}]},{},[5])(5)}),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.algoliasearch=e()}}(function(){var e;return function t(e,o,r){function n(i,a){if(!o[i]){if(!e[i]){var c="function"==typeof require&&require;if(!a&&c)return c(i,!0);if(s)return s(i,!0);var u=new Error("Cannot find module '"+i+"'");throw u.code="MODULE_NOT_FOUND",u}var l=o[i]={exports:{}};e[i][0].call(l.exports,function(t){var o=e[i][1][t];return n(o?o:t)},l,l.exports,t,e,o,r)}return o[i].exports}for(var s="function"==typeof require&&require,i=0;i<r.length;i++)n(r[i]);return n}({1:[function(e,t,o){function r(e){if(e=""+e,!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var o=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return o*p;case"days":case"day":case"d":return o*l;case"hours":case"hour":case"hrs":case"hr":case"h":return o*u;case"minutes":case"minute":case"mins":case"min":case"m":return o*c;case"seconds":case"second":case"secs":case"sec":case"s":return o*a;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o}}}}function n(e){return e>=l?Math.round(e/l)+"d":e>=u?Math.round(e/u)+"h":e>=c?Math.round(e/c)+"m":e>=a?Math.round(e/a)+"s":e+"ms"}function s(e){return i(e,l,"day")||i(e,u,"hour")||i(e,c,"minute")||i(e,a,"second")||e+" ms"}function i(e,t,o){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+o:Math.ceil(e/t)+" "+o+"s"}var a=1e3,c=60*a,u=60*c,l=24*u,p=365.25*l;t.exports=function(e,t){return t=t||{},"string"==typeof e?r(e):t["long"]?s(e):n(e)}},{}],2:[function(e,t,o){function r(){h&&l&&(h=!1,l.length?p=l.concat(p):d=-1,p.length&&n())}function n(){if(!h){var e=a(r);h=!0;for(var t=p.length;t;){for(l=p,p=[];++d<t;)l&&l[d].run();d=-1,t=p.length}l=null,h=!1,c(e)}}function s(e,t){this.fun=e,this.array=t}function i(){}var a,c,u=t.exports={};!function(){try{a=setTimeout}catch(e){a=function(){throw new Error("setTimeout is not defined")}}try{c=clearTimeout}catch(e){c=function(){throw new Error("clearTimeout is not defined")}}}();var l,p=[],h=!1,d=-1;u.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var o=1;o<arguments.length;o++)t[o-1]=arguments[o];p.push(new s(e,t)),1!==p.length||h||a(n,0)},s.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=i,u.addListener=i,u.once=i,u.off=i,u.removeListener=i,u.removeAllListeners=i,u.emit=i,u.binding=function(e){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(e){throw new Error("process.chdir is not supported")},u.umask=function(){return 0}},{}],3:[function(e,t,o){function r(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function n(){var e=arguments,t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+o.humanize(this.diff),!t)return e;var r="color: "+this.color;e=[e[0],r,"color: inherit"].concat(Array.prototype.slice.call(e,1));var n=0,s=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(n++,"%c"===e&&(s=n))}),e.splice(s,0,r),e}function s(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function i(e){try{null==e?o.storage.removeItem("debug"):o.storage.debug=e}catch(t){}}function a(){var e;try{e=o.storage.debug}catch(t){}return e}function c(){try{return window.localStorage}catch(e){}}o=t.exports=e(4),o.log=s,o.formatArgs=n,o.save=i,o.load=a,o.useColors=r,o.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:c(),o.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],o.formatters.j=function(e){return JSON.stringify(e)},o.enable(a())},{4:4}],4:[function(e,t,o){function r(){return o.colors[l++%o.colors.length]}function n(e){function t(){}function n(){var e=n,t=+new Date,s=t-(u||t);e.diff=s,e.prev=u,e.curr=t,u=t,null==e.useColors&&(e.useColors=o.useColors()),null==e.color&&e.useColors&&(e.color=r());var i=Array.prototype.slice.call(arguments);i[0]=o.coerce(i[0]),"string"!=typeof i[0]&&(i=["%o"].concat(i));var a=0;i[0]=i[0].replace(/%([a-z%])/g,function(t,r){if("%%"===t)return t;a++;var n=o.formatters[r];if("function"==typeof n){var s=i[a];t=n.call(e,s),i.splice(a,1),a--}return t}),"function"==typeof o.formatArgs&&(i=o.formatArgs.apply(e,i));var c=n.log||o.log||console.log.bind(console);c.apply(e,i)}t.enabled=!1,n.enabled=!0;var s=o.enabled(e)?n:t;return s.namespace=e,s}function s(e){o.save(e);for(var t=(e||"").split(/[\s,]+/),r=t.length,n=0;n<r;n++)t[n]&&(e=t[n].replace(/\*/g,".*?"),"-"===e[0]?o.skips.push(new RegExp("^"+e.substr(1)+"$")):o.names.push(new RegExp("^"+e+"$")))}function i(){o.enable("")}function a(e){var t,r;for(t=0,r=o.skips.length;t<r;t++)if(o.skips[t].test(e))return!1;for(t=0,r=o.names.length;t<r;t++)if(o.names[t].test(e))return!0;return!1}function c(e){return e instanceof Error?e.stack||e.message:e}o=t.exports=n,o.coerce=c,o.disable=i,o.enable=s,o.enabled=a,o.humanize=e(1),o.names=[],o.skips=[],o.formatters={};var u,l=0},{1:1}],5:[function(t,o,r){(function(r,n){(function(){"use strict";function s(e){return"function"==typeof e||"object"==typeof e&&null!==e}function i(e){return"function"==typeof e}function a(e){W=e}function c(e){Z=e}function u(){return function(){r.nextTick(f)}}function l(){return function(){X(f)}}function p(){var e=0,t=new oe(f),o=document.createTextNode("");return t.observe(o,{characterData:!0}),function(){o.data=e=++e%2}}function h(){var e=new MessageChannel;return e.port1.onmessage=f,function(){e.port2.postMessage(0)}}function d(){return function(){setTimeout(f,1)}}function f(){for(var e=0;e<z;e+=2){var t=se[e],o=se[e+1];t(o),se[e]=void 0,se[e+1]=void 0}z=0}function y(){try{var e=t,o=e("vertx");return X=o.runOnLoop||o.runOnContext,l()}catch(r){return d()}}function m(e,t){var o=this,r=new this.constructor(g);void 0===r[ce]&&L(r);var n=o._state;if(n){var s=arguments[n-1];Z(function(){A(n,r,s,o._result)})}else P(o,r,e,t);return r}function v(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var o=new t(g);return k(o,e),o}function g(){}function b(){return new TypeError("You cannot resolve a promise with itself")}function w(){return new TypeError("A promises callback cannot return that same promise.")}function _(e){try{return e.then}catch(t){return he.error=t,he}}function x(e,t,o,r){try{e.call(t,o,r)}catch(n){return n}}function T(e,t,o){Z(function(e){var r=!1,n=x(o,t,function(o){r||(r=!0,t!==o?k(e,o):O(e,o))},function(t){r||(r=!0,q(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&n&&(r=!0,q(e,n))},e)}function j(e,t){t._state===le?O(e,t._result):t._state===pe?q(e,t._result):P(t,void 0,function(t){k(e,t)},function(t){q(e,t)})}function S(e,t,o){t.constructor===e.constructor&&o===ie&&constructor.resolve===ae?j(e,t):o===he?q(e,he.error):void 0===o?O(e,t):i(o)?T(e,t,o):O(e,t)}function k(e,t){e===t?q(e,b()):s(t)?S(e,t,_(t)):O(e,t)}function R(e){e._onerror&&e._onerror(e._result),E(e)}function O(e,t){e._state===ue&&(e._result=t,e._state=le,0!==e._subscribers.length&&Z(E,e))}function q(e,t){e._state===ue&&(e._state=pe,e._result=t,Z(R,e))}function P(e,t,o,r){var n=e._subscribers,s=n.length;e._onerror=null,n[s]=t,n[s+le]=o,n[s+pe]=r,0===s&&e._state&&Z(E,e)}function E(e){var t=e._subscribers,o=e._state;if(0!==t.length){for(var r,n,s=e._result,i=0;i<t.length;i+=3)r=t[i],n=t[i+o],r?A(o,r,n,s):n(s);e._subscribers.length=0}}function I(){this.error=null}function U(e,t){try{return e(t)}catch(o){return de.error=o,de}}function A(e,t,o,r){var n,s,a,c,u=i(o);if(u){if(n=U(o,r),n===de?(c=!0,s=n.error,n=null):a=!0,t===n)return void q(t,w())}else n=r,a=!0;t._state!==ue||(u&&a?k(t,n):c?q(t,s):e===le?O(t,n):e===pe&&q(t,n))}function C(e,t){try{t(function(t){k(e,t)},function(t){q(e,t)})}catch(o){q(e,o)}}function N(){return fe++}function L(e){e[ce]=fe++,e._state=void 0,e._result=void 0,e._subscribers=[]}function D(e){return new be(this,e).promise}function H(e){var t=this;return new t(Y(e)?function(o,r){for(var n=e.length,s=0;s<n;s++)t.resolve(e[s]).then(o,r)}:function(e,t){t(new TypeError("You must pass an array to race."))})}function M(e){var t=this,o=new t(g);return q(o,e),o}function J(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function K(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function Q(e){this[ce]=N(),this._result=this._state=void 0,this._subscribers=[],g!==e&&("function"!=typeof e&&J(),this instanceof Q?C(this,e):K())}function B(e,t){this._instanceConstructor=e,this.promise=new e(g),this.promise[ce]||L(this.promise),Y(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?O(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&O(this.promise,this._result))):q(this.promise,F())}function F(){return new Error("Array Methods must be provided an Array")}function G(){var e;if("undefined"!=typeof n)e=n;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var o=e.Promise;o&&"[object Promise]"===Object.prototype.toString.call(o.resolve())&&!o.cast||(e.Promise=ge)}var V;V=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var X,W,$,Y=V,z=0,Z=function(e,t){se[z]=e,se[z+1]=t,z+=2,2===z&&(W?W(f):$())},ee="undefined"!=typeof window?window:void 0,te=ee||{},oe=te.MutationObserver||te.WebKitMutationObserver,re="undefined"==typeof self&&"undefined"!=typeof r&&"[object process]"==={}.toString.call(r),ne="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,se=new Array(1e3);$=re?u():oe?p():ne?h():void 0===ee&&"function"==typeof t?y():d();var ie=m,ae=v,ce=Math.random().toString(36).substring(16),ue=void 0,le=1,pe=2,he=new I,de=new I,fe=0,ye=D,me=H,ve=M,ge=Q;Q.all=ye,Q.race=me,Q.resolve=ae,Q.reject=ve,Q._setScheduler=a,Q._setAsap=c,Q._asap=Z,Q.prototype={constructor:Q,then:ie,"catch":function(e){return this.then(null,e)}};var be=B;B.prototype._enumerate=function(){for(var e=this.length,t=this._input,o=0;this._state===ue&&o<e;o++)this._eachEntry(t[o],o)},B.prototype._eachEntry=function(e,t){var o=this._instanceConstructor,r=o.resolve;if(r===ae){var n=_(e);if(n===ie&&e._state!==ue)this._settledAt(e._state,t,e._result);else if("function"!=typeof n)this._remaining--,this._result[t]=e;else if(o===ge){var s=new o(g);S(s,e,n),this._willSettleAt(s,t)}else this._willSettleAt(new o(function(t){t(e)}),t)}else this._willSettleAt(r(e),t)},B.prototype._settledAt=function(e,t,o){var r=this.promise;r._state===ue&&(this._remaining--,e===pe?q(r,o):this._result[t]=o),0===this._remaining&&O(r,this._result)},B.prototype._willSettleAt=function(e,t){var o=this;P(e,void 0,function(e){o._settledAt(le,t,e)},function(e){o._settledAt(pe,t,e)})};var we=G,_e={Promise:ge,polyfill:we};"function"==typeof e&&e.amd?e(function(){return _e}):"undefined"!=typeof o&&o.exports?o.exports=_e:"undefined"!=typeof this&&(this.ES6Promise=_e),we()}).call(this)}).call(this,t(2),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],6:[function(e,t,o){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function s(e){return"number"==typeof e}function i(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!s(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,o,r,s,c,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(o=this._events[e],a(o))return!1;if(n(o))switch(arguments.length){case 1:o.call(this);break;case 2:o.call(this,arguments[1]);break;case 3:o.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),o.apply(this,s)}else if(i(o))for(s=Array.prototype.slice.call(arguments,1),u=o.slice(),r=u.length,c=0;c<r;c++)u[c].apply(this,s);return!0},r.prototype.addListener=function(e,t){var o;if(!n(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,n(t.listener)?t.listener:t),this._events[e]?i(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,i(this._events[e])&&!this._events[e].warned&&(o=a(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,o&&o>0&&this._events[e].length>o&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function o(){this.removeListener(e,o),r||(r=!0,t.apply(this,arguments))}if(!n(t))throw TypeError("listener must be a function");var r=!1;return o.listener=t,this.on(e,o),this},r.prototype.removeListener=function(e,t){var o,r,s,a;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=this._events[e],s=o.length,r=-1,o===t||n(o.listener)&&o.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(o)){for(a=s;a-- >0;)if(o[a]===t||o[a].listener&&o[a].listener===t){r=a;break}if(r<0)return this;1===o.length?(o.length=0,delete this._events[e]):o.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,o;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(o=this._events[e],n(o))this.removeListener(e,o);else if(o)for(;o.length;)this.removeListener(e,o[o.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(n(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},{}],7:[function(e,t,o){var r=Object.prototype.hasOwnProperty,n=Object.prototype.toString;t.exports=function(e,t,o){if("[object Function]"!==n.call(t))throw new TypeError("iterator must be a function");var s=e.length;if(s===+s)for(var i=0;i<s;i++)t.call(o,e[i],i,e);else for(var a in e)r.call(e,a)&&t.call(o,e[a],a,e)}},{}],8:[function(e,t,o){(function(e){"undefined"!=typeof window?t.exports=window:"undefined"!=typeof e?t.exports=e:"undefined"!=typeof self?t.exports=self:t.exports={}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],9:[function(e,t,o){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var o=function(){};o.prototype=t.prototype,e.prototype=new o,e.prototype.constructor=e}},{}],10:[function(e,t,o){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],11:[function(e,t,o){"use strict";function r(e,t){if(e.map)return e.map(t);for(var o=[],r=0;r<e.length;r++)o.push(t(e[r],r));return o}var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,o,a){return t=t||"&",o=o||"=",null===e&&(e=void 0),"object"==typeof e?r(i(e),function(i){var a=encodeURIComponent(n(i))+o;return s(e[i])?r(e[i],function(e){return a+encodeURIComponent(n(e))}).join(t):a+encodeURIComponent(n(e[i]))}).join(t):a?encodeURIComponent(n(a))+o+encodeURIComponent(n(e)):""};var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=Object.keys||function(e){var t=[];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.push(o);return t}},{}],12:[function(e,t,o){function r(){c.apply(this,arguments)}function n(){var e="Not implemented in this environment.\nIf you feel this is a mistake, write to support@algolia.com";throw new l.AlgoliaSearchError(e)}t.exports=r;var s=e(14),i=e(24),a=e(25),c=e(13),u=e(9),l=e(26);u(r,c),r.prototype.deleteIndex=function(e,t){return this._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(e),hostType:"write",callback:t})},r.prototype.moveIndex=function(e,t,o){var r={operation:"move",destination:t};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(e)+"/operation",body:r,hostType:"write",callback:o})},r.prototype.copyIndex=function(e,t,o){var r={operation:"copy",destination:t};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(e)+"/operation",body:r,hostType:"write",callback:o})},r.prototype.getLogs=function(t,o,r){var n=e(23),s={};return"object"==typeof t?(s=n(t),r=o):0===arguments.length||"function"==typeof t?r=t:1===arguments.length||"function"==typeof o?(r=o,s.offset=t):(s.offset=t,s.length=o),void 0===s.offset&&(s.offset=0),void 0===s.length&&(s.length=10),this._jsonRequest({method:"GET",url:"/1/logs?"+this._getSearchParams(s,""),hostType:"read",callback:r})},r.prototype.listIndexes=function(e,t){var o="";return void 0===e||"function"==typeof e?t=e:o="?page="+e,this._jsonRequest({method:"GET",url:"/1/indexes"+o,hostType:"read",callback:t})},r.prototype.initIndex=function(e){return new s(this,e)},r.prototype.listUserKeys=function(e){return this._jsonRequest({method:"GET",url:"/1/keys",hostType:"read",callback:e})},r.prototype.getUserKeyACL=function(e,t){return this._jsonRequest({method:"GET",url:"/1/keys/"+e,hostType:"read",callback:t})},r.prototype.deleteUserKey=function(e,t){return this._jsonRequest({method:"DELETE",url:"/1/keys/"+e,hostType:"write",callback:t})},r.prototype.addUserKey=function(t,o,r){var n=e(10),s="Usage: client.addUserKey(arrayOfAcls[, params, callback])";if(!n(t))throw new Error(s);1!==arguments.length&&"function"!=typeof o||(r=o,o=null);var i={acl:t};return o&&(i.validity=o.validity,i.maxQueriesPerIPPerHour=o.maxQueriesPerIPPerHour,i.maxHitsPerQuery=o.maxHitsPerQuery,i.indexes=o.indexes,i.description=o.description,o.queryParameters&&(i.queryParameters=this._getSearchParams(o.queryParameters,"")),i.referers=o.referers),this._jsonRequest({method:"POST",url:"/1/keys",body:i,hostType:"write",callback:r})},r.prototype.addUserKeyWithValidity=i(function(e,t,o){return this.addUserKey(e,t,o)},a("client.addUserKeyWithValidity()","client.addUserKey()")),r.prototype.updateUserKey=function(t,o,r,n){var s=e(10),i="Usage: client.updateUserKey(key, arrayOfAcls[, params, callback])";if(!s(o))throw new Error(i);2!==arguments.length&&"function"!=typeof r||(n=r,r=null);var a={acl:o};return r&&(a.validity=r.validity,a.maxQueriesPerIPPerHour=r.maxQueriesPerIPPerHour,a.maxHitsPerQuery=r.maxHitsPerQuery,a.indexes=r.indexes,a.description=r.description,r.queryParameters&&(a.queryParameters=this._getSearchParams(r.queryParameters,"")),a.referers=r.referers),this._jsonRequest({method:"PUT",url:"/1/keys/"+t,body:a,hostType:"write",callback:n})},r.prototype.startQueriesBatch=i(function(){this._batch=[]},a("client.startQueriesBatch()","client.search()")),r.prototype.addQueryInBatch=i(function(e,t,o){this._batch.push({indexName:e,query:t,params:o})},a("client.addQueryInBatch()","client.search()")),r.prototype.sendQueriesBatch=i(function(e){return this.search(this._batch,e)},a("client.sendQueriesBatch()","client.search()")),r.prototype.batch=function(t,o){var r=e(10),n="Usage: client.batch(operations[, callback])";if(!r(t))throw new Error(n);return this._jsonRequest({method:"POST",url:"/1/indexes/*/batch",body:{requests:t},hostType:"write",callback:o})},r.prototype.destroy=n,r.prototype.enableRateLimitForward=n,r.prototype.disableRateLimitForward=n,r.prototype.useSecuredAPIKey=n,r.prototype.disableSecuredAPIKey=n,r.prototype.generateSecuredApiKey=n},{10:10,13:13,14:14,23:23,24:24,25:25,26:26,9:9}],13:[function(e,t,o){function r(t,o,r){var s=e(3)("algoliasearch"),a=e(23),u=e(10),l=e(28),p="Usage: algoliasearch(applicationID, apiKey, opts)";if(r._allowEmptyCredentials!==!0&&!t)throw new c.AlgoliaSearchError("Please provide an application ID. "+p);if(r._allowEmptyCredentials!==!0&&!o)throw new c.AlgoliaSearchError("Please provide an API key. "+p);this.applicationID=t,this.apiKey=o;var h=i([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},r=r||{};var d=r.protocol||"https:",f=void 0===r.timeout?2e3:r.timeout;if(/:$/.test(d)||(d+=":"),"http:"!==r.protocol&&"https:"!==r.protocol)throw new c.AlgoliaSearchError("protocol must be `http:` or `https:` (was `"+r.protocol+"`)");r.hosts?u(r.hosts)?(this.hosts.read=a(r.hosts),this.hosts.write=a(r.hosts)):(this.hosts.read=a(r.hosts.read),this.hosts.write=a(r.hosts.write)):(this.hosts.read=[this.applicationID+"-dsn.algolia.net"].concat(h),this.hosts.write=[this.applicationID+".algolia.net"].concat(h)),this.hosts.read=l(this.hosts.read,n(d)),this.hosts.write=l(this.hosts.write,n(d)),this.requestTimeout=f,this.extraHeaders=[],this.cache=r._cache||{},this._ua=r._ua,this._useCache=!(void 0!==r._useCache&&!r._cache)||r._useCache,this._useFallback=void 0===r.useFallback||r.useFallback,this._setTimeout=r._setTimeout,s("init done, %j",this)}function n(e){return function(t){return e+"//"+t.toLowerCase()}}function s(e){if(void 0===Array.prototype.toJSON)return JSON.stringify(e);var t=Array.prototype.toJSON;delete Array.prototype.toJSON;var o=JSON.stringify(e);return Array.prototype.toJSON=t,o}function i(e){for(var t,o,r=e.length;0!==r;)o=Math.floor(Math.random()*r),r-=1,t=e[r],e[r]=e[o],e[o]=t;return e}function a(e){var t={};for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var r;r="x-algolia-api-key"===o||"x-algolia-application-id"===o?"**hidden for security purposes**":e[o],t[o]=r}return t}t.exports=r;var c=e(26),u=e(27),l=e(16),p=500;r.prototype.initIndex=function(e){return new l(this,e)},r.prototype.setExtraHeader=function(e,t){this.extraHeaders.push({name:e.toLowerCase(),value:t})},r.prototype.addAlgoliaAgent=function(e){this._ua+=";"+e},r.prototype._jsonRequest=function(t){function o(e,u){function p(e){var t=e&&e.body&&e.body.message&&e.body.status||e.statusCode||e&&e.body&&200;i("received response: statusCode: %s, computed statusCode: %d, headers: %j",e.statusCode,t,e.headers);var o=2===Math.floor(t/100),s=new Date;if(m.push({currentHost:x,headers:a(n),content:r||null,contentLength:void 0!==r?r.length:null,method:u.method,timeout:u.timeout,url:u.url,startTime:_,endTime:s,duration:s-_,statusCode:t}),o)return h._useCache&&l&&(l[w]=e.responseText),e.body;var p=4!==Math.floor(t/100);if(p)return d+=1,g();i("unrecoverable error");var f=new c.AlgoliaSearchError(e.body&&e.body.message,{debugData:m,statusCode:t});return h._promise.reject(f)}function v(e){i("error: %s, stack: %s",e.message,e.stack);var o=new Date;return m.push({currentHost:x,headers:a(n),content:r||null,contentLength:void 0!==r?r.length:null,method:u.method,timeout:u.timeout,url:u.url,startTime:_,endTime:o,duration:o-_}),e instanceof c.AlgoliaSearchError||(e=new c.Unknown(e&&e.message,e)),d+=1,e instanceof c.Unknown||e instanceof c.UnparsableJSON||d>=h.hosts[t.hostType].length&&(f||!y)?(e.debugData=m,h._promise.reject(e)):e instanceof c.RequestTimeout?b():g()}function g(){return i("retrying request"),h.hostIndex[t.hostType]=(h.hostIndex[t.hostType]+1)%h.hosts[t.hostType].length,o(e,u)}function b(){return i("retrying request with higher timeout"),h.hostIndex[t.hostType]=(h.hostIndex[t.hostType]+1)%h.hosts[t.hostType].length,u.timeout=h.requestTimeout*(d+1),o(e,u)}var w,_=new Date;if(h._useCache&&(w=t.url),h._useCache&&r&&(w+="_body_"+u.body),h._useCache&&l&&void 0!==l[w])return i("serving response from cache"),h._promise.resolve(JSON.parse(l[w]));if(d>=h.hosts[t.hostType].length)return!y||f?(i("could not get any response"),h._promise.reject(new c.AlgoliaSearchError("Cannot connect to the AlgoliaSearch API. Send an email to support@algolia.com to report and resolve the issue. Application id was: "+h.applicationID,{debugData:m}))):(i("switching to fallback"),d=0,u.method=t.fallback.method,u.url=t.fallback.url,u.jsonBody=t.fallback.body,u.jsonBody&&(u.body=s(u.jsonBody)),n=h._computeRequestHeaders(),u.timeout=h.requestTimeout*(d+1),h.hostIndex[t.hostType]=0,f=!0,o(h._request.fallback,u));var x=h.hosts[t.hostType][h.hostIndex[t.hostType]],T=x+u.url,j={body:u.body,jsonBody:u.jsonBody,method:u.method,headers:n,timeout:u.timeout,debug:i};return i("method: %s, url: %s, headers: %j, timeout: %d",j.method,T,j.headers,j.timeout),e===h._request.fallback&&i("using fallback"),e.call(h,T,j).then(p,v)}var r,n,i=e(3)("algoliasearch:"+t.url),l=t.cache,h=this,d=0,f=!1,y=h._useFallback&&h._request.fallback&&t.fallback;this.apiKey.length>p&&void 0!==t.body&&void 0!==t.body.params?(t.body.apiKey=this.apiKey,n=this._computeRequestHeaders(!1)):n=this._computeRequestHeaders(),void 0!==t.body&&(r=s(t.body)),i("request start");var m=[],v=o(h._request,{url:t.url,method:t.method,body:r,jsonBody:t.body,timeout:h.requestTimeout*(d+1)});return t.callback?void v.then(function(e){u(function(){t.callback(null,e)},h._setTimeout||setTimeout)},function(e){u(function(){t.callback(e)},h._setTimeout||setTimeout)}):v},r.prototype._getSearchParams=function(e,t){if(void 0===e||null===e)return t;for(var o in e)null!==o&&void 0!==e[o]&&e.hasOwnProperty(o)&&(t+=""===t?"":"&",t+=o+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(e[o])?s(e[o]):e[o]));return t},r.prototype._computeRequestHeaders=function(t){var o=e(7),r={"x-algolia-agent":this._ua,"x-algolia-application-id":this.applicationID};return t!==!1&&(r["x-algolia-api-key"]=this.apiKey),this.userToken&&(r["x-algolia-usertoken"]=this.userToken),this.securityTags&&(r["x-algolia-tagfilters"]=this.securityTags),this.extraHeaders&&o(this.extraHeaders,function(e){r[e.name]=e.value}),r},r.prototype.search=function(t,o,r){var n=e(10),s=e(28),i="Usage: client.search(arrayOfQueries[, callback])";if(!n(t))throw new Error(i);"function"==typeof o?(r=o,o={}):void 0===o&&(o={});var a=this,c={requests:s(t,function(e){var t="";return void 0!==e.query&&(t+="query="+encodeURIComponent(e.query)),{indexName:e.indexName,params:a._getSearchParams(e.params,t)}})},u=s(c.requests,function(e,t){return t+"="+encodeURIComponent("/1/indexes/"+encodeURIComponent(e.indexName)+"?"+e.params)}).join("&"),l="/1/indexes/*/queries";return void 0!==o.strategy&&(l+="?strategy="+o.strategy),this._jsonRequest({cache:this.cache,method:"POST",url:l,body:c,hostType:"read",fallback:{method:"GET",url:"/1/indexes/*",body:{params:u}},callback:r})},r.prototype.setSecurityTags=function(e){if("[object Array]"===Object.prototype.toString.call(e)){for(var t=[],o=0;o<e.length;++o)if("[object Array]"===Object.prototype.toString.call(e[o])){for(var r=[],n=0;n<e[o].length;++n)r.push(e[o][n]);t.push("("+r.join(",")+")")}else t.push(e[o]);e=t.join(",")}this.securityTags=e},r.prototype.setUserToken=function(e){this.userToken=e},r.prototype.clearCache=function(){this.cache={}},r.prototype.setRequestTimeout=function(e){
3
+ e&&(this.requestTimeout=parseInt(e,10))}},{10:10,16:16,23:23,26:26,27:27,28:28,3:3,7:7}],14:[function(e,t,o){function r(){s.apply(this,arguments)}var n=e(9),s=e(16),i=e(24),a=e(25),c=e(27),u=e(26);t.exports=r,n(r,s),r.prototype.addObject=function(e,t,o){var r=this;return 1!==arguments.length&&"function"!=typeof t||(o=t,t=void 0),this.as._jsonRequest({method:void 0!==t?"PUT":"POST",url:"/1/indexes/"+encodeURIComponent(r.indexName)+(void 0!==t?"/"+encodeURIComponent(t):""),body:e,hostType:"write",callback:o})},r.prototype.addObjects=function(t,o){var r=e(10),n="Usage: index.addObjects(arrayOfObjects[, callback])";if(!r(t))throw new Error(n);for(var s=this,i={requests:[]},a=0;a<t.length;++a){var c={action:"addObject",body:t[a]};i.requests.push(c)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(s.indexName)+"/batch",body:i,hostType:"write",callback:o})},r.prototype.partialUpdateObject=function(e,t,o){1!==arguments.length&&"function"!=typeof t||(o=t,t=void 0);var r=this,n="/1/indexes/"+encodeURIComponent(r.indexName)+"/"+encodeURIComponent(e.objectID)+"/partial";return t===!1&&(n+="?createIfNotExists=false"),this.as._jsonRequest({method:"POST",url:n,body:e,hostType:"write",callback:o})},r.prototype.partialUpdateObjects=function(t,o){var r=e(10),n="Usage: index.partialUpdateObjects(arrayOfObjects[, callback])";if(!r(t))throw new Error(n);for(var s=this,i={requests:[]},a=0;a<t.length;++a){var c={action:"partialUpdateObject",objectID:t[a].objectID,body:t[a]};i.requests.push(c)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(s.indexName)+"/batch",body:i,hostType:"write",callback:o})},r.prototype.saveObject=function(e,t){var o=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(o.indexName)+"/"+encodeURIComponent(e.objectID),body:e,hostType:"write",callback:t})},r.prototype.saveObjects=function(t,o){var r=e(10),n="Usage: index.saveObjects(arrayOfObjects[, callback])";if(!r(t))throw new Error(n);for(var s=this,i={requests:[]},a=0;a<t.length;++a){var c={action:"updateObject",objectID:t[a].objectID,body:t[a]};i.requests.push(c)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(s.indexName)+"/batch",body:i,hostType:"write",callback:o})},r.prototype.deleteObject=function(e,t){if("function"==typeof e||"string"!=typeof e&&"number"!=typeof e){var o=new u.AlgoliaSearchError("Cannot delete an object without an objectID");return t=e,"function"==typeof t?t(o):this.as._promise.reject(o)}var r=this;return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/"+encodeURIComponent(e),hostType:"write",callback:t})},r.prototype.deleteObjects=function(t,o){var r=e(10),n=e(28),s="Usage: index.deleteObjects(arrayOfObjectIDs[, callback])";if(!r(t))throw new Error(s);var i=this,a={requests:n(t,function(e){return{action:"deleteObject",objectID:e,body:{objectID:e}}})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(i.indexName)+"/batch",body:a,hostType:"write",callback:o})},r.prototype.deleteByQuery=function(t,o,r){function n(e){if(0===e.nbHits)return e;var t=p(e.hits,function(e){return e.objectID});return h.deleteObjects(t).then(s).then(i)}function s(e){return h.waitTask(e.taskID)}function i(){return h.deleteByQuery(t,o)}function a(){c(function(){r(null)},d._setTimeout||setTimeout)}function u(e){c(function(){r(e)},d._setTimeout||setTimeout)}var l=e(23),p=e(28),h=this,d=h.as;1===arguments.length||"function"==typeof o?(r=o,o={}):o=l(o),o.attributesToRetrieve="objectID",o.hitsPerPage=1e3,o.distinct=!1,this.clearCache();var f=this.search(t,o).then(n);return r?void f.then(a,u):f},r.prototype.browseAll=function(t,o){function r(e){if(!a._stopped){var t;t=void 0!==e?"cursor="+encodeURIComponent(e):l,c._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(u.indexName)+"/browse?"+t,hostType:"read",callback:n})}}function n(e,t){if(!a._stopped)return e?void a._error(e):(a._result(t),void 0===t.cursor?void a._end():void r(t.cursor))}"object"==typeof t&&(o=t,t=void 0);var s=e(29),i=e(15),a=new i,c=this.as,u=this,l=c._getSearchParams(s({},o||{},{query:t}),"");return r(),a},r.prototype.ttAdapter=function(e){var t=this;return function(o,r,n){var s;s="function"==typeof n?n:r,t.search(o,e,function(e,t){return e?void s(e):void s(t.hits)})}},r.prototype.waitTask=function(e,t){function o(){return l._jsonRequest({method:"GET",hostType:"read",url:"/1/indexes/"+encodeURIComponent(u.indexName)+"/task/"+e}).then(function(e){a++;var t=s*a*a;return t>i&&(t=i),"published"!==e.status?l._promise.delay(t).then(o):e})}function r(e){c(function(){t(null,e)},l._setTimeout||setTimeout)}function n(e){c(function(){t(e)},l._setTimeout||setTimeout)}var s=100,i=5e3,a=0,u=this,l=u.as,p=o();return t?void p.then(r,n):p},r.prototype.clearIndex=function(e){var t=this;return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/clear",hostType:"write",callback:e})},r.prototype.getSettings=function(e){var t=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/settings?getVersion=2",hostType:"read",callback:e})},r.prototype.searchSynonyms=function(e,t){return"function"==typeof e?(t=e,e={}):void 0===e&&(e={}),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/search",body:e,hostType:"read",callback:t})},r.prototype.saveSynonym=function(e,t,o){return"function"==typeof t?(o=t,t={}):void 0===t&&(t={}),this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(e.objectID)+"?forwardToSlaves="+(t.forwardToSlaves?"true":"false"),body:e,hostType:"write",callback:o})},r.prototype.getSynonym=function(e,t){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(e),hostType:"read",callback:t})},r.prototype.deleteSynonym=function(e,t,o){return"function"==typeof t?(o=t,t={}):void 0===t&&(t={}),this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(e)+"?forwardToSlaves="+(t.forwardToSlaves?"true":"false"),hostType:"write",callback:o})},r.prototype.clearSynonyms=function(e,t){return"function"==typeof e?(t=e,e={}):void 0===e&&(e={}),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/clear?forwardToSlaves="+(e.forwardToSlaves?"true":"false"),hostType:"write",callback:t})},r.prototype.batchSynonyms=function(e,t,o){return"function"==typeof t?(o=t,t={}):void 0===t&&(t={}),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/batch?forwardToSlaves="+(t.forwardToSlaves?"true":"false")+"&replaceExistingSynonyms="+(t.replaceExistingSynonyms?"true":"false"),hostType:"write",body:e,callback:o})},r.prototype.setSettings=function(e,t,o){1!==arguments.length&&"function"!=typeof t||(o=t,t={});var r=t.forwardToSlaves||!1,n=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/settings?forwardToSlaves="+(r?"true":"false"),hostType:"write",body:e,callback:o})},r.prototype.listUserKeys=function(e){var t=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/keys",hostType:"read",callback:e})},r.prototype.getUserKeyACL=function(e,t){var o=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(o.indexName)+"/keys/"+e,hostType:"read",callback:t})},r.prototype.deleteUserKey=function(e,t){var o=this;return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(o.indexName)+"/keys/"+e,hostType:"write",callback:t})},r.prototype.addUserKey=function(t,o,r){var n=e(10),s="Usage: index.addUserKey(arrayOfAcls[, params, callback])";if(!n(t))throw new Error(s);1!==arguments.length&&"function"!=typeof o||(r=o,o=null);var i={acl:t};return o&&(i.validity=o.validity,i.maxQueriesPerIPPerHour=o.maxQueriesPerIPPerHour,i.maxHitsPerQuery=o.maxHitsPerQuery,i.description=o.description,o.queryParameters&&(i.queryParameters=this.as._getSearchParams(o.queryParameters,"")),i.referers=o.referers),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",body:i,hostType:"write",callback:r})},r.prototype.addUserKeyWithValidity=i(function(e,t,o){return this.addUserKey(e,t,o)},a("index.addUserKeyWithValidity()","index.addUserKey()")),r.prototype.updateUserKey=function(t,o,r,n){var s=e(10),i="Usage: index.updateUserKey(key, arrayOfAcls[, params, callback])";if(!s(o))throw new Error(i);2!==arguments.length&&"function"!=typeof r||(n=r,r=null);var a={acl:o};return r&&(a.validity=r.validity,a.maxQueriesPerIPPerHour=r.maxQueriesPerIPPerHour,a.maxHitsPerQuery=r.maxHitsPerQuery,a.description=r.description,r.queryParameters&&(a.queryParameters=this.as._getSearchParams(r.queryParameters,"")),a.referers=r.referers),this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+t,body:a,hostType:"write",callback:n})}},{10:10,15:15,16:16,23:23,24:24,25:25,26:26,27:27,28:28,29:29,9:9}],15:[function(e,t,o){"use strict";function r(){}t.exports=r;var n=e(9),s=e(6).EventEmitter;n(r,s),r.prototype.stop=function(){this._stopped=!0,this._clean()},r.prototype._end=function(){this.emit("end"),this._clean()},r.prototype._error=function(e){this.emit("error",e),this._clean()},r.prototype._result=function(e){this.emit("result",e)},r.prototype._clean=function(){this.removeAllListeners("stop"),this.removeAllListeners("end"),this.removeAllListeners("error"),this.removeAllListeners("result")}},{6:6,9:9}],16:[function(e,t,o){function r(e,t){this.indexName=t,this.as=e,this.typeAheadArgs=null,this.typeAheadValueOption=null,this.cache={}}var n=e(22);t.exports=r,r.prototype.clearCache=function(){this.cache={}},r.prototype.search=n("query"),r.prototype.similarSearch=n("similarQuery"),r.prototype.browse=function(t,o,r){var n,s,i=e(29),a=this;0===arguments.length||1===arguments.length&&"function"==typeof arguments[0]?(n=0,r=arguments[0],t=void 0):"number"==typeof arguments[0]?(n=arguments[0],"number"==typeof arguments[1]?s=arguments[1]:"function"==typeof arguments[1]&&(r=arguments[1],s=void 0),t=void 0,o=void 0):"object"==typeof arguments[0]?("function"==typeof arguments[1]&&(r=arguments[1]),o=arguments[0],t=void 0):"string"==typeof arguments[0]&&"function"==typeof arguments[1]&&(r=arguments[1],o=void 0),o=i({},o||{},{page:n,hitsPerPage:s,query:t});var c=this.as._getSearchParams(o,"");return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(a.indexName)+"/browse?"+c,hostType:"read",callback:r})},r.prototype.browseFrom=function(e,t){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse?cursor="+encodeURIComponent(e),hostType:"read",callback:t})},r.prototype._search=function(e,t,o){return this.as._jsonRequest({cache:this.cache,method:"POST",url:t||"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params:e},hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params:e}},callback:o})},r.prototype.getObject=function(e,t,o){var r=this;1!==arguments.length&&"function"!=typeof t||(o=t,t=void 0);var n="";if(void 0!==t){n="?attributes=";for(var s=0;s<t.length;++s)0!==s&&(n+=","),n+=t[s]}return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/"+encodeURIComponent(e)+n,hostType:"read",callback:o})},r.prototype.getObjects=function(t,o,r){var n=e(10),s=e(28),i="Usage: index.getObjects(arrayOfObjectIDs[, callback])";if(!n(t))throw new Error(i);var a=this;1!==arguments.length&&"function"!=typeof o||(r=o,o=void 0);var c={requests:s(t,function(e){var t={indexName:a.indexName,objectID:e};return o&&(t.attributesToRetrieve=o.join(",")),t})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/*/objects",hostType:"read",body:c,callback:r})},r.prototype.as=null,r.prototype.indexName=null,r.prototype.typeAheadArgs=null,r.prototype.typeAheadValueOption=null},{10:10,22:22,28:28,29:29}],17:[function(e,t,o){"use strict";var r=e(12),n=e(18);t.exports=n(r)},{12:12,18:18}],18:[function(e,t,o){(function(o){"use strict";var r=e(8),n=r.Promise||e(5).Promise;t.exports=function(t,s){function i(t,o,r){var n=e(23),s=e(19);return r=n(r||{}),void 0===r.protocol&&(r.protocol=s()),r._ua=r._ua||i.ua,new a(t,o,r)}function a(){t.apply(this,arguments)}var c=e(9),u=e(26),l=e(20),p=e(21),h=e(30);s=s||"","debug"===o.env.NODE_ENV&&e(3).enable("algoliasearch*"),i.version=e(31),i.ua="Algolia for vanilla JavaScript "+s+i.version,i.initPlaces=h(i),r.__algolia={debug:e(3),algoliasearch:i};var d={hasXMLHttpRequest:"XMLHttpRequest"in r,hasXDomainRequest:"XDomainRequest"in r};return d.hasXMLHttpRequest&&(d.cors="withCredentials"in new XMLHttpRequest,d.timeout="timeout"in new XMLHttpRequest),c(a,t),a.prototype._request=function(e,t){return new n(function(o,r){function n(){if(!c){d.timeout||clearTimeout(a);var e;try{e={body:JSON.parse(h.responseText),responseText:h.responseText,statusCode:h.status,headers:h.getAllResponseHeaders&&h.getAllResponseHeaders()||{}}}catch(t){e=new u.UnparsableJSON({more:h.responseText})}e instanceof u.UnparsableJSON?r(e):o(e)}}function s(e){c||(d.timeout||clearTimeout(a),r(new u.Network({more:e})))}function i(){d.timeout||(c=!0,h.abort()),r(new u.RequestTimeout)}if(!d.cors&&!d.hasXDomainRequest)return void r(new u.Network("CORS not supported"));e=l(e,t.headers);var a,c,p=t.body,h=d.cors?new XMLHttpRequest:new XDomainRequest;h instanceof XMLHttpRequest?h.open(t.method,e,!0):h.open(t.method,e),d.cors&&(p&&("POST"===t.method?h.setRequestHeader("content-type","application/x-www-form-urlencoded"):h.setRequestHeader("content-type","application/json")),h.setRequestHeader("accept","application/json")),h.onprogress=function(){},h.onload=n,h.onerror=s,d.timeout?(h.timeout=t.timeout,h.ontimeout=i):a=setTimeout(i,t.timeout),h.send(p)})},a.prototype._request.fallback=function(e,t){return e=l(e,t.headers),new n(function(o,r){p(e,t,function(e,t){return e?void r(e):void o(t)})})},a.prototype._promise={reject:function(e){return n.reject(e)},resolve:function(e){return n.resolve(e)},delay:function(e){return new n(function(t){setTimeout(t,e)})}},i}}).call(this,e(2))},{19:19,2:2,20:20,21:21,23:23,26:26,3:3,30:30,31:31,5:5,8:8,9:9}],19:[function(e,t,o){"use strict";function r(){var e=window.document.location.protocol;return"http:"!==e&&"https:"!==e&&(e="http:"),e}t.exports=r},{}],20:[function(e,t,o){"use strict";function r(e,t){return e+=/\?/.test(e)?"&":"?",e+n(t)}t.exports=r;var n=e(11)},{11:11}],21:[function(e,t,o){"use strict";function r(e,t,o){function r(){t.debug("JSONP: success"),m||h||(m=!0,p||(t.debug("JSONP: Fail. Script loaded but did not call the callback"),a(),o(new n.JSONPScriptFail)))}function i(){"loaded"!==this.readyState&&"complete"!==this.readyState||r()}function a(){clearTimeout(v),f.onload=null,f.onreadystatechange=null,f.onerror=null,d.removeChild(f)}function c(){try{delete window[y],delete window[y+"_loaded"]}catch(e){window[y]=window[y+"_loaded"]=void 0}}function u(){t.debug("JSONP: Script timeout"),h=!0,a(),o(new n.RequestTimeout)}function l(){t.debug("JSONP: Script error"),m||h||(a(),o(new n.JSONPScriptError))}if("GET"!==t.method)return void o(new Error("Method "+t.method+" "+e+" is not supported by JSONP."));t.debug("JSONP: start");var p=!1,h=!1;s+=1;var d=document.getElementsByTagName("head")[0],f=document.createElement("script"),y="algoliaJSONP_"+s,m=!1;window[y]=function(e){return c(),h?void t.debug("JSONP: Late answer, ignoring"):(p=!0,a(),void o(null,{body:e}))},e+="&callback="+y,t.jsonBody&&t.jsonBody.params&&(e+="&"+t.jsonBody.params);var v=setTimeout(u,t.timeout);f.onreadystatechange=i,f.onload=r,f.onerror=l,f.async=!0,f.defer=!0,f.src=e,d.appendChild(f)}t.exports=r;var n=e(26),s=0},{26:26}],22:[function(e,t,o){function r(e,t){return function(o,r,s){if("function"==typeof o&&"object"==typeof r||"object"==typeof s)throw new n.AlgoliaSearchError("index.search usage is index.search(query, params, cb)");0===arguments.length||"function"==typeof o?(s=o,o=""):1!==arguments.length&&"function"!=typeof r||(s=r,r=void 0),"object"==typeof o&&null!==o?(r=o,o=void 0):void 0!==o&&null!==o||(o="");var i="";return void 0!==o&&(i+=e+"="+encodeURIComponent(o)),void 0!==r&&(i=this.as._getSearchParams(r,i)),this._search(i,t,s)}}t.exports=r;var n=e(26)},{26:26}],23:[function(e,t,o){t.exports=function(e){return JSON.parse(JSON.stringify(e))}},{}],24:[function(e,t,o){t.exports=function(e,t){function o(){return r||(console.log(t),r=!0),e.apply(this,arguments)}var r=!1;return o}},{}],25:[function(e,t,o){t.exports=function(e,t){var o=e.toLowerCase().replace(".","").replace("()","");return"algoliasearch: `"+e+"` was replaced by `"+t+"`. Please see https://github.com/algolia/algoliasearch-client-js/wiki/Deprecated#"+o}},{}],26:[function(e,t,o){"use strict";function r(t,o){var r=e(7),n=this;"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):n.stack=(new Error).stack||"Cannot get a stacktrace, browser is too old",this.name="AlgoliaSearchError",this.message=t||"Unknown error",o&&r(o,function(e,t){n[t]=e})}function n(e,t){function o(){var o=Array.prototype.slice.call(arguments,0);"string"!=typeof o[0]&&o.unshift(t),r.apply(this,o),this.name="AlgoliaSearch"+e+"Error"}return s(o,r),o}var s=e(9);s(r,Error),t.exports={AlgoliaSearchError:r,UnparsableJSON:n("UnparsableJSON","Could not parse the incoming response as JSON, see err.more for details"),RequestTimeout:n("RequestTimeout","Request timedout before getting a response"),Network:n("Network","Network issue, see err.more for details"),JSONPScriptFail:n("JSONPScriptFail","<script> was loaded but did not call our provided callback"),JSONPScriptError:n("JSONPScriptError","<script> unable to load due to an `error` event on it"),Unknown:n("Unknown","Unknown error occured")}},{7:7,9:9}],27:[function(e,t,o){t.exports=function(e,t){t(e,0)}},{}],28:[function(e,t,o){var r=e(7);t.exports=function(e,t){var o=[];return r(e,function(r,n){o.push(t(r,n,e))}),o}},{7:7}],29:[function(e,t,o){var r=e(7);t.exports=function n(e){var t=Array.prototype.slice.call(arguments);return r(t,function(t){for(var o in t)t.hasOwnProperty(o)&&("object"==typeof e[o]&&"object"==typeof t[o]?e[o]=n({},e[o],t[o]):void 0!==t[o]&&(e[o]=t[o]))}),e}},{7:7}],30:[function(e,t,o){function r(t){return function(o,r,s){var i=e(23);s=s&&i(s)||{},s.hosts=s.hosts||["places-dsn.algolia.net","places-1.algolianet.com","places-2.algolianet.com","places-3.algolianet.com"],0!==arguments.length&&"object"!=typeof o&&void 0!==o||(o="",r="",s._allowEmptyCredentials=!0);var a=t(o,r,s),c=a.initIndex("places");return c.search=n("query","/1/places/query"),c}}t.exports=r;var n=e(22)},{22:22,23:23}],31:[function(e,t,o){"use strict";t.exports="3.18.0"},{}]},{},[17])(17)});
metadata CHANGED
@@ -1,111 +1,111 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: algoliasearch-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.1
4
+ version: 1.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Algolia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-19 00:00:00.000000000 Z
11
+ date: 2016-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 1.5.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.5.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: algoliasearch
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.2.14
33
+ version: 1.11.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.2.14
40
+ version: 1.11.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: will_paginate
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: 2.3.15
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: 2.3.15
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: kaminari
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: travis
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rdoc
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  description: AlgoliaSearch integration to your favorite ORM
@@ -117,9 +117,9 @@ extra_rdoc_files:
117
117
  - LICENSE
118
118
  - README.md
119
119
  files:
120
- - .document
121
- - .rspec
122
- - .travis.yml
120
+ - ".document"
121
+ - ".rspec"
122
+ - ".travis.yml"
123
123
  - ChangeLog
124
124
  - Gemfile
125
125
  - Gemfile.lock
@@ -173,17 +173,17 @@ require_paths:
173
173
  - lib
174
174
  required_ruby_version: !ruby/object:Gem::Requirement
175
175
  requirements:
176
- - - '>='
176
+ - - ">="
177
177
  - !ruby/object:Gem::Version
178
178
  version: '0'
179
179
  required_rubygems_version: !ruby/object:Gem::Requirement
180
180
  requirements:
181
- - - '>='
181
+ - - ">="
182
182
  - !ruby/object:Gem::Version
183
183
  version: '0'
184
184
  requirements: []
185
185
  rubyforge_project:
186
- rubygems_version: 2.0.14
186
+ rubygems_version: 2.5.1
187
187
  signing_key:
188
188
  specification_version: 4
189
189
  summary: AlgoliaSearch integration to your favorite ORM