sinzmise-cetastories 2.0.0-1731064238567 → 2.0.0-1731114112124
Sign up to get free protection for your applications and to get access to all the features.
- package/404/index.html +4033 -1
- package/about/index.html +4041 -1
- package/album/index.html +4050 -1
- package/archives/2021/12/index.html +3917 -1
- package/archives/2021/index.html +3917 -1
- package/archives/2022/12/index.html +3917 -1
- package/archives/2022/index.html +3917 -1
- package/archives/2023/01/index.html +4072 -1
- package/archives/2023/02/index.html +3917 -1
- package/archives/2023/03/index.html +4063 -1
- package/archives/2023/04/index.html +3992 -1
- package/archives/2023/07/index.html +4217 -1
- package/archives/2023/08/index.html +4067 -1
- package/archives/2023/09/index.html +3917 -1
- package/archives/2023/10/index.html +3917 -1
- package/archives/2023/11/index.html +3917 -1
- package/archives/2023/12/index.html +3918 -1
- package/archives/2023/index.html +4591 -1
- package/archives/2023/page/2/index.html +4572 -1
- package/archives/2023/page/3/index.html +3930 -1
- package/archives/2024/01/index.html +4142 -1
- package/archives/2024/02/index.html +3922 -1
- package/archives/2024/03/index.html +3916 -1
- package/archives/2024/04/index.html +3997 -1
- package/archives/2024/05/index.html +4065 -1
- package/archives/2024/06/index.html +3917 -1
- package/archives/2024/07/index.html +3917 -1
- package/archives/2024/08/index.html +3992 -1
- package/archives/2024/09/index.html +3917 -1
- package/archives/2024/10/index.html +3984 -1
- package/archives/2024/index.html +4576 -1
- package/archives/2024/page/2/index.html +4433 -1
- package/archives/index.html +4560 -1
- package/archives/page/2/index.html +4560 -1
- package/archives/page/3/index.html +4560 -1
- package/archives/page/4/index.html +4560 -1
- package/archives/page/5/index.html +4560 -1
- package/assets/algolia/algoliasearch.js +7182 -3
- package/assets/algolia/algoliasearchLite.js +4445 -3
- package/atom.xml +31 -31
- package/bbs/bbs.html +4012 -1
- package/bbs/bbs.js +12 -2
- package/bbs/index.html +4031 -1
- package/categories/index.html +4050 -1
- package/categories//344/270/252/344/272/272/345/260/217/350/256/260/index.html +4570 -1
- package/categories//344/270/252/344/272/272/345/260/217/350/256/260/page/2/index.html +4485 -1
- package/categories//346/255/214/346/233/262/346/224/266/351/233/206/index.html +3920 -1
- package/categories//346/270/270/346/210/217/347/233/270/345/205/263/index.html +4148 -1
- package/categories//347/253/231/347/202/271/346/212/230/350/205/276/index.html +4610 -1
- package/categories//347/253/231/347/202/271/346/212/230/350/205/276/page/2/index.html +4148 -1
- package/categories//351/241/271/347/233/256/346/212/230/350/205/276/index.html +4072 -1
- package/charts/index.html +4039 -1
- package/comments/index.html +4052 -1
- package/content.json +1 -0
- package/css/custom2.css +3 -2
- package/css/first.css +1868 -2
- package/css/pace/big-counter.css +39 -2
- package/css/pace/corner-indicator.css +72 -2
- package/css/pace/flash.css +76 -2
- package/css/pace/mac-osx.css +86 -2
- package/css/pace/pace.css +50 -2
- package/css/plane.css +59 -2
- package/css/style.css +8585 -2
- package/css/tags.css +3516 -2
- package/essay/index.html +4050 -1
- package/fcircle/index.html +4075 -1
- package/games +61 -19
- package/index.html +4717 -1
- package/js/app.js +1341 -2
- package/js/autoload.js +62 -2
- package/js/ceta/fancybox.css +2 -2
- package/js/ceta/fancybox.umd.js +2 -2
- package/js/ceta/iconfontInkss.js +1 -2
- package/js/ceta/message.css +6 -2
- package/js/ceta/message.js +6 -2
- package/js/clock.js +1 -2
- package/js/kslink.js +38 -2
- package/js/newyear.js +76 -2
- package/js/plane.js +2200 -2
- package/js/plugins/aplayer.js +186 -2
- package/js/plugins/parallax.js +191 -2
- package/js/plugins/rightMenus.js +623 -2
- package/js/plugins/tags/contributors.js +92 -2
- package/js/plugins/tags/friends.js +93 -2
- package/js/plugins/tags/sites.js +96 -2
- package/js/search/algolia.js +239 -2
- package/js/search/hexo.js +195 -2
- package/js/search/meilisearch.js +220 -2
- package/js/txmap.js +248 -2
- package/link/index.html +6180 -1
- package/load.html +294 -1
- package/music/index.html +4033 -1
- package/package.json +1 -1
- package/page/2/index.html +4578 -1
- package/page/3/index.html +4575 -1
- package/page/4/index.html +4572 -1
- package/page/5/index.html +3924 -1
- package/posts/10021/index.html +4130 -5
- package/posts/10045/index.html +4224 -1
- package/posts/10733/index.html +4125 -1
- package/posts/10996/index.html +4127 -5
- package/posts/12779/index.html +4134 -1
- package/posts/13624/index.html +4179 -1
- package/posts/15688/index.html +4133 -1
- package/posts/15748/index.html +4121 -5
- package/posts/15799/index.html +4130 -1
- package/posts/15842/index.html +4121 -5
- package/posts/16107/index.html +4111 -1
- package/posts/18063/index.html +4124 -1
- package/posts/20412/index.html +4134 -1
- package/posts/21375/index.html +4124 -1
- package/posts/22945/index.html +4169 -4
- package/posts/23021/index.html +4104 -1
- package/posts/27531/index.html +4121 -5
- package/posts/28536/index.html +4116 -1
- package/posts/28733/index.html +4168 -1
- package/posts/29196/index.html +4106 -1
- package/posts/38917/index.html +4144 -1
- package/posts/38964/index.html +4208 -1
- package/posts/42487/index.html +4135 -1
- package/posts/42580/index.html +4128 -1
- package/posts/45875/index.html +4118 -1
- package/posts/46640/index.html +4147 -1
- package/posts/48762/index.html +4109 -1
- package/posts/50710/index.html +4114 -1
- package/posts/52677/index.html +4125 -1
- package/posts/53662/index.html +4123 -1
- package/posts/54386/index.html +4116 -1
- package/posts/54481/index.html +4133 -1
- package/posts/54787/index.html +4124 -5
- package/posts/56467/index.html +4121 -1
- package/posts/57692/index.html +4143 -1
- package/posts/58203/index.html +4116 -1
- package/posts/61417/index.html +4117 -1
- package/posts/61712/index.html +4113 -1
- package/posts/646/index.html +4106 -1
- package/posts/64856/index.html +4120 -1
- package/posts/64935/index.html +4120 -1
- package/search.xml +84 -84
- package/seas/index.html +4050 -1
- package/sw.js +798 -2
- package/tags/Flash/347/233/270/345/205/263/index.html +3924 -1
- package/tags/Steam/346/270/270/346/210/217/index.html +3924 -1
- package/tags/Windows/350/275/257/344/273/266/index.html +3997 -1
- package/tags/index.html +4033 -1
- package/tags//344/270/252/344/272/272/345/260/217/350/256/260/index.html +4570 -1
- package/tags//344/270/252/344/272/272/345/260/217/350/256/260/page/2/index.html +4485 -1
- package/tags//345/205/266/345/256/203/346/270/270/346/210/217/index.html +4073 -1
- package/tags//345/212/240/350/275/275/345/212/250/347/224/273/index.html +3924 -1
- package/tags//346/202/254/346/265/256/345/256/240/347/211/251-/347/234/213/346/235/277/345/250/230/index.html +3925 -1
- package/tags//346/255/214/346/233/262/346/224/266/351/233/206/index.html +3920 -1
- package/tags//346/270/270/346/210/217/347/233/270/345/205/263/index.html +4148 -1
- package/tags//347/253/231/347/202/271/345/272/225/351/203/250/351/255/224/346/224/271/index.html +3924 -1
- package/tags//347/253/231/347/202/271/346/212/230/350/205/276/index.html +4610 -1
- package/tags//347/253/231/347/202/271/346/212/230/350/205/276/page/2/index.html +4148 -1
- package/tags//350/207/252/345/273/272/351/203/250/347/275/262/index.html +4224 -1
- package/tags//351/241/265/351/235/242/351/255/224/346/224/271/index.html +4075 -1
- package/tags//351/241/271/347/233/256/346/212/230/350/205/276/index.html +4072 -1
- package/update/index.html +4112 -1
- package/weichuncai/css/style.css +25 -2
- package/weichuncai/js/common.js +449 -2
- package/weichuncai/js/jquery.js +139 -2
- package/weichuncai/wcc-config.js +17 -2
- package/maps/assets/algolia/algoliasearch.js.map +0 -1
- package/maps/assets/algolia/algoliasearchLite.js.map +0 -1
- package/maps/bbs/bbs.js.map +0 -1
- package/maps/css/custom2.css.map +0 -1
- package/maps/css/first.css.map +0 -1
- package/maps/css/pace/big-counter.css.map +0 -1
- package/maps/css/pace/corner-indicator.css.map +0 -1
- package/maps/css/pace/flash.css.map +0 -1
- package/maps/css/pace/mac-osx.css.map +0 -1
- package/maps/css/pace/pace.css.map +0 -1
- package/maps/css/plane.css.map +0 -1
- package/maps/css/style.css.map +0 -1
- package/maps/css/tags.css.map +0 -1
- package/maps/js/app.js.map +0 -1
- package/maps/js/autoload.js.map +0 -1
- package/maps/js/ceta/fancybox.css.map +0 -1
- package/maps/js/ceta/fancybox.umd.js.map +0 -1
- package/maps/js/ceta/iconfontInkss.js.map +0 -1
- package/maps/js/ceta/message.css.map +0 -1
- package/maps/js/ceta/message.js.map +0 -1
- package/maps/js/clock.js.map +0 -1
- package/maps/js/kslink.js.map +0 -1
- package/maps/js/newyear.js.map +0 -1
- package/maps/js/plane.js.map +0 -1
- package/maps/js/plugins/aplayer.js.map +0 -1
- package/maps/js/plugins/parallax.js.map +0 -1
- package/maps/js/plugins/rightMenus.js.map +0 -1
- package/maps/js/plugins/tags/contributors.js.map +0 -1
- package/maps/js/plugins/tags/friends.js.map +0 -1
- package/maps/js/plugins/tags/sites.js.map +0 -1
- package/maps/js/search/algolia.js.map +0 -1
- package/maps/js/search/hexo.js.map +0 -1
- package/maps/js/search/meilisearch.js.map +0 -1
- package/maps/js/txmap.js.map +0 -1
- package/maps/sw.js.map +0 -1
- package/maps/weichuncai/css/style.css.map +0 -1
- package/maps/weichuncai/js/common.js.map +0 -1
- package/maps/weichuncai/js/jquery.js.map +0 -1
- package/maps/weichuncai/wcc-config.js.map +0 -1
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"../../../assets/algolia/algoliasearch.js","names":["g","window","self","ALGOLIA_MIGRATION_LAYER","e","t","n","r","s","o","u","a","require","i","f","Error","code","l","exports","call","length","module","setAttributes","script","attrs","attr","setAttribute","stdOnEnd","cb","onload","this","onerror","src","ieOnEnd","onreadystatechange","readyState","opts","head","document","getElementsByTagName","createElement","type","charset","async","text","appendChild","isUsingLatest","buildName","toFind","RegExp","replace","scripts","found","currentScript","nbScripts","test","loadV2","loadScript","v2ScriptUrl","message","console","warn","log","write","ALGOLIA_SUPPORTS_DOCWRITE","scriptLoaded","method","oldGlobals","AlgoliaSearch","AlgoliaSearchHelper","AlgoliaExplainResults","migrationLayer","define","amd","global","algoliasearch","process","load","storage","debug","env","DEBUG","Function","prototype","apply","arguments","formatArgs","args","useColors","namespace","humanize","diff","c","color","splice","index","lastC","match","save","namespaces","removeItem","documentElement","style","WebkitAppearance","firebug","exception","table","navigator","userAgent","toLowerCase","parseInt","$1","chrome","local","localStorage","localstorage","colors","formatters","j","v","JSON","stringify","err","enable","prevTime","createDebug","enabled","curr","Date","ms","prev","Array","coerce","unshift","format","formatter","val","bind","hash","charCodeAt","Math","abs","selectColor","init","stack","disable","names","skips","split","len","push","substr","name","factory","ES6Promise","isFunction","x","isArray","Object","toString","vertxNext","undefined","customSchedulerFn","asap","callback","arg","queue","flush","scheduleFlush","browserWindow","browserGlobal","BrowserMutationObserver","MutationObserver","WebKitMutationObserver","isNode","isWorker","Uint8ClampedArray","importScripts","MessageChannel","useSetTimeout","globalSetTimeout","setTimeout","channel","iterations","observer","node","then","onFulfillment","onRejection","_arguments","parent","child","constructor","noop","PROMISE_ID","makePromise","_state","invokeCallback","_result","subscribe","resolve$1","object","promise","resolve","nextTick","createTextNode","observe","characterData","data","port1","onmessage","port2","postMessage","vertx","runOnLoop","runOnContext","attemptVertx","random","substring","PENDING","FULFILLED","REJECTED","GET_THEN_ERROR","ErrorObject","getThen","error","handleMaybeThenable","maybeThenable","then$$1","thenable","fulfill","reject","value","reason","handleOwnThenable","sealed","fulfillmentHandler","rejectionHandler","tryThen","_label","handleForeignThenable","TypeError","publishRejection","_onerror","publish","_subscribers","subscribers","settled","detail","TRY_CATCH_ERROR","hasCallback","succeeded","failed","tryCatch","id","Enumerator$1","Constructor","input","_instanceConstructor","_remaining","_enumerate","Promise$2","resolver","needsResolver","initializePromise","needsNew","_eachEntry","entry","resolve$$1","_then","_settledAt","_willSettleAt","state","enumerator","all","entries","race","_","_setScheduler","scheduleFn","_setAsap","asapFn","_asap","catch","polyfill","P","Promise","promiseToString","cast","EventEmitter","_events","_maxListeners","isObject","isUndefined","defaultMaxListeners","setMaxListeners","isNaN","emit","er","handler","listeners","context","slice","addListener","listener","m","newListener","warned","trace","on","once","fired","removeListener","list","position","removeAllListeners","key","listenerCount","evlistener","emitter","hasOwn","hasOwnProperty","obj","fn","ctx","k","win","create","ctor","superCtor","super_","enumerable","writable","configurable","TempCtor","arr","h","d","y","plural","floor","ceil","options","str","String","exec","parseFloat","parse","long","round","fmtShort","has","toStr","isArgs","isEnumerable","propertyIsEnumerable","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","excludedKeys","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","keysShim","isArguments","isString","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","shim","keys","keysWorksWithArguments","originalKeys","callee","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","runTimeout","fun","clearTimeout","currentQueue","draining","queueIndex","cleanUpNextTick","concat","drainQueue","timeout","run","marker","runClearTimeout","Item","array","title","browser","argv","version","versions","off","binding","cwd","chdir","dir","umask","prop","qs","sep","eq","regexp","maxKeys","kstr","vstr","idx","indexOf","decodeURIComponent","xs","stringifyPrimitive","isFinite","map","objectKeys","ks","encodeURIComponent","join","res","decode","encode","Index","deprecate","deprecatedMessage","AlgoliaSearchCore","inherits","errors","notImplemented","AlgoliaSearchError","deleteIndex","indexName","_jsonRequest","url","hostType","moveIndex","srcIndexName","dstIndexName","postObj","operation","destination","body","copyIndex","scopeOrCallback","_callback","scope","getLogs","offset","clone","params","_getSearchParams","listIndexes","page","initIndex","initAnalytics","createAnalyticsClient","applicationID","apiKey","listUserKeys","listApiKeys","getUserKeyACL","getApiKey","deleteUserKey","deleteApiKey","restoreApiKey","addUserKey","acls","addApiKey","acl","validity","maxQueriesPerIPPerHour","maxHitsPerQuery","indexes","description","queryParameters","referers","addUserKeyWithValidity","updateUserKey","updateApiKey","putObj","startQueriesBatch","_batch","addQueryInBatch","query","sendQueriesBatch","search","batch","operations","requests","assignUserID","userID","cluster","headers","assignUserIDs","userIDs","users","getTopUserID","getUserID","debugData","listClusters","listUserIDs","removeUserID","searchUserIDs","setPersonalizationStrategy","getPersonalizationStrategy","destroy","enableRateLimitForward","disableRateLimitForward","useSecuredAPIKey","disableSecuredAPIKey","generateSecuredApiKey","getSecuredApiKeyRemainingValidity","exitPromise","IndexCore","store","RESET_APP_DATA_TIMER","usage","_allowEmptyCredentials","hosts","read","_timeouts","timeouts","connect","protocol","_checkAppIdData","defaultHosts","_shuffleResult","hostNumber","mainSuffix","dsn","prepareHost","extraHeaders","cache","_cache","_ua","_useCache","_useRequestCache","_useFallback","useFallback","_setTimeout","host","safeJSONStringify","toJSON","out","removeCredentials","newHeaders","headerName","setExtraHeader","getExtraHeader","unsetExtraHeader","addAlgoliaAgent","algoliaAgent","algoliaAgentWithDelimiter","initialOpts","cacheID","requestDebug","additionalUA","client","tries","usingFallback","hasFallback","_request","fallback","_computeRequestHeaders","withApiKey","isCacheValidWithCurrentID","useRequestCache","currentCache","currentCacheID","interopCallbackReturn","request","content","maybePromiseForCache","_promise","responseText","doRequest","requester","reqOpts","startTime","jsonBody","_getTimeoutsForRequest","_setHostIndexByType","currentHost","_getHostByType","forceAuthHeaders","httpResponse","status","statusCode","httpResponseOk","endTime","contentLength","duration","retryRequest","unrecoverableError","Unknown","UnparsableJSON","RequestTimeout","_incrementHostIndex","_incrementTimeoutMultipler","forEach","requestHeaders","userToken","securityTags","queries","JSONPParams","requestId","strategy","searchForFacetValues","facetName","facetQuery","omit","filteredParams","keyName","searchParameters","setSecurityTags","tags","strTags","oredTags","setUserToken","clearCache","setRequestTimeout","milliseconds","setTimeouts","getTimeouts","_getAppIdData","get","_cacheAppIdData","_setAppIdData","lastChange","getTime","set","now","_resetInitialAppIdData","newData","hostIndexes","timeoutMultiplier","shuffleResult","temporaryValue","randomIndex","currentIndex","shuffle","_hostIndexes","_timeoutMultiplier","_partialAppIdDataUpdate","foreach","currentData","_getHostIndexByType","_getTimeoutMultiplier","hostIndex","newHostIndexes","max","complete","deprecateForwardToSlaves","exportData","_hitsPerPage","_previous","hitsPerPage","previous","result","hits","nbHits","current","_highlightResult","synonyms","addObject","objectID","as","addObjects","objects","action","partialUpdateObject","partialObject","createIfNotExists","partialUpdateObjects","saveObject","saveObjects","deleteObject","deleteObjects","objectIDs","deleteByQuery","indexObj","attributesToRetrieve","distinct","searchContent","waitTask","doDeleteByQuery","deleteObjectsContent","taskID","deleteBy","browseAll","merge","browseLoop","cursor","_stopped","browseCallback","_error","_end","ttAdapter","syncCb","asyncCb","loop","retryLoop","delay","clearIndex","getSettings","advanced","searchSynonyms","exportSynonyms","saveSynonym","synonym","forwardToSlaves","forwardToReplicas","getSynonym","deleteSynonym","clearSynonyms","batchSynonyms","replaceExistingSynonyms","searchRules","exportRules","saveRule","rule","getRule","deleteRule","clearRules","batchRules","rules","clearExistingRules","exists","findObject","findCallback","requestOptions","paginate","that","paginateLoop","hit","nbPages","ObjectNotFound","getObjectPosition","setSettings","settings","IndexBrowser","stop","_clean","buildSearchMethod","typeAheadArgs","typeAheadValueOption","similarSearch","browse","browseFrom","searchFacet","_search","getObject","getObjects","createAlgoliasearch","uaSuffix","inlineHeaders","jsonpRequest","places","cloneDeep","ua","AlgoliaSearchBrowser","NODE_ENV","initPlaces","__algolia","support","hasXMLHttpRequest","hasXDomainRequest","cors","XMLHttpRequest","reqTimeout","timedOut","req","XDomainRequest","connected","onTimeout","onprogress","onConnect","getAllResponseHeaders","more","event","Network","open","setRequestHeader","send","abort","promises","cbCalled","JSONPCounter","cbName","done","removeGlobals","clean","ontimeout","success","JSONPScriptFail","removeChild","JSONPScriptError","defer","queryParam","appId","analytics","getABTests","_params","limit","getABTest","abTestID","addABTest","abTest","stopABTest","deleteABTest","previousUsage","newUsage","githubAnchorLink","extraProperties","captureStackTrace","createCustomError","AlgoliaSearchCustomError","ValidUntilNotFound","newArr","item","itemIndex","sources","source","filtered","appID","reverse","encoded","qs3","localStorageNamespace","moduleStore","localStorageStore","localStorageFailure","cleanup","getOrSet","supportsLocalStorage","setItem"],"sources":["assets/algolia/algoliasearch.js"],"mappings":";CACA,WAAa,IAAIA,EAAqB,oBAATC,OAAsBD,EAAEC,OAA6B,oBAAPC,OAAoBF,EAAEE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qBAAsBA,EAsCvB,GAAEv0B,KAAKW,KAAuB,oBAAX4C,OAAyBA,OAAyB,oBAATxE,KAAuBA,KAAyB,oBAAXD,OAAyBA,OAAS,CAAC,EACrI,EAAE,CAAC,EAAI,IAAI,GAAG,CAAC,SAASW,EAAQS,EAAOH,GACvC,aAEAG,EAAOH,QAAU,QAEjB,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,IA30N6W,CA20NxW,GAChB","ignoreList":[],"sourcesContent":["/*! algoliasearch 3.35.1 | © 2014, 2015 Algolia SAS | github.com/algolia/algoliasearch-client-js */\n(function(f){var g;if(typeof window!=='undefined'){g=window}else if(typeof self!=='undefined'){g=self}g.ALGOLIA_MIGRATION_LAYER=f()})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){\n\nmodule.exports = function load (src, opts, cb) {\n var head = document.head || document.getElementsByTagName('head')[0]\n var script = document.createElement('script')\n\n if (typeof opts === 'function') {\n cb = opts\n opts = {}\n }\n\n opts = opts || {}\n cb = cb || function() {}\n\n script.type = opts.type || 'text/javascript'\n script.charset = opts.charset || 'utf8';\n script.async = 'async' in opts ? !!opts.async : true\n script.src = src\n\n if (opts.attrs) {\n setAttributes(script, opts.attrs)\n }\n\n if (opts.text) {\n script.text = '' + opts.text\n }\n\n var onend = 'onload' in script ? stdOnEnd : ieOnEnd\n onend(script, cb)\n\n // some good legacy browsers (firefox) fail the 'in' detection above\n // so as a fallback we always set onload\n // old IE will ignore this and new IE will set onload\n if (!script.onload) {\n stdOnEnd(script, cb);\n }\n\n head.appendChild(script)\n}\n\nfunction setAttributes(script, attrs) {\n for (var attr in attrs) {\n script.setAttribute(attr, attrs[attr]);\n }\n}\n\nfunction stdOnEnd (script, cb) {\n script.onload = function () {\n this.onerror = this.onload = null\n cb(null, script)\n }\n script.onerror = function () {\n // this.onload = null here is necessary\n // because even IE9 works not like others\n this.onerror = this.onload = null\n cb(new Error('Failed to load ' + this.src), script)\n }\n}\n\nfunction ieOnEnd (script, cb) {\n script.onreadystatechange = function () {\n if (this.readyState != 'complete' && this.readyState != 'loaded') return\n this.onreadystatechange = null\n cb(null, script) // there is no way to catch loading errors in IE8\n }\n}\n\n},{}],2:[function(require,module,exports){\n'use strict';\n\n// this module helps finding if the current page is using\n// the cdn.jsdelivr.net/algoliasearch/latest/$BUILDNAME.min.js version\n\nmodule.exports = isUsingLatest;\n\nfunction isUsingLatest(buildName) {\n var toFind = new RegExp('cdn\\\\.jsdelivr\\\\.net/algoliasearch/latest/' +\n buildName.replace('.', '\\\\.') + // algoliasearch, algoliasearch.angular\n '(?:\\\\.min)?\\\\.js$'); // [.min].js\n\n var scripts = document.getElementsByTagName('script');\n var found = false;\n for (var currentScript = 0, nbScripts = scripts.length; currentScript < nbScripts; currentScript++) {\n if (scripts[currentScript].src && toFind.test(scripts[currentScript].src)) {\n found = true;\n break;\n }\n }\n\n return found;\n}\n\n},{}],3:[function(require,module,exports){\n'use strict';\n\nmodule.exports = loadV2;\n\nfunction loadV2(buildName) {\n var loadScript = require(1);\n var v2ScriptUrl = '//cdn.jsdelivr.net/algoliasearch/2/' + buildName + '.min.js';\n\n var message = '-- AlgoliaSearch `latest` warning --\\n' +\n 'Warning, you are using the `latest` version string from jsDelivr to load the AlgoliaSearch library.\\n' +\n 'Using `latest` is no more recommended, you should load //cdn.jsdelivr.net/algoliasearch/2/algoliasearch.min.js\\n\\n' +\n 'Also, we updated the AlgoliaSearch JavaScript client to V3. If you want to upgrade,\\n' +\n 'please read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\\n' +\n '-- /AlgoliaSearch `latest` warning --';\n\n if (window.console) {\n if (window.console.warn) {\n window.console.warn(message);\n } else if (window.console.log) {\n window.console.log(message);\n }\n }\n\n // If current script loaded asynchronously,\n // it will load the script with DOMElement\n // otherwise, it will load the script with document.write\n try {\n // why \\x3c? http://stackoverflow.com/a/236106/147079\n document.write('\\x3Cscript>window.ALGOLIA_SUPPORTS_DOCWRITE = true\\x3C/script>');\n\n if (window.ALGOLIA_SUPPORTS_DOCWRITE === true) {\n document.write('\\x3Cscript src=\"' + v2ScriptUrl + '\">\\x3C/script>');\n scriptLoaded('document.write')();\n } else {\n loadScript(v2ScriptUrl, scriptLoaded('DOMElement'));\n }\n } catch (e) {\n loadScript(v2ScriptUrl, scriptLoaded('DOMElement'));\n }\n}\n\nfunction scriptLoaded(method) {\n return function log() {\n var message = 'AlgoliaSearch: loaded V2 script using ' + method;\n\n if (window.console && window.console.log) {\n window.console.log(message);\n }\n };\n}\n\n},{\"1\":1}],4:[function(require,module,exports){\n'use strict';\n\n/* eslint no-unused-vars: [2, {\"vars\": \"local\"}] */\n\nmodule.exports = oldGlobals;\n\n// put old window.AlgoliaSearch.. into window. again so that\n// users upgrading to V3 without changing their code, will be warned\nfunction oldGlobals() {\n var message = '-- AlgoliaSearch V2 => V3 error --\\n' +\n 'You are trying to use a new version of the AlgoliaSearch JavaScript client with an old notation.\\n' +\n 'Please read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\\n' +\n '-- /AlgoliaSearch V2 => V3 error --';\n\n window.AlgoliaSearch = function() {\n throw new Error(message);\n };\n\n window.AlgoliaSearchHelper = function() {\n throw new Error(message);\n };\n\n window.AlgoliaExplainResults = function() {\n throw new Error(message);\n };\n}\n\n},{}],5:[function(require,module,exports){\n'use strict';\n\n// This script will be browserified and prepended to the normal build\n// directly in window, not wrapped in any module definition\n// To avoid cases where we are loaded with /latest/ along with\nmigrationLayer(\"algoliasearch\");\n\n// Now onto the V2 related code:\n// If the client is using /latest/$BUILDNAME.min.js, load V2 of the library\n//\n// Otherwise, setup a migration layer that will throw on old constructors like\n// new AlgoliaSearch().\n// So that users upgrading from v2 to v3 will have a clear information\n// message on what to do if they did not read the migration guide\nfunction migrationLayer(buildName) {\n var isUsingLatest = require(2);\n var loadV2 = require(3);\n var oldGlobals = require(4);\n\n if (isUsingLatest(buildName)) {\n loadV2(buildName);\n } else {\n oldGlobals();\n }\n}\n\n},{\"2\":2,\"3\":3,\"4\":4}]},{},[5])(5)\n});(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.algoliasearch = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){\n(function (process){\n/**\n * This is the web browser implementation of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = require(2);\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = 'undefined' != typeof chrome\n && 'undefined' != typeof chrome.storage\n ? chrome.storage.local\n : localstorage();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n 'lightseagreen',\n 'forestgreen',\n 'goldenrod',\n 'dodgerblue',\n 'darkorchid',\n 'crimson'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\nfunction useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nexports.formatters.j = function(v) {\n try {\n return JSON.stringify(v);\n } catch (err) {\n return '[UnexpectedJSONParseError]: ' + err.message;\n }\n};\n\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return;\n\n var c = 'color: ' + this.color;\n args.splice(1, 0, c, 'color: inherit')\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-zA-Z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.log()` when available.\n * No-op when `console.log` is not a \"function\".\n *\n * @api public\n */\n\nfunction log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console\n && console.log\n && Function.prototype.apply.call(console.log, console, arguments);\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\n\nfunction save(namespaces) {\n try {\n if (null == namespaces) {\n exports.storage.removeItem('debug');\n } else {\n exports.storage.debug = namespaces;\n }\n } catch(e) {}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n var r;\n try {\n r = exports.storage.debug;\n } catch(e) {}\n\n // If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n if (!r && typeof process !== 'undefined' && 'env' in process) {\n r = process.env.DEBUG;\n }\n\n return r;\n}\n\n/**\n * Enable namespaces listed in `localStorage.debug` initially.\n */\n\nexports.enable(load());\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n try {\n return window.localStorage;\n } catch (e) {}\n}\n\n}).call(this,require(12))\n},{\"12\":12,\"2\":2}],2:[function(require,module,exports){\n\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = createDebug.debug = createDebug['default'] = createDebug;\nexports.coerce = coerce;\nexports.disable = disable;\nexports.enable = enable;\nexports.enabled = enabled;\nexports.humanize = require(9);\n\n/**\n * The currently active debug mode names, and names to skip.\n */\n\nexports.names = [];\nexports.skips = [];\n\n/**\n * Map of special \"%n\" handling functions, for the debug \"format\" argument.\n *\n * Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n */\n\nexports.formatters = {};\n\n/**\n * Previous log timestamp.\n */\n\nvar prevTime;\n\n/**\n * Select a color.\n * @param {String} namespace\n * @return {Number}\n * @api private\n */\n\nfunction selectColor(namespace) {\n var hash = 0, i;\n\n for (i in namespace) {\n hash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n hash |= 0; // Convert to 32bit integer\n }\n\n return exports.colors[Math.abs(hash) % exports.colors.length];\n}\n\n/**\n * Create a debugger with the given `namespace`.\n *\n * @param {String} namespace\n * @return {Function}\n * @api public\n */\n\nfunction createDebug(namespace) {\n\n function debug() {\n // disabled?\n if (!debug.enabled) return;\n\n var self = debug;\n\n // set `diff` timestamp\n var curr = +new Date();\n var ms = curr - (prevTime || curr);\n self.diff = ms;\n self.prev = prevTime;\n self.curr = curr;\n prevTime = curr;\n\n // turn the `arguments` into a proper Array\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n\n args[0] = exports.coerce(args[0]);\n\n if ('string' !== typeof args[0]) {\n // anything else let's inspect with %O\n args.unshift('%O');\n }\n\n // apply any `formatters` transformations\n var index = 0;\n args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {\n // if we encounter an escaped % then don't increase the array index\n if (match === '%%') return match;\n index++;\n var formatter = exports.formatters[format];\n if ('function' === typeof formatter) {\n var val = args[index];\n match = formatter.call(self, val);\n\n // now we need to remove `args[index]` since it's inlined in the `format`\n args.splice(index, 1);\n index--;\n }\n return match;\n });\n\n // apply env-specific formatting (colors, etc.)\n exports.formatArgs.call(self, args);\n\n var logFn = debug.log || exports.log || console.log.bind(console);\n logFn.apply(self, args);\n }\n\n debug.namespace = namespace;\n debug.enabled = exports.enabled(namespace);\n debug.useColors = exports.useColors();\n debug.color = selectColor(namespace);\n\n // env-specific initialization logic for debug instances\n if ('function' === typeof exports.init) {\n exports.init(debug);\n }\n\n return debug;\n}\n\n/**\n * Enables a debug mode by namespaces. This can include modes\n * separated by a colon and wildcards.\n *\n * @param {String} namespaces\n * @api public\n */\n\nfunction enable(namespaces) {\n exports.save(namespaces);\n\n exports.names = [];\n exports.skips = [];\n\n var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n var len = split.length;\n\n for (var i = 0; i < len; i++) {\n if (!split[i]) continue; // ignore empty strings\n namespaces = split[i].replace(/\\*/g, '.*?');\n if (namespaces[0] === '-') {\n exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n } else {\n exports.names.push(new RegExp('^' + namespaces + '$'));\n }\n }\n}\n\n/**\n * Disable debug output.\n *\n * @api public\n */\n\nfunction disable() {\n exports.enable('');\n}\n\n/**\n * Returns true if the given mode name is enabled, false otherwise.\n *\n * @param {String} name\n * @return {Boolean}\n * @api public\n */\n\nfunction enabled(name) {\n var i, len;\n for (i = 0, len = exports.skips.length; i < len; i++) {\n if (exports.skips[i].test(name)) {\n return false;\n }\n }\n for (i = 0, len = exports.names.length; i < len; i++) {\n if (exports.names[i].test(name)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Coerce `val`.\n *\n * @param {Mixed} val\n * @return {Mixed}\n * @api private\n */\n\nfunction coerce(val) {\n if (val instanceof Error) return val.stack || val.message;\n return val;\n}\n\n},{\"9\":9}],3:[function(require,module,exports){\n(function (process,global){\n/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 4.1.1\n */\n\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.ES6Promise = factory());\n}(this, (function () { 'use strict';\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\nvar _isArray = undefined;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\n\nvar len = 0;\nvar vertxNext = undefined;\nvar customSchedulerFn = undefined;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && ({}).toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var r = require;\n var vertx = r('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = undefined;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}\n\nfunction then(onFulfillment, onRejection) {\n var _arguments = arguments;\n\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n if (_state) {\n (function () {\n var callback = _arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n })();\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve$1(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n resolve(promise, object);\n return promise;\n}\n\nvar PROMISE_ID = Math.random().toString(36).substring(16);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar GET_THEN_ERROR = new ErrorObject();\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n GET_THEN_ERROR.error = error;\n return GET_THEN_ERROR;\n }\n}\n\nfunction tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {\n try {\n then$$1.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then$$1) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then$$1, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then$$1) {\n if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then$$1 === GET_THEN_ERROR) {\n reject(promise, GET_THEN_ERROR.error);\n GET_THEN_ERROR.error = null;\n } else if (then$$1 === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then$$1)) {\n handleForeignThenable(promise, maybeThenable, then$$1);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = undefined,\n callback = undefined,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction ErrorObject() {\n this.error = null;\n}\n\nvar TRY_CATCH_ERROR = new ErrorObject();\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = undefined,\n error = undefined,\n succeeded = undefined,\n failed = undefined;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nfunction Enumerator$1(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n}\n\nEnumerator$1.prototype._enumerate = function (input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n};\n\nEnumerator$1.prototype._eachEntry = function (entry, i) {\n var c = this._instanceConstructor;\n var resolve$$1 = c.resolve;\n\n if (resolve$$1 === resolve$1) {\n var _then = getThen(entry);\n\n if (_then === then && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise$2) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve$$1) {\n return resolve$$1(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve$$1(entry), i);\n }\n};\n\nEnumerator$1.prototype._settledAt = function (state, i, value) {\n var promise = this.promise;\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n};\n\nEnumerator$1.prototype._willSettleAt = function (promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n};\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all$1(entries) {\n return new Enumerator$1(this, entries).promise;\n}\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race$1(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject$1(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n reject(promise, reason);\n return promise;\n}\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {function} resolver\n Useful for tooling.\n @constructor\n*/\nfunction Promise$2(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise$2 ? initializePromise(this, resolver) : needsNew();\n }\n}\n\nPromise$2.all = all$1;\nPromise$2.race = race$1;\nPromise$2.resolve = resolve$1;\nPromise$2.reject = reject$1;\nPromise$2._setScheduler = setScheduler;\nPromise$2._setAsap = setAsap;\nPromise$2._asap = asap;\n\nPromise$2.prototype = {\n constructor: Promise$2,\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n \n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n \n Chaining\n --------\n \n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n \n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n \n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n \n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n \n Assimilation\n ------------\n \n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n \n If the assimliated promise rejects, then the downstream promise will also reject.\n \n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n \n Simple Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let result;\n \n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n \n Advanced Example\n --------------\n \n Synchronous Example\n \n ```javascript\n let author, books;\n \n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n \n Errback Example\n \n ```js\n \n function foundBooks(books) {\n \n }\n \n function failure(reason) {\n \n }\n \n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n \n Promise Example;\n \n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n \n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n then: then,\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n \n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n \n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n \n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n \n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n 'catch': function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};\n\n/*global self*/\nfunction polyfill$1() {\n var local = undefined;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise$2;\n}\n\n// Strange compat..\nPromise$2.polyfill = polyfill$1;\nPromise$2.Promise = Promise$2;\n\nreturn Promise$2;\n\n})));\n\n\n\n}).call(this,require(12),typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"12\":12}],4:[function(require,module,exports){\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nfunction EventEmitter() {\n this._events = this._events || {};\n this._maxListeners = this._maxListeners || undefined;\n}\nmodule.exports = EventEmitter;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nEventEmitter.defaultMaxListeners = 10;\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function(n) {\n if (!isNumber(n) || n < 0 || isNaN(n))\n throw TypeError('n must be a positive number');\n this._maxListeners = n;\n return this;\n};\n\nEventEmitter.prototype.emit = function(type) {\n var er, handler, len, args, i, listeners;\n\n if (!this._events)\n this._events = {};\n\n // If there is no 'error' event listener then throw.\n if (type === 'error') {\n if (!this._events.error ||\n (isObject(this._events.error) && !this._events.error.length)) {\n er = arguments[1];\n if (er instanceof Error) {\n throw er; // Unhandled 'error' event\n } else {\n // At least give some kind of context to the user\n var err = new Error('Uncaught, unspecified \"error\" event. (' + er + ')');\n err.context = er;\n throw err;\n }\n }\n }\n\n handler = this._events[type];\n\n if (isUndefined(handler))\n return false;\n\n if (isFunction(handler)) {\n switch (arguments.length) {\n // fast cases\n case 1:\n handler.call(this);\n break;\n case 2:\n handler.call(this, arguments[1]);\n break;\n case 3:\n handler.call(this, arguments[1], arguments[2]);\n break;\n // slower\n default:\n args = Array.prototype.slice.call(arguments, 1);\n handler.apply(this, args);\n }\n } else if (isObject(handler)) {\n args = Array.prototype.slice.call(arguments, 1);\n listeners = handler.slice();\n len = listeners.length;\n for (i = 0; i < len; i++)\n listeners[i].apply(this, args);\n }\n\n return true;\n};\n\nEventEmitter.prototype.addListener = function(type, listener) {\n var m;\n\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n if (!this._events)\n this._events = {};\n\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (this._events.newListener)\n this.emit('newListener', type,\n isFunction(listener.listener) ?\n listener.listener : listener);\n\n if (!this._events[type])\n // Optimize the case of one listener. Don't need the extra array object.\n this._events[type] = listener;\n else if (isObject(this._events[type]))\n // If we've already got an array, just append.\n this._events[type].push(listener);\n else\n // Adding the second element, need to change to array.\n this._events[type] = [this._events[type], listener];\n\n // Check for listener leak\n if (isObject(this._events[type]) && !this._events[type].warned) {\n if (!isUndefined(this._maxListeners)) {\n m = this._maxListeners;\n } else {\n m = EventEmitter.defaultMaxListeners;\n }\n\n if (m && m > 0 && this._events[type].length > m) {\n this._events[type].warned = true;\n console.error('(node) warning: possible EventEmitter memory ' +\n 'leak detected. %d listeners added. ' +\n 'Use emitter.setMaxListeners() to increase limit.',\n this._events[type].length);\n if (typeof console.trace === 'function') {\n // not supported in IE 10\n console.trace();\n }\n }\n }\n\n return this;\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.once = function(type, listener) {\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n var fired = false;\n\n function g() {\n this.removeListener(type, g);\n\n if (!fired) {\n fired = true;\n listener.apply(this, arguments);\n }\n }\n\n g.listener = listener;\n this.on(type, g);\n\n return this;\n};\n\n// emits a 'removeListener' event iff the listener was removed\nEventEmitter.prototype.removeListener = function(type, listener) {\n var list, position, length, i;\n\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n if (!this._events || !this._events[type])\n return this;\n\n list = this._events[type];\n length = list.length;\n position = -1;\n\n if (list === listener ||\n (isFunction(list.listener) && list.listener === listener)) {\n delete this._events[type];\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n\n } else if (isObject(list)) {\n for (i = length; i-- > 0;) {\n if (list[i] === listener ||\n (list[i].listener && list[i].listener === listener)) {\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (list.length === 1) {\n list.length = 0;\n delete this._events[type];\n } else {\n list.splice(position, 1);\n }\n\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n }\n\n return this;\n};\n\nEventEmitter.prototype.removeAllListeners = function(type) {\n var key, listeners;\n\n if (!this._events)\n return this;\n\n // not listening for removeListener, no need to emit\n if (!this._events.removeListener) {\n if (arguments.length === 0)\n this._events = {};\n else if (this._events[type])\n delete this._events[type];\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n for (key in this._events) {\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = {};\n return this;\n }\n\n listeners = this._events[type];\n\n if (isFunction(listeners)) {\n this.removeListener(type, listeners);\n } else if (listeners) {\n // LIFO order\n while (listeners.length)\n this.removeListener(type, listeners[listeners.length - 1]);\n }\n delete this._events[type];\n\n return this;\n};\n\nEventEmitter.prototype.listeners = function(type) {\n var ret;\n if (!this._events || !this._events[type])\n ret = [];\n else if (isFunction(this._events[type]))\n ret = [this._events[type]];\n else\n ret = this._events[type].slice();\n return ret;\n};\n\nEventEmitter.prototype.listenerCount = function(type) {\n if (this._events) {\n var evlistener = this._events[type];\n\n if (isFunction(evlistener))\n return 1;\n else if (evlistener)\n return evlistener.length;\n }\n return 0;\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n return emitter.listenerCount(type);\n};\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\n\n},{}],5:[function(require,module,exports){\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toString = Object.prototype.toString;\n\nmodule.exports = function forEach (obj, fn, ctx) {\n if (toString.call(fn) !== '[object Function]') {\n throw new TypeError('iterator must be a function');\n }\n var l = obj.length;\n if (l === +l) {\n for (var i = 0; i < l; i++) {\n fn.call(ctx, obj[i], i, obj);\n }\n } else {\n for (var k in obj) {\n if (hasOwn.call(obj, k)) {\n fn.call(ctx, obj[k], k, obj);\n }\n }\n }\n};\n\n\n},{}],6:[function(require,module,exports){\n(function (global){\nvar win;\n\nif (typeof window !== \"undefined\") {\n win = window;\n} else if (typeof global !== \"undefined\") {\n win = global;\n} else if (typeof self !== \"undefined\"){\n win = self;\n} else {\n win = {};\n}\n\nmodule.exports = win;\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{}],7:[function(require,module,exports){\nif (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n\n},{}],8:[function(require,module,exports){\nvar toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n},{}],9:[function(require,module,exports){\n/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isNaN(val) === false) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n if (ms >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (ms >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (ms >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (ms >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n return plural(ms, d, 'day') ||\n plural(ms, h, 'hour') ||\n plural(ms, m, 'minute') ||\n plural(ms, s, 'second') ||\n ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, n, name) {\n if (ms < n) {\n return;\n }\n if (ms < n * 1.5) {\n return Math.floor(ms / n) + ' ' + name;\n }\n return Math.ceil(ms / n) + ' ' + name + 's';\n}\n\n},{}],10:[function(require,module,exports){\n'use strict';\n\n// modified from https://github.com/es-shims/es5-shim\nvar has = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\nvar slice = Array.prototype.slice;\nvar isArgs = require(11);\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\nvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\nvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\nvar dontEnums = [\n\t'toString',\n\t'toLocaleString',\n\t'valueOf',\n\t'hasOwnProperty',\n\t'isPrototypeOf',\n\t'propertyIsEnumerable',\n\t'constructor'\n];\nvar equalsConstructorPrototype = function (o) {\n\tvar ctor = o.constructor;\n\treturn ctor && ctor.prototype === o;\n};\nvar excludedKeys = {\n\t$console: true,\n\t$external: true,\n\t$frame: true,\n\t$frameElement: true,\n\t$frames: true,\n\t$innerHeight: true,\n\t$innerWidth: true,\n\t$outerHeight: true,\n\t$outerWidth: true,\n\t$pageXOffset: true,\n\t$pageYOffset: true,\n\t$parent: true,\n\t$scrollLeft: true,\n\t$scrollTop: true,\n\t$scrollX: true,\n\t$scrollY: true,\n\t$self: true,\n\t$webkitIndexedDB: true,\n\t$webkitStorageInfo: true,\n\t$window: true\n};\nvar hasAutomationEqualityBug = (function () {\n\t/* global window */\n\tif (typeof window === 'undefined') { return false; }\n\tfor (var k in window) {\n\t\ttry {\n\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\ttry {\n\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t} catch (e) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}());\nvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t/* global window */\n\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\treturn equalsConstructorPrototype(o);\n\t}\n\ttry {\n\t\treturn equalsConstructorPrototype(o);\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar keysShim = function keys(object) {\n\tvar isObject = object !== null && typeof object === 'object';\n\tvar isFunction = toStr.call(object) === '[object Function]';\n\tvar isArguments = isArgs(object);\n\tvar isString = isObject && toStr.call(object) === '[object String]';\n\tvar theKeys = [];\n\n\tif (!isObject && !isFunction && !isArguments) {\n\t\tthrow new TypeError('Object.keys called on a non-object');\n\t}\n\n\tvar skipProto = hasProtoEnumBug && isFunction;\n\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\ttheKeys.push(String(i));\n\t\t}\n\t}\n\n\tif (isArguments && object.length > 0) {\n\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\ttheKeys.push(String(j));\n\t\t}\n\t} else {\n\t\tfor (var name in object) {\n\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\ttheKeys.push(String(name));\n\t\t\t}\n\t\t}\n\t}\n\n\tif (hasDontEnumBug) {\n\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t}\n\t\t}\n\t}\n\treturn theKeys;\n};\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\treturn (Object.keys(arguments) || '').length === 2;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tvar originalKeys = Object.keys;\n\t\t\tObject.keys = function keys(object) {\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t} else {\n\t\t\t\t\treturn originalKeys(object);\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n\n},{\"11\":11}],11:[function(require,module,exports){\n'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n\n},{}],12:[function(require,module,exports){\n// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n},{}],13:[function(require,module,exports){\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n sep = sep || '&';\n eq = eq || '=';\n var obj = {};\n\n if (typeof qs !== 'string' || qs.length === 0) {\n return obj;\n }\n\n var regexp = /\\+/g;\n qs = qs.split(sep);\n\n var maxKeys = 1000;\n if (options && typeof options.maxKeys === 'number') {\n maxKeys = options.maxKeys;\n }\n\n var len = qs.length;\n // maxKeys <= 0 means that we should not limit keys count\n if (maxKeys > 0 && len > maxKeys) {\n len = maxKeys;\n }\n\n for (var i = 0; i < len; ++i) {\n var x = qs[i].replace(regexp, '%20'),\n idx = x.indexOf(eq),\n kstr, vstr, k, v;\n\n if (idx >= 0) {\n kstr = x.substr(0, idx);\n vstr = x.substr(idx + 1);\n } else {\n kstr = x;\n vstr = '';\n }\n\n k = decodeURIComponent(kstr);\n v = decodeURIComponent(vstr);\n\n if (!hasOwnProperty(obj, k)) {\n obj[k] = v;\n } else if (isArray(obj[k])) {\n obj[k].push(v);\n } else {\n obj[k] = [obj[k], v];\n }\n }\n\n return obj;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\n},{}],14:[function(require,module,exports){\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar stringifyPrimitive = function(v) {\n switch (typeof v) {\n case 'string':\n return v;\n\n case 'boolean':\n return v ? 'true' : 'false';\n\n case 'number':\n return isFinite(v) ? v : '';\n\n default:\n return '';\n }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n sep = sep || '&';\n eq = eq || '=';\n if (obj === null) {\n obj = undefined;\n }\n\n if (typeof obj === 'object') {\n return map(objectKeys(obj), function(k) {\n var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n if (isArray(obj[k])) {\n return map(obj[k], function(v) {\n return ks + encodeURIComponent(stringifyPrimitive(v));\n }).join(sep);\n } else {\n return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n }\n }).join(sep);\n\n }\n\n if (!name) return '';\n return encodeURIComponent(stringifyPrimitive(name)) + eq +\n encodeURIComponent(stringifyPrimitive(obj));\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\nfunction map (xs, f) {\n if (xs.map) return xs.map(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n res.push(f(xs[i], i));\n }\n return res;\n}\n\nvar objectKeys = Object.keys || function (obj) {\n var res = [];\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);\n }\n return res;\n};\n\n},{}],15:[function(require,module,exports){\n'use strict';\n\nexports.decode = exports.parse = require(13);\nexports.encode = exports.stringify = require(14);\n\n},{\"13\":13,\"14\":14}],16:[function(require,module,exports){\nmodule.exports = AlgoliaSearch;\n\nvar Index = require(18);\nvar deprecate = require(28);\nvar deprecatedMessage = require(29);\nvar AlgoliaSearchCore = require(17);\nvar inherits = require(7);\nvar errors = require(30);\n\nfunction AlgoliaSearch() {\n AlgoliaSearchCore.apply(this, arguments);\n}\n\ninherits(AlgoliaSearch, AlgoliaSearchCore);\n\n/*\n * Delete an index\n *\n * @param indexName the name of index to delete\n * @param callback the result callback called with two arguments\n * error: null or Error('message')\n * content: the server answer that contains the task ID\n */\nAlgoliaSearch.prototype.deleteIndex = function(indexName, callback) {\n return this._jsonRequest({\n method: 'DELETE',\n url: '/1/indexes/' + encodeURIComponent(indexName),\n hostType: 'write',\n callback: callback\n });\n};\n\n/**\n * Move an existing index.\n * @param srcIndexName the name of index to copy.\n * @param dstIndexName the new index name that will contains a copy of\n * srcIndexName (destination will be overriten if it already exist).\n * @param callback the result callback called with two arguments\n * error: null or Error('message')\n * content: the server answer that contains the task ID\n */\nAlgoliaSearch.prototype.moveIndex = function(srcIndexName, dstIndexName, callback) {\n var postObj = {\n operation: 'move', destination: dstIndexName\n };\n return this._jsonRequest({\n method: 'POST',\n url: '/1/indexes/' + encodeURIComponent(srcIndexName) + '/operation',\n body: postObj,\n hostType: 'write',\n callback: callback\n });\n};\n\n/**\n * Copy an existing index.\n * @param srcIndexName the name of index to copy.\n * @param dstIndexName the new index name that will contains a copy\n * of srcIndexName (destination will be overriten if it already exist).\n * @param scope an array of scopes to copy: ['settings', 'synonyms', 'rules']\n * @param callback the result callback called with two arguments\n * error: null or Error('message')\n * content: the server answer that contains the task ID\n */\nAlgoliaSearch.prototype.copyIndex = function(srcIndexName, dstIndexName, scopeOrCallback, _callback) {\n var postObj = {\n operation: 'copy',\n destination: dstIndexName\n };\n var callback = _callback;\n if (typeof scopeOrCallback === 'function') {\n // oops, old behaviour of third argument being a function\n callback = scopeOrCallback;\n } else if (Array.isArray(scopeOrCallback) && scopeOrCallback.length > 0) {\n postObj.scope = scopeOrCallback;\n } else if (typeof scopeOrCallback !== 'undefined') {\n throw new Error('the scope given to `copyIndex` was not an array with settings, synonyms or rules');\n }\n return this._jsonRequest({\n method: 'POST',\n url: '/1/indexes/' + encodeURIComponent(srcIndexName) + '/operation',\n body: postObj,\n hostType: 'write',\n callback: callback\n });\n};\n\n/**\n * Return last log entries.\n * @param offset Specify the first entry to retrieve (0-based, 0 is the most recent log entry).\n * @param length Specify the maximum number of entries to retrieve starting\n * at offset. Maximum allowed value: 1000.\n * @param type Specify the maximum number of entries to retrieve starting\n * at offset. Maximum allowed value: 1000.\n * @param callback the result callback called with two arguments\n * error: null or Error('message')\n * content: the server answer that contains the task ID\n */\nAlgoliaSearch.prototype.getLogs = function(offset, length, callback) {\n var clone = require(26);\n var params = {};\n if (typeof offset === 'object') {\n // getLogs(params)\n params = clone(offset);\n callback = length;\n } else if (arguments.length === 0 || typeof offset === 'function') {\n // getLogs([cb])\n callback = offset;\n } else if (arguments.length === 1 || typeof length === 'function') {\n // getLogs(1, [cb)]\n callback = length;\n params.offset = offset;\n } else {\n // getLogs(1, 2, [cb])\n params.offset = offset;\n params.length = length;\n }\n\n if (params.offset === undefined) params.offset = 0;\n if (params.length === undefined) params.length = 10;\n\n return this._jsonRequest({\n method: 'GET',\n url: '/1/logs?' + this._getSearchParams(params, ''),\n hostType: 'read',\n callback: callback\n });\n};\n\n/*\n * List all existing indexes (paginated)\n *\n * @param page The page to retrieve, starting at 0.\n * @param callback the result callback called with two arguments\n * error: null or Error('message')\n * content: the server answer with index list\n */\nAlgoliaSearch.prototype.listIndexes = function(page, callback) {\n var params = '';\n\n if (page === undefined || typeof page === 'function') {\n callback = page;\n } else {\n params = '?page=' + page;\n }\n\n return this._jsonRequest({\n method: 'GET',\n url: '/1/indexes' + params,\n hostType: 'read',\n callback: callback\n });\n};\n\n/*\n * Get the index object initialized\n *\n * @param indexName the name of index\n * @param callback the result callback with one argument (the Index instance)\n */\nAlgoliaSearch.prototype.initIndex = function(indexName) {\n return new Index(this, indexName);\n};\n\nAlgoliaSearch.prototype.initAnalytics = function(opts) {\n // the actual require must be inside the function, when put outside then you have a cyclic dependency\n // not well resolved that ends up making the main \"./index.js\" (main module, the agloliasearch function)\n // export an object instead of a function\n // Other workarounds:\n // - rewrite the lib in ES6, cyclic dependencies may be better supported\n // - move initAnalytics to a property on the main module (algoliasearch.initAnalytics),\n // same as places.\n // The current API was made mostly to mimic the one made in PHP\n var createAnalyticsClient = require(27);\n return createAnalyticsClient(this.applicationID, this.apiKey, opts);\n};\n\n/*\n * @deprecated use client.listApiKeys\n */\nAlgoliaSearch.prototype.listUserKeys = deprecate(function(callback) {\n return this.listApiKeys(callback);\n}, deprecatedMessage('client.listUserKeys()', 'client.listApiKeys()'));\n\n/*\n * List all existing api keys with their associated ACLs\n *\n * @param callback the result callback called with two arguments\n * error: null or Error('message')\n * content: the server answer with api keys list\n */\nAlgoliaSearch.prototype.listApiKeys = function(callback) {\n return this._jsonRequest({\n method: 'GET',\n url: '/1/keys',\n hostType: 'read',\n callback: callback\n });\n};\n\n/*\n * @deprecated see client.getApiKey\n */\nAlgoliaSearch.prototype.getUserKeyACL = deprecate(function(key, callback) {\n return this.getApiKey(key, callback);\n}, deprecatedMessage('client.getUserKeyACL()', 'client.getApiKey()'));\n\n/*\n * Get an API key\n *\n * @param key\n * @param callback the result callback called with two arguments\n * error: null or Error('message')\n * content: the server answer with the right API key\n */\nAlgoliaSearch.prototype.getApiKey = function(key, callback) {\n return this._jsonRequest({\n method: 'GET',\n url: '/1/keys/' + key,\n hostType: 'read',\n callback: callback\n });\n};\n\n/*\n * @deprecated see client.deleteApiKey\n */\nAlgoliaSearch.prototype.deleteUserKey = deprecate(function(key, callback) {\n return this.deleteApiKey(key, callback);\n}, deprecatedMessage('client.deleteUserKey()', 'client.deleteApiKey()'));\n\n/*\n * Delete an existing API key\n * @param key\n * @param callback the result callback called with two arguments\n * error: null or Error('message')\n * content: the server answer with the date of deletion\n */\nAlgoliaSearch.prototype.deleteApiKey = function(key, callback) {\n return this._jsonRequest({\n method: 'DELETE',\n url: '/1/keys/' + key,\n hostType: 'write',\n callback: callback\n });\n};\n\n/**\n * Restore a deleted API key\n *\n * @param {String} key - The key to restore\n * @param {Function} callback - The result callback called with two arguments\n * error: null or Error('message')\n * content: the server answer with the restored API key\n * @return {Promise|undefined} Returns a promise if no callback given\n * @example\n * client.restoreApiKey('APIKEY')\n * @see {@link https://www.algolia.com/doc/rest-api/search/#restore-api-key|Algolia REST API Documentation}\n */\nAlgoliaSearch.prototype.restoreApiKey = function(key, callback) {\n return this._jsonRequest({\n method: 'POST',\n url: '/1/keys/' + key + '/restore',\n hostType: 'write',\n callback: callback\n });\n};\n\n/*\n @deprecated see client.addApiKey\n */\nAlgoliaSearch.prototype.addUserKey = deprecate(function(acls, params, callback) {\n return this.addApiKey(acls, params, callback);\n}, deprecatedMessage('client.addUserKey()', 'client.addApiKey()'));\n\n/*\n * Add a new global API key\n *\n * @param {string[]} acls - The list of ACL for this key. Defined by an array of strings that\n * can contains the following values:\n * - search: allow to search (https and http)\n * - addObject: allows to add/update an object in the index (https only)\n * - deleteObject : allows to delete an existing object (https only)\n * - deleteIndex : allows to delete index content (https only)\n * - settings : allows to get index settings (https only)\n * - editSettings : allows to change index settings (https only)\n * @param {Object} [params] - Optionnal parameters to set for the key\n * @param {number} params.validity - Number of seconds after which the key will be automatically removed (0 means no time limit for this key)\n * @param {number} params.maxQueriesPerIPPerHour - Number of API calls allowed from an IP address per hour\n * @param {number} params.maxHitsPerQuery - Number of hits this API key can retrieve in one call\n * @param {string[]} params.indexes - Allowed targeted indexes for this key\n * @param {string} params.description - A description for your key\n * @param {string[]} params.referers - A list of authorized referers\n * @param {Object} params.queryParameters - Force the key to use specific query parameters\n * @param {Function} callback - The result callback called with two arguments\n * error: null or Error('message')\n * content: the server answer with the added API key\n * @return {Promise|undefined} Returns a promise if no callback given\n * @example\n * client.addApiKey(['search'], {\n * validity: 300,\n * maxQueriesPerIPPerHour: 2000,\n * maxHitsPerQuery: 3,\n * indexes: ['fruits'],\n * description: 'Eat three fruits',\n * referers: ['*.algolia.com'],\n * queryParameters: {\n * tagFilters: ['public'],\n * }\n * })\n * @see {@link https://www.algolia.com/doc/rest_api#AddKey|Algolia REST API Documentation}\n */\nAlgoliaSearch.prototype.addApiKey = function(acls, params, callback) {\n var isArray = require(8);\n var usage = 'Usage: client.addApiKey(arrayOfAcls[, params, callback])';\n\n if (!isArray(acls)) {\n throw new Error(usage);\n }\n\n if (arguments.length === 1 || typeof params === 'function') {\n callback = params;\n params = null;\n }\n\n var postObj = {\n acl: acls\n };\n\n if (params) {\n postObj.validity = params.validity;\n postObj.maxQueriesPerIPPerHour = params.maxQueriesPerIPPerHour;\n postObj.maxHitsPerQuery = params.maxHitsPerQuery;\n postObj.indexes = params.indexes;\n postObj.description = params.description;\n\n if (params.queryParameters) {\n postObj.queryParameters = this._getSearchParams(params.queryParameters, '');\n }\n\n postObj.referers = params.referers;\n }\n\n return this._jsonRequest({\n method: 'POST',\n url: '/1/keys',\n body: postObj,\n hostType: 'write',\n callback: callback\n });\n};\n\n/**\n * @deprecated Please use client.addApiKey()\n */\nAlgoliaSearch.prototype.addUserKeyWithValidity = deprecate(function(acls, params, callback) {\n return this.addApiKey(acls, params, callback);\n}, deprecatedMessage('client.addUserKeyWithValidity()', 'client.addApiKey()'));\n\n/**\n * @deprecated Please use client.updateApiKey()\n */\nAlgoliaSearch.prototype.updateUserKey = deprecate(function(key, acls, params, callback) {\n return this.updateApiKey(key, acls, params, callback);\n}, deprecatedMessage('client.updateUserKey()', 'client.updateApiKey()'));\n\n/**\n * Update an existing API key\n * @param {string} key - The key to update\n * @param {string[]} acls - The list of ACL for this key. Defined by an array of strings that\n * can contains the following values:\n * - search: allow to search (https and http)\n * - addObject: allows to add/update an object in the index (https only)\n * - deleteObject : allows to delete an existing object (https only)\n * - deleteIndex : allows to delete index content (https only)\n * - settings : allows to get index settings (https only)\n * - editSettings : allows to change index settings (https only)\n * @param {Object} [params] - Optionnal parameters to set for the key\n * @param {number} params.validity - Number of seconds after which the key will be automatically removed (0 means no time limit for this key)\n * @param {number} params.maxQueriesPerIPPerHour - Number of API calls allowed from an IP address per hour\n * @param {number} params.maxHitsPerQuery - Number of hits this API key can retrieve in one call\n * @param {string[]} params.indexes - Allowed targeted indexes for this key\n * @param {string} params.description - A description for your key\n * @param {string[]} params.referers - A list of authorized referers\n * @param {Object} params.queryParameters - Force the key to use specific query parameters\n * @param {Function} callback - The result callback called with two arguments\n * error: null or Error('message')\n * content: the server answer with the modified API key\n * @return {Promise|undefined} Returns a promise if no callback given\n * @example\n * client.updateApiKey('APIKEY', ['search'], {\n * validity: 300,\n * maxQueriesPerIPPerHour: 2000,\n * maxHitsPerQuery: 3,\n * indexes: ['fruits'],\n * description: 'Eat three fruits',\n * referers: ['*.algolia.com'],\n * queryParameters: {\n * tagFilters: ['public'],\n * }\n * })\n * @see {@link https://www.algolia.com/doc/rest_api#UpdateIndexKey|Algolia REST API Documentation}\n */\nAlgoliaSearch.prototype.updateApiKey = function(key, acls, params, callback) {\n var isArray = require(8);\n var usage = 'Usage: client.updateApiKey(key, arrayOfAcls[, params, callback])';\n\n if (!isArray(acls)) {\n throw new Error(usage);\n }\n\n if (arguments.length === 2 || typeof params === 'function') {\n callback = params;\n params = null;\n }\n\n var putObj = {\n acl: acls\n };\n\n if (params) {\n putObj.validity = params.validity;\n putObj.maxQueriesPerIPPerHour = params.maxQueriesPerIPPerHour;\n putObj.maxHitsPerQuery = params.maxHitsPerQuery;\n putObj.indexes = params.indexes;\n putObj.description = params.description;\n\n if (params.queryParameters) {\n putObj.queryParameters = this._getSearchParams(params.queryParameters, '');\n }\n\n putObj.referers = params.referers;\n }\n\n return this._jsonRequest({\n method: 'PUT',\n url: '/1/keys/' + key,\n body: putObj,\n hostType: 'write',\n callback: callback\n });\n};\n\n/**\n * Initialize a new batch of search queries\n * @deprecated use client.search()\n */\nAlgoliaSearch.prototype.startQueriesBatch = deprecate(function startQueriesBatchDeprecated() {\n this._batch = [];\n}, deprecatedMessage('client.startQueriesBatch()', 'client.search()'));\n\n/**\n * Add a search query in the batch\n * @deprecated use client.search()\n */\nAlgoliaSearch.prototype.addQueryInBatch = deprecate(function addQueryInBatchDeprecated(indexName, query, args) {\n this._batch.push({\n indexName: indexName,\n query: query,\n params: args\n });\n}, deprecatedMessage('client.addQueryInBatch()', 'client.search()'));\n\n/**\n * Launch the batch of queries using XMLHttpRequest.\n * @deprecated use client.search()\n */\nAlgoliaSearch.prototype.sendQueriesBatch = deprecate(function sendQueriesBatchDeprecated(callback) {\n return this.search(this._batch, callback);\n}, deprecatedMessage('client.sendQueriesBatch()', 'client.search()'));\n\n/**\n * Perform write operations across multiple indexes.\n *\n * To reduce the amount of time spent on network round trips,\n * you can create, update, or delete several objects in one call,\n * using the batch endpoint (all operations are done in the given order).\n *\n * Available actions:\n * - addObject\n * - updateObject\n * - partialUpdateObject\n * - partialUpdateObjectNoCreate\n * - deleteObject\n *\n * https://www.algolia.com/doc/rest_api#Indexes\n * @param {Object[]} operations An array of operations to perform\n * @return {Promise|undefined} Returns a promise if no callback given\n * @example\n * client.batch([{\n * action: 'addObject',\n * indexName: 'clients',\n * body: {\n * name: 'Bill'\n * }\n * }, {\n * action: 'udpateObject',\n * indexName: 'fruits',\n * body: {\n * objectID: '29138',\n * name: 'banana'\n * }\n * }], cb)\n */\nAlgoliaSearch.prototype.batch = function(operations, callback) {\n var isArray = require(8);\n var usage = 'Usage: client.batch(operations[, callback])';\n\n if (!isArray(operations)) {\n throw new Error(usage);\n }\n\n return this._jsonRequest({\n method: 'POST',\n url: '/1/indexes/*/batch',\n body: {\n requests: operations\n },\n hostType: 'write',\n callback: callback\n });\n};\n\n/**\n * Assign or Move a userID to a cluster\n *\n * @param {string} data.userID The userID to assign to a new cluster\n * @param {string} data.cluster The cluster to assign the user to\n * @return {Promise|undefined} Returns a promise if no callback given\n * @example\n * client.assignUserID({ cluster: 'c1-test', userID: 'some-user' });\n */\nAlgoliaSearch.prototype.assignUserID = function(data, callback) {\n if (!data.userID || !data.cluster) {\n throw new errors.AlgoliaSearchError('You have to provide both a userID and cluster', data);\n }\n return this._jsonRequest({\n method: 'POST',\n url: '/1/clusters/mapping',\n hostType: 'write',\n body: {cluster: data.cluster},\n callback: callback,\n headers: {\n 'x-algolia-user-id': data.userID\n }\n });\n};\n\n/**\n * Assign a array of userIDs to a cluster.\n *\n * @param {Array} data.userIDs The array of userIDs to assign to a new cluster\n * @param {string} data.cluster The cluster to assign the user to\n * @return {Promise|undefined} Returns a promise if no callback given\n * @example\n * client.assignUserIDs({ cluster: 'c1-test', userIDs: ['some-user-1', 'some-user-2'] });\n */\nAlgoliaSearch.prototype.assignUserIDs = function(data, callback) {\n if (!data.userIDs || !data.cluster) {\n throw new errors.AlgoliaSearchError('You have to provide both an array of userIDs and cluster', data);\n }\n return this._jsonRequest({\n method: 'POST',\n url: '/1/clusters/mapping/batch',\n hostType: 'write',\n body: {\n cluster: data.cluster,\n users: data.userIDs\n },\n callback: callback\n });\n};\n\n/**\n * Get the top userIDs\n *\n * (the callback is the second argument)\n *\n * @return {Promise|undefined} Returns a promise if no callback given\n * @example\n * client.getTopUserID();\n */\nAlgoliaSearch.prototype.getTopUserID = function(callback) {\n return this._jsonRequest({\n method: 'GET',\n url: '/1/clusters/mapping/top',\n hostType: 'read',\n callback: callback\n });\n};\n\n/**\n * Get userID\n *\n * @param {string} data.userID The userID to get info about\n * @return {Promise|undefined} Returns a promise if no callback given\n * @example\n * client.getUserID({ userID: 'some-user' });\n */\nAlgoliaSearch.prototype.getUserID = function(data, callback) {\n if (!data.userID) {\n throw new errors.AlgoliaSearchError('You have to provide a userID', {debugData: data});\n }\n return this._jsonRequest({\n method: 'GET',\n url: '/1/clusters/mapping/' + data.userID,\n hostType: 'read',\n callback: callback\n });\n};\n\n/**\n * List all the clusters\n *\n * (the callback is the second argument)\n *\n * @return {Promise|undefined} Returns a promise if no callback given\n * @example\n * client.listClusters();\n */\nAlgoliaSearch.prototype.listClusters = function(callback) {\n return this._jsonRequest({\n method: 'GET',\n url: '/1/clusters',\n hostType: 'read',\n callback: callback\n });\n};\n\n/**\n * List the userIDs\n *\n * (the callback is the second argument)\n *\n * @param {string} data.hitsPerPage How many hits on every page\n * @param {string} data.page The page to retrieve\n * @return {Promise|undefined} Returns a promise if no callback given\n * @example\n * client.listClusters();\n * client.listClusters({ page: 3, hitsPerPage: 30});\n */\nAlgoliaSearch.prototype.listUserIDs = function(data, callback) {\n return this._jsonRequest({\n method: 'GET',\n url: '/1/clusters/mapping',\n body: data,\n hostType: 'read',\n callback: callback\n });\n};\n\n/**\n * Remove an userID\n *\n * @param {string} data.userID The userID to assign to a new cluster\n * @return {Promise|undefined} Returns a promise if no callback given\n * @example\n * client.removeUserID({ userID: 'some-user' });\n */\nAlgoliaSearch.prototype.removeUserID = function(data, callback) {\n if (!data.userID) {\n throw new errors.AlgoliaSearchError('You have to provide a userID', {debugData: data});\n }\n return this._jsonRequest({\n method: 'DELETE',\n url: '/1/clusters/mapping',\n hostType: 'write',\n callback: callback,\n headers: {\n 'x-algolia-user-id': data.userID\n }\n });\n};\n\n/**\n * Search for userIDs\n *\n * @param {string} data.cluster The cluster to target\n * @param {string} data.query The query to execute\n * @param {string} data.hitsPerPage How many hits on every page\n * @param {string} data.page The page to retrieve\n * @return {Promise|undefined} Returns a promise if no callback given\n * @example\n * client.searchUserIDs({ cluster: 'c1-test', query: 'some-user' });\n * client.searchUserIDs({\n * cluster: \"c1-test\",\n * query: \"some-user\",\n * page: 3,\n * hitsPerPage: 2\n * });\n */\nAlgoliaSearch.prototype.searchUserIDs = function(data, callback) {\n return this._jsonRequest({\n method: 'POST',\n url: '/1/clusters/mapping/search',\n body: data,\n hostType: 'read',\n callback: callback\n });\n};\n\n/**\n * Set strategy for personalization\n *\n * @param {Object} data\n * @param {Object} data.eventsScoring Associate a score to an event\n * @param {Object} data.eventsScoring.<eventName> The name of the event\n * @param {Number} data.eventsScoring.<eventName>.score The score to associate to <eventName>\n * @param {String} data.eventsScoring.<eventName>.type Either \"click\", \"conversion\" or \"view\"\n * @param {Object} data.facetsScoring Associate a score to a facet\n * @param {Object} data.facetsScoring.<facetName> The name of the facet\n * @param {Number} data.facetsScoring.<facetName>.score The score to associate to <facetName>\n * @return {Promise|undefined} Returns a promise if no callback given\n * @example\n * client.setPersonalizationStrategy({\n * eventsScoring: {\n * \"Add to cart\": { score: 50, type: \"conversion\" },\n * Purchase: { score: 100, type: \"conversion\" }\n * },\n * facetsScoring: {\n * brand: { score: 100 },\n * categories: { score: 10 }\n * }\n * });\n */\nAlgoliaSearch.prototype.setPersonalizationStrategy = function(data, callback) {\n return this._jsonRequest({\n method: 'POST',\n url: '/1/recommendation/personalization/strategy',\n body: data,\n hostType: 'write',\n callback: callback\n });\n};\n\n/**\n * Get strategy for personalization\n *\n * @return {Promise|undefined} Returns a promise if no callback given\n * @example\n * client.getPersonalizationStrategy();\n */\n\nAlgoliaSearch.prototype.getPersonalizationStrategy = function(callback) {\n return this._jsonRequest({\n method: 'GET',\n url: '/1/recommendation/personalization/strategy',\n hostType: 'read',\n callback: callback\n });\n};\n\n// environment specific methods\nAlgoliaSearch.prototype.destroy = notImplemented;\nAlgoliaSearch.prototype.enableRateLimitForward = notImplemented;\nAlgoliaSearch.prototype.disableRateLimitForward = notImplemented;\nAlgoliaSearch.prototype.useSecuredAPIKey = notImplemented;\nAlgoliaSearch.prototype.disableSecuredAPIKey = notImplemented;\nAlgoliaSearch.prototype.generateSecuredApiKey = notImplemented;\nAlgoliaSearch.prototype.getSecuredApiKeyRemainingValidity = notImplemented;\n\nfunction notImplemented() {\n var message = 'Not implemented in this environment.\\n' +\n 'If you feel this is a mistake, write to support@algolia.com';\n\n throw new errors.AlgoliaSearchError(message);\n}\n\n},{\"17\":17,\"18\":18,\"26\":26,\"27\":27,\"28\":28,\"29\":29,\"30\":30,\"7\":7,\"8\":8}],17:[function(require,module,exports){\n(function (process){\nmodule.exports = AlgoliaSearchCore;\n\nvar errors = require(30);\nvar exitPromise = require(31);\nvar IndexCore = require(20);\nvar store = require(36);\n\n// We will always put the API KEY in the JSON body in case of too long API KEY,\n// to avoid query string being too long and failing in various conditions (our server limit, browser limit,\n// proxies limit)\nvar MAX_API_KEY_LENGTH = 500;\nvar RESET_APP_DATA_TIMER =\n process.env.RESET_APP_DATA_TIMER && parseInt(process.env.RESET_APP_DATA_TIMER, 10) ||\n 60 * 2 * 1000; // after 2 minutes reset to first host\n\n/*\n * Algolia Search library initialization\n * https://www.algolia.com/\n *\n * @param {string} applicationID - Your applicationID, found in your dashboard\n * @param {string} apiKey - Your API key, found in your dashboard\n * @param {Object} [opts]\n * @param {number} [opts.timeout=2000] - The request timeout set in milliseconds,\n * another request will be issued after this timeout\n * @param {string} [opts.protocol='https:'] - The protocol used to query Algolia Search API.\n * Set to 'http:' to force using http.\n * @param {Object|Array} [opts.hosts={\n * read: [this.applicationID + '-dsn.algolia.net'].concat([\n * this.applicationID + '-1.algolianet.com',\n * this.applicationID + '-2.algolianet.com',\n * this.applicationID + '-3.algolianet.com']\n * ]),\n * write: [this.applicationID + '.algolia.net'].concat([\n * this.applicationID + '-1.algolianet.com',\n * this.applicationID + '-2.algolianet.com',\n * this.applicationID + '-3.algolianet.com']\n * ]) - The hosts to use for Algolia Search API.\n * If you provide them, you will less benefit from our HA implementation\n */\nfunction AlgoliaSearchCore(applicationID, apiKey, opts) {\n var debug = require(1)('algoliasearch');\n\n var clone = require(26);\n var isArray = require(8);\n var map = require(32);\n\n var usage = 'Usage: algoliasearch(applicationID, apiKey, opts)';\n\n if (opts._allowEmptyCredentials !== true && !applicationID) {\n throw new errors.AlgoliaSearchError('Please provide an application ID. ' + usage);\n }\n\n if (opts._allowEmptyCredentials !== true && !apiKey) {\n throw new errors.AlgoliaSearchError('Please provide an API key. ' + usage);\n }\n\n this.applicationID = applicationID;\n this.apiKey = apiKey;\n\n this.hosts = {\n read: [],\n write: []\n };\n\n opts = opts || {};\n\n this._timeouts = opts.timeouts || {\n connect: 1 * 1000, // 500ms connect is GPRS latency\n read: 2 * 1000,\n write: 30 * 1000\n };\n\n // backward compat, if opts.timeout is passed, we use it to configure all timeouts like before\n if (opts.timeout) {\n this._timeouts.connect = this._timeouts.read = this._timeouts.write = opts.timeout;\n }\n\n var protocol = opts.protocol || 'https:';\n // while we advocate for colon-at-the-end values: 'http:' for `opts.protocol`\n // we also accept `http` and `https`. It's a common error.\n if (!/:$/.test(protocol)) {\n protocol = protocol + ':';\n }\n\n if (protocol !== 'http:' && protocol !== 'https:') {\n throw new errors.AlgoliaSearchError('protocol must be `http:` or `https:` (was `' + opts.protocol + '`)');\n }\n\n this._checkAppIdData();\n\n if (!opts.hosts) {\n var defaultHosts = map(this._shuffleResult, function(hostNumber) {\n return applicationID + '-' + hostNumber + '.algolianet.com';\n });\n\n // no hosts given, compute defaults\n var mainSuffix = (opts.dsn === false ? '' : '-dsn') + '.algolia.net';\n this.hosts.read = [this.applicationID + mainSuffix].concat(defaultHosts);\n this.hosts.write = [this.applicationID + '.algolia.net'].concat(defaultHosts);\n } else if (isArray(opts.hosts)) {\n // when passing custom hosts, we need to have a different host index if the number\n // of write/read hosts are different.\n this.hosts.read = clone(opts.hosts);\n this.hosts.write = clone(opts.hosts);\n } else {\n this.hosts.read = clone(opts.hosts.read);\n this.hosts.write = clone(opts.hosts.write);\n }\n\n // add protocol and lowercase hosts\n this.hosts.read = map(this.hosts.read, prepareHost(protocol));\n this.hosts.write = map(this.hosts.write, prepareHost(protocol));\n\n this.extraHeaders = {};\n\n // In some situations you might want to warm the cache\n this.cache = opts._cache || {};\n\n this._ua = opts._ua;\n this._useCache = opts._useCache === undefined || opts._cache ? true : opts._useCache;\n this._useRequestCache = this._useCache && opts._useRequestCache;\n this._useFallback = opts.useFallback === undefined ? true : opts.useFallback;\n\n this._setTimeout = opts._setTimeout;\n\n debug('init done, %j', this);\n}\n\n/*\n * Get the index object initialized\n *\n * @param indexName the name of index\n * @param callback the result callback with one argument (the Index instance)\n */\nAlgoliaSearchCore.prototype.initIndex = function(indexName) {\n return new IndexCore(this, indexName);\n};\n\n/**\n* Add an extra field to the HTTP request\n*\n* @param name the header field name\n* @param value the header field value\n*/\nAlgoliaSearchCore.prototype.setExtraHeader = function(name, value) {\n this.extraHeaders[name.toLowerCase()] = value;\n};\n\n/**\n* Get the value of an extra HTTP header\n*\n* @param name the header field name\n*/\nAlgoliaSearchCore.prototype.getExtraHeader = function(name) {\n return this.extraHeaders[name.toLowerCase()];\n};\n\n/**\n* Remove an extra field from the HTTP request\n*\n* @param name the header field name\n*/\nAlgoliaSearchCore.prototype.unsetExtraHeader = function(name) {\n delete this.extraHeaders[name.toLowerCase()];\n};\n\n/**\n* Augment sent x-algolia-agent with more data, each agent part\n* is automatically separated from the others by a semicolon;\n*\n* @param algoliaAgent the agent to add\n*/\nAlgoliaSearchCore.prototype.addAlgoliaAgent = function(algoliaAgent) {\n var algoliaAgentWithDelimiter = '; ' + algoliaAgent;\n\n if (this._ua.indexOf(algoliaAgentWithDelimiter) === -1) {\n this._ua += algoliaAgentWithDelimiter;\n }\n};\n\n/*\n * Wrapper that try all hosts to maximize the quality of service\n */\nAlgoliaSearchCore.prototype._jsonRequest = function(initialOpts) {\n this._checkAppIdData();\n\n var requestDebug = require(1)('algoliasearch:' + initialOpts.url);\n\n\n var body;\n var cacheID;\n var additionalUA = initialOpts.additionalUA || '';\n var cache = initialOpts.cache;\n var client = this;\n var tries = 0;\n var usingFallback = false;\n var hasFallback = client._useFallback && client._request.fallback && initialOpts.fallback;\n var headers;\n\n if (\n this.apiKey.length > MAX_API_KEY_LENGTH &&\n initialOpts.body !== undefined &&\n (initialOpts.body.params !== undefined || // index.search()\n initialOpts.body.requests !== undefined) // client.search()\n ) {\n initialOpts.body.apiKey = this.apiKey;\n headers = this._computeRequestHeaders({\n additionalUA: additionalUA,\n withApiKey: false,\n headers: initialOpts.headers\n });\n } else {\n headers = this._computeRequestHeaders({\n additionalUA: additionalUA,\n headers: initialOpts.headers\n });\n }\n\n if (initialOpts.body !== undefined) {\n body = safeJSONStringify(initialOpts.body);\n }\n\n requestDebug('request start');\n var debugData = [];\n\n\n function doRequest(requester, reqOpts) {\n client._checkAppIdData();\n\n var startTime = new Date();\n\n if (client._useCache && !client._useRequestCache) {\n cacheID = initialOpts.url;\n }\n\n // as we sometime use POST requests to pass parameters (like query='aa'),\n // the cacheID must also include the body to be different between calls\n if (client._useCache && !client._useRequestCache && body) {\n cacheID += '_body_' + reqOpts.body;\n }\n\n // handle cache existence\n if (isCacheValidWithCurrentID(!client._useRequestCache, cache, cacheID)) {\n requestDebug('serving response from cache');\n\n var responseText = cache[cacheID];\n\n // Cache response must match the type of the original one\n return client._promise.resolve({\n body: JSON.parse(responseText),\n responseText: responseText\n });\n }\n\n // if we reached max tries\n if (tries >= client.hosts[initialOpts.hostType].length) {\n if (!hasFallback || usingFallback) {\n requestDebug('could not get any response');\n // then stop\n return client._promise.reject(new errors.AlgoliaSearchError(\n 'Cannot connect to the AlgoliaSearch API.' +\n ' Send an email to support@algolia.com to report and resolve the issue.' +\n ' Application id was: ' + client.applicationID, {debugData: debugData}\n ));\n }\n\n requestDebug('switching to fallback');\n\n // let's try the fallback starting from here\n tries = 0;\n\n // method, url and body are fallback dependent\n reqOpts.method = initialOpts.fallback.method;\n reqOpts.url = initialOpts.fallback.url;\n reqOpts.jsonBody = initialOpts.fallback.body;\n if (reqOpts.jsonBody) {\n reqOpts.body = safeJSONStringify(reqOpts.jsonBody);\n }\n // re-compute headers, they could be omitting the API KEY\n headers = client._computeRequestHeaders({\n additionalUA: additionalUA,\n headers: initialOpts.headers\n });\n\n reqOpts.timeouts = client._getTimeoutsForRequest(initialOpts.hostType);\n client._setHostIndexByType(0, initialOpts.hostType);\n usingFallback = true; // the current request is now using fallback\n return doRequest(client._request.fallback, reqOpts);\n }\n\n var currentHost = client._getHostByType(initialOpts.hostType);\n\n var url = currentHost + reqOpts.url;\n var options = {\n body: reqOpts.body,\n jsonBody: reqOpts.jsonBody,\n method: reqOpts.method,\n headers: headers,\n timeouts: reqOpts.timeouts,\n debug: requestDebug,\n forceAuthHeaders: reqOpts.forceAuthHeaders\n };\n\n requestDebug('method: %s, url: %s, headers: %j, timeouts: %d',\n options.method, url, options.headers, options.timeouts);\n\n if (requester === client._request.fallback) {\n requestDebug('using fallback');\n }\n\n // `requester` is any of this._request or this._request.fallback\n // thus it needs to be called using the client as context\n return requester.call(client, url, options).then(success, tryFallback);\n\n function success(httpResponse) {\n // compute the status of the response,\n //\n // When in browser mode, using XDR or JSONP, we have no statusCode available\n // So we rely on our API response `status` property.\n // But `waitTask` can set a `status` property which is not the statusCode (it's the task status)\n // So we check if there's a `message` along `status` and it means it's an error\n //\n // That's the only case where we have a response.status that's not the http statusCode\n var status = httpResponse && httpResponse.body && httpResponse.body.message && httpResponse.body.status ||\n\n // this is important to check the request statusCode AFTER the body eventual\n // statusCode because some implementations (jQuery XDomainRequest transport) may\n // send statusCode 200 while we had an error\n httpResponse.statusCode ||\n\n // When in browser mode, using XDR or JSONP\n // we default to success when no error (no response.status && response.message)\n // If there was a JSON.parse() error then body is null and it fails\n httpResponse && httpResponse.body && 200;\n\n requestDebug('received response: statusCode: %s, computed statusCode: %d, headers: %j',\n httpResponse.statusCode, status, httpResponse.headers);\n\n var httpResponseOk = Math.floor(status / 100) === 2;\n\n var endTime = new Date();\n debugData.push({\n currentHost: currentHost,\n headers: removeCredentials(headers),\n content: body || null,\n contentLength: body !== undefined ? body.length : null,\n method: reqOpts.method,\n timeouts: reqOpts.timeouts,\n url: reqOpts.url,\n startTime: startTime,\n endTime: endTime,\n duration: endTime - startTime,\n statusCode: status\n });\n\n if (httpResponseOk) {\n if (client._useCache && !client._useRequestCache && cache) {\n cache[cacheID] = httpResponse.responseText;\n }\n\n return {\n responseText: httpResponse.responseText,\n body: httpResponse.body\n };\n }\n\n var shouldRetry = Math.floor(status / 100) !== 4;\n\n if (shouldRetry) {\n tries += 1;\n return retryRequest();\n }\n\n requestDebug('unrecoverable error');\n\n // no success and no retry => fail\n var unrecoverableError = new errors.AlgoliaSearchError(\n httpResponse.body && httpResponse.body.message, {debugData: debugData, statusCode: status}\n );\n\n return client._promise.reject(unrecoverableError);\n }\n\n function tryFallback(err) {\n // error cases:\n // While not in fallback mode:\n // - CORS not supported\n // - network error\n // While in fallback mode:\n // - timeout\n // - network error\n // - badly formatted JSONP (script loaded, did not call our callback)\n // In both cases:\n // - uncaught exception occurs (TypeError)\n requestDebug('error: %s, stack: %s', err.message, err.stack);\n\n var endTime = new Date();\n debugData.push({\n currentHost: currentHost,\n headers: removeCredentials(headers),\n content: body || null,\n contentLength: body !== undefined ? body.length : null,\n method: reqOpts.method,\n timeouts: reqOpts.timeouts,\n url: reqOpts.url,\n startTime: startTime,\n endTime: endTime,\n duration: endTime - startTime\n });\n\n if (!(err instanceof errors.AlgoliaSearchError)) {\n err = new errors.Unknown(err && err.message, err);\n }\n\n tries += 1;\n\n // stop the request implementation when:\n if (\n // we did not generate this error,\n // it comes from a throw in some other piece of code\n err instanceof errors.Unknown ||\n\n // server sent unparsable JSON\n err instanceof errors.UnparsableJSON ||\n\n // max tries and already using fallback or no fallback\n tries >= client.hosts[initialOpts.hostType].length &&\n (usingFallback || !hasFallback)) {\n // stop request implementation for this command\n err.debugData = debugData;\n return client._promise.reject(err);\n }\n\n // When a timeout occurred, retry by raising timeout\n if (err instanceof errors.RequestTimeout) {\n return retryRequestWithHigherTimeout();\n }\n\n return retryRequest();\n }\n\n function retryRequest() {\n requestDebug('retrying request');\n client._incrementHostIndex(initialOpts.hostType);\n return doRequest(requester, reqOpts);\n }\n\n function retryRequestWithHigherTimeout() {\n requestDebug('retrying request with higher timeout');\n client._incrementHostIndex(initialOpts.hostType);\n client._incrementTimeoutMultipler();\n reqOpts.timeouts = client._getTimeoutsForRequest(initialOpts.hostType);\n return doRequest(requester, reqOpts);\n }\n }\n\n function isCacheValidWithCurrentID(\n useRequestCache,\n currentCache,\n currentCacheID\n ) {\n return (\n client._useCache &&\n useRequestCache &&\n currentCache &&\n currentCache[currentCacheID] !== undefined\n );\n }\n\n\n function interopCallbackReturn(request, callback) {\n if (isCacheValidWithCurrentID(client._useRequestCache, cache, cacheID)) {\n request.catch(function() {\n // Release the cache on error\n delete cache[cacheID];\n });\n }\n\n if (typeof initialOpts.callback === 'function') {\n // either we have a callback\n request.then(function okCb(content) {\n exitPromise(function() {\n initialOpts.callback(null, callback(content));\n }, client._setTimeout || setTimeout);\n }, function nookCb(err) {\n exitPromise(function() {\n initialOpts.callback(err);\n }, client._setTimeout || setTimeout);\n });\n } else {\n // either we are using promises\n return request.then(callback);\n }\n }\n\n if (client._useCache && client._useRequestCache) {\n cacheID = initialOpts.url;\n }\n\n // as we sometime use POST requests to pass parameters (like query='aa'),\n // the cacheID must also include the body to be different between calls\n if (client._useCache && client._useRequestCache && body) {\n cacheID += '_body_' + body;\n }\n\n if (isCacheValidWithCurrentID(client._useRequestCache, cache, cacheID)) {\n requestDebug('serving request from cache');\n\n var maybePromiseForCache = cache[cacheID];\n\n // In case the cache is warmup with value that is not a promise\n var promiseForCache = typeof maybePromiseForCache.then !== 'function'\n ? client._promise.resolve({responseText: maybePromiseForCache})\n : maybePromiseForCache;\n\n return interopCallbackReturn(promiseForCache, function(content) {\n // In case of the cache request, return the original value\n return JSON.parse(content.responseText);\n });\n }\n\n var request = doRequest(\n client._request, {\n url: initialOpts.url,\n method: initialOpts.method,\n body: body,\n jsonBody: initialOpts.body,\n timeouts: client._getTimeoutsForRequest(initialOpts.hostType),\n forceAuthHeaders: initialOpts.forceAuthHeaders\n }\n );\n\n if (client._useCache && client._useRequestCache && cache) {\n cache[cacheID] = request;\n }\n\n return interopCallbackReturn(request, function(content) {\n // In case of the first request, return the JSON value\n return content.body;\n });\n};\n\n/*\n* Transform search param object in query string\n* @param {object} args arguments to add to the current query string\n* @param {string} params current query string\n* @return {string} the final query string\n*/\nAlgoliaSearchCore.prototype._getSearchParams = function(args, params) {\n if (args === undefined || args === null) {\n return params;\n }\n for (var key in args) {\n if (key !== null && args[key] !== undefined && args.hasOwnProperty(key)) {\n params += params === '' ? '' : '&';\n params += key + '=' + encodeURIComponent(Object.prototype.toString.call(args[key]) === '[object Array]' ? safeJSONStringify(args[key]) : args[key]);\n }\n }\n return params;\n};\n\n/**\n * Compute the headers for a request\n *\n * @param [string] options.additionalUA semi-colon separated string with other user agents to add\n * @param [boolean=true] options.withApiKey Send the api key as a header\n * @param [Object] options.headers Extra headers to send\n */\nAlgoliaSearchCore.prototype._computeRequestHeaders = function(options) {\n var forEach = require(5);\n\n var ua = options.additionalUA ?\n this._ua + '; ' + options.additionalUA :\n this._ua;\n\n var requestHeaders = {\n 'x-algolia-agent': ua,\n 'x-algolia-application-id': this.applicationID\n };\n\n // browser will inline headers in the url, node.js will use http headers\n // but in some situations, the API KEY will be too long (big secured API keys)\n // so if the request is a POST and the KEY is very long, we will be asked to not put\n // it into headers but in the JSON body\n if (options.withApiKey !== false) {\n requestHeaders['x-algolia-api-key'] = this.apiKey;\n }\n\n if (this.userToken) {\n requestHeaders['x-algolia-usertoken'] = this.userToken;\n }\n\n if (this.securityTags) {\n requestHeaders['x-algolia-tagfilters'] = this.securityTags;\n }\n\n forEach(this.extraHeaders, function addToRequestHeaders(value, key) {\n requestHeaders[key] = value;\n });\n\n if (options.headers) {\n forEach(options.headers, function addToRequestHeaders(value, key) {\n requestHeaders[key] = value;\n });\n }\n\n return requestHeaders;\n};\n\n/**\n * Search through multiple indices at the same time\n * @param {Object[]} queries An array of queries you want to run.\n * @param {string} queries[].indexName The index name you want to target\n * @param {string} [queries[].query] The query to issue on this index. Can also be passed into `params`\n * @param {Object} queries[].params Any search param like hitsPerPage, ..\n * @param {Function} callback Callback to be called\n * @return {Promise|undefined} Returns a promise if no callback given\n */\nAlgoliaSearchCore.prototype.search = function(queries, opts, callback) {\n var isArray = require(8);\n var map = require(32);\n\n var usage = 'Usage: client.search(arrayOfQueries[, callback])';\n\n if (!isArray(queries)) {\n throw new Error(usage);\n }\n\n if (typeof opts === 'function') {\n callback = opts;\n opts = {};\n } else if (opts === undefined) {\n opts = {};\n }\n\n var client = this;\n\n var postObj = {\n requests: map(queries, function prepareRequest(query) {\n var params = '';\n\n // allow query.query\n // so we are mimicing the index.search(query, params) method\n // {indexName:, query:, params:}\n if (query.query !== undefined) {\n params += 'query=' + encodeURIComponent(query.query);\n }\n\n return {\n indexName: query.indexName,\n params: client._getSearchParams(query.params, params)\n };\n })\n };\n\n var JSONPParams = map(postObj.requests, function prepareJSONPParams(request, requestId) {\n return requestId + '=' +\n encodeURIComponent(\n '/1/indexes/' + encodeURIComponent(request.indexName) + '?' +\n request.params\n );\n }).join('&');\n\n var url = '/1/indexes/*/queries';\n\n if (opts.strategy !== undefined) {\n postObj.strategy = opts.strategy;\n }\n\n return this._jsonRequest({\n cache: this.cache,\n method: 'POST',\n url: url,\n body: postObj,\n hostType: 'read',\n fallback: {\n method: 'GET',\n url: '/1/indexes/*',\n body: {\n params: JSONPParams\n }\n },\n callback: callback\n });\n};\n\n/**\n* Search for facet values\n* https://www.algolia.com/doc/rest-api/search#search-for-facet-values\n* This is the top-level API for SFFV.\n*\n* @param {object[]} queries An array of queries to run.\n* @param {string} queries[].indexName Index name, name of the index to search.\n* @param {object} queries[].params Query parameters.\n* @param {string} queries[].params.facetName Facet name, name of the attribute to search for values in.\n* Must be declared as a facet\n* @param {string} queries[].params.facetQuery Query for the facet search\n* @param {string} [queries[].params.*] Any search parameter of Algolia,\n* see https://www.algolia.com/doc/api-client/javascript/search#search-parameters\n* Pagination is not supported. The page and hitsPerPage parameters will be ignored.\n*/\nAlgoliaSearchCore.prototype.searchForFacetValues = function(queries) {\n var isArray = require(8);\n var map = require(32);\n\n var usage = 'Usage: client.searchForFacetValues([{indexName, params: {facetName, facetQuery, ...params}}, ...queries])'; // eslint-disable-line max-len\n\n if (!isArray(queries)) {\n throw new Error(usage);\n }\n\n var client = this;\n\n return client._promise.all(map(queries, function performQuery(query) {\n if (\n !query ||\n query.indexName === undefined ||\n query.params.facetName === undefined ||\n query.params.facetQuery === undefined\n ) {\n throw new Error(usage);\n }\n\n var clone = require(26);\n var omit = require(34);\n\n var indexName = query.indexName;\n var params = query.params;\n\n var facetName = params.facetName;\n var filteredParams = omit(clone(params), function(keyName) {\n return keyName === 'facetName';\n });\n var searchParameters = client._getSearchParams(filteredParams, '');\n\n return client._jsonRequest({\n cache: client.cache,\n method: 'POST',\n url:\n '/1/indexes/' +\n encodeURIComponent(indexName) +\n '/facets/' +\n encodeURIComponent(facetName) +\n '/query',\n hostType: 'read',\n body: {params: searchParameters}\n });\n }));\n};\n\n/**\n * Set the extra security tagFilters header\n * @param {string|array} tags The list of tags defining the current security filters\n */\nAlgoliaSearchCore.prototype.setSecurityTags = function(tags) {\n if (Object.prototype.toString.call(tags) === '[object Array]') {\n var strTags = [];\n for (var i = 0; i < tags.length; ++i) {\n if (Object.prototype.toString.call(tags[i]) === '[object Array]') {\n var oredTags = [];\n for (var j = 0; j < tags[i].length; ++j) {\n oredTags.push(tags[i][j]);\n }\n strTags.push('(' + oredTags.join(',') + ')');\n } else {\n strTags.push(tags[i]);\n }\n }\n tags = strTags.join(',');\n }\n\n this.securityTags = tags;\n};\n\n/**\n * Set the extra user token header\n * @param {string} userToken The token identifying a uniq user (used to apply rate limits)\n */\nAlgoliaSearchCore.prototype.setUserToken = function(userToken) {\n this.userToken = userToken;\n};\n\n/**\n * Clear all queries in client's cache\n * @return undefined\n */\nAlgoliaSearchCore.prototype.clearCache = function() {\n this.cache = {};\n};\n\n/**\n* Set the number of milliseconds a request can take before automatically being terminated.\n* @deprecated\n* @param {Number} milliseconds\n*/\nAlgoliaSearchCore.prototype.setRequestTimeout = function(milliseconds) {\n if (milliseconds) {\n this._timeouts.connect = this._timeouts.read = this._timeouts.write = milliseconds;\n }\n};\n\n/**\n* Set the three different (connect, read, write) timeouts to be used when requesting\n* @param {Object} timeouts\n*/\nAlgoliaSearchCore.prototype.setTimeouts = function(timeouts) {\n this._timeouts = timeouts;\n};\n\n/**\n* Get the three different (connect, read, write) timeouts to be used when requesting\n* @param {Object} timeouts\n*/\nAlgoliaSearchCore.prototype.getTimeouts = function() {\n return this._timeouts;\n};\n\nAlgoliaSearchCore.prototype._getAppIdData = function() {\n var data = store.get(this.applicationID);\n if (data !== null) this._cacheAppIdData(data);\n return data;\n};\n\nAlgoliaSearchCore.prototype._setAppIdData = function(data) {\n data.lastChange = (new Date()).getTime();\n this._cacheAppIdData(data);\n return store.set(this.applicationID, data);\n};\n\nAlgoliaSearchCore.prototype._checkAppIdData = function() {\n var data = this._getAppIdData();\n var now = (new Date()).getTime();\n if (data === null || now - data.lastChange > RESET_APP_DATA_TIMER) {\n return this._resetInitialAppIdData(data);\n }\n\n return data;\n};\n\nAlgoliaSearchCore.prototype._resetInitialAppIdData = function(data) {\n var newData = data || {};\n newData.hostIndexes = {read: 0, write: 0};\n newData.timeoutMultiplier = 1;\n newData.shuffleResult = newData.shuffleResult || shuffle([1, 2, 3]);\n return this._setAppIdData(newData);\n};\n\nAlgoliaSearchCore.prototype._cacheAppIdData = function(data) {\n this._hostIndexes = data.hostIndexes;\n this._timeoutMultiplier = data.timeoutMultiplier;\n this._shuffleResult = data.shuffleResult;\n};\n\nAlgoliaSearchCore.prototype._partialAppIdDataUpdate = function(newData) {\n var foreach = require(5);\n var currentData = this._getAppIdData();\n foreach(newData, function(value, key) {\n currentData[key] = value;\n });\n\n return this._setAppIdData(currentData);\n};\n\nAlgoliaSearchCore.prototype._getHostByType = function(hostType) {\n return this.hosts[hostType][this._getHostIndexByType(hostType)];\n};\n\nAlgoliaSearchCore.prototype._getTimeoutMultiplier = function() {\n return this._timeoutMultiplier;\n};\n\nAlgoliaSearchCore.prototype._getHostIndexByType = function(hostType) {\n return this._hostIndexes[hostType];\n};\n\nAlgoliaSearchCore.prototype._setHostIndexByType = function(hostIndex, hostType) {\n var clone = require(26);\n var newHostIndexes = clone(this._hostIndexes);\n newHostIndexes[hostType] = hostIndex;\n this._partialAppIdDataUpdate({hostIndexes: newHostIndexes});\n return hostIndex;\n};\n\nAlgoliaSearchCore.prototype._incrementHostIndex = function(hostType) {\n return this._setHostIndexByType(\n (this._getHostIndexByType(hostType) + 1) % this.hosts[hostType].length, hostType\n );\n};\n\nAlgoliaSearchCore.prototype._incrementTimeoutMultipler = function() {\n var timeoutMultiplier = Math.max(this._timeoutMultiplier + 1, 4);\n return this._partialAppIdDataUpdate({timeoutMultiplier: timeoutMultiplier});\n};\n\nAlgoliaSearchCore.prototype._getTimeoutsForRequest = function(hostType) {\n return {\n connect: this._timeouts.connect * this._timeoutMultiplier,\n complete: this._timeouts[hostType] * this._timeoutMultiplier\n };\n};\n\nfunction prepareHost(protocol) {\n return function prepare(host) {\n return protocol + '//' + host.toLowerCase();\n };\n}\n\n// Prototype.js < 1.7, a widely used library, defines a weird\n// Array.prototype.toJSON function that will fail to stringify our content\n// appropriately\n// refs:\n// - https://groups.google.com/forum/#!topic/prototype-core/E-SAVvV_V9Q\n// - https://github.com/sstephenson/prototype/commit/038a2985a70593c1a86c230fadbdfe2e4898a48c\n// - http://stackoverflow.com/a/3148441/147079\nfunction safeJSONStringify(obj) {\n /* eslint no-extend-native:0 */\n\n if (Array.prototype.toJSON === undefined) {\n return JSON.stringify(obj);\n }\n\n var toJSON = Array.prototype.toJSON;\n delete Array.prototype.toJSON;\n var out = JSON.stringify(obj);\n Array.prototype.toJSON = toJSON;\n\n return out;\n}\n\nfunction shuffle(array) {\n var currentIndex = array.length;\n var temporaryValue;\n var randomIndex;\n\n // While there remain elements to shuffle...\n while (currentIndex !== 0) {\n // Pick a remaining element...\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n\n // And swap it with the current element.\n temporaryValue = array[currentIndex];\n array[currentIndex] = array[randomIndex];\n array[randomIndex] = temporaryValue;\n }\n\n return array;\n}\n\nfunction removeCredentials(headers) {\n var newHeaders = {};\n\n for (var headerName in headers) {\n if (Object.prototype.hasOwnProperty.call(headers, headerName)) {\n var value;\n\n if (headerName === 'x-algolia-api-key' || headerName === 'x-algolia-application-id') {\n value = '**hidden for security purposes**';\n } else {\n value = headers[headerName];\n }\n\n newHeaders[headerName] = value;\n }\n }\n\n return newHeaders;\n}\n\n}).call(this,require(12))\n},{\"1\":1,\"12\":12,\"20\":20,\"26\":26,\"30\":30,\"31\":31,\"32\":32,\"34\":34,\"36\":36,\"5\":5,\"8\":8}],18:[function(require,module,exports){\nvar inherits = require(7);\nvar IndexCore = require(20);\nvar deprecate = require(28);\nvar deprecatedMessage = require(29);\nvar exitPromise = require(31);\nvar errors = require(30);\n\nvar deprecateForwardToSlaves = deprecate(\n function() {},\n deprecatedMessage('forwardToSlaves', 'forwardToReplicas')\n);\n\nmodule.exports = Index;\n\nfunction Index() {\n IndexCore.apply(this, arguments);\n}\n\ninherits(Index, IndexCore);\n\n/*\n* Add an object in this index\n*\n* @param content contains the javascript object to add inside the index\n* @param objectID (optional) an objectID you want to attribute to this object\n* (if the attribute already exist the old object will be overwrite)\n* @param callback (optional) the result callback called with two arguments:\n* error: null or Error('message')\n* content: the server answer that contains 3 elements: createAt, taskId and objectID\n*/\nIndex.prototype.addObject = function(content, objectID, callback) {\n var indexObj = this;\n\n if (arguments.length === 1 || typeof objectID === 'function') {\n callback = objectID;\n objectID = undefined;\n }\n\n return this.as._jsonRequest({\n method: objectID !== undefined ?\n 'PUT' : // update or create\n 'POST', // create (API generates an objectID)\n url: '/1/indexes/' + encodeURIComponent(indexObj.indexName) + // create\n (objectID !== undefined ? '/' + encodeURIComponent(objectID) : ''), // update or create\n body: content,\n hostType: 'write',\n callback: callback\n });\n};\n\n/*\n* Add several objects\n*\n* @param objects contains an array of objects to add\n* @param callback (optional) the result callback called with two arguments:\n* error: null or Error('message')\n* content: the server answer that updateAt and taskID\n*/\nIndex.prototype.addObjects = function(objects, callback) {\n var isArray = require(8);\n var usage = 'Usage: index.addObjects(arrayOfObjects[, callback])';\n\n if (!isArray(objects)) {\n throw new Error(usage);\n }\n\n var indexObj = this;\n var postObj = {\n requests: []\n };\n for (var i = 0; i < objects.length; ++i) {\n var request = {\n action: 'addObject',\n body: objects[i]\n };\n postObj.requests.push(request);\n }\n return this.as._jsonRequest({\n method: 'POST',\n url: '/1/indexes/' + encodeURIComponent(indexObj.indexName) + '/batch',\n body: postObj,\n hostType: 'write',\n callback: callback\n });\n};\n\n/*\n* Update partially an object (only update attributes passed in argument)\n*\n* @param partialObject contains the javascript attributes to override, the\n* object must contains an objectID attribute\n* @param createIfNotExists (optional) if false, avoid an automatic creation of the object\n* @param callback (optional) the result callback called with two arguments:\n* error: null or Error('message')\n* content: the server answer that contains 3 elements: createAt, taskId and objectID\n*/\nIndex.prototype.partialUpdateObject = function(partialObject, createIfNotExists, callback) {\n if (arguments.length === 1 || typeof createIfNotExists === 'function') {\n callback = createIfNotExists;\n createIfNotExists = undefined;\n }\n\n var indexObj = this;\n var url = '/1/indexes/' + encodeURIComponent(indexObj.indexName) + '/' + encodeURIComponent(partialObject.objectID) + '/partial';\n if (createIfNotExists === false) {\n url += '?createIfNotExists=false';\n }\n\n return this.as._jsonRequest({\n method: 'POST',\n url: url,\n body: partialObject,\n hostType: 'write',\n callback: callback\n });\n};\n\n/*\n* Partially Override the content of several objects\n*\n* @param objects contains an array of objects to update (each object must contains a objectID attribute)\n* @param callback (optional) the result callback called with two arguments:\n* error: null or Error('message')\n* content: the server answer that updateAt and taskID\n*/\nIndex.prototype.partialUpdateObjects = function(objects, createIfNotExists, callback) {\n if (arguments.length === 1 || typeof createIfNotExists === 'function') {\n callback = createIfNotExists;\n createIfNotExists = true;\n }\n\n var isArray = require(8);\n var usage = 'Usage: index.partialUpdateObjects(arrayOfObjects[, callback])';\n\n if (!isArray(objects)) {\n throw new Error(usage);\n }\n\n var indexObj = this;\n var postObj = {\n requests: []\n };\n for (var i = 0; i < objects.length; ++i) {\n var request = {\n action: createIfNotExists === true ? 'partialUpdateObject' : 'partialUpdateObjectNoCreate',\n objectID: objects[i].objectID,\n body: objects[i]\n };\n postObj.requests.push(request);\n }\n return this.as._jsonRequest({\n method: 'POST',\n url: '/1/indexes/' + encodeURIComponent(indexObj.indexName) + '/batch',\n body: postObj,\n hostType: 'write',\n callback: callback\n });\n};\n\n/*\n* Override the content of object\n*\n* @param object contains the javascript object to save, the object must contains an objectID attribute\n* @param callback (optional) the result callback called with two arguments:\n* error: null or Error('message')\n* content: the server answer that updateAt and taskID\n*/\nIndex.prototype.saveObject = function(object, callback) {\n var indexObj = this;\n return this.as._jsonRequest({\n method: 'PUT',\n url: '/1/indexes/' + encodeURIComponent(indexObj.indexName) + '/' + encodeURIComponent(object.objectID),\n body: object,\n hostType: 'write',\n callback: callback\n });\n};\n\n/*\n* Override the content of several objects\n*\n* @param objects contains an array of objects to update (each object must contains a objectID attribute)\n* @param callback (optional) the result callback called with two arguments:\n* error: null or Error('message')\n* content: the server answer that updateAt and taskID\n*/\nIndex.prototype.saveObjects = function(objects, callback) {\n var isArray = require(8);\n var usage = 'Usage: index.saveObjects(arrayOfObjects[, callback])';\n\n if (!isArray(objects)) {\n throw new Error(usage);\n }\n\n var indexObj = this;\n var postObj = {\n requests: []\n };\n for (var i = 0; i < objects.length; ++i) {\n var request = {\n action: 'updateObject',\n objectID: objects[i].objectID,\n body: objects[i]\n };\n postObj.requests.push(request);\n }\n return this.as._jsonRequest({\n method: 'POST',\n url: '/1/indexes/' + encodeURIComponent(indexObj.indexName) + '/batch',\n body: postObj,\n hostType: 'write',\n callback: callback\n });\n};\n\n/*\n* Delete an object from the index\n*\n* @param objectID the unique identifier of object to delete\n* @param callback (optional) the result callback called with two arguments:\n* error: null or Error('message')\n* content: the server answer that contains 3 elements: createAt, taskId and objectID\n*/\nIndex.prototype.deleteObject = function(objectID, callback) {\n if (typeof objectID === 'function' || typeof objectID !== 'string' && typeof objectID !== 'number') {\n var err = new errors.AlgoliaSearchError(\n objectID && typeof objectID !== 'function'\n ? 'ObjectID must be a string'\n : 'Cannot delete an object without an objectID'\n );\n callback = objectID;\n if (typeof callback === 'function') {\n return callback(err);\n }\n\n return this.as._promise.reject(err);\n }\n\n var indexObj = this;\n return this.as._jsonRequest({\n method: 'DELETE',\n url: '/1/indexes/' + encodeURIComponent(indexObj.indexName) + '/' + encodeURIComponent(objectID),\n hostType: 'write',\n callback: callback\n });\n};\n\n/*\n* Delete several objects from an index\n*\n* @param objectIDs contains an array of objectID to delete\n* @param callback (optional) the result callback called with two arguments:\n* error: null or Error('message')\n* content: the server answer that contains 3 elements: createAt, taskId and objectID\n*/\nIndex.prototype.deleteObjects = function(objectIDs, callback) {\n var isArray = require(8);\n var map = require(32);\n\n var usage = 'Usage: index.deleteObjects(arrayOfObjectIDs[, callback])';\n\n if (!isArray(objectIDs)) {\n throw new Error(usage);\n }\n\n var indexObj = this;\n var postObj = {\n requests: map(objectIDs, function prepareRequest(objectID) {\n return {\n action: 'deleteObject',\n objectID: objectID,\n body: {\n objectID: objectID\n }\n };\n })\n };\n\n return this.as._jsonRequest({\n method: 'POST',\n url: '/1/indexes/' + encodeURIComponent(indexObj.indexName) + '/batch',\n body: postObj,\n hostType: 'write',\n callback: callback\n });\n};\n\n/*\n* Delete all objects matching a query\n*\n* @param query the query string\n* @param params the optional query parameters\n* @param callback (optional) the result callback called with one argument\n* error: null or Error('message')\n* @deprecated see index.deleteBy\n*/\nIndex.prototype.deleteByQuery = deprecate(function(query, params, callback) {\n var clone = require(26);\n var map = require(32);\n\n var indexObj = this;\n var client = indexObj.as;\n\n if (arguments.length === 1 || typeof params === 'function') {\n callback = params;\n params = {};\n } else {\n params = clone(params);\n }\n\n params.attributesToRetrieve = 'objectID';\n params.hitsPerPage = 1000;\n params.distinct = false;\n\n // when deleting, we should never use cache to get the\n // search results\n this.clearCache();\n\n // there's a problem in how we use the promise chain,\n // see how waitTask is done\n var promise = this\n .search(query, params)\n .then(stopOrDelete);\n\n function stopOrDelete(searchContent) {\n // stop here\n if (searchContent.nbHits === 0) {\n // return indexObj.as._request.resolve();\n return searchContent;\n }\n\n // continue and do a recursive call\n var objectIDs = map(searchContent.hits, function getObjectID(object) {\n return object.objectID;\n });\n\n return indexObj\n .deleteObjects(objectIDs)\n .then(waitTask)\n .then(doDeleteByQuery);\n }\n\n function waitTask(deleteObjectsContent) {\n return indexObj.waitTask(deleteObjectsContent.taskID);\n }\n\n function doDeleteByQuery() {\n return indexObj.deleteByQuery(query, params);\n }\n\n if (!callback) {\n return promise;\n }\n\n promise.then(success, failure);\n\n function success() {\n exitPromise(function exit() {\n callback(null);\n }, client._setTimeout || setTimeout);\n }\n\n function failure(err) {\n exitPromise(function exit() {\n callback(err);\n }, client._setTimeout || setTimeout);\n }\n}, deprecatedMessage('index.deleteByQuery()', 'index.deleteBy()'));\n\n/**\n* Delete all objects matching a query\n*\n* the query parameters that can be used are:\n* - filters (numeric, facet, tag)\n* - geo\n*\n* you can not send an empty query or filters\n*\n* @param params the optional query parameters\n* @param callback (optional) the result callback called with one argument\n* error: null or Error('message')\n*/\nIndex.prototype.deleteBy = function(params, callback) {\n var indexObj = this;\n return this.as._jsonRequest({\n method: 'POST',\n url: '/1/indexes/' + encodeURIComponent(indexObj.indexName) + '/deleteByQuery',\n body: {params: indexObj.as._getSearchParams(params, '')},\n hostType: 'write',\n callback: callback\n });\n};\n\n/*\n* Browse all content from an index using events. Basically this will do\n* .browse() -> .browseFrom -> .browseFrom -> .. until all the results are returned\n*\n* @param {string} query - The full text query\n* @param {Object} [queryParameters] - Any search query parameter\n* @return {EventEmitter}\n* @example\n* var browser = index.browseAll('cool songs', {\n* tagFilters: 'public,comments',\n* hitsPerPage: 500\n* });\n*\n* browser.on('result', function resultCallback(content) {\n* console.log(content.hits);\n* });\n*\n* // if any error occurs, you get it\n* browser.on('error', function(err) {\n* throw err;\n* });\n*\n* // when you have browsed the whole index, you get this event\n* browser.on('end', function() {\n* console.log('finished');\n* });\n*\n* // at any point if you want to stop the browsing process, you can stop it manually\n* // otherwise it will go on and on\n* browser.stop();\n*\n* @see {@link https://www.algolia.com/doc/rest_api#Browse|Algolia REST API Documentation}\n*/\nIndex.prototype.browseAll = function(query, queryParameters) {\n if (typeof query === 'object') {\n queryParameters = query;\n query = undefined;\n }\n\n var merge = require(33);\n\n var IndexBrowser = require(19);\n\n var browser = new IndexBrowser();\n var client = this.as;\n var index = this;\n var params = client._getSearchParams(\n merge({}, queryParameters || {}, {\n query: query\n }), ''\n );\n\n // start browsing\n browseLoop();\n\n function browseLoop(cursor) {\n if (browser._stopped) {\n return;\n }\n\n var body;\n\n if (cursor !== undefined) {\n body = {\n cursor: cursor\n };\n } else {\n body = {\n params: params\n };\n }\n\n client._jsonRequest({\n method: 'POST',\n url: '/1/indexes/' + encodeURIComponent(index.indexName) + '/browse',\n hostType: 'read',\n body: body,\n callback: browseCallback\n });\n }\n\n function browseCallback(err, content) {\n if (browser._stopped) {\n return;\n }\n\n if (err) {\n browser._error(err);\n return;\n }\n\n browser._result(content);\n\n // no cursor means we are finished browsing\n if (content.cursor === undefined) {\n browser._end();\n return;\n }\n\n browseLoop(content.cursor);\n }\n\n return browser;\n};\n\n/*\n* Get a Typeahead.js adapter\n* @param searchParams contains an object with query parameters (see search for details)\n*/\nIndex.prototype.ttAdapter = deprecate(function(params) {\n var self = this;\n return function ttAdapter(query, syncCb, asyncCb) {\n var cb;\n\n if (typeof asyncCb === 'function') {\n // typeahead 0.11\n cb = asyncCb;\n } else {\n // pre typeahead 0.11\n cb = syncCb;\n }\n\n self.search(query, params, function searchDone(err, content) {\n if (err) {\n cb(err);\n return;\n }\n\n cb(content.hits);\n });\n };\n},\n'ttAdapter is not necessary anymore and will be removed in the next version,\\n' +\n'have a look at autocomplete.js (https://github.com/algolia/autocomplete.js)');\n\n/*\n* Wait the publication of a task on the server.\n* All server task are asynchronous and you can check with this method that the task is published.\n*\n* @param taskID the id of the task returned by server\n* @param callback the result callback with with two arguments:\n* error: null or Error('message')\n* content: the server answer that contains the list of results\n*/\nIndex.prototype.waitTask = function(taskID, callback) {\n // wait minimum 100ms before retrying\n var baseDelay = 100;\n // wait maximum 5s before retrying\n var maxDelay = 5000;\n var loop = 0;\n\n // waitTask() must be handled differently from other methods,\n // it's a recursive method using a timeout\n var indexObj = this;\n var client = indexObj.as;\n\n var promise = retryLoop();\n\n function retryLoop() {\n return client._jsonRequest({\n method: 'GET',\n hostType: 'read',\n url: '/1/indexes/' + encodeURIComponent(indexObj.indexName) + '/task/' + taskID\n }).then(function success(content) {\n loop++;\n var delay = baseDelay * loop * loop;\n if (delay > maxDelay) {\n delay = maxDelay;\n }\n\n if (content.status !== 'published') {\n return client._promise.delay(delay).then(retryLoop);\n }\n\n return content;\n });\n }\n\n if (!callback) {\n return promise;\n }\n\n promise.then(successCb, failureCb);\n\n function successCb(content) {\n exitPromise(function exit() {\n callback(null, content);\n }, client._setTimeout || setTimeout);\n }\n\n function failureCb(err) {\n exitPromise(function exit() {\n callback(err);\n }, client._setTimeout || setTimeout);\n }\n};\n\n/*\n* This function deletes the index content. Settings and index specific API keys are kept untouched.\n*\n* @param callback (optional) the result callback called with two arguments\n* error: null or Error('message')\n* content: the settings object or the error message if a failure occurred\n*/\nIndex.prototype.clearIndex = function(callback) {\n var indexObj = this;\n return this.as._jsonRequest({\n method: 'POST',\n url: '/1/indexes/' + encodeURIComponent(indexObj.indexName) + '/clear',\n hostType: 'write',\n callback: callback\n });\n};\n\n/*\n* Get settings of this index\n*\n* @param opts an object of options to add\n* @param opts.advanced get more settings like nbShards (useful for Enterprise)\n* @param callback (optional) the result callback called with two arguments\n* error: null or Error('message')\n* content: the settings object or the error message if a failure occurred\n*/\nIndex.prototype.getSettings = function(opts, callback) {\n if (arguments.length === 1 && typeof opts === 'function') {\n callback = opts;\n opts = {};\n }\n opts = opts || {};\n\n var indexName = encodeURIComponent(this.indexName);\n return this.as._jsonRequest({\n method: 'GET',\n url:\n '/1/indexes/' +\n indexName +\n '/settings?getVersion=2' +\n (opts.advanced ? '&advanced=' + opts.advanced : ''),\n hostType: 'read',\n callback: callback\n });\n};\n\nIndex.prototype.searchSynonyms = function(params, callback) {\n if (typeof params === 'function') {\n callback = params;\n params = {};\n } else if (params === undefined) {\n params = {};\n }\n\n return this.as._jsonRequest({\n method: 'POST',\n url: '/1/indexes/' + encodeURIComponent(this.indexName) + '/synonyms/search',\n body: params,\n hostType: 'read',\n callback: callback\n });\n};\n\nfunction exportData(method, _hitsPerPage, callback) {\n function search(page, _previous) {\n var options = {\n page: page || 0,\n hitsPerPage: _hitsPerPage || 100\n };\n var previous = _previous || [];\n\n return method(options).then(function(result) {\n var hits = result.hits;\n var nbHits = result.nbHits;\n var current = hits.map(function(s) {\n delete s._highlightResult;\n return s;\n });\n var synonyms = previous.concat(current);\n if (synonyms.length < nbHits) {\n return search(options.page + 1, synonyms);\n }\n return synonyms;\n });\n }\n return search().then(function(data) {\n if (typeof callback === 'function') {\n callback(data);\n return undefined;\n }\n return data;\n });\n}\n\n/**\n * Retrieve all the synonyms in an index\n * @param [number=100] hitsPerPage The amount of synonyms to retrieve per batch\n * @param [function] callback will be called after all synonyms are retrieved\n */\nIndex.prototype.exportSynonyms = function(hitsPerPage, callback) {\n return exportData(this.searchSynonyms.bind(this), hitsPerPage, callback);\n};\n\nIndex.prototype.saveSynonym = function(synonym, opts, callback) {\n if (typeof opts === 'function') {\n callback = opts;\n opts = {};\n } else if (opts === undefined) {\n opts = {};\n }\n\n if (opts.forwardToSlaves !== undefined) deprecateForwardToSlaves();\n var forwardToReplicas = (opts.forwardToSlaves || opts.forwardToReplicas) ? 'true' : 'false';\n\n return this.as._jsonRequest({\n method: 'PUT',\n url: '/1/indexes/' + encodeURIComponent(this.indexName) + '/synonyms/' + encodeURIComponent(synonym.objectID) +\n '?forwardToReplicas=' + forwardToReplicas,\n body: synonym,\n hostType: 'write',\n callback: callback\n });\n};\n\nIndex.prototype.getSynonym = function(objectID, callback) {\n return this.as._jsonRequest({\n method: 'GET',\n url: '/1/indexes/' + encodeURIComponent(this.indexName) + '/synonyms/' + encodeURIComponent(objectID),\n hostType: 'read',\n callback: callback\n });\n};\n\nIndex.prototype.deleteSynonym = function(objectID, opts, callback) {\n if (typeof opts === 'function') {\n callback = opts;\n opts = {};\n } else if (opts === undefined) {\n opts = {};\n }\n\n if (opts.forwardToSlaves !== undefined) deprecateForwardToSlaves();\n var forwardToReplicas = (opts.forwardToSlaves || opts.forwardToReplicas) ? 'true' : 'false';\n\n return this.as._jsonRequest({\n method: 'DELETE',\n url: '/1/indexes/' + encodeURIComponent(this.indexName) + '/synonyms/' + encodeURIComponent(objectID) +\n '?forwardToReplicas=' + forwardToReplicas,\n hostType: 'write',\n callback: callback\n });\n};\n\nIndex.prototype.clearSynonyms = function(opts, callback) {\n if (typeof opts === 'function') {\n callback = opts;\n opts = {};\n } else if (opts === undefined) {\n opts = {};\n }\n\n if (opts.forwardToSlaves !== undefined) deprecateForwardToSlaves();\n var forwardToReplicas = (opts.forwardToSlaves || opts.forwardToReplicas) ? 'true' : 'false';\n\n return this.as._jsonRequest({\n method: 'POST',\n url: '/1/indexes/' + encodeURIComponent(this.indexName) + '/synonyms/clear' +\n '?forwardToReplicas=' + forwardToReplicas,\n hostType: 'write',\n callback: callback\n });\n};\n\nIndex.prototype.batchSynonyms = function(synonyms, opts, callback) {\n if (typeof opts === 'function') {\n callback = opts;\n opts = {};\n } else if (opts === undefined) {\n opts = {};\n }\n\n if (opts.forwardToSlaves !== undefined) deprecateForwardToSlaves();\n var forwardToReplicas = (opts.forwardToSlaves || opts.forwardToReplicas) ? 'true' : 'false';\n\n return this.as._jsonRequest({\n method: 'POST',\n url: '/1/indexes/' + encodeURIComponent(this.indexName) + '/synonyms/batch' +\n '?forwardToReplicas=' + forwardToReplicas +\n '&replaceExistingSynonyms=' + (opts.replaceExistingSynonyms ? 'true' : 'false'),\n hostType: 'write',\n body: synonyms,\n callback: callback\n });\n};\n\nIndex.prototype.searchRules = function(params, callback) {\n if (typeof params === 'function') {\n callback = params;\n params = {};\n } else if (params === undefined) {\n params = {};\n }\n\n return this.as._jsonRequest({\n method: 'POST',\n url: '/1/indexes/' + encodeURIComponent(this.indexName) + '/rules/search',\n body: params,\n hostType: 'read',\n callback: callback\n });\n};\n/**\n * Retrieve all the query rules in an index\n * @param [number=100] hitsPerPage The amount of query rules to retrieve per batch\n * @param [function] callback will be called after all query rules are retrieved\n * error: null or Error('message')\n */\nIndex.prototype.exportRules = function(hitsPerPage, callback) {\n return exportData(this.searchRules.bind(this), hitsPerPage, callback);\n};\n\nIndex.prototype.saveRule = function(rule, opts, callback) {\n if (typeof opts === 'function') {\n callback = opts;\n opts = {};\n } else if (opts === undefined) {\n opts = {};\n }\n\n if (!rule.objectID) {\n throw new errors.AlgoliaSearchError('Missing or empty objectID field for rule');\n }\n\n var forwardToReplicas = opts.forwardToReplicas === true ? 'true' : 'false';\n\n return this.as._jsonRequest({\n method: 'PUT',\n url: '/1/indexes/' + encodeURIComponent(this.indexName) + '/rules/' + encodeURIComponent(rule.objectID) +\n '?forwardToReplicas=' + forwardToReplicas,\n body: rule,\n hostType: 'write',\n callback: callback\n });\n};\n\nIndex.prototype.getRule = function(objectID, callback) {\n return this.as._jsonRequest({\n method: 'GET',\n url: '/1/indexes/' + encodeURIComponent(this.indexName) + '/rules/' + encodeURIComponent(objectID),\n hostType: 'read',\n callback: callback\n });\n};\n\nIndex.prototype.deleteRule = function(objectID, opts, callback) {\n if (typeof opts === 'function') {\n callback = opts;\n opts = {};\n } else if (opts === undefined) {\n opts = {};\n }\n\n var forwardToReplicas = opts.forwardToReplicas === true ? 'true' : 'false';\n\n return this.as._jsonRequest({\n method: 'DELETE',\n url: '/1/indexes/' + encodeURIComponent(this.indexName) + '/rules/' + encodeURIComponent(objectID) +\n '?forwardToReplicas=' + forwardToReplicas,\n hostType: 'write',\n callback: callback\n });\n};\n\nIndex.prototype.clearRules = function(opts, callback) {\n if (typeof opts === 'function') {\n callback = opts;\n opts = {};\n } else if (opts === undefined) {\n opts = {};\n }\n\n var forwardToReplicas = opts.forwardToReplicas === true ? 'true' : 'false';\n\n return this.as._jsonRequest({\n method: 'POST',\n url: '/1/indexes/' + encodeURIComponent(this.indexName) + '/rules/clear' +\n '?forwardToReplicas=' + forwardToReplicas,\n hostType: 'write',\n callback: callback\n });\n};\n\nIndex.prototype.batchRules = function(rules, opts, callback) {\n if (typeof opts === 'function') {\n callback = opts;\n opts = {};\n } else if (opts === undefined) {\n opts = {};\n }\n\n var forwardToReplicas = opts.forwardToReplicas === true ? 'true' : 'false';\n\n return this.as._jsonRequest({\n method: 'POST',\n url: '/1/indexes/' + encodeURIComponent(this.indexName) + '/rules/batch' +\n '?forwardToReplicas=' + forwardToReplicas +\n '&clearExistingRules=' + (opts.clearExistingRules === true ? 'true' : 'false'),\n hostType: 'write',\n body: rules,\n callback: callback\n });\n};\n\nIndex.prototype.exists = function(callback) {\n var result = this.getSettings().then(function() {\n return true;\n }).catch(function(err) {\n if (err instanceof errors.AlgoliaSearchError && err.statusCode === 404) {\n return false;\n }\n\n throw err;\n });\n\n if (typeof callback !== 'function') {\n return result;\n }\n\n result.then(function(res) {\n callback(null, res);\n }).catch(function(err) {\n callback(err);\n });\n};\n\nIndex.prototype.findObject = function(findCallback, requestOptions, callback) {\n requestOptions = requestOptions === undefined ? {} : requestOptions;\n var paginate = requestOptions.paginate !== undefined ? requestOptions.paginate : true;\n var query = requestOptions.query !== undefined ? requestOptions.query : '';\n\n var that = this;\n var page = 0;\n\n var paginateLoop = function() {\n requestOptions.page = page;\n\n return that.search(query, requestOptions).then(function(result) {\n var hits = result.hits;\n\n for (var position = 0; position < hits.length; position++) {\n var hit = hits[position];\n if (findCallback(hit)) {\n return {\n object: hit,\n position: position,\n page: page\n };\n }\n }\n\n page += 1;\n\n // paginate if option was set and has next page\n if (!paginate || page >= result.nbPages) {\n throw new errors.ObjectNotFound('Object not found');\n }\n\n return paginateLoop();\n });\n };\n\n var promise = paginateLoop(page);\n\n if (callback === undefined) {\n return promise;\n }\n\n promise\n .then(function(res) {\n callback(null, res);\n })\n .catch(function(err) {\n callback(err);\n });\n};\n\nIndex.prototype.getObjectPosition = function(result, objectID) {\n var hits = result.hits;\n\n for (var position = 0; position < hits.length; position++) {\n if (hits[position].objectID === objectID) {\n return position;\n }\n }\n\n return -1;\n};\n\n/*\n* Set settings for this index\n*\n* @param settings the settings object that can contains :\n* - minWordSizefor1Typo: (integer) the minimum number of characters to accept one typo (default = 3).\n* - minWordSizefor2Typos: (integer) the minimum number of characters to accept two typos (default = 7).\n* - hitsPerPage: (integer) the number of hits per page (default = 10).\n* - attributesToRetrieve: (array of strings) default list of attributes to retrieve in objects.\n* If set to null, all attributes are retrieved.\n* - attributesToHighlight: (array of strings) default list of attributes to highlight.\n* If set to null, all indexed attributes are highlighted.\n* - attributesToSnippet**: (array of strings) default list of attributes to snippet alongside the number\n* of words to return (syntax is attributeName:nbWords).\n* By default no snippet is computed. If set to null, no snippet is computed.\n* - attributesToIndex: (array of strings) the list of fields you want to index.\n* If set to null, all textual and numerical attributes of your objects are indexed,\n* but you should update it to get optimal results.\n* This parameter has two important uses:\n* - Limit the attributes to index: For example if you store a binary image in base64,\n* you want to store it and be able to\n* retrieve it but you don't want to search in the base64 string.\n* - Control part of the ranking*: (see the ranking parameter for full explanation)\n* Matches in attributes at the beginning of\n* the list will be considered more important than matches in attributes further down the list.\n* In one attribute, matching text at the beginning of the attribute will be\n* considered more important than text after, you can disable\n* this behavior if you add your attribute inside `unordered(AttributeName)`,\n* for example attributesToIndex: [\"title\", \"unordered(text)\"].\n* - attributesForFaceting: (array of strings) The list of fields you want to use for faceting.\n* All strings in the attribute selected for faceting are extracted and added as a facet.\n* If set to null, no attribute is used for faceting.\n* - attributeForDistinct: (string) The attribute name used for the Distinct feature.\n* This feature is similar to the SQL \"distinct\" keyword: when enabled\n* in query with the distinct=1 parameter, all hits containing a duplicate\n* value for this attribute are removed from results.\n* For example, if the chosen attribute is show_name and several hits have\n* the same value for show_name, then only the best one is kept and others are removed.\n* - ranking: (array of strings) controls the way results are sorted.\n* We have six available criteria:\n* - typo: sort according to number of typos,\n* - geo: sort according to decreassing distance when performing a geo-location based search,\n* - proximity: sort according to the proximity of query words in hits,\n* - attribute: sort according to the order of attributes defined by attributesToIndex,\n* - exact:\n* - if the user query contains one word: sort objects having an attribute\n* that is exactly the query word before others.\n* For example if you search for the \"V\" TV show, you want to find it\n* with the \"V\" query and avoid to have all popular TV\n* show starting by the v letter before it.\n* - if the user query contains multiple words: sort according to the\n* number of words that matched exactly (and not as a prefix).\n* - custom: sort according to a user defined formula set in **customRanking** attribute.\n* The standard order is [\"typo\", \"geo\", \"proximity\", \"attribute\", \"exact\", \"custom\"]\n* - customRanking: (array of strings) lets you specify part of the ranking.\n* The syntax of this condition is an array of strings containing attributes\n* prefixed by asc (ascending order) or desc (descending order) operator.\n* For example `\"customRanking\" => [\"desc(population)\", \"asc(name)\"]`\n* - queryType: Select how the query words are interpreted, it can be one of the following value:\n* - prefixAll: all query words are interpreted as prefixes,\n* - prefixLast: only the last word is interpreted as a prefix (default behavior),\n* - prefixNone: no query word is interpreted as a prefix. This option is not recommended.\n* - highlightPreTag: (string) Specify the string that is inserted before\n* the highlighted parts in the query result (default to \"<em>\").\n* - highlightPostTag: (string) Specify the string that is inserted after\n* the highlighted parts in the query result (default to \"</em>\").\n* - optionalWords: (array of strings) Specify a list of words that should\n* be considered as optional when found in the query.\n* @param callback (optional) the result callback called with two arguments\n* error: null or Error('message')\n* content: the server answer or the error message if a failure occurred\n*/\nIndex.prototype.setSettings = function(settings, opts, callback) {\n if (arguments.length === 1 || typeof opts === 'function') {\n callback = opts;\n opts = {};\n }\n\n if (opts.forwardToSlaves !== undefined) deprecateForwardToSlaves();\n var forwardToReplicas = (opts.forwardToSlaves || opts.forwardToReplicas) ? 'true' : 'false';\n\n var indexObj = this;\n return this.as._jsonRequest({\n method: 'PUT',\n url: '/1/indexes/' + encodeURIComponent(indexObj.indexName) + '/settings?forwardToReplicas='\n + forwardToReplicas,\n hostType: 'write',\n body: settings,\n callback: callback\n });\n};\n\n/*\n* @deprecated see client.listApiKeys()\n*/\nIndex.prototype.listUserKeys = deprecate(function(callback) {\n return this.listApiKeys(callback);\n}, deprecatedMessage('index.listUserKeys()', 'client.listApiKeys()'));\n\n/*\n* List all existing API keys to this index\n*\n* @param callback the result callback called with two arguments\n* error: null or Error('message')\n* content: the server answer with API keys belonging to the index\n*\n* @deprecated see client.listApiKeys()\n*/\nIndex.prototype.listApiKeys = deprecate(function(callback) {\n var indexObj = this;\n return this.as._jsonRequest({\n method: 'GET',\n url: '/1/indexes/' + encodeURIComponent(indexObj.indexName) + '/keys',\n hostType: 'read',\n callback: callback\n });\n}, deprecatedMessage('index.listApiKeys()', 'client.listApiKeys()'));\n\n/*\n* @deprecated see client.getApiKey()\n*/\nIndex.prototype.getUserKeyACL = deprecate(function(key, callback) {\n return this.getApiKey(key, callback);\n}, deprecatedMessage('index.getUserKeyACL()', 'client.getApiKey()'));\n\n\n/*\n* Get an API key from this index\n*\n* @param key\n* @param callback the result callback called with two arguments\n* error: null or Error('message')\n* content: the server answer with the right API key\n*\n* @deprecated see client.getApiKey()\n*/\nIndex.prototype.getApiKey = deprecate(function(key, callback) {\n var indexObj = this;\n return this.as._jsonRequest({\n method: 'GET',\n url: '/1/indexes/' + encodeURIComponent(indexObj.indexName) + '/keys/' + key,\n hostType: 'read',\n callback: callback\n });\n}, deprecatedMessage('index.getApiKey()', 'client.getApiKey()'));\n\n/*\n* @deprecated see client.deleteApiKey()\n*/\nIndex.prototype.deleteUserKey = deprecate(function(key, callback) {\n return this.deleteApiKey(key, callback);\n}, deprecatedMessage('index.deleteUserKey()', 'client.deleteApiKey()'));\n\n/*\n* Delete an existing API key associated to this index\n*\n* @param key\n* @param callback the result callback called with two arguments\n* error: null or Error('message')\n* content: the server answer with the deletion date\n*\n* @deprecated see client.deleteApiKey()\n*/\nIndex.prototype.deleteApiKey = deprecate(function(key, callback) {\n var indexObj = this;\n return this.as._jsonRequest({\n method: 'DELETE',\n url: '/1/indexes/' + encodeURIComponent(indexObj.indexName) + '/keys/' + key,\n hostType: 'write',\n callback: callback\n });\n}, deprecatedMessage('index.deleteApiKey()', 'client.deleteApiKey()'));\n\n/*\n* @deprecated see client.addApiKey()\n*/\nIndex.prototype.addUserKey = deprecate(function(acls, params, callback) {\n return this.addApiKey(acls, params, callback);\n}, deprecatedMessage('index.addUserKey()', 'client.addApiKey()'));\n\n/*\n* Add a new API key to this index\n*\n* @param {string[]} acls - The list of ACL for this key. Defined by an array of strings that\n* can contains the following values:\n* - search: allow to search (https and http)\n* - addObject: allows to add/update an object in the index (https only)\n* - deleteObject : allows to delete an existing object (https only)\n* - deleteIndex : allows to delete index content (https only)\n* - settings : allows to get index settings (https only)\n* - editSettings : allows to change index settings (https only)\n* @param {Object} [params] - Optionnal parameters to set for the key\n* @param {number} params.validity - Number of seconds after which the key will\n* be automatically removed (0 means no time limit for this key)\n* @param {number} params.maxQueriesPerIPPerHour - Number of API calls allowed from an IP address per hour\n* @param {number} params.maxHitsPerQuery - Number of hits this API key can retrieve in one call\n* @param {string} params.description - A description for your key\n* @param {string[]} params.referers - A list of authorized referers\n* @param {Object} params.queryParameters - Force the key to use specific query parameters\n* @param {Function} callback - The result callback called with two arguments\n* error: null or Error('message')\n* content: the server answer with the added API key\n* @return {Promise|undefined} Returns a promise if no callback given\n* @example\n* index.addUserKey(['search'], {\n* validity: 300,\n* maxQueriesPerIPPerHour: 2000,\n* maxHitsPerQuery: 3,\n* description: 'Eat three fruits',\n* referers: ['*.algolia.com'],\n* queryParameters: {\n* tagFilters: ['public'],\n* }\n* })\n* @see {@link https://www.algolia.com/doc/rest_api#AddIndexKey|Algolia REST API Documentation}\n*\n* @deprecated see client.addApiKey()\n*/\nIndex.prototype.addApiKey = deprecate(function(acls, params, callback) {\n var isArray = require(8);\n var usage = 'Usage: index.addApiKey(arrayOfAcls[, params, callback])';\n\n if (!isArray(acls)) {\n throw new Error(usage);\n }\n\n if (arguments.length === 1 || typeof params === 'function') {\n callback = params;\n params = null;\n }\n\n var postObj = {\n acl: acls\n };\n\n if (params) {\n postObj.validity = params.validity;\n postObj.maxQueriesPerIPPerHour = params.maxQueriesPerIPPerHour;\n postObj.maxHitsPerQuery = params.maxHitsPerQuery;\n postObj.description = params.description;\n\n if (params.queryParameters) {\n postObj.queryParameters = this.as._getSearchParams(params.queryParameters, '');\n }\n\n postObj.referers = params.referers;\n }\n\n return this.as._jsonRequest({\n method: 'POST',\n url: '/1/indexes/' + encodeURIComponent(this.indexName) + '/keys',\n body: postObj,\n hostType: 'write',\n callback: callback\n });\n}, deprecatedMessage('index.addApiKey()', 'client.addApiKey()'));\n\n/**\n* @deprecated use client.addApiKey()\n*/\nIndex.prototype.addUserKeyWithValidity = deprecate(function deprecatedAddUserKeyWithValidity(acls, params, callback) {\n return this.addApiKey(acls, params, callback);\n}, deprecatedMessage('index.addUserKeyWithValidity()', 'client.addApiKey()'));\n\n/*\n* @deprecated see client.updateApiKey()\n*/\nIndex.prototype.updateUserKey = deprecate(function(key, acls, params, callback) {\n return this.updateApiKey(key, acls, params, callback);\n}, deprecatedMessage('index.updateUserKey()', 'client.updateApiKey()'));\n\n/**\n* Update an existing API key of this index\n* @param {string} key - The key to update\n* @param {string[]} acls - The list of ACL for this key. Defined by an array of strings that\n* can contains the following values:\n* - search: allow to search (https and http)\n* - addObject: allows to add/update an object in the index (https only)\n* - deleteObject : allows to delete an existing object (https only)\n* - deleteIndex : allows to delete index content (https only)\n* - settings : allows to get index settings (https only)\n* - editSettings : allows to change index settings (https only)\n* @param {Object} [params] - Optionnal parameters to set for the key\n* @param {number} params.validity - Number of seconds after which the key will\n* be automatically removed (0 means no time limit for this key)\n* @param {number} params.maxQueriesPerIPPerHour - Number of API calls allowed from an IP address per hour\n* @param {number} params.maxHitsPerQuery - Number of hits this API key can retrieve in one call\n* @param {string} params.description - A description for your key\n* @param {string[]} params.referers - A list of authorized referers\n* @param {Object} params.queryParameters - Force the key to use specific query parameters\n* @param {Function} callback - The result callback called with two arguments\n* error: null or Error('message')\n* content: the server answer with user keys list\n* @return {Promise|undefined} Returns a promise if no callback given\n* @example\n* index.updateApiKey('APIKEY', ['search'], {\n* validity: 300,\n* maxQueriesPerIPPerHour: 2000,\n* maxHitsPerQuery: 3,\n* description: 'Eat three fruits',\n* referers: ['*.algolia.com'],\n* queryParameters: {\n* tagFilters: ['public'],\n* }\n* })\n* @see {@link https://www.algolia.com/doc/rest_api#UpdateIndexKey|Algolia REST API Documentation}\n*\n* @deprecated see client.updateApiKey()\n*/\nIndex.prototype.updateApiKey = deprecate(function(key, acls, params, callback) {\n var isArray = require(8);\n var usage = 'Usage: index.updateApiKey(key, arrayOfAcls[, params, callback])';\n\n if (!isArray(acls)) {\n throw new Error(usage);\n }\n\n if (arguments.length === 2 || typeof params === 'function') {\n callback = params;\n params = null;\n }\n\n var putObj = {\n acl: acls\n };\n\n if (params) {\n putObj.validity = params.validity;\n putObj.maxQueriesPerIPPerHour = params.maxQueriesPerIPPerHour;\n putObj.maxHitsPerQuery = params.maxHitsPerQuery;\n putObj.description = params.description;\n\n if (params.queryParameters) {\n putObj.queryParameters = this.as._getSearchParams(params.queryParameters, '');\n }\n\n putObj.referers = params.referers;\n }\n\n return this.as._jsonRequest({\n method: 'PUT',\n url: '/1/indexes/' + encodeURIComponent(this.indexName) + '/keys/' + key,\n body: putObj,\n hostType: 'write',\n callback: callback\n });\n}, deprecatedMessage('index.updateApiKey()', 'client.updateApiKey()'));\n\n},{\"19\":19,\"20\":20,\"26\":26,\"28\":28,\"29\":29,\"30\":30,\"31\":31,\"32\":32,\"33\":33,\"7\":7,\"8\":8}],19:[function(require,module,exports){\n'use strict';\n\n// This is the object returned by the `index.browseAll()` method\n\nmodule.exports = IndexBrowser;\n\nvar inherits = require(7);\nvar EventEmitter = require(4).EventEmitter;\n\nfunction IndexBrowser() {\n}\n\ninherits(IndexBrowser, EventEmitter);\n\nIndexBrowser.prototype.stop = function() {\n this._stopped = true;\n this._clean();\n};\n\nIndexBrowser.prototype._end = function() {\n this.emit('end');\n this._clean();\n};\n\nIndexBrowser.prototype._error = function(err) {\n this.emit('error', err);\n this._clean();\n};\n\nIndexBrowser.prototype._result = function(content) {\n this.emit('result', content);\n};\n\nIndexBrowser.prototype._clean = function() {\n this.removeAllListeners('stop');\n this.removeAllListeners('end');\n this.removeAllListeners('error');\n this.removeAllListeners('result');\n};\n\n},{\"4\":4,\"7\":7}],20:[function(require,module,exports){\nvar buildSearchMethod = require(25);\nvar deprecate = require(28);\nvar deprecatedMessage = require(29);\n\nmodule.exports = IndexCore;\n\n/*\n* Index class constructor.\n* You should not use this method directly but use initIndex() function\n*/\nfunction IndexCore(algoliasearch, indexName) {\n this.indexName = indexName;\n this.as = algoliasearch;\n this.typeAheadArgs = null;\n this.typeAheadValueOption = null;\n\n // make sure every index instance has it's own cache\n this.cache = {};\n}\n\n/*\n* Clear all queries in cache\n*/\nIndexCore.prototype.clearCache = function() {\n this.cache = {};\n};\n\n/*\n* Search inside the index using XMLHttpRequest request (Using a POST query to\n* minimize number of OPTIONS queries: Cross-Origin Resource Sharing).\n*\n* @param {string} [query] the full text query\n* @param {object} [args] (optional) if set, contains an object with query parameters:\n* - page: (integer) Pagination parameter used to select the page to retrieve.\n* Page is zero-based and defaults to 0. Thus,\n* to retrieve the 10th page you need to set page=9\n* - hitsPerPage: (integer) Pagination parameter used to select the number of hits per page. Defaults to 20.\n* - attributesToRetrieve: a string that contains the list of object attributes\n* you want to retrieve (let you minimize the answer size).\n* Attributes are separated with a comma (for example \"name,address\").\n* You can also use an array (for example [\"name\",\"address\"]).\n* By default, all attributes are retrieved. You can also use '*' to retrieve all\n* values when an attributesToRetrieve setting is specified for your index.\n* - attributesToHighlight: a string that contains the list of attributes you\n* want to highlight according to the query.\n* Attributes are separated by a comma. You can also use an array (for example [\"name\",\"address\"]).\n* If an attribute has no match for the query, the raw value is returned.\n* By default all indexed text attributes are highlighted.\n* You can use `*` if you want to highlight all textual attributes.\n* Numerical attributes are not highlighted.\n* A matchLevel is returned for each highlighted attribute and can contain:\n* - full: if all the query terms were found in the attribute,\n* - partial: if only some of the query terms were found,\n* - none: if none of the query terms were found.\n* - attributesToSnippet: a string that contains the list of attributes to snippet alongside\n* the number of words to return (syntax is `attributeName:nbWords`).\n* Attributes are separated by a comma (Example: attributesToSnippet=name:10,content:10).\n* You can also use an array (Example: attributesToSnippet: ['name:10','content:10']).\n* By default no snippet is computed.\n* - minWordSizefor1Typo: the minimum number of characters in a query word to accept one typo in this word.\n* Defaults to 3.\n* - minWordSizefor2Typos: the minimum number of characters in a query word\n* to accept two typos in this word. Defaults to 7.\n* - getRankingInfo: if set to 1, the result hits will contain ranking\n* information in _rankingInfo attribute.\n* - aroundLatLng: search for entries around a given\n* latitude/longitude (specified as two floats separated by a comma).\n* For example aroundLatLng=47.316669,5.016670).\n* You can specify the maximum distance in meters with the aroundRadius parameter (in meters)\n* and the precision for ranking with aroundPrecision\n* (for example if you set aroundPrecision=100, two objects that are distant of\n* less than 100m will be considered as identical for \"geo\" ranking parameter).\n* At indexing, you should specify geoloc of an object with the _geoloc attribute\n* (in the form {\"_geoloc\":{\"lat\":48.853409, \"lng\":2.348800}})\n* - insideBoundingBox: search entries inside a given area defined by the two extreme points\n* of a rectangle (defined by 4 floats: p1Lat,p1Lng,p2Lat,p2Lng).\n* For example insideBoundingBox=47.3165,4.9665,47.3424,5.0201).\n* At indexing, you should specify geoloc of an object with the _geoloc attribute\n* (in the form {\"_geoloc\":{\"lat\":48.853409, \"lng\":2.348800}})\n* - numericFilters: a string that contains the list of numeric filters you want to\n* apply separated by a comma.\n* The syntax of one filter is `attributeName` followed by `operand` followed by `value`.\n* Supported operands are `<`, `<=`, `=`, `>` and `>=`.\n* You can have multiple conditions on one attribute like for example numericFilters=price>100,price<1000.\n* You can also use an array (for example numericFilters: [\"price>100\",\"price<1000\"]).\n* - tagFilters: filter the query by a set of tags. You can AND tags by separating them by commas.\n* To OR tags, you must add parentheses. For example, tags=tag1,(tag2,tag3) means tag1 AND (tag2 OR tag3).\n* You can also use an array, for example tagFilters: [\"tag1\",[\"tag2\",\"tag3\"]]\n* means tag1 AND (tag2 OR tag3).\n* At indexing, tags should be added in the _tags** attribute\n* of objects (for example {\"_tags\":[\"tag1\",\"tag2\"]}).\n* - facetFilters: filter the query by a list of facets.\n* Facets are separated by commas and each facet is encoded as `attributeName:value`.\n* For example: `facetFilters=category:Book,author:John%20Doe`.\n* You can also use an array (for example `[\"category:Book\",\"author:John%20Doe\"]`).\n* - facets: List of object attributes that you want to use for faceting.\n* Comma separated list: `\"category,author\"` or array `['category','author']`\n* Only attributes that have been added in **attributesForFaceting** index setting\n* can be used in this parameter.\n* You can also use `*` to perform faceting on all attributes specified in **attributesForFaceting**.\n* - queryType: select how the query words are interpreted, it can be one of the following value:\n* - prefixAll: all query words are interpreted as prefixes,\n* - prefixLast: only the last word is interpreted as a prefix (default behavior),\n* - prefixNone: no query word is interpreted as a prefix. This option is not recommended.\n* - optionalWords: a string that contains the list of words that should\n* be considered as optional when found in the query.\n* Comma separated and array are accepted.\n* - distinct: If set to 1, enable the distinct feature (disabled by default)\n* if the attributeForDistinct index setting is set.\n* This feature is similar to the SQL \"distinct\" keyword: when enabled\n* in a query with the distinct=1 parameter,\n* all hits containing a duplicate value for the attributeForDistinct attribute are removed from results.\n* For example, if the chosen attribute is show_name and several hits have\n* the same value for show_name, then only the best\n* one is kept and others are removed.\n* - restrictSearchableAttributes: List of attributes you want to use for\n* textual search (must be a subset of the attributesToIndex index setting)\n* either comma separated or as an array\n* @param {function} [callback] the result callback called with two arguments:\n* error: null or Error('message'). If false, the content contains the error.\n* content: the server answer that contains the list of results.\n*/\nIndexCore.prototype.search = buildSearchMethod('query');\n\n/*\n* -- BETA --\n* Search a record similar to the query inside the index using XMLHttpRequest request (Using a POST query to\n* minimize number of OPTIONS queries: Cross-Origin Resource Sharing).\n*\n* @param {string} [query] the similar query\n* @param {object} [args] (optional) if set, contains an object with query parameters.\n* All search parameters are supported (see search function), restrictSearchableAttributes and facetFilters\n* are the two most useful to restrict the similar results and get more relevant content\n*/\nIndexCore.prototype.similarSearch = deprecate(\n buildSearchMethod('similarQuery'),\n deprecatedMessage(\n 'index.similarSearch(query[, callback])',\n 'index.search({ similarQuery: query }[, callback])'\n )\n);\n\n/*\n* Browse index content. The response content will have a `cursor` property that you can use\n* to browse subsequent pages for this query. Use `index.browseFrom(cursor)` when you want.\n*\n* @param {string} query - The full text query\n* @param {Object} [queryParameters] - Any search query parameter\n* @param {Function} [callback] - The result callback called with two arguments\n* error: null or Error('message')\n* content: the server answer with the browse result\n* @return {Promise|undefined} Returns a promise if no callback given\n* @example\n* index.browse('cool songs', {\n* tagFilters: 'public,comments',\n* hitsPerPage: 500\n* }, callback);\n* @see {@link https://www.algolia.com/doc/rest_api#Browse|Algolia REST API Documentation}\n*/\nIndexCore.prototype.browse = function(query, queryParameters, callback) {\n var merge = require(33);\n\n var indexObj = this;\n\n var page;\n var hitsPerPage;\n\n // we check variadic calls that are not the one defined\n // .browse()/.browse(fn)\n // => page = 0\n if (arguments.length === 0 || arguments.length === 1 && typeof arguments[0] === 'function') {\n page = 0;\n callback = arguments[0];\n query = undefined;\n } else if (typeof arguments[0] === 'number') {\n // .browse(2)/.browse(2, 10)/.browse(2, fn)/.browse(2, 10, fn)\n page = arguments[0];\n if (typeof arguments[1] === 'number') {\n hitsPerPage = arguments[1];\n } else if (typeof arguments[1] === 'function') {\n callback = arguments[1];\n hitsPerPage = undefined;\n }\n query = undefined;\n queryParameters = undefined;\n } else if (typeof arguments[0] === 'object') {\n // .browse(queryParameters)/.browse(queryParameters, cb)\n if (typeof arguments[1] === 'function') {\n callback = arguments[1];\n }\n queryParameters = arguments[0];\n query = undefined;\n } else if (typeof arguments[0] === 'string' && typeof arguments[1] === 'function') {\n // .browse(query, cb)\n callback = arguments[1];\n queryParameters = undefined;\n }\n\n // otherwise it's a .browse(query)/.browse(query, queryParameters)/.browse(query, queryParameters, cb)\n\n // get search query parameters combining various possible calls\n // to .browse();\n queryParameters = merge({}, queryParameters || {}, {\n page: page,\n hitsPerPage: hitsPerPage,\n query: query\n });\n\n var params = this.as._getSearchParams(queryParameters, '');\n\n return this.as._jsonRequest({\n method: 'POST',\n url: '/1/indexes/' + encodeURIComponent(indexObj.indexName) + '/browse',\n body: {params: params},\n hostType: 'read',\n callback: callback\n });\n};\n\n/*\n* Continue browsing from a previous position (cursor), obtained via a call to `.browse()`.\n*\n* @param {string} query - The full text query\n* @param {Object} [queryParameters] - Any search query parameter\n* @param {Function} [callback] - The result callback called with two arguments\n* error: null or Error('message')\n* content: the server answer with the browse result\n* @return {Promise|undefined} Returns a promise if no callback given\n* @example\n* index.browseFrom('14lkfsakl32', callback);\n* @see {@link https://www.algolia.com/doc/rest_api#Browse|Algolia REST API Documentation}\n*/\nIndexCore.prototype.browseFrom = function(cursor, callback) {\n return this.as._jsonRequest({\n method: 'POST',\n url: '/1/indexes/' + encodeURIComponent(this.indexName) + '/browse',\n body: {cursor: cursor},\n hostType: 'read',\n callback: callback\n });\n};\n\n/*\n* Search for facet values\n* https://www.algolia.com/doc/rest-api/search#search-for-facet-values\n*\n* @param {string} params.facetName Facet name, name of the attribute to search for values in.\n* Must be declared as a facet\n* @param {string} params.facetQuery Query for the facet search\n* @param {string} [params.*] Any search parameter of Algolia,\n* see https://www.algolia.com/doc/api-client/javascript/search#search-parameters\n* Pagination is not supported. The page and hitsPerPage parameters will be ignored.\n* @param callback (optional)\n*/\nIndexCore.prototype.searchForFacetValues = function(params, callback) {\n var clone = require(26);\n var omit = require(34);\n var usage = 'Usage: index.searchForFacetValues({facetName, facetQuery, ...params}[, callback])';\n\n if (params.facetName === undefined || params.facetQuery === undefined) {\n throw new Error(usage);\n }\n\n var facetName = params.facetName;\n var filteredParams = omit(clone(params), function(keyName) {\n return keyName === 'facetName';\n });\n var searchParameters = this.as._getSearchParams(filteredParams, '');\n\n return this.as._jsonRequest({\n method: 'POST',\n url: '/1/indexes/' +\n encodeURIComponent(this.indexName) + '/facets/' + encodeURIComponent(facetName) + '/query',\n hostType: 'read',\n body: {params: searchParameters},\n callback: callback\n });\n};\n\nIndexCore.prototype.searchFacet = deprecate(function(params, callback) {\n return this.searchForFacetValues(params, callback);\n}, deprecatedMessage(\n 'index.searchFacet(params[, callback])',\n 'index.searchForFacetValues(params[, callback])'\n));\n\nIndexCore.prototype._search = function(params, url, callback, additionalUA) {\n return this.as._jsonRequest({\n cache: this.cache,\n method: 'POST',\n url: url || '/1/indexes/' + encodeURIComponent(this.indexName) + '/query',\n body: {params: params},\n hostType: 'read',\n fallback: {\n method: 'GET',\n url: '/1/indexes/' + encodeURIComponent(this.indexName),\n body: {params: params}\n },\n callback: callback,\n additionalUA: additionalUA\n });\n};\n\n/*\n* Get an object from this index\n*\n* @param objectID the unique identifier of the object to retrieve\n* @param attrs (optional) if set, contains the array of attribute names to retrieve\n* @param callback (optional) the result callback called with two arguments\n* error: null or Error('message')\n* content: the object to retrieve or the error message if a failure occurred\n*/\nIndexCore.prototype.getObject = function(objectID, attrs, callback) {\n var indexObj = this;\n\n if (arguments.length === 1 || typeof attrs === 'function') {\n callback = attrs;\n attrs = undefined;\n }\n\n var params = '';\n if (attrs !== undefined) {\n params = '?attributes=';\n for (var i = 0; i < attrs.length; ++i) {\n if (i !== 0) {\n params += ',';\n }\n params += attrs[i];\n }\n }\n\n return this.as._jsonRequest({\n method: 'GET',\n url: '/1/indexes/' + encodeURIComponent(indexObj.indexName) + '/' + encodeURIComponent(objectID) + params,\n hostType: 'read',\n callback: callback\n });\n};\n\n/*\n* Get several objects from this index\n*\n* @param objectIDs the array of unique identifier of objects to retrieve\n*/\nIndexCore.prototype.getObjects = function(objectIDs, attributesToRetrieve, callback) {\n var isArray = require(8);\n var map = require(32);\n\n var usage = 'Usage: index.getObjects(arrayOfObjectIDs[, callback])';\n\n if (!isArray(objectIDs)) {\n throw new Error(usage);\n }\n\n var indexObj = this;\n\n if (arguments.length === 1 || typeof attributesToRetrieve === 'function') {\n callback = attributesToRetrieve;\n attributesToRetrieve = undefined;\n }\n\n var body = {\n requests: map(objectIDs, function prepareRequest(objectID) {\n var request = {\n indexName: indexObj.indexName,\n objectID: objectID\n };\n\n if (attributesToRetrieve) {\n request.attributesToRetrieve = attributesToRetrieve.join(',');\n }\n\n return request;\n })\n };\n\n return this.as._jsonRequest({\n method: 'POST',\n url: '/1/indexes/*/objects',\n hostType: 'read',\n body: body,\n callback: callback\n });\n};\n\nIndexCore.prototype.as = null;\nIndexCore.prototype.indexName = null;\nIndexCore.prototype.typeAheadArgs = null;\nIndexCore.prototype.typeAheadValueOption = null;\n\n},{\"25\":25,\"26\":26,\"28\":28,\"29\":29,\"32\":32,\"33\":33,\"34\":34,\"8\":8}],21:[function(require,module,exports){\n'use strict';\n\nvar AlgoliaSearch = require(16);\nvar createAlgoliasearch = require(22);\n\nmodule.exports = createAlgoliasearch(AlgoliaSearch, 'Browser');\n\n},{\"16\":16,\"22\":22}],22:[function(require,module,exports){\n(function (process){\n'use strict';\n\nvar global = require(6);\nvar Promise = global.Promise || require(3).Promise;\n\n// This is the standalone browser build entry point\n// Browser implementation of the Algolia Search JavaScript client,\n// using XMLHttpRequest, XDomainRequest and JSONP as fallback\nmodule.exports = function createAlgoliasearch(AlgoliaSearch, uaSuffix) {\n var inherits = require(7);\n var errors = require(30);\n var inlineHeaders = require(23);\n var jsonpRequest = require(24);\n var places = require(35);\n uaSuffix = uaSuffix || '';\n\n if (process.env.NODE_ENV === 'debug') {\n require(1).enable('algoliasearch*');\n }\n\n function algoliasearch(applicationID, apiKey, opts) {\n var cloneDeep = require(26);\n\n opts = cloneDeep(opts || {});\n\n opts._ua = opts._ua || algoliasearch.ua;\n\n return new AlgoliaSearchBrowser(applicationID, apiKey, opts);\n }\n\n algoliasearch.version = require(37);\n\n algoliasearch.ua =\n 'Algolia for JavaScript (' + algoliasearch.version + '); ' + uaSuffix;\n\n algoliasearch.initPlaces = places(algoliasearch);\n\n // we expose into window no matter how we are used, this will allow\n // us to easily debug any website running algolia\n global.__algolia = {\n debug: require(1),\n algoliasearch: algoliasearch\n };\n\n var support = {\n hasXMLHttpRequest: 'XMLHttpRequest' in global,\n hasXDomainRequest: 'XDomainRequest' in global\n };\n\n if (support.hasXMLHttpRequest) {\n support.cors = 'withCredentials' in new XMLHttpRequest();\n }\n\n function AlgoliaSearchBrowser() {\n // call AlgoliaSearch constructor\n AlgoliaSearch.apply(this, arguments);\n }\n\n inherits(AlgoliaSearchBrowser, AlgoliaSearch);\n\n AlgoliaSearchBrowser.prototype._request = function request(url, opts) {\n return new Promise(function wrapRequest(resolve, reject) {\n // no cors or XDomainRequest, no request\n if (!support.cors && !support.hasXDomainRequest) {\n // very old browser, not supported\n reject(new errors.Network('CORS not supported'));\n return;\n }\n\n url = inlineHeaders(url, opts.headers);\n\n var body = opts.body;\n var req = support.cors ? new XMLHttpRequest() : new XDomainRequest();\n var reqTimeout;\n var timedOut;\n var connected = false;\n\n reqTimeout = setTimeout(onTimeout, opts.timeouts.connect);\n // we set an empty onprogress listener\n // so that XDomainRequest on IE9 is not aborted\n // refs:\n // - https://github.com/algolia/algoliasearch-client-js/issues/76\n // - https://social.msdn.microsoft.com/Forums/ie/en-US/30ef3add-767c-4436-b8a9-f1ca19b4812e/ie9-rtm-xdomainrequest-issued-requests-may-abort-if-all-event-handlers-not-specified?forum=iewebdevelopment\n req.onprogress = onProgress;\n if ('onreadystatechange' in req) req.onreadystatechange = onReadyStateChange;\n req.onload = onLoad;\n req.onerror = onError;\n\n // do not rely on default XHR async flag, as some analytics code like hotjar\n // breaks it and set it to false by default\n if (req instanceof XMLHttpRequest) {\n req.open(opts.method, url, true);\n\n // The Analytics API never accepts Auth headers as query string\n // this option exists specifically for them.\n if (opts.forceAuthHeaders) {\n req.setRequestHeader(\n 'x-algolia-application-id',\n opts.headers['x-algolia-application-id']\n );\n req.setRequestHeader(\n 'x-algolia-api-key',\n opts.headers['x-algolia-api-key']\n );\n }\n } else {\n req.open(opts.method, url);\n }\n\n // headers are meant to be sent after open\n if (support.cors) {\n if (body) {\n if (opts.method === 'POST') {\n // https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Simple_requests\n req.setRequestHeader('content-type', 'application/x-www-form-urlencoded');\n } else {\n req.setRequestHeader('content-type', 'application/json');\n }\n }\n req.setRequestHeader('accept', 'application/json');\n }\n\n if (body) {\n req.send(body);\n } else {\n req.send();\n }\n\n // event object not received in IE8, at least\n // but we do not use it, still important to note\n function onLoad(/* event */) {\n // When browser does not supports req.timeout, we can\n // have both a load and timeout event, since handled by a dumb setTimeout\n if (timedOut) {\n return;\n }\n\n clearTimeout(reqTimeout);\n\n var out;\n\n try {\n out = {\n body: JSON.parse(req.responseText),\n responseText: req.responseText,\n statusCode: req.status,\n // XDomainRequest does not have any response headers\n headers: req.getAllResponseHeaders && req.getAllResponseHeaders() || {}\n };\n } catch (e) {\n out = new errors.UnparsableJSON({\n more: req.responseText\n });\n }\n\n if (out instanceof errors.UnparsableJSON) {\n reject(out);\n } else {\n resolve(out);\n }\n }\n\n function onError(event) {\n if (timedOut) {\n return;\n }\n\n clearTimeout(reqTimeout);\n\n // error event is trigerred both with XDR/XHR on:\n // - DNS error\n // - unallowed cross domain request\n reject(\n new errors.Network({\n more: event\n })\n );\n }\n\n function onTimeout() {\n timedOut = true;\n req.abort();\n\n reject(new errors.RequestTimeout());\n }\n\n function onConnect() {\n connected = true;\n clearTimeout(reqTimeout);\n reqTimeout = setTimeout(onTimeout, opts.timeouts.complete);\n }\n\n function onProgress() {\n if (!connected) onConnect();\n }\n\n function onReadyStateChange() {\n if (!connected && req.readyState > 1) onConnect();\n }\n });\n };\n\n AlgoliaSearchBrowser.prototype._request.fallback = function requestFallback(url, opts) {\n url = inlineHeaders(url, opts.headers);\n\n return new Promise(function wrapJsonpRequest(resolve, reject) {\n jsonpRequest(url, opts, function jsonpRequestDone(err, content) {\n if (err) {\n reject(err);\n return;\n }\n\n resolve(content);\n });\n });\n };\n\n AlgoliaSearchBrowser.prototype._promise = {\n reject: function rejectPromise(val) {\n return Promise.reject(val);\n },\n resolve: function resolvePromise(val) {\n return Promise.resolve(val);\n },\n delay: function delayPromise(ms) {\n return new Promise(function resolveOnTimeout(resolve/* , reject*/) {\n setTimeout(resolve, ms);\n });\n },\n all: function all(promises) {\n return Promise.all(promises);\n }\n };\n\n return algoliasearch;\n};\n\n}).call(this,require(12))\n},{\"1\":1,\"12\":12,\"23\":23,\"24\":24,\"26\":26,\"3\":3,\"30\":30,\"35\":35,\"37\":37,\"6\":6,\"7\":7}],23:[function(require,module,exports){\n'use strict';\n\nmodule.exports = inlineHeaders;\n\nvar encode = require(14);\n\nfunction inlineHeaders(url, headers) {\n if (/\\?/.test(url)) {\n url += '&';\n } else {\n url += '?';\n }\n\n return url + encode(headers);\n}\n\n},{\"14\":14}],24:[function(require,module,exports){\n'use strict';\n\nmodule.exports = jsonpRequest;\n\nvar errors = require(30);\n\nvar JSONPCounter = 0;\n\nfunction jsonpRequest(url, opts, cb) {\n if (opts.method !== 'GET') {\n cb(new Error('Method ' + opts.method + ' ' + url + ' is not supported by JSONP.'));\n return;\n }\n\n opts.debug('JSONP: start');\n\n var cbCalled = false;\n var timedOut = false;\n\n JSONPCounter += 1;\n var head = document.getElementsByTagName('head')[0];\n var script = document.createElement('script');\n var cbName = 'algoliaJSONP_' + JSONPCounter;\n var done = false;\n\n window[cbName] = function(data) {\n removeGlobals();\n\n if (timedOut) {\n opts.debug('JSONP: Late answer, ignoring');\n return;\n }\n\n cbCalled = true;\n\n clean();\n\n cb(null, {\n body: data,\n responseText: JSON.stringify(data)/* ,\n // We do not send the statusCode, there's no statusCode in JSONP, it will be\n // computed using data.status && data.message like with XDR\n statusCode*/\n });\n };\n\n // add callback by hand\n url += '&callback=' + cbName;\n\n // add body params manually\n if (opts.jsonBody && opts.jsonBody.params) {\n url += '&' + opts.jsonBody.params;\n }\n\n var ontimeout = setTimeout(timeout, opts.timeouts.complete);\n\n // script onreadystatechange needed only for\n // <= IE8\n // https://github.com/angular/angular.js/issues/4523\n script.onreadystatechange = readystatechange;\n script.onload = success;\n script.onerror = error;\n\n script.async = true;\n script.defer = true;\n script.src = url;\n head.appendChild(script);\n\n function success() {\n opts.debug('JSONP: success');\n\n if (done || timedOut) {\n return;\n }\n\n done = true;\n\n // script loaded but did not call the fn => script loading error\n if (!cbCalled) {\n opts.debug('JSONP: Fail. Script loaded but did not call the callback');\n clean();\n cb(new errors.JSONPScriptFail());\n }\n }\n\n function readystatechange() {\n if (this.readyState === 'loaded' || this.readyState === 'complete') {\n success();\n }\n }\n\n function clean() {\n clearTimeout(ontimeout);\n script.onload = null;\n script.onreadystatechange = null;\n script.onerror = null;\n head.removeChild(script);\n }\n\n function removeGlobals() {\n try {\n delete window[cbName];\n delete window[cbName + '_loaded'];\n } catch (e) {\n window[cbName] = window[cbName + '_loaded'] = undefined;\n }\n }\n\n function timeout() {\n opts.debug('JSONP: Script timeout');\n timedOut = true;\n clean();\n cb(new errors.RequestTimeout());\n }\n\n function error() {\n opts.debug('JSONP: Script error');\n\n if (done || timedOut) {\n return;\n }\n\n clean();\n cb(new errors.JSONPScriptError());\n }\n}\n\n},{\"30\":30}],25:[function(require,module,exports){\nmodule.exports = buildSearchMethod;\n\nvar errors = require(30);\n\n/**\n * Creates a search method to be used in clients\n * @param {string} queryParam the name of the attribute used for the query\n * @param {string} url the url\n * @return {function} the search method\n */\nfunction buildSearchMethod(queryParam, url) {\n /**\n * The search method. Prepares the data and send the query to Algolia.\n * @param {string} query the string used for query search\n * @param {object} args additional parameters to send with the search\n * @param {function} [callback] the callback to be called with the client gets the answer\n * @return {undefined|Promise} If the callback is not provided then this methods returns a Promise\n */\n return function search(query, args, callback) {\n // warn V2 users on how to search\n if (typeof query === 'function' && typeof args === 'object' ||\n typeof callback === 'object') {\n // .search(query, params, cb)\n // .search(cb, params)\n throw new errors.AlgoliaSearchError('index.search usage is index.search(query, params, cb)');\n }\n\n // Normalizing the function signature\n if (arguments.length === 0 || typeof query === 'function') {\n // Usage : .search(), .search(cb)\n callback = query;\n query = '';\n } else if (arguments.length === 1 || typeof args === 'function') {\n // Usage : .search(query/args), .search(query, cb)\n callback = args;\n args = undefined;\n }\n // At this point we have 3 arguments with values\n\n // Usage : .search(args) // careful: typeof null === 'object'\n if (typeof query === 'object' && query !== null) {\n args = query;\n query = undefined;\n } else if (query === undefined || query === null) { // .search(undefined/null)\n query = '';\n }\n\n var params = '';\n\n if (query !== undefined) {\n params += queryParam + '=' + encodeURIComponent(query);\n }\n\n var additionalUA;\n if (args !== undefined) {\n if (args.additionalUA) {\n additionalUA = args.additionalUA;\n delete args.additionalUA;\n }\n // `_getSearchParams` will augment params, do not be fooled by the = versus += from previous if\n params = this.as._getSearchParams(args, params);\n }\n\n\n return this._search(params, url, callback, additionalUA);\n };\n}\n\n},{\"30\":30}],26:[function(require,module,exports){\nmodule.exports = function clone(obj) {\n return JSON.parse(JSON.stringify(obj));\n};\n\n},{}],27:[function(require,module,exports){\nmodule.exports = createAnalyticsClient;\n\nvar algoliasearch = require(21);\n\nfunction createAnalyticsClient(appId, apiKey, opts) {\n var analytics = {};\n\n opts = opts || {};\n // there need to be 4 hosts, like on the client, since if requests fail,\n // the counter goes up by 1, so we need to have the same amount of hosts\n // 4 because: -dsn, -1, -2, -3\n // This is done because the APPID used for search will be the same for the analytics client created,\n // and since the state of available hosts is shared by APPID globally for the module, we had issues\n // where the hostIndex would be 1 while the array was only one entry (you got an empty host)\n opts.hosts = opts.hosts || [\n 'analytics.algolia.com',\n 'analytics.algolia.com',\n 'analytics.algolia.com',\n 'analytics.algolia.com'\n ];\n opts.protocol = opts.protocol || 'https:';\n\n analytics.as = algoliasearch(appId, apiKey, opts);\n\n analytics.getABTests = function(_params, callback) {\n var params = params || {};\n var offset = params.offset || 0;\n var limit = params.limit || 10;\n\n return this.as._jsonRequest({\n method: 'GET',\n url: '/2/abtests?offset=' + encodeURIComponent(offset) + '&limit=' + encodeURIComponent(limit),\n hostType: 'read',\n forceAuthHeaders: true,\n callback: callback\n });\n };\n\n analytics.getABTest = function(abTestID, callback) {\n return this.as._jsonRequest({\n method: 'GET',\n url: '/2/abtests/' + encodeURIComponent(abTestID),\n hostType: 'read',\n forceAuthHeaders: true,\n callback: callback\n });\n };\n\n analytics.addABTest = function(abTest, callback) {\n return this.as._jsonRequest({\n method: 'POST',\n url: '/2/abtests',\n body: abTest,\n hostType: 'read',\n forceAuthHeaders: true,\n callback: callback\n });\n };\n\n analytics.stopABTest = function(abTestID, callback) {\n return this.as._jsonRequest({\n method: 'POST',\n url: '/2/abtests/' + encodeURIComponent(abTestID) + '/stop',\n hostType: 'read',\n forceAuthHeaders: true,\n callback: callback\n });\n };\n\n analytics.deleteABTest = function(abTestID, callback) {\n return this.as._jsonRequest({\n method: 'DELETE',\n url: '/2/abtests/' + encodeURIComponent(abTestID),\n hostType: 'write',\n forceAuthHeaders: true,\n callback: callback\n });\n };\n\n analytics.waitTask = function(indexName, taskID, callback) {\n return this.as.initIndex(indexName).waitTask(taskID, callback);\n };\n\n return analytics;\n}\n\n},{\"21\":21}],28:[function(require,module,exports){\nmodule.exports = function deprecate(fn, message) {\n var warned = false;\n\n function deprecated() {\n if (!warned) {\n /* eslint no-console:0 */\n console.warn(message);\n warned = true;\n }\n\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n},{}],29:[function(require,module,exports){\nmodule.exports = function deprecatedMessage(previousUsage, newUsage) {\n var githubAnchorLink = previousUsage.toLowerCase()\n .replace(/[\\.\\(\\)]/g, '');\n\n return 'algoliasearch: `' + previousUsage + '` was replaced by `' + newUsage +\n '`. Please see https://github.com/algolia/algoliasearch-client-javascript/wiki/Deprecated#' + githubAnchorLink;\n};\n\n},{}],30:[function(require,module,exports){\n'use strict';\n\n// This file hosts our error definitions\n// We use custom error \"types\" so that we can act on them when we need it\n// e.g.: if error instanceof errors.UnparsableJSON then..\n\nvar inherits = require(7);\n\nfunction AlgoliaSearchError(message, extraProperties) {\n var forEach = require(5);\n\n var error = this;\n\n // try to get a stacktrace\n if (typeof Error.captureStackTrace === 'function') {\n Error.captureStackTrace(this, this.constructor);\n } else {\n error.stack = (new Error()).stack || 'Cannot get a stacktrace, browser is too old';\n }\n\n this.name = 'AlgoliaSearchError';\n this.message = message || 'Unknown error';\n\n if (extraProperties) {\n forEach(extraProperties, function addToErrorObject(value, key) {\n error[key] = value;\n });\n }\n}\n\ninherits(AlgoliaSearchError, Error);\n\nfunction createCustomError(name, message) {\n function AlgoliaSearchCustomError() {\n var args = Array.prototype.slice.call(arguments, 0);\n\n // custom message not set, use default\n if (typeof args[0] !== 'string') {\n args.unshift(message);\n }\n\n AlgoliaSearchError.apply(this, args);\n this.name = 'AlgoliaSearch' + name + 'Error';\n }\n\n inherits(AlgoliaSearchCustomError, AlgoliaSearchError);\n\n return AlgoliaSearchCustomError;\n}\n\n// late exports to let various fn defs and inherits take place\nmodule.exports = {\n AlgoliaSearchError: AlgoliaSearchError,\n UnparsableJSON: createCustomError(\n 'UnparsableJSON',\n 'Could not parse the incoming response as JSON, see err.more for details'\n ),\n RequestTimeout: createCustomError(\n 'RequestTimeout',\n 'Request timed out before getting a response'\n ),\n Network: createCustomError(\n 'Network',\n 'Network issue, see err.more for details'\n ),\n JSONPScriptFail: createCustomError(\n 'JSONPScriptFail',\n '<script> was loaded but did not call our provided callback'\n ),\n ValidUntilNotFound: createCustomError(\n 'ValidUntilNotFound',\n 'The SecuredAPIKey does not have a validUntil parameter.'\n ),\n JSONPScriptError: createCustomError(\n 'JSONPScriptError',\n '<script> unable to load due to an `error` event on it'\n ),\n ObjectNotFound: createCustomError(\n 'ObjectNotFound',\n 'Object not found'\n ),\n Unknown: createCustomError(\n 'Unknown',\n 'Unknown error occured'\n )\n};\n\n},{\"5\":5,\"7\":7}],31:[function(require,module,exports){\n// Parse cloud does not supports setTimeout\n// We do not store a setTimeout reference in the client everytime\n// We only fallback to a fake setTimeout when not available\n// setTimeout cannot be override globally sadly\nmodule.exports = function exitPromise(fn, _setTimeout) {\n _setTimeout(fn, 0);\n};\n\n},{}],32:[function(require,module,exports){\nvar foreach = require(5);\n\nmodule.exports = function map(arr, fn) {\n var newArr = [];\n foreach(arr, function(item, itemIndex) {\n newArr.push(fn(item, itemIndex, arr));\n });\n return newArr;\n};\n\n},{\"5\":5}],33:[function(require,module,exports){\nvar foreach = require(5);\n\nmodule.exports = function merge(destination/* , sources */) {\n var sources = Array.prototype.slice.call(arguments);\n\n foreach(sources, function(source) {\n for (var keyName in source) {\n if (source.hasOwnProperty(keyName)) {\n if (typeof destination[keyName] === 'object' && typeof source[keyName] === 'object') {\n destination[keyName] = merge({}, destination[keyName], source[keyName]);\n } else if (source[keyName] !== undefined) {\n destination[keyName] = source[keyName];\n }\n }\n }\n });\n\n return destination;\n};\n\n},{\"5\":5}],34:[function(require,module,exports){\nmodule.exports = function omit(obj, test) {\n var keys = require(10);\n var foreach = require(5);\n\n var filtered = {};\n\n foreach(keys(obj), function doFilter(keyName) {\n if (test(keyName) !== true) {\n filtered[keyName] = obj[keyName];\n }\n });\n\n return filtered;\n};\n\n},{\"10\":10,\"5\":5}],35:[function(require,module,exports){\nmodule.exports = createPlacesClient;\n\nvar qs3 = require(15);\nvar buildSearchMethod = require(25);\n\nfunction createPlacesClient(algoliasearch) {\n return function places(appID, apiKey, opts) {\n var cloneDeep = require(26);\n\n opts = opts && cloneDeep(opts) || {};\n opts.hosts = opts.hosts || [\n 'places-dsn.algolia.net',\n 'places-1.algolianet.com',\n 'places-2.algolianet.com',\n 'places-3.algolianet.com'\n ];\n\n // allow initPlaces() no arguments => community rate limited\n if (arguments.length === 0 || typeof appID === 'object' || appID === undefined) {\n appID = '';\n apiKey = '';\n opts._allowEmptyCredentials = true;\n }\n\n var client = algoliasearch(appID, apiKey, opts);\n var index = client.initIndex('places');\n index.search = buildSearchMethod('query', '/1/places/query');\n index.reverse = function(options, callback) {\n var encoded = qs3.encode(options);\n\n return this.as._jsonRequest({\n method: 'GET',\n url: '/1/places/reverse?' + encoded,\n hostType: 'read',\n callback: callback\n });\n };\n\n index.getObject = function(objectID, callback) {\n return this.as._jsonRequest({\n method: 'GET',\n url: '/1/places/' + encodeURIComponent(objectID),\n hostType: 'read',\n callback: callback\n });\n };\n return index;\n };\n}\n\n},{\"15\":15,\"25\":25,\"26\":26}],36:[function(require,module,exports){\n(function (global){\nvar debug = require(1)('algoliasearch:src/hostIndexState.js');\nvar localStorageNamespace = 'algoliasearch-client-js';\n\nvar store;\nvar moduleStore = {\n state: {},\n set: function(key, data) {\n this.state[key] = data;\n return this.state[key];\n },\n get: function(key) {\n return this.state[key] || null;\n }\n};\n\nvar localStorageStore = {\n set: function(key, data) {\n moduleStore.set(key, data); // always replicate localStorageStore to moduleStore in case of failure\n\n try {\n var namespace = JSON.parse(global.localStorage[localStorageNamespace]);\n namespace[key] = data;\n global.localStorage[localStorageNamespace] = JSON.stringify(namespace);\n return namespace[key];\n } catch (e) {\n return localStorageFailure(key, e);\n }\n },\n get: function(key) {\n try {\n return JSON.parse(global.localStorage[localStorageNamespace])[key] || null;\n } catch (e) {\n return localStorageFailure(key, e);\n }\n }\n};\n\nfunction localStorageFailure(key, e) {\n debug('localStorage failed with', e);\n cleanup();\n store = moduleStore;\n return store.get(key);\n}\n\nstore = supportsLocalStorage() ? localStorageStore : moduleStore;\n\nmodule.exports = {\n get: getOrSet,\n set: getOrSet,\n supportsLocalStorage: supportsLocalStorage\n};\n\nfunction getOrSet(key, data) {\n if (arguments.length === 1) {\n return store.get(key);\n }\n\n return store.set(key, data);\n}\n\nfunction supportsLocalStorage() {\n try {\n if ('localStorage' in global &&\n global.localStorage !== null) {\n if (!global.localStorage[localStorageNamespace]) {\n // actual creation of the namespace\n global.localStorage.setItem(localStorageNamespace, JSON.stringify({}));\n }\n return true;\n }\n\n return false;\n } catch (_) {\n return false;\n }\n}\n\n// In case of any error on localStorage, we clean our own namespace, this should handle\n// quota errors when a lot of keys + data are used\nfunction cleanup() {\n try {\n global.localStorage.removeItem(localStorageNamespace);\n } catch (_) {\n // nothing to do\n }\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"1\":1}],37:[function(require,module,exports){\n'use strict';\n\nmodule.exports = '3.35.1';\n\n},{}]},{},[21])(21)\n});"]}
|