From fa4a93d94537f1416564408a972556cf43478958 Mon Sep 17 00:00:00 2001 From: bobylito Date: Tue, 19 Jun 2018 11:16:37 +0200 Subject: [PATCH] 2.26.1 - 2018-06-19 * build: Configure Renovate (#579) https://github.com/algolia/algoliasearch-helper-js/commit/95fa18d14b63d70957be49538893aef7d0f93b77 * chore(deps): update dependency algolia-frontend-components to v0.0.34 (#580) https://github.com/algolia/algoliasearch-helper-js/commit/27470e2868374f7035340974f8e7ddc2c90f80d6 * chore(deps): update dependency algoliasearch to v3.27.1 (#601) https://github.com/algolia/algoliasearch-helper-js/commit/bbadef3994bf68b4b47c0b9312d8f67ae2c5c619 * chore(deps): update dependency marked to v0.3.19 (#591) https://github.com/algolia/algoliasearch-helper-js/commit/d5993568ed28fc2e1ee392bb3bb9c8699bd6707f * chore(deps): update dependency sinon to v4.5.0 (#599) https://github.com/algolia/algoliasearch-helper-js/commit/c6a0dd2d6bdd3d5b256d6c1b5ad73e3f22371115 * chore(deps): update dependency tape to v4.9.0 (#603) https://github.com/algolia/algoliasearch-helper-js/commit/e29f2349a982e7e5d8efd9e2bd99d7c280ab9a55 * doc(params): Add filters to query parameters (#604) https://github.com/algolia/algoliasearch-helper-js/commit/c2e742e48a9093090937bf6abba9fa61227edf9d, closes https://github.com/algolia/algoliasearch-helper-js/issues/528 * fix(_dispatchAlgoliaResponse): avoid mutate the client response (#611) https://github.com/algolia/algoliasearch-helper-js/commit/d6bd801f3b3dc07ccd31b57947b8086c3fe07195 --- CHANGELOG | 10 ++++++++++ bower.json | 2 +- dist/algoliasearch.helper.js | 4 ++-- dist/algoliasearch.helper.min.js | 2 +- package.json | 2 +- src/version.js | 2 +- 6 files changed, 16 insertions(+), 6 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 9263763de..ecf83467b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,13 @@ +2.26.1 - 2018-06-19 + * build: Configure Renovate (#579) https://github.com/algolia/algoliasearch-helper-js/commit/95fa18d14b63d70957be49538893aef7d0f93b77 + * chore(deps): update dependency algolia-frontend-components to v0.0.34 (#580) https://github.com/algolia/algoliasearch-helper-js/commit/27470e2868374f7035340974f8e7ddc2c90f80d6 + * chore(deps): update dependency algoliasearch to v3.27.1 (#601) https://github.com/algolia/algoliasearch-helper-js/commit/bbadef3994bf68b4b47c0b9312d8f67ae2c5c619 + * chore(deps): update dependency marked to v0.3.19 (#591) https://github.com/algolia/algoliasearch-helper-js/commit/d5993568ed28fc2e1ee392bb3bb9c8699bd6707f + * chore(deps): update dependency sinon to v4.5.0 (#599) https://github.com/algolia/algoliasearch-helper-js/commit/c6a0dd2d6bdd3d5b256d6c1b5ad73e3f22371115 + * chore(deps): update dependency tape to v4.9.0 (#603) https://github.com/algolia/algoliasearch-helper-js/commit/e29f2349a982e7e5d8efd9e2bd99d7c280ab9a55 + * doc(params): Add filters to query parameters (#604) https://github.com/algolia/algoliasearch-helper-js/commit/c2e742e48a9093090937bf6abba9fa61227edf9d, closes https://github.com/algolia/algoliasearch-helper-js/issues/528 + * fix(_dispatchAlgoliaResponse): avoid mutate the client response (#611) https://github.com/algolia/algoliasearch-helper-js/commit/d6bd801f3b3dc07ccd31b57947b8086c3fe07195 + 2.26.0 - 2018-04-25 * chore(deps): pin and upgrade some dependencies (#566) https://github.com/algolia/algoliasearch-helper-js/commit/5edd3b19f8ec115733874bddfb5bf1fa602ceab9 * chore(yarn.lock): fixed zuul dependency https://github.com/algolia/algoliasearch-helper-js/commit/ad21c56ddf9ec179e87a01560fdaedb70ba844f0 diff --git a/bower.json b/bower.json index 5f0cc1aa4..3486699e1 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "algoliasearch-helper", - "version": "2.26.0", + "version": "2.26.1", "homepage": "https://github.com/algolia/algoliasearch-helper-js", "authors": [ "Algolia Team " diff --git a/dist/algoliasearch.helper.js b/dist/algoliasearch.helper.js index f0215f84c..3dfd9a669 100644 --- a/dist/algoliasearch.helper.js +++ b/dist/algoliasearch.helper.js @@ -14860,7 +14860,7 @@ AlgoliaSearchHelper.prototype._dispatchAlgoliaResponse = function(states, queryI if (this._currentNbQueries === 0) this.emit('searchQueueEmpty'); - var results = content.results; + var results = content.results.slice(); forEach(states, function(s) { var state = s.state; var queriesCount = s.queriesCount; @@ -15555,7 +15555,7 @@ exports.getQueryStringFromState = function(state, options) { },{"./SearchParameters":290,"./SearchParameters/shortener":291,"lodash/bind":212,"lodash/forEach":221,"lodash/invert":229,"lodash/isEmpty":235,"lodash/isPlainObject":244,"lodash/isString":246,"lodash/map":253,"lodash/mapKeys":254,"lodash/mapValues":255,"lodash/pick":263,"qs":281,"qs/lib/utils":284}],299:[function(require,module,exports){ 'use strict'; -module.exports = '2.26.0'; +module.exports = '2.26.1'; },{}]},{},[1])(1) }); \ No newline at end of file diff --git a/dist/algoliasearch.helper.min.js b/dist/algoliasearch.helper.min.js index 0c29c42f2..f512551c5 100644 --- a/dist/algoliasearch.helper.min.js +++ b/dist/algoliasearch.helper.min.js @@ -2,4 +2,4 @@ var i=e("./isArrayLike");t.exports=n},{"./isArrayLike":232}],112:[function(e,t,r){function n(e){return function(t,r,n){for(var i=-1,a=Object(t),s=n(t),o=s.length;o--;){var c=s[e?o:++i];if(!1===r(a[c],c,a))break}return t}}t.exports=n},{}],113:[function(e,t,r){function n(e,t,r){function n(){return(this&&this!==a&&this instanceof n?c:e).apply(o?r:this,arguments)}var o=t&s,c=i(e);return n}var i=e("./_createCtor"),a=e("./_root"),s=1;t.exports=n},{"./_createCtor":114,"./_root":190}],114:[function(e,t,r){function n(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=i(e.prototype),n=e.apply(r,t);return a(n)?n:r}}var i=e("./_baseCreate"),a=e("./isObject");t.exports=n},{"./_baseCreate":37,"./isObject":242}],115:[function(e,t,r){function n(e,t,r){function n(){for(var a=arguments.length,h=Array(a),p=a,d=c(n);p--;)h[p]=arguments[p];var _=a<3&&h[0]!==d&&h[a-1]!==d?[]:u(h,d);return(a-=_.length)-1?o[c?t[u]:u]:void 0}}var i=e("./_baseIteratee"),a=e("./isArrayLike"),s=e("./keys");t.exports=n},{"./_baseIteratee":60,"./isArrayLike":232,"./keys":250}],117:[function(e,t,r){function n(e,t,r,m,b,x,j,R,F,A){function O(){for(var p=arguments.length,d=Array(p),_=p;_--;)d[_]=arguments[_];if(E)var v=u(O),y=s(d,v);if(m&&(d=i(d,m,b,E)),x&&(d=a(d,x,j,E)),p-=y,E&&p1&&d.reverse(),S&&Fh))return!1;var d=f.get(e);if(d&&f.get(t))return d==t;var _=-1,v=!0,y=r&c?new i:void 0;for(f.set(e,t),f.set(t,e);++_1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(i,"{\n/* [wrapped with "+t+"] */\n")}var i=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;t.exports=n},{}],155:[function(e,t,r){function n(e){return s(e)||a(e)||!!(o&&e&&e[o])}var i=e("./_Symbol"),a=e("./isArguments"),s=e("./isArray"),o=i?i.isConcatSpreadable:void 0;t.exports=n},{"./_Symbol":15,"./isArguments":230,"./isArray":231}],156:[function(e,t,r){function n(e,t){var r=typeof e;return!!(t=null==t?i:t)&&("number"==r||"symbol"!=r&&a.test(e))&&e>-1&&e%1==0&&e-1}var i=e("./_assocIndexOf");t.exports=n},{"./_assocIndexOf":31}],168:[function(e,t,r){function n(e,t){var r=this.__data__,n=i(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var i=e("./_assocIndexOf");t.exports=n},{"./_assocIndexOf":31}],169:[function(e,t,r){function n(){this.size=0,this.__data__={hash:new i,map:new(s||a),string:new i}}var i=e("./_Hash"),a=e("./_ListCache"),s=e("./_Map");t.exports=n},{"./_Hash":5,"./_ListCache":7,"./_Map":9}],170:[function(e,t,r){function n(e){var t=i(this,e).delete(e);return this.size-=t?1:0,t}var i=e("./_getMapData");t.exports=n},{"./_getMapData":134}],171:[function(e,t,r){function n(e){return i(this,e).get(e)}var i=e("./_getMapData");t.exports=n},{"./_getMapData":134}],172:[function(e,t,r){function n(e){return i(this,e).has(e)}var i=e("./_getMapData");t.exports=n},{"./_getMapData":134}],173:[function(e,t,r){function n(e,t){var r=i(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var i=e("./_getMapData");t.exports=n},{"./_getMapData":134}],174:[function(e,t,r){function n(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}t.exports=n},{}],175:[function(e,t,r){function n(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}t.exports=n},{}],176:[function(e,t,r){function n(e){var t=i(e,function(e){return r.size===a&&r.clear(),e}),r=t.cache;return t}var i=e("./memoize"),a=500;t.exports=n},{"./memoize":256}],177:[function(e,t,r){function n(e,t){var r=e[1],n=t[1],_=r|n,v=_<(c|u|h),y=n==h&&r==l||n==h&&r==p&&e[7].length<=t[8]||n==(h|p)&&t[7].length<=t[8]&&r==l;if(!v&&!y)return e;n&c&&(e[2]=t[2],_|=r&c?0:f);var g=t[3];if(g){var m=e[3];e[3]=m?i(m,g,t[4]):g,e[4]=m?s(e[3],o):t[4]}return g=t[5],g&&(m=e[5],e[5]=m?a(m,g,t[6]):g,e[6]=m?s(e[5],o):t[6]),g=t[7],g&&(e[7]=g),n&h&&(e[8]=null==e[8]?t[8]:d(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=_,e}var i=e("./_composeArgs"),a=e("./_composeArgsRight"),s=e("./_replaceHolders"),o="__lodash_placeholder__",c=1,u=2,f=4,l=8,h=128,p=256,d=Math.min;t.exports=n},{"./_composeArgs":102,"./_composeArgsRight":103,"./_replaceHolders":189}],178:[function(e,t,r){var n=e("./_WeakMap"),i=n&&new n;t.exports=i},{"./_WeakMap":17}],179:[function(e,t,r){var n=e("./_getNative"),i=n(Object,"create");t.exports=i},{"./_getNative":136}],180:[function(e,t,r){var n=e("./_overArg"),i=n(Object.keys,Object);t.exports=i},{"./_overArg":184}],181:[function(e,t,r){function n(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}t.exports=n},{}],182:[function(e,t,r){var n=e("./_freeGlobal"),i="object"==typeof r&&r&&!r.nodeType&&r,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===i,o=s&&n.process,c=function(){try{return o&&o.binding&&o.binding("util")}catch(e){}}();t.exports=c},{"./_freeGlobal":128}],183:[function(e,t,r){function n(e){return a.call(e)}var i=Object.prototype,a=i.toString;t.exports=n},{}],184:[function(e,t,r){function n(e,t){return function(r){return e(t(r))}}t.exports=n},{}],185:[function(e,t,r){function n(e,t,r){return t=a(void 0===t?e.length-1:t,0),function(){for(var n=arguments,s=-1,o=a(n.length-t,0),c=Array(o);++s0){if(++t>=i)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var i=800,a=16,s=Date.now;t.exports=n},{}],199:[function(e,t,r){function n(){this.__data__=new i,this.size=0}var i=e("./_ListCache");t.exports=n},{"./_ListCache":7}],200:[function(e,t,r){function n(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}t.exports=n},{}],201:[function(e,t,r){function n(e){return this.__data__.get(e)}t.exports=n},{}],202:[function(e,t,r){function n(e){return this.__data__.has(e)}t.exports=n},{}],203:[function(e,t,r){function n(e,t){var r=this.__data__;if(r instanceof i){var n=r.__data__;if(!a||n.length2?t[2]:void 0;for(u&&a(t[0],t[1],u)&&(n=1);++r-1:!!f&&i(e,t,r)>-1}var i=e("./_baseIndexOf"),a=e("./isArrayLike"),s=e("./isString"),o=e("./toInteger"),c=e("./values"),u=Math.max;t.exports=n},{"./_baseIndexOf":48,"./isArrayLike":232,"./isString":246,"./toInteger":272,"./values":277}],227:[function(e,t,r){function n(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:a(r);return o<0&&(o=s(n+o,0)),i(e,t,o)}var i=e("./_baseIndexOf"),a=e("./toInteger"),s=Math.max;t.exports=n},{"./_baseIndexOf":48,"./toInteger":272}],228:[function(e,t,r){var n=e("./_arrayMap"),i=e("./_baseIntersection"),a=e("./_baseRest"),s=e("./_castArrayLikeObject"),o=a(function(e){var t=n(e,s);return t.length&&t[0]===e[0]?i(t):[]});t.exports=o},{"./_arrayMap":24,"./_baseIntersection":49,"./_baseRest":75,"./_castArrayLikeObject":88}],229:[function(e,t,r){var n=e("./constant"),i=e("./_createInverter"),a=e("./identity"),s=Object.prototype,o=s.toString,c=i(function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=o.call(t)),e[t]=r},n(a));t.exports=c},{"./_createInverter":118,"./constant":214,"./identity":225}],230:[function(e,t,r){var n=e("./_baseIsArguments"),i=e("./isObjectLike"),a=Object.prototype,s=a.hasOwnProperty,o=a.propertyIsEnumerable,c=n(function(){return arguments}())?n:function(e){return i(e)&&s.call(e,"callee")&&!o.call(e,"callee")};t.exports=c},{"./_baseIsArguments":51,"./isObjectLike":243}],231:[function(e,t,r){var n=Array.isArray;t.exports=n},{}],232:[function(e,t,r){function n(e){return null!=e&&a(e.length)&&!i(e)}var i=e("./isFunction"),a=e("./isLength");t.exports=n},{"./isFunction":237,"./isLength":238}],233:[function(e,t,r){function n(e){return a(e)&&i(e)}var i=e("./isArrayLike"),a=e("./isObjectLike");t.exports=n},{"./isArrayLike":232,"./isObjectLike":243}],234:[function(e,t,r){var n=e("./_root"),i=e("./stubFalse"),a="object"==typeof r&&r&&!r.nodeType&&r,s=a&&"object"==typeof t&&t&&!t.nodeType&&t,o=s&&s.exports===a,c=o?n.Buffer:void 0,u=c?c.isBuffer:void 0,f=u||i;t.exports=f},{"./_root":190,"./stubFalse":269}],235:[function(e,t,r){function n(e){if(null==e)return!0;if(c(e)&&(o(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||l(e)||s(e)))return!e.length;var t=a(e);if(t==h||t==p)return!e.size;if(f(e))return!i(e).length;for(var r in e)if(_.call(e,r))return!1;return!0}var i=e("./_baseKeys"),a=e("./_getTag"),s=e("./isArguments"),o=e("./isArray"),c=e("./isArrayLike"),u=e("./isBuffer"),f=e("./_isPrototype"),l=e("./isTypedArray"),h="[object Map]",p="[object Set]",d=Object.prototype,_=d.hasOwnProperty;t.exports=n},{"./_baseKeys":61,"./_getTag":141,"./_isPrototype":162,"./isArguments":230,"./isArray":231,"./isArrayLike":232,"./isBuffer":234,"./isTypedArray":248}],236:[function(e,t,r){function n(e,t){return i(e,t)}var i=e("./_baseIsEqual");t.exports=n},{"./_baseIsEqual":52}],237:[function(e,t,r){function n(e){if(!a(e))return!1;var t=i(e);return t==o||t==c||t==s||t==u}var i=e("./_baseGetTag"),a=e("./isObject"),s="[object AsyncFunction]",o="[object Function]",c="[object GeneratorFunction]",u="[object Proxy]";t.exports=n},{"./_baseGetTag":46,"./isObject":242}],238:[function(e,t,r){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}var i=9007199254740991;t.exports=n},{}],239:[function(e,t,r){var n=e("./_baseIsMap"),i=e("./_baseUnary"),a=e("./_nodeUtil"),s=a&&a.isMap,o=s?i(s):n;t.exports=o},{"./_baseIsMap":54,"./_baseUnary":84,"./_nodeUtil":182}],240:[function(e,t,r){function n(e){return i(e)&&e!=+e}var i=e("./isNumber");t.exports=n},{"./isNumber":241}],241:[function(e,t,r){function n(e){return"number"==typeof e||a(e)&&i(e)==s}var i=e("./_baseGetTag"),a=e("./isObjectLike"),s="[object Number]";t.exports=n},{"./_baseGetTag":46,"./isObjectLike":243}],242:[function(e,t,r){function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}t.exports=n},{}],243:[function(e,t,r){function n(e){return null!=e&&"object"==typeof e}t.exports=n},{}],244:[function(e,t,r){function n(e){if(!s(e)||i(e)!=o)return!1;var t=a(e);if(null===t)return!0 ;var r=l.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&f.call(r)==h}var i=e("./_baseGetTag"),a=e("./_getPrototype"),s=e("./isObjectLike"),o="[object Object]",c=Function.prototype,u=Object.prototype,f=c.toString,l=u.hasOwnProperty,h=f.call(Object);t.exports=n},{"./_baseGetTag":46,"./_getPrototype":137,"./isObjectLike":243}],245:[function(e,t,r){var n=e("./_baseIsSet"),i=e("./_baseUnary"),a=e("./_nodeUtil"),s=a&&a.isSet,o=s?i(s):n;t.exports=o},{"./_baseIsSet":58,"./_baseUnary":84,"./_nodeUtil":182}],246:[function(e,t,r){function n(e){return"string"==typeof e||!a(e)&&s(e)&&i(e)==o}var i=e("./_baseGetTag"),a=e("./isArray"),s=e("./isObjectLike"),o="[object String]";t.exports=n},{"./_baseGetTag":46,"./isArray":231,"./isObjectLike":243}],247:[function(e,t,r){function n(e){return"symbol"==typeof e||a(e)&&i(e)==s}var i=e("./_baseGetTag"),a=e("./isObjectLike"),s="[object Symbol]";t.exports=n},{"./_baseGetTag":46,"./isObjectLike":243}],248:[function(e,t,r){var n=e("./_baseIsTypedArray"),i=e("./_baseUnary"),a=e("./_nodeUtil"),s=a&&a.isTypedArray,o=s?i(s):n;t.exports=o},{"./_baseIsTypedArray":59,"./_baseUnary":84,"./_nodeUtil":182}],249:[function(e,t,r){function n(e){return void 0===e}t.exports=n},{}],250:[function(e,t,r){function n(e){return s(e)?i(e):a(e)}var i=e("./_arrayLikeKeys"),a=e("./_baseKeys"),s=e("./isArrayLike");t.exports=n},{"./_arrayLikeKeys":23,"./_baseKeys":61,"./isArrayLike":232}],251:[function(e,t,r){function n(e){return s(e)?i(e,!0):a(e)}var i=e("./_arrayLikeKeys"),a=e("./_baseKeysIn"),s=e("./isArrayLike");t.exports=n},{"./_arrayLikeKeys":23,"./_baseKeysIn":62,"./isArrayLike":232}],252:[function(e,t,r){function n(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}t.exports=n},{}],253:[function(e,t,r){function n(e,t){return(o(e)?i:s)(e,a(t,3))}var i=e("./_arrayMap"),a=e("./_baseIteratee"),s=e("./_baseMap"),o=e("./isArray");t.exports=n},{"./_arrayMap":24,"./_baseIteratee":60,"./_baseMap":64,"./isArray":231}],254:[function(e,t,r){function n(e,t){var r={};return t=s(t,3),a(e,function(e,n,a){i(r,t(e,n,a),e)}),r}var i=e("./_baseAssignValue"),a=e("./_baseForOwn"),s=e("./_baseIteratee");t.exports=n},{"./_baseAssignValue":34,"./_baseForOwn":43,"./_baseIteratee":60}],255:[function(e,t,r){function n(e,t){var r={};return t=s(t,3),a(e,function(e,n,a){i(r,n,t(e,n,a))}),r}var i=e("./_baseAssignValue"),a=e("./_baseForOwn"),s=e("./_baseIteratee");t.exports=n},{"./_baseAssignValue":34,"./_baseForOwn":43,"./_baseIteratee":60}],256:[function(e,t,r){function n(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(a);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=e.apply(this,n);return r.cache=a.set(i,s)||a,s};return r.cache=new(n.Cache||i),r}var i=e("./_MapCache"),a="Expected a function";n.Cache=i,t.exports=n},{"./_MapCache":10}],257:[function(e,t,r){var n=e("./_baseMerge"),i=e("./_createAssigner"),a=i(function(e,t,r){n(e,t,r)});t.exports=a},{"./_baseMerge":67,"./_createAssigner":110}],258:[function(e,t,r){function n(){}t.exports=n},{}],259:[function(e,t,r){var n=e("./_arrayMap"),i=e("./_baseClone"),a=e("./_baseUnset"),s=e("./_castPath"),o=e("./_copyObject"),c=e("./_customOmitClone"),u=e("./_flatRest"),f=e("./_getAllKeysIn"),l=u(function(e,t){var r={};if(null==e)return r;var u=!1;t=n(t,function(t){return t=s(t,e),u||(u=t.length>1),t}),o(e,f(e),r),u&&(r=i(r,7,c));for(var l=t.length;l--;)a(r,t[l]);return r});t.exports=l},{"./_arrayMap":24,"./_baseClone":36,"./_baseUnset":85,"./_castPath":90,"./_copyObject":105,"./_customOmitClone":122,"./_flatRest":127,"./_getAllKeysIn":130}],260:[function(e,t,r){function n(e,t,r,n){return null==e?[]:(a(t)||(t=null==t?[]:[t]),r=n?void 0:r,a(r)||(r=null==r?[]:[r]),i(e,t,r))}var i=e("./_baseOrderBy"),a=e("./isArray");t.exports=n},{"./_baseOrderBy":69,"./isArray":231}],261:[function(e,t,r){var n=e("./_baseRest"),i=e("./_createWrap"),a=e("./_getHolder"),s=e("./_replaceHolders"),o=n(function(e,t){var r=s(t,a(o));return i(e,32,void 0,t,r)});o.placeholder={},t.exports=o},{"./_baseRest":75,"./_createWrap":121,"./_getHolder":133,"./_replaceHolders":189}],262:[function(e,t,r){var n=e("./_baseRest"),i=e("./_createWrap"),a=e("./_getHolder"),s=e("./_replaceHolders"),o=n(function(e,t){var r=s(t,a(o));return i(e,64,void 0,t,r)});o.placeholder={},t.exports=o},{"./_baseRest":75,"./_createWrap":121,"./_getHolder":133,"./_replaceHolders":189}],263:[function(e,t,r){var n=e("./_basePick"),i=e("./_flatRest"),a=i(function(e,t){return null==e?{}:n(e,t)});t.exports=a},{"./_basePick":70,"./_flatRest":127}],264:[function(e,t,r){function n(e,t){if(null==e)return{};var r=i(o(e),function(e){return[e]});return t=a(t),s(e,r,function(e,r){return t(e,r[0])})}var i=e("./_arrayMap"),a=e("./_baseIteratee"),s=e("./_basePickBy"),o=e("./_getAllKeysIn");t.exports=n},{"./_arrayMap":24,"./_baseIteratee":60,"./_basePickBy":71,"./_getAllKeysIn":130}],265:[function(e,t,r){function n(e){return s(e)?i(o(e)):a(e)}var i=e("./_baseProperty"),a=e("./_basePropertyDeep"),s=e("./_isKey"),o=e("./_toKey");t.exports=n},{"./_baseProperty":72,"./_basePropertyDeep":73,"./_isKey":158,"./_toKey":207}],266:[function(e,t,r){function n(e,t,r){var n=c(e)?i:o,u=arguments.length<3;return n(e,s(t,4),r,u,a)}var i=e("./_arrayReduce"),a=e("./_baseEach"),s=e("./_baseIteratee"),o=e("./_baseReduce"),c=e("./isArray");t.exports=n},{"./_arrayReduce":26,"./_baseEach":38,"./_baseIteratee":60,"./_baseReduce":74,"./isArray":231}],267:[function(e,t,r){function n(e,t,r){return e=o(e),r=null==r?0:i(s(r),0,e.length),t=a(t),e.slice(r,r+t.length)==t}var i=e("./_baseClamp"),a=e("./_baseToString"),s=e("./toInteger"),o=e("./toString");t.exports=n},{"./_baseClamp":35,"./_baseToString":83,"./toInteger":272,"./toString":275}],268:[function(e,t,r){function n(){return[]}t.exports=n},{}],269:[function(e,t,r){function n(){return!1}t.exports=n},{}],270:[function(e,t,r){function n(e,t){return e&&e.length?a(e,i(t,2)):0}var i=e("./_baseIteratee"),a=e("./_baseSum");t.exports=n},{"./_baseIteratee":60,"./_baseSum":81}],271:[function(e,t,r){function n(e){if(!e)return 0===e?e:0;if((e=i(e))===a||e===-a){return(e<0?-1:1)*s}return e===e?e:0}var i=e("./toNumber"),a=1/0,s=1.7976931348623157e308;t.exports=n},{"./toNumber":273}],272:[function(e,t,r){function n(e){var t=i(e),r=t%1;return t===t?r?t-r:t:0}var i=e("./toFinite");t.exports=n},{"./toFinite":271}],273:[function(e,t,r){function n(e){if("number"==typeof e)return e;if(a(e))return s;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var r=u.test(e);return r||f.test(e)?l(e.slice(2),r?2:8):c.test(e)?s:+e}var i=e("./isObject"),a=e("./isSymbol"),s=NaN,o=/^\s+|\s+$/g,c=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,f=/^0o[0-7]+$/i,l=parseInt;t.exports=n},{"./isObject":242,"./isSymbol":247}],274:[function(e,t,r){function n(e){return i(e,a(e))}var i=e("./_copyObject"),a=e("./keysIn");t.exports=n},{"./_copyObject":105,"./keysIn":251}],275:[function(e,t,r){function n(e){return null==e?"":i(e)}var i=e("./_baseToString");t.exports=n},{"./_baseToString":83}],276:[function(e,t,r){function n(e,t,r){if((e=u(e))&&(r||void 0===t))return e.replace(f,"");if(!e||!(t=i(t)))return e;var n=c(e),l=c(t),h=o(n,l),p=s(n,l)+1;return a(n,h,p).join("")}var i=e("./_baseToString"),a=e("./_castSlice"),s=e("./_charsEndIndex"),o=e("./_charsStartIndex"),c=e("./_stringToArray"),u=e("./toString"),f=/^\s+|\s+$/g;t.exports=n},{"./_baseToString":83,"./_castSlice":91,"./_charsEndIndex":92,"./_charsStartIndex":93,"./_stringToArray":205,"./toString":275}],277:[function(e,t,r){function n(e){return null==e?[]:i(e,a(e))}var i=e("./_baseValues"),a=e("./keys");t.exports=n},{"./_baseValues":86,"./keys":250}],278:[function(e,t,r){function n(e){if(c(e)&&!o(e)&&!(e instanceof i)){if(e instanceof a)return e;if(l.call(e,"__wrapped__"))return u(e)}return new a(e)}var i=e("./_LazyWrapper"),a=e("./_LodashWrapper"),s=e("./_baseLodash"),o=e("./isArray"),c=e("./isObjectLike"),u=e("./_wrapperClone"),f=Object.prototype,l=f.hasOwnProperty;n.prototype=s.prototype,n.prototype.constructor=n,t.exports=n},{"./_LazyWrapper":6,"./_LodashWrapper":8,"./_baseLodash":63,"./_wrapperClone":211,"./isArray":231,"./isObjectLike":243}],279:[function(e,t,r){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function s(e){if(h===clearTimeout)return clearTimeout(e);if((h===i||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(e);try{return h(e)}catch(t){try{return h.call(null,e)}catch(t){return h.call(this,e)}}}function o(){v&&d&&(v=!1,d.length?_=d.concat(_):y=-1,_.length&&c())}function c(){if(!v){var e=a(o);v=!0;for(var t=_.length;t;){for(d=_,_=[];++y1)for(var r=1;r=0;--i){var a,s=e[i];if("[]"===s)a=[],a=a.concat(n);else{a=r.plainObjects?Object.create(null):{};var o="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,c=parseInt(o,10);!isNaN(c)&&s!==o&&String(c)===o&&c>=0&&r.parseArrays&&c<=r.arrayLimit?(a=[],a[c]=n):a[o]=n}n=a}return n},c=function(e,t,r){if(e){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,c=a.exec(n),u=c?n.slice(0,c.index):n,f=[];if(u){if(!r.plainObjects&&i.call(Object.prototype,u)&&!r.allowPrototypes)return;f.push(u)}for(var l=0;null!==(c=s.exec(n))&&l0?S+O:""}},{"./formats":280,"./utils":284}],284:[function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e){for(var t;e.length;){var r=e.pop();if(t=r.obj[r.prop],Array.isArray(t)){for(var n=[],i=0;i=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122?r+=t.charAt(n):a<128?r+=i[a]:a<2048?r+=i[192|a>>6]+i[128|63&a]:a<55296||a>=57344?r+=i[224|a>>12]+i[128|a>>6&63]+i[128|63&a]:(n+=1,a=65536+((1023&a)<<10|1023&t.charCodeAt(n)),r+=i[240|a>>18]+i[128|a>>12&63]+i[128|a>>6&63]+i[128|63&a])}return r},r.compact=function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),_(t)?n.showHidden=t:t&&r._extend(n,t),x(n.showHidden)&&(n.showHidden=!1),x(n.depth)&&(n.depth=2),x(n.colors)&&(n.colors=!1),x(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=a),c(n,e,n.depth)}function a(e,t){var r=i.styles[t];return r?"["+i.colors[r][0]+"m"+e+"["+i.colors[r][1]+"m":e}function s(e,t){return e}function o(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}function c(e,t,n){if(e.customInspect&&t&&O(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return m(i)||(i=c(e,i,n)),i}var a=u(e,t);if(a)return a;var s=Object.keys(t),_=o(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),A(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return f(t);if(0===s.length){if(O(t)){var v=t.name?": "+t.name:"";return e.stylize("[Function"+v+"]","special")}if(j(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(F(t))return e.stylize(Date.prototype.toString.call(t),"date");if(A(t))return f(t)}var y="",g=!1,b=["{","}"];if(d(t)&&(g=!0,b=["[","]"]),O(t)){y=" [Function"+(t.name?": "+t.name:"")+"]"}if(j(t)&&(y=" "+RegExp.prototype.toString.call(t)),F(t)&&(y=" "+Date.prototype.toUTCString.call(t)),A(t)&&(y=" "+f(t)),0===s.length&&(!g||0==t.length))return b[0]+y+b[1];if(n<0)return j(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var x;return x=g?l(e,t,n,_,s):s.map(function(r){return h(e,t,n,_,r,g)}),e.seen.pop(),p(x,y,b)}function u(e,t){if(x(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return g(t)?e.stylize(""+t,"number"):_(t)?e.stylize(""+t,"boolean"):v(t)?e.stylize("null","null"):void 0}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function l(e,t,r,n,i){for(var a=[],s=0,o=t.length;s-1&&(o=a?o.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+o.split("\n").map(function(e){return" "+e}).join("\n"))):o=e.stylize("[Circular]","special")),x(s)){if(a&&i.match(/^\d+$/))return o;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+o}function p(e,t,r){var n=0;return e.reduce(function(e,t){return n++,t.indexOf("\n")>=0&&n++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function d(e){return Array.isArray(e)}function _(e){return"boolean"==typeof e}function v(e){return null===e}function y(e){return null==e}function g(e){return"number"==typeof e}function m(e){return"string"==typeof e}function b(e){return"symbol"==typeof e}function x(e){return void 0===e}function j(e){return R(e)&&"[object RegExp]"===w(e)}function R(e){return"object"==typeof e&&null!==e}function F(e){return R(e)&&"[object Date]"===w(e)}function A(e){return R(e)&&("[object Error]"===w(e)||e instanceof Error)}function O(e){return"function"==typeof e}function S(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function w(e){return Object.prototype.toString.call(e)}function P(e){return e<10?"0"+e.toString(10):e.toString(10)}function E(){var e=new Date,t=[P(e.getHours()),P(e.getMinutes()),P(e.getSeconds())].join(":");return[e.getDate(),L[e.getMonth()],t].join(" ")}function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var I=/%[sdj%]/g;r.format=function(e){if(!m(e)){for(var t=[],r=0;r=a)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),o=n[r];r0;if(n(i)||!s)return s;var o=""+i;return-1!==a(t[r],o)}};t.exports=l},{"lodash/defaults":215,"lodash/filter":217,"lodash/indexOf":227,"lodash/isEmpty":235,"lodash/isFunction":237,"lodash/isString":246,"lodash/isUndefined":249,"lodash/omit":259,"lodash/reduce":266}],289:[function(e,t,r){"use strict";function n(e,t){var r={},n=a(t,function(e){return-1!==e.indexOf("attribute:")}),u=s(n,function(e){return e.split(":")[1]});-1===c(u,"*")?i(u,function(t){e.isConjunctiveFacet(t)&&e.isFacetRefined(t)&&(r.facetsRefinements||(r.facetsRefinements={}),r.facetsRefinements[t]=e.facetsRefinements[t]),e.isDisjunctiveFacet(t)&&e.isDisjunctiveFacetRefined(t)&&(r.disjunctiveFacetsRefinements||(r.disjunctiveFacetsRefinements={}),r.disjunctiveFacetsRefinements[t]=e.disjunctiveFacetsRefinements[t]),e.isHierarchicalFacet(t)&&e.isHierarchicalFacetRefined(t)&&(r.hierarchicalFacetsRefinements||(r.hierarchicalFacetsRefinements={}),r.hierarchicalFacetsRefinements[t]=e.hierarchicalFacetsRefinements[t]);var n=e.getNumericRefinements(t);o(n)||(r.numericRefinements||(r.numericRefinements={}),r.numericRefinements[t]=e.numericRefinements[t])}):(o(e.numericRefinements)||(r.numericRefinements=e.numericRefinements),o(e.facetsRefinements)||(r.facetsRefinements=e.facetsRefinements),o(e.disjunctiveFacetsRefinements)||(r.disjunctiveFacetsRefinements=e.disjunctiveFacetsRefinements),o(e.hierarchicalFacetsRefinements)||(r.hierarchicalFacetsRefinements=e.hierarchicalFacetsRefinements));var f=a(t,function(e){return-1===e.indexOf("attribute:")});return i(f,function(t){r[t]=e[t]}),r}var i=e("lodash/forEach"),a=e("lodash/filter"),s=e("lodash/map"),o=e("lodash/isEmpty"),c=e("lodash/indexOf");t.exports=n},{"lodash/filter":217,"lodash/forEach":221,"lodash/indexOf":227,"lodash/isEmpty":235,"lodash/map":253}],290:[function(e,t,r){"use strict";function n(e,t){return b(e,function(e){return v(e,t)})}function i(e){var t=e?i._parseNumbers(e):{};this.index=t.index||"",this.query=t.query||"",this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{},this.numericFilters=t.numericFilters,this.tagFilters=t.tagFilters,this.optionalTagFilters=t.optionalTagFilters,this.optionalFacetFilters=t.optionalFacetFilters,this.hitsPerPage=t.hitsPerPage,this.maxValuesPerFacet=t.maxValuesPerFacet,this.page=t.page||0,this.queryType=t.queryType,this.typoTolerance=t.typoTolerance,this.minWordSizefor1Typo=t.minWordSizefor1Typo,this.minWordSizefor2Typos=t.minWordSizefor2Typos,this.minProximity=t.minProximity,this.allowTyposOnNumericTokens=t.allowTyposOnNumericTokens,this.ignorePlurals=t.ignorePlurals,this.restrictSearchableAttributes=t.restrictSearchableAttributes,this.advancedSyntax=t.advancedSyntax,this.analytics=t.analytics,this.analyticsTags=t.analyticsTags,this.synonyms=t.synonyms,this.replaceSynonymsInHighlight=t.replaceSynonymsInHighlight,this.optionalWords=t.optionalWords,this.removeWordsIfNoResults=t.removeWordsIfNoResults,this.attributesToRetrieve=t.attributesToRetrieve,this.attributesToHighlight=t.attributesToHighlight,this.highlightPreTag=t.highlightPreTag,this.highlightPostTag=t.highlightPostTag,this.attributesToSnippet=t.attributesToSnippet,this.getRankingInfo=t.getRankingInfo,this.distinct=t.distinct,this.aroundLatLng=t.aroundLatLng,this.aroundLatLngViaIP=t.aroundLatLngViaIP,this.aroundRadius=t.aroundRadius,this.minimumAroundRadius=t.minimumAroundRadius,this.aroundPrecision=t.aroundPrecision,this.insideBoundingBox=t.insideBoundingBox,this.insidePolygon=t.insidePolygon,this.snippetEllipsisText=t.snippetEllipsisText,this.disableExactOnAttributes=t.disableExactOnAttributes,this.enableExactOnSingleWordQuery=t.enableExactOnSingleWordQuery,this.offset=t.offset,this.length=t.length;var r=this;o(t,function(e,t){-1===i.PARAMETERS.indexOf(t)&&(r[t]=e)})}var a=e("lodash/keys"),s=e("lodash/intersection"),o=e("lodash/forOwn"),c=e("lodash/forEach"),u=e("lodash/filter"),f=e("lodash/map"),l=e("lodash/reduce"),h=e("lodash/omit"),p=e("lodash/indexOf"),d=e("lodash/isNaN"),_=e("lodash/isEmpty"),v=e("lodash/isEqual"),y=e("lodash/isUndefined"),g=e("lodash/isString"),m=e("lodash/isFunction"),b=e("lodash/find"),x=e("lodash/trim"),j=e("lodash/defaults"),R=e("lodash/merge"),F=e("../functions/valToNumber"),A=e("./filterState"),O=e("./RefinementList");i.PARAMETERS=a(new i),i._parseNumbers=function(e){if(e instanceof i)return e;var t={};if(c(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"],function(r){var n=e[r];if(g(n)){var i=parseFloat(n);t[r]=d(i)?n:i}}),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map(function(e){return e.map(function(e){return parseFloat(e)})})),e.numericRefinements){var r={};c(e.numericRefinements,function(e,t){r[t]={},c(e,function(e,n){var i=f(e,function(e){return Array.isArray(e)?f(e,function(e){return g(e)?parseFloat(e):e}):g(e)?parseFloat(e):e});r[t][n]=i})}),t.numericRefinements=r}return R({},e,t)},i.make=function(e){var t=new i(e);return c(e.hierarchicalFacets,function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),r=t.getHierarchicalRefinement(e.name),0===r.length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}}),t},i.validate=function(e,t){var r=t||{} ;return e.tagFilters&&r.tagRefinements&&r.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&r.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&r.numericRefinements&&!_(r.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):!_(e.numericRefinements)&&r.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},i.prototype={constructor:i,clearRefinements:function(e){var t=O.clearRefinement,r={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:t(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:t(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:t(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:t(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return r.numericRefinements===this.numericRefinements&&r.facetsRefinements===this.facetsRefinements&&r.facetsExcludes===this.facetsExcludes&&r.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&r.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(r)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,r){var n=F(r);if(this.isNumericRefined(e,t,n))return this;var i=R({},this.numericRefinements);return i[e]=R({},i[e]),i[e][t]?(i[e][t]=i[e][t].slice(),i[e][t].push(n)):i[e][t]=[n],this.setQueryParameters({numericRefinements:i})},getConjunctiveRefinements:function(e){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,r){if(void 0!==r){var n=F(r);return this.isNumericRefined(e,t,n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(r,i){return i===e&&r.op===t&&v(r.val,n)})}):this}return void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(r,n){return n===e&&r.op===t})}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(t,r){return r===e})}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(y(e))return _(this.numericRefinements)?this.numericRefinements:{};if(g(e))return _(this.numericRefinements[e])?this.numericRefinements:h(this.numericRefinements,e);if(m(e)){var t=!1,r=l(this.numericRefinements,function(r,n,i){var a={};return c(n,function(r,n){var s=[];c(r,function(t){e({val:t,op:n},i,"numeric")||s.push(t)}),_(s)?t=!0:(s.length!==r.length&&(t=!0),a[n]=s)}),_(a)||(r[i]=a),r},{});return t?r:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return O.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:O.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return O.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:O.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return O.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:O.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:u(this.facets,function(t){return t!==e})}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:u(this.disjunctiveFacets,function(t){return t!==e})}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:u(this.hierarchicalFacets,function(t){return t.name!==e})}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return O.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:O.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return O.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:O.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return O.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:O.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:u(this.tagRefinements,function(t){return t!==e})};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:O.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:O.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:O.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),n={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?n[e]=[]:n[e]=[t.slice(0,t.lastIndexOf(r))]:n[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:j({},n,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");var r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:j({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))throw new Error(e+" is not refined.");var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:j({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return p(this.disjunctiveFacets,e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return p(this.facets,e)>-1},isFacetRefined:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return O.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return O.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return O.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this.getHierarchicalRefinement(e);return t?-1!==p(r,t):r.length>0},isNumericRefined:function(e,t,r){if(y(r)&&y(t))return!!this.numericRefinements[e];var i=this.numericRefinements[e]&&!y(this.numericRefinements[e][t]);if(y(r)||!i)return i;var a=F(r),s=!y(n(this.numericRefinements[e][t],a));return i&&s},isTagRefined:function(e){return-1!==p(this.tagRefinements,e)},getRefinedDisjunctiveFacets:function(){var e=s(a(this.numericRefinements),this.disjunctiveFacets);return a(this.disjunctiveFacetsRefinements).concat(e).concat(this.getRefinedHierarchicalFacets())},getRefinedHierarchicalFacets:function(){return s(f(this.hierarchicalFacets,"name"),a(this.hierarchicalFacetsRefinements))},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return u(this.disjunctiveFacets,function(t){return-1===p(e,t)})},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={};return o(this,function(r,n){-1===p(e,n)&&void 0!==r&&(t[n]=r)}),t},getQueryParameter:function(e){if(!this.hasOwnProperty(e))throw new Error("Parameter '"+e+"' is not an attribute of SearchParameters (http://algolia.github.io/algoliasearch-helper-js/docs/SearchParameters.html)");return this[e]},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=i.validate(this,e);if(t)throw t;var r=i._parseNumbers(e);return this.mutateMe(function(t){var n=a(e);return c(n,function(e){t[e]=r[e]}),t})},filter:function(e){return A(this,e)},mutateMe:function(e){var t=new this.constructor(this);return e(t,this),t},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return b(this.hierarchicalFacets,{name:e})},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))throw new Error("Cannot get the breadcrumb of an unknown hierarchical facet: `"+e+"`");var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),n=t.split(r);return f(n,x)},toString:function(){return JSON.stringify(this,null,2)}},t.exports=i},{"../functions/valToNumber":296,"./RefinementList":288,"./filterState":289,"lodash/defaults":215,"lodash/filter":217,"lodash/find":218,"lodash/forEach":221,"lodash/forOwn":222,"lodash/indexOf":227,"lodash/intersection":228,"lodash/isEmpty":235,"lodash/isEqual":236,"lodash/isFunction":237,"lodash/isNaN":240,"lodash/isString":246,"lodash/isUndefined":249,"lodash/keys":250,"lodash/map":253,"lodash/merge":257,"lodash/omit":259,"lodash/reduce":266,"lodash/trim":276}],291:[function(e,t,r){"use strict";var n=e("lodash/invert"),i=e("lodash/keys"),a={advancedSyntax:"aS",allowTyposOnNumericTokens:"aTONT",analyticsTags:"aT",analytics:"a",aroundLatLngViaIP:"aLLVIP",aroundLatLng:"aLL",aroundPrecision:"aP",aroundRadius:"aR",attributesToHighlight:"aTH",attributesToRetrieve:"aTR",attributesToSnippet:"aTS",disjunctiveFacetsRefinements:"dFR",disjunctiveFacets:"dF",distinct:"d",facetsExcludes:"fE",facetsRefinements:"fR",facets:"f",getRankingInfo:"gRI",hierarchicalFacetsRefinements:"hFR",hierarchicalFacets:"hF",highlightPostTag:"hPoT",highlightPreTag:"hPrT",hitsPerPage:"hPP",ignorePlurals:"iP",index:"idx",insideBoundingBox:"iBB",insidePolygon:"iPg",length:"l",maxValuesPerFacet:"mVPF",minimumAroundRadius:"mAR",minProximity:"mP",minWordSizefor1Typo:"mWS1T",minWordSizefor2Typos:"mWS2T",numericFilters:"nF",numericRefinements:"nR",offset:"o",optionalWords:"oW",page:"p",queryType:"qT",query:"q",removeWordsIfNoResults:"rWINR",replaceSynonymsInHighlight:"rSIH",restrictSearchableAttributes:"rSA",synonyms:"s",tagFilters:"tF",tagRefinements:"tR",typoTolerance:"tT",optionalTagFilters:"oTF",optionalFacetFilters:"oFF",snippetEllipsisText:"sET",disableExactOnAttributes:"dEOA",enableExactOnSingleWordQuery:"eEOSWQ"},s=n(a);t.exports={ENCODED_PARAMETERS:i(s),decode:function(e){return s[e]},encode:function(e){return a[e]}}},{"lodash/invert":229,"lodash/keys":250}],292:[function(e,t,r){"use strict";function n(e){return function(t,r){var n=e.hierarchicalFacets[r],a=e.hierarchicalFacetsRefinements[n.name]&&e.hierarchicalFacetsRefinements[n.name][0]||"",s=e._getHierarchicalFacetSeparator(n),o=e._getHierarchicalRootPath(n),c=e._getHierarchicalShowParentLevel(n),f=d(e._getHierarchicalFacetSortBy(n)),l=i(f,s,o,c,a),h=t;return o&&(h=t.slice(o.split(s).length)),u(h,l,{name:e.hierarchicalFacets[r].name,count:null,isRefined:!0,path:null,data:null})}}function i(e,t,r,n,i){return function(o,u,l){var d=o;if(l>0){var _=0;for(d=o;_-1&&(f.disjunctiveFacets[o].data[t]=0)})}}),u++}),p(e.getRefinedHierarchicalFacets(),function(r){var n=e.getHierarchicalFacetByName(r),i=e._getHierarchicalFacetSeparator(n),a=e.getHierarchicalRefinement(r);if(!(0===a.length||a[0].split(i).length<2)){var s=t[u];p(s.facets,function(t,r){var s=v(e.hierarchicalFacets,{name:n.name}),o=v(f.hierarchicalFacets[s],{attribute:r});if(-1!==o){var c={};if(a.length>0){var u=a[0].split(i)[0];c[u]=f.hierarchicalFacets[s][o].data[u]}f.hierarchicalFacets[s][o].data=R(c,t,f.hierarchicalFacets[s][o].data)}}),u++}}),p(e.facetsExcludes,function(e,t){var n=o[t];f.facets[n]={name:t,data:r.facets[t],exhaustive:r.exhaustiveFacetsCount},p(e,function(e){f.facets[n]=f.facets[n]||{name:t},f.facets[n].data=f.facets[n].data||{},f.facets[n].data[e]=0})}),this.hierarchicalFacets=x(this.hierarchicalFacets,P(e)),this.facets=d(this.facets),this.disjunctiveFacets=d(this.disjunctiveFacets),this._state=e}function o(e,t){var r={name:t};if(e._state.isConjunctiveFacet(t)){var n=m(e.facets,r);return n?x(n.data,function(r,n){return{name:n,count:r,isRefined:e._state.isFacetRefined(t,n),isExcluded:e._state.isExcludeRefined(t,n)}}):[]}if(e._state.isDisjunctiveFacet(t)){var i=m(e.disjunctiveFacets,r);return i?x(i.data,function(r,n){return{name:n,count:r,isRefined:e._state.isDisjunctiveFacetRefined(t,n)}}):[]}if(e._state.isHierarchicalFacet(t))return m(e.hierarchicalFacets,r)}function c(e,t){if(!t.data||0===t.data.length)return t;var r=x(t.data,O(c,e)),n=e(r);return F({},t,{data:n})}function u(e,t){return t.sort(e)}function f(e,t){var r=m(e,{name:t});return r&&r.stats}function l(e,t,r,n,i){var a=m(i,{name:r}),s=y(a,"data["+n+"]"),o=y(a,"exhaustive");return{type:t,attributeName:r,name:n,count:s||0,exhaustive:o||!1}}function h(e,t,r,n){for(var i=m(n,{name:t}),a=e.getHierarchicalFacetByName(t),s=r.split(a.separator),o=s[s.length-1],c=0;void 0!==i&&c0},n.prototype._change=function(e){e!==this.state&&(this.state=e,this.emit("change",this.state,this.lastResults))},n.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},n.prototype.setClient=function(e){return this.client===e?this:(e.addAlgoliaAgent&&!s(e)&&e.addAlgoliaAgent("JS Helper "+g),this.client=e,this)},n.prototype.getClient=function(){return this.client},n.prototype.derive=function(e){var t=new u(this,e);return this.derivedHelpers.push(t),t},n.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},n.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},t.exports=n},{"./DerivedHelper":287,"./SearchParameters":290,"./SearchResults":293,"./requestBuilder":297,"./url":298,"./version":299,events:2,"lodash/flatten":220,"lodash/forEach":221,"lodash/isEmpty":235,"lodash/map":253,util:286}],295:[function(e,t,r){"use strict";var n=e("lodash/reduce"),i=e("lodash/find"),a=e("lodash/startsWith");t.exports=function(e,t){return n(e,function(e,r){var n=r.split(":");if(t&&1===n.length){var s=i(t,function(e){return a(e,r[0])});s&&(n=s.split(":"))}return e[0].push(n[0]),e[1].push(n[1]),e},[[],[]])}},{"lodash/find":218,"lodash/reduce":266,"lodash/startsWith":267}],296:[function(e,t,r){"use strict";function n(e){if(a(e))return e;if(s(e))return parseFloat(e);if(Array.isArray(e))return i(e,n);throw new Error("The value should be a number, a parseable string or an array of those.")}var i=e("lodash/map"),a=e("lodash/isNumber"),s=e("lodash/isString");t.exports=n},{"lodash/isNumber":241,"lodash/isString":246,"lodash/map":253}],297:[function(e,t,r){"use strict";var n=e("lodash/forEach"),i=e("lodash/map"),a=e("lodash/reduce"),s=e("lodash/merge"),o={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:o._getHitsSearchParams(t)}),n(t.getRefinedDisjunctiveFacets(),function(n){r.push({indexName:e,params:o._getDisjunctiveFacetSearchParams(t,n)})}),n(t.getRefinedHierarchicalFacets(),function(n){var i=t.getHierarchicalFacetByName(n),a=t.getHierarchicalRefinement(n),s=t._getHierarchicalFacetSeparator(i);a.length>0&&a[0].split(s).length>1&&r.push({indexName:e,params:o._getDisjunctiveFacetSearchParams(t,n,!0)})}),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(o._getHitsHierarchicalFacetsAttributes(e)),r=o._getFacetFilters(e),n=o._getNumericFilters(e),i=o._getTagFilters(e),a={facets:t,tagFilters:i};return r.length>0&&(a.facetFilters=r),n.length>0&&(a.numericFilters=n),s(e.getQueryParams(),a)},_getDisjunctiveFacetSearchParams:function(e,t,r){var n=o._getFacetFilters(e,t,r),i=o._getNumericFilters(e,t),a=o._getTagFilters(e),c={hitsPerPage:1,page:0,attributesToRetrieve:[],attributesToHighlight:[],attributesToSnippet:[],tagFilters:a,analytics:!1,clickAnalytics:!1},u=e.getHierarchicalFacetByName(t);return c.facets=u?o._getDisjunctiveHierarchicalFacetAttribute(e,u,r):t,i.length>0&&(c.numericFilters=i),n.length>0&&(c.facetFilters=n),s(e.getQueryParams(),c)},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return n(e.numericRefinements,function(e,a){n(e,function(e,s){t!==a&&n(e,function(e){if(Array.isArray(e)){var t=i(e,function(e){return a+s+e});r.push(t)}else r.push(a+s+e)})})}),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var i=[];return n(e.facetsRefinements,function(e,t){n(e,function(e){i.push(t+":"+e)})}),n(e.facetsExcludes,function(e,t){n(e,function(e){i.push(t+":-"+e)})}),n(e.disjunctiveFacetsRefinements,function(e,r){if(r!==t&&e&&0!==e.length){var a=[];n(e,function(e){a.push(r+":"+e)}),i.push(a)}}),n(e.hierarchicalFacetsRefinements,function(n,a){var s=n[0];if(void 0!==s){var o,c,u=e.getHierarchicalFacetByName(a),f=e._getHierarchicalFacetSeparator(u),l=e._getHierarchicalRootPath(u);if(t===a){if(-1===s.indexOf(f)||!l&&!0===r||l&&l.split(f).length===s.split(f).length)return;l?(c=l.split(f).length-1,s=l):(c=s.split(f).length-2,s=s.slice(0,s.lastIndexOf(f))),o=u.attributes[c]}else c=s.split(f).length-1,o=u.attributes[c];o&&i.push([o+":"+s])}}),i},_getHitsHierarchicalFacetsAttributes:function(e){var t=[];return a(e.hierarchicalFacets,function(t,r){var n=e.getHierarchicalRefinement(r.name)[0];if(!n)return t.push(r.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(r),a=n.split(i).length,s=r.attributes.slice(0,a+1);return t.concat(s)},t)},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(!0===r){var i=e._getHierarchicalRootPath(t),a=0;return i&&(a=i.split(n).length),[t.attributes[a]]}var s=e.getHierarchicalRefinement(t.name)[0]||"",o=s.split(n).length-1;return t.attributes.slice(0,o+1)},getSearchForFacetQuery:function(e,t,r,n){var i=n.isDisjunctiveFacet(e)?n.clearRefinements(e):n,a={facetQuery:t,facetName:e};return"number"==typeof r&&(a.maxFacetHits=r),s(o._getHitsSearchParams(i),a)}};t.exports=o},{"lodash/forEach":221,"lodash/map":253,"lodash/merge":257,"lodash/reduce":266}],298:[function(e,t,r){"use strict";function n(e){return _(e)?p(e,n):Array.isArray(e)?l(e,n):d(e)?g(e):e}function i(e,t,r,n){if(null!==e&&(r=r.replace(e,""),n=n.replace(e,"")),r=t[r]||r,n=t[n]||n,-1!==b.indexOf(r)||-1!==b.indexOf(n)){if("q"===r)return-1;if("q"===n)return 1;var i=-1!==m.indexOf(r),a=-1!==m.indexOf(n);if(i&&!a)return 1;if(a&&!i)return-1}return r.localeCompare(n)}var a=e("./SearchParameters/shortener"),s=e("./SearchParameters"),o=e("qs"),c=e("lodash/bind"),u=e("lodash/forEach"),f=e("lodash/pick"),l=e("lodash/map"),h=e("lodash/mapKeys"),p=e("lodash/mapValues"),d=e("lodash/isString"),_=e("lodash/isPlainObject"),v=e("lodash/isEmpty"),y=e("lodash/invert"),g=e("qs/lib/utils").encode,m=["dFR","fR","nR","hFR","tR"],b=a.ENCODED_PARAMETERS;r.getStateFromQueryString=function(e,t){var r=t&&t.prefix||"",n=t&&t.mapping||{},i=y(n),c=o.parse(e),u=new RegExp("^"+r),l=h(c,function(e,t){var n=r&&u.test(t),s=n?t.replace(u,""):t;return a.decode(i[s]||s)||s}),p=s._parseNumbers(l);return f(p,s.PARAMETERS)},r.getUnrecognizedParametersInQueryString=function(e,t){var r=t&&t.prefix,n=t&&t.mapping||{},i=y(n),s={},c=o.parse(e);if(r){var f=new RegExp("^"+r);u(c,function(e,t){f.test(t)||(s[t]=e)})}else u(c,function(e,t){a.decode(i[t]||t)||(s[t]=e)});return s},r.getQueryStringFromState=function(e,t){var r=t&&t.moreAttributes,s=t&&t.prefix||"",u=t&&t.mapping||{},f=t&&t.safe||!1,l=y(u),p=f?e:n(e),d=h(p,function(e,t){var r=a.encode(t);return s+(u[r]||r)}),_=""===s?null:new RegExp("^"+s),g=c(i,null,_,l);if(!v(r)){var m=o.stringify(d,{encode:f,sort:g}),b=o.stringify(r,{encode:f});return m?m+"&"+b:b}return o.stringify(d,{encode:f,sort:g})}},{"./SearchParameters":290,"./SearchParameters/shortener":291,"lodash/bind":212,"lodash/forEach":221,"lodash/invert":229,"lodash/isEmpty":235,"lodash/isPlainObject":244,"lodash/isString":246,"lodash/map":253,"lodash/mapKeys":254,"lodash/mapValues":255,"lodash/pick":263,qs:281,"qs/lib/utils":284}],299:[function(e,t,r){"use strict";t.exports="2.26.0"},{}]},{},[1])(1)}); +;var n=this.state.getExcludeRefinements(e);d(n,function(e){t.push({value:e,type:"exclude"})})}else if(this.state.isDisjunctiveFacet(e)){var i=this.state.getDisjunctiveRefinements(e);d(i,function(e){t.push({value:e,type:"disjunctive"})})}var a=this.state.getNumericRefinements(e);return d(a,function(e,r){t.push({value:e,operator:r,type:"numeric"})}),t},n.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},n.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},n.prototype._search=function(){var e=this.state,t=f._getQueries(e.index,e),r=[{state:e,queriesCount:t.length,helper:this}];this.emit("search",e,this.lastResults);var n=v(this.derivedHelpers,function(t){var n=t.getModifiedState(e),i=f._getQueries(n.index,n);return r.push({state:n,queriesCount:i.length,helper:t}),t.emit("search",n,t.lastResults),i}),i=t.concat(p(n)),a=this._queryId++;this._currentNbQueries++;try{this.client.search(i).then(this._dispatchAlgoliaResponse.bind(this,r,a)).catch(this._dispatchAlgoliaError.bind(this,a))}catch(e){this.emit("error",e)}},n.prototype._dispatchAlgoliaResponse=function(e,t,r){if(!(t0},n.prototype._change=function(e){e!==this.state&&(this.state=e,this.emit("change",this.state,this.lastResults))},n.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},n.prototype.setClient=function(e){return this.client===e?this:(e.addAlgoliaAgent&&!s(e)&&e.addAlgoliaAgent("JS Helper "+g),this.client=e,this)},n.prototype.getClient=function(){return this.client},n.prototype.derive=function(e){var t=new u(this,e);return this.derivedHelpers.push(t),t},n.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},n.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},t.exports=n},{"./DerivedHelper":287,"./SearchParameters":290,"./SearchResults":293,"./requestBuilder":297,"./url":298,"./version":299,events:2,"lodash/flatten":220,"lodash/forEach":221,"lodash/isEmpty":235,"lodash/map":253,util:286}],295:[function(e,t,r){"use strict";var n=e("lodash/reduce"),i=e("lodash/find"),a=e("lodash/startsWith");t.exports=function(e,t){return n(e,function(e,r){var n=r.split(":");if(t&&1===n.length){var s=i(t,function(e){return a(e,r[0])});s&&(n=s.split(":"))}return e[0].push(n[0]),e[1].push(n[1]),e},[[],[]])}},{"lodash/find":218,"lodash/reduce":266,"lodash/startsWith":267}],296:[function(e,t,r){"use strict";function n(e){if(a(e))return e;if(s(e))return parseFloat(e);if(Array.isArray(e))return i(e,n);throw new Error("The value should be a number, a parseable string or an array of those.")}var i=e("lodash/map"),a=e("lodash/isNumber"),s=e("lodash/isString");t.exports=n},{"lodash/isNumber":241,"lodash/isString":246,"lodash/map":253}],297:[function(e,t,r){"use strict";var n=e("lodash/forEach"),i=e("lodash/map"),a=e("lodash/reduce"),s=e("lodash/merge"),o={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:o._getHitsSearchParams(t)}),n(t.getRefinedDisjunctiveFacets(),function(n){r.push({indexName:e,params:o._getDisjunctiveFacetSearchParams(t,n)})}),n(t.getRefinedHierarchicalFacets(),function(n){var i=t.getHierarchicalFacetByName(n),a=t.getHierarchicalRefinement(n),s=t._getHierarchicalFacetSeparator(i);a.length>0&&a[0].split(s).length>1&&r.push({indexName:e,params:o._getDisjunctiveFacetSearchParams(t,n,!0)})}),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(o._getHitsHierarchicalFacetsAttributes(e)),r=o._getFacetFilters(e),n=o._getNumericFilters(e),i=o._getTagFilters(e),a={facets:t,tagFilters:i};return r.length>0&&(a.facetFilters=r),n.length>0&&(a.numericFilters=n),s(e.getQueryParams(),a)},_getDisjunctiveFacetSearchParams:function(e,t,r){var n=o._getFacetFilters(e,t,r),i=o._getNumericFilters(e,t),a=o._getTagFilters(e),c={hitsPerPage:1,page:0,attributesToRetrieve:[],attributesToHighlight:[],attributesToSnippet:[],tagFilters:a,analytics:!1,clickAnalytics:!1},u=e.getHierarchicalFacetByName(t);return c.facets=u?o._getDisjunctiveHierarchicalFacetAttribute(e,u,r):t,i.length>0&&(c.numericFilters=i),n.length>0&&(c.facetFilters=n),s(e.getQueryParams(),c)},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return n(e.numericRefinements,function(e,a){n(e,function(e,s){t!==a&&n(e,function(e){if(Array.isArray(e)){var t=i(e,function(e){return a+s+e});r.push(t)}else r.push(a+s+e)})})}),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var i=[];return n(e.facetsRefinements,function(e,t){n(e,function(e){i.push(t+":"+e)})}),n(e.facetsExcludes,function(e,t){n(e,function(e){i.push(t+":-"+e)})}),n(e.disjunctiveFacetsRefinements,function(e,r){if(r!==t&&e&&0!==e.length){var a=[];n(e,function(e){a.push(r+":"+e)}),i.push(a)}}),n(e.hierarchicalFacetsRefinements,function(n,a){var s=n[0];if(void 0!==s){var o,c,u=e.getHierarchicalFacetByName(a),f=e._getHierarchicalFacetSeparator(u),l=e._getHierarchicalRootPath(u);if(t===a){if(-1===s.indexOf(f)||!l&&!0===r||l&&l.split(f).length===s.split(f).length)return;l?(c=l.split(f).length-1,s=l):(c=s.split(f).length-2,s=s.slice(0,s.lastIndexOf(f))),o=u.attributes[c]}else c=s.split(f).length-1,o=u.attributes[c];o&&i.push([o+":"+s])}}),i},_getHitsHierarchicalFacetsAttributes:function(e){var t=[];return a(e.hierarchicalFacets,function(t,r){var n=e.getHierarchicalRefinement(r.name)[0];if(!n)return t.push(r.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(r),a=n.split(i).length,s=r.attributes.slice(0,a+1);return t.concat(s)},t)},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(!0===r){var i=e._getHierarchicalRootPath(t),a=0;return i&&(a=i.split(n).length),[t.attributes[a]]}var s=e.getHierarchicalRefinement(t.name)[0]||"",o=s.split(n).length-1;return t.attributes.slice(0,o+1)},getSearchForFacetQuery:function(e,t,r,n){var i=n.isDisjunctiveFacet(e)?n.clearRefinements(e):n,a={facetQuery:t,facetName:e};return"number"==typeof r&&(a.maxFacetHits=r),s(o._getHitsSearchParams(i),a)}};t.exports=o},{"lodash/forEach":221,"lodash/map":253,"lodash/merge":257,"lodash/reduce":266}],298:[function(e,t,r){"use strict";function n(e){return _(e)?p(e,n):Array.isArray(e)?l(e,n):d(e)?g(e):e}function i(e,t,r,n){if(null!==e&&(r=r.replace(e,""),n=n.replace(e,"")),r=t[r]||r,n=t[n]||n,-1!==b.indexOf(r)||-1!==b.indexOf(n)){if("q"===r)return-1;if("q"===n)return 1;var i=-1!==m.indexOf(r),a=-1!==m.indexOf(n);if(i&&!a)return 1;if(a&&!i)return-1}return r.localeCompare(n)}var a=e("./SearchParameters/shortener"),s=e("./SearchParameters"),o=e("qs"),c=e("lodash/bind"),u=e("lodash/forEach"),f=e("lodash/pick"),l=e("lodash/map"),h=e("lodash/mapKeys"),p=e("lodash/mapValues"),d=e("lodash/isString"),_=e("lodash/isPlainObject"),v=e("lodash/isEmpty"),y=e("lodash/invert"),g=e("qs/lib/utils").encode,m=["dFR","fR","nR","hFR","tR"],b=a.ENCODED_PARAMETERS;r.getStateFromQueryString=function(e,t){var r=t&&t.prefix||"",n=t&&t.mapping||{},i=y(n),c=o.parse(e),u=new RegExp("^"+r),l=h(c,function(e,t){var n=r&&u.test(t),s=n?t.replace(u,""):t;return a.decode(i[s]||s)||s}),p=s._parseNumbers(l);return f(p,s.PARAMETERS)},r.getUnrecognizedParametersInQueryString=function(e,t){var r=t&&t.prefix,n=t&&t.mapping||{},i=y(n),s={},c=o.parse(e);if(r){var f=new RegExp("^"+r);u(c,function(e,t){f.test(t)||(s[t]=e)})}else u(c,function(e,t){a.decode(i[t]||t)||(s[t]=e)});return s},r.getQueryStringFromState=function(e,t){var r=t&&t.moreAttributes,s=t&&t.prefix||"",u=t&&t.mapping||{},f=t&&t.safe||!1,l=y(u),p=f?e:n(e),d=h(p,function(e,t){var r=a.encode(t);return s+(u[r]||r)}),_=""===s?null:new RegExp("^"+s),g=c(i,null,_,l);if(!v(r)){var m=o.stringify(d,{encode:f,sort:g}),b=o.stringify(r,{encode:f});return m?m+"&"+b:b}return o.stringify(d,{encode:f,sort:g})}},{"./SearchParameters":290,"./SearchParameters/shortener":291,"lodash/bind":212,"lodash/forEach":221,"lodash/invert":229,"lodash/isEmpty":235,"lodash/isPlainObject":244,"lodash/isString":246,"lodash/map":253,"lodash/mapKeys":254,"lodash/mapValues":255,"lodash/pick":263,qs:281,"qs/lib/utils":284}],299:[function(e,t,r){"use strict";t.exports="2.26.1"},{}]},{},[1])(1)}); diff --git a/package.json b/package.json index b6f2be05c..347043613 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "algoliasearch-helper", - "version": "2.26.0", + "version": "2.26.1", "description": "Helper for implementing advanced search features with algolia", "main": "index.js", "homepage": "https://community.algolia.com/algoliasearch-helper-js/", diff --git a/src/version.js b/src/version.js index 9db2c3c52..77fda9e8c 100644 --- a/src/version.js +++ b/src/version.js @@ -1,3 +1,3 @@ 'use strict'; -module.exports = '2.26.0'; +module.exports = '2.26.1';