PageSourceSearch

https://www.globallimos.com/public/review/js/typeahead.js

js globallimos.com collected 2026-10-05 17:37:27 UTC 21,254 bytes, 1 lines download raw bytes

1!function(t){var e,i,n,s,r,o={isMsie:function(){var t=/(msie) ([\w.]+)/i.exec(navigator.userAgent);return!!t&&parseInt(t[2],10)},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:t.isArray,isFunction:t.isFunction,isObject:t.isPlainObject,isUndefined:function(t){return void 0===t},bind:t.proxy,bindAll:function(e){var i;for(var n in e)t.isFunction(i=e[n])&&(e[n]=t.proxy(i,e))},indexOf:function(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1},each:t.each,map:t.map,filter:t.grep,every:function(e,i){var n=!0;return e?(t.each(e,function(t,s){if(!(n=i.call(null,s,t,e)))return!1}),!!n):n},some:function(e,i){var n=!1;return e?(t.each(e,function(t,s){if(n=i.call(null,s,t,e))return!1}),!!n):n},mixin:t.extend,getUniqueId:(e=0,function(){return e++}),defer:function(t){setTimeout(t,0)},debounce:function(t,e,i){var n,s;return function(){var r,o,u=this,a=arguments;return r=function(){n=null,i||(s=t.apply(u,a))},o=i&&!n,clearTimeout(n),n=setTimeout(r,e),o&&(s=t.apply(u,a)),s}},throttle:function(t,e){var i,n,s,r,o,u;return o=0,u=function(){o=new Date,s=null,r=t.apply(i,n)},function(){var a=new Date,c=e-(a-o);return i=this,n=arguments,c<=0?(clearTimeout(s),s=null,o=a,r=t.apply(i,n)):s||(s=setTimeout(u,c)),r}},tokenizeQuery:function(e){return t.trim(e).toLowerCase().split(/[\s]+/)},tokenizeText:function(e){return t.trim(e).toLowerCase().split(/[\s\-_]+/)},getProtocol:function(){return location.protocol},noop:function(){}},u=(i=/\s+/,{on:function(t,e){var n;if(!e)return this;for(this._callbacks=this._callbacks||{},t=t.split(i);n=t.shift();)this._callbacks[n]=this._callbacks[n]||[],this._callbacks[n].push(e);return this},trigger:function(t,e){var n,s;if(!this._callbacks)return this;for(t=t.split(i);n=t.shift();)if(s=this._callbacks[n])for(var r=0;r<s.length;r+=1)s[r].call(this,{type:n,data:e});return this}}),a=function(){function e(e){e&&e.el||t.error("EventBus initialized without el"),this.$el=t(e.el)}return o.mixin(e.prototype,{trigger:function(t){var e=[].slice.call(arguments,1);this.$el.trigger("typeahead:"+t,e)}}),e}(),c=function(){var t,e;try{(t=window.localStorage).setItem("~~~","!"),t.removeItem("~~~")}catch(e){t=null}function i(t){this.prefix=["__",t,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+this.prefix)}return e=t&&window.JSON?{_prefix:function(t){return this.prefix+t},_ttlKey:function(t){return this._prefix(t)+this.ttlKey},get:function(e){return this.isExpired(e)&&this.remove(e),r(t.getItem(this._prefix(e)))},set:function(e,i,r){return o.isNumber(r)?t.setItem(this._ttlKey(e),s(n()+r)):t.removeItem(this._ttlKey(e)),t.setItem(this._prefix(e),s(i))},remove:function(e){return t.removeItem(this._ttlKey(e)),t.removeItem(this._prefix(e)),this},clear:function(){var e,i,n=[],s=t.length;for(e=0;e<s;e++)(i=t.key(e)).match(this.keyMatcher)&&n.push(i.replace(this.keyMatcher,""));for(e=n.length;e--;)this.remove(n[e]);return this},isExpired:function(e){var i=r(t.getItem(this._ttlKey(e)));return!!(o.isNumber(i)&&n()>i)}}:{get:o.noop,set:o.noop,remove:o.noop,clear:o.noop,isExpired:o.noop},o.mixin(i.prototype,e),i;function n(){return(new Date).getTime()}function s(t){return JSON.stringify(o.isUndefined(t)?null:t)}function r(t){return JSON.parse(t)}}(),h=function(){function t(t){o.bindAll(this),t=t||{},this.sizeLimit=t.sizeLimit||10,this.cache={},this.cachedKeysByAge=[]}return o.mixin(t.prototype,{get:function(t){return this.cache[t]},set:function(t,e){var i;this.cachedKeysByAge.length===this.sizeLimit&&(i=this.cachedKeysByAge.shift(),delete this.cache[i]),this.cache[t]=e,this.cachedKeysByAge.push(t)}}),t}(),l=function(){var e,i,n=0,s={};function r(t){o.bindAll(this),t=o.isString(t)?{url:t}:t,i=i||new h,e=o.isNumber(t.maxParallelRequests)?t.maxParallelRequests:e||6,this.url=t.url,this.wildcard=t.wildcard||"%QUERY",this.filter=t.filter,this.replace=t.replace,this.ajaxSettings={type:"get",cache:t.cache,timeout:t.timeout,dataType:t.dataType||"json",beforeSend:t.beforeSend},this._get=(/^throttle$/i.test(t.rateLimitFn)?o.throttle:o.debounce)(this._get,t.rateLimitWait||300)}return o.mixin(r.prototype,{_get:function(t,s){var r=this;n<e?this._sendRequest(t).done(function(e){var n=r.filter?r.filter(e):e;s&&s(n),i.set(t,e)}):this.onDeckRequestArgs=[].slice.call(arguments,0)},_sendRequest:function(e){var i=this,r=s[e];return r||(n++,r=s[e]=t.ajax(e,this.ajaxSettings).always(function(){n--,s[e]=null,i.onDeckRequestArgs&&(i._get.apply(i,i.onDeckRequestArgs),i.onDeckRequestArgs=null)})),r},get:function(t,e){var n,s,r=this,u=encodeURIComponent(t||"");return e=e||o.noop,n=this.replace?this.replace(this.url,u):this.url.replace(this.wildcard,u),(s=i.get(n))?o.defer(function(){e(r.filter?r.filter(s):s)}):this._get(n,e),!!s}}),r}(),d=function(){var e={thumbprint:"thumbprint",protocol:"protocol",itemHash:"itemHash",adjacencyList:"adjacencyList"};function i(e){o.bindAll(this),o.isString(e.template)&&!e.engine&&t.error("no template engine specified"),e.local||e.prefetch||e.remote||t.error("one of local, prefetch, or remote is required"),this.name=e.name||o.getUniqueId(),this.limit=e.limit||5,this.minLength=e.minLength||1,this.header=e.header,this.footer=e.footer,this.valueKey=e.valueKey||"value",this.template=function(t,e,
1i){var n,s;o.isFunction(t)?n=t:o.isString(t)?(s=e.compile(t),n=o.bind(s.render,s)):n=function(t){return"<p>"+t[i]+"</p>"};return n}(e.template,e.engine,this.valueKey),this.local=e.local,this.prefetch=e.prefetch,this.remote=e.remote,this.itemHash={},this.adjacencyList={},this.storage=e.name?new c(e.name):null}return o.mixin(i.prototype,{_processLocalData:function(t){this._mergeProcessedData(this._processData(t))},_loadPrefetchData:function(i){var n,s,r,u,a,c,h=this,l="0.9.3"+(i.thumbprint||"");return this.storage&&(n=this.storage.get(e.thumbprint),s=this.storage.get(e.protocol),r=this.storage.get(e.itemHash),u=this.storage.get(e.adjacencyList)),a=n!==l||s!==o.getProtocol(),(i=o.isString(i)?{url:i}:i).ttl=o.isNumber(i.ttl)?i.ttl:864e5,r&&u&&!a?(this._mergeProcessedData({itemHash:r,adjacencyList:u}),c=t.Deferred().resolve()):c=t.getJSON(i.url).done(function(t){var n=i.filter?i.filter(t):t,s=h._processData(n),r=s.itemHash,u=s.adjacencyList;h.storage&&(h.storage.set(e.itemHash,r,i.ttl),h.storage.set(e.adjacencyList,u,i.ttl),h.storage.set(e.thumbprint,l,i.ttl),h.storage.set(e.protocol,o.getProtocol(),i.ttl));h._mergeProcessedData(s)}),c},_transformDatum:function(t){var e=o.isString(t)?t:t[this.valueKey],i={value:e,tokens:t.tokens||o.tokenizeText(e)};return o.isString(t)?(i.datum={},i.datum[this.valueKey]=t):i.datum=t,i.tokens=o.filter(i.tokens,function(t){return!o.isBlankString(t)}),i.tokens=o.map(i.tokens,function(t){return t.toLowerCase()}),i},_processData:function(t){var e=this,i={},n={};return o.each(t,function(t,s){var r=e._transformDatum(s),u=o.getUniqueId(r.value);i[u]=r,o.each(r.tokens,function(t,e){var i=e.charAt(0),s=n[i]||(n[i]=[u]);!~o.indexOf(s,u)&&s.push(u)})}),{itemHash:i,adjacencyList:n}},_mergeProcessedData:function(t){var e=this;o.mixin(this.itemHash,t.itemHash),o.each(t.adjacencyList,function(t,i){var n=e.adjacencyList[t];e.adjacencyList[t]=n?n.concat(i):i})},_getLocalSuggestions:function(t){var e,i=this,n=[],s=[],r=[];return o.each(t,function(t,e){var i=e.charAt(0);!~o.indexOf(n,i)&&n.push(i)}),o.each(n,function(t,n){var r=i.adjacencyList[n];if(!r)return!1;s.push(r),(!e||r.length<e.length)&&(e=r)}),s.length<n.length?[]:(o.each(e,function(e,n){var u=i.itemHash[n];o.every(s,function(t){return~o.indexOf(t,n)})&&o.every(t,function(t){return o.some(u.tokens,function(e){return 0===e.indexOf(t)})})&&r.push(u)}),r)},initialize:function(){var e;return this.local&&this._processLocalData(this.local),this.transport=this.remote?new l(this.remote):null,e=this.prefetch?this._loadPrefetchData(this.prefetch):t.Deferred().resolve(),this.local=this.prefetch=this.remote=null,this.initialize=function(){return e},e},getSuggestions:function(t,e){var i,n,s=this,r=!1;t.length<this.minLength||(i=o.tokenizeQuery(t),(n=this._getLocalSuggestions(i).slice(0,this.limit)).length<this.limit&&this.transport&&(r=this.transport.get(t,function(t){n=n.slice(0),o.each(t,function(t,e){var i=s._transformDatum(e);return!o.some(n,function(t){return i.value===t.value})&&n.push(i),n.length<s.limit}),e&&e(n)})),!r&&e&&e(n))}}),i}(),p=function(){function e(e){var i,n=this;o.bindAll(this),this.specialKeyCodeMap={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"},this.$hint=t(e.hint),this.$input=t(e.input).on("blur.tt",this._handleBlur).on("focus.tt",this._handleFocus).on("keydown.tt",this._handleSpecialKeyEvent),o.isMsie()?this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function(t){n.specialKeyCodeMap[t.which||t.keyCode]||o.defer(n._compareQueryToInputValue)}):this.$input.on("input.tt",this._compareQueryToInputValue),this.query=this.$input.val(),this.$overflowHelper=(i=this.$input,t("<span></span>").css({position:"absolute",left:"-9999px",visibility:"hidden",whiteSpace:"nowrap",fontFamily:i.css("font-family"),fontSize:i.css("font-size"),fontStyle:i.css("font-style"),fontVariant:i.css("font-variant"),fontWeight:i.css("font-weight"),wordSpacing:i.css("word-spacing"),letterSpacing:i.css("letter-spacing"),textIndent:i.css("text-indent"),textRendering:i.css("text-rendering"),textTransform:i.css("text-transform")}).insertAfter(i))}return o.mixin(e.prototype,u,{_handleFocus:function(){this.trigger("focused")},_handleBlur:function(){this.trigger("blured")},_handleSpecialKeyEvent:function(t){var e=this.specialKeyCodeMap[t.which||t.keyCode];e&&this.trigger(e+"Keyed",t)},_compareQueryToInputValue:function(){var t,e,i=this.getInputValue(),n=(t=this.query,e=i,t=(t||"").replace(/^\s*/g,"").replace(/\s{2,}/g," "),e=(e||"").replace(/^\s*/g,"").replace(/\s{2,}/g," "),t===e);!!n&&this.query.length!==i.length?this.trigger("whitespaceChanged",{value:this.query}):n||this.trigger("queryChanged",{value:this.query=i})},destroy:function(){this.$hint.off(".tt"),this.$input.off(".tt"),this.$hint=this.$input
1=this.$overflowHelper=null},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getQuery:function(){return this.query},setQuery:function(t){this.query=t},getInputValue:function(){return this.$input.val()},setInputValue:function(t,e){this.$input.val(t),!e&&this._compareQueryToInputValue()},getHintValue:function(){return this.$hint.val()},setHintValue:function(t){this.$hint.val(t)},getLanguageDirection:function(){return(this.$input.css("direction")||"ltr").toLowerCase()},isOverflow:function(){return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>this.$input.width()},isCursorAtEnd:function(){var t,e=this.$input.val().length,i=this.$input[0].selectionStart;return o.isNumber(i)?i===e:!document.selection||((t=document.selection.createRange()).moveStart("character",-e),e===t.text.length)}}),e}(),g=function(){var e='<span class="tt-suggestions"></span>',i={display:"block"},n={whiteSpace:"nowrap",cursor:"pointer"},s={whiteSpace:"normal"};function r(e){o.bindAll(this),this.isOpen=!1,this.isEmpty=!0,this.isMouseOverDropdown=!1,this.$menu=t(e.menu).on("mouseenter.tt",this._handleMouseenter).on("mouseleave.tt",this._handleMouseleave).on("click.tt",".tt-suggestion",this._handleSelection).on("mouseover.tt",".tt-suggestion",this._handleMouseover)}return o.mixin(r.prototype,u,{_handleMouseenter:function(){this.isMouseOverDropdown=!0},_handleMouseleave:function(){this.isMouseOverDropdown=!1},_handleMouseover:function(e){var i=t(e.currentTarget);this._getSuggestions().removeClass("tt-is-under-cursor"),i.addClass("tt-is-under-cursor")},_handleSelection:function(e){var i=t(e.currentTarget);this.trigger("suggestionSelected",a(i))},_show:function(){this.$menu.css("display","block")},_hide:function(){this.$menu.hide()},_moveCursor:function(t){var e,i,n,s;this.isVisible()&&((i=(e=this._getSuggestions()).filter(".tt-is-under-cursor")).removeClass("tt-is-under-cursor"),-1!==(n=((n=e.index(i)+t)+1)%(e.length+1)-1)?(n<-1&&(n=e.length-1),s=e.eq(n).addClass("tt-is-under-cursor"),this._ensureVisibility(s),this.trigger("cursorMoved",a(s))):this.trigger("cursorRemoved"))},_getSuggestions:function(){return this.$menu.find(".tt-suggestions > .tt-suggestion")},_ensureVisibility:function(t){var e=this.$menu.height()+parseInt(this.$menu.css("paddingTop"),10)+parseInt(this.$menu.css("paddingBottom"),10),i=this.$menu.scrollTop(),n=t.position().top,s=n+t.outerHeight(!0);n<0?this.$menu.scrollTop(i+n):e<s&&this.$menu.scrollTop(i+(s-e))},destroy:function(){this.$menu.off(".tt"),this.$menu=null},isVisible:function(){return this.isOpen&&!this.isEmpty},closeUnlessMouseIsOverDropdown:function(){this.isMouseOverDropdown||this.close()},close:function(){this.isOpen&&(this.isOpen=!1,this.isMouseOverDropdown=!1,this._hide(),this.$menu.find(".tt-suggestions > .tt-suggestion").removeClass("tt-is-under-cursor"),this.trigger("closed"))},open:function(){this.isOpen||(this.isOpen=!0,!this.isEmpty&&this._show(),this.trigger("opened"))},setLanguageDirection:function(t){"ltr"===t?this.$menu.css({left:"0",right:"auto"}):this.$menu.css({left:"auto",right:" 0"})},moveCursorUp:function(){this._moveCursor(-1)},moveCursorDown:function(){this._moveCursor(1)},getSuggestionUnderCursor:function(){var t=this._getSuggestions().filter(".tt-is-under-cursor").first();return t.length>0?a(t):null},getFirstSuggestion:function(){var t=this._getSuggestions().first();return t.length>0?a(t):null},renderSuggestions:function(r,u){var a,c,h,l,d,p="tt-dataset-"+r.name,g=this.$menu.find("."+p);0===g.length&&(c=t(e).css(i),g=t("<div></div>").addClass(p).append(r.header).append(c).append(r.footer).appendTo(this.$menu)),u.length>0?(this.isEmpty=!1,this.isOpen&&this._show(),h=document.createElement("div"),l=document.createDocumentFragment(),o.each(u,function(e,i){i.dataset=r.name,a=r.template(i.datum),h.innerHTML='<div class="tt-suggestion">%body</div>'.replace("%body",a),(d=t(h.firstChild).css(n).data("suggestion",i)).children().each(function(){t(this).css(s)}),l.appendChild(d[0])}),g.show().find(".tt-suggestions").html(l)):this.clearSuggestions(r.name),this.trigger("suggestionsRendered")},clearSuggestions:function(t){var e=t?this.$menu.find(".tt-dataset-"+t):this.$menu.find('[class^="tt-dataset-"]'),i=e.find(".tt-suggestions");e.hide(),i.empty(),0===this._getSuggestions().length&&(this.isEmpty=!0,this._hide())}}),r;function a(t){return t.data("suggestion")}}
1(),f=function(){var e={wrapper:'<span class="twitter-typeahead"></span>',hint:'<input class="tt-hint" type="text" autocomplete="off" spellcheck="off" disabled>',dropdown:'<span class="tt-dropdown-menu"></span>'},i={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none"},query:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"}};function n(n){var s,r,u;o.bindAll(this),this.$node=function(n){var s=t(e.wrapper),r=t(e.dropdown),o=t(n),u=t(e.hint);s=s.css(i.wrapper),r=r.css(i.dropdown),u.css(i.hint).css({backgroundAttachment:o.css("background-attachment"),backgroundClip:o.css("background-clip"),backgroundColor:o.css("background-color"),backgroundImage:o.css("background-image"),backgroundOrigin:o.css("background-origin"),backgroundPosition:o.css("background-position"),backgroundRepeat:o.css("background-repeat"),backgroundSize:o.css("background-size")}),o.data("ttAttrs",{dir:o.attr("dir"),autocomplete:o.attr("autocomplete"),spellcheck:o.attr("spellcheck"),style:o.attr("style")}),o.addClass("tt-query").attr({autocomplete:"off",spellcheck:!1}).css(i.query);try{!o.attr("dir")&&o.attr("dir","auto")}catch(t){}return o.wrap(s).parent().prepend(u).append(r)}(n.input),this.datasets=n.datasets,this.dir=null,this.eventBus=n.eventBus,s=this.$node.find(".tt-dropdown-menu"),r=this.$node.find(".tt-query"),u=this.$node.find(".tt-hint"),this.dropdownView=new g({menu:s}).on("suggestionSelected",this._handleSelection).on("cursorMoved",this._clearHint).on("cursorMoved",this._setInputValueToSuggestionUnderCursor).on("cursorRemoved",this._setInputValueToQuery).on("cursorRemoved",this._updateHint).on("suggestionsRendered",this._updateHint).on("opened",this._updateHint).on("closed",this._clearHint).on("opened closed",this._propagateEvent),this.inputView=new p({input:r,hint:u}).on("focused",this._openDropdown).on("blured",this._closeDropdown).on("blured",this._setInputValueToQuery).on("enterKeyed tabKeyed",this._handleSelection).on("queryChanged",this._clearHint).on("queryChanged",this._clearSuggestions).on("queryChanged",this._getSuggestions).on("whitespaceChanged",this._updateHint).on("queryChanged whitespaceChanged",this._openDropdown).on("queryChanged whitespaceChanged",this._setLanguageDirection).on("escKeyed",this._closeDropdown).on("escKeyed",this._setInputValueToQuery).on("tabKeyed upKeyed downKeyed",this._managePreventDefault).on("upKeyed downKeyed",this._moveDropdownCursor).on("upKeyed downKeyed",this._openDropdown).on("tabKeyed leftKeyed rightKeyed",this._autocomplete)}return o.isMsie()&&o.mixin(i.query,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),o.isMsie()&&o.isMsie()<=7&&(o.mixin(i.wrapper,{display:"inline",zoom:"1"}),o.mixin(i.query,{marginTop:"-1px"})),o.mixin(n.prototype,u,{_managePreventDefault:function(t){var e,i,n=t.data,s=!1;switch(t.type){case"tabKeyed":e=this.inputView.getHintValue(),i=this.inputView.getInputValue(),s=e&&e!==i;break;case"upKeyed":case"downKeyed":s=!n.shiftKey&&!n.ctrlKey&&!n.metaKey}s&&n.preventDefault()},_setLanguageDirection:function(){var t=this.inputView.getLanguageDirection();t!==this.dir&&(this.dir=t,this.$node.css("direction",t),this.dropdownView.setLanguageDirection(t))},_updateHint:function(){var t,e,i,n,s=this.dropdownView.getFirstSuggestion(),r=s?s.value:null,u=this.dropdownView.isVisible(),a=this.inputView.isOverflow();r&&u&&!a&&(e=(t=this.inputView.getInputValue()).replace(/\s{2,}/g," ").replace(/^\s+/g,""),i=o.escapeRegExChars(e),n=new RegExp("^(?:"+i+")(.*$)","i").exec(r),this.inputView.setHintValue(t+(n?n[1]:"")))},_clearHint:function(){this.inputView.setHintValue("")},_clearSuggestions:function(){this.dropdownView.clearSuggestions()},_setInputValueToQuery:function(){this.inputView.setInputValue(this.inputView.getQuery())},_setInputValueToSuggestionUnderCursor:function(t){var e=t.data;this.inputView.setInputValue(e.value,!0)},_openDropdown:function(){this.dropdownView.open()},_closeDropdown:function(t){this.dropdownView["blured"===t.type?"closeUnlessMouseIsOverDropdown":"close"]()},_moveDropdownCursor:function(t){var e=t.data;e.shiftKey||e.ctrlKey||e.metaKey||this.dropdownView["upKeyed"===t.type?"moveCursorUp":"moveCursorDown"]()},_handleSelection:function(t){var e="suggestionSelected"===t.type,i=e?t.data:this.dropdownView.getSuggestionUnderCursor();
1i&&(this.inputView.setInputValue(i.value),e?this.inputView.focus():t.data.preventDefault(),e&&o.isMsie()?o.defer(this.dropdownView.close):this.dropdownView.close(),this.eventBus.trigger("selected",i.datum,i.dataset))},_getSuggestions:function(){var t=this,e=this.inputView.getQuery();o.isBlankString(e)||o.each(this.datasets,function(i,n){n.getSuggestions(e,function(i){e===t.inputView.getQuery()&&t.dropdownView.renderSuggestions(n,i)})})},_autocomplete:function(t){var e,i,n,s,r;("rightKeyed"!==t.type&&"leftKeyed"!==t.type||(e=this.inputView.isCursorAtEnd(),i="ltr"===this.inputView.getLanguageDirection()?"leftKeyed"===t.type:"rightKeyed"===t.type,e&&!i))&&(n=this.inputView.getQuery(),""!==(s=this.inputView.getHintValue())&&n!==s&&(r=this.dropdownView.getFirstSuggestion(),this.inputView.setInputValue(r.value),this.eventBus.trigger("autocompleted",r.datum,r.dataset)))},_propagateEvent:function(t){this.eventBus.trigger(t.type)},destroy:function(){var t,e;this.inputView.destroy(),this.dropdownView.destroy(),t=this.$node,e=t.find(".tt-query"),o.each(e.data("ttAttrs"),function(t,i){o.isUndefined(i)?e.removeAttr(t):e.attr(t,i)}),e.detach().removeData("ttAttrs").removeClass("tt-query").insertAfter(t),t.remove(),this.$node=null},setQuery:function(t){this.inputView.setQuery(t),this.inputView.setInputValue(t),this._clearHint(),this._clearSuggestions(),this._getSuggestions()}}),n}();s={},r="ttView",n={initialize:function(e){var i;return 0===(e=o.isArray(e)?e:[e]).length&&t.error("no datasets provided"),i=o.map(e,function(t){var e=s[t.name]?s[t.name]:new d(t);return t.name&&(s[t.name]=e),e}),this.each(function(){var e,n=t(this),s=new a({el:n});e=o.map(i,function(t){return t.initialize()}),n.data(r,new f({input:n,eventBus:s=new a({el:n}),datasets:i})),t.when.apply(t,e).always(function(){o.defer(function(){s.trigger("initialized")})})})},destroy:function(){return this.each(function(){var e=t(this),i=e.data(r);i&&(i.destroy(),e.removeData(r))})},setQuery:function(e){return this.each(function(){var i=t(this).data(r);i&&i.setQuery(e)})}},jQuery.fn.typeahead=function(t){return n[t]?n[t].apply(this,[].slice.call(arguments,1)):n.initialize.apply(this,arguments)}}(window.jQuery);

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.