This repository has been archived by the owner on Mar 28, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jquery.autocomplete.pack.js
17 lines (17 loc) · 8.54 KB
/
jquery.autocomplete.pack.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*
* jQuery Autocomplete plugin 1.1.1
*
* Fork of Jörn Zaefferer's Autocomplete plugin:
* http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/
*
* github: https://github.com/gietos/jquery-autocomplete
*
* Copyright (c) 2014 Sergey Kasatkin <[email protected]>
* 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
*
*/
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($){$.1f.1Q({1D:5(1M,3){6 1O=S 1M=="1R";3=$.1Q({},$.O.2g,{1d:1O?1M:V,7:1O?V:1M,1W:1O?$.O.2g.1W:10,K:3&&!3.2d?10:3W},3);3.21=3.21||5(e){a e};3.23=3.23||3.2t;a o.L(5(){2B $.O(o,3)})},w:5(2a){a o.19("w",2a)},1F:5(2a){a o.Z("1F",[2a])},2E:5(){a o.Z("2E")},2H:5(3){a o.Z("2H",[3])},2I:5(){a o.Z("2I")}});$.O=5(g,3){6 1v;6 F={2Y:38,2X:40,2W:46,2V:9,2T:13,2Q:27,3Q:3Y,2U:33,31:34,32:8};6 $g=$(g).4M("1D","4N").Y(3.35);6 1k;6 18="";6 1m=$.O.39(3);6 1l=0;6 28;6 1i={26:t};6 h=$.O.3c(3,g,2r,1i);6 20;$.2k.3l&&$(g.2P).19("48.1D",5(){4(20){20=t;a t}});$g.19(($.2k.3l?"4b":"4f")+".1D",5(u){1l=1;28=u.3x;4A(u.3x){U F.2Y:u.1I();4(h.N()){h.3z()}j{12(0,B)}R;U F.2X:u.1I();4(h.N()){h.3D()}j{12(0,B)}R;U F.2U:u.1I();4(h.N()){h.3F()}j{12(0,B)}R;U F.31:u.1I();4(h.N()){h.3G()}j{12(0,B)}R;U 3.1h&&$.1u(3.X)==","&&F.3Q:U F.2V:U F.2T:4(2r()){u.1I();20=B;a t}R;U F.2Q:h.17();R;4l:2y(1k);1k=2o(12,3.1W);R}}).3K(5(){1l++}).4G(5(){1l=0;4(!1i.26){3L()}}).3N(5(){4(1l++>1&&!h.N()){12(0,B)}}).19("1F",5(){6 1f=(1X.f>1)?1X[1]:V;5 2e(q,7){6 w;4(7&&7.f){1j(6 i=0;i<7.f;i++){4(7[i].w.M()==q.M()){w=7[i];R}}}4(S 1f=="5")1f(w);j $g.Z("w",w&&[w.7,w.e])}$.L(11($g.I()),5(i,e){2M(e,2e,2e)})}).19("2E",5(){1m.1C()}).19("2H",5(){$.1Q(3,1X[1]);4("7"3O 1X[1])1m.1B()}).19("2I",5(){h.1L();$g.1L();$(g.2P).1L(".1D")});5 2r(){6 G=h.G();4(!G)a t;6 v=G.w;18=v;4(3.1h){6 y=11($g.I());4(y.f>1){6 3I=3.X.f;6 1x=$(g).1g().C;6 2h,1P=0;$.L(y,5(i,1J){1P+=1J.f;4(1x<=1P){2h=i;a t}1P+=3I});y[2h]=v;v=y.3E(3.X)}v+=3.X}$g.I(v);1r();$g.Z("w",[G.7,G.e]);a B}5 12(4a,3A){4(28==F.2W){h.17();a}6 P=$g.I();4(!3A&&P==18)a;18=P;P=1G(P);4(P.f>=3.2u){$g.Y(3.2v);4(!3.1T)P=P.M();2M(P,3s,1r)}j{1U();h.17()}};5 11(e){4(!e)a[""];4(!3.1h)a[$.1u(e)];a $.4B(e.2D(3.X),5(1J){a $.1u(e).f?$.1u(1J):V})}5 1G(e){4(!3.1h)a e;6 y=11(e);4(y.f==1)a y[0];6 1x=$(g).1g().C;4(1x==e.f){y=11(e)}j{y=11(e.2J(e.3p(1x),""))}a y[y.f-1]}5 1V(q,2f){4(3.1V&&(1G($g.I()).M()==q.M())&&28!=F.32){$g.I($g.I()+2f.3p(1G(18).f));$(g).1g(18.f,18.f+2f.f)}};5 3L(){2y(1k);1k=2o(1r,4O)};5 1r(){6 4U=h.N();h.17();2y(1k);1U();4(3.3m){$g.1F(5(w){4(!w){4(3.1h){6 y=11($g.I()).1A(0,-1);$g.I(y.3E(3.X)+(y.f?3.X:""))}j{$g.I("");$g.Z("w",V)}}})}};5 3s(q,7){4(7&&7.f&&1l){1U();h.3k(7,q);1V(q,7[0].e);h.2j()}j{1r()}};5 2M(z,1Y,3j){4(!3.1T)z=z.M();6 7=1m.3h(z);4(7&&7.f){1Y(z,7)}j 4((S 3.1d=="1R")&&(3.1d.f>0)){6 1y={4g:+2B 4h()};$.L(3.1y,5(3g,22){1y[3g]=S 22=="5"?22():22});4(S 1v!=\'1w\'&&1v.4n()==\'4o\'){1v.4r()}1v=$.4t({3f:3.3f,1d:3.1d,7:$.1Q({q:1G(z),4y:3.K},1y),1Y:5(7){6 16=3.24&&3.24(7)||24(7);1m.1s(z,16);1Y(z,16)}})}j{h.3a();3j(z)}};5 24(7){6 16=[];6 2x=7.2D("\\n");1j(6 i=0;i<2x.f;i++){6 A=$.1u(2x[i]);4(A){A=A.2D("|");16[16.f]={7:A,e:A[0],w:3.29&&3.29(A,A[0])||A[0]}}}a 16};5 1U(){$g.1n(3.2v)}};$.O.2g={35:"4Q",37:"3R",2v:"3S",2u:1,1W:3T,1T:t,1E:B,2b:t,1z:10,K:3Z,3m:t,1y:{},2F:B,2t:5(A){a A[0]},23:V,1V:t,D:0,1h:t,X:", ",21:5(e,z){a e.2J(2B 49("(?![^&;]+;)(?!<[^<>]*)("+z.2J(/([\\^\\$\\(\\)\\[\\]\\{\\}\\*\\.\\+\\?\\|\\\\])/30,"\\\\$1")+")(?![^<>]*>)(?![^&;]+;)","30"),"<2Z>$1</2Z>")},2d:B,2c:4c};$.O.39=5(3){6 7={};6 f=0;5 1E(s,2K){4(!3.1T)s=s.M();6 i=s.2S(2K);4(3.2b=="1J"){i=s.M().1F("\\\\b"+2K.M())}4(i==-1)a t;a i==0||3.2b};5 1s(q,e){4(f>3.1z){1C()}4(!7[q]){f++}7[q]=e}5 1B(){4(!3.7)a t;6 14={},2R=0;4(!3.1d)3.1z=1;14[""]=[];1j(6 i=0,3n=3.7.f;i<3n;i++){6 Q=3.7[i];Q=(S Q=="1R")?[Q]:Q;6 e=3.23(Q,i+1,3.7.f);4(e===t)2O;6 1K=e.4s(0).M();4(!14[1K])14[1K]=[];6 A={e:e,7:Q,w:3.29&&3.29(Q)||e};14[1K].2L(A);4(2R++<3.K){14[""].2L(A)}};$.L(14,5(i,e){3.1z++;1s(i,e)})}2o(1B,25);5 1C(){7={};f=0}a{1C:1C,1s:1s,1B:1B,3h:5(q){4(!3.1z||!f)a V;4(!3.1d&&3.2b){6 15=[];1j(6 k 3O 7){4(k.f>0){6 c=7[k];$.L(c,5(i,x){4(1E(x.e,q)){15.2L(x)}})}}a 15}j 4(7[q]){a 7[q]}j 4(3.1E){1j(6 i=q.f-1;i>=3.2u;i--){6 c=7[q.4E(0,i)];4(c){6 15=[];$.L(c,5(i,x){4(1E(x.e,q)){15[15.f]=x}});a 15}}}a V}}};$.O.3c=5(3,g,h,1i){6 H={E:"4I"};6 l,m=-1,7,z="",2G=B,r,p;5 36(){4(!2G)a;r=$("<4R/>").17().Y(3.37).1a("4S","4T").2A(2w.3b);p=$("<3U/>").2A(r).3V(5(u){4(1b(u).3d&&1b(u).3d.3X()==\'3e\'){m=$("1t",p).1n(H.E).41(1b(u));$(1b(u)).Y(H.E)}}).3N(5(u){$(1b(u)).Y(H.E);h();g.3K();a t}).42(5(){1i.26=B}).43(5(){1i.26=t});4(3.D>0)r.1a("D",3.D);2G=t}5 1b(u){6 r=u.1b;44(r&&r.45!="3e")r=r.47;4(!r)a[];a r}5 1c(1Z){l.1A(m,m+1).1n(H.E);3i(1Z);6 2m=l.1A(m,m+1).Y(H.E);4(3.2d){6 J=0;l.1A(0,m).L(5(){J+=o.1q});4((J+2m[0].1q-p.1p())>p[0].4d){p.1p(J+2m[0].1q-p.4e())}j 4(J<p.1p()){p.1p(J)}}};5 3i(1Z){m+=1Z;4(m<0){m=l.1o()-1}j 4(m>=l.1o()){m=0}}5 3o(2N){a 3.K&&3.K<2N?3.K:2N}5 3q(){p.3r();6 K=3o(7.f);1j(6 i=0;i<K;i++){4(!7[i])2O;6 2z=3.2t(7[i].7,i+1,K,7[i].e,z);4(2z===t)2O;6 1t=$("<1t/>").4i(3.21(2z,z)).Y(i%2==0?"4j":"4k").2A(p)[0];$.7(1t,"3t",7[i])}l=p.4m("1t");4(3.2F){l.1A(0,1).Y(H.E);m=0}4($.1f.3u)p.3u()}a{3k:5(d,q){36();7=d;z=q;3q()},3D:5(){1c(1)},3z:5(){1c(-1)},3F:5(){4(m!=0&&m-8<0){1c(-m)}j{1c(-8)}},3G:5(){4(m!=l.1o()-1&&m+8>l.1o()){1c(l.1o()-1-m)}j{1c(8)}},17:5(){r&&r.17();l&&l.1n(H.E);m=-1},N:5(){a r&&r.4p(":N")},4q:5(){a o.N()&&(l.3v("."+H.E)[0]||3.2F&&l[0])},2j:5(){6 J=$(g).J();r.1a({D:S 3.D=="1R"||3.D>0?3.D:$(g).D(),3w:J.3w+g.1q,2s:J.2s}).2j();4(3.2d){p.1p(0);p.1a({3y:3.2c,4u:\'4v\'});4($.2k.4w&&S 2w.3b.4x.3y==="1w"){6 1S=0;l.L(5(){1S+=o.1q});6 2p=1S>3.2c;p.1a(\'4z\',2p?3.2c:1S);4(!2p){l.D(p.D()-3B(l.1a("3C-2s"))-3B(l.1a("3C-4C")))}}}},G:5(){6 G=l&&l.3v("."+H.E).1n(H.E);a G&&G.f&&$.7(G[0],"3t")},3a:5(){p&&p.3r()},1L:5(){r&&r.4D()}}};$.1f.1g=5(C,W){4(C!==1w){a o.L(5(){4(o.2n){6 1e=o.2n();4(W===1w||C==W){1e.4H("2C",C);1e.h()}j{1e.4J(B);1e.4K("2C",C);1e.4L("2C",W);1e.h()}}j 4(o.3H){o.3H(C,W)}j 4(o.1N){o.1N=C;o.3J=W}})}6 T=o[0];4(T.2n){6 2i=2w.1g.4P(),3M=T.e,2q="<->",2l=2i.3P.f;2i.3P=2q;6 1H=T.e.2S(2q);T.e=3M;o.1g(1H,1H+2l);a{C:1H,W:1H+2l}}j 4(T.1N!==1w){a{C:T.1N,W:T.3J}}}})(4F);',62,305,'|||options|if|function|var|data|||return||||value|length|input|select||else||listItems|active||this|list||element||false|event||result||words|term|row|true|start|width|ACTIVE|KEY|selected|CLASSES|val|offset|max|each|toLowerCase|visible|Autocompleter|currentValue|rawValue|break|typeof|field|case|null|end|multipleSeparator|addClass|trigger||trimWords|onChange||stMatchSets|csub|parsed|hide|previousValue|bind|css|target|moveSelect|url|selRange|fn|selection|multiple|config|for|timeout|hasFocus|cache|removeClass|size|scrollTop|offsetHeight|hideResultsNow|add|li|trim|xhr|undefined|cursorAt|extraParams|cacheLength|slice|populate|flush|autocomplete|matchSubset|search|lastWord|caretAt|preventDefault|word|firstChar|unbind|urlOrData|selectionStart|isUrl|progress|extend|string|listHeight|matchCase|stopLoading|autoFill|delay|arguments|success|step|blockSubmit|highlight|param|formatMatch|parse||mouseDownOnSelect||lastKeyPressCode|formatResult|handler|matchContains|scrollHeight|scroll|findValueCallback|sValue|defaults|wordAt|range|show|browser|textLength|activeItem|createTextRange|setTimeout|scrollbarsVisible|teststring|selectCurrent|left|formatItem|minChars|loadingClass|document|rows|clearTimeout|formatted|appendTo|new|character|split|flushCache|selectFirst|needsInit|setOptions|unautocomplete|replace|sub|push|request|available|continue|form|ESC|nullData|indexOf|RETURN|PAGEUP|TAB|DEL|DOWN|UP|strong|gi|PAGEDOWN|BACKSPACE|||inputClass|init|resultsClass||Cache|emptyList|body|Select|nodeName|LI|dataType|key|load|movePosition|failure|display|opera|mustMatch|ol|limitNumberOfItems|substring|fillList|empty|receiveData|ac_data|bgiframe|filter|top|keyCode|maxHeight|prev|skipPrevCheck|parseInt|padding|next|join|pageUp|pageDown|setSelectionRange|seperator|selectionEnd|focus|hideResults|orig|click|in|text|COMMA|ac_results|ac_loading|400|ul|mouseover|150|toUpperCase|188|100||index|mousedown|mouseup|while|tagName||parentNode|submit|RegExp|crap|keypress|180|clientHeight|innerHeight|keydown|timestamp|Date|html|ac_even|ac_odd|default|find|state|pending|is|current|abort|charAt|ajax|overflow|auto|msie|style|limit|height|switch|map|right|remove|substr|jQuery|blur|move|ac_over|collapse|moveStart|moveEnd|attr|off|200|createRange|ac_input|div|position|absolute|wasVisible'.split('|'),0,{}))