forked from agarzola/jQueryAutocompletePlugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jquery.autocomplete.pack.js
14 lines (14 loc) · 8.8 KB
/
jquery.autocomplete.pack.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/*
* jQuery Autocomplete plugin 1.2.2
*
* Copyright (c) 2009 Jörn Zaefferer
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* With small modifications by Alfonso Gómez-Arzola.
* See changelog for details.
*
*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';(5($){$.1n.1S({1l:5(28,3){6 1Z=P 28=="2f";3=$.1S({},$.Q.2h,{18:1Z?28:E,7:1Z?E:28,1P:1Z?$.Q.2h.1P:10,O:3&&!3.1V?10:4Y,2q:"4Q 4K."},3);3.2c=3.2c||5(e){a e};3.1Q=3.1Q||3.2w;a o.N(5(){2x $.Q(o,3)})},y:5(20){a o.1b("y",20)},1L:5(20){a o.1c("1L",[20])},2A:5(){a o.1c("2A")},2B:5(3){a o.1c("2B",[3])},2D:5(){a o.1c("2D")}});$.Q=5(g,3){6 H={3w:38,3t:40,3n:46,3m:9,3l:13,3k:27,3j:4B,3h:33,3e:34,3c:8};6 2b=E;4(3.1G!=E&&P 3.1G=="5"){2b=3.1G}6 $g=$(g).47("1l","54").T(3.36);6 1p;6 12="";6 1D=$.Q.35(3);6 1h=0;6 21;6 15={1B:p};6 h=$.Q.31(3,g,2S,15);6 2e;2T.2V.1v("3u")!=-1&&$(g.30).1b("4o.1l",5(){4(2e){2e=p;a p}});$g.1b((2T.2V.1v("3u")!=-1&&!\'4r\'2Q 4m?"4A":"42")+".1l",5(t){1h=1;21=t.3y;4n(t.3y){Y H.3w:4(h.I()){t.1r();h.3A()}j{Z(0,w)}W;Y H.3t:4(h.I()){t.1r();h.3B()}j{Z(0,w)}W;Y H.3h:4(h.I()){t.1r();h.3K()}j{Z(0,w)}W;Y H.3e:4(h.I()){t.1r();h.3P()}j{Z(0,w)}W;Y 3.1m&&$.1A(3.U)==","&&H.3j:Y H.3m:Y H.3l:4(2S()){t.1r();2e=w;a p}W;Y H.3k:h.16();W;4S:2o(1p);1p=2n(Z,3.1P);W}}).2m(5(){1h++}).50(5(){1h=0;4(!15.1B){3U()}}).3V(5(){4(3.2X){4(!h.I()){Z(0,w)}}j{4(1h++>1&&!h.I()){Z(0,w)}}}).1b("1L",5(){6 1n=(24.f>1)?24[1]:E;5 2K(q,7){6 y;4(7&&7.f){1j(6 i=0;i<7.f;i++){4(7[i].y.M()==q.M()){y=7[i];W}}}4(P 1n=="5")1n(y);j $g.1c("y",y&&[y.7,y.e])}$.N(17($g.L()),5(i,e){2g(e,2K,2K)})}).1b("2A",5(){1D.1O()}).1b("2B",5(){$.1S(w,3,24[1]);4("7"2Q 24[1])1D.1I()}).1b("2D",5(){h.23();$g.23();$(g.30).23(".1l")});5 2S(){6 F=h.F();4(!F)a p;6 v=F.y;12=v;4(3.1m){6 A=17($g.L());4(A.f>1){6 3Q=3.U.f;6 1F=$(g).1k().C;6 2p,1W=0;$.N(A,5(i,1y){1W+=1y.f;4(1F<=1W){2p=i;a p}1W+=3Q});A[2p]=v;v=A.3M(3.U)}v+=3.U}$g.L(v);1x();$g.1c("y",[F.7,F.e]);a w}5 Z(4u,3D){4(21==H.3n){h.16();a}6 S=$g.L();4(!3D&&S==12)a;12=S;S=1E(S);4(S.f>=3.2y){$g.T(3.2z);4(!3.26)S=S.M();2g(S,3z,1x)}j{22();h.16()}};5 17(e){4(!e)a[""];4(!3.1m)a[$.1A(e)];a $.4k(e.2E(3.U),5(1y){a $.1A(e).f?$.1A(1y):E})}5 1E(e){4(!3.1m)a e;6 A=17(e);4(A.f==1)a A[0];6 1F=$(g).1k().C;4(1F==e.f){A=17(e)}j{A=17(e.2F(e.3p(1F),""))}a A[A.f-1]}5 1U(q,2I){4(3.1U&&(1E($g.L()).M()==q.M())&&21!=H.3c){$g.L($g.L()+2I.3p(1E(12).f));$(g).1k(12.f,12.f+2I.f)}};5 3U(){2o(1p);1p=2n(1x,53)};5 1x(){6 4L=h.I();h.16();2o(1p);22();4(3.3i){$g.1L(5(y){4(!y){4(3.1m){6 A=17($g.L()).1s(0,-1);$g.L(A.3M(3.U)+(A.f?3.U:""))}j{$g.L("");$g.1c("y",E)}}})}};5 3z(q,7){4(7&&7.f&&1h){22();h.3d(7,q);1U(q,7[0].e);h.2O()}j{1x()}};5 2g(z,1t,1G){4(!3.26)z=z.M();6 7=1D.37(z);4(7){4(7.f){1t(z,7)}j{6 R=3.19&&3.19(3.2q)||19(3.2q);1t(z,R)}}j 4((P 3.18=="2f")&&(3.18.f>0)){6 1u={48:+2x 52()};$.N(3.1u,5(3s,1R){1u[3s]=P 1R=="5"?1R():1R});$.4b({4d:"4s",4y:"1l"+g.4X,2Y:3.2Y,18:3.18,7:$.1S({q:1E(z),44:3.O},1u),1t:5(7){6 R=3.19&&3.19(7)||19(7);1D.1w(z,R);1t(z,R)}})}j{h.2Z();4(2b!=E){2b()}j{1G(z)}}};5 19(7){6 R=[];6 2U=7.2E("\\n");1j(6 i=0;i<2U.f;i++){6 B=$.1A(2U[i]);4(B){B=B.2E("|");R[R.f]={7:B,e:B[0],y:3.2d&&3.2d(B,B[0])||B[0]}}}a R};5 22(){$g.1z(3.2z)}};$.Q.2h={36:"4t",32:"4E",2z:"4F",2y:1,1P:4N,26:p,1C:w,1T:p,1q:55,O:43,3i:p,1u:{},2R:w,2w:5(B){a B[0]},1Q:E,1U:p,G:0,1m:p,U:" ",39:w,2X:p,2c:5(e,z){a e.2F(2x 4a("(?![^&;]+;)(?!<[^<>]*)("+z.2F(/([\\^\\$\\(\\)\\[\\]\\{\\}\\*\\.\\+\\?\\|\\\\])/3a,"\\\\$1")+")(?![^<>]*>)(?![^&;]+;)","3a"),"<3b>$1</3b>")},1V:w,29:4l,2P:w};$.Q.35=5(3){6 7={};6 f=0;5 1C(s,2N){4(!3.26)s=s.M();6 i=s.1v(2N);4(3.1T=="1y"){i=s.M().1L("\\\\b"+2N.M())}4(i==-1)a p;a i==0||3.1T};5 1w(q,e){4(f>3.1q){1O()}4(!7[q]){f++}7[q]=e}5 1I(){4(!3.7)a p;6 1d={},3f=0;4(!3.18)3.1q=1;1d[""]=[];1j(6 i=0,3g=3.7.f;i<3g;i++){6 X=3.7[i];X=(P X=="2f")?[X]:X;6 e=3.1Q(X,i+1,3.7.f);4(P(e)===\'1H\'||e===p)2M;6 1X=e.4D(0).M();4(!1d[1X])1d[1X]=[];6 B={e:e,7:X,y:3.2d&&3.2d(X)||e};1d[1X].2L(B);4(3f++<3.O){1d[""].2L(B)}};$.N(1d,5(i,e){3.1q++;1w(i,e)})}2n(1I,25);5 1O(){7={};f=0}a{1O:1O,1w:1w,1I:1I,37:5(q){4(!3.1q||!f)a E;4(!3.18&&3.1T){6 1f=[];1j(6 k 2Q 7){4(k.f>0){6 c=7[k];$.N(c,5(i,x){4(1C(x.e,q)){1f.2L(x)}})}}a 1f}j 4(7[q]){a 7[q]}j 4(3.1C){1j(6 i=q.f-1;i>=3.2y;i--){6 c=7[q.4R(0,i)];4(c){6 1f=[];$.N(c,5(i,x){4(1C(x.e,q)){1f[1f.f]=x}});a 1f}}}a E}}};$.Q.31=5(3,g,h,15){6 D={J:"4Z"};6 l,m=-1,7,z="",2J=w,u,r;5 3o(){4(!2J)a;u=$("<3Y/>").16().T(3.32).1g("3Z","41").2H(2G.3q).45(5(t){4($(o).3r(":I")){g.2m()}15.1B=p});r=$("<3X/>").2H(u).49(5(t){4(1a(t).2W&&1a(t).2W.4c()==\'3v\'){m=$("1J",r).1z(D.J).4e(1a(t));$(1a(t)).T(D.J)}}).3V(5(t){$(1a(t)).T(D.J);h();4(3.39)g.2m();a p}).4f(5(){15.1B=w}).4g(5(){15.1B=p});4(3.G>0)u.1g("G",3.G);2J=p}5 1a(t){6 u=t.1a;4h(u&&u.4i!="3v")u=u.4j;4(!u)a[];a u}5 1e(1i){l.1s(m,m+1).1z(D.J);3x(1i);6 2C=l.1s(m,m+1).T(D.J);4(3.1V){6 K=0;l.1s(0,m).N(5(){K+=o.1K});4((K+2C[0].1K-r.1M())>r[0].4p){r.1M(K+2C[0].1K-r.4q())}j 4(K<r.1M()){r.1M(K)}}};5 3x(1i){4(3.2P||(!3.2P&&!((1i<0&&m==0)||(1i>0&&m==l.1o()-1)))){m+=1i;4(m<0){m=l.1o()-1}j 4(m>=l.1o()){m=0}}}5 3C(2v){a 3.O&&3.O<2v?3.O:2v}5 3E(){r.3F();6 O=3C(7.f);1j(6 i=0;i<O;i++){4(!7[i])2M;6 2u=3.2w(7[i].7,i+1,O,7[i].e,z);4(2u===p)2M;6 1J=$("<1J/>").4v(3.2c(2u,z)).T(i%2==0?"4w":"4x").2H(r)[0];$.7(1J,"3G",7[i])}l=r.4z("1J");4(3.2R){l.1s(0,1).T(D.J);m=0}4($.1n.3H)r.3H()}a{3d:5(d,q){3o();7=d;z=q;3E()},3B:5(){1e(1)},3A:5(){1e(-1)},3K:5(){4(m!=0&&m-8<0){1e(-m)}j{1e(-8)}},3P:5(){4(m!=l.1o()-1&&m+8>l.1o()){1e(l.1o()-1-m)}j{1e(8)}},16:5(){u&&u.16();l&&l.1z(D.J);m=-1},I:5(){a u&&u.3r(":I")},4C:5(){a o.I()&&(l.3I("."+D.J)[0]||3.2R&&l[0])},2O:5(){6 K=$(g).K();u.1g({G:P 3.G=="2f"||3.G>0?3.G:$(g).G(),3J:K.3J+g.1K,2t:K.2t}).2O();4(3.1V){r.1M(0);r.1g({3L:3.29,4G:\'4H\'});4(2T.2V.1v("4I")!=-1&&P 2G.3q.4J.3L==="1H"){6 2a=0;l.N(5(){2a+=o.1K});6 2s=2a>3.29;r.1g(\'4M\',2s?3.29:2a);4(!2s){l.G(r.G()-3N(l.1g("3O-2t"))-3N(l.1g("3O-4O")))}}}},F:5(){6 F=l&&l.3I("."+D.J).1z(D.J);a F&&F.f&&$.7(F[0],"3G")},2Z:5(){r&&r.3F()},23:5(){u&&u.4P()}}};$.1n.1k=5(C,11){4(C!==1H){a o.N(5(){4(o.2r){6 14=o.2r();4(11===1H||C==11){14.4T("2l",C);14.h()}j{14.4U(w);14.4V("2l",C);14.4W("2l",11);14.h()}}j 4(o.3R){o.3R(C,11)}j 4(o.1Y){o.1Y=C;o.3S=11}})}6 V=o[0];4(V.2r){6 2k=2G.1k.51(),3T=V.e,2j="<->",2i=2k.3W.f;2k.3W=2j;6 1N=V.e.1v(2j);V.e=3T;o.1k(1N,1N+2i);a{C:1N,11:1N+2i}}j 4(V.1Y!==1H){a{C:V.1Y,11:V.3S}}}})(56);',62,317,'|||options|if|function|var|data|||return||||value|length|input|select||else||listItems|active||this|false||list||event|element||true||result|term|words|row|start|CLASSES|null|selected|width|KEY|visible|ACTIVE|offset|val|toLowerCase|each|max|typeof|Autocompleter|parsed|currentValue|addClass|multipleSeparator|field|break|rawValue|case|onChange||end|previousValue||selRange|config|hide|trimWords|url|parse|target|bind|trigger|stMatchSets|moveSelect|csub|css|hasFocus|step|for|selection|autocomplete|multiple|fn|size|timeout|cacheLength|preventDefault|slice|success|extraParams|indexOf|add|hideResultsNow|word|removeClass|trim|mouseDownOnSelect|matchSubset|cache|lastWord|cursorAt|failure|undefined|populate|li|offsetHeight|search|scrollTop|caretAt|flush|delay|formatMatch|param|extend|matchContains|autoFill|scroll|progress|firstChar|selectionStart|isUrl|handler|lastKeyPressCode|stopLoading|unbind|arguments||matchCase||urlOrData|scrollHeight|listHeight|globalFailure|highlight|formatResult|blockSubmit|string|request|defaults|textLength|teststring|range|character|focus|setTimeout|clearTimeout|wordAt|noRecord|createTextRange|scrollbarsVisible|left|formatted|available|formatItem|new|minChars|loadingClass|flushCache|setOptions|activeItem|unautocomplete|split|replace|document|appendTo|sValue|needsInit|findValueCallback|push|continue|sub|show|scrollJumpPosition|in|selectFirst|selectCurrent|navigator|rows|userAgent|nodeName|clickFire|dataType|emptyList|form|Select|resultsClass|||Cache|inputClass|load||inputFocus|gi|strong|BACKSPACE|display|PAGEDOWN|nullData|ol|PAGEUP|mustMatch|COMMA|ESC|RETURN|TAB|DEL|init|substring|body|is|key|DOWN|Opera|LI|UP|movePosition|keyCode|receiveData|prev|next|limitNumberOfItems|skipPrevCheck|fillList|empty|ac_data|bgiframe|filter|top|pageUp|maxHeight|join|parseInt|padding|pageDown|seperator|setSelectionRange|selectionEnd|orig|hideResults|click|text|ul|div|position||absolute|keydown|1000|limit|hover||attr|timestamp|mouseover|RegExp|ajax|toUpperCase|mode|index|mousedown|mouseup|while|tagName|parentNode|map|180|window|switch|submit|clientHeight|innerHeight|KeyboardEvent|abort|ac_input|crap|html|ac_even|ac_odd|port|find|keypress|188|current|charAt|ac_results|ac_loading|overflow|auto|MSIE|style|Records|wasVisible|height|400|right|remove|No|substr|default|move|collapse|moveStart|moveEnd|name|150|ac_over|blur|createRange|Date|200|off|100|jQuery'.split('|'),0,{}))