Commits

mic  committed afc5cb4

add a sort option when iteration on array. see the example 4

  • Participants
  • Parent commits 8da0735

Comments (0)

Files changed (3)

File js/examples.js

 				'td':'player',
 				'td@style': '"cursor:pointer"',
 				'td@onclick':'"clickLine(this);"'
+			},
+			sort:function(a, b){
+				return a > b ? 1 : -1; 
 			}
 		}
 	},
 	data:{
 		players:[
-			"Adrian Meador","Bryan O'Connor","Michèle Noïjû","تصبح عالميا مع يونيكود",
-			"Γέφυρα γρύλων","Chloé Ellemême","глобальных масштабах","יוצא לשוק העולמי",
-			"La \"volante\"","Todd Swift","Valerie Paige","Walter Hagelstein","Wendy Leatherbury"
+			"Adrian Meador","Wendy Leatherbury","Michèle Noïjû","Chloé Ellemême","Bryan O'Connor","Walter Hagelstein",
+			"La \"volante\"","Todd Swift","Valerie Paige"
 		]
 	}
 };

File libs/pure.js

 	Copyright (c) 2009 Michael Cvilic - BeeBole.com
 
 	Thanks to Rog Peppe for the functional JS jump
-	revision: 2.29
+	revision: 2.30
 
 * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 	}
 
 	// read de loop data, and pass it to the inner rendering function
-	function loopfn(name, dselect, inner){
+	function loopfn(name, dselect, inner, sorter){
 		return function(ctxt){
 			var a = dselect(ctxt),
 				old = ctxt[name],
 				};
 			ctxt[name] = temp;
 			if( isArray(a) ){
+				if(typeof sorter !== 'undefined'){
+					a.sort(sorter);
+				}
 				//loop on array
 				for(var i = 0, ii = a.length || 0; i < ii; i++){  
 					buildArg(i); 
 				}
 			}else{
+				if(typeof sorter !== 'undefined'){
+					error('sort is only available on arrays, not objects');
+				}
 				//loop on collections
 				for(var prop in a){
 					a.hasOwnProperty( prop ) && buildArg(prop); 
 	}
 	// generate the template for a loop node
 	function loopgen(dom, sel, loop, fns){
-		var already = false;
-		var p;
-		for(var i in loop){
-			if(loop.hasOwnProperty(i)){
+		var already = false, ls, sorter, prop;
+		for(prop in loop){
+			if(loop.hasOwnProperty(prop)){
+				if(prop === 'sort'){
+					sorter = loop.sort;
+					continue;
+				}
 				if(already){
 					error('cannot have more than one loop on a target');
 				}
-				p = i;
+				ls = prop;
 				already = true;
 			}
 		}
-		if(!p){
+		if(!ls){
 			error('no loop spec');
 		}
-		var dsel = loop[p];
+		var dsel = loop[ls];
 		// if it's a simple data selector then we default to contents, not replacement.
 		if(typeof(dsel) === 'string' || typeof(dsel) === 'function'){
 			loop = {};
-			loop[p] = {root: dsel};
+			loop[ls] = {root: dsel};
 			return loopgen(dom, sel, loop, fns);
 		}
-		var spec = parseloopspec(p),
+		var spec = parseloopspec(ls),
 			itersel = dataselectfn(spec.sel),
 			target = gettarget(dom, sel, true),
 			nodes = target.nodes;
 			
 		for(i = 0; i < nodes.length; i++){
-			// could check for overlapping loop targets here by checking that
-			// root is still ancestor of node.
 			var node = nodes[i],
 				inner = compiler(node, dsel);
-			fns[fns.length] = wrapquote(target.quotefn, loopfn(spec.name, itersel, inner));
+			fns[fns.length] = wrapquote(target.quotefn, loopfn(spec.name, itersel, inner, sorter));
 			target.nodes = [node];		// N.B. side effect on target.
 			setsig(target, fns.length - 1);
 		}

File libs/pure_packed.js

     Copyright (c) 2009 Michael Cvilic - BeeBole.com
 
 	Thanks to Rog Peppe for the functional JS jump
-    revision: 2.29
+    revision: 2.30
 
 * * * * * * * * * * * * * * * * * * * * * * * * * */
-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}('9 $p,2s=$p=6(){9 a=2t[0],1W=H;7(x a===\'14\'){1W=2t[1]||H}8 $p.2u(a,1W)};$p.2u=6(l,q,r){9 r=2v(),1b=[];3j(x l){2w\'14\':1b=r.I(q||E,l);7(1b.u===0){F(\'1X 1Y "\'+l+\'" 2x 2y 2z\')}1D;2w\'z\':F(\'1X 1Y 2A 2B z, 3k 1Z X\');1D;3l:1b=[l]}B(9 i=0,L=1b.u;i<L;i++){r[i]=1b[i]}r.u=L;9 t=\'3m\'+1E.2C(1E.2D()*2E)+\'20\',1k=\'3n\'+1E.2C(1E.2D()*2E)+\'20\',21=/^(\\+)?([^\\@\\+]+)?\\@?([^\\+]+)?(\\+)?$/,2F={3o:\'3p\',2G:\'2H\'};8 r;6 F(e){3q(e);7(x 2I!==\'z\'){2I.3r(e);3s}3t(\'2s F: \'+e);}6 2v(){9 a=$p.Y,f=6(){};f.R=a;f.R.G=a.G||G;f.R.M=a.M||M;f.R.N=a.N||N;f.R.I=a.I||I;f.R.3u=1l;f.R.3v=F;8 3w f()}6 22(b){8 b.22||(6(n){9 a=E.1m(\'3x\'),h;a.1F(n.2J(P));h=a.1n;a=15;8 h})(b)}6 1G(o){8 3y.R.3z.3A(o)==="[2K 3B]"}6 1o(b,f){8 6(a){8 b(\'\'+f(a))}}6 23(a,b){b=b||E.3C();9 c,1p;B(9 n 1c a){c=E.1m(n);b.1F(c);7(x a[n]===\'2K\'){1p=23(a[n],c)}A{1p=E.1m(a[n]);c.1F(1p)}}8 1p};6 I(n,a){7(x n===\'14\'){a=n;n=H}7(x E.2L!==\'z\'){8(n||E).2L(a)}A{F(\'3D 3E 12 2M 3F 24: 3G, 3H.5+, 3I+ 3J 3K+\\n\\3L 3M 2M 2N 1Z 3N, 3O 3P a 3Q 3R/3S 24 a 3T X 3U\')}}6 25(c,d){8 6(a){9 b=[c[0]],n=c.u,1H,1q,1I,1r;B(9 i=1;i<n;i++){1H=d[i](a);1q=c[i];7(1H===\'\'){1I=b[b.u-1];7((1r=1I.3V(/[\\w]+=\\"?$/))>-1){b[b.u-1]=1I.26(0,1r);1q=1q.3W(1)}}b[b.u]=1H;b[b.u]=1q}8 b.27(\'\')}}6 2O(p){9 m=p.1s(/^(\\w+)\\s*<-\\s*(\\S+)?$/);7(m===15){F(\'28 16 2P: "\'+p+\'"\')}7(m[1]===\'1t\'){F(\'"1t<-..." 2B a 3X 3Y B 29 3Z 40 41.\\n\\42 43 44 2a B 1Z 16.\')}7(!m[2]){m[2]=6(a){8 a.1J}}8{2a:m[1],13:m[2]}}6 1d(c){7(x(c)===\'6\'){8 c}9 m=c.1s(/^[a-45-Z$20][\\w$]*(\\.[\\w$-]*[^\\.])*$/);7(m===15){9 d=H,s=c,1K=[],1e=[],i=0,2b;7(/\\\'|\\"/.12(s.2Q(0))){7(/\\\'|\\"/.12(s.2Q(s.u-1))){2b=s.26(1,s.u-1);8 6(){8 2b}}}A{2R((m=s.1s(/#\\{([^{}]+)\\}/))!==15){d=P;1K[i++]=s.2S(0,m.2T);1e[i]=1d(m[1]);s=s.2S(m.2T+m[0].u,s.u)}}7(!d){F(\'28 1J X 2U: \'+c)}1K[i]=s;8 25(1K,1e)}m=c.1L(\'.\');8 6(a){9 b=a.1J;7(!b){8\'\'}9 v=a[m[0]],i=0;7(v){b=v.1t;i+=1}9 n=m.u;B(;i<n;i++){7(!b){1D}b=b[m[i]]}8(!b&&b!==0)?\'\':b}}6 1u(c,d,e){9 f,T,X,C,O,J=[];7(x d===\'14\'){f=d;9 m=d.1s(21);7(!m){F(\'28 X 2U: \'+d)}T=m[1];X=m[2];C=m[3];O=m[4];7(X===\'.\'||(!X&&C)){J[0]=c}A{J=r.I(c,X)}7(!J||J.u===0){8 F(\'1X 1v "\'+d+\'" 2x 2y 2z 1c 29 1Y\')}}A{T=d.T;C=d.C;O=d.O;J=[c]}7(T||O){7(T&&O){F(\'O/T 2c 46 47 48 29 49 4a\')}A 7(e){F(\'2V O/T/17 4b 4c B 16 J\')}A 7(O&&e){F(\'2c O 24 16 (13: \'+f+\')\')}}9 g,18,U,1w,1f,1x;7(C){1w=(/^2d$/i).12(C);1f=(/^4d$/i).12(C);1x=1f?\'1g\':C;g=6(a,s){a.4e(1k+C,s);7(1x 1c a&&!1w){a[1x]=\'\'}7(a.2W===1){a.2X(C);1f&&a.2X(1x)}};7(1w){18=6(a){8 a.2d.4f}}A 7(1f){18=6(a){8 a.1g}}A{18=6(a){8 a.4g(C)}}7(1w||1f){U=6(s){8 s.17(/\\"/g,\'&2Y;\')}}A{U=6(s){8 s.17(/\\"/g,\'&2Y;\').17(/\\s/g,\'&4h;\')}}}A{7(e){g=6(a,s){9 b=a.2Z;7(b){b.2e(E.30(s),a.4i);b.2f(a)}}}A{18=6(a){8 a.1n};g=6(a,s,b){7(b===P){a.1n=s}A{a.1n=\'\';a.1F(E.30(s))}}}U=6(s){8 s}}9 h;7(T){h=6(a,s){g(a,s+18(a),P)}}A 7(O){h=6(a,s){g(a,18(a)+s,P)}}A{h=6(a,s){g(a,s)}}8{C:C,K:J,31:h,13:f,U:U}}6 1y(a,n){9 b=t+n+\':\';B(9 i=0;i<a.K.u;i++){a.31(a.K[i],b)}}6 2g(e,f,g){8 6(c){9 a=f(c),2h=c[e],1M={32:a},2i=[],2j=6(b){c.32=a;c.1r=1M.1r=b;c.1t=1M.1t=a[b];2i.2k(g(c))};c[e]=1M;7(1G(a)){B(9 i=0,L=a.u||0;i<L;i++){2j(i)}}A{B(9 d 1c a){a.2l(d)&&2j(d)}}x 2h!==\'z\'?c[e]=2h:4j c[e];8 2i.27(\'\')}}6 2m(a,b,c,d){9 e=H;9 p;B(9 i 1c c){7(c.2l(i)){7(e){F(\'2c 4k 4l 4m 4n 16 2N a J\')}p=i;e=P}}7(!p){F(\'2V 16 2P\')}9 f=c[p];7(x(f)===\'14\'||x(f)===\'6\'){c={};c[p]={2A:f};8 2m(a,b,c,d)}9 g=2O(p),1z=1d(g.13),J=1u(a,b,P),K=J.K;B(i=0;i<K.u;i++){9 h=K[i],1A=1l(h,f);d[d.u]=1o(J.U,2g(g.2a,1z,1A));J.K=[h];1y(J,d.u-1)}}6 33(n,d){9 e=n.4o(\'*\'),2n=[],1h={a:[],l:{}},y,1N,i,L,j,1i,11,1O,2o;B(i=-1,L=e.u;i<L;i++){11=i>-1?e[i]:n;7(11.2W===1&&11.1g!==\'\'){1O=11.1g.1L(\' \');B(j=0,1i=1O.u;j<1i;j++){2o=1O[j];y=34(2o,11.1P);7(y!==H){1N=(/4p/i).12(y.C);7(y.13.1Q(\'@\')>-1||1N){11.1g=11.1g.17(\'@\'+y.C,\'\');7(1N){y.C=H}}2n.2k({n:11,y:y})}}}}8 2n;6 34(c,a){9 b=c.1s(21),C=b[3]||2F[a],y={T:!!b[1],V:b[2],C:C,O:!!b[4],13:c},i,L,1R,1S,W;B(i=1h.a.u-1;i>=0;i--){1R=1h.a[i];1S=1R.l[0];W=1S&&1S[y.V];7(x W!==\'z\'){y.V=1R.p+\'.\'+y.V;7(1h.l[y.V]===P){W=W[0]}1D}}7(x W===\'z\'){W=1G(d)?d[0][y.V]:d[y.V];7(x W===\'z\'){8 H}}7(1G(W)){1h.a.2k({l:W,p:y.V});1h.l[y.V]=P;y.t=\'16\'}A{y.t=\'35\'}8 y}}6 1l(a,b,c,d){9 e=[];d=d||c&&33(a,c);7(c){9 j,1i,y,n,f,K,1z,1v,1A;2R(d.u>0){y=d[0].y;n=d[0].n;d.4q(0,1);7(y.t===\'35\'){f=1u(n,y,H);1y(f,e.u);e[e.u]=1o(f.U,1d(y.V))}A{1z=1d(y.13);f=1u(n,y,P);K=f.K;B(j=0,1i=K.u;j<1i;j++){1v=K[j];1A=1l(1v,H,c,d);e[e.u]=1o(f.U,2g(y.13,1z,1A));f.K=[1v];1y(f,e.u-1)}}}}9 f,1j;B(9 g 1c b){7(b.2l(g)){1j=b[g];7(x(1j)===\'6\'||x(1j)===\'14\'){f=1u(a,g,H);1y(f,e.u);e[e.u]=1o(f.U,1d(1j))}A{2m(a,g,1j,e)}}}9 h=22(a),1e=[];7(a.1P===\'4r\'&&h.1Q(1k+\'4s\')>0){h=h.17(/\\4t\\s/,\' \')}A 7(a.1P===\'2G\'&&h.1Q(1k+\'2H\')>0){h=h.17(/\\4u=("|\')(\'|")\\s/,\' \')}h=h.1L(1k).27(\'\');9 k=h.1L(t),p;B(9 i=1;i<k.u;i++){p=k[i];1e[i]=e[4v(p,10)];k[i]=p.26(p.1Q(\':\')+1)}8 25(k,1e)}6 G(c,d,e){9 f=1l((e||D[0]).2J(P),c,d);8 6(a,b){b=b||a;8 f({1J:a,2p:b})}}6 M(a,b){9 c=x b===\'6\'?b:r.G(b,H,D[0]);B(9 i=0,L=D.u;i<L;i++){D[i]=2q(D[i],c(a,H))}2p=15;8 D}6 N(a,b){9 c=r.G(b,a,D[0]);B(9 i=0,L=D.u;i<L;i++){D[i]=2q(D[i],c(a,H))}2p=15;8 D}6 2q(a,b){9 c=a.1P,1B,Q,19,4w={1C:{}};7((/36|1T|37/).12(c)){9 d={1T:{1C:\'2r\'},36:{1C:{2r:\'1T\'}},37:{1C:{38:\'1T\'}}};Q=23(d[c])}A 7((/2r|38|4x/).12(c)){Q=E.1m(\'1C\')}A{Q=E.1m(\'4y\')}19=a.2Z;19.2e(Q,a);19.2f(a);Q.2d.4z=\'4A\';Q.1n=b;1B=Q.4B;19.2e(1B,Q);19.2f(Q);a=1B;Q=1B=19=15;8 a}};$p.Y={};$p.39={1U:6(){7(x E.1a===\'z\'){$p.Y.I=6(n,a){8 1U.4C(a,n)}}},3a:6(){7(x E.1a===\'z\'){$p.Y.I=6(n,a){8 $(n).4D(a)}}3b.4E({4F:[\'G\',\'M\',\'N\'],G:6(a,b){8 $p(D).G(a,b)},M:6(a,b){8 $($p(D).M(a,b))[0]},N:6(a,b){8 $($p(D).N(a,b))[0]}})},3c:6(){7(x E.1a===\'z\'){$p.Y.I=6(n,a){8 $(n).I(a)}}1V.4G.4H({G:6(a,b){8 $p(D[0]).G(a,b)},M:6(a,b){8 1V($p(D[0]).M(a,b))},N:6(a,b){8 1V($p(D[0]).N(a,b))}})},3d:6(){7(x E.1a===\'z\'){$p.Y.I=6(n,a){8 $(n).4I(a)}}3e.4J({G:6(a,b){8 $p(D).G(a,b)},M:6(a,b){8 $p(D).M(a,b)},N:6(a,b){8 $p(D).N(a,b)}})},R:6(){7(x E.1a===\'z\'){$p.Y.I=6(n,a){n=n===E?n.4K:n;8 x n===\'14\'?$$(n):$(n).4L(a)}}3e.4M({G:6(a,b,c){8 $p(a).G(b,c)},M:6(a,b,c){8 $p(a).M(b,c)},N:6(a,b,c){8 $p(a).N(b,c)}})},3f:6(){7(x E.1a===\'z\'){$p.Y.I=6(n,a){8 3g(a,n)}}},3h:6(){7(x E.1a===\'z\'){$p.Y.I=6(n,a){8 3i(a,n)}}}};(6(){9 a=x 1U!==\'z\'&&\'1U\'||x 3b!==\'z\'&&\'3a\'||x 1V!==\'z\'&&\'3c\'||x 4N!==\'z\'&&\'3d\'||x 4O!==\'z\'&&\'R\'||x 3g!==\'z\'&&\'3f\'||x 3i!==\'z\'&&\'3h\';a&&$p.39[a]()})();',62,299,'||||||function|if|return|var|||||||||||||||||||||length|||typeof|cspec|undefined|else|for|attr|this|document|error|compile|false|find|target|nodes|ii|render|autoRender|append|true|pa|prototype||prepend|quotefn|prop|val|selector|plugins|||ni|test|sel|string|null|loop|replace|getstr|ep|querySelector|templates|in|dataselectfn|pfns|isClass|className|openLoops|jj|dsel|attPfx|compiler|createElement|innerHTML|wrapquote|leaf|pVal|pos|match|item|gettarget|node|isStyle|attName|setsig|itersel|inner|ne|TABLE|break|Math|appendChild|isArray|fnVal|attLine|data|parts|split|temp|isNodeValue|cs|tagName|indexOf|loopi|loopil|TR|dojo|jQuery|ctxt|The|template|your|_|selRx|outerHTML|domify|with|concatenator|substring|join|bad|the|name|retStr|cannot|style|insertBefore|removeChild|loopfn|old|strs|buildArg|push|hasOwnProperty|loopgen|an|cj|context|replaceWith|TBODY|pure|arguments|core|getPlugins|case|was|not|found|root|is|floor|random|1000000|autoAttr|INPUT|value|console|cloneNode|object|querySelectorAll|PURE|on|parseloopspec|spec|charAt|while|slice|index|syntax|no|nodeType|removeAttribute|quot|parentNode|createTextNode|set|items|getAutoNodes|checkClass|str|TD|TH|THEAD|libs|domassistant|DOMAssistant|jquery|mootools|Element|sizzle|Sizzle|sly|Sly|switch|check|default|_s|_a|IMG|src|alert|log|debugger|throw|_compiler|_error|new|div|Object|toString|call|Array|createDocumentFragment|You|can|standalone|iPhone|FF3|Safari4|and|IE8|nTo|run|browser|you|need|JS|library|framework|CSS|engine|search|substr|reserved|word|current|running|iteration|nPlease|choose|another|zA|take|place|at|same|time|modifiers|allowed|class|setAttribute|cssText|getAttribute|nbsp|nextSibling|delete|have|more|than|one|getElementsByTagName|nodevalue|splice|OPTION|selected|sselected|svalue|parseInt|parent|TFOOT|SPAN|display|none|firstChild|query|cssSelect|attach|publicMethods|fn|extend|getElements|implement|body|select|addMethods|MooTools|Prototype'.split('|'),0,{}))
+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}('9 $p,2y=$p=6(){9 a=2z[0],1Y=I;7(u a===\'14\'){1Y=2z[1]||I}8 $p.2A(a,1Y)};$p.2A=6(l,q,r){9 r=2B(),1b=[];3m(u l){2C\'14\':1b=r.J(q||E,l);7(1b.x===0){F(\'1Z 20 "\'+l+\'" 2D 21 2E\')}1E;2C\'z\':F(\'1Z 20 2F 22 z, 3n 23 X\');1E;3o:1b=[l]}B(9 i=0,M=1b.x;i<M;i++){r[i]=1b[i]}r.x=M;9 t=\'3p\'+1F.2G(1F.2H()*2I)+\'24\',1l=\'3q\'+1F.2G(1F.2H()*2I)+\'24\',25=/^(\\+)?([^\\@\\+]+)?\\@?([^\\+]+)?(\\+)?$/,2J={3r:\'3s\',2K:\'2L\'};8 r;6 F(e){3t(e);7(u 2M!==\'z\'){2M.3u(e);3v}3w(\'2y F: \'+e);}6 2B(){9 a=$p.Y,f=6(){};f.T=a;f.T.G=a.G||G;f.T.N=a.N||N;f.T.O=a.O||O;f.T.J=a.J||J;f.T.3x=1m;f.T.3y=F;8 3z f()}6 26(b){8 b.26||(6(n){9 a=E.1n(\'3A\'),h;a.1G(n.2N(Q));h=a.1o;a=15;8 h})(b)}6 1H(o){8 3B.T.3C.3D(o)==="[2O 3E]"}6 1p(b,f){8 6(a){8 b(\'\'+f(a))}}6 27(a,b){b=b||E.3F();9 c,1q;B(9 n 1c a){c=E.1n(n);b.1G(c);7(u a[n]===\'2O\'){1q=27(a[n],c)}A{1q=E.1n(a[n]);c.1G(1q)}}8 1q};6 J(n,a){7(u n===\'14\'){a=n;n=I}7(u E.2P!==\'z\'){8(n||E).2P(a)}A{F(\'3G 3H 12 2Q 3I 28: 3J, 3K.5+, 3L+ 3M 3N+\\n\\3O 3P 2Q 29 23 3Q, 3R 3S a 3T 3U/3V 28 a 3W X 3X\')}}6 2a(c,d){8 6(a){9 b=[c[0]],n=c.x,1I,1r,1J,1s;B(9 i=1;i<n;i++){1I=d[i](a);1r=c[i];7(1I===\'\'){1J=b[b.x-1];7((1s=1J.3Y(/[\\w]+=\\"?$/))>-1){b[b.x-1]=1J.2b(0,1s);1r=1r.3Z(1)}}b[b.x]=1I;b[b.x]=1r}8 b.2c(\'\')}}6 2R(p){9 m=p.1t(/^(\\w+)\\s*<-\\s*(\\S+)?$/);7(m===15){F(\'2d 16 2S: "\'+p+\'"\')}7(m[1]===\'1u\'){F(\'"1u<-..." 22 a 40 41 B 2e 42 43 44.\\n\\45 46 47 2f B 23 16.\')}7(!m[2]){m[2]=6(a){8 a.1K}}8{2f:m[1],13:m[2]}}6 1d(c){7(u(c)===\'6\'){8 c}9 m=c.1t(/^[a-48-Z$24][\\w$]*(\\.[\\w$-]*[^\\.])*$/);7(m===15){9 d=I,s=c,1L=[],1e=[],i=0,2g;7(/\\\'|\\"/.12(s.2T(0))){7(/\\\'|\\"/.12(s.2T(s.x-1))){2g=s.2b(1,s.x-1);8 6(){8 2g}}}A{2U((m=s.1t(/#\\{([^{}]+)\\}/))!==15){d=Q;1L[i++]=s.2V(0,m.2W);1e[i]=1d(m[1]);s=s.2V(m.2W+m[0].x,s.x)}}7(!d){F(\'2d 1K X 2X: \'+c)}1L[i]=s;8 2a(1L,1e)}m=c.1M(\'.\');8 6(a){9 b=a.1K;7(!b){8\'\'}9 v=a[m[0]],i=0;7(v){b=v.1u;i+=1}9 n=m.x;B(;i<n;i++){7(!b){1E}b=b[m[i]]}8(!b&&b!==0)?\'\':b}}6 1v(c,d,e){9 f,U,X,C,P,K=[];7(u d===\'14\'){f=d;9 m=d.1t(25);7(!m){F(\'2d X 2X: \'+d)}U=m[1];X=m[2];C=m[3];P=m[4];7(X===\'.\'||(!X&&C)){K[0]=c}A{K=r.J(c,X)}7(!K||K.x===0){8 F(\'1Z 1w "\'+d+\'" 2D 21 2E 1c 2e 20\')}}A{U=d.U;C=d.C;P=d.P;K=[c]}7(U||P){7(U&&P){F(\'P/U 2h 49 4a 4b 2e 4c 4d\')}A 7(e){F(\'2Y P/U/17 4e 4f B 16 K\')}A 7(P&&e){F(\'2h P 28 16 (13: \'+f+\')\')}}9 g,18,V,1x,1f,1y;7(C){1x=(/^2i$/i).12(C);1f=(/^4g$/i).12(C);1y=1f?\'1g\':C;g=6(a,s){a.4h(1l+C,s);7(1y 1c a&&!1x){a[1y]=\'\'}7(a.2Z===1){a.30(C);1f&&a.30(1y)}};7(1x){18=6(a){8 a.2i.4i}}A 7(1f){18=6(a){8 a.1g}}A{18=6(a){8 a.4j(C)}}7(1x||1f){V=6(s){8 s.17(/\\"/g,\'&31;\')}}A{V=6(s){8 s.17(/\\"/g,\'&31;\').17(/\\s/g,\'&4k;\')}}}A{7(e){g=6(a,s){9 b=a.32;7(b){b.2j(E.33(s),a.4l);b.2k(a)}}}A{18=6(a){8 a.1o};g=6(a,s,b){7(b===Q){a.1o=s}A{a.1o=\'\';a.1G(E.33(s))}}}V=6(s){8 s}}9 h;7(U){h=6(a,s){g(a,s+18(a),Q)}}A 7(P){h=6(a,s){g(a,18(a)+s,Q)}}A{h=6(a,s){g(a,s)}}8{C:C,L:K,34:h,13:f,V:V}}6 1z(a,n){9 b=t+n+\':\';B(9 i=0;i<a.L.x;i++){a.34(a.L[i],b)}}6 2l(e,f,g,h){8 6(c){9 a=f(c),2m=c[e],1N={35:a},2n=[],2o=6(b){c.35=a;c.1s=1N.1s=b;c.1u=1N.1u=a[b];2n.2p(g(c))};c[e]=1N;7(1H(a)){7(u h!==\'z\'){a.1O(h)}B(9 i=0,M=a.x||0;i<M;i++){2o(i)}}A{7(u h!==\'z\'){F(\'1O 22 4m 4n 29 4o, 21 4p\')}B(9 d 1c a){a.2q(d)&&2o(d)}}u 2m!==\'z\'?c[e]=2m:4q c[e];8 2n.2c(\'\')}}6 2r(a,b,c,d){9 e=I,1h,2s,H;B(H 1c c){7(c.2q(H)){7(H===\'1O\'){2s=c.1O;4r}7(e){F(\'2h 4s 4t 4u 4v 16 29 a K\')}1h=H;e=Q}}7(!1h){F(\'2Y 16 2S\')}9 f=c[1h];7(u(f)===\'14\'||u(f)===\'6\'){c={};c[1h]={2F:f};8 2r(a,b,c,d)}9 g=2R(1h),1A=1d(g.13),K=1v(a,b,Q),L=K.L;B(i=0;i<L.x;i++){9 h=L[i],1B=1m(h,f);d[d.x]=1p(K.V,2l(g.2f,1A,1B,2s));K.L=[h];1z(K,d.x-1)}}6 36(n,d){9 e=n.4w(\'*\'),2t=[],1i={a:[],l:{}},y,1P,i,M,j,1j,11,1Q,2u;B(i=-1,M=e.x;i<M;i++){11=i>-1?e[i]:n;7(11.2Z===1&&11.1g!==\'\'){1Q=11.1g.1M(\' \');B(j=0,1j=1Q.x;j<1j;j++){2u=1Q[j];y=37(2u,11.1R);7(y!==I){1P=(/4x/i).12(y.C);7(y.13.1S(\'@\')>-1||1P){11.1g=11.1g.17(\'@\'+y.C,\'\');7(1P){y.C=I}}2t.2p({n:11,y:y})}}}}8 2t;6 37(c,a){9 b=c.1t(25),C=b[3]||2J[a],y={U:!!b[1],H:b[2],C:C,P:!!b[4],13:c},i,M,1T,1U,W;B(i=1i.a.x-1;i>=0;i--){1T=1i.a[i];1U=1T.l[0];W=1U&&1U[y.H];7(u W!==\'z\'){y.H=1T.p+\'.\'+y.H;7(1i.l[y.H]===Q){W=W[0]}1E}}7(u W===\'z\'){W=1H(d)?d[0][y.H]:d[y.H];7(u W===\'z\'){8 I}}7(1H(W)){1i.a.2p({l:W,p:y.H});1i.l[y.H]=Q;y.t=\'16\'}A{y.t=\'38\'}8 y}}6 1m(a,b,c,d){9 e=[];d=d||c&&36(a,c);7(c){9 j,1j,y,n,f,L,1A,1w,1B;2U(d.x>0){y=d[0].y;n=d[0].n;d.4y(0,1);7(y.t===\'38\'){f=1v(n,y,I);1z(f,e.x);e[e.x]=1p(f.V,1d(y.H))}A{1A=1d(y.13);f=1v(n,y,Q);L=f.L;B(j=0,1j=L.x;j<1j;j++){1w=L[j];1B=1m(1w,I,c,d);e[e.x]=1p(f.V,2l(y.13,1A,1B));f.L=[1w];1z(f,e.x-1)}}}}9 f,1k;B(9 g 1c b){7(b.2q(g)){1k=b[g];7(u(1k)===\'6\'||u(1k)===\'14\'){f=1v(a,g,I);1z(f,e.x);e[e.x]=1p(f.V,1d(1k))}A{2r(a,g,1k,e)}}}9 h=26(a),1e=[];7(a.1R===\'4z\'&&h.1S(1l+\'4A\')>0){h=h.17(/\\4B\\s/,\' \')}A 7(a.1R===\'2K\'&&h.1S(1l+\'2L\')>0){h=h.17(/\\4C=("|\')(\'|")\\s/,\' \')}h=h.1M(1l).2c(\'\');9 k=h.1M(t),p;B(9 i=1;i<k.x;i++){p=k[i];1e[i]=e[4D(p,10)];k[i]=p.2b(p.1S(\':\')+1)}8 2a(k,1e)}6 G(c,d,e){9 f=1m((e||D[0]).2N(Q),c,d);8 6(a,b){b=b||a;8 f({1K:a,2v:b})}}6 N(a,b){9 c=u b===\'6\'?b:r.G(b,I,D[0]);B(9 i=0,M=D.x;i<M;i++){D[i]=2w(D[i],c(a,I))}2v=15;8 D}6 O(a,b){9 c=r.G(b,a,D[0]);B(9 i=0,M=D.x;i<M;i++){D[i]=2w(D[i],c(a,I))}2v=15;8 D}6 2w(a,b){9 c=a.1R,1C,R,19,4E={1D:{}};7((/39|1V|3a/).12(c)){9 d={1V:{1D:\'2x\'},39:{1D:{2x:\'1V\'}},3a:{1D:{3b:\'1V\'}}};R=27(d[c])}A 7((/2x|3b|4F/).12(c)){R=E.1n(\'1D\')}A{R=E.1n(\'4G\')}19=a.32;19.2j(R,a);19.2k(a);R.2i.4H=\'4I\';R.1o=b;1C=R.4J;19.2j(1C,R);19.2k(R);a=1C;R=1C=19=15;8 a}};$p.Y={};$p.3c={1W:6(){7(u E.1a===\'z\'){$p.Y.J=6(n,a){8 1W.4K(a,n)}}},3d:6(){7(u E.1a===\'z\'){$p.Y.J=6(n,a){8 $(n).4L(a)}}3e.4M({4N:[\'G\',\'N\',\'O\'],G:6(a,b){8 $p(D).G(a,b)},N:6(a,b){8 $($p(D).N(a,b))[0]},O:6(a,b){8 $($p(D).O(a,b))[0]}})},3f:6(){7(u E.1a===\'z\'){$p.Y.J=6(n,a){8 $(n).J(a)}}1X.4O.4P({G:6(a,b){8 $p(D[0]).G(a,b)},N:6(a,b){8 1X($p(D[0]).N(a,b))},O:6(a,b){8 1X($p(D[0]).O(a,b))}})},3g:6(){7(u E.1a===\'z\'){$p.Y.J=6(n,a){8 $(n).4Q(a)}}3h.4R({G:6(a,b){8 $p(D).G(a,b)},N:6(a,b){8 $p(D).N(a,b)},O:6(a,b){8 $p(D).O(a,b)}})},T:6(){7(u E.1a===\'z\'){$p.Y.J=6(n,a){n=n===E?n.4S:n;8 u n===\'14\'?$$(n):$(n).4T(a)}}3h.4U({G:6(a,b,c){8 $p(a).G(b,c)},N:6(a,b,c){8 $p(a).N(b,c)},O:6(a,b,c){8 $p(a).O(b,c)}})},3i:6(){7(u E.1a===\'z\'){$p.Y.J=6(n,a){8 3j(a,n)}}},3k:6(){7(u E.1a===\'z\'){$p.Y.J=6(n,a){8 3l(a,n)}}}};(6(){9 a=u 1W!==\'z\'&&\'1W\'||u 3e!==\'z\'&&\'3d\'||u 1X!==\'z\'&&\'3f\'||u 4V!==\'z\'&&\'3g\'||u 4W!==\'z\'&&\'T\'||u 3j!==\'z\'&&\'3i\'||u 3l!==\'z\'&&\'3k\';a&&$p.3c[a]()})();',62,307,'||||||function|if|return|var|||||||||||||||||||||typeof|||length|cspec|undefined|else|for|attr|this|document|error|compile|prop|false|find|target|nodes|ii|render|autoRender|append|true|pa||prototype|prepend|quotefn|val|selector|plugins|||ni|test|sel|string|null|loop|replace|getstr|ep|querySelector|templates|in|dataselectfn|pfns|isClass|className|ls|openLoops|jj|dsel|attPfx|compiler|createElement|innerHTML|wrapquote|leaf|pVal|pos|match|item|gettarget|node|isStyle|attName|setsig|itersel|inner|ne|TABLE|break|Math|appendChild|isArray|fnVal|attLine|data|parts|split|temp|sort|isNodeValue|cs|tagName|indexOf|loopi|loopil|TR|dojo|jQuery|ctxt|The|template|not|is|your|_|selRx|outerHTML|domify|with|on|concatenator|substring|join|bad|the|name|retStr|cannot|style|insertBefore|removeChild|loopfn|old|strs|buildArg|push|hasOwnProperty|loopgen|sorter|an|cj|context|replaceWith|TBODY|pure|arguments|core|getPlugins|case|was|found|root|floor|random|1000000|autoAttr|INPUT|value|console|cloneNode|object|querySelectorAll|PURE|parseloopspec|spec|charAt|while|slice|index|syntax|no|nodeType|removeAttribute|quot|parentNode|createTextNode|set|items|getAutoNodes|checkClass|str|TD|TH|THEAD|libs|domassistant|DOMAssistant|jquery|mootools|Element|sizzle|Sizzle|sly|Sly|switch|check|default|_s|_a|IMG|src|alert|log|debugger|throw|_compiler|_error|new|div|Object|toString|call|Array|createDocumentFragment|You|can|standalone|iPhone|FF3|Safari4|and|IE8|nTo|run|browser|you|need|JS|library|framework|CSS|engine|search|substr|reserved|word|current|running|iteration|nPlease|choose|another|zA|take|place|at|same|time|modifiers|allowed|class|setAttribute|cssText|getAttribute|nbsp|nextSibling|only|available|arrays|objects|delete|continue|have|more|than|one|getElementsByTagName|nodevalue|splice|OPTION|selected|sselected|svalue|parseInt|parent|TFOOT|SPAN|display|none|firstChild|query|cssSelect|attach|publicMethods|fn|extend|getElements|implement|body|select|addMethods|MooTools|Prototype'.split('|'),0,{}))