rubyjs 0.7.1 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. data/examples/client_server/README +18 -0
  2. data/examples/client_server/Rakefile +5 -0
  3. data/examples/client_server/client.js +749 -0
  4. data/examples/client_server/client.rb +12 -0
  5. data/examples/client_server/index.html +7 -0
  6. data/examples/client_server/server.rb +17 -0
  7. data/examples/hw/hw.js +234 -216
  8. data/rubyjs.gemspec +2 -2
  9. data/src/rubyjs.rb +0 -1
  10. data/src/rubyjs/compiler.rb +21 -8
  11. data/src/rubyjs/debug_name_generator.rb +23 -6
  12. data/src/rubyjs/model.rb +14 -8
  13. data/test/browser.test.html +1 -1
  14. data/test/browser.test.js +2337 -1992
  15. data/test/test_yield.rb +2 -0
  16. metadata +108 -158
  17. data/patches/parse_tree.rb.diff +0 -34
  18. data/vendor/ParseTree-1.7.1-patched/History.txt +0 -217
  19. data/vendor/ParseTree-1.7.1-patched/Manifest.txt +0 -22
  20. data/vendor/ParseTree-1.7.1-patched/README.txt +0 -110
  21. data/vendor/ParseTree-1.7.1-patched/Rakefile +0 -41
  22. data/vendor/ParseTree-1.7.1-patched/bin/parse_tree_abc +0 -89
  23. data/vendor/ParseTree-1.7.1-patched/bin/parse_tree_audit +0 -28
  24. data/vendor/ParseTree-1.7.1-patched/bin/parse_tree_deps +0 -62
  25. data/vendor/ParseTree-1.7.1-patched/bin/parse_tree_show +0 -49
  26. data/vendor/ParseTree-1.7.1-patched/demo/printer.rb +0 -20
  27. data/vendor/ParseTree-1.7.1-patched/lib/composite_sexp_processor.rb +0 -49
  28. data/vendor/ParseTree-1.7.1-patched/lib/parse_tree.rb +0 -1013
  29. data/vendor/ParseTree-1.7.1-patched/lib/sexp.rb +0 -235
  30. data/vendor/ParseTree-1.7.1-patched/lib/sexp_processor.rb +0 -330
  31. data/vendor/ParseTree-1.7.1-patched/lib/unique.rb +0 -15
  32. data/vendor/ParseTree-1.7.1-patched/test/pt_testcase.rb +0 -1221
  33. data/vendor/ParseTree-1.7.1-patched/test/something.rb +0 -53
  34. data/vendor/ParseTree-1.7.1-patched/test/test_all.rb +0 -13
  35. data/vendor/ParseTree-1.7.1-patched/test/test_composite_sexp_processor.rb +0 -69
  36. data/vendor/ParseTree-1.7.1-patched/test/test_parse_tree.rb +0 -216
  37. data/vendor/ParseTree-1.7.1-patched/test/test_sexp.rb +0 -291
  38. data/vendor/ParseTree-1.7.1-patched/test/test_sexp_processor.rb +0 -244
  39. data/vendor/ParseTree-1.7.1-patched/validate.sh +0 -31
  40. data/vendor/ParseTree-1.7.1/History.txt +0 -217
  41. data/vendor/ParseTree-1.7.1/Manifest.txt +0 -22
  42. data/vendor/ParseTree-1.7.1/README.txt +0 -110
  43. data/vendor/ParseTree-1.7.1/Rakefile +0 -41
  44. data/vendor/ParseTree-1.7.1/bin/parse_tree_abc +0 -89
  45. data/vendor/ParseTree-1.7.1/bin/parse_tree_audit +0 -28
  46. data/vendor/ParseTree-1.7.1/bin/parse_tree_deps +0 -62
  47. data/vendor/ParseTree-1.7.1/bin/parse_tree_show +0 -49
  48. data/vendor/ParseTree-1.7.1/demo/printer.rb +0 -20
  49. data/vendor/ParseTree-1.7.1/lib/composite_sexp_processor.rb +0 -49
  50. data/vendor/ParseTree-1.7.1/lib/parse_tree.rb +0 -1004
  51. data/vendor/ParseTree-1.7.1/lib/sexp.rb +0 -235
  52. data/vendor/ParseTree-1.7.1/lib/sexp_processor.rb +0 -330
  53. data/vendor/ParseTree-1.7.1/lib/unique.rb +0 -15
  54. data/vendor/ParseTree-1.7.1/test/pt_testcase.rb +0 -1221
  55. data/vendor/ParseTree-1.7.1/test/something.rb +0 -53
  56. data/vendor/ParseTree-1.7.1/test/test_all.rb +0 -13
  57. data/vendor/ParseTree-1.7.1/test/test_composite_sexp_processor.rb +0 -69
  58. data/vendor/ParseTree-1.7.1/test/test_parse_tree.rb +0 -216
  59. data/vendor/ParseTree-1.7.1/test/test_sexp.rb +0 -291
  60. data/vendor/ParseTree-1.7.1/test/test_sexp_processor.rb +0 -244
  61. data/vendor/ParseTree-1.7.1/validate.sh +0 -31
@@ -0,0 +1,18 @@
1
+ Start the server:
2
+
3
+ ruby -rubygems server.rb
4
+
5
+ Then point your browser at:
6
+
7
+ http://localhost:3000/index.html
8
+
9
+ and click the link.
10
+
11
+ This will send an AJAX request to the server, which in turn returns JSON
12
+ encoded data. This JSON data is converted to a RubyJS data structure
13
+ which is actually the same as the data structure that is converted to
14
+ JSON on the server side (in this example: [{'Hello' => 'World!'}],
15
+ i.e. an Array that contains a Hash). Then, the #inspect method is called
16
+ for this data structure, which returns a String representation of that
17
+ data structure, actually the same as you'd get when you call #inspect
18
+ in a regular Ruby application.
@@ -0,0 +1,5 @@
1
+ task "client.js" do
2
+ sh "rubyjs --main Client -o client.js client.rb"
3
+ end
4
+
5
+ task :default => "client.js"
@@ -0,0 +1,749 @@
1
+ // declare nil
2
+ function NilClass() {}
3
+
4
+ // FIXME: remove
5
+ NilClass.prototype.toString = function() { return "nil"; };
6
+ nil = new NilClass();
7
+
8
+ //
9
+ // define a null-function (used by HTTPRequest)
10
+ //
11
+ function a$k()
12
+ {
13
+ }
14
+
15
+ //
16
+ // r: return value
17
+ // s: scope (method scope)
18
+ //
19
+ function a$c(r,s)
20
+ {
21
+ this.a$a = r;
22
+ this.a$b = s;
23
+ return this;
24
+ }
25
+
26
+ //
27
+ // Throw in Javascript is a statement.
28
+ //
29
+ // This function can be used to overcome
30
+ // that limitation.
31
+ //
32
+ function a$o(x) { throw(x); }
33
+
34
+ function a$b(a)
35
+ {
36
+ // TODO
37
+ return a;
38
+ }
39
+
40
+ //
41
+ // helper function for multiple assignment in
42
+ // iterator parameters.
43
+ //
44
+ // undefined -> []
45
+ // 1 -> [1]
46
+ // [1] -> [[1]]
47
+ // [] -> [[]]
48
+ // [1,2] -> [1,2]
49
+ //
50
+ function a$j(a)
51
+ {
52
+ if (a===undefined) return [];
53
+ if (a.constructor!=Array || a.length<2) return [a];
54
+ return a;
55
+ }
56
+
57
+ //
58
+ // Call the method in the superclass.
59
+ //
60
+ // As super is used quite rarely, we dont optimize for it.
61
+ //
62
+ // object, method, iterator, arguments
63
+ //
64
+ function a$p(o, m, i, a)
65
+ {
66
+ var r = o[m]; // method in current class
67
+ var c = o.a$g.a$e;
68
+ while (r === c.a$d.prototype[m])
69
+ c = c.a$e;
70
+ return c.a$d.prototype[m].apply(o, [i].concat(a));
71
+ }
72
+
73
+ function a$q(o, m, a)
74
+ {
75
+ var r = o[m]; // method in current class
76
+ var c = o.a$g.a$e;
77
+ while (r === c.a$d.prototype[m])
78
+ c = c.a$e;
79
+ return c.a$d.prototype[m].apply(o, a);
80
+ }
81
+
82
+ //
83
+ // Whether o.kind_of?(c)
84
+ //
85
+ function a$i(o, c)
86
+ {
87
+ var k,i,m;
88
+
89
+ k = o.a$g;
90
+
91
+ while (k != nil)
92
+ {
93
+ if (k === c) return true;
94
+
95
+ // check included modules
96
+ m = k.a$j;
97
+ for (i=0; i<m.length; i++)
98
+ {
99
+ if (m[i] === c) return true;
100
+ }
101
+
102
+ k = k.a$e;
103
+ }
104
+
105
+ return false;
106
+ }
107
+
108
+ function a$m(c)
109
+ {
110
+ for (var i=0; i<c.length; i++)
111
+ a$e(c[i]);
112
+ }
113
+
114
+ function a$e(c)
115
+ {
116
+ var k,i;
117
+
118
+ //
119
+ // include modules
120
+ //
121
+ // do that before, because when assigning instance methods of
122
+ // the super class, a check for === undefined prevents this method
123
+ // from being overwritten.
124
+ //
125
+ for (i=0; i<c.a$j.length; i++)
126
+ {
127
+ for (k in c.a$j[i].a$d.prototype)
128
+ {
129
+ if (c.a$d.prototype[k]===undefined)
130
+ {
131
+ c.a$d.prototype[k] = c.a$j[i].a$d.prototype[k];
132
+ }
133
+ }
134
+ }
135
+
136
+ // instance methods
137
+ if (c.a$e != nil)
138
+ {
139
+ for (k in c.a$e.a$d.prototype)
140
+ {
141
+ if (c.a$d.prototype[k]===undefined)
142
+ {
143
+ c.a$d.prototype[k] = c.a$e.a$d.prototype[k];
144
+ }
145
+ }
146
+ }
147
+
148
+ // inherit class methods from superclass
149
+ if (c.a$e != nil)
150
+ {
151
+ for (k in c.a$e)
152
+ {
153
+ if (c[k]===undefined)
154
+ {
155
+ c[k] = c.a$e[k];
156
+ }
157
+ }
158
+ }
159
+
160
+ // set class for instanciated objects
161
+ c.a$d.prototype.a$g = c;
162
+ }
163
+
164
+ function a$d(h)
165
+ {
166
+ var c,k,i;
167
+ c = h.a$g || $b.$a(nil, h.a$e, h.a$c, h.a$d);
168
+
169
+ if (h.a$h)
170
+ {
171
+ for (k in h.a$h)
172
+ {
173
+ c.a$d.prototype[k] = h.a$h[k];
174
+ }
175
+ }
176
+
177
+ if (h.a$f)
178
+ {
179
+ for (k in h.a$f) c[k] = h.a$f[k];
180
+ }
181
+
182
+ if (h.a$j)
183
+ {
184
+ for (i=0; i<h.a$j.length; i++)
185
+ {
186
+ c.a$j.push(h.a$j[i]);
187
+ }
188
+ }
189
+
190
+ return c;
191
+ }
192
+
193
+ function a$a(_a, _b, _c, _d)
194
+ {
195
+ this.a$e = _b;
196
+ this.a$c = _c;
197
+ this.a$d = _d;
198
+ this.a$j = [];
199
+ this.a$g = _a;
200
+ return this;
201
+ }
202
+
203
+ a$a.$e = function() { return "MetaClass"; };
204
+ a$a.$A = function() { return this; };
205
+ //
206
+ // Generates a new method_missing function
207
+ // for the given symbol +sym+.
208
+ //
209
+ var a$r = {};
210
+ function a$s(sym)
211
+ {
212
+ if (!a$r[sym])
213
+ {
214
+ var fn = function() {
215
+ return a$t(this, arguments, sym);
216
+ };
217
+ fn.a$i = true;
218
+ a$r[sym] = fn;
219
+ }
220
+
221
+ return a$r[sym];
222
+ }
223
+
224
+ function a$t(obj, args, sym)
225
+ {
226
+ var i, a;
227
+ a = [];
228
+ if (args.length == 0)
229
+ a.push(nil);
230
+ else
231
+ a.push(args[0]);
232
+
233
+ a.push(a$h[sym] || nil);
234
+
235
+ for (i=1; i<args.length; i++)
236
+ a.push(args[i]);
237
+
238
+ var m = obj.$n;
239
+
240
+ if (m)
241
+ return m.apply(obj, a);
242
+ else
243
+ throw "FATAL: method_missing missing";
244
+ }
245
+
246
+ //
247
+ // assign method_missing stubs
248
+ //
249
+ function a$n(c)
250
+ {
251
+ var i;
252
+
253
+ for (i in a$h)
254
+ {
255
+ if (c.a$d.prototype[i]===undefined)
256
+ {
257
+ c.a$d.prototype[i] = a$s(i);
258
+ }
259
+ }
260
+
261
+ if (c.a$e != nil)
262
+ {
263
+ for (i in c.a$e)
264
+ {
265
+ if (c[i]===undefined)
266
+ {
267
+ c[i] = a$s(i);
268
+ }
269
+ }
270
+ }
271
+ }
272
+ // method map
273
+ var a$h = {"$b1":"end","$bx":"sub","$aY":"createTFoot","$v":"each","$b6":"new_from_jsobject","$x":"loop","$aa":"to_f","$aI":"setImgSrc","$V":"%","$b2":"member?","$E":"collect","$Z":"&","$b5":"new_from_key_value_list","$y":"to_json","$f":"===","$S":"==","$b0":"include?","$bL":"reverse","$P":"downto","$I":"map","$ab":"to_i","$aQ":"getAbsoluteLeft","$X":"times","$t":"p","$b3":"keys","$bi":"createTHead","$bf":"getCapture","$a1":"getAttribute","$s":"proc","$b":"allocate","$aS":"setOptionText","$K":"reject","$aH":"getEventsSunk","$ah":"setInnerHTML","$bz":"size","$bh":"createTable","$5":"*","$ak":"getNextSibling","$bJ":"delete","$be":"getChild","$O":"+","$aj":"getStyleAttribute","$b4":"values","$bS":"unshift","$bs":"getParent","$bj":"getChildCount","$aJ":"createTBody","$M":"upto","$bU":"dup","$bA":"rjust","$bk":"getPropertyBoolean","$R":"-","$ax":"getImgSrc","$ai":"getElementById","$q":"nil?","$aO":"createDiv","$aK":"scrollIntoView","$a":"new","$an":"compare","$bR":"push","$br":"changeToStaticPositioning","$bc":"removeEventListener","$aZ":"createInputCheck","$U":"/","$G":"call","$aR":"insertBefore","$_":"message","$z":"is_a?","$b7":"createXmlHTTPRequest","$bF":"split","$bv":"main","$aU":"getInnerHTML","$aN":"windowGetClientHeight","$aP":"getFirstChild","$a4":"createLabel","$e":"name","$l":"empty?","$bB":"length","$ac":"to_splat","$j":"raise","$aD":"sinkEvents","$o":"to_s","$bM":"clear","$bt":"getAbsoluteTop","$Q":">=","$aB":"getProperty","$b9":"asyncImpl","$bq":"createSelect","$bn":"getStyleAttributeBoolean","$W":"|","$aC":"windowGetClientWidth","$h":"kind_of?","$al":"releaseCapture","$bw":"asyncGet","$bm":"removeAttribute","$a7":"getChildIndex","$a2":"createForm","$aX":"createTextArea","$aE":"createCaption","$H":"find_all","$bC":"[]","$ba":"setInnerText","$0":"~","$ar":"createInputText","$bG":"strip","$aW":"createInputPassword","$ay":"setAbsolutePixelPosition","$3":"-@","$aM":"createFieldSet","$aF":"getPropertyInt","$9":"[]=","$T":"succ","$bT":"reverse!","$a8":"createCol","$a5":"isVisible","$C":"hash","$A":"class","$i":"inspect","$aV":"createTD","$az":"setStyleAttribute","$1":"^","$at":"getStyleAttributeInt","$ag":"setProperty","$b8":"asyncPost","$aq":"createElement","$aL":"createLegend","$bP":"pop","$p":"__send","$6":"_parse","$g":"eql?","$7":"dump","$D":"method","$Y":"<","$av":"getInnerText","$bZ":"begin","$bI":"first","$a6":"createTH","$bE":"ljust","$bg":"isOrHasChild","$a9":"createIFrame","$F":"<<","$d":"__invoke","$2":">","$N":"<=","$as":"createInput","$c":"initialize","$w":"send","$ao":"setVisible","$r":"respond_to?","$a$":"replace","$k":"shift","$8":"load","$aG":"setAttribute","$aT":"removeChild","$bY":"exclude_end?","$4":"+@","$ap":"createColGroup","$bl":"createSpan","$a_":"createOptions","$L":"select","$aw":"setCapture","$J":"to_a","$bH":"index","$bD":"=~","$bb":"createAnchor","$n":"method_missing","$au":"createInputRadio","$bO":"each_with_index","$bK":"join","$bp":"appendChild","$a0":"setEventListener","$B":"tap","$bN":"last","$bo":"insertChild","$a3":"createButton","$m":"instance_of?","$aA":"createTR","$bQ":"to_ary","$by":"gsub","$bd":"createImg","$u":"puts"};
274
+ var a$f = {};
275
+ for (var i in a$h) a$f[a$h[i]] = i;
276
+ $b = a$d({a$e: nil,a$f: {$a: function(_e,_a,_b,_c){var self,_d;self=this;try{if(arguments.length<3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));if(arguments.length>4)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 3)'));if(_c==null)_c=nil;;if((_d=_c,_d===false||_d===nil)){_c=(function() {})};return new self.a$d($b, _a, _b, _c);}catch(_f){if(_f instanceof a$c && (!_f.a$b || _f.a$b==2))return _f.a$a;throw(_f)}}},a$c: "Class",a$g: new a$a(a$a, nil, "Class", a$a),a$h: {$e: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;return self.a$c},$a: function(_c){var self,_a,_b,_d,_e,_f;_f=nil;self=this;_d=_c==null?nil:_c;try{_a=[];for(_b=1;_b<arguments.length;_b++)_a.push(arguments[_b]);;_e=self.$b();_e.$d(_d,'$c',a$b(_a));_f=_e;return _f}catch(_g){if(_g instanceof a$c && (!_g.a$b || _g.a$b==0))return _g.a$a;throw(_g)}},$f: function(_d,_a){var self,_b,_c;_c=nil;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;_c=(_b=self.$g(nil,_a), (_b!==false&&_b!==nil) ? _b : (_a.$h(nil,self)));return _c}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==1))return _e.a$a;throw(_e)}},$b: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;return (new self.a$d())},$i: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;return self.a$c}}});a$e($b);$i = a$d({a$j: [],a$e: nil,a$c: "Kernel",a$h: {$p: function(_d,_a){var self,_b,_c,_e;self=this;_e=_d==null?nil:_d;try{if(arguments.length<2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));_b=[];for(_c=2;_c<arguments.length;_c++)_b.push(arguments[_c]);;
277
+ var m = self[a$f[_a]];
278
+ if (m)
279
+ return m.apply(self, [_e].concat(_b));
280
+ else
281
+ return self.$n.apply(self, [_e].concat([_a]).concat(_b));}catch(_f){if(_f instanceof a$c && (!_f.a$b || _f.a$b==4))return _f.a$a;throw(_f)}},$n: function(_d,_a){var self,_b,_c,_e,_f;_f=nil;self=this;_e=_d==null?nil:_d;try{if(arguments.length<2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));_b=[];for(_c=2;_c<arguments.length;_c++)_b.push(arguments[_c]);;_f=self.$j(nil,$g,("undefined method `" + (_a).$o() + ("' for ").$o() + (self.$i()).$o()));return _f}catch(_g){if(_g instanceof a$c && (!_g.a$b || _g.a$b==3))return _g.a$a;throw(_g)}},$j: function(){var self,_a,_b,_c,_d;self=this;_a=[];for(_b=1;_b<arguments.length;_b++)_a.push(arguments[_b]);;_c=((_b=_a.$l(),_b!==false&&_b!==nil)?$c.$a(nil,""):(_d=_a.$k(),((_b=_d.$h(nil,$b),_b!==false&&_b!==nil)?_d.$d(nil,'$a',a$b(_a)):((_b=_d.$m(nil,$f),_b!==false&&_b!==nil)?((_b=_a.$l(),_b!==false&&_b!==nil)?_d:$a.$a(nil,"to many arguments given to raise")):((_b=_d.$m(nil,$e),_b!==false&&_b!==nil)?((_b=_a.$l(),_b!==false&&_b!==nil)?$c.$a(nil,_d):$a.$a(nil,"to many arguments given to raise")):$d.$a(nil,"exception class/object expected"))))));throw(_c)},$q: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=false;return _a},$s: function(_a){var self,_b,_c;_c=nil;self=this;_b=_a==null?nil:_a;try{if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_c=$h.$a(_b);return _c}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==6))return _d.a$a;throw(_d)}},$r: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;
282
+ var m = a$f[_a];
283
+ return (m !== undefined && self[m] !== undefined && !self[m].a$i)}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==5))return _c.a$a;throw(_c)}},$t: function(){var self,_a,_b,_f;_f=nil;self=this;_a=[];for(_b=1;_b<arguments.length;_b++)_a.push(arguments[_b]);;_a.$v(function(_c){var _d;var _e=nil;_d=_c==null?nil:_c;_e=self.$u(nil,_d.$i());return _e});_f=nil;return _f},$d: function(_c,_a,_b){var self,_d;self=this;_d=_c==null?nil:_c;try{if(arguments.length!=3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));;
284
+ var m = self[_a];
285
+ if (m)
286
+ return m.apply(self, [_d].concat(_b));
287
+ else
288
+ return self.$n.apply(self,
289
+ [_d].concat([a$h[_a]]).concat(_b));}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==7))return _e.a$a;throw(_e)}},$x: function(_a){var self,_b;_b=nil;self=this;try{if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;while(true){_a()};_b=nil;;return _b}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==10))return _c.a$a;throw(_c)}},$u: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;_a=_a.$o();alert(_a); return nil}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==9))return _c.a$a;throw(_c)}},$w: function(_d,_a){var self,_b,_c,_e;self=this;_e=_d==null?nil:_d;try{if(arguments.length<2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));_b=[];for(_c=2;_c<arguments.length;_c++)_b.push(arguments[_c]);;
290
+ var m = self[a$f[_a]];
291
+ if (m)
292
+ return m.apply(self, [_e].concat(_b));
293
+ else
294
+ return self.$n.apply(self, [_e].concat([_a]).concat(_b));}catch(_f){if(_f instanceof a$c && (!_f.a$b || _f.a$b==8))return _f.a$a;throw(_f)}}}});$k = a$d({a$j: [$i],a$e: nil,a$c: "Object",a$h: {$h: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;return a$i(self, _a)}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==11))return _c.a$a;throw(_c)}},$z: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;return a$i(self, _a)}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==12))return _c.a$a;throw(_c)}},$y: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$j();return _a},$A: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;return self.a$g},$g: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;return (self.constructor == _a.constructor && self == _a)}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==13))return _c.a$a;throw(_c)}},$C: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;return self.toString()},$B: function(_a){var self,_b;_b=nil;self=this;try{if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a(self);_b=self;return _b}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==14))return _c.a$a;throw(_c)}},$o: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;return self.toString()},$c: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=nil;return _a},$D: function(_c,_a){var self,_b;_b=nil;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;_b=$j.$a(nil,self,_a);return _b}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==15))return _d.a$a;throw(_d)}},$f: function(_d,_a){var self,_b,_c;_c=nil;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;_c=(_b=self.$g(nil,_a), (_b!==false&&_b!==nil) ? _b : (self.$h(nil,_a)));return _c}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==16))return _e.a$a;throw(_e)}},$m: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;return (self.a$g === _a)}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==17))return _c.a$a;throw(_c)}},$i: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;return self.toString()}}});$l = a$d({a$j: [],a$e: nil,a$c: "Enumerable",a$h: {$E: function(_a){var self,_b,_c,_f,_h;_h=nil;self=this;_b=_a==null?nil:_a;try{if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_c=[];self.$v(function(_d){var _e;var _g=nil;_e=_d==null?nil:_d;_g=_c.$F(nil,((_f=_b,_f!==false&&_f!==nil)?_b.$G(nil,_e):_e));return _g});_h=_c;return _h}catch(_i){if(_i instanceof a$c && (!_i.a$b || _i.a$b==18))return _i.a$a;throw(_i)}},$H: function(_f){var self,_a,_e,_g;_g=nil;self=this;try{if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=[];self.$v(function(_b){var _c;var _d=nil;_c=_b==null?nil:_b;if((_e=_f(_c),_e!==false&&_e!==nil)){_d=_a.$F(nil,_c)}else{_d=nil};return _d});_g=_a;return _g}catch(_h){if(_h instanceof a$c && (!_h.a$b || _h.a$b==19))return _h.a$a;throw(_h)}},$I: function(_a){var self,_b,_c,_f,_h;_h=nil;self=this;_b=_a==null?nil:_a;try{if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_c=[];self.$v(function(_d){var _e;var _g=nil;_e=_d==null?nil:_d;_g=_c.$F(nil,((_f=_b,_f!==false&&_f!==nil)?_b.$G(nil,_e):_e));return _g});_h=_c;return _h}catch(_i){if(_i instanceof a$c && (!_i.a$b || _i.a$b==20))return _i.a$a;throw(_i)}},$J: function(){var self,_a,_e;_e=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=[];self.$v(function(_b){var _c;var _d=nil;_c=_b==null?nil:_b;_d=_a.$F(nil,_c);return _d});_e=_a;return _e},$K: function(_f){var self,_a,_e,_g;_g=nil;self=this;try{if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=[];self.$v(function(_b){var _c;var _d=nil;_c=_b==null?nil:_b;if((_e=_f(_c),_e===false||_e===nil)){_d=_a.$F(nil,_c)}else{_d=nil};return _d});_g=_a;return _g}catch(_h){if(_h instanceof a$c && (!_h.a$b || _h.a$b==21))return _h.a$a;throw(_h)}},$L: function(_f){var self,_a,_e,_g;_g=nil;self=this;try{if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=[];self.$v(function(_b){var _c;var _d=nil;_c=_b==null?nil:_b;if((_e=_f(_c),_e!==false&&_e!==nil)){_d=_a.$F(nil,_c)}else{_d=nil};return _d});_g=_a;return _g}catch(_h){if(_h instanceof a$c && (!_h.a$b || _h.a$b==22))return _h.a$a;throw(_h)}}}});$m = a$d({a$j: [],a$e: $k,a$c: "Number",a$d: Number,a$h: {$O: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;return self + _a}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==26))return _c.a$a;throw(_c)}},$S: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;return self == _a}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==25))return _c.a$a;throw(_c)}},$P: function(_d,_a){var self,_b,_c;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;_b=self;while((_c=_b.$Q(nil,_a),_c!==false&&_c!==nil)){_d(_b);_b=_b.$R(nil,1)};return self}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==24))return _e.a$a;throw(_e)}},$M: function(_d,_a){var self,_b,_c;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;_b=self;while((_c=_b.$N(nil,_a),_c!==false&&_c!==nil)){_d(_b);_b=_b.$O(nil,1)};return self}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==23))return _e.a$a;throw(_e)}},$N: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;return self <= _a}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==28))return _c.a$a;throw(_c)}},$y: function(_b,_a){var self;self=this;try{if(arguments.length>2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));if(_a==null)_a=10;;return self.toString(_a)}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==27))return _c.a$a;throw(_c)}},$R: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;return self - _a}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==29))return _c.a$a;throw(_c)}},$T: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;return self+1},$U: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;return self / _a}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==31))return _c.a$a;throw(_c)}},$o: function(_b,_a){var self;self=this;try{if(arguments.length>2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));if(_a==null)_a=10;;return self.toString(_a)}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==30))return _c.a$a;throw(_c)}},$V: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;return self % _a}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==32))return _c.a$a;throw(_c)}},$Z: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;return self & _a}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==36))return _c.a$a;throw(_c)}},$Y: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;return self < _a}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==35))return _c.a$a;throw(_c)}},$X: function(_c){var self,_a,_b;self=this;try{if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=0;while((_b=_a.$Y(nil,self),_b!==false&&_b!==nil)){_c(_a);_a=_a.$O(nil,1)};return self}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==34))return _d.a$a;throw(_d)}},$W: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;return self | _a}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==33))return _c.a$a;throw(_c)}},$3: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;return -self},$2: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;return self > _a}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==38))return _c.a$a;throw(_c)}},$1: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;return self ^ _a}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==37))return _c.a$a;throw(_c)}},$0: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;return ~self},$Q: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;return self >= _a}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==39))return _c.a$a;throw(_c)}},$i: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;return self.toString()},$5: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;return self * _a}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==40))return _c.a$a;throw(_c)}},$4: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;return self}}});$n = a$d({a$j: [],a$e: $k,a$c: "Regexp",a$d: RegExp});$q = a$d({a$j: [],a$e: $k,a$f: {$6: function(_c,_a){var self,_b;_b=nil;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));; if (/^[\],:{}\s]*$/.test(_a.replace(/\\./g, '@').
295
+ replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(:?[eE][+\-]?\d+)?/g, ']').
296
+ replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
297
+ return eval('(' + _a + ')');
298
+ }
299
+ ;_b=self.$j(nil,$o,_a);return _b}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==41))return _d.a$a;throw(_d)}},$7: function(_c,_a){var self,_b;_b=nil;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;_b=_a.$y();return _b}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==42))return _d.a$a;throw(_d)}},$8: function(_c,_a){var self,_b;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;_b=self.$6(nil,_a);
300
+ var conv = function(obj) {
301
+ if (obj==null) return nil;
302
+ else if (obj instanceof Array) {
303
+ for (var i=0; i<obj.length; i++) obj[i] = conv(obj[i]);
304
+ }
305
+ else if (typeof(obj) == 'object') {
306
+ var nobj = $p.$a();
307
+ for (var i in obj) {
308
+ nobj.$9(nil, conv(i), conv(obj[i]));
309
+ }
310
+ return nobj;
311
+ }
312
+ return obj;
313
+ };
314
+ return conv(_b);
315
+ }catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==43))return _d.a$a;throw(_d)}}},a$c: "JSON"});$f = a$d({a$j: [],a$e: $k,a$c: "Exception",a$h: {$_: function(){var self,_a;_a=nil;self=this;if(self.$$==null)self.$$=nil;_a=self.$$;return _a},$o: function(){var self,_a;_a=nil;self=this;if(self.$$==null)self.$$=nil;_a=self.$$;return _a},$c: function(_d,_a){var self,_c,_b;_b=nil;self=this;try{if(arguments.length>2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));if(_a==null)_a=nil;;if((_c=_a.$q(),_c!==false&&_c!==nil)){_b=self.$$=self.$A().$e()}else{_b=self.$$=_a};return _b}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==44))return _e.a$a;throw(_e)}},$i: function(){var self,_a;_a=nil;self=this;if(self.$$==null)self.$$=nil;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=("#<" + (self.$A().$e()).$o() + (": ").$o() + (self.$$).$o() + (">").$o());return _a}}});$r = a$d({a$j: [],a$e: $f,a$c: "StandardError"});$c = a$d({a$j: [],a$e: $r,a$c: "RuntimeError"});$s = a$d({a$j: [],a$e: $m,a$c: "Fixnum",a$d: Number});$h = a$d({a$j: [],a$e: $k,a$f: {$a: function(_a){var self,_b,_c;self=this;_b=_a==null?nil:_a;try{if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;if((_c=_b,_c===false||_c===nil)){self.$j(nil,$a,"tried to create Proc object without a block")};return (function() {
316
+ try {
317
+ return _b.$G.apply(_b, arguments);
318
+ } catch(e)
319
+ {
320
+ if (e instanceof a$c)
321
+ {
322
+ if (e.a$b == null)
323
+ {;self.$j(nil,$t,"break from proc-closure");}
324
+ return e.a$a;
325
+ }
326
+ else throw(e);
327
+ }
328
+ })}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==45))return _d.a$a;throw(_d)}}},a$c: "Proc",a$d: Function,a$h: {$G: function(){var self,_a,_b;self=this;_a=[];for(_b=1;_b<arguments.length;_b++)_a.push(arguments[_b]);;
329
+ // TODO: use switch/case
330
+ if (_a.length == 0) return self();
331
+ else if (_a.length == 1) return self(_a[0]);
332
+ else return self(_a);}}});$t = a$d({a$j: [],a$e: $r,a$c: "LocalJumpError"});$u = a$d({a$j: [],a$e: $m,a$c: "Float",a$d: Number});$v = a$d({a$j: [],a$e: $k,a$c: "NilClass",a$d: NilClass,a$h: {$y: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a="null";return _a},$aa: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=0.0;return _a},$q: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=true;return _a},$o: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a="";return _a},$ab: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=0;return _a},$J: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=[];return _a},$ac: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=[];return _a},$i: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a="nil";return _a}}});$j = a$d({a$j: [],a$e: $k,a$c: "Method",a$h: {$c: function(_f,_a,_b){var self,_c,_d,_e;_e=nil;self=this;try{if(arguments.length!=3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));;(_c=[_a,_b],self.$ad=_c[0]==null?nil:_c[0],self.$ae=_c[1]==null?nil:_c[1],_c);_d=nil;_d = _a[a$f[_b]];
333
+ if (_d==null) _d = nil;;if((_c=_d,_c!==false&&_c!==nil)){_e=self.$af=_d}else{_e=self.$j(nil,$w,("undefined method `" + (_b).$o() + ("' for class `").$o() + (_a.$A().$e()).$o() + ("'").$o()))};return _e}catch(_g){if(_g instanceof a$c && (!_g.a$b || _g.a$b==46))return _g.a$a;throw(_g)}},$G: function(_c){var self,_a,_b,_d;self=this;_d=_c==null?nil:_c;try{_a=[];for(_b=1;_b<arguments.length;_b++)_a.push(arguments[_b]);;return self.$af.apply(self.$ad, [_d].concat(_a))}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==47))return _e.a$a;throw(_e)}},$i: function(){var self,_a;_a=nil;self=this;if(self.$ad==null)self.$ad=nil;if(self.$ae==null)self.$ae=nil;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=("#<Method: " + (self.$ad.$A().$e()).$o() + ("#").$o() + (self.$ae).$o() + (">").$o());return _a}}});$x = a$d({a$j: [],a$e: $k,a$f: {$ah: function(_c,_a,_b){var self;self=this;try{if(arguments.length<2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));if(arguments.length>3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));if(_b==null)_b="";;
334
+ _a.innerHTML = _b;
335
+ return nil}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==50))return _d.a$a;throw(_d)}},$ai: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;return document.getElementById(_a) || nil}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==51))return _c.a$a;throw(_c)}},$ag: function(_d,_a,_b,_c){var self;self=this;try{if(arguments.length!=4)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 3)'));;_a[_b] = _c; return nil}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==49))return _e.a$a;throw(_e)}},$aj: function(_c,_a,_b){var self;self=this;try{if(arguments.length!=3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));;
336
+ var ret = _a.style[_b];
337
+ return (ret == null) ? nil : ret}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==52))return _d.a$a;throw(_d)}},$o: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;return _a.outerHTML}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==48))return _c.a$a;throw(_c)}},$ak: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;
338
+ var sib = _a.nextSibling;
339
+ while (sib && sib.nodeType != 1)
340
+ sib = sib.nextSibling;
341
+ return sib || nil}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==53))return _c.a$a;throw(_c)}},$al: function(_d,_a){var self,_b,_c;self=this;if(self.$am==null)self.$am=nil;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;if((_b=(_c=self.$am, (_c!==false&&_c!==nil) ? (self.$an(nil,_a,self.$am)) : _c),_b!==false&&_b!==nil)){self.$am=nil};if (_a == window.a$k) window.a$k = null;;return nil}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==54))return _e.a$a;throw(_e)}},$ao: function(_d,_a,_b){var self,_c;self=this;try{if(arguments.length<2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));if(arguments.length>3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));if(_b==null)_b=true;;if((_c=_b,_c!==false&&_c!==nil)){_a.style.display = ''}else{_a.style.display = 'none'};return nil}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==55))return _e.a$a;throw(_e)}},$an: function(_c,_a,_b){var self;self=this;try{if(arguments.length!=3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));;return (_a == _b)}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==56))return _d.a$a;throw(_d)}},$ap: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$aq(nil,"colgroup");return _a},$ar: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$as(nil,"text");return _a},$at: function(_c,_a,_b){var self;self=this;try{if(arguments.length!=3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));;
342
+ var i = parseInt(_a.style[_b]);
343
+ return ((!i) ? 0 : i)}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==57))return _d.a$a;throw(_d)}},$au: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;
344
+ var e = document.createElement("INPUT");
345
+ e.type = 'radio';
346
+ e.name = _a;
347
+ return e}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==58))return _c.a$a;throw(_c)}},$av: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;
348
+ // To mimic IEs +innerText+ property in the W3C DOM, we need to recursively
349
+ // concatenate all child text nodes (depth first).
350
+ var text = '', child = _a.firstChild;
351
+ while (child) {
352
+ // 1 == Element node
353
+ if (child.nodeType == 1) {
354
+ text += this.$av(nil, child);
355
+ } else if (child.nodeValue) {
356
+ text += child.nodeValue;
357
+ }
358
+ child = child.nextSibling;
359
+ }
360
+ return text}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==59))return _c.a$a;throw(_c)}},$aw: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;self.$am=_a;window.a$k = _a;;return nil}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==60))return _c.a$a;throw(_c)}},$ax: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;
361
+ var ret = _a.src;
362
+ return (ret == null) ? nil : ret}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==61))return _c.a$a;throw(_c)}},$ay: function(_e,_a,_b,_c){var self,_d;_d=nil;self=this;try{if(arguments.length!=4)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 3)'));;self.$az(nil,_a,"position","absolute");self.$az(nil,_a,"left",_b.$O(nil,"px"));_d=self.$az(nil,_a,"top",_c.$O(nil,"px"));return _d}catch(_f){if(_f instanceof a$c && (!_f.a$b || _f.a$b==62))return _f.a$a;throw(_f)}},$aA: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$aq(nil,"tr");return _a},$aB: function(_c,_a,_b){var self;self=this;try{if(arguments.length!=3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));;
363
+ var ret = _a[_b];
364
+ return (ret == null) ? nil : String(ret)}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==63))return _d.a$a;throw(_d)}},$aE: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$aq(nil,"caption");return _a},$aF: function(_c,_a,_b){var self;self=this;try{if(arguments.length!=3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));;
365
+ var i = parseInt(_a[_b]);
366
+ return ((!i) ? 0 : i)}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==65))return _d.a$a;throw(_d)}},$aD: function(_c,_a,_b){var self;self=this;try{if(arguments.length!=3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));;
367
+ _a.a$l = _b;
368
+
369
+ _a.onclick = (_b & 0x00001) ? window.a$m : null;
370
+ _a.ondblclick = (_b & 0x00002) ? window.a$m : null;
371
+ _a.onmousedown = (_b & 0x00004) ? window.a$m : null;
372
+ _a.onmouseup = (_b & 0x00008) ? window.a$m : null;
373
+ _a.onmouseover = (_b & 0x00010) ? window.a$m : null;
374
+ _a.onmouseout = (_b & 0x00020) ? window.a$m : null;
375
+ _a.onmousemove = (_b & 0x00040) ? window.a$m : null;
376
+ _a.onkeydown = (_b & 0x00080) ? window.a$m : null;
377
+ _a.onkeypress = (_b & 0x00100) ? window.a$m : null;
378
+ _a.onkeyup = (_b & 0x00200) ? window.a$m : null;
379
+ _a.onchange = (_b & 0x00400) ? window.a$m : null;
380
+ _a.onfocus = (_b & 0x00800) ? window.a$m : null;
381
+ _a.onblur = (_b & 0x01000) ? window.a$m : null;
382
+ _a.onlosecapture = (_b & 0x02000) ? window.a$m : null;
383
+ _a.onscroll = (_b & 0x04000) ? window.a$m : null;
384
+ _a.onload = (_b & 0x08000) ? window.a$m : null;
385
+ _a.onerror = (_b & 0x10000) ? window.a$m : null;
386
+ _a.onmousewheel = (_b & 0x20000) ? window.a$m : null;
387
+
388
+ return nil}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==64))return _d.a$a;throw(_d)}},$aG: function(_d,_a,_b,_c){var self;self=this;try{if(arguments.length!=4)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 3)'));;_a.setAttribute(_b, _c); return nil}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==66))return _e.a$a;throw(_e)}},$aC: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;return document.body.clientWidth},$aH: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;return _a.a$l || 0}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==67))return _c.a$a;throw(_c)}},$aJ: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$aq(nil,"tbody");return _a},$aI: function(_c,_a,_b){var self;self=this;try{if(arguments.length!=3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));;_a.src = _b; return nil}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==68))return _d.a$a;throw(_d)}},$as: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;
389
+ var e = document.createElement("INPUT");
390
+ e.type = _a;
391
+ return e}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==69))return _c.a$a;throw(_c)}},$aK: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;
392
+ var left = _a.offsetLeft, top = _a.offsetTop;
393
+ var width = _a.offsetWidth, height = _a.offsetHeight;
394
+
395
+ if (_a.parentNode != _a.offsetParent) {
396
+ left -= _a.parentNode.offsetLeft;
397
+ top -= _a.parentNode.offsetTop;
398
+ }
399
+
400
+ var cur = _a.parentNode;
401
+ while (cur && (cur.nodeType == 1)) {
402
+ // body tags are implicitly scrollable
403
+ if ((cur.style.overflow == 'auto') || (cur.style.overflow == 'scroll') ||
404
+ (cur.tagName == 'BODY')) {
405
+
406
+ if (left < cur.scrollLeft) {
407
+ cur.scrollLeft = left;
408
+ }
409
+ if (left + width > cur.scrollLeft + cur.clientWidth) {
410
+ cur.scrollLeft = (left + width) - cur.clientWidth;
411
+ }
412
+ if (top < cur.scrollTop) {
413
+ cur.scrollTop = top;
414
+ }
415
+ if (top + height > cur.scrollTop + cur.clientHeight) {
416
+ cur.scrollTop = (top + height) - cur.clientHeight;
417
+ }
418
+ }
419
+
420
+ var offsetLeft = cur.offsetLeft, offsetTop = cur.offsetTop;
421
+ if (cur.parentNode != cur.offsetParent) {
422
+ offsetLeft -= cur.parentNode.offsetLeft;
423
+ offsetTop -= cur.parentNode.offsetTop;
424
+ }
425
+
426
+ left += offsetLeft - cur.scrollLeft;
427
+ top += offsetTop - cur.scrollTop;
428
+ cur = cur.parentNode;
429
+ }
430
+ return nil}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==70))return _c.a$a;throw(_c)}},$aL: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$aq(nil,"legend");return _a},$aM: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$aq(nil,"fieldset");return _a},$aq: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;return document.createElement(_a)}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==71))return _c.a$a;throw(_c)}},$aO: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$aq(nil,"div");return _a},$aP: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;
431
+ var child = _a.firstChild;
432
+ while (child && child.nodeType != 1)
433
+ child = child.nextSibling;
434
+ return child || nil}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==72))return _c.a$a;throw(_c)}},$aN: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;return document.body.clientHeight},$aQ: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;
435
+ var left = 0;
436
+ var curr = _a;
437
+ // This intentionally excludes body which has a null offsetParent.
438
+ while (curr.offsetParent) {
439
+ left -= curr.scrollLeft;
440
+ curr = curr.parentNode;
441
+ }
442
+ while (_a) {
443
+ left += _a.offsetLeft;
444
+ _a = _a.offsetParent;
445
+ }
446
+ return left}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==73))return _c.a$a;throw(_c)}},$aR: function(_d,_a,_b,_c){var self;self=this;try{if(arguments.length!=4)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 3)'));;_a.insertBefore(_b, _c); return nil}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==74))return _e.a$a;throw(_e)}},$aS: function(_d,_a,_b,_c){var self;self=this;try{if(arguments.length!=4)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 3)'));;var option = _a.options[_c];
447
+ option.text = _b;
448
+ return nil}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==75))return _e.a$a;throw(_e)}},$aT: function(_c,_a,_b){var self;self=this;try{if(arguments.length!=3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));;_a.removeChild(_b); return nil}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==76))return _d.a$a;throw(_d)}},$aU: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;
449
+ var ret = _a.innerHTML;
450
+ return (ret == null) ? nil : ret}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==77))return _c.a$a;throw(_c)}},$aV: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$aq(nil,"td");return _a},$aW: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$as(nil,"password");return _a},$aX: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$aq(nil,"textarea");return _a},$aY: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$aq(nil,"tfoot");return _a},$aZ: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$as(nil,"checkbox");return _a},$a1: function(_c,_a,_b){var self;self=this;try{if(arguments.length!=3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));;
451
+ var ret = _a.getAttribute(_b);
452
+ return (ret == null) ? nil : ret}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==79))return _d.a$a;throw(_d)}},$a2: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$aq(nil,"form");return _a},$a3: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$aq(nil,"button");return _a},$a4: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$aq(nil,"label");return _a},$a0: function(_c,_a,_b){var self;self=this;try{if(arguments.length!=3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));;_a.a$n = (_b === nil) ? null : _b; return nil}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==78))return _d.a$a;throw(_d)}},$a5: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;return (_a.style.display != 'none')}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==80))return _c.a$a;throw(_c)}},$a6: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$aq(nil,"th");return _a},$a7: function(_c,_a,_b){var self;self=this;try{if(arguments.length!=3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));;
453
+ var count = 0, child = _a.firstChild;
454
+ while (child) {
455
+ if (child == _b)
456
+ return count;
457
+ if (child.nodeType == 1)
458
+ ++count;
459
+ child = child.nextSibling;
460
+ }
461
+
462
+ return nil}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==81))return _d.a$a;throw(_d)}},$a8: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$aq(nil,"col");return _a},$a9: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$aq(nil,"iframe");return _a},$a_: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$aq(nil,"options");return _a},$a$: function(_c,_a,_b){var self;self=this;try{if(arguments.length!=3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));;
463
+ var p = _a.parentNode;
464
+ if (!p) return;
465
+ p.insertBefore(_b, _a);
466
+ p.removeChild(_a);
467
+ return nil}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==82))return _d.a$a;throw(_d)}},$bb: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$aq(nil,"A");return _a},$bc: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;_a.a$n = null; return nil}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==84))return _c.a$a;throw(_c)}},$ba: function(_c,_a,_b){var self;self=this;try{if(arguments.length!=3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));;
468
+ // Remove all children first.
469
+ while (_a.firstChild) {
470
+ _a.removeChild(_a.firstChild);
471
+ }
472
+ // Add a new text node.
473
+ if (_b !== nil) {
474
+ _a.appendChild(document.createTextNode(_b));
475
+ }
476
+ return nil}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==83))return _d.a$a;throw(_d)}},$bd: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$aq(nil,"img");return _a},$az: function(_d,_a,_b,_c){var self;self=this;try{if(arguments.length!=4)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 3)'));;_a.style[_b] = _c; return nil}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==85))return _e.a$a;throw(_e)}},$be: function(_c,_a,_b){var self;self=this;try{if(arguments.length!=3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));;
477
+ var count = 0, child = _a.firstChild;
478
+ while (child) {
479
+ var next = child.nextSibling;
480
+ if (child.nodeType == 1) {
481
+ if (_b == count)
482
+ return child;
483
+ ++count;
484
+ }
485
+ child = next;
486
+ }
487
+
488
+ return nil}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==86))return _d.a$a;throw(_d)}},$bf: function(){var self;self=this;if(self.$am==null)self.$am=nil;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;return self.$am},$bg: function(_c,_a,_b){var self;self=this;try{if(arguments.length!=3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));;
489
+ while (_b) {
490
+ if (_a == _b) {
491
+ return true;
492
+ }
493
+ _b = _b.parentNode;
494
+ if (_b && (_b.nodeType != 1)) {
495
+ _b = null;
496
+ }
497
+ }
498
+ return false}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==87))return _d.a$a;throw(_d)}},$bh: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$aq(nil,"table");return _a},$bi: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$aq(nil,"thead");return _a},$bk: function(_c,_a,_b){var self;self=this;try{if(arguments.length!=3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));;return !!_a[_b]}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==89))return _d.a$a;throw(_d)}},$bj: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;
499
+ var count = 0, child = _a.firstChild;
500
+ while (child) {
501
+ if (child.nodeType == 1)
502
+ ++count;
503
+ child = child.nextSibling;
504
+ }
505
+ return count}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==88))return _c.a$a;throw(_c)}},$bn: function(_c,_a,_b){var self;self=this;try{if(arguments.length!=3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));;return !!_a.style[_b]}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==91))return _d.a$a;throw(_d)}},$bm: function(_c,_a,_b){var self;self=this;try{if(arguments.length!=3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));;_a.removeAttribute(_b); return nil}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==90))return _d.a$a;throw(_d)}},$bl: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$aq(nil,"span");return _a},$bt: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;
506
+ var top = 0;
507
+ var curr = _a;
508
+ // This intentionally excludes body which has a null offsetParent.
509
+ while (curr.offsetParent) {
510
+ top -= curr.scrollTop;
511
+ curr = curr.parentNode;
512
+ }
513
+ while (_a) {
514
+ top += _a.offsetTop;
515
+ _a = _a.offsetParent;
516
+ }
517
+ return top}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==97))return _c.a$a;throw(_c)}},$bs: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;
518
+ var parent = _a.parentNode;
519
+ if(parent == null) {
520
+ return nil;
521
+ }
522
+ if (parent.nodeType != 1)
523
+ parent = null;
524
+ return parent || nil}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==96))return _c.a$a;throw(_c)}},$br: function(_c,_a){var self,_b;_b=nil;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;self.$az(nil,_a,"left","");self.$az(nil,_a,"top","");_b=self.$az(nil,_a,"position","static");return _b}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==95))return _d.a$a;throw(_d)}},$bq: function(_d,_a){var self,_b,_c;self=this;try{if(arguments.length>2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));if(_a==null)_a=false;;_b=self.$aq(nil,"select");if((_c=_a,_c!==false&&_c!==nil)){self.$ag(nil,_b,"multiple",true)};return _b}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==94))return _e.a$a;throw(_e)}},$bp: function(_c,_a,_b){var self;self=this;try{if(arguments.length!=3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));;_a.appendChild(_b); return nil}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==93))return _d.a$a;throw(_d)}},$bo: function(_d,_a,_b,_c){var self;self=this;try{if(arguments.length!=4)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 3)'));;
525
+ var count = 0, child = _a.firstChild, before = null;
526
+ while (child) {
527
+ if (child.nodeType == 1) {
528
+ if (count == _c) {
529
+ before = child;
530
+ break;
531
+ }
532
+ ++count;
533
+ }
534
+ child = child.nextSibling;
535
+ }
536
+
537
+ _a.insertBefore(_b, before);
538
+ return nil}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==92))return _e.a$a;throw(_e)}}},a$c: "DOM"});$w = a$d({a$j: [],a$e: $r,a$c: "NameError"});$y = a$d({a$j: [],a$e: $k,a$c: "MatchData",a$h: {$c: function(_c,_a){var self,_b;_b=nil;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;_b=self.$bu=_a;return _b}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==98))return _d.a$a;throw(_d)}}}});$z = a$d({a$j: [],a$e: $k,a$c: "Boolean",a$d: Boolean,a$h: {$S: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;return (self == _a)}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==99))return _c.a$a;throw(_c)}},$y: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;return (self == true ? 'true' : 'false')},$o: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;return (self == true ? 'true' : 'false')},$i: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;return (self == true ? 'true' : 'false')}}});$a = a$d({a$j: [],a$e: $r,a$c: "ArgumentError"});$B = a$d({a$j: [],a$e: $k,a$f: {$bv: function(){var self,_a,_e;_e=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=$x.$ai(nil,"out");_e=$A.$bw(function(_b){var _c;var _d=nil;_c=_b==null?nil:_b;_d=$x.$ba(nil,_a,$q.$8(nil,_c).$i());return _d},"/json");return _e}},a$c: "Client"});$o = a$d({a$j: [],a$e: $c,a$c: "JSON::SyntaxError"});a$d({a$j: [],a$g: $b});$e = a$d({a$j: [],a$e: $k,a$c: "String",a$d: String,a$h: {$O: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;return(self + _a)}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==101))return _c.a$a;throw(_c)}},$bx: function(_c,_a,_b){var self;self=this;try{if(arguments.length!=3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));;self.replace(pattern, replacement)}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==100))return _d.a$a;throw(_d)}},$bD: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;
539
+ var i = self.search(_a);
540
+ return (i == -1 ? nil : i)}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==103))return _c.a$a;throw(_c)}},$bA: function(_f,_a,_b){var self,_c,_d,_e;self=this;try{if(arguments.length<2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));if(arguments.length>3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));if(_b==null)_b=" ";;if((_c=_b.$l(),_c!==false&&_c!==nil)){self.$j(nil,$a,"zero width padding")};_d=_a.$R(nil,self.$bB());if((_c=_d.$N(nil,0),_c!==false&&_c!==nil)){return self};_e="";while(_e.length < _d) _e += _b;;return _e.$bC(nil,0,_d).$O(nil,self)}catch(_g){if(_g instanceof a$c && (!_g.a$b || _g.a$b==102))return _g.a$a;throw(_g)}},$bz: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;return self.length},$y: function(){var self,_a,_b;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a={
541
+ '\b': '\\b',
542
+ '\t': '\\t',
543
+ '\n': '\\n',
544
+ '\f': '\\f',
545
+ '\r': '\\r',
546
+ '\\': '\\\\'
547
+ };;_b=self.$by(function(_c){var _d,_e;_d=_c==null?nil:_c;_e=_a[_d];return _e ? _e :
548
+ '\\u00' + ("0" + _d.charCodeAt().toString(16)).substring(0,2);},/[\x00-\x1f\\]/);return ('"' + _b.replace(/"/g, '\\"') + '"');},$bC: function(_d,_a,_b){var self,_c;self=this;try{if(arguments.length<2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));if(arguments.length>3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));if(_b==null)_b=nil;;if((_c=_b.$q(),_c!==false&&_c!==nil)){return self.charAt(_a) || nil}else{if((_c=_b.$Y(nil,0),_c!==false&&_c!==nil)){return nil};return self.substring(_a, _a+_b)}}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==105))return _e.a$a;throw(_e)}},$bE: function(_f,_a,_b){var self,_c,_d,_e;self=this;try{if(arguments.length<2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));if(arguments.length>3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));if(_b==null)_b=" ";;if((_c=_b.$l(),_c!==false&&_c!==nil)){self.$j(nil,$a,"zero width padding")};_d=_a.$R(nil,self.$bB());if((_c=_d.$N(nil,0),_c!==false&&_c!==nil)){return self};_e="";while(_e.length < _d) _e += _b;;return self.$O(nil,_e.$bC(nil,0,_d))}catch(_g){if(_g instanceof a$c && (!_g.a$b || _g.a$b==104))return _g.a$a;throw(_g)}},$bF: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;return self.split(_a)}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==106))return _c.a$a;throw(_c)}},$o: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self;return _a},$bB: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;return self.length},$bG: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;return self.replace(/^\s+/, '').replace(/\s+$/, '')},$l: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;return(self === "")},$by: function(_g,_a,_b){var self,_c,_d,_e,_f;self=this;try{if(arguments.length<2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));if(arguments.length>3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));if(_b==null)_b=nil;;(_c=["",self,nil],_d=_c[0]==null?nil:_c[0],_e=_c[1]==null?nil:_c[1],_f=_c[2]==null?nil:_c[2],_c);while(_e.length > 0) {
549
+ if (_f = _e.match(_a)) {
550
+ _d += _e.slice(0, _f.index);;if((_c=_b,_c!==false&&_c!==nil)){_d=_d.$O(nil,_b)}else{_d=_d.$O(nil,_g(_f.$bI()).$o())};_e = _e.slice(_f.index + _f[0].length);
551
+ } else {
552
+ _d += _e; _e = '';
553
+ }
554
+ } return _d}catch(_h){if(_h instanceof a$c && (!_h.a$b || _h.a$b==108))return _h.a$a;throw(_h)}},$bH: function(_c,_a,_b){var self;self=this;try{if(arguments.length<2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));if(arguments.length>3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));if(_b==null)_b=0;;
555
+ var i = self.indexOf(_a, _b);
556
+ return (i == -1) ? nil : i}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==107))return _d.a$a;throw(_d)}},$i: function(){var self,_a,_b;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a={
557
+ '\b': '\\b',
558
+ '\t': '\\t',
559
+ '\n': '\\n',
560
+ '\f': '\\f',
561
+ '\r': '\\r',
562
+ '\\': '\\\\'
563
+ };;_b=self.$by(function(_c){var _d,_e;_d=_c==null?nil:_c;_e=_a[_d];return _e ? _e :
564
+ '\\u00' + ("0" + _d.charCodeAt().toString(16)).substring(0,2);},/[\x00-\x1f\\]/);return ('"' + _b.replace(/"/g, '\\"') + '"');}}});$C = a$d({a$j: [$l],a$e: $k,a$f: {$a: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;return []}},a$c: "Array",a$d: Array,a$h: {$O: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;return self.concat(_a)}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==111))return _c.a$a;throw(_c)}},$F: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;self.push(_a); return self}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==110))return _c.a$a;throw(_c)}},$bJ: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;
565
+ var del = false;
566
+ for (var i=0; i < self.length; i++)
567
+ {
568
+ if (_a.$g(nil, self[i]))
569
+ {
570
+ self.splice(i,1);
571
+ del = true;
572
+ // stay at the current index unless we are at the last element!
573
+ if (i < self.length-1) --i;
574
+ }
575
+ }
576
+ return del ? _a : nil}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==109))return _c.a$a;throw(_c)}},$bz: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;return self.length},$y: function(){var self,_d;_d=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_d=self.$I(function(_a){var _b;var _c=nil;_b=_a==null?nil:_a;_c=_b.$y();return _c}).$bK(nil,",");return _d},$bC: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;var v = self[_a]; return (v == null ? nil : v)}catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==113))return _c.a$a;throw(_c)}},$bM: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;self.length=0; return self},$g: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;
577
+ if (!(_a instanceof Array)) return false;
578
+ if (self.length != _a.length) return false;
579
+
580
+ //
581
+ // compare element-wise
582
+ //
583
+ for (var i = 0; i < self.length; i++)
584
+ {
585
+ if (! self[i].$g(nil, _a[i]))
586
+ {
587
+ //
588
+ // at least for one element #eql? holds not true
589
+ //
590
+ return false;
591
+ }
592
+ }
593
+
594
+ return true;
595
+ }catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==112))return _c.a$a;throw(_c)}},$bL: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;return self.concat().reverse()},$bN: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;var v = self[self.length - 1]; return (v == null ? nil : v)},$o: function(){var self,_d;_d=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_d=self.$I(function(_a){var _b;var _c=nil;_b=_a==null?nil:_a;_c=_b.$o();return _c}).$bK();return _d},$9: function(_c,_a,_b){var self;self=this;try{if(arguments.length!=3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));;return (self[_a] = _b)}catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==116))return _d.a$a;throw(_d)}},$v: function(_a){var self;self=this;try{if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;
596
+ var elem;
597
+ for (var i=0; i < self.length; i++) {
598
+ elem = self[i];;_a((elem == null ? nil : elem));}
599
+ return self}catch(_b){if(_b instanceof a$c && (!_b.a$b || _b.a$b==115))return _b.a$a;throw(_b)}},$bO: function(_a){var self;self=this;try{if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;
600
+ var elem;
601
+ for (var i=0; i < self.length; i++) {
602
+ elem = self[i];;_a([(elem == null ? nil : elem),i]);}
603
+ return self}catch(_b){if(_b instanceof a$c && (!_b.a$b || _b.a$b==114))return _b.a$a;throw(_b)}},$bI: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;var v = self[0]; return (v == null ? nil : v)},$bB: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;return self.length},$bP: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;
604
+ var elem = self.pop();
605
+ return (elem == null ? nil : elem)},$k: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;
606
+ var elem = self.shift();
607
+ return (elem == null ? nil : elem)},$l: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;return (self.length == 0)},$J: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self;return _a},$bR: function(){var self,_a,_b;self=this;_a=[];for(_b=1;_b<arguments.length;_b++)_a.push(arguments[_b]);;self.push.apply(self, _a); return self},$bQ: function(){var self,_a;_a=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self;return _a},$bU: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;return self.concat()},$i: function(){var self,_a,_e;_e=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a="[";_a=_a.$O(nil,self.$I(function(_b){var _c;var _d=nil;_c=_b==null?nil:_b;_d=_c.$i();return _d}).$bK(nil,", "));_a=_a.$O(nil,"]");_e=_a;return _e},$bT: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;self.reverse(); return self},$bS: function(){var self,_a,_b;self=this;_a=[];for(_b=1;_b<arguments.length;_b++)_a.push(arguments[_b]);;self.unshift.apply(self, _a); return self},$bK: function(_i,_a){var self,_b,_d,_h;_h=nil;self=this;try{if(arguments.length>2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));if(_a==null)_a="";;_b="";self.$bO(function(_c){var _e,_f;var _g=nil;(_d=a$j(_c),_e=_d[0]==null?nil:_d[0],_f=_d[1]==null?nil:_d[1],_d);_b=_b.$O(nil,_e.$o());if((_d=_f.$S(nil,self.$bB().$R(nil,1)),_d===false||_d===nil)){_g=_b=_b.$O(nil,_a)}else{_g=nil};return _g});_h=_b;return _h}catch(_j){if(_j instanceof a$c && (!_j.a$b || _j.a$b==117))return _j.a$a;throw(_j)}}}});$D = a$d({a$j: [],a$e: $k,a$c: "Range",a$h: {$S: function(_e,_a){var self,_b,_c,_d;_d=nil;self=this;if(self.$bV==null)self.$bV=nil;if(self.$bW==null)self.$bW=nil;if(self.$bX==null)self.$bX=nil;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;if (self.constructor != _a.constructor) return false;;_d=(_b=self.$bV.$S(nil,_a.$bI()), (_b!==false&&_b!==nil) ? ((_c=self.$bW.$S(nil,_a.$bN()), (_c!==false&&_c!==nil) ? (self.$bX.$S(nil,_a.$bY())) : _c)) : _b);return _d}catch(_f){if(_f instanceof a$c && (!_f.a$b || _f.a$b==118))return _f.a$a;throw(_f)}},$bZ: function(){var self,_a;_a=nil;self=this;if(self.$bV==null)self.$bV=nil;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$bV;return _a},$g: function(_e,_a){var self,_b,_c,_d;_d=nil;self=this;if(self.$bV==null)self.$bV=nil;if(self.$bW==null)self.$bW=nil;if(self.$bX==null)self.$bX=nil;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;if (self.constructor != _a.constructor) return false;;_d=(_b=self.$bV.$g(nil,_a.$bI()), (_b!==false&&_b!==nil) ? ((_c=self.$bW.$g(nil,_a.$bN()), (_c!==false&&_c!==nil) ? (self.$bX.$S(nil,_a.$bY())) : _c)) : _b);return _d}catch(_f){if(_f instanceof a$c && (!_f.a$b || _f.a$b==119))return _f.a$a;throw(_f)}},$bY: function(){var self,_a;_a=nil;self=this;if(self.$bX==null)self.$bX=nil;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$bX;return _a},$bN: function(){var self,_a;_a=nil;self=this;if(self.$bW==null)self.$bW=nil;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$bW;return _a},$o: function(){var self,_b,_a;_a=nil;self=this;if(self.$bV==null)self.$bV=nil;if(self.$bW==null)self.$bW=nil;if(self.$bX==null)self.$bX=nil;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;if((_b=self.$bX,_b!==false&&_b!==nil)){_a=("" + (self.$bV).$o() + ("...").$o() + (self.$bW).$o())}else{_a=("" + (self.$bV).$o() + ("..").$o() + (self.$bW).$o())};return _a},$v: function(_c){var self,_a,_b,_d;_d=nil;self=this;if(self.$bV==null)self.$bV=nil;if(self.$bW==null)self.$bW=nil;if(self.$bX==null)self.$bX=nil;try{if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$bV;if((_b=self.$bV.$2(nil,self.$bW),_b!==false&&_b!==nil)){return nil};if((_b=self.$bX,_b!==false&&_b!==nil)){while((_b=_a.$Y(nil,self.$bW),_b!==false&&_b!==nil)){_c(_a);_a=_a.$T()};_d=nil;}else{while((_b=_a.$N(nil,self.$bW),_b!==false&&_b!==nil)){_c(_a);_a=_a.$T()};_d=nil;};return _d}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==122))return _e.a$a;throw(_e)}},$b1: function(){var self,_a;_a=nil;self=this;if(self.$bW==null)self.$bW=nil;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$bW;return _a},$bI: function(){var self,_a;_a=nil;self=this;if(self.$bV==null)self.$bV=nil;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=self.$bV;return _a},$b0: function(_d,_a){var self,_b,_c;_c=nil;self=this;if(self.$bV==null)self.$bV=nil;if(self.$bW==null)self.$bW=nil;if(self.$bX==null)self.$bX=nil;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;if((_b=_a.$Y(nil,self.$bV),_b!==false&&_b!==nil)){return false};if((_b=self.$bX,_b!==false&&_b!==nil)){_c=_a.$Y(nil,self.$bW)}else{_c=_a.$N(nil,self.$bW)};return _c}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==121))return _e.a$a;throw(_e)}},$c: function(_f,_a,_b,_c){var self,_d,_e;_e=nil;self=this;try{if(arguments.length<3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));if(arguments.length>4)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 3)'));if(_c==null)_c=false;;(_d=[_a,_b],self.$bV=_d[0]==null?nil:_d[0],self.$bW=_d[1]==null?nil:_d[1],_d);_e=self.$bX=((_d=_c,_d!==false&&_d!==nil)?true:false);return _e}catch(_g){if(_g instanceof a$c && (!_g.a$b || _g.a$b==120))return _g.a$a;throw(_g)}},$f: function(_d,_a){var self,_b,_c;_c=nil;self=this;if(self.$bV==null)self.$bV=nil;if(self.$bW==null)self.$bW=nil;if(self.$bX==null)self.$bX=nil;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;if((_b=_a.$Y(nil,self.$bV),_b!==false&&_b!==nil)){return false};if((_b=self.$bX,_b!==false&&_b!==nil)){_c=_a.$Y(nil,self.$bW)}else{_c=_a.$N(nil,self.$bW)};return _c}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==123))return _e.a$a;throw(_e)}},$J: function(){var self,_a,_b,_c;self=this;if(self.$bV==null)self.$bV=nil;if(self.$bW==null)self.$bW=nil;if(self.$bX==null)self.$bX=nil;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=[];if((_b=self.$bV.$2(nil,self.$bW),_b!==false&&_b!==nil)){return _a};_c=self.$bV;if((_b=self.$bX,_b!==false&&_b!==nil)){while((_b=_c.$Y(nil,self.$bW),_b!==false&&_b!==nil)){_a.$F(nil,_c);_c=_c.$T()}}else{while((_b=_c.$N(nil,self.$bW),_b!==false&&_b!==nil)){_a.$F(nil,_c);_c=_c.$T()}};return _a},$i: function(){var self,_b,_a;_a=nil;self=this;if(self.$bV==null)self.$bV=nil;if(self.$bW==null)self.$bW=nil;if(self.$bX==null)self.$bX=nil;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;if((_b=self.$bX,_b!==false&&_b!==nil)){_a=("" + (self.$bV.$i()).$o() + ("...").$o() + (self.$bW.$i()).$o())}else{_a=("" + (self.$bV.$i()).$o() + ("..").$o() + (self.$bW.$i()).$o())};return _a},$b2: function(_d,_a){var self,_b,_c;_c=nil;self=this;if(self.$bV==null)self.$bV=nil;if(self.$bW==null)self.$bW=nil;if(self.$bX==null)self.$bX=nil;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;if((_b=_a.$Y(nil,self.$bV),_b!==false&&_b!==nil)){return false};if((_b=self.$bX,_b!==false&&_b!==nil)){_c=_a.$Y(nil,self.$bW)}else{_c=_a.$N(nil,self.$bW)};return _c}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==124))return _e.a$a;throw(_e)}}}});$g = a$d({a$j: [],a$e: $w,a$c: "NoMethodError"});$d = a$d({a$j: [],a$e: $r,a$c: "TypeError"});$E = a$d({a$j: [],a$e: $m,a$c: "Bignum",a$d: Number});$p = a$d({a$j: [$l],a$e: $k,a$f: {$b5: function(){var self,_a,_b,_c;self=this;_a=[];for(_b=1;_b<arguments.length;_b++)_a.push(arguments[_b]);;if((_b=_a.$bB().$V(nil,2).$S(nil,0),_b===false||_b===nil)){self.$j(nil,$a)};_c=self.$b();
608
+ //
609
+ // we use an associate array to store the items. But unlike
610
+ // Javascript, the entries are arrays which contain the collisions.
611
+ // NOTE that we have to prefix the hash code with a prefix so that
612
+ // there are no collisions with methods etc.
613
+ // I prefix it for now with ":".
614
+ //
615
+ var items = {};
616
+ var hashed_key, current_key, current_val;
617
+
618
+ for (var i = 0; i < _a.length; i += 2)
619
+ {
620
+ current_key = _a[i];
621
+ current_val = _a[i+1];
622
+ hashed_key = ":" + current_key.$C();
623
+
624
+ // make sure that a bucket exists
625
+ if (!items[hashed_key]) items[hashed_key] = [];
626
+
627
+ items[hashed_key].push(current_key, current_val);
628
+ }
629
+
630
+ _c.a$o = items;
631
+ _c.a$p = nil;
632
+ return _c;
633
+ },$b6: function(_d,_a){var self,_b,_c;_c=nil;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;_c=_b=self.$a();return _c}catch(_e){if(_e instanceof a$c && (!_e.a$b || _e.a$b==128))return _e.a$a;throw(_e)}}},a$c: "Hash",a$h: {$y: function(){var self,_a,_c,_g;_c=_g=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a="{";_a=_a.$O(nil,self.$I(function(_b){var _d,_e;var _f=nil;(_c=a$j(_b),_d=_c[0]==null?nil:_c[0],_e=_c[1]==null?nil:_c[1],_c);_f=_d.$y().$O(nil,":").$O(nil,_e.$y());return _f}).$bK(nil,","));_a=_a.$O(nil,"}");_g=_a;return _g},$bC: function(_b,_a){var self;self=this;try{if(arguments.length!=2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));;
634
+ if (!self.a$o)
635
+ {
636
+ // this is a Javascript Object, not a RubyJS Hash object.
637
+ // we directly look the key up. it's fast but not Ruby-like,
638
+ // so be careful!
639
+
640
+ var elem = self[_a];
641
+ return (elem == null ? nil : elem);
642
+ }
643
+
644
+ var hashed_key = ":" + _a.$C();
645
+ var bucket = self.a$o[hashed_key];
646
+
647
+ if (bucket)
648
+ {
649
+ //
650
+ // find the matching element inside the bucket
651
+ //
652
+
653
+ for (var i = 0; i < bucket.length; i += 2)
654
+ {
655
+ if (bucket[i].$g(nil,_a))
656
+ return bucket[i+1];
657
+ }
658
+ }
659
+
660
+ // no matching key found -> return default value
661
+ return self.a$p;
662
+ }catch(_c){if(_c instanceof a$c && (!_c.a$b || _c.a$b==125))return _c.a$a;throw(_c)}},$b3: function(){var self,_b,_f;_b=_f=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_f=self.$I(function(_a){var _c,_d;var _e=nil;(_b=a$j(_a),_c=_b[0]==null?nil:_b[0],_d=_b[1]==null?nil:_b[1],_b);_e=_c;return _e});return _f},$o: function(){var self,_a,_c,_g;_c=_g=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a=[];self.$v(function(_b){var _d,_e;var _f=nil;(_c=a$j(_b),_d=_c[0]==null?nil:_c[0],_e=_c[1]==null?nil:_c[1],_c);_a.$F(nil,_d);_f=_a.$F(nil,_e);return _f});_g=_a.$bK(nil,"");return _g},$9: function(_c,_a,_b){var self;self=this;try{if(arguments.length!=3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));;
663
+ if (!self.a$o)
664
+ {
665
+ // this is a Javascript Object, not a RubyJS Hash object.
666
+ // we directly look the key up. it's fast but not Ruby-like,
667
+ // so be careful!
668
+
669
+ self[_a] = _b;
670
+ return _b;
671
+ }
672
+
673
+ var hashed_key = ":" + _a.$C();
674
+ var bucket = self.a$o[hashed_key];
675
+
676
+ if (bucket)
677
+ {
678
+ //
679
+ // find the matching element inside the bucket
680
+ //
681
+
682
+ for (var i = 0; i < bucket.length; i += 2)
683
+ {
684
+ if (bucket[i].$g(nil,_a))
685
+ {
686
+ // overwrite value
687
+ bucket[i+1] = _b;
688
+ return _b;
689
+ }
690
+ }
691
+ // key not found in this bucket. append key, value pair to bucket
692
+ bucket.push(_a, _b);
693
+ }
694
+ else
695
+ {
696
+ //
697
+ // create new bucket
698
+ //
699
+ self.a$o[hashed_key] = [_a, _b];
700
+ }
701
+ return _b;
702
+ }catch(_d){if(_d instanceof a$c && (!_d.a$b || _d.a$b==127))return _d.a$a;throw(_d)}},$v: function(_a){var self;self=this;try{if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;
703
+ if (!self.a$o)
704
+ {
705
+ // this is a Javascript Object, not a RubyJS Hash object.
706
+ // we directly look the key up. it's fast but not Ruby-like,
707
+ // so be careful!
708
+ var key, value;
709
+ for (key in self)
710
+ {
711
+ value = self[key];;_a([(key == null ? nil : key),(value == null ? nil : value)]);
712
+ }
713
+
714
+ return nil;
715
+ }
716
+
717
+ var key, bucket, i;
718
+ for (key in self.a$o)
719
+ {
720
+ if (key.charAt(0) == ":")
721
+ {
722
+ bucket = self.a$o[key];
723
+ for (i=0; i<bucket.length; i+=2)
724
+ {;_a([bucket[i],bucket[i+1]]);
725
+ }
726
+ }
727
+ }
728
+ return nil;
729
+ }catch(_b){if(_b instanceof a$c && (!_b.a$b || _b.a$b==126))return _b.a$a;throw(_b)}},$c: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;
730
+ self.a$o = {};
731
+ self.a$p = nil;
732
+ return nil},$b4: function(){var self,_b,_f;_b=_f=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_f=self.$I(function(_a){var _c,_d;var _e=nil;(_b=a$j(_a),_c=_b[0]==null?nil:_b[0],_d=_b[1]==null?nil:_b[1],_b);_e=_d;return _e});return _f},$i: function(){var self,_a,_c,_g;_c=_g=nil;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;_a="{";_a=_a.$O(nil,self.$I(function(_b){var _d,_e;var _f=nil;(_c=a$j(_b),_d=_c[0]==null?nil:_c[0],_e=_c[1]==null?nil:_c[1],_c);_f=_d.$i().$O(nil,"=>").$O(nil,_e.$i());return _f}).$bK(nil,", "));_a=_a.$O(nil,"}");_g=_a;return _g}}});$A = a$d({a$j: [],a$e: $k,a$f: {$b7: function(){var self;self=this;if(arguments.length>1)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 0)'));;return new XMLHttpRequest()},$b8: function(_e,_a,_b,_c,_d){var self,_f,_g;_g=nil;self=this;_f=_e==null?nil:_e;try{if(arguments.length<3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));if(arguments.length>5)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 4)'));if(_c==null)_c=nil;if(_d==null)_d=nil;;_g=self.$b9(_f,_a,"POST",_b,_c,_d);return _g}catch(_h){if(_h instanceof a$c && (!_h.a$b || _h.a$b==129))return _h.a$a;throw(_h)}},$bw: function(_d,_a,_b,_c){var self,_e,_f;_f=nil;self=this;_e=_d==null?nil:_d;try{if(arguments.length<2)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 1)'));if(arguments.length>4)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 3)'));if(_b==null)_b=nil;if(_c==null)_c=nil;;_f=self.$b9(_e,_a,"GET","",_b,_c);return _f}catch(_g){if(_g instanceof a$c && (!_g.a$b || _g.a$b==130))return _g.a$a;throw(_g)}},$b9: function(_g,_a,_b,_c,_d,_e){var self,_f;self=this;try{if(arguments.length<3)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 2)'));if(arguments.length>6)throw($a.$a(nil,'wrong number of arguments ('+Math.max(0,arguments.length-1).toString()+' for 5)'));if(_c==null)_c="";if(_d==null)_d=nil;if(_e==null)_e=nil;;_f=self.$b7();
733
+ try {
734
+ _f.open(_b, _a, true);
735
+ _f.setRequestHeader("Content-Type", "text/plain; charset=utf-8");
736
+ _f.onreadystatechange = function() {
737
+ if (_f.readyState == 4) {
738
+ _f.onreadystatechange = a$k; ;_g((_f.responseText || ""));}
739
+ };
740
+ _f.send(_c);
741
+ return true;
742
+ } catch (e) {
743
+ _f.onreadystatechange = a$k;
744
+ return false;
745
+ } }catch(_h){if(_h instanceof a$c && (!_h.a$b || _h.a$b==131))return _h.a$a;throw(_h)}}},a$c: "HTTPRequest"}); $b.a$e = $k;
746
+ var a$l = [$i,$k,$l,$m,$n,$q,$f,$r,$c,$s,$h,$t,$u,$v,$j,$x,$w,$y,$z,$a,$B,$o,$b,$e,$C,$D,$g,$d,$E,$p,$A];
747
+ a$m(a$l);
748
+ for (var i=0; i<a$l.length; i++) a$n(a$l[i]);
749
+ function main() { return $B.$bv.apply($B, arguments); }