Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > b55d7c43b870130fe183a7ec3a49d711 > files > 351

js-of-ocaml-doc-1.0.9-1.fc16.noarch.rpm

// This program was compiled from OCaml by js_of_ocaml 1.0
function caml_raise_with_arg (tag, arg) { throw [0, tag, arg]; }
function caml_raise_with_string (tag, msg) {
  caml_raise_with_arg (tag, new MlWrappedString (msg));
}
function caml_invalid_argument (msg) {
  caml_raise_with_string(caml_global_data[4], msg);
}
function caml_array_bound_error () {
  caml_invalid_argument("index out of bounds");
}
function caml_str_repeat(n, s) {
  if (!n) { return ""; }
  if (n & 1) { return caml_str_repeat(n - 1, s) + s; }
  var r = caml_str_repeat(n >> 1, s);
  return r + r;
}
function MlString(param) {
  if (param != null) {
    this.bytes = this.fullBytes = param;
    this.last = this.len = param.length;
  }
}
MlString.prototype = {
  string:null,
  bytes:null,
  fullBytes:null,
  array:null,
  len:null,
  last:0,
  toJsString:function() {
    return this.string = decodeURIComponent (escape(this.getFullBytes()));
  },
  toBytes:function() {
    if (this.string != null)
      var b = unescape (encodeURIComponent (this.string));
    else {
      var b = "", a = this.array, l = a.length;
      for (var i = 0; i < l; i ++) b += String.fromCharCode (a[i]);
    }
    this.bytes = this.fullBytes = b;
    this.last = this.len = b.length;
    return b;
  },
  getBytes:function() {
    var b = this.bytes;
    if (b == null) b = this.toBytes();
    return b;
  },
  getFullBytes:function() {
    var b = this.fullBytes;
    if (b !== null) return b;
    b = this.bytes;
    if (b == null) b = this.toBytes ();
    if (this.last < this.len) {
      this.bytes = (b += caml_str_repeat(this.len - this.last, '\0'));
      this.last = this.len;
    }
    this.fullBytes = b;
    return b;
  },
  toArray:function() {
    var b = this.bytes;
    if (b == null) b = this.toBytes ();
    var a = [], l = this.last;
    for (var i = 0; i < l; i++) a[i] = b.charCodeAt(i);
    for (l = this.len; i < l; i++) a[i] = 0;
    this.string = this.bytes = this.fullBytes = null;
    this.last = this.len;
    this.array = a;
    return a;
  },
  getArray:function() {
    var a = this.array;
    if (!a) a = this.toArray();
    return a;
  },
  getLen:function() {
    var len = this.len;
    if (len !== null) return len;
    this.toBytes();
    return this.len;
  },
  toString:function() { var s = this.string; return s?s:this.toJsString(); },
  valueOf:function() { var s = this.string; return s?s:this.toJsString(); },
  blitToArray:function(i1, a2, i2, l) {
    var a1 = this.array;
    if (a1)
      for (var i = 0; i < l; i++) a2 [i2 + i] = a1 [i1 + i];
    else {
      var b = this.bytes;
      if (b == null) b = this.toBytes();
      var l1 = this.last - i1;
      if (l <= l1)
        for (var i = 0; i < l; i++) a2 [i2 + i] = b.charCodeAt(i1 + i);
      else {
        for (var i = 0; i < l1; i++) a2 [i2 + i] = b.charCodeAt(i1 + i);
        for (; i < l; i++) a2 [i2 + i] = 0;
      }
    }
  },
  get:function (i) {
    var a = this.array;
    if (a) return a[i];
    var b = this.bytes;
    if (b == null) b = this.toBytes();
    return (i<this.last)?b.charCodeAt(i):0;
  },
  safeGet:function (i) {
    if (!this.len) this.toBytes();
    if ((i < 0) || (i >= this.len)) caml_array_bound_error ();
    return this.get(i);
  },
  set:function (i, c) {
    var a = this.array;
    if (!a) {
      if (this.last == i) {
        this.bytes += String.fromCharCode (c & 0xff);
        this.last ++;
        return 0;
      }
      a = this.toArray();
    } else if (this.bytes != null) {
      this.bytes = this.fullBytes = this.string = null;
    }
    a[i] = c & 0xff;
    return 0;
  },
  safeSet:function (i, c) {
    if (this.len == null) this.toBytes ();
    if ((i < 0) || (i >= this.len)) caml_array_bound_error ();
    this.set(i, c);
  },
  fill:function (ofs, len, c) {
    if (ofs >= this.last && this.last && c == 0) return;
    var a = this.array;
    if (!a) a = this.toArray();
    else if (this.bytes != null) {
      this.bytes = this.fullBytes = this.string = null;
    }
    var l = ofs + len;
    for (var i = ofs; i < l; i++) a[i] = c;
  },
  compare:function (s2) {
    if (this.string != null && s2.string != null) {
      if (this.string < s2.string) return -1;
      if (this.string > s2.string) return 1;
      return 0;
    }
    var b1 = this.getFullBytes ();
    var b2 = s2.getFullBytes ();
    if (b1 < b2) return -1;
    if (b1 > b2) return 1;
    return 0;
  },
  equal:function (s2) {
    if (this.string != null && s2.string != null)
      return this.string == s2.string;
    return this.getFullBytes () == s2.getFullBytes ();
  },
  lessThan:function (s2) {
    if (this.string != null && s2.string != null)
      return this.string < s2.string;
    return this.getFullBytes () < s2.getFullBytes ();
  },
  lessEqual:function (s2) {
    if (this.string != null && s2.string != null)
      return this.string <= s2.string;
    return this.getFullBytes () <= s2.getFullBytes ();
  }
}
function MlWrappedString (s) { this.string = s; }
MlWrappedString.prototype = new MlString();
function MlMakeString (l) { this.bytes = ""; this.len = l; }
MlMakeString.prototype = new MlString ();
function caml_array_get (array, index) {
  if ((index < 0) || (index >= array.length - 1)) caml_array_bound_error();
  return array[index+1];
}
function caml_array_set (array, index, newval) {
  if ((index < 0) || (index >= array.length - 1)) caml_array_bound_error();
  array[index+1]=newval; return 0;
}
function caml_blit_string(s1, i1, s2, i2, len) {
  if (len === 0) return;
  if (i2 === s2.last && i1 === 0 && s1.last == len) {
    var s = s1.bytes;
    if (s !== null)
      s2.bytes += s1.bytes;
    else
      s2.bytes += s1.getBytes();
    s2.last += len;
    return;
  }
  var a = s2.array;
  if (!a) a = s2.toArray(); else { s2.bytes = s2.string = null; }
  s1.blitToArray (i1, a, i2, len);
}
function caml_call_gen(f, args) {
  if(f.fun)
    return caml_call_gen(f.fun, args);
  var n = f.length;
  var d = n - args.length;
  if (d == 0)
    return f.apply(null, args);
  else if (d < 0)
    return caml_call_gen(f.apply(null, args.slice(0,n)), args.slice(n));
  else
    return function (x){ return caml_call_gen(f, args.concat([x])); };
}
function caml_int64_compare(x,y) {
  var x3 = x[3] << 16;
  var y3 = y[3] << 16;
  if (x3 > y3) return 1;
  if (x3 < y3) return -1;
  if (x[2] > y[2]) return 1;
  if (x[2] < y[2]) return -1;
  if (x[1] > y[1]) return 1;
  if (x[1] < y[1]) return -1;
  return 0;
}
function caml_int_compare (a, b) {
  if (a < b) return (-1); if (a == b) return 0; return 1;
}
function caml_compare_val (a, b, total) {
  var stack = [];
  for(;;) {
    if (!(total && a === b)) {
      if (a instanceof MlString) {
        if (b instanceof MlString) {
            if (a != b) {
		var x = a.compare(b);
		if (x != 0) return x;
	    }
        } else
          return 1;
      } else if (a instanceof Array && a[0] == (a[0]|0)) {
        var ta = a[0];
        if (ta === 250) {
          a = a[1];
          continue;
        } else if (b instanceof Array && b[0] == (b[0]|0)) {
          var tb = b[0];
          if (tb === 250) {
            b = b[1];
            continue;
          } else if (ta != tb) {
            return (ta < tb)?-1:1;
          } else {
            switch (ta) {
            case 248: {
		var x = caml_int_compare(a[2], b[2]);
		if (x != 0) return x;
		break;
	    }
            case 255: {
		var x = caml_int64_compare(a, b);
		if (x != 0) return x;
		break;
	    }
            default:
              if (a.length != b.length) return (a.length < b.length)?-1:1;
              if (a.length > 1) stack.push(a, b, 1);
            }
          }
        } else
          return 1;
      } else if (b instanceof MlString ||
                 (b instanceof Array && b[0] == (b[0]|0))) {
        return -1;
      } else {
        if (a < b) return -1;
        if (a > b) return 1;
        if (total && a != b) {
          if (a == a) return 1;
          if (b == b) return -1;
        }
      }
    }
    if (stack.length == 0) return 0;
    var i = stack.pop();
    b = stack.pop();
    a = stack.pop();
    if (i + 1 < a.length) stack.push(a, b, i + 1);
    a = a[i];
    b = b[i];
  }
}
function caml_compare (a, b) { return caml_compare_val (a, b, true); }
function caml_create_string(len) {
  if (len < 0) caml_invalid_argument("String.create");
  return new MlMakeString(len);
}
function caml_raise_constant (tag) { throw [0, tag]; }
var caml_global_data = [0];
function caml_raise_zero_divide () {
  caml_raise_constant(caml_global_data[6]);
}
function caml_div(x,y) {
  if (y == 0) caml_raise_zero_divide ();
  return (x/y)|0;
}
function caml_equal (x, y) { return +(caml_compare_val(x,y,false) == 0); }
function caml_parse_format (fmt) {
  fmt = fmt.toString ();
  var len = fmt.length;
  if (len > 31) caml_invalid_argument("format_int: format too long");
  var f =
    { justify:'+', signstyle:'-', filler:' ', alternate:false,
      base:0, signedconv:false, width:0, uppercase:false,
      sign:1, prec:6, conv:'f' };
  for (var i = 0; i < len; i++) {
    var c = fmt.charAt(i);
    switch (c) {
    case '-':
      f.justify = '-'; break;
    case '+': case ' ':
      f.signstyle = c; break;
    case '0':
      f.filler = '0'; break;
    case '#':
      f.alternate = true; break;
    case '1': case '2': case '3': case '4': case '5':
    case '6': case '7': case '8': case '9':
      f.width = 0;
      while (c=fmt.charCodeAt(i) - 48, c >= 0 && c <= 9) {
        f.width = f.width * 10 + c; i++
      }
      i--;
     break;
    case '.':
      f.prec = 0;
      i++;
      while (c=fmt.charCodeAt(i) - 48, c >= 0 && c <= 9) {
        f.prec = f.prec * 10 + c; i++
      }
      i--;
    case 'd': case 'i':
      f.signedconv = true; /* fallthrough */
    case 'u':
      f.base = 10; break;
    case 'x':
      f.base = 16; break;
    case 'X':
      f.base = 16; f.uppercase = true; break;
    case 'o':
      f.base = 8; break;
    case 'e': case 'f': case 'g':
      f.signedconv = true; f.conv = c; break;
    case 'E': case 'F': case 'G':
      f.signedconv = true; f.uppercase = true;
      f.conv = c.toLowerCase (); break;
    }
  }
  return f;
}
function caml_finish_formatting(f, rawbuffer) {
  if (f.uppercase) rawbuffer = rawbuffer.toUpperCase();
  var len = rawbuffer.length;
  if (f.signedconv && (f.sign < 0 || f.signstyle != '-')) len++;
  if (f.alternate) {
    if (f.base == 8) len += 1;
    if (f.base == 16) len += 2;
  }
  var buffer = "";
  if (f.justify == '+' && f.filler == ' ')
    for (var i = len; i < f.width; i++) buffer += ' ';
  if (f.signedconv) {
    if (f.sign < 0) buffer += '-';
    else if (f.signstyle != '-') buffer += f.signstyle;
  }
  if (f.alternate && f.base == 8) buffer += '0';
  if (f.alternate && f.base == 16) buffer += "0x";
  if (f.justify == '+' && f.filler == '0')
    for (var i = len; i < f.width; i++) buffer += '0';
  buffer += rawbuffer;
  if (f.justify == '-')
    for (var i = len; i < f.width; i++) buffer += ' ';
  return new MlWrappedString (buffer);
}
function caml_format_int(fmt, i) {
  if (fmt.toString() == "%d") return new MlWrappedString(""+i);
  var f = caml_parse_format(fmt);
  if (i < 0) { if (f.signedconv) { f.sign = -1; i = -i; } else i >>>= 0; }
  var s = i.toString(f.base);
  return caml_finish_formatting(f, s);
}
function caml_greaterequal (x, y) { return +(caml_compare(x,y,false) >= 0); }
function caml_parse_sign_and_base (s) {
  var i = 0, base = 10, sign = s.get(0) == 45?(i++,-1):1;
  if (s.get(i) == 48)
    switch (s.get(i + 1)) {
    case 120: case 88: base = 16; i += 2; break;
    case 111: case 79: base =  8; i += 2; break;
    case  98: case 66: base =  2; i += 2; break;
    }
  return [i, sign, base];
}
function caml_parse_digit(c) {
  if (c >= 48 && c <= 57)  return c - 48;
  if (c >= 65 && c <= 90)  return c - 55;
  if (c >= 97 && c <= 122) return c - 87;
  return -1;
}
function caml_failwith (msg) {
  caml_raise_with_string(caml_global_data[3], msg);
}
function caml_int_of_string (s) {
  var r = caml_parse_sign_and_base (s);
  var i = r[0], sign = r[1], base = r[2];
  var threshold = -1 >>> 0;
  var c = s.get(i);
  var d = caml_parse_digit(c);
  if (d < 0 || d >= base) caml_failwith("int_of_string");
  var res = d;
  for (;;) {
    i++;
    c = s.get(i);
    if (c == 95) continue;
    d = caml_parse_digit(c);
    if (d < 0 || d >= base) break;
    res = base * res + d;
    if (res > threshold) caml_failwith("int_of_string");
  }
  if (i != s.getLen()) caml_failwith("int_of_string");
  res = sign * res;
  if ((res | 0) != res) caml_failwith("int_of_string");
  return res;
}
var caml_js_regexps = { amp:/&/g, lt:/</g, quot:/\"/g, all:/[&<\"]/ };
function caml_js_html_escape (s) {
  if (!caml_js_regexps.all.test(s)) return s;
  return s.replace(caml_js_regexps.amp, "&amp;")
          .replace(caml_js_regexps.lt, "&lt;")
          .replace(caml_js_regexps.quot, "&quot;");
}
function caml_js_on_ie () {
  var ua = window.navigator?window.navigator.userAgent:"";
  return ua.indexOf("MSIE") != -1 && ua.indexOf("Opera") != 0;
}
function caml_js_wrap_callback(f) {
  var toArray = Array.prototype.slice;
  return function () {
    var args = (arguments.length > 0)?toArray.call (arguments):[undefined];
    return caml_call_gen(f, args);
  }
}
function caml_lessequal (x, y) { return +(caml_compare(x,y,false) <= 0); }
function caml_make_vect (len, init) {
  var b = [0]; for (var i = 1; i <= len; i++) b[i] = init; return b;
}
function MlStringFromArray (a) {
  var len = a.length; this.array = a; this.len = this.last = len;
}
MlStringFromArray.prototype = new MlString ();
var caml_md5_string =
function () {
  function add (x, y) { return (x + y) | 0; }
  function xx(q,a,b,x,s,t) {
    a = add(add(a, q), add(x, t));
    return add((a << s) | (a >>> (32 - s)), b);
  }
  function ff(a,b,c,d,x,s,t) {
    return xx((b & c) | ((~b) & d), a, b, x, s, t);
  }
  function gg(a,b,c,d,x,s,t) {
    return xx((b & d) | (c & (~d)), a, b, x, s, t);
  }
  function hh(a,b,c,d,x,s,t) { return xx(b ^ c ^ d, a, b, x, s, t); }
  function ii(a,b,c,d,x,s,t) { return xx(c ^ (b | (~d)), a, b, x, s, t); }
  function md5(buffer, length) {
    var i = length;
    buffer[i >> 2] |= 0x80 << (8 * (i & 3));
    for (i = (i & ~0x3) + 4;(i & 0x3F) < 56 ;i += 4)
      buffer[i >> 2] = 0;
    buffer[i >> 2] = length << 3;
    i += 4;
    buffer[i >> 2] = (length >> 29) & 0x1FFFFFFF;
    var w = [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476];
    for(i = 0; i < buffer.length; i += 16) {
      var a = w[0], b = w[1], c = w[2], d = w[3];
      a = ff(a, b, c, d, buffer[i+ 0], 7, 0xD76AA478);
      d = ff(d, a, b, c, buffer[i+ 1], 12, 0xE8C7B756);
      c = ff(c, d, a, b, buffer[i+ 2], 17, 0x242070DB);
      b = ff(b, c, d, a, buffer[i+ 3], 22, 0xC1BDCEEE);
      a = ff(a, b, c, d, buffer[i+ 4], 7, 0xF57C0FAF);
      d = ff(d, a, b, c, buffer[i+ 5], 12, 0x4787C62A);
      c = ff(c, d, a, b, buffer[i+ 6], 17, 0xA8304613);
      b = ff(b, c, d, a, buffer[i+ 7], 22, 0xFD469501);
      a = ff(a, b, c, d, buffer[i+ 8], 7, 0x698098D8);
      d = ff(d, a, b, c, buffer[i+ 9], 12, 0x8B44F7AF);
      c = ff(c, d, a, b, buffer[i+10], 17, 0xFFFF5BB1);
      b = ff(b, c, d, a, buffer[i+11], 22, 0x895CD7BE);
      a = ff(a, b, c, d, buffer[i+12], 7, 0x6B901122);
      d = ff(d, a, b, c, buffer[i+13], 12, 0xFD987193);
      c = ff(c, d, a, b, buffer[i+14], 17, 0xA679438E);
      b = ff(b, c, d, a, buffer[i+15], 22, 0x49B40821);
      a = gg(a, b, c, d, buffer[i+ 1], 5, 0xF61E2562);
      d = gg(d, a, b, c, buffer[i+ 6], 9, 0xC040B340);
      c = gg(c, d, a, b, buffer[i+11], 14, 0x265E5A51);
      b = gg(b, c, d, a, buffer[i+ 0], 20, 0xE9B6C7AA);
      a = gg(a, b, c, d, buffer[i+ 5], 5, 0xD62F105D);
      d = gg(d, a, b, c, buffer[i+10], 9, 0x02441453);
      c = gg(c, d, a, b, buffer[i+15], 14, 0xD8A1E681);
      b = gg(b, c, d, a, buffer[i+ 4], 20, 0xE7D3FBC8);
      a = gg(a, b, c, d, buffer[i+ 9], 5, 0x21E1CDE6);
      d = gg(d, a, b, c, buffer[i+14], 9, 0xC33707D6);
      c = gg(c, d, a, b, buffer[i+ 3], 14, 0xF4D50D87);
      b = gg(b, c, d, a, buffer[i+ 8], 20, 0x455A14ED);
      a = gg(a, b, c, d, buffer[i+13], 5, 0xA9E3E905);
      d = gg(d, a, b, c, buffer[i+ 2], 9, 0xFCEFA3F8);
      c = gg(c, d, a, b, buffer[i+ 7], 14, 0x676F02D9);
      b = gg(b, c, d, a, buffer[i+12], 20, 0x8D2A4C8A);
      a = hh(a, b, c, d, buffer[i+ 5], 4, 0xFFFA3942);
      d = hh(d, a, b, c, buffer[i+ 8], 11, 0x8771F681);
      c = hh(c, d, a, b, buffer[i+11], 16, 0x6D9D6122);
      b = hh(b, c, d, a, buffer[i+14], 23, 0xFDE5380C);
      a = hh(a, b, c, d, buffer[i+ 1], 4, 0xA4BEEA44);
      d = hh(d, a, b, c, buffer[i+ 4], 11, 0x4BDECFA9);
      c = hh(c, d, a, b, buffer[i+ 7], 16, 0xF6BB4B60);
      b = hh(b, c, d, a, buffer[i+10], 23, 0xBEBFBC70);
      a = hh(a, b, c, d, buffer[i+13], 4, 0x289B7EC6);
      d = hh(d, a, b, c, buffer[i+ 0], 11, 0xEAA127FA);
      c = hh(c, d, a, b, buffer[i+ 3], 16, 0xD4EF3085);
      b = hh(b, c, d, a, buffer[i+ 6], 23, 0x04881D05);
      a = hh(a, b, c, d, buffer[i+ 9], 4, 0xD9D4D039);
      d = hh(d, a, b, c, buffer[i+12], 11, 0xE6DB99E5);
      c = hh(c, d, a, b, buffer[i+15], 16, 0x1FA27CF8);
      b = hh(b, c, d, a, buffer[i+ 2], 23, 0xC4AC5665);
      a = ii(a, b, c, d, buffer[i+ 0], 6, 0xF4292244);
      d = ii(d, a, b, c, buffer[i+ 7], 10, 0x432AFF97);
      c = ii(c, d, a, b, buffer[i+14], 15, 0xAB9423A7);
      b = ii(b, c, d, a, buffer[i+ 5], 21, 0xFC93A039);
      a = ii(a, b, c, d, buffer[i+12], 6, 0x655B59C3);
      d = ii(d, a, b, c, buffer[i+ 3], 10, 0x8F0CCC92);
      c = ii(c, d, a, b, buffer[i+10], 15, 0xFFEFF47D);
      b = ii(b, c, d, a, buffer[i+ 1], 21, 0x85845DD1);
      a = ii(a, b, c, d, buffer[i+ 8], 6, 0x6FA87E4F);
      d = ii(d, a, b, c, buffer[i+15], 10, 0xFE2CE6E0);
      c = ii(c, d, a, b, buffer[i+ 6], 15, 0xA3014314);
      b = ii(b, c, d, a, buffer[i+13], 21, 0x4E0811A1);
      a = ii(a, b, c, d, buffer[i+ 4], 6, 0xF7537E82);
      d = ii(d, a, b, c, buffer[i+11], 10, 0xBD3AF235);
      c = ii(c, d, a, b, buffer[i+ 2], 15, 0x2AD7D2BB);
      b = ii(b, c, d, a, buffer[i+ 9], 21, 0xEB86D391);
      w[0] = add(a, w[0]);
      w[1] = add(b, w[1]);
      w[2] = add(c, w[2]);
      w[3] = add(d, w[3]);
    }
    var t = [];
    for (var i = 0; i < 4; i++)
      for (var j = 0; j < 4; j++)
        t[i * 4 + j] = (w[i] >> (8 * j)) & 0xFF;
    return t;
  }
  return function (s, ofs, len) {
    var buf = [];
    if (s.array) {
      var a = s.array;
      for (var i = 0; i < len; i+=4) {
        var j = i + ofs;
        buf[i>>2] = a[j] | (a[j+1] << 8) | (a[j+2] << 16) | (a[j+3] << 24);
      }
      for (; i < len; i++) buf[i>>2] |= a[i + ofs] << (8 * (i & 3));
    } else {
      var b = s.getFullBytes();
      for (var i = 0; i < len; i+=4) {
        var j = i + ofs;
        buf[i>>2] =
          b.charCodeAt(j) | (b.charCodeAt(j+1) << 8) |
          (b.charCodeAt(j+2) << 16) | (b.charCodeAt(j+3) << 24);
      }
      for (; i < len; i++) buf[i>>2] |= b.charCodeAt(i + ofs) << (8 * (i & 3));
    }
    return new MlStringFromArray(md5(buf, len));
  }
} ();
function caml_ml_out_channels_list () { return 0; }
function caml_mod(x,y) {
  if (y == 0) caml_raise_zero_divide ();
  return x%y;
}
function caml_mul(x,y) {
  return ((((x >> 16) * y) << 16) + (x & 0xffff) * y)|0;
}
function caml_register_global (n, v) { caml_global_data[n + 1] = v; }
var caml_named_values = {};
function caml_register_named_value(nm,v) {
  caml_named_values[nm] = v; return 0;
}
function caml_sys_get_config () {
  return [0, new MlWrappedString("Unix"), 32];
}
var caml_initial_time = new Date() * 0.001;
function caml_sys_time () { return new Date() * 0.001 - caml_initial_time; }
(function(){function bV(ex,ey,ez){return ex.length==2?ex(ey,ez):caml_call_gen(ex,[ey,ez]);}function aB(ev,ew){return ev.length==1?ev(ew):caml_call_gen(ev,[ew]);}var a=[0,new MlString("Invalid_argument")],b=new MlString("input"),c=[0,10,10,15];caml_register_global(5,[0,new MlString("Division_by_zero")]);caml_register_global(3,a);caml_register_global(2,[0,new MlString("Failure")]);var T=[0,new MlString("Assert_failure")],S=new MlString("%d"),R=new MlString("Pervasives.do_at_exit"),Q=new MlString("Random.int"),P=new MlString("x"),O=[0,2061652523,1569539636,364182224,414272206,318284740,2064149575,383018966,1344115143,840823159,1098301843,536292337,1586008329,189156120,1803991420,1217518152,51606627,1213908385,366354223,2077152089,1774305586,2055632494,913149062,526082594,2095166879,784300257,1741495174,1703886275,2023391636,1122288716,1489256317,258888527,511570777,1163725694,283659902,308386020,1316430539,1556012584,1938930020,2101405994,1280938813,193777847,1693450012,671350186,149669678,1330785842,1161400028,558145612,1257192637,1101874969,1975074006,710253903,1584387944,1726119734,409934019,801085050],N=new MlString("img"),M=new MlString("br"),L=new MlString("div"),K=new MlString("\""),J=new MlString(" name=\""),I=new MlString("\""),H=new MlString(" type=\""),G=new MlString("<"),F=new MlString(">"),E=new MlString(""),D=new MlString("YOU LOSE"),C=new MlString("sprites/bomb.png"),B=new MlString("sprites/flag.png"),A=new MlString("Mode : "),z=new MlString("sprites/bomb.png"),y=new MlString("sprites/normal.png"),x=new MlString("0"),w=new MlString("YOU WIN"),v=new MlString("GAME OVER"),u=new MlString("sprites/flag.png"),t=new MlString("sprites/bomb.png"),s=new MlString("sprites/empty.png"),r=new MlString(".png"),q=new MlString("sprites/"),p=new MlString("sprites/normal.png"),o=[0,0,0],n=[0,new MlString("main.ml"),42,17],m=new MlString("main"),l=new MlString("Number of columns"),k=new MlString("Number of rows"),j=new MlString("Number of mines"),i=new MlString("nouvelle partie"),h=new MlString("submit"),g=new MlString("text");function f(e,d){return caml_greaterequal(e,d)?e:d;}function Z(U,W){var V=U.getLen(),X=W.getLen(),Y=caml_create_string(V+X|0);caml_blit_string(U,0,Y,0,V);caml_blit_string(W,0,Y,V,X);return Y;}function $(_){return caml_format_int(S,_);}function ab(aa,ac){if(aa){var ad=aa[1];return [0,ad,ab(aa[2],ac)];}return ac;}function ai(ah){var ae=caml_ml_out_channels_list(0);for(;;){if(ae){var af=ae[2];try {}catch(ag){}var ae=af;continue;}return 0;}}caml_register_named_value(R,ai);function ar(aj,ap,ao){var ak=caml_make_vect(aj,[0]),al=0,am=aj-1|0;if(!(am<al)){var an=al;for(;;){ak[an+1]=caml_make_vect(ap,ao);var aq=an+1|0;if(am!==an){var an=aq;continue;}break;}}return ak;}function ax(as){var at=as,au=0;for(;;){if(at){var av=at[2],aw=[0,at[1],au],at=av,au=aw;continue;}return au;}}function aD(aA,ay){var az=ay;for(;;){if(az){var aC=az[2];aB(aA,az[1]);var az=aC;continue;}return 0;}}function aO(aK){return aB(function(aE,aG){var aF=aE,aH=aG;for(;;){if(aH){var aI=aH[2],aJ=aH[1];if(aB(aK,aJ)){var aL=[0,aJ,aF],aF=aL,aH=aI;continue;}var aH=aI;continue;}return ax(aF);}},0);}var aN=caml_sys_get_config(0)[2],aM=[0,0];32===aN;var aP=[0,O.slice(),0],aQ=undefined,aR=false,aS=Array,aU=null;aM[1]=[0,function(aT){return aT instanceof aS?0:[0,new MlWrappedString(aT.toString())];},aM[1]];function aX(aV,aW){aV.appendChild(aW);return 0;}var a5=caml_js_on_ie(0)|0;function a4(a0){return caml_js_wrap_callback(function(aY){if(aY===aQ){var aZ=event,a1=aB(a0,aZ);aZ.returnValue=a1;var a2=a1;}else{var a3=aB(a0,aY);if(!(a3|0))aY.preventDefault();var a2=a3;}return a2;});}var a6=window;function a9(a7,a8){return a7?aB(a8,a7[1]):0;}function ba(a$,a_){return a$.createElement(a_.toString());}function bd(bc,bb){return ba(bc,bb);}function bp(be,bf,bg){if(0===be&&0===bf){var bh=ba(bg,b),bi=1;}else var bi=0;if(!bi)if(a5){var bj=new aS();bj.push(G.toString(),b.toString());a9(be,function(bk){bj.push(H.toString(),caml_js_html_escape(bk),I.toString());return 0;});a9(bf,function(bl){bj.push(J.toString(),caml_js_html_escape(bl),K.toString());return 0;});bj.push(F.toString());var bh=bg.createElement(bj.join(E.toString()));}else{var bm=ba(bg,b);a9(be,function(bn){return bm.type=bn;});a9(bf,function(bo){return bm.name=bo;});var bh=bm;}return bh;}function br(bq){return bd(bq,M);}function bt(bs){return bd(bs,N);}window.HTMLElement===aQ;function bv(bu){return bu.toString();}var bw=a6.document;function bH(by,bE){var bx=0,bz=by[1]-1|0;if(!(bz<bx)){var bA=bx;for(;;){var bB=0,bC=by[2]-1|0;if(!(bC<bB)){var bD=bB;for(;;){aB(bE,[0,bA,bD]);var bF=bD+1|0;if(bC!==bD){var bD=bF;continue;}break;}}var bG=bA+1|0;if(bz!==bA){var bA=bG;continue;}break;}}return 0;}function bU(bM,bI){var bJ=bI[2],bK=bI[1],bL=0<=bK?1:0;if(bL){var bN=bK<bM[1]?1:0;if(bN){var bO=0<=bJ?1:0,bP=bO?bJ<bM[2]?1:0:bO;}else var bP=bN;}else var bP=bL;return bP;}function bW(bT,bQ){var bR=bQ[2],bS=bQ[1];return bV(aO,aB(bU,bT),[0,[0,bS-1|0,bR-1|0],[0,[0,bS-1|0,bR],[0,[0,bS-1|0,bR+1|0],[0,[0,bS,bR-1|0],[0,[0,bS,bR+1|0],[0,[0,bS+1|0,bR-1|0],[0,[0,bS+1|0,bR],[0,[0,bS+1|0,bR+1|0],0]]]]]]]]);}function b0(bZ,bX){var bY=bX[3]?u:bX[1]?t:bX[2]?0===bX[4]?s:Z(q,Z($(bX[4]),r)):p;return bZ.src=bv(bY);}function b_(b2){var b1=0,b3=b2[3][2]-1|0;if(!(b3<b1)){var b4=b1;for(;;){var b5=0,b6=b2[3][1]-1|0;if(!(b6<b5)){var b7=b5;for(;;){b0(caml_array_get(caml_array_get(b2[2],b4),b7),caml_array_get(caml_array_get(b2[1],b7),b4));var b8=b7+1|0;if(b6!==b7){var b7=b8;continue;}break;}}var b9=b4+1|0;if(b3!==b4){var b4=b9;continue;}break;}}return 0;}function ck(ca){var b$=0,cb=ca[3][2]-1|0;if(!(cb<b$)){var cc=b$;for(;;){var cd=0,ce=ca[3][1]-1|0;if(!(ce<cd)){var cf=cd;for(;;){var ch=caml_array_get(caml_array_get(ca[2],cc),cf);ch.onclick=a4(function(cg){a6.alert(bv(v));return aR;});var ci=cf+1|0;if(ce!==cf){var cf=ci;continue;}break;}}var cj=cc+1|0;if(cb!==cc){var cc=cj;continue;}break;}}return 0;}function cm(cl){return cl.toString();}var cn=a6.document;function cu(cp,cr){var co=cn.createDocumentFragment();aX(co,cn.createTextNode(cm(cp)));var cq=bp([0,cm(g)],0,cn);cq.value=cm($(cr[1]));cq.onchange=a4(function(ct){try {cr[1]=caml_int_of_string(new MlWrappedString(cq.value));}catch(cs){if(cs[1]!==a)throw cs;}cq.value=cm($(cr[1]));return aR;});aX(co,cq);return co;}a6.onload=a4(function(eu){var cv=cn.getElementById(cm(m));if(cv==aU)throw [0,T,n];var cw=[0,15],cx=[0,12],cy=[0,10];aX(cv,cu(l,cy));aX(cv,br(cn));aX(cv,cu(k,cx));aX(cv,br(cn));aX(cv,cu(j,cw));aX(cv,br(cn));var es=function(eq){var cz=bd(cn,L);aX(cv,cz);var cC=cw[1],cB=cy[1],cA=f(c[1],cx[1]),cD=f(c[2],cB),cE=f(1,cC),cF=caml_mul(cA,cD),cG=caml_lessequal(cF,cE)?cF:cE,cH=[0,cA,cD,cG],cI=[0,(caml_sys_time(0)*1000|0)%100000|0],cJ=caml_equal(cI,[0])?[0,0]:cI,cK=cJ.length-1,cL=0,cM=54;if(!(cM<cL)){var cN=cL;for(;;){caml_array_set(aP[1],cN,cN);var cO=cN+1|0;if(cM!==cN){var cN=cO;continue;}break;}}var cP=[0,P],cQ=0,cR=54+f(55,cK)|0;if(!(cR<cQ)){var cS=cQ;for(;;){var cT=cS%55|0,cU=cP[1],cV=Z(cU,$(caml_array_get(cJ,caml_mod(cS,cK))));cP[1]=caml_md5_string(cV,0,cV.getLen());var cW=cP[1];caml_array_set(aP[1],cT,caml_array_get(aP[1],cT)^(((cW.safeGet(0)+(cW.safeGet(1)<<8)|0)+(cW.safeGet(2)<<16)|0)+(cW.safeGet(3)<<24)|0));var cX=cS+1|0;if(cR!==cS){var cS=cX;continue;}break;}}aP[2]=0;var c3=0,c2=caml_mul(cH[2],cH[1])-cH[3]|0,c1=0,c0=caml_make_vect(cD,[0]);function cZ(cY){return [0,0,0,0,0];}function c_(c7,c4){var c6=c4[2],c5=c4[1];return caml_array_set(caml_array_get(c7,c5),c6,cZ(0));}function dg(c9,c8){caml_array_get(caml_array_get(c9,caml_div(c8,cH[2])),caml_mod(c8,cH[2]))[1]=1;return 0;}function dj(dc,c$){var da=c$[2],db=c$[1];if(caml_array_get(caml_array_get(dc,db),da)[1])return 0;var dd=[0,0],df=function(de){return caml_array_get(caml_array_get(dc,de[1]),de[2])[1]?(dd[1]+=1,0):0;};aD(df,bW(cH,[0,db,da]));caml_array_get(caml_array_get(dc,db),da)[4]=dd[1];return 0;}var di=cH[3],dh=caml_mul(cH[1],cH[2]),dk=[0,0];a:for(;;){var dm=dk[1],dl=0,dn=dm;for(;;){if(dn){var dq=dn[2],dp=dl+1|0,dl=dp,dn=dq;continue;}if(dl<di){if(!(1073741823<dh)&&0<dh)for(;;){aP[2]=(aP[2]+1|0)%55|0;var dr=caml_array_get(aP[1],(aP[2]+24|0)%55|0)+(caml_array_get(aP[1],aP[2])^caml_array_get(aP[1],aP[2])>>>25&31)|0;caml_array_set(aP[1],aP[2],dr);var ds=dr&1073741823,dt=caml_mod(ds,dh);if(((1073741823-dh|0)+1|0)<(ds-dt|0))continue;var du=dk[1];for(;;){if(du){var dv=du[2],dw=0===caml_compare(du[1],dt)?1:0;if(!dw){var du=dv;continue;}var dx=dw;}else var dx=0;if(!dx)dk[1]=[0,dt,dk[1]];continue a;}}throw [0,a,Q];}var dy=dk[1],dz=ar(cH[1],cH[2],cZ(0));bH(cH,aB(c_,dz));aD(aB(dg,dz),dy);bH(cH,aB(dj,dz));var dA=[0,dz,c0,cH,c1,c2,c3],dB=[0,0],dC=bw.createDocumentFragment();aX(dC,bw.createTextNode(bv(A)));var dD=bt(bw);aX(dC,dD);dD.src=bv(z);dD.onclick=a4(function(dE){if(0===dB[1]){dB[1]=1;dD.src=bv(B);}else{dB[1]=0;dD.src=bv(C);}return aR;});aX(dC,br(bw));var dF=0,dG=dA[3][2]-1|0;if(!(dG<dF)){var dH=dF;for(;;){var dI=[0,0],dJ=0,dK=dA[3][1]-1|0;if(!(dK<dJ)){var dL=dJ;for(;;){var dM=bt(bw);dI[1]=[0,dM,dI[1]];dM.src=bv(y);dM.onclick=a4(function(dH,dL,dM){return function(d$){if(0===dB[1]){if(!caml_array_get(caml_array_get(dA[1],dL),dH)[2])if(dA[6]){if(caml_array_get(caml_array_get(dA[1],dL),dH)[3]){dA[4]=dA[4]-1|0;caml_array_get(caml_array_get(dA[1],dL),dH)[3]=0;}else{dA[4]=dA[4]+1|0;caml_array_get(caml_array_get(dA[1],dL),dH)[3]=1;}b0(caml_array_get(caml_array_get(dA[2],dH),dL),caml_array_get(caml_array_get(dA[1],dL),dH));}else if(!caml_array_get(caml_array_get(dA[1],dL),dH)[3])if(caml_array_get(caml_array_get(dA[1],dL),dH)[1]){b_(dA);ck(dA);a6.alert(bv(D));}else{var dR=function(dN){var dO=dN[2],dP=dN[1];caml_array_get(caml_array_get(dA[1],dP),dO)[2]=1;b0(caml_array_get(caml_array_get(dA[2],dO),dP),caml_array_get(caml_array_get(dA[1],dP),dO));dA[5]=dA[5]-1|0;return 0;},dQ=dA[3],dS=dA[1],dT=ar(dQ[1],dQ[2],0),d1=function(dU){var dV=dU;for(;;){if(dV){var dW=dV[2],dX=dV[1],dY=dX[2],dZ=dX[1],d0=caml_array_get(caml_array_get(dS,dZ),dY);if(!d0[1]&&!d0[3]&&!d0[2]&&!caml_array_get(caml_array_get(dT,dZ),dY)){var d2=d1(dW),d3=d2[2],d4=d2[1];caml_array_set(caml_array_get(dT,dZ),dY,1);return 0===d0[4]?[0,d4,[0,dX,d3]]:[0,[0,dX,d4],d3];}var dV=dW;continue;}return o;}},d_=function(d5){if(d5){var d6=d5[2],d7=d5[1];if(0===caml_array_get(caml_array_get(dS,d7[1]),d7[2])[4]){var d8=d1(bW(dQ,d7)),d9=d8[1];return ab([0,d7,d9],d_(ab(d8[2],d6)));}return [0,d7,d_(d6)];}return 0;};caml_array_set(caml_array_get(dT,dL),dH,1);aD(dR,d_([0,[0,dL,dH],0]));if(0===dA[5]){b_(dA);ck(dA);a6.alert(bv(w));}}}else{caml_array_get(caml_array_get(dA[1],dL),dH)[3]=1-caml_array_get(caml_array_get(dA[1],dL),dH)[3];b0(dM,caml_array_get(caml_array_get(dA[1],dL),dH));}return aR;};}(dH,dL,dM));aX(dC,dM);var ea=dL+1|0;if(dK!==dL){var dL=ea;continue;}break;}}aX(dC,br(bw));var eb=ax(dI[1]);if(eb){var ee=eb[2],ed=eb[1],ec=0,ef=eb;for(;;){if(ef){var eh=ef[2],eg=ec+1|0,ec=eg,ef=eh;continue;}var ei=caml_make_vect(ec,ed),ej=1,ek=ee;for(;;){if(ek){var el=ek[2];ei[ej+1]=ek[1];var em=ej+1|0,ej=em,ek=el;continue;}var en=ei;break;}break;}}else var en=[0];caml_array_set(dA[2],dH,en);var eo=dH+1|0;if(dG!==dH){var dH=eo;continue;}break;}}var ep=cz.style;ep.lineHeight=bv(x);aX(cz,dC);return aR;}}},er=cn.createDocumentFragment(),et=bp([0,cm(h)],0,cn);et.value=cm(i);et.onclick=a4(es);aX(er,et);aX(cv,er);return aR;});ai(0);return;}());