Team:NTU Taiwan/javascript/dp calendar.js
From 2013.igem.org
eval(function(p,a,c,k,e,d){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--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[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}('(c($){$.6.5=c(2o){G w,V,d,t,N,1x,1c,1q,1M,1k,1L,1K,1z,1E,1H,1A,1o,1s,1t,16,1O,1i,1F,O,1R,Q,1w,Z,P,18,F,1n,1u,1I,Y,$1a,1f,1d,K,1h,u,1j,x,y,1p,14=1P;w=$.3t({},$.6.5.1m,2o);V=w.V;d=w.d;t=w.t;N=w.N;1x=w.1x;1c=w.1c;1q=w.1q;1M=w.1M;1k=w.1k;1L=w.1L;1K=w.1K;1z=w.1z;1V=$.6.5.E[\'\'][\'1V\'];1E=$.6.5.E[\'\'][\'1E\'];1H=$.6.5.E[\'\'][\'1H\'];1A=$.6.5.E[\'\'][\'1A\'];1o=$.6.5.E[\'\'][\'1o\'];1s=$.6.5.E[\'\'][\'1s\'];c 15(z,23,19,X){G 1X=\'\',1r,1y;1y=c(s,29){G 1g=\'\',i;3v(1g.2n<29){1g+=s}1g=1g.2r(0,29);C 1g};z+=\'\';19=19!==3q?19:\' \';8(X!==\'U\'&&X!==\'2b\'&&X!==\'2m\'){X=\'2b\'}8((1r=23-z.2n)>0){8(X===\'U\'){z=1y(19,1r)+z}J 8(X===\'2b\'){z=z+1y(19,1r)}J 8(X===\'2m\'){1X=1y(19,3x.3y(1r/2));z=1X+z+1X;z=z.2r(0,23)}}C z}c 3L(25,1D,2B){G 1G=\'\',2y=!!2B;8(2y){26(1G 28 1D){8(1D[1G]===25){C I}}}J{26(1G 28 1D){8(1D[1G]==25){C I}}}C 1P}c 1b(){G 1v,2e,i;1f=d.2K();1d=$.10.E[""].2I[1f];K=d.m();u=d.A();1j=$.10.E[""].2F[u];1h=$.10.E[""].2E[u];x=d.M();$.6.5.d=d;$.6.5.t=t;$.6.5.N=N;$.6.5.1f=1f;$.6.5.1d=1d;$.6.5.K=K;$.6.5.u=u;$.6.5.1j=1j;$.6.5.1h=1h;$.6.5.x=x;$(y).j("");8(t===1){V.2g(c(a,b){a=a["f"];b=b["f"];C a==b?0:(a>b?-1:1)})}8(t===2){V.2g(c(a,b){a=a["2i"].2v();b=b["2i"].2v();C a==b?0:(ab?-1:1)})}26(i=1;i<=l o(x,(u+1),0).m();i++){1v=$(\'<k />\');8(K===i){1v.h("n")}2e=3j.3i(15(i,2,"0","U"));$(1v).j(2e).B(\'D\',\'1C\'+l o(x,u,i).13());$(y).g(1v)}2c($(O).r("k")).2j("2z",1c);2c($(F).r("k")).2j("2z",1c);$($(y).r("k")).1l(c(e){d=l o(x,u,$(9).j());$($(y).r("k")).T(c(i){9.17=""});9.17="n";1b();1L()});$(Z).j("");$(Z).g("<27>"+1d+"</27>");$(Z).g(\'<v 1Z="30"><1U 1Z="32">\'+1h+\'</1U><31><1U 1Z="2W">\'+15(K,2,"0","U")+\'</1U></v>\');$1a.10("2J",d);$(1i).j(1j+" "+x);$(Y).j("<v 1Z=\'2P\'></v>");1p=0;$(V).T(c(i){8(2u(9)=="2t"){G f=9["f"],1e=9["1e"];11=l o(f.M(),f.A(),f.m()).13();R=l o(d.M(),d.A(),d.m()).13();8(2u(1e)=="2t"){L=l o(1e.M(),1e.A(),1e.m()).13()}J{L=R+2T}2k=f.m();2l=f.A();33=f.M();14=1P;8(R>=l o(f.M(),f.A(),f.m()).13()&&9["1S"]>0){2s(9["1S"]){S 1:8(R<=L){14=I}W;S 2:2x=((R-11)%7);8(2x==0&&R<=L){14=I}W;S 3:8(d.m()==f.m()&&R<=L){14=I}W;S 4:8(d.m()==f.m()&&d.A()==f.A()&&R<=L){14=I}W}}8(x===f.M()&&u===f.A()){$(y).2A("k")[(f.m()-1)].17=$(y).2A("k")[(f.m()-1)].17=="n"?"n":"1N"}8(9["1S"]>0){2s(9["1S"]){S 1:$(y).r(\'k\').T(c(i){G q=$(9).B(\'D\').1T(\'1C\',\'\');8(q>11&&q<=L){$(9).h($(9).1Y(\'n\')?"n":"1N")}});W;S 2:$(y).r(\'k\').T(c(i){G q=$(9).B(\'D\').1T(\'1C\',\'\');8((q>11&&q<=L)&&((q-11)%7==0)){$(9).h($(9).1Y(\'n\')?"n":"1N")}});W;S 3:$(y).r(\'k\').T(c(i){G q=$(9).B(\'D\').1T(\'1C\',\'\');8((q>11&&q<=L)&&(l o(2h(q)).m()==2k)){$(9).h($(9).1Y(\'n\')?"n":"1N")}});W;S 4:$(y).r(\'k\').T(c(i){G q=$(9).B(\'D\').1T(\'1C\',\'\');8((q>11&&q<=L)&&(l o(2h(q)).m()==2k)&&(l o(2h(q)).A()==2l)){$(9).h($(9).1Y(\'n\')?"n":"1N")}});W}}8((l o(d.M(),d.A(),d.m()).13()===l o(f.M(),f.A(),f.m()).13())||14){G H,1J,21,20;8(1p===0){$(Y).j("")}1p++;H=$(\'<k />\');8(9["1Q"]==1){$(H).h("4m")}J 8(9["1Q"]==2){$(H).h("4h")}J{$(H).h("4g")}$(Y).g(H);1J=$(\'<v />\').h(\'4i\');8(!N){$(1J).j(15(f.1B(),2,"0","U")+":"+15(f.2p(),2,"0","U"))}J{$(1J).j((f.1B()>12?"4t":"4k")+" "+15((f.1B()>12?(f.1B()-12):f.1B()),2,"0","U")+":"+15(f.2p(),2,"0","U"))}21=$(\'<27 />\');$(21).g(9["2i"]);Q=$(\'<v />\').h(\'Q\');20=$(\'<p />\');$(20).j(9["4x"]);$(H).g(1J);$(H).g(21);$(H).g(Q);$(H).g(20)}}});$($(Y).r("k")).1l(c(e){1z();8($(9).r("p").2j("3V")==="3X"){$(9).r("p").4f(2w)}J{$(9).r("p").3Z(2w)}});8(1p===0){$(Y).j(1E)}}9.h("5");9.j("");1t=$(\'<v />\').h(\'1t\');16=$(\'<v />\').h(\'16\');$(1t).g(16);1O=$(\'<a />\').B({24:\'2d:2f(0);\',D:\'1O\'}).j(\'&3P;\');1i=$(\'<a />\').B({24:\'2d:2f(0);\',D:\'1i\'});1F=$(\'<a />\').B({24:\'2d:2f(0);\',D:\'1F\'}).j(\'&3S;\');$(16).g(1O);$(16).g(1i);$(16).g(1F);9.g(1t);O=$(\'<v />\').h(\'O\');1R=$(\'<22 />\').B(\'D\',\'1R\');y=1R;Q=$(\'<v />\').h(\'Q\');Z=$(\'<v />\').h(\'Z\').B(\'D\',\'Z\');$(O).g(y);1w=$(\'<v />\').h(\'Q\');$(O).g(1w);$(O).g(Z);1w=$(\'<v />\').h(\'Q\');$(O).g(1w);9.g(O);P=$(\'<v />\').h(\'P\');F=$(\'<22 />\').B(\'D\',\'F\');1n=$(\'<k />\');8(t===1){1n.h("n")}$(1n).j(1A);1u=$(\'<k />\');8(t===2){1u.h("n")}$(1u).j(1o);1I=$(\'<k />\');8(t===3){1I.h("n")}$(1I).j(1s);$(F).g(1n);$(F).g(1u);8(1q){$(F).g(1I)}Y=$(\'<22 />\').B(\'D\',\'45\');8(1M){18=$(\'<2C />\');$(18).j(1H);$(P).g(18);$(P).g(F)}J{18=$(\'<2C />\');$(18).j(1V);$(P).g(18)}$(P).g(Q);$(P).g(Y);9.g(P);$1a=$("<z 3n=\'3k\' />").2H().10({3w:c(2q,3u){d=l o(2q);1b()}}).4q(\'38\');$(1i).1l(c(e){8(1x===I){8($1a.10(\'2D\').4C(\':3O\')){$1a.10("47");$1a.10("2D").42({46:"2N",39:"2N",44:9})}J{$1a.2H()}}1K();e.43()});1b();$(1F).1l(c(e){d=d.2G(1).1W();1b();1k()});$(1O).1l(c(e){d=d.2G(-1).1W();1b();1k()});$($(F).r("k")).1l(c(e){$($(F).r("k")).T(c(i){9.17=""});9.17="n";$($(F).r("k")).T(c(i){8(9.17==="n"){t=(i+1)}});1b()})};$.6.5.1m={V:l 48(),d:l o(),t:1,1x:I,1q:I,1M:I,N:1P,1k:c(){},1L:c(){},1K:c(){},1z:c(){},1c:\'#4d\'};$.6.5.d=$.6.5.1m.d;$.6.5.t=$.6.5.1m.t;$.6.5.N=$.6.5.1m.N;$.6.5.1f="";$.6.5.1d="";$.6.5.K="";$.6.5.u="";$.6.5.1j="";$.6.5.1h="";$.6.5.x="";$.6.5.E=[];$.6.5.E[\'\']={4c:\'4b\',49:\'4a\',41:\'40\',3R:\'3Q\',2F:[\'3T\',\'3U\',\'3W\',\'4e\',\'2O\',\'4j\',\'4A\',\'4B\',\'4v\',\'4w\',\'4u\',\'4y\'],2E:[\'4z\',\'4s\',\'4l\',\'4r\',\'2O\',\'4p\',\'4n\',\'4o\',\'3Y\',\'3M\',\'3N\',\'3a\'],2I:[\'37\',\'35\',\'36\',\'3b\',\'3c\',\'3h\',\'3g\'],3f:[\'3d\',\'3e\',\'34\',\'2U\',\'2S\',\'2R\',\'2Q\'],2V:[\'2Z\',\'2X\',\'2Y\',\'3D\',\'3E\',\'3C\',\'3B\'],1V:\'3z\',1E:\'3A 3F 3G 3K 28 9 2a.\',1H:\'3J 3H:\',1A:\'3I\',1o:\'3o\',1s:\'3p\'};$.6.5.2J=c(2a){$.6.5({d:2a})};$.6.5.3m=c(2M){$.6.5({d:l o($.6.5.x,$.6.5.u,2M)})};$.6.5.3l=c(1W){$.6.5({d:l o($.6.5.x,1W,$.6.5.K)})};$.6.5.3r=c(2L){$.6.5({d:l o(2L,$.6.5.u,$.6.5.K)})};$.6.5.m=c(){C $.6.5.d};$.6.5.2K=c(){C $.6.5.K};$.6.5.A=c(){C $.6.5.u};$.6.5.3s=c(){C $.6.5.x}})(2c);',62,287,'|||||dp_calendar|fn||if|this|||function|date_selected||startDate|append|addClass||html|li|new|getDate|active|Date||li_events_time|find||order_by|curr_month|div|opts|curr_year|ul_list_days|input|getMonth|attr|return|id|regional|cl_sort_by|var|li_event|true|else|curr_date|event_to_time_end|getFullYear|format_ampm|div_dates|calendar_list|clear|event_to_time_date_selected|case|each|STR_PAD_LEFT|events_array|break|pad_type|ul_list|day_name|datepicker|event_to_time||getTime|recurring_frecuency_active|dp_str_pad|main_date|className|h2_sort_by|pad_string|dp|calculeDates|link_color|curr_day_name|endDate|curr_day|collect|curr_month_name_short|toggleDP|curr_month_name|onChangeMonth|click|defaults|li_time|DP_LBL_TITLE|added_events|show_priorities|pad_to_go|DP_LBL_PRIORITY|div_main_date|li_title|newLI|div_clear|show_datepicker|str_pad_repeater|onClickEvents|DP_LBL_TIME|getHours|dpEventsCalendar_li_|haystack|DP_LBL_NO_ROWS|next_month|key|DP_LBL_SORT_BY|li_priority|li_event_time|onClickMonthName|onChangeDay|show_sort_by|has_events|prev_month|false|priority|list_days|frecuency|replace|span|DP_LBL_EVENTS|month|half|hasClass|class|li_event_description|li_event_title|ul|pad_length|href|needle|for|h1|in|len|date|STR_PAD_RIGHT|jQuery|javascript|newText|void|sort|parseInt|title|css|event_date|event_month|STR_PAD_BOTH|length|options|getMinutes|dateText|substr|switch|object|typeof|toLowerCase|300|calc_multiplo|strict|color|children|argStrict|h2|widget|monthNamesShort|monthNames|add|hide|dayNames|setDate|getDay|year|day|top|May|loading|Sat|Fri|Thu|9999999999|Wed|dayNamesMin|span_day|Mo|Tu|Su|div_month|br|span_month|event_year|Tue|Monday|Tuesday|Sunday|body|at|Dec|Wednesday|Thursday|Sun|Mon|dayNamesShort|Saturday|Friday|createTextNode|document|text|setMonth|setDay|type|TITLE|PRIORITY|undefined|setYear|getYear|extend|inst|while|onSelect|Math|ceil|Events|No|Sa|Fr|We|Th|results|were|BY|TIME|SORT|found|dp_in_array|Oct|Nov|hidden|laquo|Today|currentText|raquo|January|February|display|March|none|Sep|slideUp|Next|nextText|position|preventDefault|of|list|my|show|Array|prevText|Prev|Done|closeText|929292|April|slideDown|urgent|medium|time|June|AM|Mar|low|Jul|Aug|Jun|appendTo|Apr|Feb|PM|November|September|October|description|December|Jan|July|August|is'.split('|'),0,{}))