1!function(e,n){"function"==typeof define&&define.amd?define("bloodhound",["jquery"],function(t){return e.Bloodhound=n(t)}):"object"==typeof exports?module.exports=n(require("jquery")):e.Bloodhound=n(jQuery)}(this,function(v){var _=function(){"use strict";return{isMsie:function(){return!!/(msie|trident)/i.test(navigator.userAgent)&&navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]},isBlankString:function(t){return!t||/^\s*$/.test(t)},escapeRegExChars:function(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isArray:v.isArray,isFunction:v.isFunction,isObject:v.isPlainObject,isUndefined:function(t){return void 0===t},isElement:function(t){return!(!t||1!==t.nodeType)},isJQuery:function(t){return t instanceof v},toStr:function(t){return _.isUndefined(t)||null===t?"":t+""},bind:v.proxy,each:function(t,n){v.each(t,function(t,e){return n(e,t)})},map:v.map,filter:v.grep,every:function(n,i){var s=!0;return n?(v.each(n,function(t,e){if(!(s=i.call(null,e,t,n)))return!1}),!!s):s},some:function(n,i){var s=!1;return n?(v.each(n,function(t,e){if(s=i.call(null,e,t,n))return!1}),!!s):s},mixin:v.extend,identity:function(t){return t},clone:function(t){return v.extend(!0,{},t)},getIdGenerator:function(){var t=0;return function(){return t++}},templatify:function(t){return v.isFunction(t)?t:function(){return String(t)}},defer:function(t){setTimeout(t,0)},debounce:function(s,r,o){var a,u;return function(){var t,e,n=this,i=arguments;return t=function(){a=null,o||(u=s.apply(n,i))},e=o&&!a,clearTimeout(a),a=setTimeout(t,r),e&&(u=s.apply(n,i)),u}},throttle:function(n,i){var s,r,o,a,u,c;return u=0,c=function(){u=new Date,o=null,a=n.apply(s,r)},function(){var t=new Date,e=i-(t-u);return s=this,r=arguments,e<=0?(clearTimeout(o),o=null,u=t,a=n.apply(s,r)):o||(o=setTimeout(c,e)),a}},stringify:function(t){return _.isString(t)?t:JSON.stringify(t)},noop:function(){}}}(),n=function(){"use strict";return{nonword:e,whitespace:t,obj:{nonword:n(e),whitespace:n(t)}};function t(t){return(t=_.toStr(t))?t.split(/\s+/):[]}function e(t){return(t=_.toStr(t))?t.split(/\W+/):[]}function n(i){return function(t){return t=_.isArray(t)?t:[].slice.call(arguments,0),function(e){var n=[];return _.each(t,function(t){n=n.concat(i(_.toStr(e[t])))}),n}}}}(),i=function(){"use strict";function t(t){this.maxSize=_.isNumber(t)?t:100,this.reset(),this.maxSize<=0&&(this.set=this.get=v.noop)}function e(){this.head=this.tail=null}function s(t,e){this.key=t,this.val=e,this.prev=this.next=null}return _.mixin(t.prototype,{set:function(t,e){var n,i=this.list.tail;this.size>=this.maxSize&&(this.list.remove(i),delete this.hash[i.key],this.size--),(n=this.hash[t])?(n.val=e,this.list.moveToFront(n)):(n=new s(t,e),this.list.add(n),this.hash[t]=n,this.size++)},get:function(t){var e=this.hash[t];if(e)return this.list.moveToFront(e),e.val},reset:function(){this.size=0,this.hash={},this.list=new e}}),_.mixin(e.prototype,{add:function(t){this.head&&(t.next=this.head,this.head.prev=t),this.head=t,this.tail=this.tail||t},remove:function(t){t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev},moveToFront:function(t){this.remove(t),this.add(t)}}),t}(),e=function(){"use strict";var r;try{(r=window.localStorage).setItem("~~~","!"),r.removeItem("~~~")}catch(t){r=null}function t(t,e){this.prefix=["__",t,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+_.escapeRegExChars(this.prefix)),this.ls=e||r,!this.ls&&this._noop()}return _.mixin(t.prototype,{_prefix:function(t){return this.prefix+t},_ttlKey:function(t){return this._prefix(t)+this.ttlKey},_noop:function(){this.get=this.set=this.remove=this.clear=this.isExpired=_.noop},_safeSet:function(t,e){try{this.ls.setItem(t,e)}catch(t){"QuotaExceededError"===t.name&&(this.clear(),this._noop())}},get:function(t){return this.isExpired(t)&&this.remove(t),n(this.ls.getItem(this._prefix(t)))},set:function(t,e,n){return _.isNumber(n)?this._safeSet(this._ttlKey(t),s(i()+n)):this.ls.removeItem(this._ttlKey(t)),this._safeSet(this._prefix(t),s(e))},remove:function(t){return this.ls.removeItem(this._ttlKey(t)),this.ls.removeItem(this._prefix(t)),this},clear:function(){var t,e=function(t){var e,n,i=[],s=r.length;for(e=0;e<s;e++)(n=r.key(e)).match(t)&&i.push(n.replace(t,""));return i}(this.keyMatcher);for(t=e.length;t--;)this.remove(e[t]);return this},isExpired:function(t){var e=n(this.ls.getItem(this._ttlKey(t)));return!!(_.isNumber(e)&&i()>e)}}),t;function i(){return(new Date).getTime()}function s(t){return JSON.stringify(_.isUndefined(t)?null:t)}function n(t){return v.parseJSON(t)}}(),s=function(){"use strict";var a=0,u={},c=6,e=new i(10);function t(t){t=t||{},this.cancelled=!1,this.lastReq=null,this._send=t.transport,this._get=t.limiter?t.limiter(this._get):this._get,this._cache=!1===t.cache?new i(0):e}return t.setMaxPendingRequests=function(t){c=t},t.resetCache=function(){e.reset()},_.mixin(t.prototype,{_fingerprint:function(t){return(t=t||{}).url+t.type+v.param(t.data||{})},_get:function(t,e){var n,i,s=this;function r(t){e(null,t),s._cache.set(n,t)}function o(){e(!0)}n=this._fingerprint(t),this.cancelled||n!==this.lastReq||((i=u[n])?i.done(r).fail(o):a<c?(a++,u[n]=this._send(t).done(r).fail(o).always(function(){a--,delete u[n],s.onDeckRequestArgs&&(s._get.apply(s,s.onDeckRequestArgs),s.onDeckRequestArgs=null)})):this.onDeckRequestArgs=[].slice.call(arguments,0))},get:function(t,e){var n,i;e=e||v.noop,t=_.isString(t)?{url:t}:t||{},i=this._fingerprint(t),this.cancelled=!1,this.lastReq=i,(n=this._cache.get(i))?e(null,n):this._get(t,e)},cancel:function(){this.cancelled=!0}}),t}(),r=window.SearchIndex=function(){"use strict";var a="c",u="i";function t(t){(t=t||{}).datumTokenizer&&t.queryTokenizer||v.error("datumTokenizer and queryTokenizer are both required"),this.identify=t.identify||_.stringify,this.datumTokenizer=t.datumTokenizer,this.queryTokenizer=t.queryTokenizer,this.reset()}return _.mixin(t.prototype,{bootstrap:function(t){this.datums=t.datums,this.trie=t.trie},add:function(t){var r=this;t=_.isArray(t)?t:[t],_.each(t,function(t){var s,e;r.datums[s=r.identify(t)]=t,e=n(r.datumTokenizer(t)),_.each(e,function(t){var e,n,i;for(e=r.trie,n=t.split("");i=n.shift();)(e=e[a][i]||(e[a][i]=o()))[u].push(s)})})},get:function(t){var e=this;return _.map(t,function(t){return e.datums[t]})},search:function(t){var e,r,o=this;return e=n(this.queryTokenizer(t)),_.each(e,function(t){var e,n,i,s;if(r&&0===r.length)return!1;for(e=o.trie,n=t.split("");e&&(i=n.shift());)e=e[a][i];if(!e||0!==n.length)return!(r=[]);s=e[u].slice(0),r=r?function(t,e){var n=0,i=0,s=[];t=t.sort(),e=e.sort();var r=t.length,o=e.length;for(;n<r&&i<o;)t[n]<e[i]?n++:(t[n]>e[i]||(s.push(t[n]),n++),i++);return s}(r,s):s}),r?_.map(function(t){for(var e={},n=[],i=0,s=t.length;i<s;i++)e[t[i]]||(e[t[i]]=!0,n.push(t[i]));return n}(r),function(t){return o.datums[t]}):[]},all:function(){var t=[];for(var e in this.datums)t.push(this.datums[e]);return t},reset:function(){this.datums={},this.trie=o()},serialize:function(){return{datums:this.datums,trie:this.trie}}}),t;function n(t){return t=_.filter(t,function(t){return!!t}),t=_.map(t,function(t){return t.toLowerCase()})}function o(){var t={};return t[u]=[],t[a]={},t}}(),o=function(){"use strict";var n;function t(t){this.url=t.url,this.ttl=t.ttl,this.cache=t.cache,this.prepare=t.prepare,this.transform=t.transform,this.transport=t.transport,this.thumbprint=t.thumbprint,this.storage=new e(t.cacheKey)}return n={data:"data",protocol:"protocol",thumbprint:"thumbprint"},_.mixin(t.prototype,{_settings:function(){return{url:this.url,type:"GET",dataType:"json"}},store:function(t){this.cache&&(this.storage.set(n.data,t,this.ttl),this.storage.set(n.protocol,location.protocol,this.ttl),this.storage.set(n.thumbprint,this.thumbprint,this.ttl))},fromCache:function(){var t,e={};return this.cache?(e.data=this.storage.get(n.data),e.protocol=this.storage.get(n.protocol),e.thumbprint=this.storage.get(n.thumbprint),t=e.thumbprint!==this.thumbprint||e.protocol!==location.protocol,e.data&&!t?e.data:null):null},fromNetwork:function(e){var t,n=this;e&&(t=this.prepare(this._settings()),this.transport(t).fail(function(){e(!0)}).done(function(t){e(null,n.transform(t))}))},clear:function(){return this.storage.clear(),this}}),t}(),a=function(){"use strict";function t(t){this.url=t.url,this.prepare=t.prepare,this.transform=t.transform,this.transport=new s({cache:t.cache,limiter:t.limiter,transport:t.transport})}return _.mixin(t.prototype,{_settings:function(){return{url:this.url,type:"GET",dataType:"json"}},get:function(t,n){var e,i=this;if(n)return t=t||"",e=this.prepare(t,this._settings()),this.transport.get(e,function(t,e){n(t?[]:i.transform(e))})},cancelLastRequest:function(){this.transport.cancel()}}),t}(),u=function(){"use strict";return function(t){var e,n,i,s,r,o,a,u,c,h,l,f,d,p,g,m;return e={initialize:!0,identify:_.stringify,datumTokenizer:null,queryTokenizer:null,sufficient:5,sorter:null,local:[],prefetch:null,remote:null},!(t=_.mixin(e,t||{})).datumTokenizer&&v.error("datumTokenizer is required"),!t.queryTokenizer&&v.error("queryTokenizer is required"),n=t.sorter,t.sorter=n?function(t){return t.sort(n)}:_.identity,t.local=_.isFunction(t.local)?t.local():t.local,t.prefetch=(i=t.prefetch)?(s={url:null,ttl:864e5,cache:!0,cacheKey:null,thumbprint:"",prepare:_.identity,transform:_.identity,transport:null},i=_.isString(i)?{url:i}:i,!(i=_.mixin(s,i)).url&&v.error("prefetch requires url to be set"),i.transform=i.filter||i.transform,i.cacheKey=i.cacheKey||i.url,i.thumbprint="0.11.1"+i.thumbprint,i.transport=i.transport?y(i.transport):v.ajax,i):null,t.remote=(r=t.remote)?(o={url:null,cache:!0,prepare:null,replace:null,wildcard:null,limiter:null,rateLimitBy:"debounce",rateLimitWait:300,transform:_.identity,transport:null},r=_.isString(r)?{url:r}:r,!(r=_.mixin(o,r)).url&&v.error("remote requires url to be set"),r.transform=r.filter||r.transform,r.prepare=(p=(d=r).prepare,g=d.replace,m=d.wildcard,p||(p=g?function(t,e){return e.url=g(e.url,t),e}:d.wildcard?function(t,e){return e.url=e.url.replace(m,encodeURIComponent(t)),e}:function(t,e){return e})),r.limiter=(u=(a=r).limiter,c=a.rateLimitBy,h=a.rateLimitWait,u||(u=/^throttle$/i.test(c)?(f=h,function(t){return _.throttle(t,f)}):(l=h,function(t){return _.debounce(t,l)})),u),r.transport=r.transport?y(r.transport):v.ajax,delete r.replace,delete r.wildcard,delete r.rateLimitBy,delete r.rateLimitWait,r):void 0,t};function y(n){return function(t){var e=v.Deferred();return n(t,function(t){_.defer(function(){e.resolve(t)})},function(t){_.defer(function(){e.reject(t)})}),e}}}();return function(){"use strict";var t;function e(t){t=u(t),this.sorter=t.sorter,this.identify=t.identify,this.sufficient=t.sufficient,this.local=t.local,this.remote=t.remote?new a(t.remote):null,this.prefetch=t.prefetch?new o(t.prefetch):null,this.index=new r({identify:this.identify,datumTokenizer:t.datumTokenizer,queryTokenizer:t.queryTokenizer}),!1!==t.initialize&&this.initialize()}return t=window&&window.Bloodhound,e.noConflict=function(){return window&&(window.Bloodhound=t),e}
1,e.tokenizers=n,_.mixin(e.prototype,{__ttAdapter:function(){var i=this;return this.remote?function(t,e,n){return i.search(t,e,n)}:function(t,e){return i.search(t,e)}},_loadPrefetch:function(){var n,t,i=this;return n=v.Deferred(),this.prefetch?(t=this.prefetch.fromCache())?(this.index.bootstrap(t),n.resolve()):this.prefetch.fromNetwork(function(t,e){if(t)return n.reject();i.add(e),i.prefetch.store(i.index.serialize()),n.resolve()}):n.resolve(),n.promise()},_initialize:function(){var t=this;return this.clear(),(this.initPromise=this._loadPrefetch()).done(function(){t.add(t.local)}),this.initPromise},initialize:function(t){return!this.initPromise||t?this._initialize():this.initPromise},add:function(t){return this.index.add(t),this},get:function(t){return t=_.isArray(t)?t:[].slice.call(arguments),this.index.get(t)},search:function(t,e,i){var s,r=this;return s=this.sorter(this.index.search(t)),e(this.remote?s.slice():s),this.remote&&s.length<this.sufficient?this.remote.get(t,function(t){var n=[];_.each(t,function(e){!_.some(s,function(t){return r.identify(e)===r.identify(t)})&&n.push(e)}),i&&i(n)}):this.remote&&this.remote.cancelLastRequest(),this},all:function(){return this.index.all()},clear:function(){return this.index.reset(),this},clearPrefetchCache:function(){return this.prefetch&&this.prefetch.clear(),this},clearRemoteCache:function(){return s.resetCache(),this},ttAdapter:function(){return this.__ttAdapter()}}),e}()}),function(t,e){"function"==typeof define&&define.amd?define("typeahead.js",["jquery"],function(t){return e(t)}):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(0,function(_){var b=function(){"use strict";return{isMsie:function(){return!!/(msie|trident)/i.test(navigator.userAgent)&&navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]},isBlankString:function(t){return!t||/^\s*$/.test(t)},escapeRegExChars:function(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isArray:_.isArray,isFunction:_.isFunction,isObject:_.isPlainObject,isUndefined:function(t){return void 0===t},isElement:function(t){return!(!t||1!==t.nodeType)},isJQuery:function(t){return t instanceof _},toStr:function(t){return b.isUndefined(t)||null===t?"":t+""},bind:_.proxy,each:function(t,n){_.each(t,function(t,e){return n(e,t)})},map:_.map,filter:_.grep,every:function(n,i){var s=!0;return n?(_.each(n,function(t,e){if(!(s=i.call(null,e,t,n)))return!1}),!!s):s},some:function(n,i){var s=!1;return n?(_.each(n,function(t,e){if(s=i.call(null,e,t,n))return!1}),!!s):s},mixin:_.extend,identity:function(t){return t},clone:function(t){return _.extend(!0,{},t)},getIdGenerator:function(){var t=0;return function(){return t++}},templatify:function(t){return _.isFunction(t)?t:function(){return String(t)}},defer:function(t){setTimeout(t,0)},debounce:function(s,r,o){var a,u;return function(){var t,e,n=this,i=arguments;return t=function(){a=null,o||(u=s.apply(n,i))},e=o&&!a,clearTimeout(a),a=setTimeout(t,r),e&&(u=s.apply(n,i)),u}},throttle:function(n,i){var s,r,o,a,u,c;return u=0,c=function(){u=new Date,o=null,a=n.apply(s,r)},function(){var t=new Date,e=i-(t-u);return s=this,r=arguments,e<=0?(clearTimeout(o),o=null,u=t,a=n.apply(s,r)):o||(o=setTimeout(c,e)),a}},stringify:function(t){return b.isString(t)?t:JSON.stringify(t)},noop:function(){}}}(),n=function(){"use strict";var a={wrapper:"twitter-typeahead",input:"tt-input",hint:"tt-hint",menu:"tt-menu",dataset:"tt-dataset",suggestion:"tt-suggestion",selectable:"tt-selectable",empty:"tt-empty",open:"tt-open",cursor:"tt-cursor",highlight:"tt-highlight"};return function(t){var e,n;return n=b.mixin({},a,t),{css:(e={css:(o={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},menu:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}},b.isMsie()&&b.mixin(o.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),o),classes:n,html:(r=n,{wrapper:'<span class="'+r.wrapper+'"></span>
1',menu:'<div class="'+r.menu+'"></div>'}),selectors:(i=n,s={},b.each(i,function(t,e){s[e]="."+t}),s)}).css,html:e.html,classes:e.classes,selectors:e.selectors,mixin:function(t){b.mixin(t,e)}};var i,s;var r;var o}}(),w=function(){"use strict";var n;function t(t){t&&t.el||_.error("EventBus initialized without el"),this.$el=_(t.el)}return"typeahead:",n={render:"rendered",cursorchange:"cursorchanged",select:"selected",autocomplete:"autocompleted"},b.mixin(t.prototype,{_trigger:function(t,e){var n;return n=_.Event("typeahead:"+t),(e=e||[]).unshift(n),this.$el.trigger.apply(this.$el,e),n},before:function(t){var e;return e=[].slice.call(arguments,1),this._trigger("before"+t,e).isDefaultPrevented()},trigger:function(t){var e;this._trigger(t,[].slice.call(arguments,1)),(e=n[t])&&this._trigger(e,[].slice.call(arguments,1))}}),t}(),e=function(){"use strict";var a=/\s+/,o=function(){var t;t=window.setImmediate?function(t){setImmediate(function(){t()})}:function(t){setTimeout(function(){t()},0)};return t}();return{onSync:function(t,e,n){return i.call(this,"sync",t,e,n)},onAsync:function(t,e,n){return i.call(this,"async",t,e,n)},off:function(t){var e;if(!this._callbacks)return this;t=t.split(a);for(;e=t.shift();)delete this._callbacks[e];return this},trigger:function(t){var e,n,i,s,r;if(!this._callbacks)return this;t=t.split(a),i=[].slice.call(arguments,1);for(;(e=t.shift())&&(n=this._callbacks[e]);)s=u(n.sync,this,[e].concat(i)),r=u(n.async,this,[e].concat(i)),s()&&o(r);return this}};function i(t,e,n,i){var s,r,o;if(!n)return this;for(e=e.split(a),n=i?(o=i,(r=n).bind?r.bind(o):function(){r.apply(o,[].slice.call(arguments,0))}):n,this._callbacks=this._callbacks||{};s=e.shift();)this._callbacks[s]=this._callbacks[s]||{sync:[],async:[]},this._callbacks[s][t].push(n);return this}function u(i,s,r){return function(){for(var t,e=0,n=i.length;!t&&e<n;e+=1)t=!1===i[e].apply(s,r);return!t}}}(),u=function(o){"use strict";var t={node:null,pattern:null,tagName:"strong",className:null,wordsOnly:!1,caseSensitive:!1};return function(s){var r;(s=b.mixin({},t,s)).node&&s.pattern&&(s.pattern=b.isArray(s.pattern)?s.pattern:[s.pattern],r=function(t,e,n){for(var i,s=[],r=0,o=t.length;r<o;r++)s.push(b.escapeRegExChars(t[r]));return i=n?"\\b("+s.join("|")+")\\b":"("+s.join("|")+")",e?new RegExp(i):new RegExp(i,"i")}(s.pattern,s.caseSensitive,s.wordsOnly),function t(e,n){var i;for(var s=0;s<e.childNodes.length;s++)3===(i=e.childNodes[s]).nodeType?s+=n(i)?1:0:t(i,n)}(s.node,function(t){var e,n,i;(e=r.exec(t.data))&&(i=o.createElement(s.tagName),s.className&&(i.className=s.className),(n=t.splitText(e.index)).splitText(e[0].length),i.appendChild(n.cloneNode(!0)),t.parentNode.replaceChild(i,n));return!!e}))}}(window.document),S=function(){"use strict";var r;function o(t,e){var n;(t=t||{}).input||_.error("input is missing"),e.mixin(this),this.$hint=_(t.hint),this.$input=_(t.input),this.query=this.$input.val(),this.queryWhenFocused=this.hasFocus()?this.query:null,this.$overflowHelper=(n=this.$input,_('<pre aria-hidden="true"></pre>').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:n.css("font-family"),fontSize:n.css("font-size"),fontStyle:n.css("font-style"),fontVariant:n.css("font-variant"),fontWeight:n.css("font-weight"),wordSpacing:n.css("word-spacing"),letterSpacing:n.css("letter-spacing"),textIndent:n.css("text-indent"),textRendering:n.css("text-rendering"),textTransform:n.css("text-transform")}).insertAfter(n)),this._checkLanguageDirection(),0===this.$hint.length&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=b.noop)}return r={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"},o.normalizeQuery=function(t){return b.toStr(t).replace(/^\s*/g,"").replace(/\s{2,}/g," ")},b.mixin(o.prototype,e,{_onBlur:function(){this.resetInputValue(),this.trigger("blurred")},_onFocus:function(){this.queryWhenFocused=this.query,this.trigger("focused")},_onKeydown:function(t){var e=r[t.which||t.keyCode];this._managePreventDefault(e,t),e&&this._shouldTrigger(e,t)&&this.trigger(e+"Keyed",t)},_onInput:function(){this._setQuery(this.getInputValue()),this.clearHintIfInvalid(),this._checkLanguageDirection()},_managePreventDefault:function(t,e){var n;switch(t){case"up":case"down":n=!i(e);break;default:n=!1}n&&e.preventDefault()},_shouldTrigger:function(t,e){var n;switch(t){case"tab":n=!i(e);break;default:n=!0}
1return n},_checkLanguageDirection:function(){var t=(this.$input.css("direction")||"ltr").toLowerCase();this.dir!==t&&(this.dir=t,this.$hint.attr("dir",t),this.trigger("langDirChanged",t))},_setQuery:function(t,e){var n,i,s,r;s=t,r=this.query,i=!!(n=o.normalizeQuery(s)===o.normalizeQuery(r))&&this.query.length!==t.length,this.query=t,e||n?!e&&i&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},bind:function(){var t,e,n,i,s=this;return t=b.bind(this._onBlur,this),e=b.bind(this._onFocus,this),n=b.bind(this._onKeydown,this),i=b.bind(this._onInput,this),this.$input.on("blur.tt",t).on("focus.tt",e).on("keydown.tt",n),!b.isMsie()||9<b.isMsie()?this.$input.on("input.tt",i):this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function(t){r[t.which||t.keyCode]||b.defer(b.bind(s._onInput,s,t))}),this},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getLangDir:function(){return this.dir},getQuery:function(){return this.query||""},setQuery:function(t,e){this.setInputValue(t),this._setQuery(t,e)},hasQueryChangedSinceLastFocus:function(){return this.query!==this.queryWhenFocused},getInputValue:function(){return this.$input.val()},setInputValue:function(t){this.$input.val(t),this.clearHintIfInvalid(),this._checkLanguageDirection()},resetInputValue:function(){this.setInputValue(this.query)},getHint:function(){return this.$hint.val()},setHint:function(t){this.$hint.val(t)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var t,e,n;n=(t=this.getInputValue())!==(e=this.getHint())&&0===e.indexOf(t),!(""!==t&&n&&!this.hasOverflow())&&this.clearHint()},hasFocus:function(){return this.$input.is(":focus")},hasOverflow:function(){var t=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=t},isCursorAtEnd:function(){var t,e,n;return t=this.$input.val().length,e=this.$input[0].selectionStart,b.isNumber(e)?e===t:!document.selection||((n=document.selection.createRange()).moveStart("character",-t),t===n.text.length)},destroy:function(){this.$hint.off(".tt"),this.$input.off(".tt"),this.$overflowHelper.remove(),this.$hint=this.$input=this.$overflowHelper=_("<div>")}}),o;function i(t){return t.altKey||t.ctrlKey||t.metaKey||t.shiftKey}}(),s=function(){"use strict";var o,a;function t(t,e){var n,i,s,r;(t=t||{}).templates=t.templates||{},t.templates.notFound=t.templates.notFound||t.templates.empty,t.source||_.error("missing source"),t.node||_.error("missing node"),t.name&&(n=t.name,!/^[_a-zA-Z0-9-]+$/.test(n))&&_.error("invalid dataset name: "+t.name),e.mixin(this),this.highlight=!!t.highlight,this.name=t.name||a(),this.limit=t.limit||5,this.displayFn=(i=(i=t.display||t.displayKey)||b.stringify,b.isFunction(i)?i:function(t){return t[i]}),this.templates=(s=t.templates,r=this.displayFn,{notFound:s.notFound&&b.templatify(s.notFound),pending:s.pending&&b.templatify(s.pending),header:s.header&&b.templatify(s.header),footer:s.footer&&b.templatify(s.footer),suggestion:s.suggestion||function(t){return _("<div>").text(r(t))}}),this.source=t.source.__ttAdapter?t.source.__ttAdapter():t.source,this.async=b.isUndefined(t.async)?2<this.source.length:!!t.async,this._resetLastSuggestion(),this.$el=_(t.node).addClass(this.classes.dataset).addClass(this.classes.dataset+"-"+this.name)}return o={val:"tt-selectable-display",obj:"tt-selectable-object"},a=b.getIdGenerator(),t.extractData=function(t){var e=_(t);return e.data(o.obj)?{val:e.data(o.val)||"",obj:e.data(o.obj)||null}:null},b.mixin(t.prototype,e,{_overwrite:function(t,e){(e=e||[]).length?this._renderSuggestions(t,e):this.async&&this.templates.pending?this._renderPending(t):!this.async&&this.templates.notFound?this._renderNotFound(t):this._empty(),this.trigger("rendered",this.name,e,!1)},_append:function(t,e){(e=e||[]).length&&this.$lastSuggestion.length?this._appendSuggestions(t,e):e.length?this._renderSuggestions(t,e):!this.$lastSuggestion.length&&this.templates.notFound&&this._renderNotFound(t),this.trigger("rendered",this.name,e,!0)},_renderSuggestions:function(t,e){var n;n=this._getSuggestionsFragment(t,e),this.$lastSuggestion=n.children().last(
1),this.$el.html(n).prepend(this._getHeader(t,e)).append(this._getFooter(t,e))},_appendSuggestions:function(t,e){var n,i;i=(n=this._getSuggestionsFragment(t,e)).children().last(),this.$lastSuggestion.after(n),this.$lastSuggestion=i},_renderPending:function(t){var e=this.templates.pending;this._resetLastSuggestion(),e&&this.$el.html(e({query:t,dataset:this.name}))},_renderNotFound:function(t){var e=this.templates.notFound;this._resetLastSuggestion(),e&&this.$el.html(e({query:t,dataset:this.name}))},_empty:function(){this.$el.empty(),this._resetLastSuggestion()},_getSuggestionsFragment:function(i,t){var s,r=this;return s=document.createDocumentFragment(),b.each(t,function(t){var e,n;n=r._injectQuery(i,t),e=_(r.templates.suggestion(n)).data(o.obj,t).data(o.val,r.displayFn(t)).addClass(r.classes.suggestion+" "+r.classes.selectable),s.appendChild(e[0])}),this.highlight&&u({className:this.classes.highlight,node:s,pattern:i}),_(s)},_getFooter:function(t,e){return this.templates.footer?this.templates.footer({query:t,suggestions:e,dataset:this.name}):null},_getHeader:function(t,e){return this.templates.header?this.templates.header({query:t,suggestions:e,dataset:this.name}):null},_resetLastSuggestion:function(){this.$lastSuggestion=_()},_injectQuery:function(t,e){return b.isObject(e)?b.mixin({_query:t},e):e},update:function(e){var n=this,i=!1,s=!1,r=0;function t(t){s||(s=!0,t=(t||[]).slice(0,n.limit),r=t.length,n._overwrite(e,t),r<n.limit&&n.async&&n.trigger("asyncRequested",e))}this.cancel(),this.cancel=function(){i=!0,n.cancel=_.noop,n.async&&n.trigger("asyncCanceled",e)},this.source(e,t,function(t){t=t||[],!i&&r<n.limit&&(n.cancel=_.noop,r+=t.length,n._append(e,t.slice(0,n.limit-r)),n.async&&n.trigger("asyncReceived",e))}),!s&&t([])},cancel:_.noop,clear:function(){this._empty(),this.cancel(),this.trigger("cleared")},isEmpty:function(){return this.$el.is(":empty")},destroy:function(){this.$el=_("<div>")}}),t}(),x=function(){"use strict";function t(t,n){var i=this;(t=t||{}).node||_.error("node is required"),n.mixin(this),this.$node=_(t.node),this.query=null,this.datasets=b.map(t.datasets,function(t){var e=i.$node.find(t.node).first();return t.node=e.length?e:_("<div>").appendTo(i.$node),new s(t,n)})}return b.mixin(t.prototype,e,{_onSelectableClick:function(t){this.trigger("selectableClicked",_(t.currentTarget))},_onRendered:function(t,e,n,i){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty()),this.trigger("datasetRendered",e,n,i)},_onCleared:function(){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty()),this.trigger("datasetCleared")},_propagate:function(){this.trigger.apply(this,arguments)},_allDatasetsEmpty:function(){return b.every(this.datasets,function(t){return t.isEmpty()})},_getSelectables:function(){return this.$node.find(this.selectors.selectable)},_removeCursor:function(){var t=this.getActiveSelectable();t&&t.removeClass(this.classes.cursor)},_ensureVisible:function(t){var e,n,i,s;n=(e=t.position().top)+t.outerHeight(!0),i=this.$node.scrollTop(),s=this.$node.height()+parseInt(this.$node.css("paddingTop"),10)+parseInt(this.$node.css("paddingBottom"),10),e<0?this.$node.scrollTop(i+e):s<n&&this.$node.scrollTop(i+(n-s))},bind:function(){var t,e=this;return t=b.bind(this._onSelectableClick,this),this.$node.on("click.tt",this.selectors.selectable,t),b.each(this.datasets,function(t){t.onSync("asyncRequested",e._propagate,e).onSync("asyncCanceled",e._propagate,e).onSync("asyncReceived",e._propagate,e).onSync("rendered",e._onRendered,e).onSync("cleared",e._onCleared,e)}),this},isOpen:function(){return this.$node.hasClass(this.classes.open)},open:function(){this.$node.addClass(this.classes.open)},close:function(){this.$node.removeClass(this.classes.open),this._removeCursor()},setLanguageDirection:function(t){this.$node.attr("dir",t)},selectableRelativeToCursor:function(t){var e,n,i;return n=this.getActiveSelectable(),e=this._getSelectables(),-1===(i=(i=((i=(n?e.index(n):-1)+t)+1)%(e.length+1)-1)<-1?e.length-1:i)?null:e.eq(i)},setCursor:function(t){this._removeCursor(),(t=t&&t.first())&&(t.addClass(this.classes.cursor),this._ensureVisible(t))},getSelectableData:function(t){return t&&t.length?s.extractData(t):null},getActiveSelectable:function(){var t=this._getSelectables().filter(this.selectors.cursor).first();return t.length?t:null},getTopSelectable:function(){var t=this._getSelectables().first();return t.length?t:null},update:function(e){var t=e!==this.query;return t&&(this.query=e,b.each(this.datasets,function(t){t.update(e)})),t},empty:function(){b.each(this.datasets,function(t){t.clear()}
1),this.query=null,this.$node.addClass(this.classes.empty)},destroy:function(){this.$node.off(".tt"),this.$node=_("<div>"),b.each(this.datasets,function(t){t.destroy()})}}),t}(),A=function(){"use strict";var e=x.prototype;function t(){x.apply(this,[].slice.call(arguments,0))}return b.mixin(t.prototype,x.prototype,{open:function(){return!this._allDatasetsEmpty()&&this._show(),e.open.apply(this,[].slice.call(arguments,0))},close:function(){return this._hide(),e.close.apply(this,[].slice.call(arguments,0))},_onRendered:function(){return this._allDatasetsEmpty()?this._hide():this.isOpen()&&this._show(),e._onRendered.apply(this,[].slice.call(arguments,0))},_onCleared:function(){return this._allDatasetsEmpty()?this._hide():this.isOpen()&&this._show(),e._onCleared.apply(this,[].slice.call(arguments,0))},setLanguageDirection:function(t){return this.$node.css("ltr"===t?this.css.ltr:this.css.rtl),e.setLanguageDirection.apply(this,[].slice.call(arguments,0))},_hide:function(){this.$node.hide()},_show:function(){this.$node.css("display","block")}}),t}(),k=function(){"use strict";function t(t,e){var n,i,s,r,o,a,u,c,h,l,f;(t=t||{}).input||_.error("missing input"),t.menu||_.error("missing menu"),t.eventBus||_.error("missing event bus"),e.mixin(this),this.eventBus=t.eventBus,this.minLength=b.isNumber(t.minLength)?t.minLength:1,this.input=t.input,this.menu=t.menu,this.enabled=!0,this.active=!1,this.input.hasFocus()&&this.activate(),this.dir=this.input.getLangDir(),this._hacks(),this.menu.bind().onSync("selectableClicked",this._onSelectableClicked,this).onSync("asyncRequested",this._onAsyncRequested,this).onSync("asyncCanceled",this._onAsyncCanceled,this).onSync("asyncReceived",this._onAsyncReceived,this).onSync("datasetRendered",this._onDatasetRendered,this).onSync("datasetCleared",this._onDatasetCleared,this),n=d(this,"activate","open","_onFocused"),i=d(this,"deactivate","_onBlurred"),s=d(this,"isActive","isOpen","_onEnterKeyed"),r=d(this,"isActive","isOpen","_onTabKeyed"),o=d(this,"isActive","_onEscKeyed"),a=d(this,"isActive","open","_onUpKeyed"),u=d(this,"isActive","open","_onDownKeyed"),c=d(this,"isActive","isOpen","_onLeftKeyed"),h=d(this,"isActive","isOpen","_onRightKeyed"),l=d(this,"_openIfActive","_onQueryChanged"),f=d(this,"_openIfActive","_onWhitespaceChanged"),this.input.bind().onSync("focused",n,this).onSync("blurred",i,this).onSync("enterKeyed",s,this).onSync("tabKeyed",r,this).onSync("escKeyed",o,this).onSync("upKeyed",a,this).onSync("downKeyed",u,this).onSync("leftKeyed",c,this).onSync("rightKeyed",h,this).onSync("queryChanged",l,this).onSync("whitespaceChanged",f,this).onSync("langDirChanged",this._onLangDirChanged,this)}return b.mixin(t.prototype,{_hacks:function(){var s,r;s=this.input.$input||_("<div>"),r=this.menu.$node||_("<div>"),s.on("blur.tt",function(t){var e,n,i;e=document.activeElement,n=r.is(e),i=0<r.has(e).length,b.isMsie()&&(n||i)&&(t.preventDefault(),t.stopImmediatePropagation(),b.defer(function(){s.focus()}))}),r.on("mousedown.tt",function(t){t.preventDefault()})},_onSelectableClicked:function(t,e){this.select(e)},_onDatasetCleared:function(){this._updateHint()},_onDatasetRendered:function(t,e,n,i){this._updateHint(),this.eventBus.trigger("render",n,i,e)},_onAsyncRequested:function(t,e,n){this.eventBus.trigger("asyncrequest",n,e)},_onAsyncCanceled:function(t,e,n){this.eventBus.trigger("asynccancel",n,e)},_onAsyncReceived:function(t,e,n){this.eventBus.trigger("asyncreceive",n,e)},_onFocused:function(){this._minLengthMet()&&this.menu.update(this.input.getQuery())},_onBlurred:function(){this.input.hasQueryChangedSinceLastFocus()&&this.eventBus.trigger("change",this.input.getQuery())},_onEnterKeyed:function(t,e){var n;(n=this.menu.getActiveSelectable())&&this.select(n)&&e.preventDefault()},_onTabKeyed:function(t,e){var n;(n=this.menu.getActiveSelectable())?this.select(n)&&e.preventDefault():(n=this.menu.getTopSelectable())&&this.autocomplete(n)&&e.preventDefault()},_onEscKeyed:function(){this.close()},_onUpKeyed:function(){this.moveCursor(-1)},_onDownKeyed:function(){this.moveCursor(1)},_onLeftKeyed:function(){"rtl"===this.dir&&this.input.isCursorAtEnd()&&this.autocomplete(this.menu.getTopSelectable())},_onRightKeyed:function(){"ltr"===this.dir&&this.input.isCursorAtEnd()&&this.autocomplete(this.menu.getTopSelectable())},_onQueryChanged:function(t,e){this._minLengthMet(e)?this.menu.update(e):this.menu.empty()},_onWhitespaceChanged:function(){this._updateHint()},_onLangDirChanged:function(t,e){this.dir!==e&&(this.dir=e,this.menu.setLanguageDirection(e))},_openIfActive:function(){this.isActive()&&this.open()},_minLengthMet:function(t){return(t=b.isString(t)?t:this.input.getQuery()||"").length>=this.minLength},_updateHint:function(){var t,e,n,i,s,r;t=this.menu.getTopSelectable(),e=this.menu.getSelectableData(t),n=this.input.getInputValue(),!e||b.isBlankString(n)||this.input.hasOverflow()?this.input.clearHint():(i=S.normalizeQuery(n),s=b.escapeRegExChars(i),(r=new RegExp("^(?:"+s+")(.+$)","i").exec(e.val))&&this.input.setHint(n+r[1]))},isEnabled:function(){return this.enabled},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},isActive:function(){return this.active},activate:function(){return!!this.isActive()||!(!this.isEnabled()||this.eventBus.before("active"))&&(this.active=!0,this.eventBus.trigger("active"),!0)},deactivate:function(){return!this.isActive()||!this.eventBus.before("idle")&&(this.active=!1,this.close(),this.eventBus.trigger("idle"),!0)},isOpen:function(){return this.menu.isOpen()},open:function(){return this.isOpen()||this.eventBus.before("open")||(this.menu.open(),this._updateHint(),this.eventBus.trigger("open")),this.isOpen()},close:function(){return this.isOpen()&&!this.eventBus.before("close")&&(this.menu.close(),this.input.clearHint(),this.input.resetInputValue(),this.eventBus.trigger("close")),!this.isOpen()},setVal:function(t){this.input.setQuery(b.toStr(t))},getVal:function(){return this.input.getQuery()},select:function(t){var e=this.menu.getSelectableData(t);return!(!e||this.eventBus.before("select",e.obj))&&(this.input.setQuery(e.val,!0),this.eventBus.trigger("select",e.obj),this.close(),!0)},autocomplete:function(t){var e,n;return e=this.input.getQuery(),!(!((n=this.menu.getSelectableData(t))&&e!==n.val)||this.eventBus.before("autocomplete",n.obj))&&(this.input.setQuery(n.val),this.eventBus.trigger("autocomplete",n.obj),!0)},moveCursor:function(t){var e,n,i,s;return e=this.input.getQuery(),n=this.menu.selectableRelativeToCursor(t),s=(i=this.menu.getSelectableData(n))?i.obj:null,!(this._minLengthMet()&&this.menu.update(e))&&!this.eventBus.before("cursorchange",s)&&(this.menu.setCursor(n),i?this.input.setInputValue(i.val):(this.input.resetInputValue(),this._updateHint()),this.eventBus.trigger("cursorchange",s),!0)},destroy:function(){this.input.destroy(),this.menu.destroy()}}),t;
1function d(n){var t=[].slice.call(arguments,1);return function(){var e=[].slice.call(arguments);b.each(t,function(t){return n[t].apply(n,e)})}}}();!function(){"use strict";var t,y,e;function i(t,n){t.each(function(){var t,e=_(this);(t=e.data(y.typeahead))&&n(t,e)})}function v(t){var e;return(e=b.isJQuery(t)||b.isElement(t)?_(t).first():[]).length?e:null}t=_.fn.typeahead,y={www:"tt-www",attrs:"tt-attrs",typeahead:"tt-typeahead"},e={initialize:function(p,g){var m;return g=b.isArray(g)?g:[].slice.call(arguments,1),m=n((p=p||{}).classNames),this.each(function(){var t,e,n,i,s,r,o,a,u,c,h;b.each(g,function(t){t.highlight=!!p.highlight}),t=_(this),e=_(m.html.wrapper),n=v(p.hint),i=v(p.menu),s=!1!==p.hint&&!n,r=!1!==p.menu&&!i,s&&(l=t,f=m,n=l.clone().addClass(f.classes.hint).removeData().css(f.css.hint).css((d=l,{backgroundAttachment:d.css("background-attachment"),backgroundClip:d.css("background-clip"),backgroundColor:d.css("background-color"),backgroundImage:d.css("background-image"),backgroundOrigin:d.css("background-origin"),backgroundPosition:d.css("background-position"),backgroundRepeat:d.css("background-repeat"),backgroundSize:d.css("background-size")})).prop("readonly",!0).removeAttr("id name placeholder required").attr({autocomplete:"disabled",spellcheck:"false",tabindex:-1})),r&&(i=_(m.html.menu).css(m.css.menu)),n&&n.val(""),t=function(t,e){t.data(y.attrs,{dir:t.attr("dir"),autocomplete:t.attr("autocomplete"),spellcheck:t.attr("spellcheck"),style:t.attr("style")}),t.addClass(e.classes.input).attr({autocomplete:"disabled",spellcheck:!1});try{!t.attr("dir")&&t.attr("dir","auto")}catch(t){}return t}(t,m),(s||r)&&(e.css(m.css.wrapper),t.css(s?m.css.input:m.css.inputWithNoHint),t.wrap(e).parent().prepend(s?n:null).append(r?i:null));var l,f,d;h=r?A:x,o=new w({el:t}),a=new S({hint:n,input:t},m),u=new h({node:i,datasets:g},m),c=new k({input:a,menu:u,eventBus:o,minLength:p.minLength},m),t.data(y.www,m),t.data(y.typeahead,c)})},isEnabled:function(){var e;return i(this.first(),function(t){e=t.isEnabled()}),e},enable:function(){return i(this,function(t){t.enable()}),this},disable:function(){return i(this,function(t){t.disable()}),this},isActive:function(){var e;return i(this.first(),function(t){e=t.isActive()}),e},activate:function(){return i(this,function(t){t.activate()}),this},deactivate:function(){return i(this,function(t){t.deactivate()}),this},isOpen:function(){var e;return i(this.first(),function(t){e=t.isOpen()}),e},open:function(){return i(this,function(t){t.open()}),this},close:function(){return i(this,function(t){t.close()}),this},select:function(t){var e=!1,n=_(t);return i(this.first(),function(t){e=t.select(n)}),e},autocomplete:function(t){var e=!1,n=_(t);return i(this.first(),function(t){e=t.autocomplete(n)}),e},moveCursor:function(e){var n=!1;return i(this.first(),function(t){n=t.moveCursor(e)}),n},val:function(e){var n;return arguments.length?(i(this,function(t){t.setVal(e)}),this):(i(this.first(),function(t){n=t.getVal()}),n)},destroy:function(){return i(this,function(t,e){var n,i,s;i=(n=e).data(y.www),s=n.parent().filter(i.selectors.wrapper),b.each(n.data(y.attrs),function(t,e){b.isUndefined(t)?n.removeAttr(e):n.attr(e,t)}),n.removeData(y.typeahead).removeData(y.www).removeData(y.attr).removeClass(i.classes.input),s.length&&(n.detach().insertAfter(s),s.remove()),t.destroy()}),this}},_.fn.typeahead=function(t){return e[t]?e[t].apply(this,[].slice.call(arguments,1)):e.initialize.apply(this,arguments)},_.fn.typeahead.noConflict=function(){return _.fn.typeahead=t,this}}()});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.