PageSourceSearch

https://www.alexmi.com/wp-content/plugins/placester/js/dist/typeahead.bundle.min.js?ver=1.1.27

js alexmi.com collected 2026-10-09 04:19:23 UTC 41,012 bytes, 2 lines download raw bytes

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

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.