diff --git a/104/build/fmt_simple b/104/build/fmt_simple new file mode 100755 index 0000000..10724e6 Binary files /dev/null and b/104/build/fmt_simple differ diff --git a/104/build/fmt_simple.js b/104/build/fmt_simple.js new file mode 100644 index 0000000..06b2ee1 --- /dev/null +++ b/104/build/fmt_simple.js @@ -0,0 +1,12924 @@ +"use strict"; +(function() { + +Error.stackTraceLimit = Infinity; + +var $global, $module; +if (typeof window !== "undefined") { /* web page */ + $global = window; +} else if (typeof self !== "undefined") { /* web worker */ + $global = self; +} else if (typeof global !== "undefined") { /* Node.js */ + $global = global; + $global.require = require; +} else { /* others (e.g. Nashorn) */ + $global = this; +} + +if ($global === undefined || $global.Array === undefined) { + throw new Error("no global object found"); +} +if (typeof module !== "undefined") { + $module = module; +} + +var $packages = {}, $idCounter = 0; +var $keys = function(m) { return m ? Object.keys(m) : []; }; +var $min = Math.min; +var $mod = function(x, y) { return x % y; }; +var $parseInt = parseInt; +var $parseFloat = function(f) { + if (f !== undefined && f !== null && f.constructor === Number) { + return f; + } + return parseFloat(f); +}; +var $flushConsole = function() {}; +var $throwRuntimeError; /* set by package "runtime" */ +var $throwNilPointerError = function() { $throwRuntimeError("invalid memory address or nil pointer dereference"); }; + +var $mapArray = function(array, f) { + var newArray = new array.constructor(array.length); + for (var i = 0; i < array.length; i++) { + newArray[i] = f(array[i]); + } + return newArray; +}; + +var $methodVal = function(recv, name) { + var vals = recv.$methodVals || {}; + recv.$methodVals = vals; /* noop for primitives */ + var f = vals[name]; + if (f !== undefined) { + return f; + } + var method = recv[name]; + f = function() { + $stackDepthOffset--; + try { + return method.apply(recv, arguments); + } finally { + $stackDepthOffset++; + } + }; + vals[name] = f; + return f; +}; + +var $methodExpr = function(method) { + if (method.$expr === undefined) { + method.$expr = function() { + $stackDepthOffset--; + try { + return Function.call.apply(method, arguments); + } finally { + $stackDepthOffset++; + } + }; + } + return method.$expr; +}; + +var $subslice = function(slice, low, high, max) { + if (low < 0 || high < low || max < high || high > slice.$capacity || max > slice.$capacity) { + $throwRuntimeError("slice bounds out of range"); + } + var s = new slice.constructor(slice.$array); + s.$offset = slice.$offset + low; + s.$length = slice.$length - low; + s.$capacity = slice.$capacity - low; + if (high !== undefined) { + s.$length = high - low; + } + if (max !== undefined) { + s.$capacity = max - low; + } + return s; +}; + +var $sliceToArray = function(slice) { + if (slice.$length === 0) { + return []; + } + if (slice.$array.constructor !== Array) { + return slice.$array.subarray(slice.$offset, slice.$offset + slice.$length); + } + return slice.$array.slice(slice.$offset, slice.$offset + slice.$length); +}; + +var $decodeRune = function(str, pos) { + var c0 = str.charCodeAt(pos); + + if (c0 < 0x80) { + return [c0, 1]; + } + + if (c0 !== c0 || c0 < 0xC0) { + return [0xFFFD, 1]; + } + + var c1 = str.charCodeAt(pos + 1); + if (c1 !== c1 || c1 < 0x80 || 0xC0 <= c1) { + return [0xFFFD, 1]; + } + + if (c0 < 0xE0) { + var r = (c0 & 0x1F) << 6 | (c1 & 0x3F); + if (r <= 0x7F) { + return [0xFFFD, 1]; + } + return [r, 2]; + } + + var c2 = str.charCodeAt(pos + 2); + if (c2 !== c2 || c2 < 0x80 || 0xC0 <= c2) { + return [0xFFFD, 1]; + } + + if (c0 < 0xF0) { + var r = (c0 & 0x0F) << 12 | (c1 & 0x3F) << 6 | (c2 & 0x3F); + if (r <= 0x7FF) { + return [0xFFFD, 1]; + } + if (0xD800 <= r && r <= 0xDFFF) { + return [0xFFFD, 1]; + } + return [r, 3]; + } + + var c3 = str.charCodeAt(pos + 3); + if (c3 !== c3 || c3 < 0x80 || 0xC0 <= c3) { + return [0xFFFD, 1]; + } + + if (c0 < 0xF8) { + var r = (c0 & 0x07) << 18 | (c1 & 0x3F) << 12 | (c2 & 0x3F) << 6 | (c3 & 0x3F); + if (r <= 0xFFFF || 0x10FFFF < r) { + return [0xFFFD, 1]; + } + return [r, 4]; + } + + return [0xFFFD, 1]; +}; + +var $encodeRune = function(r) { + if (r < 0 || r > 0x10FFFF || (0xD800 <= r && r <= 0xDFFF)) { + r = 0xFFFD; + } + if (r <= 0x7F) { + return String.fromCharCode(r); + } + if (r <= 0x7FF) { + return String.fromCharCode(0xC0 | r >> 6, 0x80 | (r & 0x3F)); + } + if (r <= 0xFFFF) { + return String.fromCharCode(0xE0 | r >> 12, 0x80 | (r >> 6 & 0x3F), 0x80 | (r & 0x3F)); + } + return String.fromCharCode(0xF0 | r >> 18, 0x80 | (r >> 12 & 0x3F), 0x80 | (r >> 6 & 0x3F), 0x80 | (r & 0x3F)); +}; + +var $stringToBytes = function(str) { + var array = new Uint8Array(str.length); + for (var i = 0; i < str.length; i++) { + array[i] = str.charCodeAt(i); + } + return array; +}; + +var $bytesToString = function(slice) { + if (slice.$length === 0) { + return ""; + } + var str = ""; + for (var i = 0; i < slice.$length; i += 10000) { + str += String.fromCharCode.apply(null, slice.$array.subarray(slice.$offset + i, slice.$offset + Math.min(slice.$length, i + 10000))); + } + return str; +}; + +var $stringToRunes = function(str) { + var array = new Int32Array(str.length); + var rune, j = 0; + for (var i = 0; i < str.length; i += rune[1], j++) { + rune = $decodeRune(str, i); + array[j] = rune[0]; + } + return array.subarray(0, j); +}; + +var $runesToString = function(slice) { + if (slice.$length === 0) { + return ""; + } + var str = ""; + for (var i = 0; i < slice.$length; i++) { + str += $encodeRune(slice.$array[slice.$offset + i]); + } + return str; +}; + +var $copyString = function(dst, src) { + var n = Math.min(src.length, dst.$length); + for (var i = 0; i < n; i++) { + dst.$array[dst.$offset + i] = src.charCodeAt(i); + } + return n; +}; + +var $copySlice = function(dst, src) { + var n = Math.min(src.$length, dst.$length); + $internalCopy(dst.$array, src.$array, dst.$offset, src.$offset, n, dst.constructor.elem); + return n; +}; + +var $copy = function(dst, src, typ) { + switch (typ.kind) { + case $kindArray: + $internalCopy(dst, src, 0, 0, src.length, typ.elem); + break; + case $kindStruct: + for (var i = 0; i < typ.fields.length; i++) { + var f = typ.fields[i]; + switch (f.typ.kind) { + case $kindArray: + case $kindStruct: + $copy(dst[f.prop], src[f.prop], f.typ); + continue; + default: + dst[f.prop] = src[f.prop]; + continue; + } + } + break; + } +}; + +var $internalCopy = function(dst, src, dstOffset, srcOffset, n, elem) { + if (n === 0 || (dst === src && dstOffset === srcOffset)) { + return; + } + + if (src.subarray) { + dst.set(src.subarray(srcOffset, srcOffset + n), dstOffset); + return; + } + + switch (elem.kind) { + case $kindArray: + case $kindStruct: + if (dst === src && dstOffset > srcOffset) { + for (var i = n - 1; i >= 0; i--) { + $copy(dst[dstOffset + i], src[srcOffset + i], elem); + } + return; + } + for (var i = 0; i < n; i++) { + $copy(dst[dstOffset + i], src[srcOffset + i], elem); + } + return; + } + + if (dst === src && dstOffset > srcOffset) { + for (var i = n - 1; i >= 0; i--) { + dst[dstOffset + i] = src[srcOffset + i]; + } + return; + } + for (var i = 0; i < n; i++) { + dst[dstOffset + i] = src[srcOffset + i]; + } +}; + +var $clone = function(src, type) { + var clone = type.zero(); + $copy(clone, src, type); + return clone; +}; + +var $pointerOfStructConversion = function(obj, type) { + if(obj.$proxies === undefined) { + obj.$proxies = {}; + obj.$proxies[obj.constructor.string] = obj; + } + var proxy = obj.$proxies[type.string]; + if (proxy === undefined) { + var properties = {}; + for (var i = 0; i < type.elem.fields.length; i++) { + (function(fieldProp) { + properties[fieldProp] = { + get: function() { return obj[fieldProp]; }, + set: function(value) { obj[fieldProp] = value; }, + }; + })(type.elem.fields[i].prop); + } + proxy = Object.create(type.prototype, properties); + proxy.$val = proxy; + obj.$proxies[type.string] = proxy; + proxy.$proxies = obj.$proxies; + } + return proxy; +}; + +var $append = function(slice) { + return $internalAppend(slice, arguments, 1, arguments.length - 1); +}; + +var $appendSlice = function(slice, toAppend) { + return $internalAppend(slice, toAppend.$array, toAppend.$offset, toAppend.$length); +}; + +var $internalAppend = function(slice, array, offset, length) { + if (length === 0) { + return slice; + } + + var newArray = slice.$array; + var newOffset = slice.$offset; + var newLength = slice.$length + length; + var newCapacity = slice.$capacity; + + if (newLength > newCapacity) { + newOffset = 0; + newCapacity = Math.max(newLength, slice.$capacity < 1024 ? slice.$capacity * 2 : Math.floor(slice.$capacity * 5 / 4)); + + if (slice.$array.constructor === Array) { + newArray = slice.$array.slice(slice.$offset, slice.$offset + slice.$length); + newArray.length = newCapacity; + var zero = slice.constructor.elem.zero; + for (var i = slice.$length; i < newCapacity; i++) { + newArray[i] = zero(); + } + } else { + newArray = new slice.$array.constructor(newCapacity); + newArray.set(slice.$array.subarray(slice.$offset, slice.$offset + slice.$length)); + } + } + + $internalCopy(newArray, array, newOffset + slice.$length, offset, length, slice.constructor.elem); + + var newSlice = new slice.constructor(newArray); + newSlice.$offset = newOffset; + newSlice.$length = newLength; + newSlice.$capacity = newCapacity; + return newSlice; +}; + +var $equal = function(a, b, type) { + if (type === $js.Object) { + return a === b; + } + switch (type.kind) { + case $kindFloat32: + return $float32IsEqual(a, b); + case $kindComplex64: + return $float32IsEqual(a.$real, b.$real) && $float32IsEqual(a.$imag, b.$imag); + case $kindComplex128: + return a.$real === b.$real && a.$imag === b.$imag; + case $kindInt64: + case $kindUint64: + return a.$high === b.$high && a.$low === b.$low; + case $kindPtr: + if (a.constructor.elem) { + return a === b; + } + return $pointerIsEqual(a, b); + case $kindArray: + if (a.length != b.length) { + return false; + } + for (var i = 0; i < a.length; i++) { + if (!$equal(a[i], b[i], type.elem)) { + return false; + } + } + return true; + case $kindStruct: + for (var i = 0; i < type.fields.length; i++) { + var f = type.fields[i]; + if (!$equal(a[f.prop], b[f.prop], f.typ)) { + return false; + } + } + return true; + case $kindInterface: + return $interfaceIsEqual(a, b); + default: + return a === b; + } +}; + +var $interfaceIsEqual = function(a, b) { + if (a === $ifaceNil || b === $ifaceNil) { + return a === b; + } + if (a.constructor !== b.constructor) { + return false; + } + if (!a.constructor.comparable) { + $throwRuntimeError("comparing uncomparable type " + a.constructor.string); + } + return $equal(a.$val, b.$val, a.constructor); +}; + +var $float32IsEqual = function(a, b) { + if (a === b) { + return true; + } + if (a === 1/0 || b === 1/0 || a === -1/0 || b === -1/0 || a !== a || b !== b) { + return false; + } + var math = $packages["math"]; + return math !== undefined && math.Float32bits(a) === math.Float32bits(b); +}; + +var $pointerIsEqual = function(a, b) { + if (a === b) { + return true; + } + if (a.$get === $throwNilPointerError || b.$get === $throwNilPointerError) { + return a.$get === $throwNilPointerError && b.$get === $throwNilPointerError; + } + var va = a.$get(); + var vb = b.$get(); + if (va !== vb) { + return false; + } + var dummy = va + 1; + a.$set(dummy); + var equal = b.$get() === dummy; + a.$set(va); + return equal; +}; + +var $kindBool = 1; +var $kindInt = 2; +var $kindInt8 = 3; +var $kindInt16 = 4; +var $kindInt32 = 5; +var $kindInt64 = 6; +var $kindUint = 7; +var $kindUint8 = 8; +var $kindUint16 = 9; +var $kindUint32 = 10; +var $kindUint64 = 11; +var $kindUintptr = 12; +var $kindFloat32 = 13; +var $kindFloat64 = 14; +var $kindComplex64 = 15; +var $kindComplex128 = 16; +var $kindArray = 17; +var $kindChan = 18; +var $kindFunc = 19; +var $kindInterface = 20; +var $kindMap = 21; +var $kindPtr = 22; +var $kindSlice = 23; +var $kindString = 24; +var $kindStruct = 25; +var $kindUnsafePointer = 26; + +var $methodSynthesizers = []; +var $addMethodSynthesizer = function(f) { + if ($methodSynthesizers === null) { + f(); + return; + } + $methodSynthesizers.push(f); +}; +var $synthesizeMethods = function() { + $methodSynthesizers.forEach(function(f) { f(); }); + $methodSynthesizers = null; +}; + +var $newType = function(size, kind, string, name, pkg, constructor) { + var typ; + switch(kind) { + case $kindBool: + case $kindInt: + case $kindInt8: + case $kindInt16: + case $kindInt32: + case $kindUint: + case $kindUint8: + case $kindUint16: + case $kindUint32: + case $kindUintptr: + case $kindString: + case $kindUnsafePointer: + typ = function(v) { this.$val = v; }; + typ.prototype.$key = function() { return string + "$" + this.$val; }; + break; + + case $kindFloat32: + case $kindFloat64: + typ = function(v) { this.$val = v; }; + typ.prototype.$key = function() { return string + "$" + $floatKey(this.$val); }; + break; + + case $kindInt64: + typ = function(high, low) { + this.$high = (high + Math.floor(Math.ceil(low) / 4294967296)) >> 0; + this.$low = low >>> 0; + this.$val = this; + }; + typ.prototype.$key = function() { return string + "$" + this.$high + "$" + this.$low; }; + break; + + case $kindUint64: + typ = function(high, low) { + this.$high = (high + Math.floor(Math.ceil(low) / 4294967296)) >>> 0; + this.$low = low >>> 0; + this.$val = this; + }; + typ.prototype.$key = function() { return string + "$" + this.$high + "$" + this.$low; }; + break; + + case $kindComplex64: + case $kindComplex128: + typ = function(real, imag) { + this.$real = real; + this.$imag = imag; + this.$val = this; + }; + typ.prototype.$key = function() { return string + "$" + this.$real + "$" + this.$imag; }; + break; + + case $kindArray: + typ = function(v) { this.$val = v; }; + typ.ptr = $newType(4, $kindPtr, "*" + string, "", "", function(array) { + this.$get = function() { return array; }; + this.$set = function(v) { $copy(this, v, typ); }; + this.$val = array; + }); + typ.init = function(elem, len) { + typ.elem = elem; + typ.len = len; + typ.comparable = elem.comparable; + typ.prototype.$key = function() { + return string + "$" + Array.prototype.join.call($mapArray(this.$val, function(e) { + var key = e.$key ? e.$key() : String(e); + return key.replace(/\\/g, "\\\\").replace(/\$/g, "\\$"); + }), "$"); + }; + typ.ptr.init(typ); + Object.defineProperty(typ.ptr.nil, "nilCheck", { get: $throwNilPointerError }); + }; + break; + + case $kindChan: + typ = function(capacity) { + this.$val = this; + this.$capacity = capacity; + this.$buffer = []; + this.$sendQueue = []; + this.$recvQueue = []; + this.$closed = false; + }; + typ.prototype.$key = function() { + if (this.$id === undefined) { + $idCounter++; + this.$id = $idCounter; + } + return String(this.$id); + }; + typ.init = function(elem, sendOnly, recvOnly) { + typ.elem = elem; + typ.sendOnly = sendOnly; + typ.recvOnly = recvOnly; + typ.nil = new typ(0); + typ.nil.$sendQueue = typ.nil.$recvQueue = { length: 0, push: function() {}, shift: function() { return undefined; }, indexOf: function() { return -1; } }; + }; + break; + + case $kindFunc: + typ = function(v) { this.$val = v; }; + typ.init = function(params, results, variadic) { + typ.params = params; + typ.results = results; + typ.variadic = variadic; + typ.comparable = false; + }; + break; + + case $kindInterface: + typ = { implementedBy: {}, missingMethodFor: {} }; + typ.init = function(methods) { + typ.methods = methods; + methods.forEach(function(m) { + $ifaceNil[m.prop] = $throwNilPointerError; + }); + }; + break; + + case $kindMap: + typ = function(v) { this.$val = v; }; + typ.init = function(key, elem) { + typ.key = key; + typ.elem = elem; + typ.comparable = false; + }; + break; + + case $kindPtr: + typ = constructor || function(getter, setter, target) { + this.$get = getter; + this.$set = setter; + this.$target = target; + this.$val = this; + }; + typ.prototype.$key = function() { + if (this.$id === undefined) { + $idCounter++; + this.$id = $idCounter; + } + return String(this.$id); + }; + typ.init = function(elem) { + typ.elem = elem; + typ.nil = new typ($throwNilPointerError, $throwNilPointerError); + }; + break; + + case $kindSlice: + typ = function(array) { + if (array.constructor !== typ.nativeArray) { + array = new typ.nativeArray(array); + } + this.$array = array; + this.$offset = 0; + this.$length = array.length; + this.$capacity = array.length; + this.$val = this; + }; + typ.init = function(elem) { + typ.elem = elem; + typ.comparable = false; + typ.nativeArray = $nativeArray(elem.kind); + typ.nil = new typ([]); + }; + break; + + case $kindStruct: + typ = function(v) { this.$val = v; }; + typ.ptr = $newType(4, $kindPtr, "*" + string, "", "", constructor); + typ.ptr.elem = typ; + typ.ptr.prototype.$get = function() { return this; }; + typ.ptr.prototype.$set = function(v) { $copy(this, v, typ); }; + typ.init = function(fields) { + typ.fields = fields; + fields.forEach(function(f) { + if (!f.typ.comparable) { + typ.comparable = false; + } + }); + typ.prototype.$key = function() { + var val = this.$val; + return string + "$" + $mapArray(fields, function(f) { + var e = val[f.prop]; + var key = e.$key ? e.$key() : String(e); + return key.replace(/\\/g, "\\\\").replace(/\$/g, "\\$"); + }).join("$"); + }; + /* nil value */ + var properties = {}; + fields.forEach(function(f) { + properties[f.prop] = { get: $throwNilPointerError, set: $throwNilPointerError }; + }); + typ.ptr.nil = Object.create(constructor.prototype, properties); + typ.ptr.nil.$val = typ.ptr.nil; + /* methods for embedded fields */ + $addMethodSynthesizer(function() { + var synthesizeMethod = function(target, m, f) { + if (target.prototype[m.prop] !== undefined) { return; } + target.prototype[m.prop] = function() { + var v = this.$val[f.prop]; + if (f.typ === $js.Object) { + v = new $js.container.ptr(v); + } + if (v.$val === undefined) { + v = new f.typ(v); + } + return v[m.prop].apply(v, arguments); + }; + }; + fields.forEach(function(f) { + if (f.name === "") { + $methodSet(f.typ).forEach(function(m) { + synthesizeMethod(typ, m, f); + synthesizeMethod(typ.ptr, m, f); + }); + $methodSet($ptrType(f.typ)).forEach(function(m) { + synthesizeMethod(typ.ptr, m, f); + }); + } + }); + }); + }; + break; + + default: + $panic(new $String("invalid kind: " + kind)); + } + + switch (kind) { + case $kindBool: + case $kindMap: + typ.zero = function() { return false; }; + break; + + case $kindInt: + case $kindInt8: + case $kindInt16: + case $kindInt32: + case $kindUint: + case $kindUint8 : + case $kindUint16: + case $kindUint32: + case $kindUintptr: + case $kindUnsafePointer: + case $kindFloat32: + case $kindFloat64: + typ.zero = function() { return 0; }; + break; + + case $kindString: + typ.zero = function() { return ""; }; + break; + + case $kindInt64: + case $kindUint64: + case $kindComplex64: + case $kindComplex128: + var zero = new typ(0, 0); + typ.zero = function() { return zero; }; + break; + + case $kindChan: + case $kindPtr: + case $kindSlice: + typ.zero = function() { return typ.nil; }; + break; + + case $kindFunc: + typ.zero = function() { return $throwNilPointerError; }; + break; + + case $kindInterface: + typ.zero = function() { return $ifaceNil; }; + break; + + case $kindArray: + typ.zero = function() { + var arrayClass = $nativeArray(typ.elem.kind); + if (arrayClass !== Array) { + return new arrayClass(typ.len); + } + var array = new Array(typ.len); + for (var i = 0; i < typ.len; i++) { + array[i] = typ.elem.zero(); + } + return array; + }; + break; + + case $kindStruct: + typ.zero = function() { return new typ.ptr(); }; + break; + + default: + $panic(new $String("invalid kind: " + kind)); + } + + typ.size = size; + typ.kind = kind; + typ.string = string; + typ.typeName = name; + typ.pkg = pkg; + typ.methods = []; + typ.methodSetCache = null; + typ.comparable = true; + return typ; +}; + +var $methodSet = function(typ) { + if (typ.methodSetCache !== null) { + return typ.methodSetCache; + } + var base = {}; + + var isPtr = (typ.kind === $kindPtr); + if (isPtr && typ.elem.kind === $kindInterface) { + typ.methodSetCache = []; + return []; + } + + var current = [{typ: isPtr ? typ.elem : typ, indirect: isPtr}]; + + var seen = {}; + + while (current.length > 0) { + var next = []; + var mset = []; + + current.forEach(function(e) { + if (seen[e.typ.string]) { + return; + } + seen[e.typ.string] = true; + + if(e.typ.typeName !== "") { + mset = mset.concat(e.typ.methods); + if (e.indirect) { + mset = mset.concat($ptrType(e.typ).methods); + } + } + + switch (e.typ.kind) { + case $kindStruct: + e.typ.fields.forEach(function(f) { + if (f.name === "") { + var fTyp = f.typ; + var fIsPtr = (fTyp.kind === $kindPtr); + next.push({typ: fIsPtr ? fTyp.elem : fTyp, indirect: e.indirect || fIsPtr}); + } + }); + break; + + case $kindInterface: + mset = mset.concat(e.typ.methods); + break; + } + }); + + mset.forEach(function(m) { + if (base[m.name] === undefined) { + base[m.name] = m; + } + }); + + current = next; + } + + typ.methodSetCache = []; + Object.keys(base).sort().forEach(function(name) { + typ.methodSetCache.push(base[name]); + }); + return typ.methodSetCache; +}; + +var $Bool = $newType( 1, $kindBool, "bool", "bool", "", null); +var $Int = $newType( 4, $kindInt, "int", "int", "", null); +var $Int8 = $newType( 1, $kindInt8, "int8", "int8", "", null); +var $Int16 = $newType( 2, $kindInt16, "int16", "int16", "", null); +var $Int32 = $newType( 4, $kindInt32, "int32", "int32", "", null); +var $Int64 = $newType( 8, $kindInt64, "int64", "int64", "", null); +var $Uint = $newType( 4, $kindUint, "uint", "uint", "", null); +var $Uint8 = $newType( 1, $kindUint8, "uint8", "uint8", "", null); +var $Uint16 = $newType( 2, $kindUint16, "uint16", "uint16", "", null); +var $Uint32 = $newType( 4, $kindUint32, "uint32", "uint32", "", null); +var $Uint64 = $newType( 8, $kindUint64, "uint64", "uint64", "", null); +var $Uintptr = $newType( 4, $kindUintptr, "uintptr", "uintptr", "", null); +var $Float32 = $newType( 4, $kindFloat32, "float32", "float32", "", null); +var $Float64 = $newType( 8, $kindFloat64, "float64", "float64", "", null); +var $Complex64 = $newType( 8, $kindComplex64, "complex64", "complex64", "", null); +var $Complex128 = $newType(16, $kindComplex128, "complex128", "complex128", "", null); +var $String = $newType( 8, $kindString, "string", "string", "", null); +var $UnsafePointer = $newType( 4, $kindUnsafePointer, "unsafe.Pointer", "Pointer", "", null); + +var $nativeArray = function(elemKind) { + switch (elemKind) { + case $kindInt: + return Int32Array; + case $kindInt8: + return Int8Array; + case $kindInt16: + return Int16Array; + case $kindInt32: + return Int32Array; + case $kindUint: + return Uint32Array; + case $kindUint8: + return Uint8Array; + case $kindUint16: + return Uint16Array; + case $kindUint32: + return Uint32Array; + case $kindUintptr: + return Uint32Array; + case $kindFloat32: + return Float32Array; + case $kindFloat64: + return Float64Array; + default: + return Array; + } +}; +var $toNativeArray = function(elemKind, array) { + var nativeArray = $nativeArray(elemKind); + if (nativeArray === Array) { + return array; + } + return new nativeArray(array); +}; +var $arrayTypes = {}; +var $arrayType = function(elem, len) { + var string = "[" + len + "]" + elem.string; + var typ = $arrayTypes[string]; + if (typ === undefined) { + typ = $newType(12, $kindArray, string, "", "", null); + $arrayTypes[string] = typ; + typ.init(elem, len); + } + return typ; +}; + +var $chanType = function(elem, sendOnly, recvOnly) { + var string = (recvOnly ? "<-" : "") + "chan" + (sendOnly ? "<- " : " ") + elem.string; + var field = sendOnly ? "SendChan" : (recvOnly ? "RecvChan" : "Chan"); + var typ = elem[field]; + if (typ === undefined) { + typ = $newType(4, $kindChan, string, "", "", null); + elem[field] = typ; + typ.init(elem, sendOnly, recvOnly); + } + return typ; +}; + +var $funcTypes = {}; +var $funcType = function(params, results, variadic) { + var paramTypes = $mapArray(params, function(p) { return p.string; }); + if (variadic) { + paramTypes[paramTypes.length - 1] = "..." + paramTypes[paramTypes.length - 1].substr(2); + } + var string = "func(" + paramTypes.join(", ") + ")"; + if (results.length === 1) { + string += " " + results[0].string; + } else if (results.length > 1) { + string += " (" + $mapArray(results, function(r) { return r.string; }).join(", ") + ")"; + } + var typ = $funcTypes[string]; + if (typ === undefined) { + typ = $newType(4, $kindFunc, string, "", "", null); + $funcTypes[string] = typ; + typ.init(params, results, variadic); + } + return typ; +}; + +var $interfaceTypes = {}; +var $interfaceType = function(methods) { + var string = "interface {}"; + if (methods.length !== 0) { + string = "interface { " + $mapArray(methods, function(m) { + return (m.pkg !== "" ? m.pkg + "." : "") + m.name + m.typ.string.substr(4); + }).join("; ") + " }"; + } + var typ = $interfaceTypes[string]; + if (typ === undefined) { + typ = $newType(8, $kindInterface, string, "", "", null); + $interfaceTypes[string] = typ; + typ.init(methods); + } + return typ; +}; +var $emptyInterface = $interfaceType([]); +var $ifaceNil = { $key: function() { return "nil"; } }; +var $error = $newType(8, $kindInterface, "error", "error", "", null); +$error.init([{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]); + +var $Map = function() {}; +(function() { + var names = Object.getOwnPropertyNames(Object.prototype); + for (var i = 0; i < names.length; i++) { + $Map.prototype[names[i]] = undefined; + } +})(); +var $mapTypes = {}; +var $mapType = function(key, elem) { + var string = "map[" + key.string + "]" + elem.string; + var typ = $mapTypes[string]; + if (typ === undefined) { + typ = $newType(4, $kindMap, string, "", "", null); + $mapTypes[string] = typ; + typ.init(key, elem); + } + return typ; +}; + +var $ptrType = function(elem) { + var typ = elem.ptr; + if (typ === undefined) { + typ = $newType(4, $kindPtr, "*" + elem.string, "", "", null); + elem.ptr = typ; + typ.init(elem); + } + return typ; +}; + +var $newDataPointer = function(data, constructor) { + if (constructor.elem.kind === $kindStruct) { + return data; + } + return new constructor(function() { return data; }, function(v) { data = v; }); +}; + +var $sliceType = function(elem) { + var typ = elem.Slice; + if (typ === undefined) { + typ = $newType(12, $kindSlice, "[]" + elem.string, "", "", null); + elem.Slice = typ; + typ.init(elem); + } + return typ; +}; +var $makeSlice = function(typ, length, capacity) { + capacity = capacity || length; + var array = new typ.nativeArray(capacity); + if (typ.nativeArray === Array) { + for (var i = 0; i < capacity; i++) { + array[i] = typ.elem.zero(); + } + } + var slice = new typ(array); + slice.$length = length; + return slice; +}; + +var $structTypes = {}; +var $structType = function(fields) { + var string = "struct { " + $mapArray(fields, function(f) { + return f.name + " " + f.typ.string + (f.tag !== "" ? (" \"" + f.tag.replace(/\\/g, "\\\\").replace(/"/g, "\\\"") + "\"") : ""); + }).join("; ") + " }"; + if (fields.length === 0) { + string = "struct {}"; + } + var typ = $structTypes[string]; + if (typ === undefined) { + typ = $newType(0, $kindStruct, string, "", "", function() { + this.$val = this; + for (var i = 0; i < fields.length; i++) { + var f = fields[i]; + var arg = arguments[i]; + this[f.prop] = arg !== undefined ? arg : f.typ.zero(); + } + }); + $structTypes[string] = typ; + typ.init(fields); + } + return typ; +}; + +var $assertType = function(value, type, returnTuple) { + var isInterface = (type.kind === $kindInterface), ok, missingMethod = ""; + if (value === $ifaceNil) { + ok = false; + } else if (!isInterface) { + ok = value.constructor === type; + } else { + var valueTypeString = value.constructor.string; + ok = type.implementedBy[valueTypeString]; + if (ok === undefined) { + ok = true; + var valueMethodSet = $methodSet(value.constructor); + var interfaceMethods = type.methods; + for (var i = 0; i < interfaceMethods.length; i++) { + var tm = interfaceMethods[i]; + var found = false; + for (var j = 0; j < valueMethodSet.length; j++) { + var vm = valueMethodSet[j]; + if (vm.name === tm.name && vm.pkg === tm.pkg && vm.typ === tm.typ) { + found = true; + break; + } + } + if (!found) { + ok = false; + type.missingMethodFor[valueTypeString] = tm.name; + break; + } + } + type.implementedBy[valueTypeString] = ok; + } + if (!ok) { + missingMethod = type.missingMethodFor[valueTypeString]; + } + } + + if (!ok) { + if (returnTuple) { + return [type.zero(), false]; + } + $panic(new $packages["runtime"].TypeAssertionError.ptr("", (value === $ifaceNil ? "" : value.constructor.string), type.string, missingMethod)); + } + + if (!isInterface) { + value = value.$val; + } + if (type === $js.Object) { + value = value.Object; + } + return returnTuple ? [value, true] : value; +}; + +var $coerceFloat32 = function(f) { + var math = $packages["math"]; + if (math === undefined) { + return f; + } + return math.Float32frombits(math.Float32bits(f)); +}; + +var $floatKey = function(f) { + if (f !== f) { + $idCounter++; + return "NaN$" + $idCounter; + } + return String(f); +}; + +var $flatten64 = function(x) { + return x.$high * 4294967296 + x.$low; +}; + +var $shiftLeft64 = function(x, y) { + if (y === 0) { + return x; + } + if (y < 32) { + return new x.constructor(x.$high << y | x.$low >>> (32 - y), (x.$low << y) >>> 0); + } + if (y < 64) { + return new x.constructor(x.$low << (y - 32), 0); + } + return new x.constructor(0, 0); +}; + +var $shiftRightInt64 = function(x, y) { + if (y === 0) { + return x; + } + if (y < 32) { + return new x.constructor(x.$high >> y, (x.$low >>> y | x.$high << (32 - y)) >>> 0); + } + if (y < 64) { + return new x.constructor(x.$high >> 31, (x.$high >> (y - 32)) >>> 0); + } + if (x.$high < 0) { + return new x.constructor(-1, 4294967295); + } + return new x.constructor(0, 0); +}; + +var $shiftRightUint64 = function(x, y) { + if (y === 0) { + return x; + } + if (y < 32) { + return new x.constructor(x.$high >>> y, (x.$low >>> y | x.$high << (32 - y)) >>> 0); + } + if (y < 64) { + return new x.constructor(0, x.$high >>> (y - 32)); + } + return new x.constructor(0, 0); +}; + +var $mul64 = function(x, y) { + var high = 0, low = 0; + if ((y.$low & 1) !== 0) { + high = x.$high; + low = x.$low; + } + for (var i = 1; i < 32; i++) { + if ((y.$low & 1<>> (32 - i); + low += (x.$low << i) >>> 0; + } + } + for (var i = 0; i < 32; i++) { + if ((y.$high & 1< yHigh) || (xHigh === yHigh && xLow > yLow))) { + yHigh = (yHigh << 1 | yLow >>> 31) >>> 0; + yLow = (yLow << 1) >>> 0; + n++; + } + for (var i = 0; i <= n; i++) { + high = high << 1 | low >>> 31; + low = (low << 1) >>> 0; + if ((xHigh > yHigh) || (xHigh === yHigh && xLow >= yLow)) { + xHigh = xHigh - yHigh; + xLow = xLow - yLow; + if (xLow < 0) { + xHigh--; + xLow += 4294967296; + } + low++; + if (low === 4294967296) { + high++; + low = 0; + } + } + yLow = (yLow >>> 1 | yHigh << (32 - 1)) >>> 0; + yHigh = yHigh >>> 1; + } + + if (returnRemainder) { + return new x.constructor(xHigh * rs, xLow * rs); + } + return new x.constructor(high * s, low * s); +}; + +var $divComplex = function(n, d) { + var ninf = n.$real === 1/0 || n.$real === -1/0 || n.$imag === 1/0 || n.$imag === -1/0; + var dinf = d.$real === 1/0 || d.$real === -1/0 || d.$imag === 1/0 || d.$imag === -1/0; + var nnan = !ninf && (n.$real !== n.$real || n.$imag !== n.$imag); + var dnan = !dinf && (d.$real !== d.$real || d.$imag !== d.$imag); + if(nnan || dnan) { + return new n.constructor(0/0, 0/0); + } + if (ninf && !dinf) { + return new n.constructor(1/0, 1/0); + } + if (!ninf && dinf) { + return new n.constructor(0, 0); + } + if (d.$real === 0 && d.$imag === 0) { + if (n.$real === 0 && n.$imag === 0) { + return new n.constructor(0/0, 0/0); + } + return new n.constructor(1/0, 1/0); + } + var a = Math.abs(d.$real); + var b = Math.abs(d.$imag); + if (a <= b) { + var ratio = d.$real / d.$imag; + var denom = d.$real * ratio + d.$imag; + return new n.constructor((n.$real * ratio + n.$imag) / denom, (n.$imag * ratio - n.$real) / denom); + } + var ratio = d.$imag / d.$real; + var denom = d.$imag * ratio + d.$real; + return new n.constructor((n.$imag * ratio + n.$real) / denom, (n.$imag - n.$real * ratio) / denom); +}; + +var $stackDepthOffset = 0; +var $getStackDepth = function() { + var err = new Error(); + if (err.stack === undefined) { + return undefined; + } + return $stackDepthOffset + err.stack.split("\n").length; +}; + +var $deferFrames = [], $skippedDeferFrames = 0, $jumpToDefer = false, $panicStackDepth = null, $panicValue; +var $callDeferred = function(deferred, jsErr) { + if ($skippedDeferFrames !== 0) { + $skippedDeferFrames--; + throw jsErr; + } + if ($jumpToDefer) { + $jumpToDefer = false; + throw jsErr; + } + if (jsErr) { + var newErr = null; + try { + $deferFrames.push(deferred); + $panic(new $js.Error.ptr(jsErr)); + } catch (err) { + newErr = err; + } + $deferFrames.pop(); + $callDeferred(deferred, newErr); + return; + } + + $stackDepthOffset--; + var outerPanicStackDepth = $panicStackDepth; + var outerPanicValue = $panicValue; + + var localPanicValue = $curGoroutine.panicStack.pop(); + if (localPanicValue !== undefined) { + $panicStackDepth = $getStackDepth(); + $panicValue = localPanicValue; + } + + var call, localSkippedDeferFrames = 0; + try { + while (true) { + if (deferred === null) { + deferred = $deferFrames[$deferFrames.length - 1 - localSkippedDeferFrames]; + if (deferred === undefined) { + if (localPanicValue.Object instanceof Error) { + throw localPanicValue.Object; + } + var msg; + if (localPanicValue.constructor === $String) { + msg = localPanicValue.$val; + } else if (localPanicValue.Error !== undefined) { + msg = localPanicValue.Error(); + } else if (localPanicValue.String !== undefined) { + msg = localPanicValue.String(); + } else { + msg = localPanicValue; + } + throw new Error(msg); + } + } + var call = deferred.pop(); + if (call === undefined) { + if (localPanicValue !== undefined) { + localSkippedDeferFrames++; + deferred = null; + continue; + } + return; + } + var r = call[0].apply(undefined, call[1]); + if (r && r.$blocking) { + deferred.push([r, []]); + } + + if (localPanicValue !== undefined && $panicStackDepth === null) { + throw null; /* error was recovered */ + } + } + } finally { + $skippedDeferFrames += localSkippedDeferFrames; + if ($curGoroutine.asleep) { + deferred.push(call); + $jumpToDefer = true; + } + if (localPanicValue !== undefined) { + if ($panicStackDepth !== null) { + $curGoroutine.panicStack.push(localPanicValue); + } + $panicStackDepth = outerPanicStackDepth; + $panicValue = outerPanicValue; + } + $stackDepthOffset++; + } +}; + +var $panic = function(value) { + $curGoroutine.panicStack.push(value); + $callDeferred(null, null); +}; +var $recover = function() { + if ($panicStackDepth === null || ($panicStackDepth !== undefined && $panicStackDepth !== $getStackDepth() - 2)) { + return $ifaceNil; + } + $panicStackDepth = null; + return $panicValue; +}; +var $throw = function(err) { throw err; }; + +var $BLOCKING = new Object(); +var $nonblockingCall = function() { + $panic(new $packages["runtime"].NotSupportedError.ptr("non-blocking call to blocking function, see https://github.com/gopherjs/gopherjs#goroutines")); +}; + +var $dummyGoroutine = { asleep: false, exit: false, panicStack: [] }; +var $curGoroutine = $dummyGoroutine, $totalGoroutines = 0, $awakeGoroutines = 0, $checkForDeadlock = true; +var $go = function(fun, args, direct) { + $totalGoroutines++; + $awakeGoroutines++; + args.push($BLOCKING); + var goroutine = function() { + var rescheduled = false; + try { + $curGoroutine = goroutine; + $skippedDeferFrames = 0; + $jumpToDefer = false; + var r = fun.apply(undefined, args); + if (r && r.$blocking) { + fun = r; + args = []; + $schedule(goroutine, direct); + rescheduled = true; + return; + } + goroutine.exit = true; + } catch (err) { + if (!$curGoroutine.asleep) { + goroutine.exit = true; + throw err; + } + } finally { + $curGoroutine = $dummyGoroutine; + if (goroutine.exit && !rescheduled) { /* also set by runtime.Goexit() */ + $totalGoroutines--; + goroutine.asleep = true; + } + if (goroutine.asleep && !rescheduled) { + $awakeGoroutines--; + if ($awakeGoroutines === 0 && $totalGoroutines !== 0 && $checkForDeadlock) { + console.error("fatal error: all goroutines are asleep - deadlock!"); + } + } + } + }; + goroutine.asleep = false; + goroutine.exit = false; + goroutine.panicStack = []; + $schedule(goroutine, direct); +}; + +var $scheduled = [], $schedulerLoopActive = false; +var $schedule = function(goroutine, direct) { + if (goroutine.asleep) { + goroutine.asleep = false; + $awakeGoroutines++; + } + + if (direct) { + goroutine(); + return; + } + + $scheduled.push(goroutine); + if (!$schedulerLoopActive) { + $schedulerLoopActive = true; + setTimeout(function() { + while (true) { + var r = $scheduled.shift(); + if (r === undefined) { + $schedulerLoopActive = false; + break; + } + r(); + }; + }, 0); + } +}; + +var $send = function(chan, value) { + if (chan.$closed) { + $throwRuntimeError("send on closed channel"); + } + var queuedRecv = chan.$recvQueue.shift(); + if (queuedRecv !== undefined) { + queuedRecv([value, true]); + return; + } + if (chan.$buffer.length < chan.$capacity) { + chan.$buffer.push(value); + return; + } + + var thisGoroutine = $curGoroutine; + chan.$sendQueue.push(function() { + $schedule(thisGoroutine); + return value; + }); + var blocked = false; + var f = function() { + if (blocked) { + if (chan.$closed) { + $throwRuntimeError("send on closed channel"); + } + return; + }; + blocked = true; + $curGoroutine.asleep = true; + throw null; + }; + f.$blocking = true; + return f; +}; +var $recv = function(chan) { + var queuedSend = chan.$sendQueue.shift(); + if (queuedSend !== undefined) { + chan.$buffer.push(queuedSend()); + } + var bufferedValue = chan.$buffer.shift(); + if (bufferedValue !== undefined) { + return [bufferedValue, true]; + } + if (chan.$closed) { + return [chan.constructor.elem.zero(), false]; + } + + var thisGoroutine = $curGoroutine, value; + var queueEntry = function(v) { + value = v; + $schedule(thisGoroutine); + }; + chan.$recvQueue.push(queueEntry); + var blocked = false; + var f = function() { + if (blocked) { + return value; + }; + blocked = true; + $curGoroutine.asleep = true; + throw null; + }; + f.$blocking = true; + return f; +}; +var $close = function(chan) { + if (chan.$closed) { + $throwRuntimeError("close of closed channel"); + } + chan.$closed = true; + while (true) { + var queuedSend = chan.$sendQueue.shift(); + if (queuedSend === undefined) { + break; + } + queuedSend(); /* will panic because of closed channel */ + } + while (true) { + var queuedRecv = chan.$recvQueue.shift(); + if (queuedRecv === undefined) { + break; + } + queuedRecv([chan.constructor.elem.zero(), false]); + } +}; +var $select = function(comms) { + var ready = []; + var selection = -1; + for (var i = 0; i < comms.length; i++) { + var comm = comms[i]; + var chan = comm[0]; + switch (comm.length) { + case 0: /* default */ + selection = i; + break; + case 1: /* recv */ + if (chan.$sendQueue.length !== 0 || chan.$buffer.length !== 0 || chan.$closed) { + ready.push(i); + } + break; + case 2: /* send */ + if (chan.$closed) { + $throwRuntimeError("send on closed channel"); + } + if (chan.$recvQueue.length !== 0 || chan.$buffer.length < chan.$capacity) { + ready.push(i); + } + break; + } + } + + if (ready.length !== 0) { + selection = ready[Math.floor(Math.random() * ready.length)]; + } + if (selection !== -1) { + var comm = comms[selection]; + switch (comm.length) { + case 0: /* default */ + return [selection]; + case 1: /* recv */ + return [selection, $recv(comm[0])]; + case 2: /* send */ + $send(comm[0], comm[1]); + return [selection]; + } + } + + var entries = []; + var thisGoroutine = $curGoroutine; + var removeFromQueues = function() { + for (var i = 0; i < entries.length; i++) { + var entry = entries[i]; + var queue = entry[0]; + var index = queue.indexOf(entry[1]); + if (index !== -1) { + queue.splice(index, 1); + } + } + }; + for (var i = 0; i < comms.length; i++) { + (function(i) { + var comm = comms[i]; + switch (comm.length) { + case 1: /* recv */ + var queueEntry = function(value) { + selection = [i, value]; + removeFromQueues(); + $schedule(thisGoroutine); + }; + entries.push([comm[0].$recvQueue, queueEntry]); + comm[0].$recvQueue.push(queueEntry); + break; + case 2: /* send */ + var queueEntry = function() { + if (comm[0].$closed) { + $throwRuntimeError("send on closed channel"); + } + selection = [i]; + removeFromQueues(); + $schedule(thisGoroutine); + return comm[1]; + }; + entries.push([comm[0].$sendQueue, queueEntry]); + comm[0].$sendQueue.push(queueEntry); + break; + } + })(i); + } + var blocked = false; + var f = function() { + if (blocked) { + return selection; + }; + blocked = true; + $curGoroutine.asleep = true; + throw null; + }; + f.$blocking = true; + return f; +}; + +var $js; + +var $needsExternalization = function(t) { + switch (t.kind) { + case $kindBool: + case $kindInt: + case $kindInt8: + case $kindInt16: + case $kindInt32: + case $kindUint: + case $kindUint8: + case $kindUint16: + case $kindUint32: + case $kindUintptr: + case $kindFloat32: + case $kindFloat64: + return false; + case $kindInterface: + return t !== $js.Object; + default: + return true; + } +}; + +var $externalize = function(v, t) { + if ($js !== undefined && t === $js.Object) { + return v; + } + switch (t.kind) { + case $kindBool: + case $kindInt: + case $kindInt8: + case $kindInt16: + case $kindInt32: + case $kindUint: + case $kindUint8: + case $kindUint16: + case $kindUint32: + case $kindUintptr: + case $kindFloat32: + case $kindFloat64: + return v; + case $kindInt64: + case $kindUint64: + return $flatten64(v); + case $kindArray: + if ($needsExternalization(t.elem)) { + return $mapArray(v, function(e) { return $externalize(e, t.elem); }); + } + return v; + case $kindFunc: + if (v === $throwNilPointerError) { + return null; + } + if (v.$externalizeWrapper === undefined) { + $checkForDeadlock = false; + var convert = false; + for (var i = 0; i < t.params.length; i++) { + convert = convert || (t.params[i] !== $js.Object); + } + for (var i = 0; i < t.results.length; i++) { + convert = convert || $needsExternalization(t.results[i]); + } + v.$externalizeWrapper = v; + if (convert) { + v.$externalizeWrapper = function() { + var args = []; + for (var i = 0; i < t.params.length; i++) { + if (t.variadic && i === t.params.length - 1) { + var vt = t.params[i].elem, varargs = []; + for (var j = i; j < arguments.length; j++) { + varargs.push($internalize(arguments[j], vt)); + } + args.push(new (t.params[i])(varargs)); + break; + } + args.push($internalize(arguments[i], t.params[i])); + } + var result = v.apply(this, args); + switch (t.results.length) { + case 0: + return; + case 1: + return $externalize(result, t.results[0]); + default: + for (var i = 0; i < t.results.length; i++) { + result[i] = $externalize(result[i], t.results[i]); + } + return result; + } + }; + } + } + return v.$externalizeWrapper; + case $kindInterface: + if (v === $ifaceNil) { + return null; + } + return $externalize(v.$val, v.constructor); + case $kindMap: + var m = {}; + var keys = $keys(v); + for (var i = 0; i < keys.length; i++) { + var entry = v[keys[i]]; + m[$externalize(entry.k, t.key)] = $externalize(entry.v, t.elem); + } + return m; + case $kindPtr: + if (v === t.nil) { + return null; + } + return $externalize(v.$get(), t.elem); + case $kindSlice: + if ($needsExternalization(t.elem)) { + return $mapArray($sliceToArray(v), function(e) { return $externalize(e, t.elem); }); + } + return $sliceToArray(v); + case $kindString: + if (v.search(/^[\x00-\x7F]*$/) !== -1) { + return v; + } + var s = "", r; + for (var i = 0; i < v.length; i += r[1]) { + r = $decodeRune(v, i); + s += String.fromCharCode(r[0]); + } + return s; + case $kindStruct: + var timePkg = $packages["time"]; + if (timePkg && v.constructor === timePkg.Time.ptr) { + var milli = $div64(v.UnixNano(), new $Int64(0, 1000000)); + return new Date($flatten64(milli)); + } + + var searchJsObject = function(v, t) { + if (t === $js.Object) { + return v; + } + if (t.kind === $kindPtr && v !== t.nil) { + var o = searchJsObject(v.$get(), t.elem); + if (o !== undefined) { + return o; + } + } + if (t.kind === $kindStruct) { + for (var i = 0; i < t.fields.length; i++) { + var f = t.fields[i]; + var o = searchJsObject(v[f.prop], f.typ); + if (o !== undefined) { + return o; + } + } + } + return undefined; + }; + var o = searchJsObject(v, t); + if (o !== undefined) { + return o; + } + + o = {}; + for (var i = 0; i < t.fields.length; i++) { + var f = t.fields[i]; + if (f.pkg !== "") { /* not exported */ + continue; + } + o[f.name] = $externalize(v[f.prop], f.typ); + } + return o; + } + $panic(new $String("cannot externalize " + t.string)); +}; + +var $internalize = function(v, t, recv) { + if (t === $js.Object) { + return v; + } + switch (t.kind) { + case $kindBool: + return !!v; + case $kindInt: + return parseInt(v); + case $kindInt8: + return parseInt(v) << 24 >> 24; + case $kindInt16: + return parseInt(v) << 16 >> 16; + case $kindInt32: + return parseInt(v) >> 0; + case $kindUint: + return parseInt(v); + case $kindUint8: + return parseInt(v) << 24 >>> 24; + case $kindUint16: + return parseInt(v) << 16 >>> 16; + case $kindUint32: + case $kindUintptr: + return parseInt(v) >>> 0; + case $kindInt64: + case $kindUint64: + return new t(0, v); + case $kindFloat32: + case $kindFloat64: + return parseFloat(v); + case $kindArray: + if (v.length !== t.len) { + $throwRuntimeError("got array with wrong size from JavaScript native"); + } + return $mapArray(v, function(e) { return $internalize(e, t.elem); }); + case $kindFunc: + return function() { + var args = []; + for (var i = 0; i < t.params.length; i++) { + if (t.variadic && i === t.params.length - 1) { + var vt = t.params[i].elem, varargs = arguments[i]; + for (var j = 0; j < varargs.$length; j++) { + args.push($externalize(varargs.$array[varargs.$offset + j], vt)); + } + break; + } + args.push($externalize(arguments[i], t.params[i])); + } + var result = v.apply(recv, args); + switch (t.results.length) { + case 0: + return; + case 1: + return $internalize(result, t.results[0]); + default: + for (var i = 0; i < t.results.length; i++) { + result[i] = $internalize(result[i], t.results[i]); + } + return result; + } + }; + case $kindInterface: + if (t.methods.length !== 0) { + $panic(new $String("cannot internalize " + t.string)); + } + if (v === null) { + return $ifaceNil; + } + switch (v.constructor) { + case Int8Array: + return new ($sliceType($Int8))(v); + case Int16Array: + return new ($sliceType($Int16))(v); + case Int32Array: + return new ($sliceType($Int))(v); + case Uint8Array: + return new ($sliceType($Uint8))(v); + case Uint16Array: + return new ($sliceType($Uint16))(v); + case Uint32Array: + return new ($sliceType($Uint))(v); + case Float32Array: + return new ($sliceType($Float32))(v); + case Float64Array: + return new ($sliceType($Float64))(v); + case Array: + return $internalize(v, $sliceType($emptyInterface)); + case Boolean: + return new $Bool(!!v); + case Date: + var timePkg = $packages["time"]; + if (timePkg) { + return new timePkg.Time(timePkg.Unix(new $Int64(0, 0), new $Int64(0, v.getTime() * 1000000))); + } + case Function: + var funcType = $funcType([$sliceType($emptyInterface)], [$js.Object], true); + return new funcType($internalize(v, funcType)); + case Number: + return new $Float64(parseFloat(v)); + case String: + return new $String($internalize(v, $String)); + default: + if ($global.Node && v instanceof $global.Node) { + return new $js.container.ptr(v); + } + var mapType = $mapType($String, $emptyInterface); + return new mapType($internalize(v, mapType)); + } + case $kindMap: + var m = new $Map(); + var keys = $keys(v); + for (var i = 0; i < keys.length; i++) { + var key = $internalize(keys[i], t.key); + m[key.$key ? key.$key() : key] = { k: key, v: $internalize(v[keys[i]], t.elem) }; + } + return m; + case $kindPtr: + if (t.elem.kind === $kindStruct) { + return $internalize(v, t.elem); + } + case $kindSlice: + return new t($mapArray(v, function(e) { return $internalize(e, t.elem); })); + case $kindString: + v = String(v); + if (v.search(/^[\x00-\x7F]*$/) !== -1) { + return v; + } + var s = ""; + for (var i = 0; i < v.length; i++) { + s += $encodeRune(v.charCodeAt(i)); + } + return s; + case $kindStruct: + var searchJsObject = function(v, t) { + if (t === $js.Object) { + return v; + } + if (t.kind === $kindPtr && t.elem.kind === $kindStruct) { + var o = searchJsObject(v, t.elem); + if (o !== undefined) { + return o; + } + } + if (t.kind === $kindStruct) { + for (var i = 0; i < t.fields.length; i++) { + var f = t.fields[i]; + var o = searchJsObject(v, f.typ); + if (o !== undefined) { + var n = new t.ptr(); + n[f.prop] = o; + return n; + } + } + } + return undefined; + }; + var o = searchJsObject(v, t); + if (o !== undefined) { + return o; + } + } + $panic(new $String("cannot internalize " + t.string)); +}; + +$packages["github.com/gopherjs/gopherjs/js"] = (function() { + var $pkg = {}, Object, container, Error, sliceType$1, ptrType, ptrType$1, init; + Object = $pkg.Object = $newType(8, $kindInterface, "js.Object", "Object", "github.com/gopherjs/gopherjs/js", null); + container = $pkg.container = $newType(0, $kindStruct, "js.container", "container", "github.com/gopherjs/gopherjs/js", function(Object_) { + this.$val = this; + this.Object = Object_ !== undefined ? Object_ : null; + }); + Error = $pkg.Error = $newType(0, $kindStruct, "js.Error", "Error", "github.com/gopherjs/gopherjs/js", function(Object_) { + this.$val = this; + this.Object = Object_ !== undefined ? Object_ : null; + }); + sliceType$1 = $sliceType($emptyInterface); + ptrType = $ptrType(container); + ptrType$1 = $ptrType(Error); + container.ptr.prototype.Get = function(key) { + var c, key; + c = this; + return c.Object[$externalize(key, $String)]; + }; + container.prototype.Get = function(key) { return this.$val.Get(key); }; + container.ptr.prototype.Set = function(key, value) { + var c, key, value; + c = this; + c.Object[$externalize(key, $String)] = $externalize(value, $emptyInterface); + }; + container.prototype.Set = function(key, value) { return this.$val.Set(key, value); }; + container.ptr.prototype.Delete = function(key) { + var c, key; + c = this; + delete c.Object[$externalize(key, $String)]; + }; + container.prototype.Delete = function(key) { return this.$val.Delete(key); }; + container.ptr.prototype.Length = function() { + var c; + c = this; + return $parseInt(c.Object.length); + }; + container.prototype.Length = function() { return this.$val.Length(); }; + container.ptr.prototype.Index = function(i) { + var c, i; + c = this; + return c.Object[i]; + }; + container.prototype.Index = function(i) { return this.$val.Index(i); }; + container.ptr.prototype.SetIndex = function(i, value) { + var c, i, value; + c = this; + c.Object[i] = $externalize(value, $emptyInterface); + }; + container.prototype.SetIndex = function(i, value) { return this.$val.SetIndex(i, value); }; + container.ptr.prototype.Call = function(name, args) { + var args, c, name, obj; + c = this; + return (obj = c.Object, obj[$externalize(name, $String)].apply(obj, $externalize(args, sliceType$1))); + }; + container.prototype.Call = function(name, args) { return this.$val.Call(name, args); }; + container.ptr.prototype.Invoke = function(args) { + var args, c; + c = this; + return c.Object.apply(undefined, $externalize(args, sliceType$1)); + }; + container.prototype.Invoke = function(args) { return this.$val.Invoke(args); }; + container.ptr.prototype.New = function(args) { + var args, c; + c = this; + return new ($global.Function.prototype.bind.apply(c.Object, [undefined].concat($externalize(args, sliceType$1)))); + }; + container.prototype.New = function(args) { return this.$val.New(args); }; + container.ptr.prototype.Bool = function() { + var c; + c = this; + return !!(c.Object); + }; + container.prototype.Bool = function() { return this.$val.Bool(); }; + container.ptr.prototype.String = function() { + var c; + c = this; + return $internalize(c.Object, $String); + }; + container.prototype.String = function() { return this.$val.String(); }; + container.ptr.prototype.Int = function() { + var c; + c = this; + return $parseInt(c.Object) >> 0; + }; + container.prototype.Int = function() { return this.$val.Int(); }; + container.ptr.prototype.Int64 = function() { + var c; + c = this; + return $internalize(c.Object, $Int64); + }; + container.prototype.Int64 = function() { return this.$val.Int64(); }; + container.ptr.prototype.Uint64 = function() { + var c; + c = this; + return $internalize(c.Object, $Uint64); + }; + container.prototype.Uint64 = function() { return this.$val.Uint64(); }; + container.ptr.prototype.Float = function() { + var c; + c = this; + return $parseFloat(c.Object); + }; + container.prototype.Float = function() { return this.$val.Float(); }; + container.ptr.prototype.Interface = function() { + var c; + c = this; + return $internalize(c.Object, $emptyInterface); + }; + container.prototype.Interface = function() { return this.$val.Interface(); }; + container.ptr.prototype.Unsafe = function() { + var c; + c = this; + return c.Object; + }; + container.prototype.Unsafe = function() { return this.$val.Unsafe(); }; + Error.ptr.prototype.Error = function() { + var err; + err = this; + return "JavaScript error: " + $internalize(err.Object.message, $String); + }; + Error.prototype.Error = function() { return this.$val.Error(); }; + Error.ptr.prototype.Stack = function() { + var err; + err = this; + return $internalize(err.Object.stack, $String); + }; + Error.prototype.Stack = function() { return this.$val.Stack(); }; + init = function() { + var _tmp, _tmp$1, c, e; + c = new container.ptr(null); + e = new Error.ptr(null); + + }; + ptrType.methods = [{prop: "Get", name: "Get", pkg: "", typ: $funcType([$String], [Object], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$String, $emptyInterface], [], false)}, {prop: "Delete", name: "Delete", pkg: "", typ: $funcType([$String], [], false)}, {prop: "Length", name: "Length", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([$Int], [Object], false)}, {prop: "SetIndex", name: "SetIndex", pkg: "", typ: $funcType([$Int, $emptyInterface], [], false)}, {prop: "Call", name: "Call", pkg: "", typ: $funcType([$String, sliceType$1], [Object], true)}, {prop: "Invoke", name: "Invoke", pkg: "", typ: $funcType([sliceType$1], [Object], true)}, {prop: "New", name: "New", pkg: "", typ: $funcType([sliceType$1], [Object], true)}, {prop: "Bool", name: "Bool", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Int", name: "Int", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Int64", name: "Int64", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Uint64", name: "Uint64", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "Float", name: "Float", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Interface", name: "Interface", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Unsafe", name: "Unsafe", pkg: "", typ: $funcType([], [$Uintptr], false)}]; + ptrType$1.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Stack", name: "Stack", pkg: "", typ: $funcType([], [$String], false)}]; + Object.init([{prop: "Bool", name: "Bool", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Call", name: "Call", pkg: "", typ: $funcType([$String, sliceType$1], [Object], true)}, {prop: "Delete", name: "Delete", pkg: "", typ: $funcType([$String], [], false)}, {prop: "Float", name: "Float", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$String], [Object], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([$Int], [Object], false)}, {prop: "Int", name: "Int", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Int64", name: "Int64", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Interface", name: "Interface", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Invoke", name: "Invoke", pkg: "", typ: $funcType([sliceType$1], [Object], true)}, {prop: "Length", name: "Length", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([sliceType$1], [Object], true)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$String, $emptyInterface], [], false)}, {prop: "SetIndex", name: "SetIndex", pkg: "", typ: $funcType([$Int, $emptyInterface], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Uint64", name: "Uint64", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "Unsafe", name: "Unsafe", pkg: "", typ: $funcType([], [$Uintptr], false)}]); + container.init([{prop: "Object", name: "", pkg: "", typ: Object, tag: ""}]); + Error.init([{prop: "Object", name: "", pkg: "", typ: Object, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_js = function() { while (true) { switch ($s) { case 0: + init(); + /* */ } return; } }; $init_js.$blocking = true; return $init_js; + }; + return $pkg; +})(); +$packages["runtime"] = (function() { + var $pkg = {}, js, NotSupportedError, TypeAssertionError, errorString, ptrType$5, ptrType$6, init, GOROOT, SetFinalizer; + js = $packages["github.com/gopherjs/gopherjs/js"]; + NotSupportedError = $pkg.NotSupportedError = $newType(0, $kindStruct, "runtime.NotSupportedError", "NotSupportedError", "runtime", function(Feature_) { + this.$val = this; + this.Feature = Feature_ !== undefined ? Feature_ : ""; + }); + TypeAssertionError = $pkg.TypeAssertionError = $newType(0, $kindStruct, "runtime.TypeAssertionError", "TypeAssertionError", "runtime", function(interfaceString_, concreteString_, assertedString_, missingMethod_) { + this.$val = this; + this.interfaceString = interfaceString_ !== undefined ? interfaceString_ : ""; + this.concreteString = concreteString_ !== undefined ? concreteString_ : ""; + this.assertedString = assertedString_ !== undefined ? assertedString_ : ""; + this.missingMethod = missingMethod_ !== undefined ? missingMethod_ : ""; + }); + errorString = $pkg.errorString = $newType(8, $kindString, "runtime.errorString", "errorString", "runtime", null); + ptrType$5 = $ptrType(NotSupportedError); + ptrType$6 = $ptrType(TypeAssertionError); + NotSupportedError.ptr.prototype.Error = function() { + var err; + err = this; + return "not supported by GopherJS: " + err.Feature; + }; + NotSupportedError.prototype.Error = function() { return this.$val.Error(); }; + init = function() { + var e; + $js = $packages[$externalize("github.com/gopherjs/gopherjs/js", $String)]; + $throwRuntimeError = (function(msg) { + var msg; + $panic(new errorString(msg)); + }); + e = $ifaceNil; + e = new TypeAssertionError.ptr("", "", "", ""); + e = new NotSupportedError.ptr(""); + }; + GOROOT = $pkg.GOROOT = function() { + var goroot, process; + process = $global.process; + if (process === undefined) { + return "/"; + } + goroot = process.env.GOROOT; + if (!(goroot === undefined)) { + return $internalize(goroot, $String); + } + return "/usr/local/go"; + }; + SetFinalizer = $pkg.SetFinalizer = function(x, f) { + var f, x; + }; + TypeAssertionError.ptr.prototype.RuntimeError = function() { + }; + TypeAssertionError.prototype.RuntimeError = function() { return this.$val.RuntimeError(); }; + TypeAssertionError.ptr.prototype.Error = function() { + var e, inter; + e = this; + inter = e.interfaceString; + if (inter === "") { + inter = "interface"; + } + if (e.concreteString === "") { + return "interface conversion: " + inter + " is nil, not " + e.assertedString; + } + if (e.missingMethod === "") { + return "interface conversion: " + inter + " is " + e.concreteString + ", not " + e.assertedString; + } + return "interface conversion: " + e.concreteString + " is not " + e.assertedString + ": missing method " + e.missingMethod; + }; + TypeAssertionError.prototype.Error = function() { return this.$val.Error(); }; + errorString.prototype.RuntimeError = function() { + var e; + e = this.$val; + }; + $ptrType(errorString).prototype.RuntimeError = function() { return new errorString(this.$get()).RuntimeError(); }; + errorString.prototype.Error = function() { + var e; + e = this.$val; + return "runtime error: " + e; + }; + $ptrType(errorString).prototype.Error = function() { return new errorString(this.$get()).Error(); }; + ptrType$5.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$6.methods = [{prop: "RuntimeError", name: "RuntimeError", pkg: "", typ: $funcType([], [], false)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + errorString.methods = [{prop: "RuntimeError", name: "RuntimeError", pkg: "", typ: $funcType([], [], false)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + NotSupportedError.init([{prop: "Feature", name: "Feature", pkg: "", typ: $String, tag: ""}]); + TypeAssertionError.init([{prop: "interfaceString", name: "interfaceString", pkg: "runtime", typ: $String, tag: ""}, {prop: "concreteString", name: "concreteString", pkg: "runtime", typ: $String, tag: ""}, {prop: "assertedString", name: "assertedString", pkg: "runtime", typ: $String, tag: ""}, {prop: "missingMethod", name: "missingMethod", pkg: "runtime", typ: $String, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_runtime = function() { while (true) { switch ($s) { case 0: + $r = js.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + init(); + /* */ } return; } }; $init_runtime.$blocking = true; return $init_runtime; + }; + return $pkg; +})(); +$packages["errors"] = (function() { + var $pkg = {}, errorString, ptrType, New; + errorString = $pkg.errorString = $newType(0, $kindStruct, "errors.errorString", "errorString", "errors", function(s_) { + this.$val = this; + this.s = s_ !== undefined ? s_ : ""; + }); + ptrType = $ptrType(errorString); + New = $pkg.New = function(text) { + var text; + return new errorString.ptr(text); + }; + errorString.ptr.prototype.Error = function() { + var e; + e = this; + return e.s; + }; + errorString.prototype.Error = function() { return this.$val.Error(); }; + ptrType.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + errorString.init([{prop: "s", name: "s", pkg: "errors", typ: $String, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_errors = function() { while (true) { switch ($s) { case 0: + /* */ } return; } }; $init_errors.$blocking = true; return $init_errors; + }; + return $pkg; +})(); +$packages["sync/atomic"] = (function() { + var $pkg = {}, js, CompareAndSwapInt32, AddInt32, LoadUint32, StoreInt32, StoreUint32; + js = $packages["github.com/gopherjs/gopherjs/js"]; + CompareAndSwapInt32 = $pkg.CompareAndSwapInt32 = function(addr, old, new$1) { + var addr, new$1, old; + if (addr.$get() === old) { + addr.$set(new$1); + return true; + } + return false; + }; + AddInt32 = $pkg.AddInt32 = function(addr, delta) { + var addr, delta, new$1; + new$1 = addr.$get() + delta >> 0; + addr.$set(new$1); + return new$1; + }; + LoadUint32 = $pkg.LoadUint32 = function(addr) { + var addr; + return addr.$get(); + }; + StoreInt32 = $pkg.StoreInt32 = function(addr, val) { + var addr, val; + addr.$set(val); + }; + StoreUint32 = $pkg.StoreUint32 = function(addr, val) { + var addr, val; + addr.$set(val); + }; + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_atomic = function() { while (true) { switch ($s) { case 0: + $r = js.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + /* */ } return; } }; $init_atomic.$blocking = true; return $init_atomic; + }; + return $pkg; +})(); +$packages["sync"] = (function() { + var $pkg = {}, runtime, atomic, Pool, Mutex, Locker, Once, poolLocal, syncSema, RWMutex, rlocker, ptrType, sliceType, structType, chanType, sliceType$1, ptrType$2, ptrType$3, ptrType$5, sliceType$3, ptrType$7, ptrType$8, funcType, ptrType$10, funcType$1, ptrType$11, arrayType, semWaiters, allPools, runtime_registerPoolCleanup, runtime_Semacquire, runtime_Semrelease, runtime_Syncsemcheck, poolCleanup, init, indexLocal, raceEnable, init$1; + runtime = $packages["runtime"]; + atomic = $packages["sync/atomic"]; + Pool = $pkg.Pool = $newType(0, $kindStruct, "sync.Pool", "Pool", "sync", function(local_, localSize_, store_, New_) { + this.$val = this; + this.local = local_ !== undefined ? local_ : 0; + this.localSize = localSize_ !== undefined ? localSize_ : 0; + this.store = store_ !== undefined ? store_ : sliceType$3.nil; + this.New = New_ !== undefined ? New_ : $throwNilPointerError; + }); + Mutex = $pkg.Mutex = $newType(0, $kindStruct, "sync.Mutex", "Mutex", "sync", function(state_, sema_) { + this.$val = this; + this.state = state_ !== undefined ? state_ : 0; + this.sema = sema_ !== undefined ? sema_ : 0; + }); + Locker = $pkg.Locker = $newType(8, $kindInterface, "sync.Locker", "Locker", "sync", null); + Once = $pkg.Once = $newType(0, $kindStruct, "sync.Once", "Once", "sync", function(m_, done_) { + this.$val = this; + this.m = m_ !== undefined ? m_ : new Mutex.ptr(); + this.done = done_ !== undefined ? done_ : 0; + }); + poolLocal = $pkg.poolLocal = $newType(0, $kindStruct, "sync.poolLocal", "poolLocal", "sync", function(private$0_, shared_, Mutex_, pad_) { + this.$val = this; + this.private$0 = private$0_ !== undefined ? private$0_ : $ifaceNil; + this.shared = shared_ !== undefined ? shared_ : sliceType$3.nil; + this.Mutex = Mutex_ !== undefined ? Mutex_ : new Mutex.ptr(); + this.pad = pad_ !== undefined ? pad_ : arrayType.zero(); + }); + syncSema = $pkg.syncSema = $newType(0, $kindStruct, "sync.syncSema", "syncSema", "sync", function(lock_, head_, tail_) { + this.$val = this; + this.lock = lock_ !== undefined ? lock_ : 0; + this.head = head_ !== undefined ? head_ : 0; + this.tail = tail_ !== undefined ? tail_ : 0; + }); + RWMutex = $pkg.RWMutex = $newType(0, $kindStruct, "sync.RWMutex", "RWMutex", "sync", function(w_, writerSem_, readerSem_, readerCount_, readerWait_) { + this.$val = this; + this.w = w_ !== undefined ? w_ : new Mutex.ptr(); + this.writerSem = writerSem_ !== undefined ? writerSem_ : 0; + this.readerSem = readerSem_ !== undefined ? readerSem_ : 0; + this.readerCount = readerCount_ !== undefined ? readerCount_ : 0; + this.readerWait = readerWait_ !== undefined ? readerWait_ : 0; + }); + rlocker = $pkg.rlocker = $newType(0, $kindStruct, "sync.rlocker", "rlocker", "sync", function(w_, writerSem_, readerSem_, readerCount_, readerWait_) { + this.$val = this; + this.w = w_ !== undefined ? w_ : new Mutex.ptr(); + this.writerSem = writerSem_ !== undefined ? writerSem_ : 0; + this.readerSem = readerSem_ !== undefined ? readerSem_ : 0; + this.readerCount = readerCount_ !== undefined ? readerCount_ : 0; + this.readerWait = readerWait_ !== undefined ? readerWait_ : 0; + }); + ptrType = $ptrType(Pool); + sliceType = $sliceType(ptrType); + structType = $structType([]); + chanType = $chanType(structType, false, false); + sliceType$1 = $sliceType(chanType); + ptrType$2 = $ptrType($Uint32); + ptrType$3 = $ptrType($Int32); + ptrType$5 = $ptrType(poolLocal); + sliceType$3 = $sliceType($emptyInterface); + ptrType$7 = $ptrType(rlocker); + ptrType$8 = $ptrType(RWMutex); + funcType = $funcType([], [$emptyInterface], false); + ptrType$10 = $ptrType(Mutex); + funcType$1 = $funcType([], [], false); + ptrType$11 = $ptrType(Once); + arrayType = $arrayType($Uint8, 128); + Pool.ptr.prototype.Get = function() { + var p, x, x$1, x$2; + p = this; + if (p.store.$length === 0) { + if (!(p.New === $throwNilPointerError)) { + return p.New(); + } + return $ifaceNil; + } + x$2 = (x = p.store, x$1 = p.store.$length - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])); + p.store = $subslice(p.store, 0, (p.store.$length - 1 >> 0)); + return x$2; + }; + Pool.prototype.Get = function() { return this.$val.Get(); }; + Pool.ptr.prototype.Put = function(x) { + var p, x; + p = this; + if ($interfaceIsEqual(x, $ifaceNil)) { + return; + } + p.store = $append(p.store, x); + }; + Pool.prototype.Put = function(x) { return this.$val.Put(x); }; + runtime_registerPoolCleanup = function(cleanup) { + var cleanup; + }; + runtime_Semacquire = function(s, $b) { + var $args = arguments, $r, $s = 0, $this = this, _entry, _key, _r, ch; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_runtime_Semacquire = function() { s: while (true) { switch ($s) { case 0: + /* if (s.$get() === 0) { */ if (s.$get() === 0) {} else { $s = 1; continue; } + ch = new chanType(0); + _key = s; (semWaiters || $throwRuntimeError("assignment to entry in nil map"))[_key.$key()] = { k: _key, v: $append((_entry = semWaiters[s.$key()], _entry !== undefined ? _entry.v : sliceType$1.nil), ch) }; + _r = $recv(ch, $BLOCKING); /* */ $s = 2; case 2: if (_r && _r.$blocking) { _r = _r(); } + _r[0]; + /* } */ case 1: + s.$set(s.$get() - (1) >>> 0); + /* */ case -1: } return; } }; $blocking_runtime_Semacquire.$blocking = true; return $blocking_runtime_Semacquire; + }; + runtime_Semrelease = function(s, $b) { + var $args = arguments, $r, $s = 0, $this = this, _entry, _key, ch, w; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_runtime_Semrelease = function() { s: while (true) { switch ($s) { case 0: + s.$set(s.$get() + (1) >>> 0); + w = (_entry = semWaiters[s.$key()], _entry !== undefined ? _entry.v : sliceType$1.nil); + if (w.$length === 0) { + return; + } + ch = ((0 < 0 || 0 >= w.$length) ? $throwRuntimeError("index out of range") : w.$array[w.$offset + 0]); + w = $subslice(w, 1); + _key = s; (semWaiters || $throwRuntimeError("assignment to entry in nil map"))[_key.$key()] = { k: _key, v: w }; + if (w.$length === 0) { + delete semWaiters[s.$key()]; + } + $r = $send(ch, new structType.ptr(), $BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + /* */ case -1: } return; } }; $blocking_runtime_Semrelease.$blocking = true; return $blocking_runtime_Semrelease; + }; + runtime_Syncsemcheck = function(size) { + var size; + }; + Mutex.ptr.prototype.Lock = function($b) { + var $args = arguments, $r, $s = 0, $this = this, awoke, m, new$1, old; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Lock = function() { s: while (true) { switch ($s) { case 0: + m = $this; + if (atomic.CompareAndSwapInt32(new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m), 0, 1)) { + return; + } + awoke = false; + /* while (true) { */ case 1: + /* if (!(true)) { break; } */ if(!(true)) { $s = 2; continue; } + old = m.state; + new$1 = old | 1; + if (!(((old & 1) === 0))) { + new$1 = old + 4 >> 0; + } + if (awoke) { + new$1 = new$1 & ~(2); + } + /* if (atomic.CompareAndSwapInt32(new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m), old, new$1)) { */ if (atomic.CompareAndSwapInt32(new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m), old, new$1)) {} else { $s = 3; continue; } + if ((old & 1) === 0) { + /* break; */ $s = 2; continue; + } + $r = runtime_Semacquire(new ptrType$2(function() { return this.$target.sema; }, function($v) { this.$target.sema = $v; }, m), $BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + awoke = true; + /* } */ case 3: + /* } */ $s = 1; continue; case 2: + /* */ case -1: } return; } }; $blocking_Lock.$blocking = true; return $blocking_Lock; + }; + Mutex.prototype.Lock = function($b) { return this.$val.Lock($b); }; + Mutex.ptr.prototype.Unlock = function($b) { + var $args = arguments, $r, $s = 0, $this = this, m, new$1, old; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Unlock = function() { s: while (true) { switch ($s) { case 0: + m = $this; + new$1 = atomic.AddInt32(new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m), -1); + if ((((new$1 + 1 >> 0)) & 1) === 0) { + $panic(new $String("sync: unlock of unlocked mutex")); + } + old = new$1; + /* while (true) { */ case 1: + /* if (!(true)) { break; } */ if(!(true)) { $s = 2; continue; } + if (((old >> 2 >> 0) === 0) || !(((old & 3) === 0))) { + return; + } + new$1 = ((old - 4 >> 0)) | 2; + /* if (atomic.CompareAndSwapInt32(new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m), old, new$1)) { */ if (atomic.CompareAndSwapInt32(new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m), old, new$1)) {} else { $s = 3; continue; } + $r = runtime_Semrelease(new ptrType$2(function() { return this.$target.sema; }, function($v) { this.$target.sema = $v; }, m), $BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + return; + /* } */ case 3: + old = m.state; + /* } */ $s = 1; continue; case 2: + /* */ case -1: } return; } }; $blocking_Unlock.$blocking = true; return $blocking_Unlock; + }; + Mutex.prototype.Unlock = function($b) { return this.$val.Unlock($b); }; + Once.ptr.prototype.Do = function(f, $b) { + var $args = arguments, $deferred = [], $err = null, $r, $s = 0, $this = this, o; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Do = function() { try { $deferFrames.push($deferred); s: while (true) { switch ($s) { case 0: + o = $this; + if (atomic.LoadUint32(new ptrType$2(function() { return this.$target.done; }, function($v) { this.$target.done = $v; }, o)) === 1) { + return; + } + $r = o.m.Lock($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $deferred.push([$methodVal(o.m, "Unlock"), [$BLOCKING]]); + if (o.done === 0) { + $deferred.push([atomic.StoreUint32, [new ptrType$2(function() { return this.$target.done; }, function($v) { this.$target.done = $v; }, o), 1, $BLOCKING]]); + f(); + } + /* */ case -1: } return; } } catch(err) { $err = err; } finally { $deferFrames.pop(); if ($curGoroutine.asleep && !$jumpToDefer) { throw null; } $s = -1; $callDeferred($deferred, $err); } }; $blocking_Do.$blocking = true; return $blocking_Do; + }; + Once.prototype.Do = function(f, $b) { return this.$val.Do(f, $b); }; + poolCleanup = function() { + var _i, _i$1, _ref, _ref$1, i, i$1, j, l, p, x; + _ref = allPools; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + p = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + (i < 0 || i >= allPools.$length) ? $throwRuntimeError("index out of range") : allPools.$array[allPools.$offset + i] = ptrType.nil; + i$1 = 0; + while (true) { + if (!(i$1 < (p.localSize >> 0))) { break; } + l = indexLocal(p.local, i$1); + l.private$0 = $ifaceNil; + _ref$1 = l.shared; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + j = _i$1; + (x = l.shared, (j < 0 || j >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + j] = $ifaceNil); + _i$1++; + } + l.shared = sliceType$3.nil; + i$1 = i$1 + (1) >> 0; + } + p.local = 0; + p.localSize = 0; + _i++; + } + allPools = new sliceType([]); + }; + init = function() { + runtime_registerPoolCleanup(poolCleanup); + }; + indexLocal = function(l, i) { + var i, l, x; + return (x = l, (x.nilCheck, ((i < 0 || i >= x.length) ? $throwRuntimeError("index out of range") : x[i]))); + }; + raceEnable = function() { + }; + init$1 = function() { + var s; + s = $clone(new syncSema.ptr(), syncSema); + runtime_Syncsemcheck(12); + }; + RWMutex.ptr.prototype.RLock = function($b) { + var $args = arguments, $r, $s = 0, $this = this, rw; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_RLock = function() { s: while (true) { switch ($s) { case 0: + rw = $this; + /* if (atomic.AddInt32(new ptrType$3(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw), 1) < 0) { */ if (atomic.AddInt32(new ptrType$3(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw), 1) < 0) {} else { $s = 1; continue; } + $r = runtime_Semacquire(new ptrType$2(function() { return this.$target.readerSem; }, function($v) { this.$target.readerSem = $v; }, rw), $BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + /* } */ case 1: + /* */ case -1: } return; } }; $blocking_RLock.$blocking = true; return $blocking_RLock; + }; + RWMutex.prototype.RLock = function($b) { return this.$val.RLock($b); }; + RWMutex.ptr.prototype.RUnlock = function($b) { + var $args = arguments, $r, $s = 0, $this = this, r, rw; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_RUnlock = function() { s: while (true) { switch ($s) { case 0: + rw = $this; + r = atomic.AddInt32(new ptrType$3(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw), -1); + /* if (r < 0) { */ if (r < 0) {} else { $s = 1; continue; } + if (((r + 1 >> 0) === 0) || ((r + 1 >> 0) === -1073741824)) { + raceEnable(); + $panic(new $String("sync: RUnlock of unlocked RWMutex")); + } + /* if (atomic.AddInt32(new ptrType$3(function() { return this.$target.readerWait; }, function($v) { this.$target.readerWait = $v; }, rw), -1) === 0) { */ if (atomic.AddInt32(new ptrType$3(function() { return this.$target.readerWait; }, function($v) { this.$target.readerWait = $v; }, rw), -1) === 0) {} else { $s = 2; continue; } + $r = runtime_Semrelease(new ptrType$2(function() { return this.$target.writerSem; }, function($v) { this.$target.writerSem = $v; }, rw), $BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + /* } */ case 2: + /* } */ case 1: + /* */ case -1: } return; } }; $blocking_RUnlock.$blocking = true; return $blocking_RUnlock; + }; + RWMutex.prototype.RUnlock = function($b) { return this.$val.RUnlock($b); }; + RWMutex.ptr.prototype.Lock = function($b) { + var $args = arguments, $r, $s = 0, $this = this, r, rw; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Lock = function() { s: while (true) { switch ($s) { case 0: + rw = $this; + $r = rw.w.Lock($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + r = atomic.AddInt32(new ptrType$3(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw), -1073741824) + 1073741824 >> 0; + /* if (!((r === 0)) && !((atomic.AddInt32(new ptrType$3(function() { return this.$target.readerWait; }, function($v) { this.$target.readerWait = $v; }, rw), r) === 0))) { */ if (!((r === 0)) && !((atomic.AddInt32(new ptrType$3(function() { return this.$target.readerWait; }, function($v) { this.$target.readerWait = $v; }, rw), r) === 0))) {} else { $s = 2; continue; } + $r = runtime_Semacquire(new ptrType$2(function() { return this.$target.writerSem; }, function($v) { this.$target.writerSem = $v; }, rw), $BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + /* } */ case 2: + /* */ case -1: } return; } }; $blocking_Lock.$blocking = true; return $blocking_Lock; + }; + RWMutex.prototype.Lock = function($b) { return this.$val.Lock($b); }; + RWMutex.ptr.prototype.Unlock = function($b) { + var $args = arguments, $r, $s = 0, $this = this, i, r, rw; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Unlock = function() { s: while (true) { switch ($s) { case 0: + rw = $this; + r = atomic.AddInt32(new ptrType$3(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw), 1073741824); + if (r >= 1073741824) { + raceEnable(); + $panic(new $String("sync: Unlock of unlocked RWMutex")); + } + i = 0; + /* while (true) { */ case 1: + /* if (!(i < (r >> 0))) { break; } */ if(!(i < (r >> 0))) { $s = 2; continue; } + $r = runtime_Semrelease(new ptrType$2(function() { return this.$target.readerSem; }, function($v) { this.$target.readerSem = $v; }, rw), $BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + i = i + (1) >> 0; + /* } */ $s = 1; continue; case 2: + $r = rw.w.Unlock($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + /* */ case -1: } return; } }; $blocking_Unlock.$blocking = true; return $blocking_Unlock; + }; + RWMutex.prototype.Unlock = function($b) { return this.$val.Unlock($b); }; + RWMutex.ptr.prototype.RLocker = function() { + var rw; + rw = this; + return $pointerOfStructConversion(rw, ptrType$7); + }; + RWMutex.prototype.RLocker = function() { return this.$val.RLocker(); }; + rlocker.ptr.prototype.Lock = function($b) { + var $args = arguments, $r, $s = 0, $this = this, r; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Lock = function() { s: while (true) { switch ($s) { case 0: + r = $this; + $r = $pointerOfStructConversion(r, ptrType$8).RLock($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + /* */ case -1: } return; } }; $blocking_Lock.$blocking = true; return $blocking_Lock; + }; + rlocker.prototype.Lock = function($b) { return this.$val.Lock($b); }; + rlocker.ptr.prototype.Unlock = function($b) { + var $args = arguments, $r, $s = 0, $this = this, r; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Unlock = function() { s: while (true) { switch ($s) { case 0: + r = $this; + $r = $pointerOfStructConversion(r, ptrType$8).RUnlock($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + /* */ case -1: } return; } }; $blocking_Unlock.$blocking = true; return $blocking_Unlock; + }; + rlocker.prototype.Unlock = function($b) { return this.$val.Unlock($b); }; + ptrType.methods = [{prop: "Get", name: "Get", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Put", name: "Put", pkg: "", typ: $funcType([$emptyInterface], [], false)}, {prop: "getSlow", name: "getSlow", pkg: "sync", typ: $funcType([], [$emptyInterface], false)}, {prop: "pin", name: "pin", pkg: "sync", typ: $funcType([], [ptrType$5], false)}, {prop: "pinSlow", name: "pinSlow", pkg: "sync", typ: $funcType([], [ptrType$5], false)}]; + ptrType$10.methods = [{prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}]; + ptrType$11.methods = [{prop: "Do", name: "Do", pkg: "", typ: $funcType([funcType$1], [], false)}]; + ptrType$8.methods = [{prop: "RLock", name: "RLock", pkg: "", typ: $funcType([], [], false)}, {prop: "RUnlock", name: "RUnlock", pkg: "", typ: $funcType([], [], false)}, {prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}, {prop: "RLocker", name: "RLocker", pkg: "", typ: $funcType([], [Locker], false)}]; + ptrType$7.methods = [{prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}]; + Pool.init([{prop: "local", name: "local", pkg: "sync", typ: $UnsafePointer, tag: ""}, {prop: "localSize", name: "localSize", pkg: "sync", typ: $Uintptr, tag: ""}, {prop: "store", name: "store", pkg: "sync", typ: sliceType$3, tag: ""}, {prop: "New", name: "New", pkg: "", typ: funcType, tag: ""}]); + Mutex.init([{prop: "state", name: "state", pkg: "sync", typ: $Int32, tag: ""}, {prop: "sema", name: "sema", pkg: "sync", typ: $Uint32, tag: ""}]); + Locker.init([{prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}]); + Once.init([{prop: "m", name: "m", pkg: "sync", typ: Mutex, tag: ""}, {prop: "done", name: "done", pkg: "sync", typ: $Uint32, tag: ""}]); + poolLocal.init([{prop: "private$0", name: "private", pkg: "sync", typ: $emptyInterface, tag: ""}, {prop: "shared", name: "shared", pkg: "sync", typ: sliceType$3, tag: ""}, {prop: "Mutex", name: "", pkg: "", typ: Mutex, tag: ""}, {prop: "pad", name: "pad", pkg: "sync", typ: arrayType, tag: ""}]); + syncSema.init([{prop: "lock", name: "lock", pkg: "sync", typ: $Uintptr, tag: ""}, {prop: "head", name: "head", pkg: "sync", typ: $UnsafePointer, tag: ""}, {prop: "tail", name: "tail", pkg: "sync", typ: $UnsafePointer, tag: ""}]); + RWMutex.init([{prop: "w", name: "w", pkg: "sync", typ: Mutex, tag: ""}, {prop: "writerSem", name: "writerSem", pkg: "sync", typ: $Uint32, tag: ""}, {prop: "readerSem", name: "readerSem", pkg: "sync", typ: $Uint32, tag: ""}, {prop: "readerCount", name: "readerCount", pkg: "sync", typ: $Int32, tag: ""}, {prop: "readerWait", name: "readerWait", pkg: "sync", typ: $Int32, tag: ""}]); + rlocker.init([{prop: "w", name: "w", pkg: "sync", typ: Mutex, tag: ""}, {prop: "writerSem", name: "writerSem", pkg: "sync", typ: $Uint32, tag: ""}, {prop: "readerSem", name: "readerSem", pkg: "sync", typ: $Uint32, tag: ""}, {prop: "readerCount", name: "readerCount", pkg: "sync", typ: $Int32, tag: ""}, {prop: "readerWait", name: "readerWait", pkg: "sync", typ: $Int32, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_sync = function() { while (true) { switch ($s) { case 0: + $r = runtime.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = atomic.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + allPools = sliceType.nil; + semWaiters = new $Map(); + init(); + init$1(); + /* */ } return; } }; $init_sync.$blocking = true; return $init_sync; + }; + return $pkg; +})(); +$packages["io"] = (function() { + var $pkg = {}, errors, runtime, sync, RuneReader, errWhence, errOffset; + errors = $packages["errors"]; + runtime = $packages["runtime"]; + sync = $packages["sync"]; + RuneReader = $pkg.RuneReader = $newType(8, $kindInterface, "io.RuneReader", "RuneReader", "io", null); + RuneReader.init([{prop: "ReadRune", name: "ReadRune", pkg: "", typ: $funcType([], [$Int32, $Int, $error], false)}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_io = function() { while (true) { switch ($s) { case 0: + $r = errors.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = runtime.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = sync.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $pkg.ErrShortWrite = errors.New("short write"); + $pkg.ErrShortBuffer = errors.New("short buffer"); + $pkg.EOF = errors.New("EOF"); + $pkg.ErrUnexpectedEOF = errors.New("unexpected EOF"); + $pkg.ErrNoProgress = errors.New("multiple Read calls return no data or error"); + errWhence = errors.New("Seek: invalid whence"); + errOffset = errors.New("Seek: invalid offset"); + $pkg.ErrClosedPipe = errors.New("io: read/write on closed pipe"); + /* */ } return; } }; $init_io.$blocking = true; return $init_io; + }; + return $pkg; +})(); +$packages["math"] = (function() { + var $pkg = {}, js, arrayType, math, zero, posInf, negInf, nan, pow10tab, init, IsInf, Ldexp, Float32bits, Float32frombits, Float64bits, init$1; + js = $packages["github.com/gopherjs/gopherjs/js"]; + arrayType = $arrayType($Float64, 70); + init = function() { + Float32bits(0); + Float32frombits(0); + }; + IsInf = $pkg.IsInf = function(f, sign) { + var f, sign; + if (f === posInf) { + return sign >= 0; + } + if (f === negInf) { + return sign <= 0; + } + return false; + }; + Ldexp = $pkg.Ldexp = function(frac, exp$1) { + var exp$1, frac; + if (frac === 0) { + return frac; + } + if (exp$1 >= 1024) { + return frac * $parseFloat(math.pow(2, 1023)) * $parseFloat(math.pow(2, exp$1 - 1023 >> 0)); + } + if (exp$1 <= -1024) { + return frac * $parseFloat(math.pow(2, -1023)) * $parseFloat(math.pow(2, exp$1 + 1023 >> 0)); + } + return frac * $parseFloat(math.pow(2, exp$1)); + }; + Float32bits = $pkg.Float32bits = function(f) { + var e, f, r, s; + if (f === 0) { + if (1 / f === negInf) { + return 2147483648; + } + return 0; + } + if (!(f === f)) { + return 2143289344; + } + s = 0; + if (f < 0) { + s = 2147483648; + f = -f; + } + e = 150; + while (true) { + if (!(f >= 1.6777216e+07)) { break; } + f = f / (2); + e = e + (1) >>> 0; + if (e === 255) { + if (f >= 8.388608e+06) { + f = posInf; + } + break; + } + } + while (true) { + if (!(f < 8.388608e+06)) { break; } + e = e - (1) >>> 0; + if (e === 0) { + break; + } + f = f * (2); + } + r = $parseFloat($mod(f, 2)); + if ((r > 0.5 && r < 1) || r >= 1.5) { + f = f + (1); + } + return (((s | (e << 23 >>> 0)) >>> 0) | (((f >> 0) & ~8388608))) >>> 0; + }; + Float32frombits = $pkg.Float32frombits = function(b) { + var b, e, m, s; + s = 1; + if (!((((b & 2147483648) >>> 0) === 0))) { + s = -1; + } + e = (((b >>> 23 >>> 0)) & 255) >>> 0; + m = (b & 8388607) >>> 0; + if (e === 255) { + if (m === 0) { + return s / 0; + } + return nan; + } + if (!((e === 0))) { + m = m + (8388608) >>> 0; + } + if (e === 0) { + e = 1; + } + return Ldexp(m, ((e >> 0) - 127 >> 0) - 23 >> 0) * s; + }; + Float64bits = $pkg.Float64bits = function(f) { + var e, f, s, x, x$1, x$2, x$3; + if (f === 0) { + if (1 / f === negInf) { + return new $Uint64(2147483648, 0); + } + return new $Uint64(0, 0); + } + if (!((f === f))) { + return new $Uint64(2146959360, 1); + } + s = new $Uint64(0, 0); + if (f < 0) { + s = new $Uint64(2147483648, 0); + f = -f; + } + e = 1075; + while (true) { + if (!(f >= 9.007199254740992e+15)) { break; } + f = f / (2); + e = e + (1) >>> 0; + if (e === 2047) { + break; + } + } + while (true) { + if (!(f < 4.503599627370496e+15)) { break; } + e = e - (1) >>> 0; + if (e === 0) { + break; + } + f = f * (2); + } + return (x = (x$1 = $shiftLeft64(new $Uint64(0, e), 52), new $Uint64(s.$high | x$1.$high, (s.$low | x$1.$low) >>> 0)), x$2 = (x$3 = new $Uint64(0, f), new $Uint64(x$3.$high &~ 1048576, (x$3.$low &~ 0) >>> 0)), new $Uint64(x.$high | x$2.$high, (x.$low | x$2.$low) >>> 0)); + }; + init$1 = function() { + var _q, i, m, x; + pow10tab[0] = 1; + pow10tab[1] = 10; + i = 2; + while (true) { + if (!(i < 70)) { break; } + m = (_q = i / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + (i < 0 || i >= pow10tab.length) ? $throwRuntimeError("index out of range") : pow10tab[i] = ((m < 0 || m >= pow10tab.length) ? $throwRuntimeError("index out of range") : pow10tab[m]) * (x = i - m >> 0, ((x < 0 || x >= pow10tab.length) ? $throwRuntimeError("index out of range") : pow10tab[x])); + i = i + (1) >> 0; + } + }; + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_math = function() { while (true) { switch ($s) { case 0: + $r = js.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + pow10tab = arrayType.zero(); + math = $global.Math; + zero = 0; + posInf = 1 / zero; + negInf = -1 / zero; + nan = 0 / zero; + init(); + init$1(); + /* */ } return; } }; $init_math.$blocking = true; return $init_math; + }; + return $pkg; +})(); +$packages["unicode"] = (function() { + var $pkg = {}; + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_unicode = function() { while (true) { switch ($s) { case 0: + /* */ } return; } }; $init_unicode.$blocking = true; return $init_unicode; + }; + return $pkg; +})(); +$packages["unicode/utf8"] = (function() { + var $pkg = {}, decodeRuneInternal, decodeRuneInStringInternal, DecodeRune, DecodeRuneInString, RuneLen, EncodeRune, RuneCount, RuneCountInString; + decodeRuneInternal = function(p) { + var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$44, _tmp$45, _tmp$46, _tmp$47, _tmp$48, _tmp$49, _tmp$5, _tmp$50, _tmp$6, _tmp$7, _tmp$8, _tmp$9, c0, c1, c2, c3, n, p, r = 0, short$1 = false, size = 0; + n = p.$length; + if (n < 1) { + _tmp = 65533; _tmp$1 = 0; _tmp$2 = true; r = _tmp; size = _tmp$1; short$1 = _tmp$2; + return [r, size, short$1]; + } + c0 = ((0 < 0 || 0 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 0]); + if (c0 < 128) { + _tmp$3 = (c0 >> 0); _tmp$4 = 1; _tmp$5 = false; r = _tmp$3; size = _tmp$4; short$1 = _tmp$5; + return [r, size, short$1]; + } + if (c0 < 192) { + _tmp$6 = 65533; _tmp$7 = 1; _tmp$8 = false; r = _tmp$6; size = _tmp$7; short$1 = _tmp$8; + return [r, size, short$1]; + } + if (n < 2) { + _tmp$9 = 65533; _tmp$10 = 1; _tmp$11 = true; r = _tmp$9; size = _tmp$10; short$1 = _tmp$11; + return [r, size, short$1]; + } + c1 = ((1 < 0 || 1 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 1]); + if (c1 < 128 || 192 <= c1) { + _tmp$12 = 65533; _tmp$13 = 1; _tmp$14 = false; r = _tmp$12; size = _tmp$13; short$1 = _tmp$14; + return [r, size, short$1]; + } + if (c0 < 224) { + r = ((((c0 & 31) >>> 0) >> 0) << 6 >> 0) | (((c1 & 63) >>> 0) >> 0); + if (r <= 127) { + _tmp$15 = 65533; _tmp$16 = 1; _tmp$17 = false; r = _tmp$15; size = _tmp$16; short$1 = _tmp$17; + return [r, size, short$1]; + } + _tmp$18 = r; _tmp$19 = 2; _tmp$20 = false; r = _tmp$18; size = _tmp$19; short$1 = _tmp$20; + return [r, size, short$1]; + } + if (n < 3) { + _tmp$21 = 65533; _tmp$22 = 1; _tmp$23 = true; r = _tmp$21; size = _tmp$22; short$1 = _tmp$23; + return [r, size, short$1]; + } + c2 = ((2 < 0 || 2 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 2]); + if (c2 < 128 || 192 <= c2) { + _tmp$24 = 65533; _tmp$25 = 1; _tmp$26 = false; r = _tmp$24; size = _tmp$25; short$1 = _tmp$26; + return [r, size, short$1]; + } + if (c0 < 240) { + r = (((((c0 & 15) >>> 0) >> 0) << 12 >> 0) | ((((c1 & 63) >>> 0) >> 0) << 6 >> 0)) | (((c2 & 63) >>> 0) >> 0); + if (r <= 2047) { + _tmp$27 = 65533; _tmp$28 = 1; _tmp$29 = false; r = _tmp$27; size = _tmp$28; short$1 = _tmp$29; + return [r, size, short$1]; + } + if (55296 <= r && r <= 57343) { + _tmp$30 = 65533; _tmp$31 = 1; _tmp$32 = false; r = _tmp$30; size = _tmp$31; short$1 = _tmp$32; + return [r, size, short$1]; + } + _tmp$33 = r; _tmp$34 = 3; _tmp$35 = false; r = _tmp$33; size = _tmp$34; short$1 = _tmp$35; + return [r, size, short$1]; + } + if (n < 4) { + _tmp$36 = 65533; _tmp$37 = 1; _tmp$38 = true; r = _tmp$36; size = _tmp$37; short$1 = _tmp$38; + return [r, size, short$1]; + } + c3 = ((3 < 0 || 3 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 3]); + if (c3 < 128 || 192 <= c3) { + _tmp$39 = 65533; _tmp$40 = 1; _tmp$41 = false; r = _tmp$39; size = _tmp$40; short$1 = _tmp$41; + return [r, size, short$1]; + } + if (c0 < 248) { + r = ((((((c0 & 7) >>> 0) >> 0) << 18 >> 0) | ((((c1 & 63) >>> 0) >> 0) << 12 >> 0)) | ((((c2 & 63) >>> 0) >> 0) << 6 >> 0)) | (((c3 & 63) >>> 0) >> 0); + if (r <= 65535 || 1114111 < r) { + _tmp$42 = 65533; _tmp$43 = 1; _tmp$44 = false; r = _tmp$42; size = _tmp$43; short$1 = _tmp$44; + return [r, size, short$1]; + } + _tmp$45 = r; _tmp$46 = 4; _tmp$47 = false; r = _tmp$45; size = _tmp$46; short$1 = _tmp$47; + return [r, size, short$1]; + } + _tmp$48 = 65533; _tmp$49 = 1; _tmp$50 = false; r = _tmp$48; size = _tmp$49; short$1 = _tmp$50; + return [r, size, short$1]; + }; + decodeRuneInStringInternal = function(s) { + var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$44, _tmp$45, _tmp$46, _tmp$47, _tmp$48, _tmp$49, _tmp$5, _tmp$50, _tmp$6, _tmp$7, _tmp$8, _tmp$9, c0, c1, c2, c3, n, r = 0, s, short$1 = false, size = 0; + n = s.length; + if (n < 1) { + _tmp = 65533; _tmp$1 = 0; _tmp$2 = true; r = _tmp; size = _tmp$1; short$1 = _tmp$2; + return [r, size, short$1]; + } + c0 = s.charCodeAt(0); + if (c0 < 128) { + _tmp$3 = (c0 >> 0); _tmp$4 = 1; _tmp$5 = false; r = _tmp$3; size = _tmp$4; short$1 = _tmp$5; + return [r, size, short$1]; + } + if (c0 < 192) { + _tmp$6 = 65533; _tmp$7 = 1; _tmp$8 = false; r = _tmp$6; size = _tmp$7; short$1 = _tmp$8; + return [r, size, short$1]; + } + if (n < 2) { + _tmp$9 = 65533; _tmp$10 = 1; _tmp$11 = true; r = _tmp$9; size = _tmp$10; short$1 = _tmp$11; + return [r, size, short$1]; + } + c1 = s.charCodeAt(1); + if (c1 < 128 || 192 <= c1) { + _tmp$12 = 65533; _tmp$13 = 1; _tmp$14 = false; r = _tmp$12; size = _tmp$13; short$1 = _tmp$14; + return [r, size, short$1]; + } + if (c0 < 224) { + r = ((((c0 & 31) >>> 0) >> 0) << 6 >> 0) | (((c1 & 63) >>> 0) >> 0); + if (r <= 127) { + _tmp$15 = 65533; _tmp$16 = 1; _tmp$17 = false; r = _tmp$15; size = _tmp$16; short$1 = _tmp$17; + return [r, size, short$1]; + } + _tmp$18 = r; _tmp$19 = 2; _tmp$20 = false; r = _tmp$18; size = _tmp$19; short$1 = _tmp$20; + return [r, size, short$1]; + } + if (n < 3) { + _tmp$21 = 65533; _tmp$22 = 1; _tmp$23 = true; r = _tmp$21; size = _tmp$22; short$1 = _tmp$23; + return [r, size, short$1]; + } + c2 = s.charCodeAt(2); + if (c2 < 128 || 192 <= c2) { + _tmp$24 = 65533; _tmp$25 = 1; _tmp$26 = false; r = _tmp$24; size = _tmp$25; short$1 = _tmp$26; + return [r, size, short$1]; + } + if (c0 < 240) { + r = (((((c0 & 15) >>> 0) >> 0) << 12 >> 0) | ((((c1 & 63) >>> 0) >> 0) << 6 >> 0)) | (((c2 & 63) >>> 0) >> 0); + if (r <= 2047) { + _tmp$27 = 65533; _tmp$28 = 1; _tmp$29 = false; r = _tmp$27; size = _tmp$28; short$1 = _tmp$29; + return [r, size, short$1]; + } + if (55296 <= r && r <= 57343) { + _tmp$30 = 65533; _tmp$31 = 1; _tmp$32 = false; r = _tmp$30; size = _tmp$31; short$1 = _tmp$32; + return [r, size, short$1]; + } + _tmp$33 = r; _tmp$34 = 3; _tmp$35 = false; r = _tmp$33; size = _tmp$34; short$1 = _tmp$35; + return [r, size, short$1]; + } + if (n < 4) { + _tmp$36 = 65533; _tmp$37 = 1; _tmp$38 = true; r = _tmp$36; size = _tmp$37; short$1 = _tmp$38; + return [r, size, short$1]; + } + c3 = s.charCodeAt(3); + if (c3 < 128 || 192 <= c3) { + _tmp$39 = 65533; _tmp$40 = 1; _tmp$41 = false; r = _tmp$39; size = _tmp$40; short$1 = _tmp$41; + return [r, size, short$1]; + } + if (c0 < 248) { + r = ((((((c0 & 7) >>> 0) >> 0) << 18 >> 0) | ((((c1 & 63) >>> 0) >> 0) << 12 >> 0)) | ((((c2 & 63) >>> 0) >> 0) << 6 >> 0)) | (((c3 & 63) >>> 0) >> 0); + if (r <= 65535 || 1114111 < r) { + _tmp$42 = 65533; _tmp$43 = 1; _tmp$44 = false; r = _tmp$42; size = _tmp$43; short$1 = _tmp$44; + return [r, size, short$1]; + } + _tmp$45 = r; _tmp$46 = 4; _tmp$47 = false; r = _tmp$45; size = _tmp$46; short$1 = _tmp$47; + return [r, size, short$1]; + } + _tmp$48 = 65533; _tmp$49 = 1; _tmp$50 = false; r = _tmp$48; size = _tmp$49; short$1 = _tmp$50; + return [r, size, short$1]; + }; + DecodeRune = $pkg.DecodeRune = function(p) { + var _tuple, p, r = 0, size = 0; + _tuple = decodeRuneInternal(p); r = _tuple[0]; size = _tuple[1]; + return [r, size]; + }; + DecodeRuneInString = $pkg.DecodeRuneInString = function(s) { + var _tuple, r = 0, s, size = 0; + _tuple = decodeRuneInStringInternal(s); r = _tuple[0]; size = _tuple[1]; + return [r, size]; + }; + RuneLen = $pkg.RuneLen = function(r) { + var r; + if (r < 0) { + return -1; + } else if (r <= 127) { + return 1; + } else if (r <= 2047) { + return 2; + } else if (55296 <= r && r <= 57343) { + return -1; + } else if (r <= 65535) { + return 3; + } else if (r <= 1114111) { + return 4; + } + return -1; + }; + EncodeRune = $pkg.EncodeRune = function(p, r) { + var i, p, r; + i = (r >>> 0); + if (i <= 127) { + (0 < 0 || 0 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 0] = (r << 24 >>> 24); + return 1; + } else if (i <= 2047) { + (0 < 0 || 0 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 0] = (192 | ((r >> 6 >> 0) << 24 >>> 24)) >>> 0; + (1 < 0 || 1 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 1] = (128 | (((r << 24 >>> 24) & 63) >>> 0)) >>> 0; + return 2; + } else if (i > 1114111 || 55296 <= i && i <= 57343) { + r = 65533; + (0 < 0 || 0 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 0] = (224 | ((r >> 12 >> 0) << 24 >>> 24)) >>> 0; + (1 < 0 || 1 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 1] = (128 | ((((r >> 6 >> 0) << 24 >>> 24) & 63) >>> 0)) >>> 0; + (2 < 0 || 2 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 2] = (128 | (((r << 24 >>> 24) & 63) >>> 0)) >>> 0; + return 3; + } else if (i <= 65535) { + (0 < 0 || 0 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 0] = (224 | ((r >> 12 >> 0) << 24 >>> 24)) >>> 0; + (1 < 0 || 1 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 1] = (128 | ((((r >> 6 >> 0) << 24 >>> 24) & 63) >>> 0)) >>> 0; + (2 < 0 || 2 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 2] = (128 | (((r << 24 >>> 24) & 63) >>> 0)) >>> 0; + return 3; + } else { + (0 < 0 || 0 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 0] = (240 | ((r >> 18 >> 0) << 24 >>> 24)) >>> 0; + (1 < 0 || 1 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 1] = (128 | ((((r >> 12 >> 0) << 24 >>> 24) & 63) >>> 0)) >>> 0; + (2 < 0 || 2 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 2] = (128 | ((((r >> 6 >> 0) << 24 >>> 24) & 63) >>> 0)) >>> 0; + (3 < 0 || 3 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 3] = (128 | (((r << 24 >>> 24) & 63) >>> 0)) >>> 0; + return 4; + } + }; + RuneCount = $pkg.RuneCount = function(p) { + var _tuple, i, n, p, size; + i = 0; + n = 0; + n = 0; + while (true) { + if (!(i < p.$length)) { break; } + if (((i < 0 || i >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + i]) < 128) { + i = i + (1) >> 0; + } else { + _tuple = DecodeRune($subslice(p, i)); size = _tuple[1]; + i = i + (size) >> 0; + } + n = n + (1) >> 0; + } + return n; + }; + RuneCountInString = $pkg.RuneCountInString = function(s) { + var _i, _ref, _rune, n = 0, s; + _ref = s; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + n = n + (1) >> 0; + _i += _rune[1]; + } + return n; + }; + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_utf8 = function() { while (true) { switch ($s) { case 0: + /* */ } return; } }; $init_utf8.$blocking = true; return $init_utf8; + }; + return $pkg; +})(); +$packages["bytes"] = (function() { + var $pkg = {}, errors, io, unicode, utf8, IndexByte; + errors = $packages["errors"]; + io = $packages["io"]; + unicode = $packages["unicode"]; + utf8 = $packages["unicode/utf8"]; + IndexByte = $pkg.IndexByte = function(s, c) { + var _i, _ref, b, c, i, s; + _ref = s; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + b = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (b === c) { + return i; + } + _i++; + } + return -1; + }; + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_bytes = function() { while (true) { switch ($s) { case 0: + $r = errors.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = io.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = unicode.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = utf8.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $pkg.ErrTooLarge = errors.New("bytes.Buffer: too large"); + /* */ } return; } }; $init_bytes.$blocking = true; return $init_bytes; + }; + return $pkg; +})(); +$packages["syscall"] = (function() { + var $pkg = {}, bytes, errors, js, runtime, sync, mmapper, Errno, _C_int, Timespec, Stat_t, Dirent, sliceType, sliceType$1, ptrType, sliceType$4, ptrType$10, arrayType$2, sliceType$9, arrayType$3, arrayType$4, structType, ptrType$24, mapType, funcType, funcType$1, ptrType$28, arrayType$8, arrayType$10, arrayType$12, warningPrinted, lineBuffer, syscallModule, alreadyTriedToLoad, minusOne, envOnce, envLock, env, envs, mapper, errors$1, init, printWarning, printToConsole, use, runtime_envs, syscall, Syscall, Syscall6, BytePtrFromString, copyenv, Getenv, itoa, uitoa, ByteSliceFromString, ReadDirent, Sysctl, nametomib, ParseDirent, Read, Write, sysctl, Close, Fchdir, Fchmod, Fchown, Fstat, Fsync, Ftruncate, Getdirentries, Lstat, Pread, Pwrite, read, Seek, write, mmap, munmap; + bytes = $packages["bytes"]; + errors = $packages["errors"]; + js = $packages["github.com/gopherjs/gopherjs/js"]; + runtime = $packages["runtime"]; + sync = $packages["sync"]; + mmapper = $pkg.mmapper = $newType(0, $kindStruct, "syscall.mmapper", "mmapper", "syscall", function(Mutex_, active_, mmap_, munmap_) { + this.$val = this; + this.Mutex = Mutex_ !== undefined ? Mutex_ : new sync.Mutex.ptr(); + this.active = active_ !== undefined ? active_ : false; + this.mmap = mmap_ !== undefined ? mmap_ : $throwNilPointerError; + this.munmap = munmap_ !== undefined ? munmap_ : $throwNilPointerError; + }); + Errno = $pkg.Errno = $newType(4, $kindUintptr, "syscall.Errno", "Errno", "syscall", null); + _C_int = $pkg._C_int = $newType(4, $kindInt32, "syscall._C_int", "_C_int", "syscall", null); + Timespec = $pkg.Timespec = $newType(0, $kindStruct, "syscall.Timespec", "Timespec", "syscall", function(Sec_, Nsec_) { + this.$val = this; + this.Sec = Sec_ !== undefined ? Sec_ : new $Int64(0, 0); + this.Nsec = Nsec_ !== undefined ? Nsec_ : new $Int64(0, 0); + }); + Stat_t = $pkg.Stat_t = $newType(0, $kindStruct, "syscall.Stat_t", "Stat_t", "syscall", function(Dev_, Mode_, Nlink_, Ino_, Uid_, Gid_, Rdev_, Pad_cgo_0_, Atimespec_, Mtimespec_, Ctimespec_, Birthtimespec_, Size_, Blocks_, Blksize_, Flags_, Gen_, Lspare_, Qspare_) { + this.$val = this; + this.Dev = Dev_ !== undefined ? Dev_ : 0; + this.Mode = Mode_ !== undefined ? Mode_ : 0; + this.Nlink = Nlink_ !== undefined ? Nlink_ : 0; + this.Ino = Ino_ !== undefined ? Ino_ : new $Uint64(0, 0); + this.Uid = Uid_ !== undefined ? Uid_ : 0; + this.Gid = Gid_ !== undefined ? Gid_ : 0; + this.Rdev = Rdev_ !== undefined ? Rdev_ : 0; + this.Pad_cgo_0 = Pad_cgo_0_ !== undefined ? Pad_cgo_0_ : arrayType$3.zero(); + this.Atimespec = Atimespec_ !== undefined ? Atimespec_ : new Timespec.ptr(); + this.Mtimespec = Mtimespec_ !== undefined ? Mtimespec_ : new Timespec.ptr(); + this.Ctimespec = Ctimespec_ !== undefined ? Ctimespec_ : new Timespec.ptr(); + this.Birthtimespec = Birthtimespec_ !== undefined ? Birthtimespec_ : new Timespec.ptr(); + this.Size = Size_ !== undefined ? Size_ : new $Int64(0, 0); + this.Blocks = Blocks_ !== undefined ? Blocks_ : new $Int64(0, 0); + this.Blksize = Blksize_ !== undefined ? Blksize_ : 0; + this.Flags = Flags_ !== undefined ? Flags_ : 0; + this.Gen = Gen_ !== undefined ? Gen_ : 0; + this.Lspare = Lspare_ !== undefined ? Lspare_ : 0; + this.Qspare = Qspare_ !== undefined ? Qspare_ : arrayType$8.zero(); + }); + Dirent = $pkg.Dirent = $newType(0, $kindStruct, "syscall.Dirent", "Dirent", "syscall", function(Ino_, Seekoff_, Reclen_, Namlen_, Type_, Name_, Pad_cgo_0_) { + this.$val = this; + this.Ino = Ino_ !== undefined ? Ino_ : new $Uint64(0, 0); + this.Seekoff = Seekoff_ !== undefined ? Seekoff_ : new $Uint64(0, 0); + this.Reclen = Reclen_ !== undefined ? Reclen_ : 0; + this.Namlen = Namlen_ !== undefined ? Namlen_ : 0; + this.Type = Type_ !== undefined ? Type_ : 0; + this.Name = Name_ !== undefined ? Name_ : arrayType$10.zero(); + this.Pad_cgo_0 = Pad_cgo_0_ !== undefined ? Pad_cgo_0_ : arrayType$12.zero(); + }); + sliceType = $sliceType($Uint8); + sliceType$1 = $sliceType($String); + ptrType = $ptrType($Uint8); + sliceType$4 = $sliceType(_C_int); + ptrType$10 = $ptrType($Uintptr); + arrayType$2 = $arrayType($Uint8, 32); + sliceType$9 = $sliceType($Uint8); + arrayType$3 = $arrayType($Uint8, 4); + arrayType$4 = $arrayType(_C_int, 14); + structType = $structType([{prop: "addr", name: "addr", pkg: "syscall", typ: $Uintptr, tag: ""}, {prop: "len", name: "len", pkg: "syscall", typ: $Int, tag: ""}, {prop: "cap", name: "cap", pkg: "syscall", typ: $Int, tag: ""}]); + ptrType$24 = $ptrType(mmapper); + mapType = $mapType(ptrType, sliceType); + funcType = $funcType([$Uintptr, $Uintptr, $Int, $Int, $Int, $Int64], [$Uintptr, $error], false); + funcType$1 = $funcType([$Uintptr, $Uintptr], [$error], false); + ptrType$28 = $ptrType(Timespec); + arrayType$8 = $arrayType($Int64, 2); + arrayType$10 = $arrayType($Int8, 1024); + arrayType$12 = $arrayType($Uint8, 3); + init = function() { + $flushConsole = (function() { + if (!((lineBuffer.$length === 0))) { + $global.console.log($externalize($bytesToString(lineBuffer), $String)); + lineBuffer = sliceType.nil; + } + }); + }; + printWarning = function() { + if (!warningPrinted) { + console.log("warning: system calls not available, see https://github.com/gopherjs/gopherjs/blob/master/doc/syscalls.md"); + } + warningPrinted = true; + }; + printToConsole = function(b) { + var b, goPrintToConsole, i; + goPrintToConsole = $global.goPrintToConsole; + if (!(goPrintToConsole === undefined)) { + goPrintToConsole(b); + return; + } + lineBuffer = $appendSlice(lineBuffer, b); + while (true) { + if (!(true)) { break; } + i = bytes.IndexByte(lineBuffer, 10); + if (i === -1) { + break; + } + $global.console.log($externalize($bytesToString($subslice(lineBuffer, 0, i)), $String)); + lineBuffer = $subslice(lineBuffer, (i + 1 >> 0)); + } + }; + use = function(p) { + var p; + }; + runtime_envs = function() { + var envkeys, envs$1, i, jsEnv, key, process; + process = $global.process; + if (process === undefined) { + return sliceType$1.nil; + } + jsEnv = process.env; + envkeys = $global.Object.keys(jsEnv); + envs$1 = $makeSlice(sliceType$1, $parseInt(envkeys.length)); + i = 0; + while (true) { + if (!(i < $parseInt(envkeys.length))) { break; } + key = $internalize(envkeys[i], $String); + (i < 0 || i >= envs$1.$length) ? $throwRuntimeError("index out of range") : envs$1.$array[envs$1.$offset + i] = key + "=" + $internalize(jsEnv[$externalize(key, $String)], $String); + i = i + (1) >> 0; + } + return envs$1; + }; + syscall = function(name) { + var $deferred = [], $err = null, name, require; + /* */ try { $deferFrames.push($deferred); + $deferred.push([(function() { + $recover(); + }), []]); + if (syscallModule === null) { + if (alreadyTriedToLoad) { + return null; + } + alreadyTriedToLoad = true; + require = $global.require; + if (require === undefined) { + $panic(new $String("")); + } + syscallModule = require($externalize("syscall", $String)); + } + return syscallModule[$externalize(name, $String)]; + /* */ } catch(err) { $err = err; return null; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + Syscall = $pkg.Syscall = function(trap, a1, a2, a3) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, a1, a2, a3, array, err = 0, f, r, r1 = 0, r2 = 0, slice, trap; + f = syscall("Syscall"); + if (!(f === null)) { + r = f(trap, a1, a2, a3); + _tmp = (($parseInt(r[0]) >> 0) >>> 0); _tmp$1 = (($parseInt(r[1]) >> 0) >>> 0); _tmp$2 = (($parseInt(r[2]) >> 0) >>> 0); r1 = _tmp; r2 = _tmp$1; err = _tmp$2; + return [r1, r2, err]; + } + if ((trap === 4) && ((a1 === 1) || (a1 === 2))) { + array = a2; + slice = $makeSlice(sliceType, $parseInt(array.length)); + slice.$array = array; + printToConsole(slice); + _tmp$3 = ($parseInt(array.length) >>> 0); _tmp$4 = 0; _tmp$5 = 0; r1 = _tmp$3; r2 = _tmp$4; err = _tmp$5; + return [r1, r2, err]; + } + printWarning(); + _tmp$6 = (minusOne >>> 0); _tmp$7 = 0; _tmp$8 = 13; r1 = _tmp$6; r2 = _tmp$7; err = _tmp$8; + return [r1, r2, err]; + }; + Syscall6 = $pkg.Syscall6 = function(trap, a1, a2, a3, a4, a5, a6) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, a1, a2, a3, a4, a5, a6, err = 0, f, r, r1 = 0, r2 = 0, trap; + f = syscall("Syscall6"); + if (!(f === null)) { + r = f(trap, a1, a2, a3, a4, a5, a6); + _tmp = (($parseInt(r[0]) >> 0) >>> 0); _tmp$1 = (($parseInt(r[1]) >> 0) >>> 0); _tmp$2 = (($parseInt(r[2]) >> 0) >>> 0); r1 = _tmp; r2 = _tmp$1; err = _tmp$2; + return [r1, r2, err]; + } + if (!((trap === 202))) { + printWarning(); + } + _tmp$3 = (minusOne >>> 0); _tmp$4 = 0; _tmp$5 = 13; r1 = _tmp$3; r2 = _tmp$4; err = _tmp$5; + return [r1, r2, err]; + }; + BytePtrFromString = $pkg.BytePtrFromString = function(s) { + var _i, _ref, array, b, i, s; + array = new ($global.Uint8Array)(s.length + 1 >> 0); + _ref = new sliceType($stringToBytes(s)); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + b = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (b === 0) { + return [ptrType.nil, new Errno(22)]; + } + array[i] = b; + _i++; + } + array[s.length] = 0; + return [array, $ifaceNil]; + }; + copyenv = function() { + var _entry, _i, _key, _ref, _tuple, i, j, key, ok, s; + env = new $Map(); + _ref = envs; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + s = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + j = 0; + while (true) { + if (!(j < s.length)) { break; } + if (s.charCodeAt(j) === 61) { + key = s.substring(0, j); + _tuple = (_entry = env[key], _entry !== undefined ? [_entry.v, true] : [0, false]); ok = _tuple[1]; + if (!ok) { + _key = key; (env || $throwRuntimeError("assignment to entry in nil map"))[_key] = { k: _key, v: i }; + } else { + (i < 0 || i >= envs.$length) ? $throwRuntimeError("index out of range") : envs.$array[envs.$offset + i] = ""; + } + break; + } + j = j + (1) >> 0; + } + _i++; + } + }; + Getenv = $pkg.Getenv = function(key, $b) { + var $args = arguments, $deferred = [], $err = null, $r, $s = 0, $this = this, _entry, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, found = false, i, i$1, ok, s, value = ""; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Getenv = function() { try { $deferFrames.push($deferred); s: while (true) { switch ($s) { case 0: + $r = envOnce.Do(copyenv, $BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + if (key.length === 0) { + _tmp = ""; _tmp$1 = false; value = _tmp; found = _tmp$1; + return [value, found]; + } + $r = envLock.RLock($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $deferred.push([$methodVal(envLock, "RUnlock"), [$BLOCKING]]); + _tuple = (_entry = env[key], _entry !== undefined ? [_entry.v, true] : [0, false]); i = _tuple[0]; ok = _tuple[1]; + if (!ok) { + _tmp$2 = ""; _tmp$3 = false; value = _tmp$2; found = _tmp$3; + return [value, found]; + } + s = ((i < 0 || i >= envs.$length) ? $throwRuntimeError("index out of range") : envs.$array[envs.$offset + i]); + i$1 = 0; + while (true) { + if (!(i$1 < s.length)) { break; } + if (s.charCodeAt(i$1) === 61) { + _tmp$4 = s.substring((i$1 + 1 >> 0)); _tmp$5 = true; value = _tmp$4; found = _tmp$5; + return [value, found]; + } + i$1 = i$1 + (1) >> 0; + } + _tmp$6 = ""; _tmp$7 = false; value = _tmp$6; found = _tmp$7; + return [value, found]; + /* */ case -1: } return; } } catch(err) { $err = err; } finally { $deferFrames.pop(); if ($curGoroutine.asleep && !$jumpToDefer) { throw null; } $s = -1; $callDeferred($deferred, $err); return [value, found]; } }; $blocking_Getenv.$blocking = true; return $blocking_Getenv; + }; + itoa = function(val) { + var val; + if (val < 0) { + return "-" + uitoa((-val >>> 0)); + } + return uitoa((val >>> 0)); + }; + uitoa = function(val) { + var _q, _r, buf, i, val; + buf = $clone(arrayType$2.zero(), arrayType$2); + i = 31; + while (true) { + if (!(val >= 10)) { break; } + (i < 0 || i >= buf.length) ? $throwRuntimeError("index out of range") : buf[i] = (((_r = val % 10, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) + 48 >>> 0) << 24 >>> 24); + i = i - (1) >> 0; + val = (_q = val / (10), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); + } + (i < 0 || i >= buf.length) ? $throwRuntimeError("index out of range") : buf[i] = ((val + 48 >>> 0) << 24 >>> 24); + return $bytesToString($subslice(new sliceType(buf), i)); + }; + ByteSliceFromString = $pkg.ByteSliceFromString = function(s) { + var a, i, s; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + if (s.charCodeAt(i) === 0) { + return [sliceType.nil, new Errno(22)]; + } + i = i + (1) >> 0; + } + a = $makeSlice(sliceType, (s.length + 1 >> 0)); + $copyString(a, s); + return [a, $ifaceNil]; + }; + Timespec.ptr.prototype.Unix = function() { + var _tmp, _tmp$1, nsec = new $Int64(0, 0), sec = new $Int64(0, 0), ts; + ts = this; + _tmp = ts.Sec; _tmp$1 = ts.Nsec; sec = _tmp; nsec = _tmp$1; + return [sec, nsec]; + }; + Timespec.prototype.Unix = function() { return this.$val.Unix(); }; + Timespec.ptr.prototype.Nano = function() { + var ts, x, x$1; + ts = this; + return (x = $mul64(ts.Sec, new $Int64(0, 1000000000)), x$1 = ts.Nsec, new $Int64(x.$high + x$1.$high, x.$low + x$1.$low)); + }; + Timespec.prototype.Nano = function() { return this.$val.Nano(); }; + ReadDirent = $pkg.ReadDirent = function(fd, buf) { + var _tuple, base, buf, err = $ifaceNil, fd, n = 0; + base = new Uint8Array(8); + _tuple = Getdirentries(fd, buf, base); n = _tuple[0]; err = _tuple[1]; + if (true && ($interfaceIsEqual(err, new Errno(22)) || $interfaceIsEqual(err, new Errno(2)))) { + err = $ifaceNil; + } + return [n, err]; + }; + Sysctl = $pkg.Sysctl = function(name) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, buf, err = $ifaceNil, mib, n, name, value = "", x; + _tuple = nametomib(name); mib = _tuple[0]; err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = ""; _tmp$1 = err; value = _tmp; err = _tmp$1; + return [value, err]; + } + n = 0; + err = sysctl(mib, ptrType.nil, new ptrType$10(function() { return n; }, function($v) { n = $v; }), ptrType.nil, 0); + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$2 = ""; _tmp$3 = err; value = _tmp$2; err = _tmp$3; + return [value, err]; + } + if (n === 0) { + _tmp$4 = ""; _tmp$5 = $ifaceNil; value = _tmp$4; err = _tmp$5; + return [value, err]; + } + buf = $makeSlice(sliceType, n); + err = sysctl(mib, new ptrType(function() { return ((0 < 0 || 0 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + 0]); }, function($v) { (0 < 0 || 0 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + 0] = $v; }, buf), new ptrType$10(function() { return n; }, function($v) { n = $v; }), ptrType.nil, 0); + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$6 = ""; _tmp$7 = err; value = _tmp$6; err = _tmp$7; + return [value, err]; + } + if (n > 0 && ((x = n - 1 >>> 0, ((x < 0 || x >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + x])) === 0)) { + n = n - (1) >>> 0; + } + _tmp$8 = $bytesToString($subslice(buf, 0, n)); _tmp$9 = $ifaceNil; value = _tmp$8; err = _tmp$9; + return [value, err]; + }; + nametomib = function(name) { + var _q, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, buf, bytes$1, err = $ifaceNil, mib = sliceType$4.nil, n, name, p; + buf = $clone(arrayType$4.zero(), arrayType$4); + n = 48; + p = $sliceToArray(new sliceType$9(buf)); + _tuple = ByteSliceFromString(name); bytes$1 = _tuple[0]; err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = sliceType$4.nil; _tmp$1 = err; mib = _tmp; err = _tmp$1; + return [mib, err]; + } + err = sysctl(new sliceType$4([0, 3]), p, new ptrType$10(function() { return n; }, function($v) { n = $v; }), new ptrType(function() { return ((0 < 0 || 0 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + 0]); }, function($v) { (0 < 0 || 0 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + 0] = $v; }, bytes$1), (name.length >>> 0)); + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$2 = sliceType$4.nil; _tmp$3 = err; mib = _tmp$2; err = _tmp$3; + return [mib, err]; + } + _tmp$4 = $subslice(new sliceType$4(buf), 0, (_q = n / 4, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero"))); _tmp$5 = $ifaceNil; mib = _tmp$4; err = _tmp$5; + return [mib, err]; + }; + ParseDirent = $pkg.ParseDirent = function(buf, max, names) { + var _array, _struct, _tmp, _tmp$1, _tmp$2, _view, buf, bytes$1, consumed = 0, count = 0, dirent, max, name, names, newnames = sliceType$1.nil, origlen, x; + origlen = buf.$length; + while (true) { + if (!(!((max === 0)) && buf.$length > 0)) { break; } + dirent = [undefined]; + dirent[0] = (_array = $sliceToArray(buf), _struct = new Dirent.ptr(), _view = new DataView(_array.buffer, _array.byteOffset), _struct.Ino = new $Uint64(_view.getUint32(4, true), _view.getUint32(0, true)), _struct.Seekoff = new $Uint64(_view.getUint32(12, true), _view.getUint32(8, true)), _struct.Reclen = _view.getUint16(16, true), _struct.Namlen = _view.getUint16(18, true), _struct.Type = _view.getUint8(20, true), _struct.Name = new ($nativeArray($kindInt8))(_array.buffer, $min(_array.byteOffset + 21, _array.buffer.byteLength)), _struct.Pad_cgo_0 = new ($nativeArray($kindUint8))(_array.buffer, $min(_array.byteOffset + 1045, _array.buffer.byteLength)), _struct); + if (dirent[0].Reclen === 0) { + buf = sliceType.nil; + break; + } + buf = $subslice(buf, dirent[0].Reclen); + if ((x = dirent[0].Ino, (x.$high === 0 && x.$low === 0))) { + continue; + } + bytes$1 = $sliceToArray(new sliceType$9(dirent[0].Name)); + name = $bytesToString($subslice(new sliceType(bytes$1), 0, dirent[0].Namlen)); + if (name === "." || name === "..") { + continue; + } + max = max - (1) >> 0; + count = count + (1) >> 0; + names = $append(names, name); + } + _tmp = origlen - buf.$length >> 0; _tmp$1 = count; _tmp$2 = names; consumed = _tmp; count = _tmp$1; newnames = _tmp$2; + return [consumed, count, newnames]; + }; + mmapper.ptr.prototype.Mmap = function(fd, offset, length, prot, flags, $b) { + var $args = arguments, $deferred = [], $err = null, $r, $s = 0, $this = this, _key, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, addr, b, data = sliceType.nil, err = $ifaceNil, errno, m, p, sl, x, x$1; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Mmap = function() { try { $deferFrames.push($deferred); s: while (true) { switch ($s) { case 0: + m = $this; + if (length <= 0) { + _tmp = sliceType.nil; _tmp$1 = new Errno(22); data = _tmp; err = _tmp$1; + return [data, err]; + } + _tuple = m.mmap(0, (length >>> 0), prot, flags, fd, offset); addr = _tuple[0]; errno = _tuple[1]; + if (!($interfaceIsEqual(errno, $ifaceNil))) { + _tmp$2 = sliceType.nil; _tmp$3 = errno; data = _tmp$2; err = _tmp$3; + return [data, err]; + } + sl = new structType.ptr(addr, length, length); + b = sl; + p = new ptrType(function() { return (x$1 = b.$capacity - 1 >> 0, ((x$1 < 0 || x$1 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + x$1])); }, function($v) { (x = b.$capacity - 1 >> 0, (x < 0 || x >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + x] = $v); }, b); + $r = m.Mutex.Lock($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $deferred.push([$methodVal(m.Mutex, "Unlock"), [$BLOCKING]]); + _key = p; (m.active || $throwRuntimeError("assignment to entry in nil map"))[_key.$key()] = { k: _key, v: b }; + _tmp$4 = b; _tmp$5 = $ifaceNil; data = _tmp$4; err = _tmp$5; + return [data, err]; + /* */ case -1: } return; } } catch(err) { $err = err; } finally { $deferFrames.pop(); if ($curGoroutine.asleep && !$jumpToDefer) { throw null; } $s = -1; $callDeferred($deferred, $err); return [data, err]; } }; $blocking_Mmap.$blocking = true; return $blocking_Mmap; + }; + mmapper.prototype.Mmap = function(fd, offset, length, prot, flags, $b) { return this.$val.Mmap(fd, offset, length, prot, flags, $b); }; + mmapper.ptr.prototype.Munmap = function(data, $b) { + var $args = arguments, $deferred = [], $err = null, $r, $s = 0, $this = this, _entry, b, err = $ifaceNil, errno, m, p, x, x$1; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Munmap = function() { try { $deferFrames.push($deferred); s: while (true) { switch ($s) { case 0: + m = $this; + if ((data.$length === 0) || !((data.$length === data.$capacity))) { + err = new Errno(22); + return err; + } + p = new ptrType(function() { return (x$1 = data.$capacity - 1 >> 0, ((x$1 < 0 || x$1 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + x$1])); }, function($v) { (x = data.$capacity - 1 >> 0, (x < 0 || x >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + x] = $v); }, data); + $r = m.Mutex.Lock($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $deferred.push([$methodVal(m.Mutex, "Unlock"), [$BLOCKING]]); + b = (_entry = m.active[p.$key()], _entry !== undefined ? _entry.v : sliceType.nil); + if (b === sliceType.nil || !($pointerIsEqual(new ptrType(function() { return ((0 < 0 || 0 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + 0]); }, function($v) { (0 < 0 || 0 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + 0] = $v; }, b), new ptrType(function() { return ((0 < 0 || 0 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + 0]); }, function($v) { (0 < 0 || 0 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + 0] = $v; }, data)))) { + err = new Errno(22); + return err; + } + errno = m.munmap($sliceToArray(b), (b.$length >>> 0)); + if (!($interfaceIsEqual(errno, $ifaceNil))) { + err = errno; + return err; + } + delete m.active[p.$key()]; + err = $ifaceNil; + return err; + /* */ case -1: } return; } } catch(err) { $err = err; } finally { $deferFrames.pop(); if ($curGoroutine.asleep && !$jumpToDefer) { throw null; } $s = -1; $callDeferred($deferred, $err); return err; } }; $blocking_Munmap.$blocking = true; return $blocking_Munmap; + }; + mmapper.prototype.Munmap = function(data, $b) { return this.$val.Munmap(data, $b); }; + Errno.prototype.Error = function() { + var e, s; + e = this.$val; + if (0 <= (e >> 0) && (e >> 0) < 106) { + s = ((e < 0 || e >= errors$1.length) ? $throwRuntimeError("index out of range") : errors$1[e]); + if (!(s === "")) { + return s; + } + } + return "errno " + itoa((e >> 0)); + }; + $ptrType(Errno).prototype.Error = function() { return new Errno(this.$get()).Error(); }; + Errno.prototype.Temporary = function() { + var e; + e = this.$val; + return (e === 4) || (e === 24) || (e === 54) || (e === 53) || new Errno(e).Timeout(); + }; + $ptrType(Errno).prototype.Temporary = function() { return new Errno(this.$get()).Temporary(); }; + Errno.prototype.Timeout = function() { + var e; + e = this.$val; + return (e === 35) || (e === 35) || (e === 60); + }; + $ptrType(Errno).prototype.Timeout = function() { return new Errno(this.$get()).Timeout(); }; + Read = $pkg.Read = function(fd, p) { + var _tuple, err = $ifaceNil, fd, n = 0, p; + _tuple = read(fd, p); n = _tuple[0]; err = _tuple[1]; + return [n, err]; + }; + Write = $pkg.Write = function(fd, p) { + var _tuple, err = $ifaceNil, fd, n = 0, p; + _tuple = write(fd, p); n = _tuple[0]; err = _tuple[1]; + return [n, err]; + }; + sysctl = function(mib, old, oldlen, new$1, newlen) { + var _p0, _tuple, e1, err = $ifaceNil, mib, new$1, newlen, old, oldlen; + _p0 = 0; + if (mib.$length > 0) { + _p0 = $sliceToArray(mib); + } else { + _p0 = new Uint8Array(0); + } + _tuple = Syscall6(202, _p0, (mib.$length >>> 0), old, oldlen, new$1, newlen); e1 = _tuple[2]; + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + Close = $pkg.Close = function(fd) { + var _tuple, e1, err = $ifaceNil, fd; + _tuple = Syscall(6, (fd >>> 0), 0, 0); e1 = _tuple[2]; + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + Fchdir = $pkg.Fchdir = function(fd) { + var _tuple, e1, err = $ifaceNil, fd; + _tuple = Syscall(13, (fd >>> 0), 0, 0); e1 = _tuple[2]; + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + Fchmod = $pkg.Fchmod = function(fd, mode) { + var _tuple, e1, err = $ifaceNil, fd, mode; + _tuple = Syscall(124, (fd >>> 0), (mode >>> 0), 0); e1 = _tuple[2]; + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + Fchown = $pkg.Fchown = function(fd, uid, gid) { + var _tuple, e1, err = $ifaceNil, fd, gid, uid; + _tuple = Syscall(123, (fd >>> 0), (uid >>> 0), (gid >>> 0)); e1 = _tuple[2]; + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + Fstat = $pkg.Fstat = function(fd, stat) { + var _array, _struct, _tuple, _view, e1, err = $ifaceNil, fd, stat; + _array = new Uint8Array(144); + _tuple = Syscall(339, (fd >>> 0), _array, 0); e1 = _tuple[2]; + _struct = stat, _view = new DataView(_array.buffer, _array.byteOffset), _struct.Dev = _view.getInt32(0, true), _struct.Mode = _view.getUint16(4, true), _struct.Nlink = _view.getUint16(6, true), _struct.Ino = new $Uint64(_view.getUint32(12, true), _view.getUint32(8, true)), _struct.Uid = _view.getUint32(16, true), _struct.Gid = _view.getUint32(20, true), _struct.Rdev = _view.getInt32(24, true), _struct.Pad_cgo_0 = new ($nativeArray($kindUint8))(_array.buffer, $min(_array.byteOffset + 28, _array.buffer.byteLength)), _struct.Atimespec.Sec = new $Int64(_view.getUint32(36, true), _view.getUint32(32, true)), _struct.Atimespec.Nsec = new $Int64(_view.getUint32(44, true), _view.getUint32(40, true)), _struct.Mtimespec.Sec = new $Int64(_view.getUint32(52, true), _view.getUint32(48, true)), _struct.Mtimespec.Nsec = new $Int64(_view.getUint32(60, true), _view.getUint32(56, true)), _struct.Ctimespec.Sec = new $Int64(_view.getUint32(68, true), _view.getUint32(64, true)), _struct.Ctimespec.Nsec = new $Int64(_view.getUint32(76, true), _view.getUint32(72, true)), _struct.Birthtimespec.Sec = new $Int64(_view.getUint32(84, true), _view.getUint32(80, true)), _struct.Birthtimespec.Nsec = new $Int64(_view.getUint32(92, true), _view.getUint32(88, true)), _struct.Size = new $Int64(_view.getUint32(100, true), _view.getUint32(96, true)), _struct.Blocks = new $Int64(_view.getUint32(108, true), _view.getUint32(104, true)), _struct.Blksize = _view.getInt32(112, true), _struct.Flags = _view.getUint32(116, true), _struct.Gen = _view.getUint32(120, true), _struct.Lspare = _view.getInt32(124, true), _struct.Qspare = new ($nativeArray($kindInt64))(_array.buffer, $min(_array.byteOffset + 128, _array.buffer.byteLength)); + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + Fsync = $pkg.Fsync = function(fd) { + var _tuple, e1, err = $ifaceNil, fd; + _tuple = Syscall(95, (fd >>> 0), 0, 0); e1 = _tuple[2]; + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + Ftruncate = $pkg.Ftruncate = function(fd, length) { + var _tuple, e1, err = $ifaceNil, fd, length; + _tuple = Syscall(201, (fd >>> 0), (length.$low >>> 0), 0); e1 = _tuple[2]; + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + Getdirentries = $pkg.Getdirentries = function(fd, buf, basep) { + var _p0, _tuple, basep, buf, e1, err = $ifaceNil, fd, n = 0, r0; + _p0 = 0; + if (buf.$length > 0) { + _p0 = $sliceToArray(buf); + } else { + _p0 = new Uint8Array(0); + } + _tuple = Syscall6(344, (fd >>> 0), _p0, (buf.$length >>> 0), basep, 0, 0); r0 = _tuple[0]; e1 = _tuple[2]; + n = (r0 >> 0); + if (!((e1 === 0))) { + err = new Errno(e1); + } + return [n, err]; + }; + Lstat = $pkg.Lstat = function(path, stat) { + var _array, _p0, _struct, _tuple, _tuple$1, _view, e1, err = $ifaceNil, path, stat; + _p0 = ptrType.nil; + _tuple = BytePtrFromString(path); _p0 = _tuple[0]; err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + _array = new Uint8Array(144); + _tuple$1 = Syscall(340, _p0, _array, 0); e1 = _tuple$1[2]; + _struct = stat, _view = new DataView(_array.buffer, _array.byteOffset), _struct.Dev = _view.getInt32(0, true), _struct.Mode = _view.getUint16(4, true), _struct.Nlink = _view.getUint16(6, true), _struct.Ino = new $Uint64(_view.getUint32(12, true), _view.getUint32(8, true)), _struct.Uid = _view.getUint32(16, true), _struct.Gid = _view.getUint32(20, true), _struct.Rdev = _view.getInt32(24, true), _struct.Pad_cgo_0 = new ($nativeArray($kindUint8))(_array.buffer, $min(_array.byteOffset + 28, _array.buffer.byteLength)), _struct.Atimespec.Sec = new $Int64(_view.getUint32(36, true), _view.getUint32(32, true)), _struct.Atimespec.Nsec = new $Int64(_view.getUint32(44, true), _view.getUint32(40, true)), _struct.Mtimespec.Sec = new $Int64(_view.getUint32(52, true), _view.getUint32(48, true)), _struct.Mtimespec.Nsec = new $Int64(_view.getUint32(60, true), _view.getUint32(56, true)), _struct.Ctimespec.Sec = new $Int64(_view.getUint32(68, true), _view.getUint32(64, true)), _struct.Ctimespec.Nsec = new $Int64(_view.getUint32(76, true), _view.getUint32(72, true)), _struct.Birthtimespec.Sec = new $Int64(_view.getUint32(84, true), _view.getUint32(80, true)), _struct.Birthtimespec.Nsec = new $Int64(_view.getUint32(92, true), _view.getUint32(88, true)), _struct.Size = new $Int64(_view.getUint32(100, true), _view.getUint32(96, true)), _struct.Blocks = new $Int64(_view.getUint32(108, true), _view.getUint32(104, true)), _struct.Blksize = _view.getInt32(112, true), _struct.Flags = _view.getUint32(116, true), _struct.Gen = _view.getUint32(120, true), _struct.Lspare = _view.getInt32(124, true), _struct.Qspare = new ($nativeArray($kindInt64))(_array.buffer, $min(_array.byteOffset + 128, _array.buffer.byteLength)); + use(_p0); + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + Pread = $pkg.Pread = function(fd, p, offset) { + var _p0, _tuple, e1, err = $ifaceNil, fd, n = 0, offset, p, r0; + _p0 = 0; + if (p.$length > 0) { + _p0 = $sliceToArray(p); + } else { + _p0 = new Uint8Array(0); + } + _tuple = Syscall6(153, (fd >>> 0), _p0, (p.$length >>> 0), (offset.$low >>> 0), 0, 0); r0 = _tuple[0]; e1 = _tuple[2]; + n = (r0 >> 0); + if (!((e1 === 0))) { + err = new Errno(e1); + } + return [n, err]; + }; + Pwrite = $pkg.Pwrite = function(fd, p, offset) { + var _p0, _tuple, e1, err = $ifaceNil, fd, n = 0, offset, p, r0; + _p0 = 0; + if (p.$length > 0) { + _p0 = $sliceToArray(p); + } else { + _p0 = new Uint8Array(0); + } + _tuple = Syscall6(154, (fd >>> 0), _p0, (p.$length >>> 0), (offset.$low >>> 0), 0, 0); r0 = _tuple[0]; e1 = _tuple[2]; + n = (r0 >> 0); + if (!((e1 === 0))) { + err = new Errno(e1); + } + return [n, err]; + }; + read = function(fd, p) { + var _p0, _tuple, e1, err = $ifaceNil, fd, n = 0, p, r0; + _p0 = 0; + if (p.$length > 0) { + _p0 = $sliceToArray(p); + } else { + _p0 = new Uint8Array(0); + } + _tuple = Syscall(3, (fd >>> 0), _p0, (p.$length >>> 0)); r0 = _tuple[0]; e1 = _tuple[2]; + n = (r0 >> 0); + if (!((e1 === 0))) { + err = new Errno(e1); + } + return [n, err]; + }; + Seek = $pkg.Seek = function(fd, offset, whence) { + var _tuple, e1, err = $ifaceNil, fd, newoffset = new $Int64(0, 0), offset, r0, whence; + _tuple = Syscall(199, (fd >>> 0), (offset.$low >>> 0), (whence >>> 0)); r0 = _tuple[0]; e1 = _tuple[2]; + newoffset = new $Int64(0, r0.constructor === Number ? r0 : 1); + if (!((e1 === 0))) { + err = new Errno(e1); + } + return [newoffset, err]; + }; + write = function(fd, p) { + var _p0, _tuple, e1, err = $ifaceNil, fd, n = 0, p, r0; + _p0 = 0; + if (p.$length > 0) { + _p0 = $sliceToArray(p); + } else { + _p0 = new Uint8Array(0); + } + _tuple = Syscall(4, (fd >>> 0), _p0, (p.$length >>> 0)); r0 = _tuple[0]; e1 = _tuple[2]; + n = (r0 >> 0); + if (!((e1 === 0))) { + err = new Errno(e1); + } + return [n, err]; + }; + mmap = function(addr, length, prot, flag, fd, pos) { + var _tuple, addr, e1, err = $ifaceNil, fd, flag, length, pos, prot, r0, ret = 0; + _tuple = Syscall6(197, addr, length, (prot >>> 0), (flag >>> 0), (fd >>> 0), (pos.$low >>> 0)); r0 = _tuple[0]; e1 = _tuple[2]; + ret = r0; + if (!((e1 === 0))) { + err = new Errno(e1); + } + return [ret, err]; + }; + munmap = function(addr, length) { + var _tuple, addr, e1, err = $ifaceNil, length; + _tuple = Syscall(73, addr, length, 0); e1 = _tuple[2]; + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + ptrType$24.methods = [{prop: "Mmap", name: "Mmap", pkg: "", typ: $funcType([$Int, $Int64, $Int, $Int, $Int], [sliceType, $error], false)}, {prop: "Munmap", name: "Munmap", pkg: "", typ: $funcType([sliceType], [$error], false)}]; + Errno.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}]; + ptrType$28.methods = [{prop: "Unix", name: "Unix", pkg: "", typ: $funcType([], [$Int64, $Int64], false)}, {prop: "Nano", name: "Nano", pkg: "", typ: $funcType([], [$Int64], false)}]; + mmapper.init([{prop: "Mutex", name: "", pkg: "", typ: sync.Mutex, tag: ""}, {prop: "active", name: "active", pkg: "syscall", typ: mapType, tag: ""}, {prop: "mmap", name: "mmap", pkg: "syscall", typ: funcType, tag: ""}, {prop: "munmap", name: "munmap", pkg: "syscall", typ: funcType$1, tag: ""}]); + Timespec.init([{prop: "Sec", name: "Sec", pkg: "", typ: $Int64, tag: ""}, {prop: "Nsec", name: "Nsec", pkg: "", typ: $Int64, tag: ""}]); + Stat_t.init([{prop: "Dev", name: "Dev", pkg: "", typ: $Int32, tag: ""}, {prop: "Mode", name: "Mode", pkg: "", typ: $Uint16, tag: ""}, {prop: "Nlink", name: "Nlink", pkg: "", typ: $Uint16, tag: ""}, {prop: "Ino", name: "Ino", pkg: "", typ: $Uint64, tag: ""}, {prop: "Uid", name: "Uid", pkg: "", typ: $Uint32, tag: ""}, {prop: "Gid", name: "Gid", pkg: "", typ: $Uint32, tag: ""}, {prop: "Rdev", name: "Rdev", pkg: "", typ: $Int32, tag: ""}, {prop: "Pad_cgo_0", name: "Pad_cgo_0", pkg: "", typ: arrayType$3, tag: ""}, {prop: "Atimespec", name: "Atimespec", pkg: "", typ: Timespec, tag: ""}, {prop: "Mtimespec", name: "Mtimespec", pkg: "", typ: Timespec, tag: ""}, {prop: "Ctimespec", name: "Ctimespec", pkg: "", typ: Timespec, tag: ""}, {prop: "Birthtimespec", name: "Birthtimespec", pkg: "", typ: Timespec, tag: ""}, {prop: "Size", name: "Size", pkg: "", typ: $Int64, tag: ""}, {prop: "Blocks", name: "Blocks", pkg: "", typ: $Int64, tag: ""}, {prop: "Blksize", name: "Blksize", pkg: "", typ: $Int32, tag: ""}, {prop: "Flags", name: "Flags", pkg: "", typ: $Uint32, tag: ""}, {prop: "Gen", name: "Gen", pkg: "", typ: $Uint32, tag: ""}, {prop: "Lspare", name: "Lspare", pkg: "", typ: $Int32, tag: ""}, {prop: "Qspare", name: "Qspare", pkg: "", typ: arrayType$8, tag: ""}]); + Dirent.init([{prop: "Ino", name: "Ino", pkg: "", typ: $Uint64, tag: ""}, {prop: "Seekoff", name: "Seekoff", pkg: "", typ: $Uint64, tag: ""}, {prop: "Reclen", name: "Reclen", pkg: "", typ: $Uint16, tag: ""}, {prop: "Namlen", name: "Namlen", pkg: "", typ: $Uint16, tag: ""}, {prop: "Type", name: "Type", pkg: "", typ: $Uint8, tag: ""}, {prop: "Name", name: "Name", pkg: "", typ: arrayType$10, tag: ""}, {prop: "Pad_cgo_0", name: "Pad_cgo_0", pkg: "", typ: arrayType$12, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_syscall = function() { while (true) { switch ($s) { case 0: + $r = bytes.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = errors.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = js.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = runtime.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = sync.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + lineBuffer = sliceType.nil; + envOnce = new sync.Once.ptr(); + envLock = new sync.RWMutex.ptr(); + env = false; + warningPrinted = false; + syscallModule = null; + alreadyTriedToLoad = false; + minusOne = -1; + envs = runtime_envs(); + $pkg.Stdin = 0; + $pkg.Stdout = 1; + $pkg.Stderr = 2; + errors$1 = $toNativeArray($kindString, ["", "operation not permitted", "no such file or directory", "no such process", "interrupted system call", "input/output error", "device not configured", "argument list too long", "exec format error", "bad file descriptor", "no child processes", "resource deadlock avoided", "cannot allocate memory", "permission denied", "bad address", "block device required", "resource busy", "file exists", "cross-device link", "operation not supported by device", "not a directory", "is a directory", "invalid argument", "too many open files in system", "too many open files", "inappropriate ioctl for device", "text file busy", "file too large", "no space left on device", "illegal seek", "read-only file system", "too many links", "broken pipe", "numerical argument out of domain", "result too large", "resource temporarily unavailable", "operation now in progress", "operation already in progress", "socket operation on non-socket", "destination address required", "message too long", "protocol wrong type for socket", "protocol not available", "protocol not supported", "socket type not supported", "operation not supported", "protocol family not supported", "address family not supported by protocol family", "address already in use", "can't assign requested address", "network is down", "network is unreachable", "network dropped connection on reset", "software caused connection abort", "connection reset by peer", "no buffer space available", "socket is already connected", "socket is not connected", "can't send after socket shutdown", "too many references: can't splice", "operation timed out", "connection refused", "too many levels of symbolic links", "file name too long", "host is down", "no route to host", "directory not empty", "too many processes", "too many users", "disc quota exceeded", "stale NFS file handle", "too many levels of remote in path", "RPC struct is bad", "RPC version wrong", "RPC prog. not avail", "program version wrong", "bad procedure for program", "no locks available", "function not implemented", "inappropriate file type or format", "authentication error", "need authenticator", "device power is off", "device error", "value too large to be stored in data type", "bad executable (or shared library)", "bad CPU type in executable", "shared library version mismatch", "malformed Mach-o file", "operation canceled", "identifier removed", "no message of desired type", "illegal byte sequence", "attribute not found", "bad message", "EMULTIHOP (Reserved)", "no message available on STREAM", "ENOLINK (Reserved)", "no STREAM resources", "not a STREAM", "protocol error", "STREAM ioctl timeout", "operation not supported on socket", "policy not found", "state not recoverable", "previous owner died"]); + mapper = new mmapper.ptr(new sync.Mutex.ptr(), new $Map(), mmap, munmap); + init(); + /* */ } return; } }; $init_syscall.$blocking = true; return $init_syscall; + }; + return $pkg; +})(); +$packages["github.com/gopherjs/gopherjs/nosync"] = (function() { + var $pkg = {}, Once, funcType, ptrType$3; + Once = $pkg.Once = $newType(0, $kindStruct, "nosync.Once", "Once", "github.com/gopherjs/gopherjs/nosync", function(doing_, done_) { + this.$val = this; + this.doing = doing_ !== undefined ? doing_ : false; + this.done = done_ !== undefined ? done_ : false; + }); + funcType = $funcType([], [], false); + ptrType$3 = $ptrType(Once); + Once.ptr.prototype.Do = function(f) { + var $deferred = [], $err = null, f, o; + /* */ try { $deferFrames.push($deferred); + o = this; + if (o.done) { + return; + } + if (o.doing) { + $panic(new $String("nosync: Do called within f")); + } + o.doing = true; + $deferred.push([(function() { + o.doing = false; + o.done = true; + }), []]); + f(); + /* */ } catch(err) { $err = err; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + Once.prototype.Do = function(f) { return this.$val.Do(f); }; + ptrType$3.methods = [{prop: "Do", name: "Do", pkg: "", typ: $funcType([funcType], [], false)}]; + Once.init([{prop: "doing", name: "doing", pkg: "github.com/gopherjs/gopherjs/nosync", typ: $Bool, tag: ""}, {prop: "done", name: "done", pkg: "github.com/gopherjs/gopherjs/nosync", typ: $Bool, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_nosync = function() { while (true) { switch ($s) { case 0: + /* */ } return; } }; $init_nosync.$blocking = true; return $init_nosync; + }; + return $pkg; +})(); +$packages["strings"] = (function() { + var $pkg = {}, errors, js, io, unicode, utf8, IndexByte; + errors = $packages["errors"]; + js = $packages["github.com/gopherjs/gopherjs/js"]; + io = $packages["io"]; + unicode = $packages["unicode"]; + utf8 = $packages["unicode/utf8"]; + IndexByte = $pkg.IndexByte = function(s, c) { + var c, s; + return $parseInt(s.indexOf($global.String.fromCharCode(c))) >> 0; + }; + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_strings = function() { while (true) { switch ($s) { case 0: + $r = errors.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = js.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = io.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = unicode.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = utf8.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + /* */ } return; } }; $init_strings.$blocking = true; return $init_strings; + }; + return $pkg; +})(); +$packages["time"] = (function() { + var $pkg = {}, errors, js, nosync, runtime, strings, syscall, ParseError, Time, Month, Weekday, Duration, Location, zone, zoneTrans, sliceType, sliceType$1, sliceType$2, ptrType, arrayType, sliceType$3, arrayType$1, arrayType$2, ptrType$1, ptrType$2, ptrType$5, std0x, longDayNames, shortDayNames, shortMonthNames, longMonthNames, atoiError, errBad, errLeadingInt, months, days, daysBefore, utcLoc, localLoc, localOnce, zoneinfo, badData, zoneDirs, _tuple, _r, initLocal, startsWithLowerCase, nextStdChunk, match, lookup, appendUint, atoi, formatNano, quote, isDigit, getnum, cutspace, skip, Parse, parse, parseTimeZone, parseGMT, parseNanoseconds, leadingInt, absWeekday, absClock, fmtFrac, fmtInt, absDate, Unix, isLeap, norm, Date, div, FixedZone; + errors = $packages["errors"]; + js = $packages["github.com/gopherjs/gopherjs/js"]; + nosync = $packages["github.com/gopherjs/gopherjs/nosync"]; + runtime = $packages["runtime"]; + strings = $packages["strings"]; + syscall = $packages["syscall"]; + ParseError = $pkg.ParseError = $newType(0, $kindStruct, "time.ParseError", "ParseError", "time", function(Layout_, Value_, LayoutElem_, ValueElem_, Message_) { + this.$val = this; + this.Layout = Layout_ !== undefined ? Layout_ : ""; + this.Value = Value_ !== undefined ? Value_ : ""; + this.LayoutElem = LayoutElem_ !== undefined ? LayoutElem_ : ""; + this.ValueElem = ValueElem_ !== undefined ? ValueElem_ : ""; + this.Message = Message_ !== undefined ? Message_ : ""; + }); + Time = $pkg.Time = $newType(0, $kindStruct, "time.Time", "Time", "time", function(sec_, nsec_, loc_) { + this.$val = this; + this.sec = sec_ !== undefined ? sec_ : new $Int64(0, 0); + this.nsec = nsec_ !== undefined ? nsec_ : 0; + this.loc = loc_ !== undefined ? loc_ : ptrType$1.nil; + }); + Month = $pkg.Month = $newType(4, $kindInt, "time.Month", "Month", "time", null); + Weekday = $pkg.Weekday = $newType(4, $kindInt, "time.Weekday", "Weekday", "time", null); + Duration = $pkg.Duration = $newType(8, $kindInt64, "time.Duration", "Duration", "time", null); + Location = $pkg.Location = $newType(0, $kindStruct, "time.Location", "Location", "time", function(name_, zone_, tx_, cacheStart_, cacheEnd_, cacheZone_) { + this.$val = this; + this.name = name_ !== undefined ? name_ : ""; + this.zone = zone_ !== undefined ? zone_ : sliceType$1.nil; + this.tx = tx_ !== undefined ? tx_ : sliceType$2.nil; + this.cacheStart = cacheStart_ !== undefined ? cacheStart_ : new $Int64(0, 0); + this.cacheEnd = cacheEnd_ !== undefined ? cacheEnd_ : new $Int64(0, 0); + this.cacheZone = cacheZone_ !== undefined ? cacheZone_ : ptrType.nil; + }); + zone = $pkg.zone = $newType(0, $kindStruct, "time.zone", "zone", "time", function(name_, offset_, isDST_) { + this.$val = this; + this.name = name_ !== undefined ? name_ : ""; + this.offset = offset_ !== undefined ? offset_ : 0; + this.isDST = isDST_ !== undefined ? isDST_ : false; + }); + zoneTrans = $pkg.zoneTrans = $newType(0, $kindStruct, "time.zoneTrans", "zoneTrans", "time", function(when_, index_, isstd_, isutc_) { + this.$val = this; + this.when = when_ !== undefined ? when_ : new $Int64(0, 0); + this.index = index_ !== undefined ? index_ : 0; + this.isstd = isstd_ !== undefined ? isstd_ : false; + this.isutc = isutc_ !== undefined ? isutc_ : false; + }); + sliceType = $sliceType($String); + sliceType$1 = $sliceType(zone); + sliceType$2 = $sliceType(zoneTrans); + ptrType = $ptrType(zone); + arrayType = $arrayType($Uint8, 32); + sliceType$3 = $sliceType($Uint8); + arrayType$1 = $arrayType($Uint8, 9); + arrayType$2 = $arrayType($Uint8, 64); + ptrType$1 = $ptrType(Location); + ptrType$2 = $ptrType(ParseError); + ptrType$5 = $ptrType(Time); + initLocal = function() { + var d, i, j, s; + d = new ($global.Date)(); + s = $internalize(d, $String); + i = strings.IndexByte(s, 40); + j = strings.IndexByte(s, 41); + if ((i === -1) || (j === -1)) { + localLoc.name = "UTC"; + return; + } + localLoc.name = s.substring((i + 1 >> 0), j); + localLoc.zone = new sliceType$1([new zone.ptr(localLoc.name, ($parseInt(d.getTimezoneOffset()) >> 0) * -60 >> 0, false)]); + }; + startsWithLowerCase = function(str) { + var c, str; + if (str.length === 0) { + return false; + } + c = str.charCodeAt(0); + return 97 <= c && c <= 122; + }; + nextStdChunk = function(layout) { + var _ref, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$44, _tmp$45, _tmp$46, _tmp$47, _tmp$48, _tmp$49, _tmp$5, _tmp$50, _tmp$51, _tmp$52, _tmp$53, _tmp$54, _tmp$55, _tmp$56, _tmp$57, _tmp$58, _tmp$59, _tmp$6, _tmp$60, _tmp$61, _tmp$62, _tmp$63, _tmp$64, _tmp$65, _tmp$66, _tmp$67, _tmp$68, _tmp$69, _tmp$7, _tmp$70, _tmp$71, _tmp$72, _tmp$73, _tmp$74, _tmp$75, _tmp$76, _tmp$77, _tmp$78, _tmp$79, _tmp$8, _tmp$80, _tmp$9, c, ch, i, j, layout, prefix = "", std = 0, std$1, suffix = "", x; + i = 0; + while (true) { + if (!(i < layout.length)) { break; } + c = (layout.charCodeAt(i) >> 0); + _ref = c; + if (_ref === 74) { + if (layout.length >= (i + 3 >> 0) && layout.substring(i, (i + 3 >> 0)) === "Jan") { + if (layout.length >= (i + 7 >> 0) && layout.substring(i, (i + 7 >> 0)) === "January") { + _tmp = layout.substring(0, i); _tmp$1 = 257; _tmp$2 = layout.substring((i + 7 >> 0)); prefix = _tmp; std = _tmp$1; suffix = _tmp$2; + return [prefix, std, suffix]; + } + if (!startsWithLowerCase(layout.substring((i + 3 >> 0)))) { + _tmp$3 = layout.substring(0, i); _tmp$4 = 258; _tmp$5 = layout.substring((i + 3 >> 0)); prefix = _tmp$3; std = _tmp$4; suffix = _tmp$5; + return [prefix, std, suffix]; + } + } + } else if (_ref === 77) { + if (layout.length >= (i + 3 >> 0)) { + if (layout.substring(i, (i + 3 >> 0)) === "Mon") { + if (layout.length >= (i + 6 >> 0) && layout.substring(i, (i + 6 >> 0)) === "Monday") { + _tmp$6 = layout.substring(0, i); _tmp$7 = 261; _tmp$8 = layout.substring((i + 6 >> 0)); prefix = _tmp$6; std = _tmp$7; suffix = _tmp$8; + return [prefix, std, suffix]; + } + if (!startsWithLowerCase(layout.substring((i + 3 >> 0)))) { + _tmp$9 = layout.substring(0, i); _tmp$10 = 262; _tmp$11 = layout.substring((i + 3 >> 0)); prefix = _tmp$9; std = _tmp$10; suffix = _tmp$11; + return [prefix, std, suffix]; + } + } + if (layout.substring(i, (i + 3 >> 0)) === "MST") { + _tmp$12 = layout.substring(0, i); _tmp$13 = 21; _tmp$14 = layout.substring((i + 3 >> 0)); prefix = _tmp$12; std = _tmp$13; suffix = _tmp$14; + return [prefix, std, suffix]; + } + } + } else if (_ref === 48) { + if (layout.length >= (i + 2 >> 0) && 49 <= layout.charCodeAt((i + 1 >> 0)) && layout.charCodeAt((i + 1 >> 0)) <= 54) { + _tmp$15 = layout.substring(0, i); _tmp$16 = (x = layout.charCodeAt((i + 1 >> 0)) - 49 << 24 >>> 24, ((x < 0 || x >= std0x.length) ? $throwRuntimeError("index out of range") : std0x[x])); _tmp$17 = layout.substring((i + 2 >> 0)); prefix = _tmp$15; std = _tmp$16; suffix = _tmp$17; + return [prefix, std, suffix]; + } + } else if (_ref === 49) { + if (layout.length >= (i + 2 >> 0) && (layout.charCodeAt((i + 1 >> 0)) === 53)) { + _tmp$18 = layout.substring(0, i); _tmp$19 = 522; _tmp$20 = layout.substring((i + 2 >> 0)); prefix = _tmp$18; std = _tmp$19; suffix = _tmp$20; + return [prefix, std, suffix]; + } + _tmp$21 = layout.substring(0, i); _tmp$22 = 259; _tmp$23 = layout.substring((i + 1 >> 0)); prefix = _tmp$21; std = _tmp$22; suffix = _tmp$23; + return [prefix, std, suffix]; + } else if (_ref === 50) { + if (layout.length >= (i + 4 >> 0) && layout.substring(i, (i + 4 >> 0)) === "2006") { + _tmp$24 = layout.substring(0, i); _tmp$25 = 273; _tmp$26 = layout.substring((i + 4 >> 0)); prefix = _tmp$24; std = _tmp$25; suffix = _tmp$26; + return [prefix, std, suffix]; + } + _tmp$27 = layout.substring(0, i); _tmp$28 = 263; _tmp$29 = layout.substring((i + 1 >> 0)); prefix = _tmp$27; std = _tmp$28; suffix = _tmp$29; + return [prefix, std, suffix]; + } else if (_ref === 95) { + if (layout.length >= (i + 2 >> 0) && (layout.charCodeAt((i + 1 >> 0)) === 50)) { + _tmp$30 = layout.substring(0, i); _tmp$31 = 264; _tmp$32 = layout.substring((i + 2 >> 0)); prefix = _tmp$30; std = _tmp$31; suffix = _tmp$32; + return [prefix, std, suffix]; + } + } else if (_ref === 51) { + _tmp$33 = layout.substring(0, i); _tmp$34 = 523; _tmp$35 = layout.substring((i + 1 >> 0)); prefix = _tmp$33; std = _tmp$34; suffix = _tmp$35; + return [prefix, std, suffix]; + } else if (_ref === 52) { + _tmp$36 = layout.substring(0, i); _tmp$37 = 525; _tmp$38 = layout.substring((i + 1 >> 0)); prefix = _tmp$36; std = _tmp$37; suffix = _tmp$38; + return [prefix, std, suffix]; + } else if (_ref === 53) { + _tmp$39 = layout.substring(0, i); _tmp$40 = 527; _tmp$41 = layout.substring((i + 1 >> 0)); prefix = _tmp$39; std = _tmp$40; suffix = _tmp$41; + return [prefix, std, suffix]; + } else if (_ref === 80) { + if (layout.length >= (i + 2 >> 0) && (layout.charCodeAt((i + 1 >> 0)) === 77)) { + _tmp$42 = layout.substring(0, i); _tmp$43 = 531; _tmp$44 = layout.substring((i + 2 >> 0)); prefix = _tmp$42; std = _tmp$43; suffix = _tmp$44; + return [prefix, std, suffix]; + } + } else if (_ref === 112) { + if (layout.length >= (i + 2 >> 0) && (layout.charCodeAt((i + 1 >> 0)) === 109)) { + _tmp$45 = layout.substring(0, i); _tmp$46 = 532; _tmp$47 = layout.substring((i + 2 >> 0)); prefix = _tmp$45; std = _tmp$46; suffix = _tmp$47; + return [prefix, std, suffix]; + } + } else if (_ref === 45) { + if (layout.length >= (i + 7 >> 0) && layout.substring(i, (i + 7 >> 0)) === "-070000") { + _tmp$48 = layout.substring(0, i); _tmp$49 = 27; _tmp$50 = layout.substring((i + 7 >> 0)); prefix = _tmp$48; std = _tmp$49; suffix = _tmp$50; + return [prefix, std, suffix]; + } + if (layout.length >= (i + 9 >> 0) && layout.substring(i, (i + 9 >> 0)) === "-07:00:00") { + _tmp$51 = layout.substring(0, i); _tmp$52 = 30; _tmp$53 = layout.substring((i + 9 >> 0)); prefix = _tmp$51; std = _tmp$52; suffix = _tmp$53; + return [prefix, std, suffix]; + } + if (layout.length >= (i + 5 >> 0) && layout.substring(i, (i + 5 >> 0)) === "-0700") { + _tmp$54 = layout.substring(0, i); _tmp$55 = 26; _tmp$56 = layout.substring((i + 5 >> 0)); prefix = _tmp$54; std = _tmp$55; suffix = _tmp$56; + return [prefix, std, suffix]; + } + if (layout.length >= (i + 6 >> 0) && layout.substring(i, (i + 6 >> 0)) === "-07:00") { + _tmp$57 = layout.substring(0, i); _tmp$58 = 29; _tmp$59 = layout.substring((i + 6 >> 0)); prefix = _tmp$57; std = _tmp$58; suffix = _tmp$59; + return [prefix, std, suffix]; + } + if (layout.length >= (i + 3 >> 0) && layout.substring(i, (i + 3 >> 0)) === "-07") { + _tmp$60 = layout.substring(0, i); _tmp$61 = 28; _tmp$62 = layout.substring((i + 3 >> 0)); prefix = _tmp$60; std = _tmp$61; suffix = _tmp$62; + return [prefix, std, suffix]; + } + } else if (_ref === 90) { + if (layout.length >= (i + 7 >> 0) && layout.substring(i, (i + 7 >> 0)) === "Z070000") { + _tmp$63 = layout.substring(0, i); _tmp$64 = 23; _tmp$65 = layout.substring((i + 7 >> 0)); prefix = _tmp$63; std = _tmp$64; suffix = _tmp$65; + return [prefix, std, suffix]; + } + if (layout.length >= (i + 9 >> 0) && layout.substring(i, (i + 9 >> 0)) === "Z07:00:00") { + _tmp$66 = layout.substring(0, i); _tmp$67 = 25; _tmp$68 = layout.substring((i + 9 >> 0)); prefix = _tmp$66; std = _tmp$67; suffix = _tmp$68; + return [prefix, std, suffix]; + } + if (layout.length >= (i + 5 >> 0) && layout.substring(i, (i + 5 >> 0)) === "Z0700") { + _tmp$69 = layout.substring(0, i); _tmp$70 = 22; _tmp$71 = layout.substring((i + 5 >> 0)); prefix = _tmp$69; std = _tmp$70; suffix = _tmp$71; + return [prefix, std, suffix]; + } + if (layout.length >= (i + 6 >> 0) && layout.substring(i, (i + 6 >> 0)) === "Z07:00") { + _tmp$72 = layout.substring(0, i); _tmp$73 = 24; _tmp$74 = layout.substring((i + 6 >> 0)); prefix = _tmp$72; std = _tmp$73; suffix = _tmp$74; + return [prefix, std, suffix]; + } + } else if (_ref === 46) { + if ((i + 1 >> 0) < layout.length && ((layout.charCodeAt((i + 1 >> 0)) === 48) || (layout.charCodeAt((i + 1 >> 0)) === 57))) { + ch = layout.charCodeAt((i + 1 >> 0)); + j = i + 1 >> 0; + while (true) { + if (!(j < layout.length && (layout.charCodeAt(j) === ch))) { break; } + j = j + (1) >> 0; + } + if (!isDigit(layout, j)) { + std$1 = 31; + if (layout.charCodeAt((i + 1 >> 0)) === 57) { + std$1 = 32; + } + std$1 = std$1 | ((((j - ((i + 1 >> 0)) >> 0)) << 16 >> 0)); + _tmp$75 = layout.substring(0, i); _tmp$76 = std$1; _tmp$77 = layout.substring(j); prefix = _tmp$75; std = _tmp$76; suffix = _tmp$77; + return [prefix, std, suffix]; + } + } + } + i = i + (1) >> 0; + } + _tmp$78 = layout; _tmp$79 = 0; _tmp$80 = ""; prefix = _tmp$78; std = _tmp$79; suffix = _tmp$80; + return [prefix, std, suffix]; + }; + match = function(s1, s2) { + var c1, c2, i, s1, s2; + i = 0; + while (true) { + if (!(i < s1.length)) { break; } + c1 = s1.charCodeAt(i); + c2 = s2.charCodeAt(i); + if (!((c1 === c2))) { + c1 = (c1 | (32)) >>> 0; + c2 = (c2 | (32)) >>> 0; + if (!((c1 === c2)) || c1 < 97 || c1 > 122) { + return false; + } + } + i = i + (1) >> 0; + } + return true; + }; + lookup = function(tab, val) { + var _i, _ref, i, tab, v, val; + _ref = tab; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + v = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (val.length >= v.length && match(val.substring(0, v.length), v)) { + return [i, val.substring(v.length), $ifaceNil]; + } + _i++; + } + return [-1, val, errBad]; + }; + appendUint = function(b, x, pad) { + var _q, _q$1, _r$1, _r$2, b, buf, n, pad, x; + if (x < 10) { + if (!((pad === 0))) { + b = $append(b, pad); + } + return $append(b, ((48 + x >>> 0) << 24 >>> 24)); + } + if (x < 100) { + b = $append(b, ((48 + (_q = x / 10, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")) >>> 0) << 24 >>> 24)); + b = $append(b, ((48 + (_r$1 = x % 10, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) >>> 0) << 24 >>> 24)); + return b; + } + buf = $clone(arrayType.zero(), arrayType); + n = 32; + if (x === 0) { + return $append(b, 48); + } + while (true) { + if (!(x >= 10)) { break; } + n = n - (1) >> 0; + (n < 0 || n >= buf.length) ? $throwRuntimeError("index out of range") : buf[n] = (((_r$2 = x % 10, _r$2 === _r$2 ? _r$2 : $throwRuntimeError("integer divide by zero")) + 48 >>> 0) << 24 >>> 24); + x = (_q$1 = x / (10), (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >>> 0 : $throwRuntimeError("integer divide by zero")); + } + n = n - (1) >> 0; + (n < 0 || n >= buf.length) ? $throwRuntimeError("index out of range") : buf[n] = ((x + 48 >>> 0) << 24 >>> 24); + return $appendSlice(b, $subslice(new sliceType$3(buf), n)); + }; + atoi = function(s) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple$1, err = $ifaceNil, neg, q, rem, s, x = 0; + neg = false; + if (!(s === "") && ((s.charCodeAt(0) === 45) || (s.charCodeAt(0) === 43))) { + neg = s.charCodeAt(0) === 45; + s = s.substring(1); + } + _tuple$1 = leadingInt(s); q = _tuple$1[0]; rem = _tuple$1[1]; err = _tuple$1[2]; + x = ((q.$low + ((q.$high >> 31) * 4294967296)) >> 0); + if (!($interfaceIsEqual(err, $ifaceNil)) || !(rem === "")) { + _tmp = 0; _tmp$1 = atoiError; x = _tmp; err = _tmp$1; + return [x, err]; + } + if (neg) { + x = -x; + } + _tmp$2 = x; _tmp$3 = $ifaceNil; x = _tmp$2; err = _tmp$3; + return [x, err]; + }; + formatNano = function(b, nanosec, n, trim) { + var _q, _r$1, b, buf, n, nanosec, start, trim, u, x; + u = nanosec; + buf = $clone(arrayType$1.zero(), arrayType$1); + start = 9; + while (true) { + if (!(start > 0)) { break; } + start = start - (1) >> 0; + (start < 0 || start >= buf.length) ? $throwRuntimeError("index out of range") : buf[start] = (((_r$1 = u % 10, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) + 48 >>> 0) << 24 >>> 24); + u = (_q = u / (10), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); + } + if (n > 9) { + n = 9; + } + if (trim) { + while (true) { + if (!(n > 0 && ((x = n - 1 >> 0, ((x < 0 || x >= buf.length) ? $throwRuntimeError("index out of range") : buf[x])) === 48))) { break; } + n = n - (1) >> 0; + } + if (n === 0) { + return b; + } + } + b = $append(b, 46); + return $appendSlice(b, $subslice(new sliceType$3(buf), 0, n)); + }; + Time.ptr.prototype.String = function() { + var t; + t = $clone(this, Time); + return t.Format("2006-01-02 15:04:05.999999999 -0700 MST"); + }; + Time.prototype.String = function() { return this.$val.String(); }; + Time.ptr.prototype.Format = function(layout) { + var _q, _q$1, _q$2, _q$3, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _ref, _tuple$1, _tuple$2, _tuple$3, _tuple$4, abs, absoffset, b, buf, day, hour, hr, hr$1, layout, m, max, min, month, name, offset, prefix, s, sec, std, suffix, t, y, y$1, year, zone$1, zone$2; + t = $clone(this, Time); + _tuple$1 = t.locabs(); name = _tuple$1[0]; offset = _tuple$1[1]; abs = _tuple$1[2]; + year = -1; + month = 0; + day = 0; + hour = -1; + min = 0; + sec = 0; + b = sliceType$3.nil; + buf = $clone(arrayType$2.zero(), arrayType$2); + max = layout.length + 10 >> 0; + if (max <= 64) { + b = $subslice(new sliceType$3(buf), 0, 0); + } else { + b = $makeSlice(sliceType$3, 0, max); + } + while (true) { + if (!(!(layout === ""))) { break; } + _tuple$2 = nextStdChunk(layout); prefix = _tuple$2[0]; std = _tuple$2[1]; suffix = _tuple$2[2]; + if (!(prefix === "")) { + b = $appendSlice(b, new sliceType$3($stringToBytes(prefix))); + } + if (std === 0) { + break; + } + layout = suffix; + if (year < 0 && !(((std & 256) === 0))) { + _tuple$3 = absDate(abs, true); year = _tuple$3[0]; month = _tuple$3[1]; day = _tuple$3[2]; + } + if (hour < 0 && !(((std & 512) === 0))) { + _tuple$4 = absClock(abs); hour = _tuple$4[0]; min = _tuple$4[1]; sec = _tuple$4[2]; + } + _ref = std & 65535; + switch (0) { default: if (_ref === 274) { + y = year; + if (y < 0) { + y = -y; + } + b = appendUint(b, ((_r$1 = y % 100, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) >>> 0), 48); + } else if (_ref === 273) { + y$1 = year; + if (year <= -1000) { + b = $append(b, 45); + y$1 = -y$1; + } else if (year <= -100) { + b = $appendSlice(b, new sliceType$3($stringToBytes("-0"))); + y$1 = -y$1; + } else if (year <= -10) { + b = $appendSlice(b, new sliceType$3($stringToBytes("-00"))); + y$1 = -y$1; + } else if (year < 0) { + b = $appendSlice(b, new sliceType$3($stringToBytes("-000"))); + y$1 = -y$1; + } else if (year < 10) { + b = $appendSlice(b, new sliceType$3($stringToBytes("000"))); + } else if (year < 100) { + b = $appendSlice(b, new sliceType$3($stringToBytes("00"))); + } else if (year < 1000) { + b = $append(b, 48); + } + b = appendUint(b, (y$1 >>> 0), 0); + } else if (_ref === 258) { + b = $appendSlice(b, new sliceType$3($stringToBytes(new Month(month).String().substring(0, 3)))); + } else if (_ref === 257) { + m = new Month(month).String(); + b = $appendSlice(b, new sliceType$3($stringToBytes(m))); + } else if (_ref === 259) { + b = appendUint(b, (month >>> 0), 0); + } else if (_ref === 260) { + b = appendUint(b, (month >>> 0), 48); + } else if (_ref === 262) { + b = $appendSlice(b, new sliceType$3($stringToBytes(new Weekday(absWeekday(abs)).String().substring(0, 3)))); + } else if (_ref === 261) { + s = new Weekday(absWeekday(abs)).String(); + b = $appendSlice(b, new sliceType$3($stringToBytes(s))); + } else if (_ref === 263) { + b = appendUint(b, (day >>> 0), 0); + } else if (_ref === 264) { + b = appendUint(b, (day >>> 0), 32); + } else if (_ref === 265) { + b = appendUint(b, (day >>> 0), 48); + } else if (_ref === 522) { + b = appendUint(b, (hour >>> 0), 48); + } else if (_ref === 523) { + hr = (_r$2 = hour % 12, _r$2 === _r$2 ? _r$2 : $throwRuntimeError("integer divide by zero")); + if (hr === 0) { + hr = 12; + } + b = appendUint(b, (hr >>> 0), 0); + } else if (_ref === 524) { + hr$1 = (_r$3 = hour % 12, _r$3 === _r$3 ? _r$3 : $throwRuntimeError("integer divide by zero")); + if (hr$1 === 0) { + hr$1 = 12; + } + b = appendUint(b, (hr$1 >>> 0), 48); + } else if (_ref === 525) { + b = appendUint(b, (min >>> 0), 0); + } else if (_ref === 526) { + b = appendUint(b, (min >>> 0), 48); + } else if (_ref === 527) { + b = appendUint(b, (sec >>> 0), 0); + } else if (_ref === 528) { + b = appendUint(b, (sec >>> 0), 48); + } else if (_ref === 531) { + if (hour >= 12) { + b = $appendSlice(b, new sliceType$3($stringToBytes("PM"))); + } else { + b = $appendSlice(b, new sliceType$3($stringToBytes("AM"))); + } + } else if (_ref === 532) { + if (hour >= 12) { + b = $appendSlice(b, new sliceType$3($stringToBytes("pm"))); + } else { + b = $appendSlice(b, new sliceType$3($stringToBytes("am"))); + } + } else if (_ref === 22 || _ref === 24 || _ref === 23 || _ref === 25 || _ref === 26 || _ref === 29 || _ref === 27 || _ref === 30) { + if ((offset === 0) && ((std === 22) || (std === 24) || (std === 23) || (std === 25))) { + b = $append(b, 90); + break; + } + zone$1 = (_q = offset / 60, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + absoffset = offset; + if (zone$1 < 0) { + b = $append(b, 45); + zone$1 = -zone$1; + absoffset = -absoffset; + } else { + b = $append(b, 43); + } + b = appendUint(b, ((_q$1 = zone$1 / 60, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")) >>> 0), 48); + if ((std === 24) || (std === 29) || (std === 25) || (std === 30)) { + b = $append(b, 58); + } + b = appendUint(b, ((_r$4 = zone$1 % 60, _r$4 === _r$4 ? _r$4 : $throwRuntimeError("integer divide by zero")) >>> 0), 48); + if ((std === 23) || (std === 27) || (std === 30) || (std === 25)) { + if ((std === 30) || (std === 25)) { + b = $append(b, 58); + } + b = appendUint(b, ((_r$5 = absoffset % 60, _r$5 === _r$5 ? _r$5 : $throwRuntimeError("integer divide by zero")) >>> 0), 48); + } + } else if (_ref === 21) { + if (!(name === "")) { + b = $appendSlice(b, new sliceType$3($stringToBytes(name))); + break; + } + zone$2 = (_q$2 = offset / 60, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero")); + if (zone$2 < 0) { + b = $append(b, 45); + zone$2 = -zone$2; + } else { + b = $append(b, 43); + } + b = appendUint(b, ((_q$3 = zone$2 / 60, (_q$3 === _q$3 && _q$3 !== 1/0 && _q$3 !== -1/0) ? _q$3 >> 0 : $throwRuntimeError("integer divide by zero")) >>> 0), 48); + b = appendUint(b, ((_r$6 = zone$2 % 60, _r$6 === _r$6 ? _r$6 : $throwRuntimeError("integer divide by zero")) >>> 0), 48); + } else if (_ref === 31 || _ref === 32) { + b = formatNano(b, (t.Nanosecond() >>> 0), std >> 16 >> 0, (std & 65535) === 32); + } } + } + return $bytesToString(b); + }; + Time.prototype.Format = function(layout) { return this.$val.Format(layout); }; + quote = function(s) { + var s; + return "\"" + s + "\""; + }; + ParseError.ptr.prototype.Error = function() { + var e; + e = this; + if (e.Message === "") { + return "parsing time " + quote(e.Value) + " as " + quote(e.Layout) + ": cannot parse " + quote(e.ValueElem) + " as " + quote(e.LayoutElem); + } + return "parsing time " + quote(e.Value) + e.Message; + }; + ParseError.prototype.Error = function() { return this.$val.Error(); }; + isDigit = function(s, i) { + var c, i, s; + if (s.length <= i) { + return false; + } + c = s.charCodeAt(i); + return 48 <= c && c <= 57; + }; + getnum = function(s, fixed) { + var fixed, s; + if (!isDigit(s, 0)) { + return [0, s, errBad]; + } + if (!isDigit(s, 1)) { + if (fixed) { + return [0, s, errBad]; + } + return [((s.charCodeAt(0) - 48 << 24 >>> 24) >> 0), s.substring(1), $ifaceNil]; + } + return [(((s.charCodeAt(0) - 48 << 24 >>> 24) >> 0) * 10 >> 0) + ((s.charCodeAt(1) - 48 << 24 >>> 24) >> 0) >> 0, s.substring(2), $ifaceNil]; + }; + cutspace = function(s) { + var s; + while (true) { + if (!(s.length > 0 && (s.charCodeAt(0) === 32))) { break; } + s = s.substring(1); + } + return s; + }; + skip = function(value, prefix) { + var prefix, value; + while (true) { + if (!(prefix.length > 0)) { break; } + if (prefix.charCodeAt(0) === 32) { + if (value.length > 0 && !((value.charCodeAt(0) === 32))) { + return [value, errBad]; + } + prefix = cutspace(prefix); + value = cutspace(value); + continue; + } + if ((value.length === 0) || !((value.charCodeAt(0) === prefix.charCodeAt(0)))) { + return [value, errBad]; + } + prefix = prefix.substring(1); + value = value.substring(1); + } + return [value, $ifaceNil]; + }; + Parse = $pkg.Parse = function(layout, value) { + var layout, value; + return parse(layout, value, $pkg.UTC, $pkg.Local); + }; + parse = function(layout, value, defaultLocation, local) { + var _ref, _ref$1, _ref$2, _ref$3, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$13, _tuple$14, _tuple$15, _tuple$16, _tuple$17, _tuple$18, _tuple$19, _tuple$2, _tuple$20, _tuple$21, _tuple$22, _tuple$23, _tuple$24, _tuple$25, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, alayout, amSet, avalue, day, defaultLocation, err, hour, hour$1, hr, i, layout, local, min, min$1, mm, month, n, n$1, name, ndigit, nsec, offset, offset$1, ok, ok$1, p, pmSet, prefix, rangeErrString, sec, seconds, sign, ss, std, stdstr, suffix, t, t$1, value, x, x$1, x$2, x$3, x$4, x$5, year, z, zoneName, zoneOffset; + _tmp = layout; _tmp$1 = value; alayout = _tmp; avalue = _tmp$1; + rangeErrString = ""; + amSet = false; + pmSet = false; + year = 0; + month = 1; + day = 1; + hour = 0; + min = 0; + sec = 0; + nsec = 0; + z = ptrType$1.nil; + zoneOffset = -1; + zoneName = ""; + while (true) { + if (!(true)) { break; } + err = $ifaceNil; + _tuple$1 = nextStdChunk(layout); prefix = _tuple$1[0]; std = _tuple$1[1]; suffix = _tuple$1[2]; + stdstr = layout.substring(prefix.length, (layout.length - suffix.length >> 0)); + _tuple$2 = skip(value, prefix); value = _tuple$2[0]; err = _tuple$2[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new Time.ptr(new $Int64(0, 0), 0, ptrType$1.nil), new ParseError.ptr(alayout, avalue, prefix, value, "")]; + } + if (std === 0) { + if (!((value.length === 0))) { + return [new Time.ptr(new $Int64(0, 0), 0, ptrType$1.nil), new ParseError.ptr(alayout, avalue, "", value, ": extra text: " + value)]; + } + break; + } + layout = suffix; + p = ""; + _ref = std & 65535; + switch (0) { default: if (_ref === 274) { + if (value.length < 2) { + err = errBad; + break; + } + _tmp$2 = value.substring(0, 2); _tmp$3 = value.substring(2); p = _tmp$2; value = _tmp$3; + _tuple$3 = atoi(p); year = _tuple$3[0]; err = _tuple$3[1]; + if (year >= 69) { + year = year + (1900) >> 0; + } else { + year = year + (2000) >> 0; + } + } else if (_ref === 273) { + if (value.length < 4 || !isDigit(value, 0)) { + err = errBad; + break; + } + _tmp$4 = value.substring(0, 4); _tmp$5 = value.substring(4); p = _tmp$4; value = _tmp$5; + _tuple$4 = atoi(p); year = _tuple$4[0]; err = _tuple$4[1]; + } else if (_ref === 258) { + _tuple$5 = lookup(shortMonthNames, value); month = _tuple$5[0]; value = _tuple$5[1]; err = _tuple$5[2]; + } else if (_ref === 257) { + _tuple$6 = lookup(longMonthNames, value); month = _tuple$6[0]; value = _tuple$6[1]; err = _tuple$6[2]; + } else if (_ref === 259 || _ref === 260) { + _tuple$7 = getnum(value, std === 260); month = _tuple$7[0]; value = _tuple$7[1]; err = _tuple$7[2]; + if (month <= 0 || 12 < month) { + rangeErrString = "month"; + } + } else if (_ref === 262) { + _tuple$8 = lookup(shortDayNames, value); value = _tuple$8[1]; err = _tuple$8[2]; + } else if (_ref === 261) { + _tuple$9 = lookup(longDayNames, value); value = _tuple$9[1]; err = _tuple$9[2]; + } else if (_ref === 263 || _ref === 264 || _ref === 265) { + if ((std === 264) && value.length > 0 && (value.charCodeAt(0) === 32)) { + value = value.substring(1); + } + _tuple$10 = getnum(value, std === 265); day = _tuple$10[0]; value = _tuple$10[1]; err = _tuple$10[2]; + if (day < 0 || 31 < day) { + rangeErrString = "day"; + } + } else if (_ref === 522) { + _tuple$11 = getnum(value, false); hour = _tuple$11[0]; value = _tuple$11[1]; err = _tuple$11[2]; + if (hour < 0 || 24 <= hour) { + rangeErrString = "hour"; + } + } else if (_ref === 523 || _ref === 524) { + _tuple$12 = getnum(value, std === 524); hour = _tuple$12[0]; value = _tuple$12[1]; err = _tuple$12[2]; + if (hour < 0 || 12 < hour) { + rangeErrString = "hour"; + } + } else if (_ref === 525 || _ref === 526) { + _tuple$13 = getnum(value, std === 526); min = _tuple$13[0]; value = _tuple$13[1]; err = _tuple$13[2]; + if (min < 0 || 60 <= min) { + rangeErrString = "minute"; + } + } else if (_ref === 527 || _ref === 528) { + _tuple$14 = getnum(value, std === 528); sec = _tuple$14[0]; value = _tuple$14[1]; err = _tuple$14[2]; + if (sec < 0 || 60 <= sec) { + rangeErrString = "second"; + } + if (value.length >= 2 && (value.charCodeAt(0) === 46) && isDigit(value, 1)) { + _tuple$15 = nextStdChunk(layout); std = _tuple$15[1]; + std = std & (65535); + if ((std === 31) || (std === 32)) { + break; + } + n = 2; + while (true) { + if (!(n < value.length && isDigit(value, n))) { break; } + n = n + (1) >> 0; + } + _tuple$16 = parseNanoseconds(value, n); nsec = _tuple$16[0]; rangeErrString = _tuple$16[1]; err = _tuple$16[2]; + value = value.substring(n); + } + } else if (_ref === 531) { + if (value.length < 2) { + err = errBad; + break; + } + _tmp$6 = value.substring(0, 2); _tmp$7 = value.substring(2); p = _tmp$6; value = _tmp$7; + _ref$1 = p; + if (_ref$1 === "PM") { + pmSet = true; + } else if (_ref$1 === "AM") { + amSet = true; + } else { + err = errBad; + } + } else if (_ref === 532) { + if (value.length < 2) { + err = errBad; + break; + } + _tmp$8 = value.substring(0, 2); _tmp$9 = value.substring(2); p = _tmp$8; value = _tmp$9; + _ref$2 = p; + if (_ref$2 === "pm") { + pmSet = true; + } else if (_ref$2 === "am") { + amSet = true; + } else { + err = errBad; + } + } else if (_ref === 22 || _ref === 24 || _ref === 23 || _ref === 25 || _ref === 26 || _ref === 28 || _ref === 29 || _ref === 27 || _ref === 30) { + if (((std === 22) || (std === 24)) && value.length >= 1 && (value.charCodeAt(0) === 90)) { + value = value.substring(1); + z = $pkg.UTC; + break; + } + _tmp$10 = ""; _tmp$11 = ""; _tmp$12 = ""; _tmp$13 = ""; sign = _tmp$10; hour$1 = _tmp$11; min$1 = _tmp$12; seconds = _tmp$13; + if ((std === 24) || (std === 29)) { + if (value.length < 6) { + err = errBad; + break; + } + if (!((value.charCodeAt(3) === 58))) { + err = errBad; + break; + } + _tmp$14 = value.substring(0, 1); _tmp$15 = value.substring(1, 3); _tmp$16 = value.substring(4, 6); _tmp$17 = "00"; _tmp$18 = value.substring(6); sign = _tmp$14; hour$1 = _tmp$15; min$1 = _tmp$16; seconds = _tmp$17; value = _tmp$18; + } else if (std === 28) { + if (value.length < 3) { + err = errBad; + break; + } + _tmp$19 = value.substring(0, 1); _tmp$20 = value.substring(1, 3); _tmp$21 = "00"; _tmp$22 = "00"; _tmp$23 = value.substring(3); sign = _tmp$19; hour$1 = _tmp$20; min$1 = _tmp$21; seconds = _tmp$22; value = _tmp$23; + } else if ((std === 25) || (std === 30)) { + if (value.length < 9) { + err = errBad; + break; + } + if (!((value.charCodeAt(3) === 58)) || !((value.charCodeAt(6) === 58))) { + err = errBad; + break; + } + _tmp$24 = value.substring(0, 1); _tmp$25 = value.substring(1, 3); _tmp$26 = value.substring(4, 6); _tmp$27 = value.substring(7, 9); _tmp$28 = value.substring(9); sign = _tmp$24; hour$1 = _tmp$25; min$1 = _tmp$26; seconds = _tmp$27; value = _tmp$28; + } else if ((std === 23) || (std === 27)) { + if (value.length < 7) { + err = errBad; + break; + } + _tmp$29 = value.substring(0, 1); _tmp$30 = value.substring(1, 3); _tmp$31 = value.substring(3, 5); _tmp$32 = value.substring(5, 7); _tmp$33 = value.substring(7); sign = _tmp$29; hour$1 = _tmp$30; min$1 = _tmp$31; seconds = _tmp$32; value = _tmp$33; + } else { + if (value.length < 5) { + err = errBad; + break; + } + _tmp$34 = value.substring(0, 1); _tmp$35 = value.substring(1, 3); _tmp$36 = value.substring(3, 5); _tmp$37 = "00"; _tmp$38 = value.substring(5); sign = _tmp$34; hour$1 = _tmp$35; min$1 = _tmp$36; seconds = _tmp$37; value = _tmp$38; + } + _tmp$39 = 0; _tmp$40 = 0; _tmp$41 = 0; hr = _tmp$39; mm = _tmp$40; ss = _tmp$41; + _tuple$17 = atoi(hour$1); hr = _tuple$17[0]; err = _tuple$17[1]; + if ($interfaceIsEqual(err, $ifaceNil)) { + _tuple$18 = atoi(min$1); mm = _tuple$18[0]; err = _tuple$18[1]; + } + if ($interfaceIsEqual(err, $ifaceNil)) { + _tuple$19 = atoi(seconds); ss = _tuple$19[0]; err = _tuple$19[1]; + } + zoneOffset = ((((hr * 60 >> 0) + mm >> 0)) * 60 >> 0) + ss >> 0; + _ref$3 = sign.charCodeAt(0); + if (_ref$3 === 43) { + } else if (_ref$3 === 45) { + zoneOffset = -zoneOffset; + } else { + err = errBad; + } + } else if (_ref === 21) { + if (value.length >= 3 && value.substring(0, 3) === "UTC") { + z = $pkg.UTC; + value = value.substring(3); + break; + } + _tuple$20 = parseTimeZone(value); n$1 = _tuple$20[0]; ok = _tuple$20[1]; + if (!ok) { + err = errBad; + break; + } + _tmp$42 = value.substring(0, n$1); _tmp$43 = value.substring(n$1); zoneName = _tmp$42; value = _tmp$43; + } else if (_ref === 31) { + ndigit = 1 + ((std >> 16 >> 0)) >> 0; + if (value.length < ndigit) { + err = errBad; + break; + } + _tuple$21 = parseNanoseconds(value, ndigit); nsec = _tuple$21[0]; rangeErrString = _tuple$21[1]; err = _tuple$21[2]; + value = value.substring(ndigit); + } else if (_ref === 32) { + if (value.length < 2 || !((value.charCodeAt(0) === 46)) || value.charCodeAt(1) < 48 || 57 < value.charCodeAt(1)) { + break; + } + i = 0; + while (true) { + if (!(i < 9 && (i + 1 >> 0) < value.length && 48 <= value.charCodeAt((i + 1 >> 0)) && value.charCodeAt((i + 1 >> 0)) <= 57)) { break; } + i = i + (1) >> 0; + } + _tuple$22 = parseNanoseconds(value, 1 + i >> 0); nsec = _tuple$22[0]; rangeErrString = _tuple$22[1]; err = _tuple$22[2]; + value = value.substring((1 + i >> 0)); + } } + if (!(rangeErrString === "")) { + return [new Time.ptr(new $Int64(0, 0), 0, ptrType$1.nil), new ParseError.ptr(alayout, avalue, stdstr, value, ": " + rangeErrString + " out of range")]; + } + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new Time.ptr(new $Int64(0, 0), 0, ptrType$1.nil), new ParseError.ptr(alayout, avalue, stdstr, value, "")]; + } + } + if (pmSet && hour < 12) { + hour = hour + (12) >> 0; + } else if (amSet && (hour === 12)) { + hour = 0; + } + if (!(z === ptrType$1.nil)) { + return [Date(year, (month >> 0), day, hour, min, sec, nsec, z), $ifaceNil]; + } + if (!((zoneOffset === -1))) { + t = $clone(Date(year, (month >> 0), day, hour, min, sec, nsec, $pkg.UTC), Time); + t.sec = (x = t.sec, x$1 = new $Int64(0, zoneOffset), new $Int64(x.$high - x$1.$high, x.$low - x$1.$low)); + _tuple$23 = local.lookup((x$2 = t.sec, new $Int64(x$2.$high + -15, x$2.$low + 2288912640))); name = _tuple$23[0]; offset = _tuple$23[1]; + if ((offset === zoneOffset) && (zoneName === "" || name === zoneName)) { + t.loc = local; + return [t, $ifaceNil]; + } + t.loc = FixedZone(zoneName, zoneOffset); + return [t, $ifaceNil]; + } + if (!(zoneName === "")) { + t$1 = $clone(Date(year, (month >> 0), day, hour, min, sec, nsec, $pkg.UTC), Time); + _tuple$24 = local.lookupName(zoneName, (x$3 = t$1.sec, new $Int64(x$3.$high + -15, x$3.$low + 2288912640))); offset$1 = _tuple$24[0]; ok$1 = _tuple$24[2]; + if (ok$1) { + t$1.sec = (x$4 = t$1.sec, x$5 = new $Int64(0, offset$1), new $Int64(x$4.$high - x$5.$high, x$4.$low - x$5.$low)); + t$1.loc = local; + return [t$1, $ifaceNil]; + } + if (zoneName.length > 3 && zoneName.substring(0, 3) === "GMT") { + _tuple$25 = atoi(zoneName.substring(3)); offset$1 = _tuple$25[0]; + offset$1 = offset$1 * (3600) >> 0; + } + t$1.loc = FixedZone(zoneName, offset$1); + return [t$1, $ifaceNil]; + } + return [Date(year, (month >> 0), day, hour, min, sec, nsec, defaultLocation), $ifaceNil]; + }; + parseTimeZone = function(value) { + var _ref, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, c, length = 0, nUpper, ok = false, value; + if (value.length < 3) { + _tmp = 0; _tmp$1 = false; length = _tmp; ok = _tmp$1; + return [length, ok]; + } + if (value.length >= 4 && (value.substring(0, 4) === "ChST" || value.substring(0, 4) === "MeST")) { + _tmp$2 = 4; _tmp$3 = true; length = _tmp$2; ok = _tmp$3; + return [length, ok]; + } + if (value.substring(0, 3) === "GMT") { + length = parseGMT(value); + _tmp$4 = length; _tmp$5 = true; length = _tmp$4; ok = _tmp$5; + return [length, ok]; + } + nUpper = 0; + nUpper = 0; + while (true) { + if (!(nUpper < 6)) { break; } + if (nUpper >= value.length) { + break; + } + c = value.charCodeAt(nUpper); + if (c < 65 || 90 < c) { + break; + } + nUpper = nUpper + (1) >> 0; + } + _ref = nUpper; + if (_ref === 0 || _ref === 1 || _ref === 2 || _ref === 6) { + _tmp$6 = 0; _tmp$7 = false; length = _tmp$6; ok = _tmp$7; + return [length, ok]; + } else if (_ref === 5) { + if (value.charCodeAt(4) === 84) { + _tmp$8 = 5; _tmp$9 = true; length = _tmp$8; ok = _tmp$9; + return [length, ok]; + } + } else if (_ref === 4) { + if (value.charCodeAt(3) === 84) { + _tmp$10 = 4; _tmp$11 = true; length = _tmp$10; ok = _tmp$11; + return [length, ok]; + } + } else if (_ref === 3) { + _tmp$12 = 3; _tmp$13 = true; length = _tmp$12; ok = _tmp$13; + return [length, ok]; + } + _tmp$14 = 0; _tmp$15 = false; length = _tmp$14; ok = _tmp$15; + return [length, ok]; + }; + parseGMT = function(value) { + var _tuple$1, err, rem, sign, value, x; + value = value.substring(3); + if (value.length === 0) { + return 3; + } + sign = value.charCodeAt(0); + if (!((sign === 45)) && !((sign === 43))) { + return 3; + } + _tuple$1 = leadingInt(value.substring(1)); x = _tuple$1[0]; rem = _tuple$1[1]; err = _tuple$1[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return 3; + } + if (sign === 45) { + x = new $Int64(-x.$high, -x.$low); + } + if ((x.$high === 0 && x.$low === 0) || (x.$high < -1 || (x.$high === -1 && x.$low < 4294967282)) || (0 < x.$high || (0 === x.$high && 12 < x.$low))) { + return 3; + } + return (3 + value.length >> 0) - rem.length >> 0; + }; + parseNanoseconds = function(value, nbytes) { + var _tuple$1, err = $ifaceNil, i, nbytes, ns = 0, rangeErrString = "", scaleDigits, value; + if (!((value.charCodeAt(0) === 46))) { + err = errBad; + return [ns, rangeErrString, err]; + } + _tuple$1 = atoi(value.substring(1, nbytes)); ns = _tuple$1[0]; err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [ns, rangeErrString, err]; + } + if (ns < 0 || 1000000000 <= ns) { + rangeErrString = "fractional second"; + return [ns, rangeErrString, err]; + } + scaleDigits = 10 - nbytes >> 0; + i = 0; + while (true) { + if (!(i < scaleDigits)) { break; } + ns = ns * (10) >> 0; + i = i + (1) >> 0; + } + return [ns, rangeErrString, err]; + }; + leadingInt = function(s) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, c, err = $ifaceNil, i, rem = "", s, x = new $Int64(0, 0), x$1, x$2, x$3; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + c = s.charCodeAt(i); + if (c < 48 || c > 57) { + break; + } + if ((x.$high > 214748364 || (x.$high === 214748364 && x.$low >= 3435973835))) { + _tmp = new $Int64(0, 0); _tmp$1 = ""; _tmp$2 = errLeadingInt; x = _tmp; rem = _tmp$1; err = _tmp$2; + return [x, rem, err]; + } + x = (x$1 = (x$2 = $mul64(x, new $Int64(0, 10)), x$3 = new $Int64(0, c), new $Int64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)), new $Int64(x$1.$high - 0, x$1.$low - 48)); + i = i + (1) >> 0; + } + _tmp$3 = x; _tmp$4 = s.substring(i); _tmp$5 = $ifaceNil; x = _tmp$3; rem = _tmp$4; err = _tmp$5; + return [x, rem, err]; + }; + Time.ptr.prototype.After = function(u) { + var t, u, x, x$1, x$2, x$3; + t = $clone(this, Time); + u = $clone(u, Time); + return (x = t.sec, x$1 = u.sec, (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low > x$1.$low))) || (x$2 = t.sec, x$3 = u.sec, (x$2.$high === x$3.$high && x$2.$low === x$3.$low)) && t.nsec > u.nsec; + }; + Time.prototype.After = function(u) { return this.$val.After(u); }; + Time.ptr.prototype.Before = function(u) { + var t, u, x, x$1, x$2, x$3; + t = $clone(this, Time); + u = $clone(u, Time); + return (x = t.sec, x$1 = u.sec, (x.$high < x$1.$high || (x.$high === x$1.$high && x.$low < x$1.$low))) || (x$2 = t.sec, x$3 = u.sec, (x$2.$high === x$3.$high && x$2.$low === x$3.$low)) && t.nsec < u.nsec; + }; + Time.prototype.Before = function(u) { return this.$val.Before(u); }; + Time.ptr.prototype.Equal = function(u) { + var t, u, x, x$1; + t = $clone(this, Time); + u = $clone(u, Time); + return (x = t.sec, x$1 = u.sec, (x.$high === x$1.$high && x.$low === x$1.$low)) && (t.nsec === u.nsec); + }; + Time.prototype.Equal = function(u) { return this.$val.Equal(u); }; + Month.prototype.String = function() { + var m, x; + m = this.$val; + return (x = m - 1 >> 0, ((x < 0 || x >= months.length) ? $throwRuntimeError("index out of range") : months[x])); + }; + $ptrType(Month).prototype.String = function() { return new Month(this.$get()).String(); }; + Weekday.prototype.String = function() { + var d; + d = this.$val; + return ((d < 0 || d >= days.length) ? $throwRuntimeError("index out of range") : days[d]); + }; + $ptrType(Weekday).prototype.String = function() { return new Weekday(this.$get()).String(); }; + Time.ptr.prototype.IsZero = function() { + var t, x; + t = $clone(this, Time); + return (x = t.sec, (x.$high === 0 && x.$low === 0)) && (t.nsec === 0); + }; + Time.prototype.IsZero = function() { return this.$val.IsZero(); }; + Time.ptr.prototype.abs = function() { + var _tuple$1, l, offset, sec, t, x, x$1, x$2, x$3, x$4, x$5; + t = $clone(this, Time); + l = t.loc; + if (l === ptrType$1.nil || l === localLoc) { + l = l.get(); + } + sec = (x = t.sec, new $Int64(x.$high + -15, x.$low + 2288912640)); + if (!(l === utcLoc)) { + if (!(l.cacheZone === ptrType.nil) && (x$1 = l.cacheStart, (x$1.$high < sec.$high || (x$1.$high === sec.$high && x$1.$low <= sec.$low))) && (x$2 = l.cacheEnd, (sec.$high < x$2.$high || (sec.$high === x$2.$high && sec.$low < x$2.$low)))) { + sec = (x$3 = new $Int64(0, l.cacheZone.offset), new $Int64(sec.$high + x$3.$high, sec.$low + x$3.$low)); + } else { + _tuple$1 = l.lookup(sec); offset = _tuple$1[1]; + sec = (x$4 = new $Int64(0, offset), new $Int64(sec.$high + x$4.$high, sec.$low + x$4.$low)); + } + } + return (x$5 = new $Int64(sec.$high + 2147483646, sec.$low + 450480384), new $Uint64(x$5.$high, x$5.$low)); + }; + Time.prototype.abs = function() { return this.$val.abs(); }; + Time.ptr.prototype.locabs = function() { + var _tuple$1, abs = new $Uint64(0, 0), l, name = "", offset = 0, sec, t, x, x$1, x$2, x$3, x$4; + t = $clone(this, Time); + l = t.loc; + if (l === ptrType$1.nil || l === localLoc) { + l = l.get(); + } + sec = (x = t.sec, new $Int64(x.$high + -15, x.$low + 2288912640)); + if (!(l === utcLoc)) { + if (!(l.cacheZone === ptrType.nil) && (x$1 = l.cacheStart, (x$1.$high < sec.$high || (x$1.$high === sec.$high && x$1.$low <= sec.$low))) && (x$2 = l.cacheEnd, (sec.$high < x$2.$high || (sec.$high === x$2.$high && sec.$low < x$2.$low)))) { + name = l.cacheZone.name; + offset = l.cacheZone.offset; + } else { + _tuple$1 = l.lookup(sec); name = _tuple$1[0]; offset = _tuple$1[1]; + } + sec = (x$3 = new $Int64(0, offset), new $Int64(sec.$high + x$3.$high, sec.$low + x$3.$low)); + } else { + name = "UTC"; + } + abs = (x$4 = new $Int64(sec.$high + 2147483646, sec.$low + 450480384), new $Uint64(x$4.$high, x$4.$low)); + return [name, offset, abs]; + }; + Time.prototype.locabs = function() { return this.$val.locabs(); }; + Time.ptr.prototype.Date = function() { + var _tuple$1, day = 0, month = 0, t, year = 0; + t = $clone(this, Time); + _tuple$1 = t.date(true); year = _tuple$1[0]; month = _tuple$1[1]; day = _tuple$1[2]; + return [year, month, day]; + }; + Time.prototype.Date = function() { return this.$val.Date(); }; + Time.ptr.prototype.Year = function() { + var _tuple$1, t, year; + t = $clone(this, Time); + _tuple$1 = t.date(false); year = _tuple$1[0]; + return year; + }; + Time.prototype.Year = function() { return this.$val.Year(); }; + Time.ptr.prototype.Month = function() { + var _tuple$1, month, t; + t = $clone(this, Time); + _tuple$1 = t.date(true); month = _tuple$1[1]; + return month; + }; + Time.prototype.Month = function() { return this.$val.Month(); }; + Time.ptr.prototype.Day = function() { + var _tuple$1, day, t; + t = $clone(this, Time); + _tuple$1 = t.date(true); day = _tuple$1[2]; + return day; + }; + Time.prototype.Day = function() { return this.$val.Day(); }; + Time.ptr.prototype.Weekday = function() { + var t; + t = $clone(this, Time); + return absWeekday(t.abs()); + }; + Time.prototype.Weekday = function() { return this.$val.Weekday(); }; + absWeekday = function(abs) { + var _q, abs, sec; + sec = $div64((new $Uint64(abs.$high + 0, abs.$low + 86400)), new $Uint64(0, 604800), true); + return ((_q = (sec.$low >> 0) / 86400, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0); + }; + Time.ptr.prototype.ISOWeek = function() { + var _q, _r$1, _r$2, _r$3, _tuple$1, day, dec31wday, jan1wday, month, t, wday, week = 0, yday, year = 0; + t = $clone(this, Time); + _tuple$1 = t.date(true); year = _tuple$1[0]; month = _tuple$1[1]; day = _tuple$1[2]; yday = _tuple$1[3]; + wday = (_r$1 = ((t.Weekday() + 6 >> 0) >> 0) % 7, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")); + week = (_q = (((yday - wday >> 0) + 7 >> 0)) / 7, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + jan1wday = (_r$2 = (((wday - yday >> 0) + 371 >> 0)) % 7, _r$2 === _r$2 ? _r$2 : $throwRuntimeError("integer divide by zero")); + if (1 <= jan1wday && jan1wday <= 3) { + week = week + (1) >> 0; + } + if (week === 0) { + year = year - (1) >> 0; + week = 52; + if ((jan1wday === 4) || ((jan1wday === 5) && isLeap(year))) { + week = week + (1) >> 0; + } + } + if ((month === 12) && day >= 29 && wday < 3) { + dec31wday = (_r$3 = (((wday + 31 >> 0) - day >> 0)) % 7, _r$3 === _r$3 ? _r$3 : $throwRuntimeError("integer divide by zero")); + if (0 <= dec31wday && dec31wday <= 2) { + year = year + (1) >> 0; + week = 1; + } + } + return [year, week]; + }; + Time.prototype.ISOWeek = function() { return this.$val.ISOWeek(); }; + Time.ptr.prototype.Clock = function() { + var _tuple$1, hour = 0, min = 0, sec = 0, t; + t = $clone(this, Time); + _tuple$1 = absClock(t.abs()); hour = _tuple$1[0]; min = _tuple$1[1]; sec = _tuple$1[2]; + return [hour, min, sec]; + }; + Time.prototype.Clock = function() { return this.$val.Clock(); }; + absClock = function(abs) { + var _q, _q$1, abs, hour = 0, min = 0, sec = 0; + sec = ($div64(abs, new $Uint64(0, 86400), true).$low >> 0); + hour = (_q = sec / 3600, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + sec = sec - ((hour * 3600 >> 0)) >> 0; + min = (_q$1 = sec / 60, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")); + sec = sec - ((min * 60 >> 0)) >> 0; + return [hour, min, sec]; + }; + Time.ptr.prototype.Hour = function() { + var _q, t; + t = $clone(this, Time); + return (_q = ($div64(t.abs(), new $Uint64(0, 86400), true).$low >> 0) / 3600, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + }; + Time.prototype.Hour = function() { return this.$val.Hour(); }; + Time.ptr.prototype.Minute = function() { + var _q, t; + t = $clone(this, Time); + return (_q = ($div64(t.abs(), new $Uint64(0, 3600), true).$low >> 0) / 60, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + }; + Time.prototype.Minute = function() { return this.$val.Minute(); }; + Time.ptr.prototype.Second = function() { + var t; + t = $clone(this, Time); + return ($div64(t.abs(), new $Uint64(0, 60), true).$low >> 0); + }; + Time.prototype.Second = function() { return this.$val.Second(); }; + Time.ptr.prototype.Nanosecond = function() { + var t; + t = $clone(this, Time); + return (t.nsec >> 0); + }; + Time.prototype.Nanosecond = function() { return this.$val.Nanosecond(); }; + Time.ptr.prototype.YearDay = function() { + var _tuple$1, t, yday; + t = $clone(this, Time); + _tuple$1 = t.date(false); yday = _tuple$1[3]; + return yday + 1 >> 0; + }; + Time.prototype.YearDay = function() { return this.$val.YearDay(); }; + Duration.prototype.String = function() { + var _tuple$1, _tuple$2, buf, d, neg, prec, u, w; + d = this; + buf = $clone(arrayType.zero(), arrayType); + w = 32; + u = new $Uint64(d.$high, d.$low); + neg = (d.$high < 0 || (d.$high === 0 && d.$low < 0)); + if (neg) { + u = new $Uint64(-u.$high, -u.$low); + } + if ((u.$high < 0 || (u.$high === 0 && u.$low < 1000000000))) { + prec = 0; + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 115; + w = w - (1) >> 0; + if ((u.$high === 0 && u.$low === 0)) { + return "0"; + } else if ((u.$high < 0 || (u.$high === 0 && u.$low < 1000))) { + prec = 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 110; + } else if ((u.$high < 0 || (u.$high === 0 && u.$low < 1000000))) { + prec = 3; + w = w - (1) >> 0; + $copyString($subslice(new sliceType$3(buf), w), "\xC2\xB5"); + } else { + prec = 6; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 109; + } + _tuple$1 = fmtFrac($subslice(new sliceType$3(buf), 0, w), u, prec); w = _tuple$1[0]; u = _tuple$1[1]; + w = fmtInt($subslice(new sliceType$3(buf), 0, w), u); + } else { + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 115; + _tuple$2 = fmtFrac($subslice(new sliceType$3(buf), 0, w), u, 9); w = _tuple$2[0]; u = _tuple$2[1]; + w = fmtInt($subslice(new sliceType$3(buf), 0, w), $div64(u, new $Uint64(0, 60), true)); + u = $div64(u, (new $Uint64(0, 60)), false); + if ((u.$high > 0 || (u.$high === 0 && u.$low > 0))) { + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 109; + w = fmtInt($subslice(new sliceType$3(buf), 0, w), $div64(u, new $Uint64(0, 60), true)); + u = $div64(u, (new $Uint64(0, 60)), false); + if ((u.$high > 0 || (u.$high === 0 && u.$low > 0))) { + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 104; + w = fmtInt($subslice(new sliceType$3(buf), 0, w), u); + } + } + } + if (neg) { + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 45; + } + return $bytesToString($subslice(new sliceType$3(buf), w)); + }; + $ptrType(Duration).prototype.String = function() { return this.$get().String(); }; + fmtFrac = function(buf, v, prec) { + var _tmp, _tmp$1, buf, digit, i, nv = new $Uint64(0, 0), nw = 0, prec, print, v, w; + w = buf.$length; + print = false; + i = 0; + while (true) { + if (!(i < prec)) { break; } + digit = $div64(v, new $Uint64(0, 10), true); + print = print || !((digit.$high === 0 && digit.$low === 0)); + if (print) { + w = w - (1) >> 0; + (w < 0 || w >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + w] = (digit.$low << 24 >>> 24) + 48 << 24 >>> 24; + } + v = $div64(v, (new $Uint64(0, 10)), false); + i = i + (1) >> 0; + } + if (print) { + w = w - (1) >> 0; + (w < 0 || w >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + w] = 46; + } + _tmp = w; _tmp$1 = v; nw = _tmp; nv = _tmp$1; + return [nw, nv]; + }; + fmtInt = function(buf, v) { + var buf, v, w; + w = buf.$length; + if ((v.$high === 0 && v.$low === 0)) { + w = w - (1) >> 0; + (w < 0 || w >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + w] = 48; + } else { + while (true) { + if (!((v.$high > 0 || (v.$high === 0 && v.$low > 0)))) { break; } + w = w - (1) >> 0; + (w < 0 || w >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + w] = ($div64(v, new $Uint64(0, 10), true).$low << 24 >>> 24) + 48 << 24 >>> 24; + v = $div64(v, (new $Uint64(0, 10)), false); + } + } + return w; + }; + Duration.prototype.Nanoseconds = function() { + var d; + d = this; + return new $Int64(d.$high, d.$low); + }; + $ptrType(Duration).prototype.Nanoseconds = function() { return this.$get().Nanoseconds(); }; + Duration.prototype.Seconds = function() { + var d, nsec, sec; + d = this; + sec = $div64(d, new Duration(0, 1000000000), false); + nsec = $div64(d, new Duration(0, 1000000000), true); + return $flatten64(sec) + $flatten64(nsec) * 1e-09; + }; + $ptrType(Duration).prototype.Seconds = function() { return this.$get().Seconds(); }; + Duration.prototype.Minutes = function() { + var d, min, nsec; + d = this; + min = $div64(d, new Duration(13, 4165425152), false); + nsec = $div64(d, new Duration(13, 4165425152), true); + return $flatten64(min) + $flatten64(nsec) * 1.6666666666666667e-11; + }; + $ptrType(Duration).prototype.Minutes = function() { return this.$get().Minutes(); }; + Duration.prototype.Hours = function() { + var d, hour, nsec; + d = this; + hour = $div64(d, new Duration(838, 817405952), false); + nsec = $div64(d, new Duration(838, 817405952), true); + return $flatten64(hour) + $flatten64(nsec) * 2.777777777777778e-13; + }; + $ptrType(Duration).prototype.Hours = function() { return this.$get().Hours(); }; + Time.ptr.prototype.Add = function(d) { + var d, nsec, t, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7; + t = $clone(this, Time); + t.sec = (x = t.sec, x$1 = (x$2 = $div64(d, new Duration(0, 1000000000), false), new $Int64(x$2.$high, x$2.$low)), new $Int64(x.$high + x$1.$high, x.$low + x$1.$low)); + nsec = t.nsec + ((x$3 = $div64(d, new Duration(0, 1000000000), true), x$3.$low + ((x$3.$high >> 31) * 4294967296)) >> 0) >> 0; + if (nsec >= 1000000000) { + t.sec = (x$4 = t.sec, x$5 = new $Int64(0, 1), new $Int64(x$4.$high + x$5.$high, x$4.$low + x$5.$low)); + nsec = nsec - (1000000000) >> 0; + } else if (nsec < 0) { + t.sec = (x$6 = t.sec, x$7 = new $Int64(0, 1), new $Int64(x$6.$high - x$7.$high, x$6.$low - x$7.$low)); + nsec = nsec + (1000000000) >> 0; + } + t.nsec = nsec; + return t; + }; + Time.prototype.Add = function(d) { return this.$val.Add(d); }; + Time.ptr.prototype.Sub = function(u) { + var d, t, u, x, x$1, x$2, x$3, x$4; + t = $clone(this, Time); + u = $clone(u, Time); + d = (x = $mul64((x$1 = (x$2 = t.sec, x$3 = u.sec, new $Int64(x$2.$high - x$3.$high, x$2.$low - x$3.$low)), new Duration(x$1.$high, x$1.$low)), new Duration(0, 1000000000)), x$4 = new Duration(0, (t.nsec - u.nsec >> 0)), new Duration(x.$high + x$4.$high, x.$low + x$4.$low)); + if (u.Add(d).Equal(t)) { + return d; + } else if (t.Before(u)) { + return new Duration(-2147483648, 0); + } else { + return new Duration(2147483647, 4294967295); + } + }; + Time.prototype.Sub = function(u) { return this.$val.Sub(u); }; + Time.ptr.prototype.AddDate = function(years, months$1, days$1) { + var _tuple$1, _tuple$2, day, days$1, hour, min, month, months$1, sec, t, year, years; + t = $clone(this, Time); + _tuple$1 = t.Date(); year = _tuple$1[0]; month = _tuple$1[1]; day = _tuple$1[2]; + _tuple$2 = t.Clock(); hour = _tuple$2[0]; min = _tuple$2[1]; sec = _tuple$2[2]; + return Date(year + years >> 0, month + (months$1 >> 0) >> 0, day + days$1 >> 0, hour, min, sec, (t.nsec >> 0), t.loc); + }; + Time.prototype.AddDate = function(years, months$1, days$1) { return this.$val.AddDate(years, months$1, days$1); }; + Time.ptr.prototype.date = function(full) { + var _tuple$1, day = 0, full, month = 0, t, yday = 0, year = 0; + t = $clone(this, Time); + _tuple$1 = absDate(t.abs(), full); year = _tuple$1[0]; month = _tuple$1[1]; day = _tuple$1[2]; yday = _tuple$1[3]; + return [year, month, day, yday]; + }; + Time.prototype.date = function(full) { return this.$val.date(full); }; + absDate = function(abs, full) { + var _q, abs, begin, d, day = 0, end, full, month = 0, n, x, x$1, x$10, x$11, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, y, yday = 0, year = 0; + d = $div64(abs, new $Uint64(0, 86400), false); + n = $div64(d, new $Uint64(0, 146097), false); + y = $mul64(new $Uint64(0, 400), n); + d = (x = $mul64(new $Uint64(0, 146097), n), new $Uint64(d.$high - x.$high, d.$low - x.$low)); + n = $div64(d, new $Uint64(0, 36524), false); + n = (x$1 = $shiftRightUint64(n, 2), new $Uint64(n.$high - x$1.$high, n.$low - x$1.$low)); + y = (x$2 = $mul64(new $Uint64(0, 100), n), new $Uint64(y.$high + x$2.$high, y.$low + x$2.$low)); + d = (x$3 = $mul64(new $Uint64(0, 36524), n), new $Uint64(d.$high - x$3.$high, d.$low - x$3.$low)); + n = $div64(d, new $Uint64(0, 1461), false); + y = (x$4 = $mul64(new $Uint64(0, 4), n), new $Uint64(y.$high + x$4.$high, y.$low + x$4.$low)); + d = (x$5 = $mul64(new $Uint64(0, 1461), n), new $Uint64(d.$high - x$5.$high, d.$low - x$5.$low)); + n = $div64(d, new $Uint64(0, 365), false); + n = (x$6 = $shiftRightUint64(n, 2), new $Uint64(n.$high - x$6.$high, n.$low - x$6.$low)); + y = (x$7 = n, new $Uint64(y.$high + x$7.$high, y.$low + x$7.$low)); + d = (x$8 = $mul64(new $Uint64(0, 365), n), new $Uint64(d.$high - x$8.$high, d.$low - x$8.$low)); + year = ((x$9 = (x$10 = new $Int64(y.$high, y.$low), new $Int64(x$10.$high + -69, x$10.$low + 4075721025)), x$9.$low + ((x$9.$high >> 31) * 4294967296)) >> 0); + yday = (d.$low >> 0); + if (!full) { + return [year, month, day, yday]; + } + day = yday; + if (isLeap(year)) { + if (day > 59) { + day = day - (1) >> 0; + } else if (day === 59) { + month = 2; + day = 29; + return [year, month, day, yday]; + } + } + month = ((_q = day / 31, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0); + end = ((x$11 = month + 1 >> 0, ((x$11 < 0 || x$11 >= daysBefore.length) ? $throwRuntimeError("index out of range") : daysBefore[x$11])) >> 0); + begin = 0; + if (day >= end) { + month = month + (1) >> 0; + begin = end; + } else { + begin = (((month < 0 || month >= daysBefore.length) ? $throwRuntimeError("index out of range") : daysBefore[month]) >> 0); + } + month = month + (1) >> 0; + day = (day - begin >> 0) + 1 >> 0; + return [year, month, day, yday]; + }; + Time.ptr.prototype.UTC = function() { + var t; + t = $clone(this, Time); + t.loc = $pkg.UTC; + return t; + }; + Time.prototype.UTC = function() { return this.$val.UTC(); }; + Time.ptr.prototype.Local = function() { + var t; + t = $clone(this, Time); + t.loc = $pkg.Local; + return t; + }; + Time.prototype.Local = function() { return this.$val.Local(); }; + Time.ptr.prototype.In = function(loc) { + var loc, t; + t = $clone(this, Time); + if (loc === ptrType$1.nil) { + $panic(new $String("time: missing Location in call to Time.In")); + } + t.loc = loc; + return t; + }; + Time.prototype.In = function(loc) { return this.$val.In(loc); }; + Time.ptr.prototype.Location = function() { + var l, t; + t = $clone(this, Time); + l = t.loc; + if (l === ptrType$1.nil) { + l = $pkg.UTC; + } + return l; + }; + Time.prototype.Location = function() { return this.$val.Location(); }; + Time.ptr.prototype.Zone = function() { + var _tuple$1, name = "", offset = 0, t, x; + t = $clone(this, Time); + _tuple$1 = t.loc.lookup((x = t.sec, new $Int64(x.$high + -15, x.$low + 2288912640))); name = _tuple$1[0]; offset = _tuple$1[1]; + return [name, offset]; + }; + Time.prototype.Zone = function() { return this.$val.Zone(); }; + Time.ptr.prototype.Unix = function() { + var t, x; + t = $clone(this, Time); + return (x = t.sec, new $Int64(x.$high + -15, x.$low + 2288912640)); + }; + Time.prototype.Unix = function() { return this.$val.Unix(); }; + Time.ptr.prototype.UnixNano = function() { + var t, x, x$1, x$2; + t = $clone(this, Time); + return (x = $mul64(((x$1 = t.sec, new $Int64(x$1.$high + -15, x$1.$low + 2288912640))), new $Int64(0, 1000000000)), x$2 = new $Int64(0, t.nsec), new $Int64(x.$high + x$2.$high, x.$low + x$2.$low)); + }; + Time.prototype.UnixNano = function() { return this.$val.UnixNano(); }; + Time.ptr.prototype.MarshalBinary = function() { + var _q, _r$1, _tuple$1, enc, offset, offsetMin, t; + t = $clone(this, Time); + offsetMin = 0; + if (t.Location() === utcLoc) { + offsetMin = -1; + } else { + _tuple$1 = t.Zone(); offset = _tuple$1[1]; + if (!(((_r$1 = offset % 60, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) === 0))) { + return [sliceType$3.nil, errors.New("Time.MarshalBinary: zone offset has fractional minute")]; + } + offset = (_q = offset / (60), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + if (offset < -32768 || (offset === -1) || offset > 32767) { + return [sliceType$3.nil, errors.New("Time.MarshalBinary: unexpected zone offset")]; + } + offsetMin = (offset << 16 >> 16); + } + enc = new sliceType$3([1, ($shiftRightInt64(t.sec, 56).$low << 24 >>> 24), ($shiftRightInt64(t.sec, 48).$low << 24 >>> 24), ($shiftRightInt64(t.sec, 40).$low << 24 >>> 24), ($shiftRightInt64(t.sec, 32).$low << 24 >>> 24), ($shiftRightInt64(t.sec, 24).$low << 24 >>> 24), ($shiftRightInt64(t.sec, 16).$low << 24 >>> 24), ($shiftRightInt64(t.sec, 8).$low << 24 >>> 24), (t.sec.$low << 24 >>> 24), ((t.nsec >> 24 >> 0) << 24 >>> 24), ((t.nsec >> 16 >> 0) << 24 >>> 24), ((t.nsec >> 8 >> 0) << 24 >>> 24), (t.nsec << 24 >>> 24), ((offsetMin >> 8 << 16 >> 16) << 24 >>> 24), (offsetMin << 24 >>> 24)]); + return [enc, $ifaceNil]; + }; + Time.prototype.MarshalBinary = function() { return this.$val.MarshalBinary(); }; + Time.ptr.prototype.UnmarshalBinary = function(data$1) { + var _tuple$1, buf, data$1, localoff, offset, t, x, x$1, x$10, x$11, x$12, x$13, x$14, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + t = this; + buf = data$1; + if (buf.$length === 0) { + return errors.New("Time.UnmarshalBinary: no data"); + } + if (!((((0 < 0 || 0 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 0]) === 1))) { + return errors.New("Time.UnmarshalBinary: unsupported version"); + } + if (!((buf.$length === 15))) { + return errors.New("Time.UnmarshalBinary: invalid length"); + } + buf = $subslice(buf, 1); + t.sec = (x = (x$1 = (x$2 = (x$3 = (x$4 = (x$5 = (x$6 = new $Int64(0, ((7 < 0 || 7 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 7])), x$7 = $shiftLeft64(new $Int64(0, ((6 < 0 || 6 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 6])), 8), new $Int64(x$6.$high | x$7.$high, (x$6.$low | x$7.$low) >>> 0)), x$8 = $shiftLeft64(new $Int64(0, ((5 < 0 || 5 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 5])), 16), new $Int64(x$5.$high | x$8.$high, (x$5.$low | x$8.$low) >>> 0)), x$9 = $shiftLeft64(new $Int64(0, ((4 < 0 || 4 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 4])), 24), new $Int64(x$4.$high | x$9.$high, (x$4.$low | x$9.$low) >>> 0)), x$10 = $shiftLeft64(new $Int64(0, ((3 < 0 || 3 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 3])), 32), new $Int64(x$3.$high | x$10.$high, (x$3.$low | x$10.$low) >>> 0)), x$11 = $shiftLeft64(new $Int64(0, ((2 < 0 || 2 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 2])), 40), new $Int64(x$2.$high | x$11.$high, (x$2.$low | x$11.$low) >>> 0)), x$12 = $shiftLeft64(new $Int64(0, ((1 < 0 || 1 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 1])), 48), new $Int64(x$1.$high | x$12.$high, (x$1.$low | x$12.$low) >>> 0)), x$13 = $shiftLeft64(new $Int64(0, ((0 < 0 || 0 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 0])), 56), new $Int64(x.$high | x$13.$high, (x.$low | x$13.$low) >>> 0)); + buf = $subslice(buf, 8); + t.nsec = (((((3 < 0 || 3 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 3]) >> 0) | ((((2 < 0 || 2 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 2]) >> 0) << 8 >> 0)) | ((((1 < 0 || 1 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 1]) >> 0) << 16 >> 0)) | ((((0 < 0 || 0 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 0]) >> 0) << 24 >> 0); + buf = $subslice(buf, 4); + offset = (((((1 < 0 || 1 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 1]) << 16 >> 16) | ((((0 < 0 || 0 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 0]) << 16 >> 16) << 8 << 16 >> 16)) >> 0) * 60 >> 0; + if (offset === -60) { + t.loc = utcLoc; + } else { + _tuple$1 = $pkg.Local.lookup((x$14 = t.sec, new $Int64(x$14.$high + -15, x$14.$low + 2288912640))); localoff = _tuple$1[1]; + if (offset === localoff) { + t.loc = $pkg.Local; + } else { + t.loc = FixedZone("", offset); + } + } + return $ifaceNil; + }; + Time.prototype.UnmarshalBinary = function(data$1) { return this.$val.UnmarshalBinary(data$1); }; + Time.ptr.prototype.GobEncode = function() { + var t; + t = $clone(this, Time); + return t.MarshalBinary(); + }; + Time.prototype.GobEncode = function() { return this.$val.GobEncode(); }; + Time.ptr.prototype.GobDecode = function(data$1) { + var data$1, t; + t = this; + return t.UnmarshalBinary(data$1); + }; + Time.prototype.GobDecode = function(data$1) { return this.$val.GobDecode(data$1); }; + Time.ptr.prototype.MarshalJSON = function() { + var t, y; + t = $clone(this, Time); + y = t.Year(); + if (y < 0 || y >= 10000) { + return [sliceType$3.nil, errors.New("Time.MarshalJSON: year outside of range [0,9999]")]; + } + return [new sliceType$3($stringToBytes(t.Format("\"2006-01-02T15:04:05.999999999Z07:00\""))), $ifaceNil]; + }; + Time.prototype.MarshalJSON = function() { return this.$val.MarshalJSON(); }; + Time.ptr.prototype.UnmarshalJSON = function(data$1) { + var _tuple$1, data$1, err = $ifaceNil, t; + t = this; + _tuple$1 = Parse("\"2006-01-02T15:04:05Z07:00\"", $bytesToString(data$1)); $copy(t, _tuple$1[0], Time); err = _tuple$1[1]; + return err; + }; + Time.prototype.UnmarshalJSON = function(data$1) { return this.$val.UnmarshalJSON(data$1); }; + Time.ptr.prototype.MarshalText = function() { + var t, y; + t = $clone(this, Time); + y = t.Year(); + if (y < 0 || y >= 10000) { + return [sliceType$3.nil, errors.New("Time.MarshalText: year outside of range [0,9999]")]; + } + return [new sliceType$3($stringToBytes(t.Format("2006-01-02T15:04:05.999999999Z07:00"))), $ifaceNil]; + }; + Time.prototype.MarshalText = function() { return this.$val.MarshalText(); }; + Time.ptr.prototype.UnmarshalText = function(data$1) { + var _tuple$1, data$1, err = $ifaceNil, t; + t = this; + _tuple$1 = Parse("2006-01-02T15:04:05Z07:00", $bytesToString(data$1)); $copy(t, _tuple$1[0], Time); err = _tuple$1[1]; + return err; + }; + Time.prototype.UnmarshalText = function(data$1) { return this.$val.UnmarshalText(data$1); }; + Unix = $pkg.Unix = function(sec, nsec) { + var n, nsec, sec, x, x$1, x$2, x$3; + if ((nsec.$high < 0 || (nsec.$high === 0 && nsec.$low < 0)) || (nsec.$high > 0 || (nsec.$high === 0 && nsec.$low >= 1000000000))) { + n = $div64(nsec, new $Int64(0, 1000000000), false); + sec = (x = n, new $Int64(sec.$high + x.$high, sec.$low + x.$low)); + nsec = (x$1 = $mul64(n, new $Int64(0, 1000000000)), new $Int64(nsec.$high - x$1.$high, nsec.$low - x$1.$low)); + if ((nsec.$high < 0 || (nsec.$high === 0 && nsec.$low < 0))) { + nsec = (x$2 = new $Int64(0, 1000000000), new $Int64(nsec.$high + x$2.$high, nsec.$low + x$2.$low)); + sec = (x$3 = new $Int64(0, 1), new $Int64(sec.$high - x$3.$high, sec.$low - x$3.$low)); + } + } + return new Time.ptr(new $Int64(sec.$high + 14, sec.$low + 2006054656), ((nsec.$low + ((nsec.$high >> 31) * 4294967296)) >> 0), $pkg.Local); + }; + isLeap = function(year) { + var _r$1, _r$2, _r$3, year; + return ((_r$1 = year % 4, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) === 0) && (!(((_r$2 = year % 100, _r$2 === _r$2 ? _r$2 : $throwRuntimeError("integer divide by zero")) === 0)) || ((_r$3 = year % 400, _r$3 === _r$3 ? _r$3 : $throwRuntimeError("integer divide by zero")) === 0)); + }; + norm = function(hi, lo, base) { + var _q, _q$1, _tmp, _tmp$1, base, hi, lo, n, n$1, nhi = 0, nlo = 0; + if (lo < 0) { + n = (_q = ((-lo - 1 >> 0)) / base, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) + 1 >> 0; + hi = hi - (n) >> 0; + lo = lo + ((n * base >> 0)) >> 0; + } + if (lo >= base) { + n$1 = (_q$1 = lo / base, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")); + hi = hi + (n$1) >> 0; + lo = lo - ((n$1 * base >> 0)) >> 0; + } + _tmp = hi; _tmp$1 = lo; nhi = _tmp; nlo = _tmp$1; + return [nhi, nlo]; + }; + Date = $pkg.Date = function(year, month, day, hour, min, sec, nsec, loc) { + var _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, abs, d, day, end, hour, loc, m, min, month, n, nsec, offset, sec, start, unix, utc, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, y, year; + if (loc === ptrType$1.nil) { + $panic(new $String("time: missing Location in call to Date")); + } + m = (month >> 0) - 1 >> 0; + _tuple$1 = norm(year, m, 12); year = _tuple$1[0]; m = _tuple$1[1]; + month = (m >> 0) + 1 >> 0; + _tuple$2 = norm(sec, nsec, 1000000000); sec = _tuple$2[0]; nsec = _tuple$2[1]; + _tuple$3 = norm(min, sec, 60); min = _tuple$3[0]; sec = _tuple$3[1]; + _tuple$4 = norm(hour, min, 60); hour = _tuple$4[0]; min = _tuple$4[1]; + _tuple$5 = norm(day, hour, 24); day = _tuple$5[0]; hour = _tuple$5[1]; + y = (x = (x$1 = new $Int64(0, year), new $Int64(x$1.$high - -69, x$1.$low - 4075721025)), new $Uint64(x.$high, x.$low)); + n = $div64(y, new $Uint64(0, 400), false); + y = (x$2 = $mul64(new $Uint64(0, 400), n), new $Uint64(y.$high - x$2.$high, y.$low - x$2.$low)); + d = $mul64(new $Uint64(0, 146097), n); + n = $div64(y, new $Uint64(0, 100), false); + y = (x$3 = $mul64(new $Uint64(0, 100), n), new $Uint64(y.$high - x$3.$high, y.$low - x$3.$low)); + d = (x$4 = $mul64(new $Uint64(0, 36524), n), new $Uint64(d.$high + x$4.$high, d.$low + x$4.$low)); + n = $div64(y, new $Uint64(0, 4), false); + y = (x$5 = $mul64(new $Uint64(0, 4), n), new $Uint64(y.$high - x$5.$high, y.$low - x$5.$low)); + d = (x$6 = $mul64(new $Uint64(0, 1461), n), new $Uint64(d.$high + x$6.$high, d.$low + x$6.$low)); + n = y; + d = (x$7 = $mul64(new $Uint64(0, 365), n), new $Uint64(d.$high + x$7.$high, d.$low + x$7.$low)); + d = (x$8 = new $Uint64(0, (x$9 = month - 1 >> 0, ((x$9 < 0 || x$9 >= daysBefore.length) ? $throwRuntimeError("index out of range") : daysBefore[x$9]))), new $Uint64(d.$high + x$8.$high, d.$low + x$8.$low)); + if (isLeap(year) && month >= 3) { + d = (x$10 = new $Uint64(0, 1), new $Uint64(d.$high + x$10.$high, d.$low + x$10.$low)); + } + d = (x$11 = new $Uint64(0, (day - 1 >> 0)), new $Uint64(d.$high + x$11.$high, d.$low + x$11.$low)); + abs = $mul64(d, new $Uint64(0, 86400)); + abs = (x$12 = new $Uint64(0, (((hour * 3600 >> 0) + (min * 60 >> 0) >> 0) + sec >> 0)), new $Uint64(abs.$high + x$12.$high, abs.$low + x$12.$low)); + unix = (x$13 = new $Int64(abs.$high, abs.$low), new $Int64(x$13.$high + -2147483647, x$13.$low + 3844486912)); + _tuple$6 = loc.lookup(unix); offset = _tuple$6[1]; start = _tuple$6[3]; end = _tuple$6[4]; + if (!((offset === 0))) { + utc = (x$14 = new $Int64(0, offset), new $Int64(unix.$high - x$14.$high, unix.$low - x$14.$low)); + if ((utc.$high < start.$high || (utc.$high === start.$high && utc.$low < start.$low))) { + _tuple$7 = loc.lookup(new $Int64(start.$high - 0, start.$low - 1)); offset = _tuple$7[1]; + } else if ((utc.$high > end.$high || (utc.$high === end.$high && utc.$low >= end.$low))) { + _tuple$8 = loc.lookup(end); offset = _tuple$8[1]; + } + unix = (x$15 = new $Int64(0, offset), new $Int64(unix.$high - x$15.$high, unix.$low - x$15.$low)); + } + return new Time.ptr(new $Int64(unix.$high + 14, unix.$low + 2006054656), (nsec >> 0), loc); + }; + Time.ptr.prototype.Truncate = function(d) { + var _tuple$1, d, r, t; + t = $clone(this, Time); + if ((d.$high < 0 || (d.$high === 0 && d.$low <= 0))) { + return t; + } + _tuple$1 = div(t, d); r = _tuple$1[1]; + return t.Add(new Duration(-r.$high, -r.$low)); + }; + Time.prototype.Truncate = function(d) { return this.$val.Truncate(d); }; + Time.ptr.prototype.Round = function(d) { + var _tuple$1, d, r, t, x; + t = $clone(this, Time); + if ((d.$high < 0 || (d.$high === 0 && d.$low <= 0))) { + return t; + } + _tuple$1 = div(t, d); r = _tuple$1[1]; + if ((x = new Duration(r.$high + r.$high, r.$low + r.$low), (x.$high < d.$high || (x.$high === d.$high && x.$low < d.$low)))) { + return t.Add(new Duration(-r.$high, -r.$low)); + } + return t.Add(new Duration(d.$high - r.$high, d.$low - r.$low)); + }; + Time.prototype.Round = function(d) { return this.$val.Round(d); }; + div = function(t, d) { + var _q, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, d, d0, d1, d1$1, neg, nsec, qmod2 = 0, r = new Duration(0, 0), sec, t, tmp, u0, u0x, u1, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + t = $clone(t, Time); + neg = false; + nsec = t.nsec; + if ((x = t.sec, (x.$high < 0 || (x.$high === 0 && x.$low < 0)))) { + neg = true; + t.sec = (x$1 = t.sec, new $Int64(-x$1.$high, -x$1.$low)); + nsec = -nsec; + if (nsec < 0) { + nsec = nsec + (1000000000) >> 0; + t.sec = (x$2 = t.sec, x$3 = new $Int64(0, 1), new $Int64(x$2.$high - x$3.$high, x$2.$low - x$3.$low)); + } + } + if ((d.$high < 0 || (d.$high === 0 && d.$low < 1000000000)) && (x$4 = $div64(new Duration(0, 1000000000), (new Duration(d.$high + d.$high, d.$low + d.$low)), true), (x$4.$high === 0 && x$4.$low === 0))) { + qmod2 = ((_q = nsec / ((d.$low + ((d.$high >> 31) * 4294967296)) >> 0), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0) & 1; + r = new Duration(0, (_r$1 = nsec % ((d.$low + ((d.$high >> 31) * 4294967296)) >> 0), _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero"))); + } else if ((x$5 = $div64(d, new Duration(0, 1000000000), true), (x$5.$high === 0 && x$5.$low === 0))) { + d1 = (x$6 = $div64(d, new Duration(0, 1000000000), false), new $Int64(x$6.$high, x$6.$low)); + qmod2 = ((x$7 = $div64(t.sec, d1, false), x$7.$low + ((x$7.$high >> 31) * 4294967296)) >> 0) & 1; + r = (x$8 = $mul64((x$9 = $div64(t.sec, d1, true), new Duration(x$9.$high, x$9.$low)), new Duration(0, 1000000000)), x$10 = new Duration(0, nsec), new Duration(x$8.$high + x$10.$high, x$8.$low + x$10.$low)); + } else { + sec = (x$11 = t.sec, new $Uint64(x$11.$high, x$11.$low)); + tmp = $mul64(($shiftRightUint64(sec, 32)), new $Uint64(0, 1000000000)); + u1 = $shiftRightUint64(tmp, 32); + u0 = $shiftLeft64(tmp, 32); + tmp = $mul64(new $Uint64(sec.$high & 0, (sec.$low & 4294967295) >>> 0), new $Uint64(0, 1000000000)); + _tmp = u0; _tmp$1 = new $Uint64(u0.$high + tmp.$high, u0.$low + tmp.$low); u0x = _tmp; u0 = _tmp$1; + if ((u0.$high < u0x.$high || (u0.$high === u0x.$high && u0.$low < u0x.$low))) { + u1 = (x$12 = new $Uint64(0, 1), new $Uint64(u1.$high + x$12.$high, u1.$low + x$12.$low)); + } + _tmp$2 = u0; _tmp$3 = (x$13 = new $Uint64(0, nsec), new $Uint64(u0.$high + x$13.$high, u0.$low + x$13.$low)); u0x = _tmp$2; u0 = _tmp$3; + if ((u0.$high < u0x.$high || (u0.$high === u0x.$high && u0.$low < u0x.$low))) { + u1 = (x$14 = new $Uint64(0, 1), new $Uint64(u1.$high + x$14.$high, u1.$low + x$14.$low)); + } + d1$1 = new $Uint64(d.$high, d.$low); + while (true) { + if (!(!((x$15 = $shiftRightUint64(d1$1, 63), (x$15.$high === 0 && x$15.$low === 1))))) { break; } + d1$1 = $shiftLeft64(d1$1, (1)); + } + d0 = new $Uint64(0, 0); + while (true) { + if (!(true)) { break; } + qmod2 = 0; + if ((u1.$high > d1$1.$high || (u1.$high === d1$1.$high && u1.$low > d1$1.$low)) || (u1.$high === d1$1.$high && u1.$low === d1$1.$low) && (u0.$high > d0.$high || (u0.$high === d0.$high && u0.$low >= d0.$low))) { + qmod2 = 1; + _tmp$4 = u0; _tmp$5 = new $Uint64(u0.$high - d0.$high, u0.$low - d0.$low); u0x = _tmp$4; u0 = _tmp$5; + if ((u0.$high > u0x.$high || (u0.$high === u0x.$high && u0.$low > u0x.$low))) { + u1 = (x$16 = new $Uint64(0, 1), new $Uint64(u1.$high - x$16.$high, u1.$low - x$16.$low)); + } + u1 = (x$17 = d1$1, new $Uint64(u1.$high - x$17.$high, u1.$low - x$17.$low)); + } + if ((d1$1.$high === 0 && d1$1.$low === 0) && (x$18 = new $Uint64(d.$high, d.$low), (d0.$high === x$18.$high && d0.$low === x$18.$low))) { + break; + } + d0 = $shiftRightUint64(d0, (1)); + d0 = (x$19 = $shiftLeft64((new $Uint64(d1$1.$high & 0, (d1$1.$low & 1) >>> 0)), 63), new $Uint64(d0.$high | x$19.$high, (d0.$low | x$19.$low) >>> 0)); + d1$1 = $shiftRightUint64(d1$1, (1)); + } + r = new Duration(u0.$high, u0.$low); + } + if (neg && !((r.$high === 0 && r.$low === 0))) { + qmod2 = (qmod2 ^ (1)) >> 0; + r = new Duration(d.$high - r.$high, d.$low - r.$low); + } + return [qmod2, r]; + }; + Location.ptr.prototype.get = function() { + var l; + l = this; + if (l === ptrType$1.nil) { + return utcLoc; + } + if (l === localLoc) { + localOnce.Do(initLocal); + } + return l; + }; + Location.prototype.get = function() { return this.$val.get(); }; + Location.ptr.prototype.String = function() { + var l; + l = this; + return l.get().name; + }; + Location.prototype.String = function() { return this.$val.String(); }; + FixedZone = $pkg.FixedZone = function(name, offset) { + var l, name, offset, x; + l = new Location.ptr(name, new sliceType$1([new zone.ptr(name, offset, false)]), new sliceType$2([new zoneTrans.ptr(new $Int64(-2147483648, 0), 0, false, false)]), new $Int64(-2147483648, 0), new $Int64(2147483647, 4294967295), ptrType.nil); + l.cacheZone = (x = l.zone, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])); + return l; + }; + Location.ptr.prototype.lookup = function(sec) { + var _q, end = new $Int64(0, 0), hi, isDST = false, l, lim, lo, m, name = "", offset = 0, sec, start = new $Int64(0, 0), tx, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, zone$1, zone$2, zone$3; + l = this; + l = l.get(); + if (l.zone.$length === 0) { + name = "UTC"; + offset = 0; + isDST = false; + start = new $Int64(-2147483648, 0); + end = new $Int64(2147483647, 4294967295); + return [name, offset, isDST, start, end]; + } + zone$1 = l.cacheZone; + if (!(zone$1 === ptrType.nil) && (x = l.cacheStart, (x.$high < sec.$high || (x.$high === sec.$high && x.$low <= sec.$low))) && (x$1 = l.cacheEnd, (sec.$high < x$1.$high || (sec.$high === x$1.$high && sec.$low < x$1.$low)))) { + name = zone$1.name; + offset = zone$1.offset; + isDST = zone$1.isDST; + start = l.cacheStart; + end = l.cacheEnd; + return [name, offset, isDST, start, end]; + } + if ((l.tx.$length === 0) || (x$2 = (x$3 = l.tx, ((0 < 0 || 0 >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + 0])).when, (sec.$high < x$2.$high || (sec.$high === x$2.$high && sec.$low < x$2.$low)))) { + zone$2 = (x$4 = l.zone, x$5 = l.lookupFirstZone(), ((x$5 < 0 || x$5 >= x$4.$length) ? $throwRuntimeError("index out of range") : x$4.$array[x$4.$offset + x$5])); + name = zone$2.name; + offset = zone$2.offset; + isDST = zone$2.isDST; + start = new $Int64(-2147483648, 0); + if (l.tx.$length > 0) { + end = (x$6 = l.tx, ((0 < 0 || 0 >= x$6.$length) ? $throwRuntimeError("index out of range") : x$6.$array[x$6.$offset + 0])).when; + } else { + end = new $Int64(2147483647, 4294967295); + } + return [name, offset, isDST, start, end]; + } + tx = l.tx; + end = new $Int64(2147483647, 4294967295); + lo = 0; + hi = tx.$length; + while (true) { + if (!((hi - lo >> 0) > 1)) { break; } + m = lo + (_q = ((hi - lo >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0; + lim = ((m < 0 || m >= tx.$length) ? $throwRuntimeError("index out of range") : tx.$array[tx.$offset + m]).when; + if ((sec.$high < lim.$high || (sec.$high === lim.$high && sec.$low < lim.$low))) { + end = lim; + hi = m; + } else { + lo = m; + } + } + zone$3 = (x$7 = l.zone, x$8 = ((lo < 0 || lo >= tx.$length) ? $throwRuntimeError("index out of range") : tx.$array[tx.$offset + lo]).index, ((x$8 < 0 || x$8 >= x$7.$length) ? $throwRuntimeError("index out of range") : x$7.$array[x$7.$offset + x$8])); + name = zone$3.name; + offset = zone$3.offset; + isDST = zone$3.isDST; + start = ((lo < 0 || lo >= tx.$length) ? $throwRuntimeError("index out of range") : tx.$array[tx.$offset + lo]).when; + return [name, offset, isDST, start, end]; + }; + Location.prototype.lookup = function(sec) { return this.$val.lookup(sec); }; + Location.ptr.prototype.lookupFirstZone = function() { + var _i, _ref, l, x, x$1, x$2, x$3, x$4, x$5, zi, zi$1; + l = this; + if (!l.firstZoneUsed()) { + return 0; + } + if (l.tx.$length > 0 && (x = l.zone, x$1 = (x$2 = l.tx, ((0 < 0 || 0 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + 0])).index, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])).isDST) { + zi = ((x$3 = l.tx, ((0 < 0 || 0 >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + 0])).index >> 0) - 1 >> 0; + while (true) { + if (!(zi >= 0)) { break; } + if (!(x$4 = l.zone, ((zi < 0 || zi >= x$4.$length) ? $throwRuntimeError("index out of range") : x$4.$array[x$4.$offset + zi])).isDST) { + return zi; + } + zi = zi - (1) >> 0; + } + } + _ref = l.zone; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + zi$1 = _i; + if (!(x$5 = l.zone, ((zi$1 < 0 || zi$1 >= x$5.$length) ? $throwRuntimeError("index out of range") : x$5.$array[x$5.$offset + zi$1])).isDST) { + return zi$1; + } + _i++; + } + return 0; + }; + Location.prototype.lookupFirstZone = function() { return this.$val.lookupFirstZone(); }; + Location.ptr.prototype.firstZoneUsed = function() { + var _i, _ref, l, tx; + l = this; + _ref = l.tx; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + tx = $clone(((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]), zoneTrans); + if (tx.index === 0) { + return true; + } + _i++; + } + return false; + }; + Location.prototype.firstZoneUsed = function() { return this.$val.firstZoneUsed(); }; + Location.ptr.prototype.lookupName = function(name, unix) { + var _i, _i$1, _ref, _ref$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple$1, i, i$1, isDST = false, isDST$1, l, nam, name, offset = 0, offset$1, ok = false, unix, x, x$1, x$2, zone$1, zone$2; + l = this; + l = l.get(); + _ref = l.zone; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + zone$1 = (x = l.zone, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + if (zone$1.name === name) { + _tuple$1 = l.lookup((x$1 = new $Int64(0, zone$1.offset), new $Int64(unix.$high - x$1.$high, unix.$low - x$1.$low))); nam = _tuple$1[0]; offset$1 = _tuple$1[1]; isDST$1 = _tuple$1[2]; + if (nam === zone$1.name) { + _tmp = offset$1; _tmp$1 = isDST$1; _tmp$2 = true; offset = _tmp; isDST = _tmp$1; ok = _tmp$2; + return [offset, isDST, ok]; + } + } + _i++; + } + _ref$1 = l.zone; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i$1 = _i$1; + zone$2 = (x$2 = l.zone, ((i$1 < 0 || i$1 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + i$1])); + if (zone$2.name === name) { + _tmp$3 = zone$2.offset; _tmp$4 = zone$2.isDST; _tmp$5 = true; offset = _tmp$3; isDST = _tmp$4; ok = _tmp$5; + return [offset, isDST, ok]; + } + _i$1++; + } + return [offset, isDST, ok]; + }; + Location.prototype.lookupName = function(name, unix) { return this.$val.lookupName(name, unix); }; + ptrType$2.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + Time.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "After", name: "After", pkg: "", typ: $funcType([Time], [$Bool], false)}, {prop: "Before", name: "Before", pkg: "", typ: $funcType([Time], [$Bool], false)}, {prop: "Equal", name: "Equal", pkg: "", typ: $funcType([Time], [$Bool], false)}, {prop: "IsZero", name: "IsZero", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "abs", name: "abs", pkg: "time", typ: $funcType([], [$Uint64], false)}, {prop: "locabs", name: "locabs", pkg: "time", typ: $funcType([], [$String, $Int, $Uint64], false)}, {prop: "Date", name: "Date", pkg: "", typ: $funcType([], [$Int, Month, $Int], false)}, {prop: "Year", name: "Year", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Month", name: "Month", pkg: "", typ: $funcType([], [Month], false)}, {prop: "Day", name: "Day", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Weekday", name: "Weekday", pkg: "", typ: $funcType([], [Weekday], false)}, {prop: "ISOWeek", name: "ISOWeek", pkg: "", typ: $funcType([], [$Int, $Int], false)}, {prop: "Clock", name: "Clock", pkg: "", typ: $funcType([], [$Int, $Int, $Int], false)}, {prop: "Hour", name: "Hour", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Minute", name: "Minute", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Second", name: "Second", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Nanosecond", name: "Nanosecond", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "YearDay", name: "YearDay", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([Duration], [Time], false)}, {prop: "Sub", name: "Sub", pkg: "", typ: $funcType([Time], [Duration], false)}, {prop: "AddDate", name: "AddDate", pkg: "", typ: $funcType([$Int, $Int, $Int], [Time], false)}, {prop: "date", name: "date", pkg: "time", typ: $funcType([$Bool], [$Int, Month, $Int, $Int], false)}, {prop: "UTC", name: "UTC", pkg: "", typ: $funcType([], [Time], false)}, {prop: "Local", name: "Local", pkg: "", typ: $funcType([], [Time], false)}, {prop: "In", name: "In", pkg: "", typ: $funcType([ptrType$1], [Time], false)}, {prop: "Location", name: "Location", pkg: "", typ: $funcType([], [ptrType$1], false)}, {prop: "Zone", name: "Zone", pkg: "", typ: $funcType([], [$String, $Int], false)}, {prop: "Unix", name: "Unix", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "UnixNano", name: "UnixNano", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "MarshalBinary", name: "MarshalBinary", pkg: "", typ: $funcType([], [sliceType$3, $error], false)}, {prop: "GobEncode", name: "GobEncode", pkg: "", typ: $funcType([], [sliceType$3, $error], false)}, {prop: "MarshalJSON", name: "MarshalJSON", pkg: "", typ: $funcType([], [sliceType$3, $error], false)}, {prop: "MarshalText", name: "MarshalText", pkg: "", typ: $funcType([], [sliceType$3, $error], false)}, {prop: "Truncate", name: "Truncate", pkg: "", typ: $funcType([Duration], [Time], false)}, {prop: "Round", name: "Round", pkg: "", typ: $funcType([Duration], [Time], false)}]; + ptrType$5.methods = [{prop: "UnmarshalBinary", name: "UnmarshalBinary", pkg: "", typ: $funcType([sliceType$3], [$error], false)}, {prop: "GobDecode", name: "GobDecode", pkg: "", typ: $funcType([sliceType$3], [$error], false)}, {prop: "UnmarshalJSON", name: "UnmarshalJSON", pkg: "", typ: $funcType([sliceType$3], [$error], false)}, {prop: "UnmarshalText", name: "UnmarshalText", pkg: "", typ: $funcType([sliceType$3], [$error], false)}]; + Month.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + Weekday.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + Duration.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Nanoseconds", name: "Nanoseconds", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Seconds", name: "Seconds", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Minutes", name: "Minutes", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Hours", name: "Hours", pkg: "", typ: $funcType([], [$Float64], false)}]; + ptrType$1.methods = [{prop: "get", name: "get", pkg: "time", typ: $funcType([], [ptrType$1], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "lookup", name: "lookup", pkg: "time", typ: $funcType([$Int64], [$String, $Int, $Bool, $Int64, $Int64], false)}, {prop: "lookupFirstZone", name: "lookupFirstZone", pkg: "time", typ: $funcType([], [$Int], false)}, {prop: "firstZoneUsed", name: "firstZoneUsed", pkg: "time", typ: $funcType([], [$Bool], false)}, {prop: "lookupName", name: "lookupName", pkg: "time", typ: $funcType([$String, $Int64], [$Int, $Bool, $Bool], false)}]; + ParseError.init([{prop: "Layout", name: "Layout", pkg: "", typ: $String, tag: ""}, {prop: "Value", name: "Value", pkg: "", typ: $String, tag: ""}, {prop: "LayoutElem", name: "LayoutElem", pkg: "", typ: $String, tag: ""}, {prop: "ValueElem", name: "ValueElem", pkg: "", typ: $String, tag: ""}, {prop: "Message", name: "Message", pkg: "", typ: $String, tag: ""}]); + Time.init([{prop: "sec", name: "sec", pkg: "time", typ: $Int64, tag: ""}, {prop: "nsec", name: "nsec", pkg: "time", typ: $Int32, tag: ""}, {prop: "loc", name: "loc", pkg: "time", typ: ptrType$1, tag: ""}]); + Location.init([{prop: "name", name: "name", pkg: "time", typ: $String, tag: ""}, {prop: "zone", name: "zone", pkg: "time", typ: sliceType$1, tag: ""}, {prop: "tx", name: "tx", pkg: "time", typ: sliceType$2, tag: ""}, {prop: "cacheStart", name: "cacheStart", pkg: "time", typ: $Int64, tag: ""}, {prop: "cacheEnd", name: "cacheEnd", pkg: "time", typ: $Int64, tag: ""}, {prop: "cacheZone", name: "cacheZone", pkg: "time", typ: ptrType, tag: ""}]); + zone.init([{prop: "name", name: "name", pkg: "time", typ: $String, tag: ""}, {prop: "offset", name: "offset", pkg: "time", typ: $Int, tag: ""}, {prop: "isDST", name: "isDST", pkg: "time", typ: $Bool, tag: ""}]); + zoneTrans.init([{prop: "when", name: "when", pkg: "time", typ: $Int64, tag: ""}, {prop: "index", name: "index", pkg: "time", typ: $Uint8, tag: ""}, {prop: "isstd", name: "isstd", pkg: "time", typ: $Bool, tag: ""}, {prop: "isutc", name: "isutc", pkg: "time", typ: $Bool, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_time = function() { while (true) { switch ($s) { case 0: + $r = errors.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = js.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = nosync.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = runtime.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = strings.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + $r = syscall.$init($BLOCKING); /* */ $s = 6; case 6: if ($r && $r.$blocking) { $r = $r(); } + localLoc = new Location.ptr(); + localOnce = new nosync.Once.ptr(); + std0x = $toNativeArray($kindInt, [260, 265, 524, 526, 528, 274]); + longDayNames = new sliceType(["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]); + shortDayNames = new sliceType(["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]); + shortMonthNames = new sliceType(["---", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]); + longMonthNames = new sliceType(["---", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]); + atoiError = errors.New("time: invalid number"); + errBad = errors.New("bad value for field"); + errLeadingInt = errors.New("time: bad [0-9]*"); + months = $toNativeArray($kindString, ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]); + days = $toNativeArray($kindString, ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]); + daysBefore = $toNativeArray($kindInt32, [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365]); + utcLoc = new Location.ptr("UTC", sliceType$1.nil, sliceType$2.nil, new $Int64(0, 0), new $Int64(0, 0), ptrType.nil); + $pkg.UTC = utcLoc; + $pkg.Local = localLoc; + _r = syscall.Getenv("ZONEINFO", $BLOCKING); /* */ $s = 7; case 7: if (_r && _r.$blocking) { _r = _r(); } + _tuple = _r; zoneinfo = _tuple[0]; + badData = errors.New("malformed time zone information"); + zoneDirs = new sliceType(["/usr/share/zoneinfo/", "/usr/share/lib/zoneinfo/", "/usr/lib/locale/TZ/", runtime.GOROOT() + "/lib/time/zoneinfo.zip"]); + /* */ } return; } }; $init_time.$blocking = true; return $init_time; + }; + return $pkg; +})(); +$packages["os"] = (function() { + var $pkg = {}, errors, js, io, runtime, sync, atomic, syscall, time, PathError, SyscallError, LinkError, File, file, dirInfo, FileInfo, FileMode, fileStat, sliceType, ptrType, sliceType$1, sliceType$2, ptrType$2, ptrType$3, ptrType$4, arrayType, ptrType$11, funcType$1, ptrType$12, ptrType$14, ptrType$15, errFinished, lstat, useSyscallwd, supportsCloseOnExec, runtime_args, init, NewSyscallError, IsNotExist, isNotExist, fixCount, sigpipe, syscallMode, NewFile, epipecheck, Lstat, basename, init$1, useSyscallwdDarwin, init$2, fileInfoFromStat, timespecToTime, init$3; + errors = $packages["errors"]; + js = $packages["github.com/gopherjs/gopherjs/js"]; + io = $packages["io"]; + runtime = $packages["runtime"]; + sync = $packages["sync"]; + atomic = $packages["sync/atomic"]; + syscall = $packages["syscall"]; + time = $packages["time"]; + PathError = $pkg.PathError = $newType(0, $kindStruct, "os.PathError", "PathError", "os", function(Op_, Path_, Err_) { + this.$val = this; + this.Op = Op_ !== undefined ? Op_ : ""; + this.Path = Path_ !== undefined ? Path_ : ""; + this.Err = Err_ !== undefined ? Err_ : $ifaceNil; + }); + SyscallError = $pkg.SyscallError = $newType(0, $kindStruct, "os.SyscallError", "SyscallError", "os", function(Syscall_, Err_) { + this.$val = this; + this.Syscall = Syscall_ !== undefined ? Syscall_ : ""; + this.Err = Err_ !== undefined ? Err_ : $ifaceNil; + }); + LinkError = $pkg.LinkError = $newType(0, $kindStruct, "os.LinkError", "LinkError", "os", function(Op_, Old_, New_, Err_) { + this.$val = this; + this.Op = Op_ !== undefined ? Op_ : ""; + this.Old = Old_ !== undefined ? Old_ : ""; + this.New = New_ !== undefined ? New_ : ""; + this.Err = Err_ !== undefined ? Err_ : $ifaceNil; + }); + File = $pkg.File = $newType(0, $kindStruct, "os.File", "File", "os", function(file_) { + this.$val = this; + this.file = file_ !== undefined ? file_ : ptrType$11.nil; + }); + file = $pkg.file = $newType(0, $kindStruct, "os.file", "file", "os", function(fd_, name_, dirinfo_, nepipe_) { + this.$val = this; + this.fd = fd_ !== undefined ? fd_ : 0; + this.name = name_ !== undefined ? name_ : ""; + this.dirinfo = dirinfo_ !== undefined ? dirinfo_ : ptrType.nil; + this.nepipe = nepipe_ !== undefined ? nepipe_ : 0; + }); + dirInfo = $pkg.dirInfo = $newType(0, $kindStruct, "os.dirInfo", "dirInfo", "os", function(buf_, nbuf_, bufp_) { + this.$val = this; + this.buf = buf_ !== undefined ? buf_ : sliceType$1.nil; + this.nbuf = nbuf_ !== undefined ? nbuf_ : 0; + this.bufp = bufp_ !== undefined ? bufp_ : 0; + }); + FileInfo = $pkg.FileInfo = $newType(8, $kindInterface, "os.FileInfo", "FileInfo", "os", null); + FileMode = $pkg.FileMode = $newType(4, $kindUint32, "os.FileMode", "FileMode", "os", null); + fileStat = $pkg.fileStat = $newType(0, $kindStruct, "os.fileStat", "fileStat", "os", function(name_, size_, mode_, modTime_, sys_) { + this.$val = this; + this.name = name_ !== undefined ? name_ : ""; + this.size = size_ !== undefined ? size_ : new $Int64(0, 0); + this.mode = mode_ !== undefined ? mode_ : 0; + this.modTime = modTime_ !== undefined ? modTime_ : new time.Time.ptr(); + this.sys = sys_ !== undefined ? sys_ : $ifaceNil; + }); + sliceType = $sliceType($String); + ptrType = $ptrType(dirInfo); + sliceType$1 = $sliceType($Uint8); + sliceType$2 = $sliceType(FileInfo); + ptrType$2 = $ptrType(File); + ptrType$3 = $ptrType(PathError); + ptrType$4 = $ptrType(LinkError); + arrayType = $arrayType($Uint8, 32); + ptrType$11 = $ptrType(file); + funcType$1 = $funcType([ptrType$11], [$error], false); + ptrType$12 = $ptrType($Int32); + ptrType$14 = $ptrType(fileStat); + ptrType$15 = $ptrType(SyscallError); + runtime_args = function() { + return $pkg.Args; + }; + init = function() { + var argv, i, process; + process = $global.process; + if (!(process === undefined)) { + argv = process.argv; + $pkg.Args = $makeSlice(sliceType, ($parseInt(argv.length) - 1 >> 0)); + i = 0; + while (true) { + if (!(i < ($parseInt(argv.length) - 1 >> 0))) { break; } + (i < 0 || i >= $pkg.Args.$length) ? $throwRuntimeError("index out of range") : $pkg.Args.$array[$pkg.Args.$offset + i] = $internalize(argv[(i + 1 >> 0)], $String); + i = i + (1) >> 0; + } + } + if ($pkg.Args.$length === 0) { + $pkg.Args = new sliceType(["?"]); + } + }; + File.ptr.prototype.readdirnames = function(n) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, _tuple$2, d, err = $ifaceNil, errno, f, n, names = sliceType.nil, nb, nc, size; + f = this; + if (f.file.dirinfo === ptrType.nil) { + f.file.dirinfo = new dirInfo.ptr(); + f.file.dirinfo.buf = $makeSlice(sliceType$1, 4096); + } + d = f.file.dirinfo; + size = n; + if (size <= 0) { + size = 100; + n = -1; + } + names = $makeSlice(sliceType, 0, size); + while (true) { + if (!(!((n === 0)))) { break; } + if (d.bufp >= d.nbuf) { + d.bufp = 0; + errno = $ifaceNil; + _tuple$1 = syscall.ReadDirent(f.file.fd, d.buf); + _tuple = fixCount(_tuple$1[0], _tuple$1[1]); d.nbuf = _tuple[0]; errno = _tuple[1]; + if (!($interfaceIsEqual(errno, $ifaceNil))) { + _tmp = names; _tmp$1 = NewSyscallError("readdirent", errno); names = _tmp; err = _tmp$1; + return [names, err]; + } + if (d.nbuf <= 0) { + break; + } + } + _tmp$2 = 0; _tmp$3 = 0; nb = _tmp$2; nc = _tmp$3; + _tuple$2 = syscall.ParseDirent($subslice(d.buf, d.bufp, d.nbuf), n, names); nb = _tuple$2[0]; nc = _tuple$2[1]; names = _tuple$2[2]; + d.bufp = d.bufp + (nb) >> 0; + n = n - (nc) >> 0; + } + if (n >= 0 && (names.$length === 0)) { + _tmp$4 = names; _tmp$5 = io.EOF; names = _tmp$4; err = _tmp$5; + return [names, err]; + } + _tmp$6 = names; _tmp$7 = $ifaceNil; names = _tmp$6; err = _tmp$7; + return [names, err]; + }; + File.prototype.readdirnames = function(n) { return this.$val.readdirnames(n); }; + File.ptr.prototype.Readdir = function(n) { + var _tmp, _tmp$1, _tuple, err = $ifaceNil, f, fi = sliceType$2.nil, n; + f = this; + if (f === ptrType$2.nil) { + _tmp = sliceType$2.nil; _tmp$1 = $pkg.ErrInvalid; fi = _tmp; err = _tmp$1; + return [fi, err]; + } + _tuple = f.readdir(n); fi = _tuple[0]; err = _tuple[1]; + return [fi, err]; + }; + File.prototype.Readdir = function(n) { return this.$val.Readdir(n); }; + File.ptr.prototype.Readdirnames = function(n) { + var _tmp, _tmp$1, _tuple, err = $ifaceNil, f, n, names = sliceType.nil; + f = this; + if (f === ptrType$2.nil) { + _tmp = sliceType.nil; _tmp$1 = $pkg.ErrInvalid; names = _tmp; err = _tmp$1; + return [names, err]; + } + _tuple = f.readdirnames(n); names = _tuple[0]; err = _tuple[1]; + return [names, err]; + }; + File.prototype.Readdirnames = function(n) { return this.$val.Readdirnames(n); }; + PathError.ptr.prototype.Error = function() { + var e; + e = this; + return e.Op + " " + e.Path + ": " + e.Err.Error(); + }; + PathError.prototype.Error = function() { return this.$val.Error(); }; + SyscallError.ptr.prototype.Error = function() { + var e; + e = this; + return e.Syscall + ": " + e.Err.Error(); + }; + SyscallError.prototype.Error = function() { return this.$val.Error(); }; + NewSyscallError = $pkg.NewSyscallError = function(syscall$1, err) { + var err, syscall$1; + if ($interfaceIsEqual(err, $ifaceNil)) { + return $ifaceNil; + } + return new SyscallError.ptr(syscall$1, err); + }; + IsNotExist = $pkg.IsNotExist = function(err) { + var err; + return isNotExist(err); + }; + isNotExist = function(err) { + var _ref, err, pe; + _ref = err; + if (_ref === $ifaceNil) { + pe = _ref; + return false; + } else if ($assertType(_ref, ptrType$3, true)[1]) { + pe = _ref.$val; + err = pe.Err; + } else if ($assertType(_ref, ptrType$4, true)[1]) { + pe = _ref.$val; + err = pe.Err; + } + return $interfaceIsEqual(err, new syscall.Errno(2)) || $interfaceIsEqual(err, $pkg.ErrNotExist); + }; + File.ptr.prototype.Name = function() { + var f; + f = this; + return f.file.name; + }; + File.prototype.Name = function() { return this.$val.Name(); }; + LinkError.ptr.prototype.Error = function() { + var e; + e = this; + return e.Op + " " + e.Old + " " + e.New + ": " + e.Err.Error(); + }; + LinkError.prototype.Error = function() { return this.$val.Error(); }; + File.ptr.prototype.Read = function(b) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, e, err = $ifaceNil, f, n = 0; + f = this; + if (f === ptrType$2.nil) { + _tmp = 0; _tmp$1 = $pkg.ErrInvalid; n = _tmp; err = _tmp$1; + return [n, err]; + } + _tuple = f.read(b); n = _tuple[0]; e = _tuple[1]; + if (n < 0) { + n = 0; + } + if ((n === 0) && b.$length > 0 && $interfaceIsEqual(e, $ifaceNil)) { + _tmp$2 = 0; _tmp$3 = io.EOF; n = _tmp$2; err = _tmp$3; + return [n, err]; + } + if (!($interfaceIsEqual(e, $ifaceNil))) { + err = new PathError.ptr("read", f.file.name, e); + } + _tmp$4 = n; _tmp$5 = err; n = _tmp$4; err = _tmp$5; + return [n, err]; + }; + File.prototype.Read = function(b) { return this.$val.Read(b); }; + File.ptr.prototype.ReadAt = function(b, off) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, e, err = $ifaceNil, f, m, n = 0, off, x; + f = this; + if (f === ptrType$2.nil) { + _tmp = 0; _tmp$1 = $pkg.ErrInvalid; n = _tmp; err = _tmp$1; + return [n, err]; + } + while (true) { + if (!(b.$length > 0)) { break; } + _tuple = f.pread(b, off); m = _tuple[0]; e = _tuple[1]; + if ((m === 0) && $interfaceIsEqual(e, $ifaceNil)) { + _tmp$2 = n; _tmp$3 = io.EOF; n = _tmp$2; err = _tmp$3; + return [n, err]; + } + if (!($interfaceIsEqual(e, $ifaceNil))) { + err = new PathError.ptr("read", f.file.name, e); + break; + } + n = n + (m) >> 0; + b = $subslice(b, m); + off = (x = new $Int64(0, m), new $Int64(off.$high + x.$high, off.$low + x.$low)); + } + return [n, err]; + }; + File.prototype.ReadAt = function(b, off) { return this.$val.ReadAt(b, off); }; + File.ptr.prototype.Write = function(b) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, e, err = $ifaceNil, f, n = 0; + f = this; + if (f === ptrType$2.nil) { + _tmp = 0; _tmp$1 = $pkg.ErrInvalid; n = _tmp; err = _tmp$1; + return [n, err]; + } + _tuple = f.write(b); n = _tuple[0]; e = _tuple[1]; + if (n < 0) { + n = 0; + } + if (!((n === b.$length))) { + err = io.ErrShortWrite; + } + epipecheck(f, e); + if (!($interfaceIsEqual(e, $ifaceNil))) { + err = new PathError.ptr("write", f.file.name, e); + } + _tmp$2 = n; _tmp$3 = err; n = _tmp$2; err = _tmp$3; + return [n, err]; + }; + File.prototype.Write = function(b) { return this.$val.Write(b); }; + File.ptr.prototype.WriteAt = function(b, off) { + var _tmp, _tmp$1, _tuple, b, e, err = $ifaceNil, f, m, n = 0, off, x; + f = this; + if (f === ptrType$2.nil) { + _tmp = 0; _tmp$1 = $pkg.ErrInvalid; n = _tmp; err = _tmp$1; + return [n, err]; + } + while (true) { + if (!(b.$length > 0)) { break; } + _tuple = f.pwrite(b, off); m = _tuple[0]; e = _tuple[1]; + if (!($interfaceIsEqual(e, $ifaceNil))) { + err = new PathError.ptr("write", f.file.name, e); + break; + } + n = n + (m) >> 0; + b = $subslice(b, m); + off = (x = new $Int64(0, m), new $Int64(off.$high + x.$high, off.$low + x.$low)); + } + return [n, err]; + }; + File.prototype.WriteAt = function(b, off) { return this.$val.WriteAt(b, off); }; + File.ptr.prototype.Seek = function(offset, whence) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, e, err = $ifaceNil, f, offset, r, ret = new $Int64(0, 0), whence; + f = this; + if (f === ptrType$2.nil) { + _tmp = new $Int64(0, 0); _tmp$1 = $pkg.ErrInvalid; ret = _tmp; err = _tmp$1; + return [ret, err]; + } + _tuple = f.seek(offset, whence); r = _tuple[0]; e = _tuple[1]; + if ($interfaceIsEqual(e, $ifaceNil) && !(f.file.dirinfo === ptrType.nil) && !((r.$high === 0 && r.$low === 0))) { + e = new syscall.Errno(21); + } + if (!($interfaceIsEqual(e, $ifaceNil))) { + _tmp$2 = new $Int64(0, 0); _tmp$3 = new PathError.ptr("seek", f.file.name, e); ret = _tmp$2; err = _tmp$3; + return [ret, err]; + } + _tmp$4 = r; _tmp$5 = $ifaceNil; ret = _tmp$4; err = _tmp$5; + return [ret, err]; + }; + File.prototype.Seek = function(offset, whence) { return this.$val.Seek(offset, whence); }; + File.ptr.prototype.WriteString = function(s) { + var _tmp, _tmp$1, _tuple, err = $ifaceNil, f, ret = 0, s; + f = this; + if (f === ptrType$2.nil) { + _tmp = 0; _tmp$1 = $pkg.ErrInvalid; ret = _tmp; err = _tmp$1; + return [ret, err]; + } + _tuple = f.Write(new sliceType$1($stringToBytes(s))); ret = _tuple[0]; err = _tuple[1]; + return [ret, err]; + }; + File.prototype.WriteString = function(s) { return this.$val.WriteString(s); }; + File.ptr.prototype.Chdir = function() { + var e, f; + f = this; + if (f === ptrType$2.nil) { + return $pkg.ErrInvalid; + } + e = syscall.Fchdir(f.file.fd); + if (!($interfaceIsEqual(e, $ifaceNil))) { + return new PathError.ptr("chdir", f.file.name, e); + } + return $ifaceNil; + }; + File.prototype.Chdir = function() { return this.$val.Chdir(); }; + fixCount = function(n, err) { + var err, n; + if (n < 0) { + n = 0; + } + return [n, err]; + }; + sigpipe = function() { + $panic("Native function not implemented: os.sigpipe"); + }; + syscallMode = function(i) { + var i, o = 0; + o = (o | ((new FileMode(i).Perm() >>> 0))) >>> 0; + if (!((((i & 8388608) >>> 0) === 0))) { + o = (o | (2048)) >>> 0; + } + if (!((((i & 4194304) >>> 0) === 0))) { + o = (o | (1024)) >>> 0; + } + if (!((((i & 1048576) >>> 0) === 0))) { + o = (o | (512)) >>> 0; + } + return o; + }; + File.ptr.prototype.Chmod = function(mode) { + var e, f, mode; + f = this; + if (f === ptrType$2.nil) { + return $pkg.ErrInvalid; + } + e = syscall.Fchmod(f.file.fd, syscallMode(mode)); + if (!($interfaceIsEqual(e, $ifaceNil))) { + return new PathError.ptr("chmod", f.file.name, e); + } + return $ifaceNil; + }; + File.prototype.Chmod = function(mode) { return this.$val.Chmod(mode); }; + File.ptr.prototype.Chown = function(uid, gid) { + var e, f, gid, uid; + f = this; + if (f === ptrType$2.nil) { + return $pkg.ErrInvalid; + } + e = syscall.Fchown(f.file.fd, uid, gid); + if (!($interfaceIsEqual(e, $ifaceNil))) { + return new PathError.ptr("chown", f.file.name, e); + } + return $ifaceNil; + }; + File.prototype.Chown = function(uid, gid) { return this.$val.Chown(uid, gid); }; + File.ptr.prototype.Truncate = function(size) { + var e, f, size; + f = this; + if (f === ptrType$2.nil) { + return $pkg.ErrInvalid; + } + e = syscall.Ftruncate(f.file.fd, size); + if (!($interfaceIsEqual(e, $ifaceNil))) { + return new PathError.ptr("truncate", f.file.name, e); + } + return $ifaceNil; + }; + File.prototype.Truncate = function(size) { return this.$val.Truncate(size); }; + File.ptr.prototype.Sync = function() { + var e, err = $ifaceNil, f; + f = this; + if (f === ptrType$2.nil) { + err = $pkg.ErrInvalid; + return err; + } + e = syscall.Fsync(f.file.fd); + if (!($interfaceIsEqual(e, $ifaceNil))) { + err = NewSyscallError("fsync", e); + return err; + } + err = $ifaceNil; + return err; + }; + File.prototype.Sync = function() { return this.$val.Sync(); }; + File.ptr.prototype.Fd = function() { + var f; + f = this; + if (f === ptrType$2.nil) { + return 4294967295; + } + return (f.file.fd >>> 0); + }; + File.prototype.Fd = function() { return this.$val.Fd(); }; + NewFile = $pkg.NewFile = function(fd, name) { + var f, fd, fdi, name; + fdi = (fd >> 0); + if (fdi < 0) { + return ptrType$2.nil; + } + f = new File.ptr(new file.ptr(fdi, name, ptrType.nil, 0)); + runtime.SetFinalizer(f.file, new funcType$1($methodExpr(ptrType$11.prototype.close))); + return f; + }; + epipecheck = function(file$1, e) { + var e, file$1; + if ($interfaceIsEqual(e, new syscall.Errno(32))) { + if (atomic.AddInt32(new ptrType$12(function() { return this.$target.file.nepipe; }, function($v) { this.$target.file.nepipe = $v; }, file$1), 1) >= 10) { + sigpipe(); + } + } else { + atomic.StoreInt32(new ptrType$12(function() { return this.$target.file.nepipe; }, function($v) { this.$target.file.nepipe = $v; }, file$1), 0); + } + }; + File.ptr.prototype.Close = function() { + var f; + f = this; + if (f === ptrType$2.nil) { + return $pkg.ErrInvalid; + } + return f.file.close(); + }; + File.prototype.Close = function() { return this.$val.Close(); }; + file.ptr.prototype.close = function() { + var e, err, file$1; + file$1 = this; + if (file$1 === ptrType$11.nil || file$1.fd < 0) { + return new syscall.Errno(22); + } + err = $ifaceNil; + e = syscall.Close(file$1.fd); + if (!($interfaceIsEqual(e, $ifaceNil))) { + err = new PathError.ptr("close", file$1.name, e); + } + file$1.fd = -1; + runtime.SetFinalizer(file$1, $ifaceNil); + return err; + }; + file.prototype.close = function() { return this.$val.close(); }; + File.ptr.prototype.Stat = function() { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, err = $ifaceNil, f, fi = $ifaceNil, stat; + f = this; + if (f === ptrType$2.nil) { + _tmp = $ifaceNil; _tmp$1 = $pkg.ErrInvalid; fi = _tmp; err = _tmp$1; + return [fi, err]; + } + stat = $clone(new syscall.Stat_t.ptr(), syscall.Stat_t); + err = syscall.Fstat(f.file.fd, stat); + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$2 = $ifaceNil; _tmp$3 = new PathError.ptr("stat", f.file.name, err); fi = _tmp$2; err = _tmp$3; + return [fi, err]; + } + _tmp$4 = fileInfoFromStat(stat, f.file.name); _tmp$5 = $ifaceNil; fi = _tmp$4; err = _tmp$5; + return [fi, err]; + }; + File.prototype.Stat = function() { return this.$val.Stat(); }; + Lstat = $pkg.Lstat = function(name) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, err = $ifaceNil, fi = $ifaceNil, name, stat; + stat = $clone(new syscall.Stat_t.ptr(), syscall.Stat_t); + err = syscall.Lstat(name, stat); + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = $ifaceNil; _tmp$1 = new PathError.ptr("lstat", name, err); fi = _tmp; err = _tmp$1; + return [fi, err]; + } + _tmp$2 = fileInfoFromStat(stat, name); _tmp$3 = $ifaceNil; fi = _tmp$2; err = _tmp$3; + return [fi, err]; + }; + File.ptr.prototype.readdir = function(n) { + var _i, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, dirname, err = $ifaceNil, f, fi = sliceType$2.nil, filename, fip, lerr, n, names; + f = this; + dirname = f.file.name; + if (dirname === "") { + dirname = "."; + } + _tuple = f.Readdirnames(n); names = _tuple[0]; err = _tuple[1]; + fi = $makeSlice(sliceType$2, 0, names.$length); + _ref = names; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + filename = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + _tuple$1 = lstat(dirname + "/" + filename); fip = _tuple$1[0]; lerr = _tuple$1[1]; + if (IsNotExist(lerr)) { + _i++; + continue; + } + if (!($interfaceIsEqual(lerr, $ifaceNil))) { + _tmp = fi; _tmp$1 = lerr; fi = _tmp; err = _tmp$1; + return [fi, err]; + } + fi = $append(fi, fip); + _i++; + } + _tmp$2 = fi; _tmp$3 = err; fi = _tmp$2; err = _tmp$3; + return [fi, err]; + }; + File.prototype.readdir = function(n) { return this.$val.readdir(n); }; + File.ptr.prototype.read = function(b) { + var _tuple, _tuple$1, b, err = $ifaceNil, f, n = 0; + f = this; + if (true && b.$length > 1073741824) { + b = $subslice(b, 0, 1073741824); + } + _tuple$1 = syscall.Read(f.file.fd, b); + _tuple = fixCount(_tuple$1[0], _tuple$1[1]); n = _tuple[0]; err = _tuple[1]; + return [n, err]; + }; + File.prototype.read = function(b) { return this.$val.read(b); }; + File.ptr.prototype.pread = function(b, off) { + var _tuple, _tuple$1, b, err = $ifaceNil, f, n = 0, off; + f = this; + if (true && b.$length > 1073741824) { + b = $subslice(b, 0, 1073741824); + } + _tuple$1 = syscall.Pread(f.file.fd, b, off); + _tuple = fixCount(_tuple$1[0], _tuple$1[1]); n = _tuple[0]; err = _tuple[1]; + return [n, err]; + }; + File.prototype.pread = function(b, off) { return this.$val.pread(b, off); }; + File.ptr.prototype.write = function(b) { + var _tmp, _tmp$1, _tuple, _tuple$1, b, bcap, err = $ifaceNil, err$1, f, m, n = 0; + f = this; + while (true) { + if (!(true)) { break; } + bcap = b; + if (true && bcap.$length > 1073741824) { + bcap = $subslice(bcap, 0, 1073741824); + } + _tuple$1 = syscall.Write(f.file.fd, bcap); + _tuple = fixCount(_tuple$1[0], _tuple$1[1]); m = _tuple[0]; err$1 = _tuple[1]; + n = n + (m) >> 0; + if (0 < m && m < bcap.$length || $interfaceIsEqual(err$1, new syscall.Errno(4))) { + b = $subslice(b, m); + continue; + } + if (true && !((bcap.$length === b.$length)) && $interfaceIsEqual(err$1, $ifaceNil)) { + b = $subslice(b, m); + continue; + } + _tmp = n; _tmp$1 = err$1; n = _tmp; err = _tmp$1; + return [n, err]; + } + }; + File.prototype.write = function(b) { return this.$val.write(b); }; + File.ptr.prototype.pwrite = function(b, off) { + var _tuple, _tuple$1, b, err = $ifaceNil, f, n = 0, off; + f = this; + if (true && b.$length > 1073741824) { + b = $subslice(b, 0, 1073741824); + } + _tuple$1 = syscall.Pwrite(f.file.fd, b, off); + _tuple = fixCount(_tuple$1[0], _tuple$1[1]); n = _tuple[0]; err = _tuple[1]; + return [n, err]; + }; + File.prototype.pwrite = function(b, off) { return this.$val.pwrite(b, off); }; + File.ptr.prototype.seek = function(offset, whence) { + var _tuple, err = $ifaceNil, f, offset, ret = new $Int64(0, 0), whence; + f = this; + _tuple = syscall.Seek(f.file.fd, offset, whence); ret = _tuple[0]; err = _tuple[1]; + return [ret, err]; + }; + File.prototype.seek = function(offset, whence) { return this.$val.seek(offset, whence); }; + basename = function(name) { + var i, name; + i = name.length - 1 >> 0; + while (true) { + if (!(i > 0 && (name.charCodeAt(i) === 47))) { break; } + name = name.substring(0, i); + i = i - (1) >> 0; + } + i = i - (1) >> 0; + while (true) { + if (!(i >= 0)) { break; } + if (name.charCodeAt(i) === 47) { + name = name.substring((i + 1 >> 0)); + break; + } + i = i - (1) >> 0; + } + return name; + }; + init$1 = function() { + useSyscallwd = useSyscallwdDarwin; + }; + useSyscallwdDarwin = function(err) { + var err; + return !($interfaceIsEqual(err, new syscall.Errno(45))); + }; + init$2 = function() { + $pkg.Args = runtime_args(); + }; + fileInfoFromStat = function(st, name) { + var _ref, fs, name, st; + fs = new fileStat.ptr(basename(name), st.Size, 0, $clone(timespecToTime(st.Mtimespec), time.Time), st); + fs.mode = (((st.Mode & 511) >>> 0) >>> 0); + _ref = (st.Mode & 61440) >>> 0; + if (_ref === 24576 || _ref === 57344) { + fs.mode = (fs.mode | (67108864)) >>> 0; + } else if (_ref === 8192) { + fs.mode = (fs.mode | (69206016)) >>> 0; + } else if (_ref === 16384) { + fs.mode = (fs.mode | (2147483648)) >>> 0; + } else if (_ref === 4096) { + fs.mode = (fs.mode | (33554432)) >>> 0; + } else if (_ref === 40960) { + fs.mode = (fs.mode | (134217728)) >>> 0; + } else if (_ref === 32768) { + } else if (_ref === 49152) { + fs.mode = (fs.mode | (16777216)) >>> 0; + } + if (!((((st.Mode & 1024) >>> 0) === 0))) { + fs.mode = (fs.mode | (4194304)) >>> 0; + } + if (!((((st.Mode & 2048) >>> 0) === 0))) { + fs.mode = (fs.mode | (8388608)) >>> 0; + } + if (!((((st.Mode & 512) >>> 0) === 0))) { + fs.mode = (fs.mode | (1048576)) >>> 0; + } + return fs; + }; + timespecToTime = function(ts) { + var ts; + ts = $clone(ts, syscall.Timespec); + return time.Unix(ts.Sec, ts.Nsec); + }; + init$3 = function() { + var _i, _ref, _rune, _tuple, err, i, osver; + _tuple = syscall.Sysctl("kern.osrelease"); osver = _tuple[0]; err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return; + } + i = 0; + _ref = osver; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + i = _i; + if (!((osver.charCodeAt(i) === 46))) { + _i += _rune[1]; + continue; + } + _i += _rune[1]; + } + if (i > 2 || (i === 2) && osver.charCodeAt(0) >= 49 && osver.charCodeAt(1) >= 49) { + supportsCloseOnExec = true; + } + }; + FileMode.prototype.String = function() { + var _i, _i$1, _ref, _ref$1, _rune, _rune$1, buf, c, c$1, i, i$1, m, w, y, y$1; + m = this.$val; + buf = $clone(arrayType.zero(), arrayType); + w = 0; + _ref = "dalTLDpSugct"; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + i = _i; + c = _rune[0]; + if (!((((m & (((y = ((31 - i >> 0) >>> 0), y < 32 ? (1 << y) : 0) >>> 0))) >>> 0) === 0))) { + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = (c << 24 >>> 24); + w = w + (1) >> 0; + } + _i += _rune[1]; + } + if (w === 0) { + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 45; + w = w + (1) >> 0; + } + _ref$1 = "rwxrwxrwx"; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.length)) { break; } + _rune$1 = $decodeRune(_ref$1, _i$1); + i$1 = _i$1; + c$1 = _rune$1[0]; + if (!((((m & (((y$1 = ((8 - i$1 >> 0) >>> 0), y$1 < 32 ? (1 << y$1) : 0) >>> 0))) >>> 0) === 0))) { + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = (c$1 << 24 >>> 24); + } else { + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 45; + } + w = w + (1) >> 0; + _i$1 += _rune$1[1]; + } + return $bytesToString($subslice(new sliceType$1(buf), 0, w)); + }; + $ptrType(FileMode).prototype.String = function() { return new FileMode(this.$get()).String(); }; + FileMode.prototype.IsDir = function() { + var m; + m = this.$val; + return !((((m & 2147483648) >>> 0) === 0)); + }; + $ptrType(FileMode).prototype.IsDir = function() { return new FileMode(this.$get()).IsDir(); }; + FileMode.prototype.IsRegular = function() { + var m; + m = this.$val; + return ((m & 2399141888) >>> 0) === 0; + }; + $ptrType(FileMode).prototype.IsRegular = function() { return new FileMode(this.$get()).IsRegular(); }; + FileMode.prototype.Perm = function() { + var m; + m = this.$val; + return (m & 511) >>> 0; + }; + $ptrType(FileMode).prototype.Perm = function() { return new FileMode(this.$get()).Perm(); }; + fileStat.ptr.prototype.Name = function() { + var fs; + fs = this; + return fs.name; + }; + fileStat.prototype.Name = function() { return this.$val.Name(); }; + fileStat.ptr.prototype.IsDir = function() { + var fs; + fs = this; + return new FileMode(fs.Mode()).IsDir(); + }; + fileStat.prototype.IsDir = function() { return this.$val.IsDir(); }; + fileStat.ptr.prototype.Size = function() { + var fs; + fs = this; + return fs.size; + }; + fileStat.prototype.Size = function() { return this.$val.Size(); }; + fileStat.ptr.prototype.Mode = function() { + var fs; + fs = this; + return fs.mode; + }; + fileStat.prototype.Mode = function() { return this.$val.Mode(); }; + fileStat.ptr.prototype.ModTime = function() { + var fs; + fs = this; + return fs.modTime; + }; + fileStat.prototype.ModTime = function() { return this.$val.ModTime(); }; + fileStat.ptr.prototype.Sys = function() { + var fs; + fs = this; + return fs.sys; + }; + fileStat.prototype.Sys = function() { return this.$val.Sys(); }; + ptrType$3.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$15.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$4.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$2.methods = [{prop: "readdirnames", name: "readdirnames", pkg: "os", typ: $funcType([$Int], [sliceType, $error], false)}, {prop: "Readdir", name: "Readdir", pkg: "", typ: $funcType([$Int], [sliceType$2, $error], false)}, {prop: "Readdirnames", name: "Readdirnames", pkg: "", typ: $funcType([$Int], [sliceType, $error], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "ReadAt", name: "ReadAt", pkg: "", typ: $funcType([sliceType$1, $Int64], [$Int, $error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "WriteAt", name: "WriteAt", pkg: "", typ: $funcType([sliceType$1, $Int64], [$Int, $error], false)}, {prop: "Seek", name: "Seek", pkg: "", typ: $funcType([$Int64, $Int], [$Int64, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}, {prop: "Chdir", name: "Chdir", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Chmod", name: "Chmod", pkg: "", typ: $funcType([FileMode], [$error], false)}, {prop: "Chown", name: "Chown", pkg: "", typ: $funcType([$Int, $Int], [$error], false)}, {prop: "Truncate", name: "Truncate", pkg: "", typ: $funcType([$Int64], [$error], false)}, {prop: "Sync", name: "Sync", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Fd", name: "Fd", pkg: "", typ: $funcType([], [$Uintptr], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Stat", name: "Stat", pkg: "", typ: $funcType([], [FileInfo, $error], false)}, {prop: "readdir", name: "readdir", pkg: "os", typ: $funcType([$Int], [sliceType$2, $error], false)}, {prop: "read", name: "read", pkg: "os", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "pread", name: "pread", pkg: "os", typ: $funcType([sliceType$1, $Int64], [$Int, $error], false)}, {prop: "write", name: "write", pkg: "os", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "pwrite", name: "pwrite", pkg: "os", typ: $funcType([sliceType$1, $Int64], [$Int, $error], false)}, {prop: "seek", name: "seek", pkg: "os", typ: $funcType([$Int64, $Int], [$Int64, $error], false)}]; + ptrType$11.methods = [{prop: "close", name: "close", pkg: "os", typ: $funcType([], [$error], false)}]; + FileMode.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "IsDir", name: "IsDir", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsRegular", name: "IsRegular", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Perm", name: "Perm", pkg: "", typ: $funcType([], [FileMode], false)}]; + ptrType$14.methods = [{prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "IsDir", name: "IsDir", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Mode", name: "Mode", pkg: "", typ: $funcType([], [FileMode], false)}, {prop: "ModTime", name: "ModTime", pkg: "", typ: $funcType([], [time.Time], false)}, {prop: "Sys", name: "Sys", pkg: "", typ: $funcType([], [$emptyInterface], false)}]; + PathError.init([{prop: "Op", name: "Op", pkg: "", typ: $String, tag: ""}, {prop: "Path", name: "Path", pkg: "", typ: $String, tag: ""}, {prop: "Err", name: "Err", pkg: "", typ: $error, tag: ""}]); + SyscallError.init([{prop: "Syscall", name: "Syscall", pkg: "", typ: $String, tag: ""}, {prop: "Err", name: "Err", pkg: "", typ: $error, tag: ""}]); + LinkError.init([{prop: "Op", name: "Op", pkg: "", typ: $String, tag: ""}, {prop: "Old", name: "Old", pkg: "", typ: $String, tag: ""}, {prop: "New", name: "New", pkg: "", typ: $String, tag: ""}, {prop: "Err", name: "Err", pkg: "", typ: $error, tag: ""}]); + File.init([{prop: "file", name: "", pkg: "os", typ: ptrType$11, tag: ""}]); + file.init([{prop: "fd", name: "fd", pkg: "os", typ: $Int, tag: ""}, {prop: "name", name: "name", pkg: "os", typ: $String, tag: ""}, {prop: "dirinfo", name: "dirinfo", pkg: "os", typ: ptrType, tag: ""}, {prop: "nepipe", name: "nepipe", pkg: "os", typ: $Int32, tag: ""}]); + dirInfo.init([{prop: "buf", name: "buf", pkg: "os", typ: sliceType$1, tag: ""}, {prop: "nbuf", name: "nbuf", pkg: "os", typ: $Int, tag: ""}, {prop: "bufp", name: "bufp", pkg: "os", typ: $Int, tag: ""}]); + FileInfo.init([{prop: "IsDir", name: "IsDir", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "ModTime", name: "ModTime", pkg: "", typ: $funcType([], [time.Time], false)}, {prop: "Mode", name: "Mode", pkg: "", typ: $funcType([], [FileMode], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Sys", name: "Sys", pkg: "", typ: $funcType([], [$emptyInterface], false)}]); + fileStat.init([{prop: "name", name: "name", pkg: "os", typ: $String, tag: ""}, {prop: "size", name: "size", pkg: "os", typ: $Int64, tag: ""}, {prop: "mode", name: "mode", pkg: "os", typ: FileMode, tag: ""}, {prop: "modTime", name: "modTime", pkg: "os", typ: time.Time, tag: ""}, {prop: "sys", name: "sys", pkg: "os", typ: $emptyInterface, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_os = function() { while (true) { switch ($s) { case 0: + $r = errors.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = js.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = io.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = runtime.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = sync.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + $r = atomic.$init($BLOCKING); /* */ $s = 6; case 6: if ($r && $r.$blocking) { $r = $r(); } + $r = syscall.$init($BLOCKING); /* */ $s = 7; case 7: if ($r && $r.$blocking) { $r = $r(); } + $r = time.$init($BLOCKING); /* */ $s = 8; case 8: if ($r && $r.$blocking) { $r = $r(); } + $pkg.Args = sliceType.nil; + supportsCloseOnExec = false; + $pkg.ErrInvalid = errors.New("invalid argument"); + $pkg.ErrPermission = errors.New("permission denied"); + $pkg.ErrExist = errors.New("file already exists"); + $pkg.ErrNotExist = errors.New("file does not exist"); + errFinished = errors.New("os: process already finished"); + $pkg.Stdin = NewFile((syscall.Stdin >>> 0), "/dev/stdin"); + $pkg.Stdout = NewFile((syscall.Stdout >>> 0), "/dev/stdout"); + $pkg.Stderr = NewFile((syscall.Stderr >>> 0), "/dev/stderr"); + useSyscallwd = (function(param) { + var param; + return true; + }); + lstat = Lstat; + init(); + init$1(); + init$2(); + init$3(); + /* */ } return; } }; $init_os.$blocking = true; return $init_os; + }; + return $pkg; +})(); +$packages["strconv"] = (function() { + var $pkg = {}, errors, math, utf8, decimal, leftCheat, extFloat, floatInfo, decimalSlice, sliceType$3, sliceType$4, sliceType$5, sliceType$6, arrayType, arrayType$1, ptrType$1, arrayType$2, arrayType$3, arrayType$4, arrayType$5, arrayType$6, ptrType$2, ptrType$3, ptrType$4, optimize, leftcheats, smallPowersOfTen, powersOfTen, uint64pow10, float32info, float64info, isPrint16, isNotPrint16, isPrint32, isNotPrint32, shifts, digitZero, trim, rightShift, prefixIsLessThan, leftShift, shouldRoundUp, frexp10Many, adjustLastDigitFixed, adjustLastDigit, AppendFloat, genericFtoa, bigFtoa, formatDigits, roundShortest, fmtE, fmtF, fmtB, max, FormatInt, Itoa, formatBits, quoteWith, Quote, QuoteToASCII, QuoteRune, AppendQuoteRune, QuoteRuneToASCII, AppendQuoteRuneToASCII, CanBackquote, unhex, UnquoteChar, Unquote, contains, bsearch16, bsearch32, IsPrint; + errors = $packages["errors"]; + math = $packages["math"]; + utf8 = $packages["unicode/utf8"]; + decimal = $pkg.decimal = $newType(0, $kindStruct, "strconv.decimal", "decimal", "strconv", function(d_, nd_, dp_, neg_, trunc_) { + this.$val = this; + this.d = d_ !== undefined ? d_ : arrayType$6.zero(); + this.nd = nd_ !== undefined ? nd_ : 0; + this.dp = dp_ !== undefined ? dp_ : 0; + this.neg = neg_ !== undefined ? neg_ : false; + this.trunc = trunc_ !== undefined ? trunc_ : false; + }); + leftCheat = $pkg.leftCheat = $newType(0, $kindStruct, "strconv.leftCheat", "leftCheat", "strconv", function(delta_, cutoff_) { + this.$val = this; + this.delta = delta_ !== undefined ? delta_ : 0; + this.cutoff = cutoff_ !== undefined ? cutoff_ : ""; + }); + extFloat = $pkg.extFloat = $newType(0, $kindStruct, "strconv.extFloat", "extFloat", "strconv", function(mant_, exp_, neg_) { + this.$val = this; + this.mant = mant_ !== undefined ? mant_ : new $Uint64(0, 0); + this.exp = exp_ !== undefined ? exp_ : 0; + this.neg = neg_ !== undefined ? neg_ : false; + }); + floatInfo = $pkg.floatInfo = $newType(0, $kindStruct, "strconv.floatInfo", "floatInfo", "strconv", function(mantbits_, expbits_, bias_) { + this.$val = this; + this.mantbits = mantbits_ !== undefined ? mantbits_ : 0; + this.expbits = expbits_ !== undefined ? expbits_ : 0; + this.bias = bias_ !== undefined ? bias_ : 0; + }); + decimalSlice = $pkg.decimalSlice = $newType(0, $kindStruct, "strconv.decimalSlice", "decimalSlice", "strconv", function(d_, nd_, dp_, neg_) { + this.$val = this; + this.d = d_ !== undefined ? d_ : sliceType$6.nil; + this.nd = nd_ !== undefined ? nd_ : 0; + this.dp = dp_ !== undefined ? dp_ : 0; + this.neg = neg_ !== undefined ? neg_ : false; + }); + sliceType$3 = $sliceType(leftCheat); + sliceType$4 = $sliceType($Uint16); + sliceType$5 = $sliceType($Uint32); + sliceType$6 = $sliceType($Uint8); + arrayType = $arrayType($Uint8, 24); + arrayType$1 = $arrayType($Uint8, 32); + ptrType$1 = $ptrType(floatInfo); + arrayType$2 = $arrayType($Uint8, 3); + arrayType$3 = $arrayType($Uint8, 50); + arrayType$4 = $arrayType($Uint8, 65); + arrayType$5 = $arrayType($Uint8, 4); + arrayType$6 = $arrayType($Uint8, 800); + ptrType$2 = $ptrType(decimal); + ptrType$3 = $ptrType(decimalSlice); + ptrType$4 = $ptrType(extFloat); + decimal.ptr.prototype.String = function() { + var a, buf, n, w; + a = this; + n = 10 + a.nd >> 0; + if (a.dp > 0) { + n = n + (a.dp) >> 0; + } + if (a.dp < 0) { + n = n + (-a.dp) >> 0; + } + buf = $makeSlice(sliceType$6, n); + w = 0; + if (a.nd === 0) { + return "0"; + } else if (a.dp <= 0) { + (w < 0 || w >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + w] = 48; + w = w + (1) >> 0; + (w < 0 || w >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + w] = 46; + w = w + (1) >> 0; + w = w + (digitZero($subslice(buf, w, (w + -a.dp >> 0)))) >> 0; + w = w + ($copySlice($subslice(buf, w), $subslice(new sliceType$6(a.d), 0, a.nd))) >> 0; + } else if (a.dp < a.nd) { + w = w + ($copySlice($subslice(buf, w), $subslice(new sliceType$6(a.d), 0, a.dp))) >> 0; + (w < 0 || w >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + w] = 46; + w = w + (1) >> 0; + w = w + ($copySlice($subslice(buf, w), $subslice(new sliceType$6(a.d), a.dp, a.nd))) >> 0; + } else { + w = w + ($copySlice($subslice(buf, w), $subslice(new sliceType$6(a.d), 0, a.nd))) >> 0; + w = w + (digitZero($subslice(buf, w, ((w + a.dp >> 0) - a.nd >> 0)))) >> 0; + } + return $bytesToString($subslice(buf, 0, w)); + }; + decimal.prototype.String = function() { return this.$val.String(); }; + digitZero = function(dst) { + var _i, _ref, dst, i; + _ref = dst; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + (i < 0 || i >= dst.$length) ? $throwRuntimeError("index out of range") : dst.$array[dst.$offset + i] = 48; + _i++; + } + return dst.$length; + }; + trim = function(a) { + var a, x, x$1; + while (true) { + if (!(a.nd > 0 && ((x = a.d, x$1 = a.nd - 1 >> 0, ((x$1 < 0 || x$1 >= x.length) ? $throwRuntimeError("index out of range") : x[x$1])) === 48))) { break; } + a.nd = a.nd - (1) >> 0; + } + if (a.nd === 0) { + a.dp = 0; + } + }; + decimal.ptr.prototype.Assign = function(v) { + var a, buf, n, v, v1, x, x$1, x$2; + a = this; + buf = $clone(arrayType.zero(), arrayType); + n = 0; + while (true) { + if (!((v.$high > 0 || (v.$high === 0 && v.$low > 0)))) { break; } + v1 = $div64(v, new $Uint64(0, 10), false); + v = (x = $mul64(new $Uint64(0, 10), v1), new $Uint64(v.$high - x.$high, v.$low - x.$low)); + (n < 0 || n >= buf.length) ? $throwRuntimeError("index out of range") : buf[n] = (new $Uint64(v.$high + 0, v.$low + 48).$low << 24 >>> 24); + n = n + (1) >> 0; + v = v1; + } + a.nd = 0; + n = n - (1) >> 0; + while (true) { + if (!(n >= 0)) { break; } + (x$1 = a.d, x$2 = a.nd, (x$2 < 0 || x$2 >= x$1.length) ? $throwRuntimeError("index out of range") : x$1[x$2] = ((n < 0 || n >= buf.length) ? $throwRuntimeError("index out of range") : buf[n])); + a.nd = a.nd + (1) >> 0; + n = n - (1) >> 0; + } + a.dp = a.nd; + trim(a); + }; + decimal.prototype.Assign = function(v) { return this.$val.Assign(v); }; + rightShift = function(a, k) { + var a, c, c$1, dig, dig$1, k, n, r, w, x, x$1, x$2, x$3, y, y$1; + r = 0; + w = 0; + n = 0; + while (true) { + if (!(((n >> $min(k, 31)) >> 0) === 0)) { break; } + if (r >= a.nd) { + if (n === 0) { + a.nd = 0; + return; + } + while (true) { + if (!(((n >> $min(k, 31)) >> 0) === 0)) { break; } + n = n * 10 >> 0; + r = r + (1) >> 0; + } + break; + } + c = ((x = a.d, ((r < 0 || r >= x.length) ? $throwRuntimeError("index out of range") : x[r])) >> 0); + n = ((n * 10 >> 0) + c >> 0) - 48 >> 0; + r = r + (1) >> 0; + } + a.dp = a.dp - ((r - 1 >> 0)) >> 0; + while (true) { + if (!(r < a.nd)) { break; } + c$1 = ((x$1 = a.d, ((r < 0 || r >= x$1.length) ? $throwRuntimeError("index out of range") : x$1[r])) >> 0); + dig = (n >> $min(k, 31)) >> 0; + n = n - (((y = k, y < 32 ? (dig << y) : 0) >> 0)) >> 0; + (x$2 = a.d, (w < 0 || w >= x$2.length) ? $throwRuntimeError("index out of range") : x$2[w] = ((dig + 48 >> 0) << 24 >>> 24)); + w = w + (1) >> 0; + n = ((n * 10 >> 0) + c$1 >> 0) - 48 >> 0; + r = r + (1) >> 0; + } + while (true) { + if (!(n > 0)) { break; } + dig$1 = (n >> $min(k, 31)) >> 0; + n = n - (((y$1 = k, y$1 < 32 ? (dig$1 << y$1) : 0) >> 0)) >> 0; + if (w < 800) { + (x$3 = a.d, (w < 0 || w >= x$3.length) ? $throwRuntimeError("index out of range") : x$3[w] = ((dig$1 + 48 >> 0) << 24 >>> 24)); + w = w + (1) >> 0; + } else if (dig$1 > 0) { + a.trunc = true; + } + n = n * 10 >> 0; + } + a.nd = w; + trim(a); + }; + prefixIsLessThan = function(b, s) { + var b, i, s; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + if (i >= b.$length) { + return true; + } + if (!((((i < 0 || i >= b.$length) ? $throwRuntimeError("index out of range") : b.$array[b.$offset + i]) === s.charCodeAt(i)))) { + return ((i < 0 || i >= b.$length) ? $throwRuntimeError("index out of range") : b.$array[b.$offset + i]) < s.charCodeAt(i); + } + i = i + (1) >> 0; + } + return false; + }; + leftShift = function(a, k) { + var _q, _q$1, a, delta, k, n, quo, quo$1, r, rem, rem$1, w, x, x$1, x$2, y; + delta = ((k < 0 || k >= leftcheats.$length) ? $throwRuntimeError("index out of range") : leftcheats.$array[leftcheats.$offset + k]).delta; + if (prefixIsLessThan($subslice(new sliceType$6(a.d), 0, a.nd), ((k < 0 || k >= leftcheats.$length) ? $throwRuntimeError("index out of range") : leftcheats.$array[leftcheats.$offset + k]).cutoff)) { + delta = delta - (1) >> 0; + } + r = a.nd; + w = a.nd + delta >> 0; + n = 0; + r = r - (1) >> 0; + while (true) { + if (!(r >= 0)) { break; } + n = n + (((y = k, y < 32 ? (((((x = a.d, ((r < 0 || r >= x.length) ? $throwRuntimeError("index out of range") : x[r])) >> 0) - 48 >> 0)) << y) : 0) >> 0)) >> 0; + quo = (_q = n / 10, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + rem = n - (10 * quo >> 0) >> 0; + w = w - (1) >> 0; + if (w < 800) { + (x$1 = a.d, (w < 0 || w >= x$1.length) ? $throwRuntimeError("index out of range") : x$1[w] = ((rem + 48 >> 0) << 24 >>> 24)); + } else if (!((rem === 0))) { + a.trunc = true; + } + n = quo; + r = r - (1) >> 0; + } + while (true) { + if (!(n > 0)) { break; } + quo$1 = (_q$1 = n / 10, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")); + rem$1 = n - (10 * quo$1 >> 0) >> 0; + w = w - (1) >> 0; + if (w < 800) { + (x$2 = a.d, (w < 0 || w >= x$2.length) ? $throwRuntimeError("index out of range") : x$2[w] = ((rem$1 + 48 >> 0) << 24 >>> 24)); + } else if (!((rem$1 === 0))) { + a.trunc = true; + } + n = quo$1; + } + a.nd = a.nd + (delta) >> 0; + if (a.nd >= 800) { + a.nd = 800; + } + a.dp = a.dp + (delta) >> 0; + trim(a); + }; + decimal.ptr.prototype.Shift = function(k) { + var a, k; + a = this; + if (a.nd === 0) { + } else if (k > 0) { + while (true) { + if (!(k > 27)) { break; } + leftShift(a, 27); + k = k - (27) >> 0; + } + leftShift(a, (k >>> 0)); + } else if (k < 0) { + while (true) { + if (!(k < -27)) { break; } + rightShift(a, 27); + k = k + (27) >> 0; + } + rightShift(a, (-k >>> 0)); + } + }; + decimal.prototype.Shift = function(k) { return this.$val.Shift(k); }; + shouldRoundUp = function(a, nd) { + var _r, a, nd, x, x$1, x$2, x$3; + if (nd < 0 || nd >= a.nd) { + return false; + } + if (((x = a.d, ((nd < 0 || nd >= x.length) ? $throwRuntimeError("index out of range") : x[nd])) === 53) && ((nd + 1 >> 0) === a.nd)) { + if (a.trunc) { + return true; + } + return nd > 0 && !(((_r = (((x$1 = a.d, x$2 = nd - 1 >> 0, ((x$2 < 0 || x$2 >= x$1.length) ? $throwRuntimeError("index out of range") : x$1[x$2])) - 48 << 24 >>> 24)) % 2, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) === 0)); + } + return (x$3 = a.d, ((nd < 0 || nd >= x$3.length) ? $throwRuntimeError("index out of range") : x$3[nd])) >= 53; + }; + decimal.ptr.prototype.Round = function(nd) { + var a, nd; + a = this; + if (nd < 0 || nd >= a.nd) { + return; + } + if (shouldRoundUp(a, nd)) { + a.RoundUp(nd); + } else { + a.RoundDown(nd); + } + }; + decimal.prototype.Round = function(nd) { return this.$val.Round(nd); }; + decimal.ptr.prototype.RoundDown = function(nd) { + var a, nd; + a = this; + if (nd < 0 || nd >= a.nd) { + return; + } + a.nd = nd; + trim(a); + }; + decimal.prototype.RoundDown = function(nd) { return this.$val.RoundDown(nd); }; + decimal.ptr.prototype.RoundUp = function(nd) { + var a, c, i, nd, x, x$1, x$2; + a = this; + if (nd < 0 || nd >= a.nd) { + return; + } + i = nd - 1 >> 0; + while (true) { + if (!(i >= 0)) { break; } + c = (x = a.d, ((i < 0 || i >= x.length) ? $throwRuntimeError("index out of range") : x[i])); + if (c < 57) { + (x$2 = a.d, (i < 0 || i >= x$2.length) ? $throwRuntimeError("index out of range") : x$2[i] = (x$1 = a.d, ((i < 0 || i >= x$1.length) ? $throwRuntimeError("index out of range") : x$1[i])) + (1) << 24 >>> 24); + a.nd = i + 1 >> 0; + return; + } + i = i - (1) >> 0; + } + a.d[0] = 49; + a.nd = 1; + a.dp = a.dp + (1) >> 0; + }; + decimal.prototype.RoundUp = function(nd) { return this.$val.RoundUp(nd); }; + decimal.ptr.prototype.RoundedInteger = function() { + var a, i, n, x, x$1, x$2, x$3; + a = this; + if (a.dp > 20) { + return new $Uint64(4294967295, 4294967295); + } + i = 0; + n = new $Uint64(0, 0); + i = 0; + while (true) { + if (!(i < a.dp && i < a.nd)) { break; } + n = (x = $mul64(n, new $Uint64(0, 10)), x$1 = new $Uint64(0, ((x$2 = a.d, ((i < 0 || i >= x$2.length) ? $throwRuntimeError("index out of range") : x$2[i])) - 48 << 24 >>> 24)), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); + i = i + (1) >> 0; + } + while (true) { + if (!(i < a.dp)) { break; } + n = $mul64(n, (new $Uint64(0, 10))); + i = i + (1) >> 0; + } + if (shouldRoundUp(a, a.dp)) { + n = (x$3 = new $Uint64(0, 1), new $Uint64(n.$high + x$3.$high, n.$low + x$3.$low)); + } + return n; + }; + decimal.prototype.RoundedInteger = function() { return this.$val.RoundedInteger(); }; + extFloat.ptr.prototype.AssignComputeBounds = function(mant, exp, neg, flt) { + var _tmp, _tmp$1, exp, expBiased, f, flt, lower = new extFloat.ptr(), mant, neg, upper = new extFloat.ptr(), x, x$1, x$2, x$3, x$4; + f = this; + f.mant = mant; + f.exp = exp - (flt.mantbits >> 0) >> 0; + f.neg = neg; + if (f.exp <= 0 && (x = $shiftLeft64(($shiftRightUint64(mant, (-f.exp >>> 0))), (-f.exp >>> 0)), (mant.$high === x.$high && mant.$low === x.$low))) { + f.mant = $shiftRightUint64(f.mant, ((-f.exp >>> 0))); + f.exp = 0; + _tmp = $clone(f, extFloat); _tmp$1 = $clone(f, extFloat); $copy(lower, _tmp, extFloat); $copy(upper, _tmp$1, extFloat); + return [lower, upper]; + } + expBiased = exp - flt.bias >> 0; + $copy(upper, new extFloat.ptr((x$1 = $mul64(new $Uint64(0, 2), f.mant), new $Uint64(x$1.$high + 0, x$1.$low + 1)), f.exp - 1 >> 0, f.neg), extFloat); + if (!((x$2 = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), (mant.$high === x$2.$high && mant.$low === x$2.$low))) || (expBiased === 1)) { + $copy(lower, new extFloat.ptr((x$3 = $mul64(new $Uint64(0, 2), f.mant), new $Uint64(x$3.$high - 0, x$3.$low - 1)), f.exp - 1 >> 0, f.neg), extFloat); + } else { + $copy(lower, new extFloat.ptr((x$4 = $mul64(new $Uint64(0, 4), f.mant), new $Uint64(x$4.$high - 0, x$4.$low - 1)), f.exp - 2 >> 0, f.neg), extFloat); + } + return [lower, upper]; + }; + extFloat.prototype.AssignComputeBounds = function(mant, exp, neg, flt) { return this.$val.AssignComputeBounds(mant, exp, neg, flt); }; + extFloat.ptr.prototype.Normalize = function() { + var _tmp, _tmp$1, _tmp$2, _tmp$3, exp, f, mant, shift = 0, x, x$1, x$2, x$3, x$4, x$5; + f = this; + _tmp = f.mant; _tmp$1 = f.exp; mant = _tmp; exp = _tmp$1; + if ((mant.$high === 0 && mant.$low === 0)) { + shift = 0; + return shift; + } + if ((x = $shiftRightUint64(mant, 32), (x.$high === 0 && x.$low === 0))) { + mant = $shiftLeft64(mant, (32)); + exp = exp - (32) >> 0; + } + if ((x$1 = $shiftRightUint64(mant, 48), (x$1.$high === 0 && x$1.$low === 0))) { + mant = $shiftLeft64(mant, (16)); + exp = exp - (16) >> 0; + } + if ((x$2 = $shiftRightUint64(mant, 56), (x$2.$high === 0 && x$2.$low === 0))) { + mant = $shiftLeft64(mant, (8)); + exp = exp - (8) >> 0; + } + if ((x$3 = $shiftRightUint64(mant, 60), (x$3.$high === 0 && x$3.$low === 0))) { + mant = $shiftLeft64(mant, (4)); + exp = exp - (4) >> 0; + } + if ((x$4 = $shiftRightUint64(mant, 62), (x$4.$high === 0 && x$4.$low === 0))) { + mant = $shiftLeft64(mant, (2)); + exp = exp - (2) >> 0; + } + if ((x$5 = $shiftRightUint64(mant, 63), (x$5.$high === 0 && x$5.$low === 0))) { + mant = $shiftLeft64(mant, (1)); + exp = exp - (1) >> 0; + } + shift = ((f.exp - exp >> 0) >>> 0); + _tmp$2 = mant; _tmp$3 = exp; f.mant = _tmp$2; f.exp = _tmp$3; + return shift; + }; + extFloat.prototype.Normalize = function() { return this.$val.Normalize(); }; + extFloat.ptr.prototype.Multiply = function(g) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, cross1, cross2, f, fhi, flo, g, ghi, glo, rem, x, x$1, x$10, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + f = this; + g = $clone(g, extFloat); + _tmp = $shiftRightUint64(f.mant, 32); _tmp$1 = new $Uint64(0, (f.mant.$low >>> 0)); fhi = _tmp; flo = _tmp$1; + _tmp$2 = $shiftRightUint64(g.mant, 32); _tmp$3 = new $Uint64(0, (g.mant.$low >>> 0)); ghi = _tmp$2; glo = _tmp$3; + cross1 = $mul64(fhi, glo); + cross2 = $mul64(flo, ghi); + f.mant = (x = (x$1 = $mul64(fhi, ghi), x$2 = $shiftRightUint64(cross1, 32), new $Uint64(x$1.$high + x$2.$high, x$1.$low + x$2.$low)), x$3 = $shiftRightUint64(cross2, 32), new $Uint64(x.$high + x$3.$high, x.$low + x$3.$low)); + rem = (x$4 = (x$5 = new $Uint64(0, (cross1.$low >>> 0)), x$6 = new $Uint64(0, (cross2.$low >>> 0)), new $Uint64(x$5.$high + x$6.$high, x$5.$low + x$6.$low)), x$7 = $shiftRightUint64(($mul64(flo, glo)), 32), new $Uint64(x$4.$high + x$7.$high, x$4.$low + x$7.$low)); + rem = (x$8 = new $Uint64(0, 2147483648), new $Uint64(rem.$high + x$8.$high, rem.$low + x$8.$low)); + f.mant = (x$9 = f.mant, x$10 = ($shiftRightUint64(rem, 32)), new $Uint64(x$9.$high + x$10.$high, x$9.$low + x$10.$low)); + f.exp = (f.exp + g.exp >> 0) + 64 >> 0; + }; + extFloat.prototype.Multiply = function(g) { return this.$val.Multiply(g); }; + extFloat.ptr.prototype.AssignDecimal = function(mantissa, exp10, neg, trunc, flt) { + var _q, _r, adjExp, denormalExp, errors$1, exp10, extrabits, f, flt, halfway, i, mant_extra, mantissa, neg, ok = false, shift, trunc, x, x$1, x$10, x$11, x$12, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, y; + f = this; + errors$1 = 0; + if (trunc) { + errors$1 = errors$1 + (4) >> 0; + } + f.mant = mantissa; + f.exp = 0; + f.neg = neg; + i = (_q = ((exp10 - -348 >> 0)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + if (exp10 < -348 || i >= 87) { + ok = false; + return ok; + } + adjExp = (_r = ((exp10 - -348 >> 0)) % 8, _r === _r ? _r : $throwRuntimeError("integer divide by zero")); + if (adjExp < 19 && (x = (x$1 = 19 - adjExp >> 0, ((x$1 < 0 || x$1 >= uint64pow10.length) ? $throwRuntimeError("index out of range") : uint64pow10[x$1])), (mantissa.$high < x.$high || (mantissa.$high === x.$high && mantissa.$low < x.$low)))) { + f.mant = $mul64(f.mant, (((adjExp < 0 || adjExp >= uint64pow10.length) ? $throwRuntimeError("index out of range") : uint64pow10[adjExp]))); + f.Normalize(); + } else { + f.Normalize(); + f.Multiply(((adjExp < 0 || adjExp >= smallPowersOfTen.length) ? $throwRuntimeError("index out of range") : smallPowersOfTen[adjExp])); + errors$1 = errors$1 + (4) >> 0; + } + f.Multiply(((i < 0 || i >= powersOfTen.length) ? $throwRuntimeError("index out of range") : powersOfTen[i])); + if (errors$1 > 0) { + errors$1 = errors$1 + (1) >> 0; + } + errors$1 = errors$1 + (4) >> 0; + shift = f.Normalize(); + errors$1 = (y = (shift), y < 32 ? (errors$1 << y) : 0) >> 0; + denormalExp = flt.bias - 63 >> 0; + extrabits = 0; + if (f.exp <= denormalExp) { + extrabits = (((63 - flt.mantbits >>> 0) + 1 >>> 0) + ((denormalExp - f.exp >> 0) >>> 0) >>> 0); + } else { + extrabits = (63 - flt.mantbits >>> 0); + } + halfway = $shiftLeft64(new $Uint64(0, 1), ((extrabits - 1 >>> 0))); + mant_extra = (x$2 = f.mant, x$3 = (x$4 = $shiftLeft64(new $Uint64(0, 1), extrabits), new $Uint64(x$4.$high - 0, x$4.$low - 1)), new $Uint64(x$2.$high & x$3.$high, (x$2.$low & x$3.$low) >>> 0)); + if ((x$5 = (x$6 = new $Int64(halfway.$high, halfway.$low), x$7 = new $Int64(0, errors$1), new $Int64(x$6.$high - x$7.$high, x$6.$low - x$7.$low)), x$8 = new $Int64(mant_extra.$high, mant_extra.$low), (x$5.$high < x$8.$high || (x$5.$high === x$8.$high && x$5.$low < x$8.$low))) && (x$9 = new $Int64(mant_extra.$high, mant_extra.$low), x$10 = (x$11 = new $Int64(halfway.$high, halfway.$low), x$12 = new $Int64(0, errors$1), new $Int64(x$11.$high + x$12.$high, x$11.$low + x$12.$low)), (x$9.$high < x$10.$high || (x$9.$high === x$10.$high && x$9.$low < x$10.$low)))) { + ok = false; + return ok; + } + ok = true; + return ok; + }; + extFloat.prototype.AssignDecimal = function(mantissa, exp10, neg, trunc, flt) { return this.$val.AssignDecimal(mantissa, exp10, neg, trunc, flt); }; + extFloat.ptr.prototype.frexp10 = function() { + var _q, _q$1, _tmp, _tmp$1, approxExp10, exp, exp10 = 0, f, i, index = 0; + f = this; + approxExp10 = (_q = (((-46 - f.exp >> 0)) * 28 >> 0) / 93, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + i = (_q$1 = ((approxExp10 - -348 >> 0)) / 8, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")); + Loop: + while (true) { + if (!(true)) { break; } + exp = (f.exp + ((i < 0 || i >= powersOfTen.length) ? $throwRuntimeError("index out of range") : powersOfTen[i]).exp >> 0) + 64 >> 0; + if (exp < -60) { + i = i + (1) >> 0; + } else if (exp > -32) { + i = i - (1) >> 0; + } else { + break Loop; + } + } + f.Multiply(((i < 0 || i >= powersOfTen.length) ? $throwRuntimeError("index out of range") : powersOfTen[i])); + _tmp = -((-348 + (i * 8 >> 0) >> 0)); _tmp$1 = i; exp10 = _tmp; index = _tmp$1; + return [exp10, index]; + }; + extFloat.prototype.frexp10 = function() { return this.$val.frexp10(); }; + frexp10Many = function(a, b, c) { + var _tuple, a, b, c, exp10 = 0, i; + _tuple = c.frexp10(); exp10 = _tuple[0]; i = _tuple[1]; + a.Multiply(((i < 0 || i >= powersOfTen.length) ? $throwRuntimeError("index out of range") : powersOfTen[i])); + b.Multiply(((i < 0 || i >= powersOfTen.length) ? $throwRuntimeError("index out of range") : powersOfTen[i])); + return exp10; + }; + extFloat.ptr.prototype.FixedDecimal = function(d, n) { + var _q, _q$1, _tmp, _tmp$1, _tuple, buf, d, digit, exp10, f, fraction, i, i$1, i$2, integer, integerDigits, n, nd, needed, nonAsciiName, ok, pos, pow, pow10, rest, shift, v, v1, x, x$1, x$10, x$11, x$12, x$13, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + f = this; + if ((x = f.mant, (x.$high === 0 && x.$low === 0))) { + d.nd = 0; + d.dp = 0; + d.neg = f.neg; + return true; + } + if (n === 0) { + $panic(new $String("strconv: internal error: extFloat.FixedDecimal called with n == 0")); + } + f.Normalize(); + _tuple = f.frexp10(); exp10 = _tuple[0]; + shift = (-f.exp >>> 0); + integer = ($shiftRightUint64(f.mant, shift).$low >>> 0); + fraction = (x$1 = f.mant, x$2 = $shiftLeft64(new $Uint64(0, integer), shift), new $Uint64(x$1.$high - x$2.$high, x$1.$low - x$2.$low)); + nonAsciiName = new $Uint64(0, 1); + needed = n; + integerDigits = 0; + pow10 = new $Uint64(0, 1); + _tmp = 0; _tmp$1 = new $Uint64(0, 1); i = _tmp; pow = _tmp$1; + while (true) { + if (!(i < 20)) { break; } + if ((x$3 = new $Uint64(0, integer), (pow.$high > x$3.$high || (pow.$high === x$3.$high && pow.$low > x$3.$low)))) { + integerDigits = i; + break; + } + pow = $mul64(pow, (new $Uint64(0, 10))); + i = i + (1) >> 0; + } + rest = integer; + if (integerDigits > needed) { + pow10 = (x$4 = integerDigits - needed >> 0, ((x$4 < 0 || x$4 >= uint64pow10.length) ? $throwRuntimeError("index out of range") : uint64pow10[x$4])); + integer = (_q = integer / ((pow10.$low >>> 0)), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); + rest = rest - ((x$5 = (pow10.$low >>> 0), (((integer >>> 16 << 16) * x$5 >>> 0) + (integer << 16 >>> 16) * x$5) >>> 0)) >>> 0; + } else { + rest = 0; + } + buf = $clone(arrayType$1.zero(), arrayType$1); + pos = 32; + v = integer; + while (true) { + if (!(v > 0)) { break; } + v1 = (_q$1 = v / 10, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >>> 0 : $throwRuntimeError("integer divide by zero")); + v = v - (((((10 >>> 16 << 16) * v1 >>> 0) + (10 << 16 >>> 16) * v1) >>> 0)) >>> 0; + pos = pos - (1) >> 0; + (pos < 0 || pos >= buf.length) ? $throwRuntimeError("index out of range") : buf[pos] = ((v + 48 >>> 0) << 24 >>> 24); + v = v1; + } + i$1 = pos; + while (true) { + if (!(i$1 < 32)) { break; } + (x$6 = d.d, x$7 = i$1 - pos >> 0, (x$7 < 0 || x$7 >= x$6.$length) ? $throwRuntimeError("index out of range") : x$6.$array[x$6.$offset + x$7] = ((i$1 < 0 || i$1 >= buf.length) ? $throwRuntimeError("index out of range") : buf[i$1])); + i$1 = i$1 + (1) >> 0; + } + nd = 32 - pos >> 0; + d.nd = nd; + d.dp = integerDigits + exp10 >> 0; + needed = needed - (nd) >> 0; + if (needed > 0) { + if (!((rest === 0)) || !((pow10.$high === 0 && pow10.$low === 1))) { + $panic(new $String("strconv: internal error, rest != 0 but needed > 0")); + } + while (true) { + if (!(needed > 0)) { break; } + fraction = $mul64(fraction, (new $Uint64(0, 10))); + nonAsciiName = $mul64(nonAsciiName, (new $Uint64(0, 10))); + if ((x$8 = $mul64(new $Uint64(0, 2), nonAsciiName), x$9 = $shiftLeft64(new $Uint64(0, 1), shift), (x$8.$high > x$9.$high || (x$8.$high === x$9.$high && x$8.$low > x$9.$low)))) { + return false; + } + digit = $shiftRightUint64(fraction, shift); + (x$10 = d.d, (nd < 0 || nd >= x$10.$length) ? $throwRuntimeError("index out of range") : x$10.$array[x$10.$offset + nd] = (new $Uint64(digit.$high + 0, digit.$low + 48).$low << 24 >>> 24)); + fraction = (x$11 = $shiftLeft64(digit, shift), new $Uint64(fraction.$high - x$11.$high, fraction.$low - x$11.$low)); + nd = nd + (1) >> 0; + needed = needed - (1) >> 0; + } + d.nd = nd; + } + ok = adjustLastDigitFixed(d, (x$12 = $shiftLeft64(new $Uint64(0, rest), shift), new $Uint64(x$12.$high | fraction.$high, (x$12.$low | fraction.$low) >>> 0)), pow10, shift, nonAsciiName); + if (!ok) { + return false; + } + i$2 = d.nd - 1 >> 0; + while (true) { + if (!(i$2 >= 0)) { break; } + if (!(((x$13 = d.d, ((i$2 < 0 || i$2 >= x$13.$length) ? $throwRuntimeError("index out of range") : x$13.$array[x$13.$offset + i$2])) === 48))) { + d.nd = i$2 + 1 >> 0; + break; + } + i$2 = i$2 - (1) >> 0; + } + return true; + }; + extFloat.prototype.FixedDecimal = function(d, n) { return this.$val.FixedDecimal(d, n); }; + adjustLastDigitFixed = function(d, num, den, shift, nonAsciiName) { + var d, den, i, nonAsciiName, num, shift, x, x$1, x$10, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + if ((x = $shiftLeft64(den, shift), (num.$high > x.$high || (num.$high === x.$high && num.$low > x.$low)))) { + $panic(new $String("strconv: num > den< x$2.$high || (x$1.$high === x$2.$high && x$1.$low > x$2.$low)))) { + $panic(new $String("strconv: \xCE\xB5 > (den< x$6.$high || (x$5.$high === x$6.$high && x$5.$low > x$6.$low)))) { + i = d.nd - 1 >> 0; + while (true) { + if (!(i >= 0)) { break; } + if ((x$7 = d.d, ((i < 0 || i >= x$7.$length) ? $throwRuntimeError("index out of range") : x$7.$array[x$7.$offset + i])) === 57) { + d.nd = d.nd - (1) >> 0; + } else { + break; + } + i = i - (1) >> 0; + } + if (i < 0) { + (x$8 = d.d, (0 < 0 || 0 >= x$8.$length) ? $throwRuntimeError("index out of range") : x$8.$array[x$8.$offset + 0] = 49); + d.nd = 1; + d.dp = d.dp + (1) >> 0; + } else { + (x$10 = d.d, (i < 0 || i >= x$10.$length) ? $throwRuntimeError("index out of range") : x$10.$array[x$10.$offset + i] = (x$9 = d.d, ((i < 0 || i >= x$9.$length) ? $throwRuntimeError("index out of range") : x$9.$array[x$9.$offset + i])) + (1) << 24 >>> 24); + } + return true; + } + return false; + }; + extFloat.ptr.prototype.ShortestDecimal = function(d, lower, upper) { + var _q, _tmp, _tmp$1, _tmp$2, _tmp$3, allowance, buf, currentDiff, d, digit, digit$1, exp10, f, fraction, i, i$1, i$2, integer, integerDigits, lower, multiplier, n, nd, pow, pow$1, shift, targetDiff, upper, v, v1, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + f = this; + if ((x = f.mant, (x.$high === 0 && x.$low === 0))) { + d.nd = 0; + d.dp = 0; + d.neg = f.neg; + return true; + } + if ((f.exp === 0) && $equal(lower, f, extFloat) && $equal(lower, upper, extFloat)) { + buf = $clone(arrayType.zero(), arrayType); + n = 23; + v = f.mant; + while (true) { + if (!((v.$high > 0 || (v.$high === 0 && v.$low > 0)))) { break; } + v1 = $div64(v, new $Uint64(0, 10), false); + v = (x$1 = $mul64(new $Uint64(0, 10), v1), new $Uint64(v.$high - x$1.$high, v.$low - x$1.$low)); + (n < 0 || n >= buf.length) ? $throwRuntimeError("index out of range") : buf[n] = (new $Uint64(v.$high + 0, v.$low + 48).$low << 24 >>> 24); + n = n - (1) >> 0; + v = v1; + } + nd = (24 - n >> 0) - 1 >> 0; + i = 0; + while (true) { + if (!(i < nd)) { break; } + (x$3 = d.d, (i < 0 || i >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + i] = (x$2 = (n + 1 >> 0) + i >> 0, ((x$2 < 0 || x$2 >= buf.length) ? $throwRuntimeError("index out of range") : buf[x$2]))); + i = i + (1) >> 0; + } + _tmp = nd; _tmp$1 = nd; d.nd = _tmp; d.dp = _tmp$1; + while (true) { + if (!(d.nd > 0 && ((x$4 = d.d, x$5 = d.nd - 1 >> 0, ((x$5 < 0 || x$5 >= x$4.$length) ? $throwRuntimeError("index out of range") : x$4.$array[x$4.$offset + x$5])) === 48))) { break; } + d.nd = d.nd - (1) >> 0; + } + if (d.nd === 0) { + d.dp = 0; + } + d.neg = f.neg; + return true; + } + upper.Normalize(); + if (f.exp > upper.exp) { + f.mant = $shiftLeft64(f.mant, (((f.exp - upper.exp >> 0) >>> 0))); + f.exp = upper.exp; + } + if (lower.exp > upper.exp) { + lower.mant = $shiftLeft64(lower.mant, (((lower.exp - upper.exp >> 0) >>> 0))); + lower.exp = upper.exp; + } + exp10 = frexp10Many(lower, f, upper); + upper.mant = (x$6 = upper.mant, x$7 = new $Uint64(0, 1), new $Uint64(x$6.$high + x$7.$high, x$6.$low + x$7.$low)); + lower.mant = (x$8 = lower.mant, x$9 = new $Uint64(0, 1), new $Uint64(x$8.$high - x$9.$high, x$8.$low - x$9.$low)); + shift = (-upper.exp >>> 0); + integer = ($shiftRightUint64(upper.mant, shift).$low >>> 0); + fraction = (x$10 = upper.mant, x$11 = $shiftLeft64(new $Uint64(0, integer), shift), new $Uint64(x$10.$high - x$11.$high, x$10.$low - x$11.$low)); + allowance = (x$12 = upper.mant, x$13 = lower.mant, new $Uint64(x$12.$high - x$13.$high, x$12.$low - x$13.$low)); + targetDiff = (x$14 = upper.mant, x$15 = f.mant, new $Uint64(x$14.$high - x$15.$high, x$14.$low - x$15.$low)); + integerDigits = 0; + _tmp$2 = 0; _tmp$3 = new $Uint64(0, 1); i$1 = _tmp$2; pow = _tmp$3; + while (true) { + if (!(i$1 < 20)) { break; } + if ((x$16 = new $Uint64(0, integer), (pow.$high > x$16.$high || (pow.$high === x$16.$high && pow.$low > x$16.$low)))) { + integerDigits = i$1; + break; + } + pow = $mul64(pow, (new $Uint64(0, 10))); + i$1 = i$1 + (1) >> 0; + } + i$2 = 0; + while (true) { + if (!(i$2 < integerDigits)) { break; } + pow$1 = (x$17 = (integerDigits - i$2 >> 0) - 1 >> 0, ((x$17 < 0 || x$17 >= uint64pow10.length) ? $throwRuntimeError("index out of range") : uint64pow10[x$17])); + digit = (_q = integer / (pow$1.$low >>> 0), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); + (x$18 = d.d, (i$2 < 0 || i$2 >= x$18.$length) ? $throwRuntimeError("index out of range") : x$18.$array[x$18.$offset + i$2] = ((digit + 48 >>> 0) << 24 >>> 24)); + integer = integer - ((x$19 = (pow$1.$low >>> 0), (((digit >>> 16 << 16) * x$19 >>> 0) + (digit << 16 >>> 16) * x$19) >>> 0)) >>> 0; + currentDiff = (x$20 = $shiftLeft64(new $Uint64(0, integer), shift), new $Uint64(x$20.$high + fraction.$high, x$20.$low + fraction.$low)); + if ((currentDiff.$high < allowance.$high || (currentDiff.$high === allowance.$high && currentDiff.$low < allowance.$low))) { + d.nd = i$2 + 1 >> 0; + d.dp = integerDigits + exp10 >> 0; + d.neg = f.neg; + return adjustLastDigit(d, currentDiff, targetDiff, allowance, $shiftLeft64(pow$1, shift), new $Uint64(0, 2)); + } + i$2 = i$2 + (1) >> 0; + } + d.nd = integerDigits; + d.dp = d.nd + exp10 >> 0; + d.neg = f.neg; + digit$1 = 0; + multiplier = new $Uint64(0, 1); + while (true) { + if (!(true)) { break; } + fraction = $mul64(fraction, (new $Uint64(0, 10))); + multiplier = $mul64(multiplier, (new $Uint64(0, 10))); + digit$1 = ($shiftRightUint64(fraction, shift).$low >> 0); + (x$21 = d.d, x$22 = d.nd, (x$22 < 0 || x$22 >= x$21.$length) ? $throwRuntimeError("index out of range") : x$21.$array[x$21.$offset + x$22] = ((digit$1 + 48 >> 0) << 24 >>> 24)); + d.nd = d.nd + (1) >> 0; + fraction = (x$23 = $shiftLeft64(new $Uint64(0, digit$1), shift), new $Uint64(fraction.$high - x$23.$high, fraction.$low - x$23.$low)); + if ((x$24 = $mul64(allowance, multiplier), (fraction.$high < x$24.$high || (fraction.$high === x$24.$high && fraction.$low < x$24.$low)))) { + return adjustLastDigit(d, fraction, $mul64(targetDiff, multiplier), $mul64(allowance, multiplier), $shiftLeft64(new $Uint64(0, 1), shift), $mul64(multiplier, new $Uint64(0, 2))); + } + } + }; + extFloat.prototype.ShortestDecimal = function(d, lower, upper) { return this.$val.ShortestDecimal(d, lower, upper); }; + adjustLastDigit = function(d, currentDiff, targetDiff, maxDiff, ulpDecimal, ulpBinary) { + var _index, currentDiff, d, maxDiff, targetDiff, ulpBinary, ulpDecimal, x, x$1, x$10, x$11, x$12, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + if ((x = $mul64(new $Uint64(0, 2), ulpBinary), (ulpDecimal.$high < x.$high || (ulpDecimal.$high === x.$high && ulpDecimal.$low < x.$low)))) { + return false; + } + while (true) { + if (!((x$1 = (x$2 = (x$3 = $div64(ulpDecimal, new $Uint64(0, 2), false), new $Uint64(currentDiff.$high + x$3.$high, currentDiff.$low + x$3.$low)), new $Uint64(x$2.$high + ulpBinary.$high, x$2.$low + ulpBinary.$low)), (x$1.$high < targetDiff.$high || (x$1.$high === targetDiff.$high && x$1.$low < targetDiff.$low))))) { break; } + _index = d.nd - 1 >> 0; + (x$5 = d.d, (_index < 0 || _index >= x$5.$length) ? $throwRuntimeError("index out of range") : x$5.$array[x$5.$offset + _index] = (x$4 = d.d, ((_index < 0 || _index >= x$4.$length) ? $throwRuntimeError("index out of range") : x$4.$array[x$4.$offset + _index])) - (1) << 24 >>> 24); + currentDiff = (x$6 = ulpDecimal, new $Uint64(currentDiff.$high + x$6.$high, currentDiff.$low + x$6.$low)); + } + if ((x$7 = new $Uint64(currentDiff.$high + ulpDecimal.$high, currentDiff.$low + ulpDecimal.$low), x$8 = (x$9 = (x$10 = $div64(ulpDecimal, new $Uint64(0, 2), false), new $Uint64(targetDiff.$high + x$10.$high, targetDiff.$low + x$10.$low)), new $Uint64(x$9.$high + ulpBinary.$high, x$9.$low + ulpBinary.$low)), (x$7.$high < x$8.$high || (x$7.$high === x$8.$high && x$7.$low <= x$8.$low)))) { + return false; + } + if ((currentDiff.$high < ulpBinary.$high || (currentDiff.$high === ulpBinary.$high && currentDiff.$low < ulpBinary.$low)) || (x$11 = new $Uint64(maxDiff.$high - ulpBinary.$high, maxDiff.$low - ulpBinary.$low), (currentDiff.$high > x$11.$high || (currentDiff.$high === x$11.$high && currentDiff.$low > x$11.$low)))) { + return false; + } + if ((d.nd === 1) && ((x$12 = d.d, ((0 < 0 || 0 >= x$12.$length) ? $throwRuntimeError("index out of range") : x$12.$array[x$12.$offset + 0])) === 48)) { + d.nd = 0; + d.dp = 0; + } + return true; + }; + AppendFloat = $pkg.AppendFloat = function(dst, f, fmt, prec, bitSize) { + var bitSize, dst, f, fmt, prec; + return genericFtoa(dst, f, fmt, prec, bitSize); + }; + genericFtoa = function(dst, val, fmt, prec, bitSize) { + var _ref, _ref$1, _ref$2, _ref$3, _tuple, bitSize, bits, buf, buf$1, digits, digs, dst, exp, f, f$1, flt, fmt, lower, mant, neg, ok, prec, s, shortest, upper, val, x, x$1, x$2, x$3, y, y$1; + bits = new $Uint64(0, 0); + flt = ptrType$1.nil; + _ref = bitSize; + if (_ref === 32) { + bits = new $Uint64(0, math.Float32bits(val)); + flt = float32info; + } else if (_ref === 64) { + bits = math.Float64bits(val); + flt = float64info; + } else { + $panic(new $String("strconv: illegal AppendFloat/FormatFloat bitSize")); + } + neg = !((x = $shiftRightUint64(bits, ((flt.expbits + flt.mantbits >>> 0))), (x.$high === 0 && x.$low === 0))); + exp = ($shiftRightUint64(bits, flt.mantbits).$low >> 0) & ((((y = flt.expbits, y < 32 ? (1 << y) : 0) >> 0) - 1 >> 0)); + mant = (x$1 = (x$2 = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), new $Uint64(x$2.$high - 0, x$2.$low - 1)), new $Uint64(bits.$high & x$1.$high, (bits.$low & x$1.$low) >>> 0)); + _ref$1 = exp; + if (_ref$1 === (((y$1 = flt.expbits, y$1 < 32 ? (1 << y$1) : 0) >> 0) - 1 >> 0)) { + s = ""; + if (!((mant.$high === 0 && mant.$low === 0))) { + s = "NaN"; + } else if (neg) { + s = "-Inf"; + } else { + s = "+Inf"; + } + return $appendSlice(dst, new sliceType$6($stringToBytes(s))); + } else if (_ref$1 === 0) { + exp = exp + (1) >> 0; + } else { + mant = (x$3 = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), new $Uint64(mant.$high | x$3.$high, (mant.$low | x$3.$low) >>> 0)); + } + exp = exp + (flt.bias) >> 0; + if (fmt === 98) { + return fmtB(dst, neg, mant, exp, flt); + } + if (!optimize) { + return bigFtoa(dst, prec, fmt, neg, mant, exp, flt); + } + digs = $clone(new decimalSlice.ptr(), decimalSlice); + ok = false; + shortest = prec < 0; + if (shortest) { + f = new extFloat.ptr(); + _tuple = f.AssignComputeBounds(mant, exp, neg, flt); lower = $clone(_tuple[0], extFloat); upper = $clone(_tuple[1], extFloat); + buf = $clone(arrayType$1.zero(), arrayType$1); + digs.d = new sliceType$6(buf); + ok = f.ShortestDecimal(digs, lower, upper); + if (!ok) { + return bigFtoa(dst, prec, fmt, neg, mant, exp, flt); + } + _ref$2 = fmt; + if (_ref$2 === 101 || _ref$2 === 69) { + prec = digs.nd - 1 >> 0; + } else if (_ref$2 === 102) { + prec = max(digs.nd - digs.dp >> 0, 0); + } else if (_ref$2 === 103 || _ref$2 === 71) { + prec = digs.nd; + } + } else if (!((fmt === 102))) { + digits = prec; + _ref$3 = fmt; + if (_ref$3 === 101 || _ref$3 === 69) { + digits = digits + (1) >> 0; + } else if (_ref$3 === 103 || _ref$3 === 71) { + if (prec === 0) { + prec = 1; + } + digits = prec; + } + if (digits <= 15) { + buf$1 = $clone(arrayType.zero(), arrayType); + digs.d = new sliceType$6(buf$1); + f$1 = new extFloat.ptr(mant, exp - (flt.mantbits >> 0) >> 0, neg); + ok = f$1.FixedDecimal(digs, digits); + } + } + if (!ok) { + return bigFtoa(dst, prec, fmt, neg, mant, exp, flt); + } + return formatDigits(dst, shortest, neg, digs, prec, fmt); + }; + bigFtoa = function(dst, prec, fmt, neg, mant, exp, flt) { + var _ref, _ref$1, d, digs, dst, exp, flt, fmt, mant, neg, prec, shortest; + d = new decimal.ptr(); + d.Assign(mant); + d.Shift(exp - (flt.mantbits >> 0) >> 0); + digs = $clone(new decimalSlice.ptr(), decimalSlice); + shortest = prec < 0; + if (shortest) { + roundShortest(d, mant, exp, flt); + $copy(digs, new decimalSlice.ptr(new sliceType$6(d.d), d.nd, d.dp, false), decimalSlice); + _ref = fmt; + if (_ref === 101 || _ref === 69) { + prec = digs.nd - 1 >> 0; + } else if (_ref === 102) { + prec = max(digs.nd - digs.dp >> 0, 0); + } else if (_ref === 103 || _ref === 71) { + prec = digs.nd; + } + } else { + _ref$1 = fmt; + if (_ref$1 === 101 || _ref$1 === 69) { + d.Round(prec + 1 >> 0); + } else if (_ref$1 === 102) { + d.Round(d.dp + prec >> 0); + } else if (_ref$1 === 103 || _ref$1 === 71) { + if (prec === 0) { + prec = 1; + } + d.Round(prec); + } + $copy(digs, new decimalSlice.ptr(new sliceType$6(d.d), d.nd, d.dp, false), decimalSlice); + } + return formatDigits(dst, shortest, neg, digs, prec, fmt); + }; + formatDigits = function(dst, shortest, neg, digs, prec, fmt) { + var _ref, digs, dst, eprec, exp, fmt, neg, prec, shortest; + digs = $clone(digs, decimalSlice); + _ref = fmt; + if (_ref === 101 || _ref === 69) { + return fmtE(dst, neg, digs, prec, fmt); + } else if (_ref === 102) { + return fmtF(dst, neg, digs, prec); + } else if (_ref === 103 || _ref === 71) { + eprec = prec; + if (eprec > digs.nd && digs.nd >= digs.dp) { + eprec = digs.nd; + } + if (shortest) { + eprec = 6; + } + exp = digs.dp - 1 >> 0; + if (exp < -4 || exp >= eprec) { + if (prec > digs.nd) { + prec = digs.nd; + } + return fmtE(dst, neg, digs, prec - 1 >> 0, (fmt + 101 << 24 >>> 24) - 103 << 24 >>> 24); + } + if (prec > digs.dp) { + prec = digs.nd; + } + return fmtF(dst, neg, digs, max(prec - digs.dp >> 0, 0)); + } + return $append(dst, 37, fmt); + }; + roundShortest = function(d, mant, exp, flt) { + var _tmp, _tmp$1, _tmp$2, d, exp, explo, flt, i, inclusive, l, lower, m, mant, mantlo, minexp, okdown, okup, u, upper, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7; + if ((mant.$high === 0 && mant.$low === 0)) { + d.nd = 0; + return; + } + minexp = flt.bias + 1 >> 0; + if (exp > minexp && (332 * ((d.dp - d.nd >> 0)) >> 0) >= (100 * ((exp - (flt.mantbits >> 0) >> 0)) >> 0)) { + return; + } + upper = new decimal.ptr(); + upper.Assign((x = $mul64(mant, new $Uint64(0, 2)), new $Uint64(x.$high + 0, x.$low + 1))); + upper.Shift((exp - (flt.mantbits >> 0) >> 0) - 1 >> 0); + mantlo = new $Uint64(0, 0); + explo = 0; + if ((x$1 = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), (mant.$high > x$1.$high || (mant.$high === x$1.$high && mant.$low > x$1.$low))) || (exp === minexp)) { + mantlo = new $Uint64(mant.$high - 0, mant.$low - 1); + explo = exp; + } else { + mantlo = (x$2 = $mul64(mant, new $Uint64(0, 2)), new $Uint64(x$2.$high - 0, x$2.$low - 1)); + explo = exp - 1 >> 0; + } + lower = new decimal.ptr(); + lower.Assign((x$3 = $mul64(mantlo, new $Uint64(0, 2)), new $Uint64(x$3.$high + 0, x$3.$low + 1))); + lower.Shift((explo - (flt.mantbits >> 0) >> 0) - 1 >> 0); + inclusive = (x$4 = $div64(mant, new $Uint64(0, 2), true), (x$4.$high === 0 && x$4.$low === 0)); + i = 0; + while (true) { + if (!(i < d.nd)) { break; } + _tmp = 0; _tmp$1 = 0; _tmp$2 = 0; l = _tmp; m = _tmp$1; u = _tmp$2; + if (i < lower.nd) { + l = (x$5 = lower.d, ((i < 0 || i >= x$5.length) ? $throwRuntimeError("index out of range") : x$5[i])); + } else { + l = 48; + } + m = (x$6 = d.d, ((i < 0 || i >= x$6.length) ? $throwRuntimeError("index out of range") : x$6[i])); + if (i < upper.nd) { + u = (x$7 = upper.d, ((i < 0 || i >= x$7.length) ? $throwRuntimeError("index out of range") : x$7[i])); + } else { + u = 48; + } + okdown = !((l === m)) || (inclusive && (l === m) && ((i + 1 >> 0) === lower.nd)); + okup = !((m === u)) && (inclusive || (m + 1 << 24 >>> 24) < u || (i + 1 >> 0) < upper.nd); + if (okdown && okup) { + d.Round(i + 1 >> 0); + return; + } else if (okdown) { + d.RoundDown(i + 1 >> 0); + return; + } else if (okup) { + d.RoundUp(i + 1 >> 0); + return; + } + i = i + (1) >> 0; + } + }; + fmtE = function(dst, neg, d, prec, fmt) { + var _q, _r, _ref, buf, ch, d, dst, exp, fmt, i, i$1, m, neg, prec, x, x$1; + d = $clone(d, decimalSlice); + if (neg) { + dst = $append(dst, 45); + } + ch = 48; + if (!((d.nd === 0))) { + ch = (x = d.d, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])); + } + dst = $append(dst, ch); + if (prec > 0) { + dst = $append(dst, 46); + i = 1; + m = ((d.nd + prec >> 0) + 1 >> 0) - max(d.nd, prec + 1 >> 0) >> 0; + while (true) { + if (!(i < m)) { break; } + dst = $append(dst, (x$1 = d.d, ((i < 0 || i >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + i]))); + i = i + (1) >> 0; + } + while (true) { + if (!(i <= prec)) { break; } + dst = $append(dst, 48); + i = i + (1) >> 0; + } + } + dst = $append(dst, fmt); + exp = d.dp - 1 >> 0; + if (d.nd === 0) { + exp = 0; + } + if (exp < 0) { + ch = 45; + exp = -exp; + } else { + ch = 43; + } + dst = $append(dst, ch); + buf = $clone(arrayType$2.zero(), arrayType$2); + i$1 = 3; + while (true) { + if (!(exp >= 10)) { break; } + i$1 = i$1 - (1) >> 0; + (i$1 < 0 || i$1 >= buf.length) ? $throwRuntimeError("index out of range") : buf[i$1] = (((_r = exp % 10, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) + 48 >> 0) << 24 >>> 24); + exp = (_q = exp / (10), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + } + i$1 = i$1 - (1) >> 0; + (i$1 < 0 || i$1 >= buf.length) ? $throwRuntimeError("index out of range") : buf[i$1] = ((exp + 48 >> 0) << 24 >>> 24); + _ref = i$1; + if (_ref === 0) { + dst = $append(dst, buf[0], buf[1], buf[2]); + } else if (_ref === 1) { + dst = $append(dst, buf[1], buf[2]); + } else if (_ref === 2) { + dst = $append(dst, 48, buf[2]); + } + return dst; + }; + fmtF = function(dst, neg, d, prec) { + var ch, d, dst, i, i$1, j, neg, prec, x, x$1; + d = $clone(d, decimalSlice); + if (neg) { + dst = $append(dst, 45); + } + if (d.dp > 0) { + i = 0; + i = 0; + while (true) { + if (!(i < d.dp && i < d.nd)) { break; } + dst = $append(dst, (x = d.d, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i]))); + i = i + (1) >> 0; + } + while (true) { + if (!(i < d.dp)) { break; } + dst = $append(dst, 48); + i = i + (1) >> 0; + } + } else { + dst = $append(dst, 48); + } + if (prec > 0) { + dst = $append(dst, 46); + i$1 = 0; + while (true) { + if (!(i$1 < prec)) { break; } + ch = 48; + j = d.dp + i$1 >> 0; + if (0 <= j && j < d.nd) { + ch = (x$1 = d.d, ((j < 0 || j >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + j])); + } + dst = $append(dst, ch); + i$1 = i$1 + (1) >> 0; + } + } + return dst; + }; + fmtB = function(dst, neg, mant, exp, flt) { + var _q, _r, buf, dst, esign, exp, flt, mant, n, neg, w, x; + buf = $clone(arrayType$3.zero(), arrayType$3); + w = 50; + exp = exp - ((flt.mantbits >> 0)) >> 0; + esign = 43; + if (exp < 0) { + esign = 45; + exp = -exp; + } + n = 0; + while (true) { + if (!(exp > 0 || n < 1)) { break; } + n = n + (1) >> 0; + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = (((_r = exp % 10, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) + 48 >> 0) << 24 >>> 24); + exp = (_q = exp / (10), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + } + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = esign; + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 112; + n = 0; + while (true) { + if (!((mant.$high > 0 || (mant.$high === 0 && mant.$low > 0)) || n < 1)) { break; } + n = n + (1) >> 0; + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = ((x = $div64(mant, new $Uint64(0, 10), true), new $Uint64(x.$high + 0, x.$low + 48)).$low << 24 >>> 24); + mant = $div64(mant, (new $Uint64(0, 10)), false); + } + if (neg) { + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 45; + } + return $appendSlice(dst, $subslice(new sliceType$6(buf), w)); + }; + max = function(a, b) { + var a, b; + if (a > b) { + return a; + } + return b; + }; + FormatInt = $pkg.FormatInt = function(i, base) { + var _tuple, base, i, s; + _tuple = formatBits(sliceType$6.nil, new $Uint64(i.$high, i.$low), base, (i.$high < 0 || (i.$high === 0 && i.$low < 0)), false); s = _tuple[1]; + return s; + }; + Itoa = $pkg.Itoa = function(i) { + var i; + return FormatInt(new $Int64(0, i), 10); + }; + formatBits = function(dst, u, base, neg, append_) { + var a, append_, b, b$1, base, d = sliceType$6.nil, dst, i, j, m, neg, q, q$1, s = "", s$1, u, x, x$1, x$2, x$3; + if (base < 2 || base > 36) { + $panic(new $String("strconv: illegal AppendInt/FormatInt base")); + } + a = $clone(arrayType$4.zero(), arrayType$4); + i = 65; + if (neg) { + u = new $Uint64(-u.$high, -u.$low); + } + if (base === 10) { + while (true) { + if (!((u.$high > 0 || (u.$high === 0 && u.$low >= 100)))) { break; } + i = i - (2) >> 0; + q = $div64(u, new $Uint64(0, 100), false); + j = ((x = $mul64(q, new $Uint64(0, 100)), new $Uint64(u.$high - x.$high, u.$low - x.$low)).$low >>> 0); + (x$1 = i + 1 >> 0, (x$1 < 0 || x$1 >= a.length) ? $throwRuntimeError("index out of range") : a[x$1] = "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789".charCodeAt(j)); + (x$2 = i + 0 >> 0, (x$2 < 0 || x$2 >= a.length) ? $throwRuntimeError("index out of range") : a[x$2] = "0000000000111111111122222222223333333333444444444455555555556666666666777777777788888888889999999999".charCodeAt(j)); + u = q; + } + if ((u.$high > 0 || (u.$high === 0 && u.$low >= 10))) { + i = i - (1) >> 0; + q$1 = $div64(u, new $Uint64(0, 10), false); + (i < 0 || i >= a.length) ? $throwRuntimeError("index out of range") : a[i] = "0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt(((x$3 = $mul64(q$1, new $Uint64(0, 10)), new $Uint64(u.$high - x$3.$high, u.$low - x$3.$low)).$low >>> 0)); + u = q$1; + } + } else { + s$1 = ((base < 0 || base >= shifts.length) ? $throwRuntimeError("index out of range") : shifts[base]); + if (s$1 > 0) { + b = new $Uint64(0, base); + m = (b.$low >>> 0) - 1 >>> 0; + while (true) { + if (!((u.$high > b.$high || (u.$high === b.$high && u.$low >= b.$low)))) { break; } + i = i - (1) >> 0; + (i < 0 || i >= a.length) ? $throwRuntimeError("index out of range") : a[i] = "0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt((((u.$low >>> 0) & m) >>> 0)); + u = $shiftRightUint64(u, (s$1)); + } + } else { + b$1 = new $Uint64(0, base); + while (true) { + if (!((u.$high > b$1.$high || (u.$high === b$1.$high && u.$low >= b$1.$low)))) { break; } + i = i - (1) >> 0; + (i < 0 || i >= a.length) ? $throwRuntimeError("index out of range") : a[i] = "0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt(($div64(u, b$1, true).$low >>> 0)); + u = $div64(u, (b$1), false); + } + } + } + i = i - (1) >> 0; + (i < 0 || i >= a.length) ? $throwRuntimeError("index out of range") : a[i] = "0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt((u.$low >>> 0)); + if (neg) { + i = i - (1) >> 0; + (i < 0 || i >= a.length) ? $throwRuntimeError("index out of range") : a[i] = 45; + } + if (append_) { + d = $appendSlice(dst, $subslice(new sliceType$6(a), i)); + return [d, s]; + } + s = $bytesToString($subslice(new sliceType$6(a), i)); + return [d, s]; + }; + quoteWith = function(s, quote, ASCIIonly) { + var ASCIIonly, _q, _ref, _tuple, buf, n, quote, r, runeTmp, s, s$1, s$2, width; + runeTmp = $clone(arrayType$5.zero(), arrayType$5); + buf = $makeSlice(sliceType$6, 0, (_q = (3 * s.length >> 0) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))); + buf = $append(buf, quote); + width = 0; + while (true) { + if (!(s.length > 0)) { break; } + r = (s.charCodeAt(0) >> 0); + width = 1; + if (r >= 128) { + _tuple = utf8.DecodeRuneInString(s); r = _tuple[0]; width = _tuple[1]; + } + if ((width === 1) && (r === 65533)) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\x"))); + buf = $append(buf, "0123456789abcdef".charCodeAt((s.charCodeAt(0) >>> 4 << 24 >>> 24))); + buf = $append(buf, "0123456789abcdef".charCodeAt(((s.charCodeAt(0) & 15) >>> 0))); + s = s.substring(width); + continue; + } + if ((r === (quote >> 0)) || (r === 92)) { + buf = $append(buf, 92); + buf = $append(buf, (r << 24 >>> 24)); + s = s.substring(width); + continue; + } + if (ASCIIonly) { + if (r < 128 && IsPrint(r)) { + buf = $append(buf, (r << 24 >>> 24)); + s = s.substring(width); + continue; + } + } else if (IsPrint(r)) { + n = utf8.EncodeRune(new sliceType$6(runeTmp), r); + buf = $appendSlice(buf, $subslice(new sliceType$6(runeTmp), 0, n)); + s = s.substring(width); + continue; + } + _ref = r; + if (_ref === 7) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\a"))); + } else if (_ref === 8) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\b"))); + } else if (_ref === 12) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\f"))); + } else if (_ref === 10) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\n"))); + } else if (_ref === 13) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\r"))); + } else if (_ref === 9) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\t"))); + } else if (_ref === 11) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\v"))); + } else { + if (r < 32) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\x"))); + buf = $append(buf, "0123456789abcdef".charCodeAt((s.charCodeAt(0) >>> 4 << 24 >>> 24))); + buf = $append(buf, "0123456789abcdef".charCodeAt(((s.charCodeAt(0) & 15) >>> 0))); + } else if (r > 1114111) { + r = 65533; + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\u"))); + s$1 = 12; + while (true) { + if (!(s$1 >= 0)) { break; } + buf = $append(buf, "0123456789abcdef".charCodeAt((((r >> $min((s$1 >>> 0), 31)) >> 0) & 15))); + s$1 = s$1 - (4) >> 0; + } + } else if (r < 65536) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\u"))); + s$1 = 12; + while (true) { + if (!(s$1 >= 0)) { break; } + buf = $append(buf, "0123456789abcdef".charCodeAt((((r >> $min((s$1 >>> 0), 31)) >> 0) & 15))); + s$1 = s$1 - (4) >> 0; + } + } else { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\U"))); + s$2 = 28; + while (true) { + if (!(s$2 >= 0)) { break; } + buf = $append(buf, "0123456789abcdef".charCodeAt((((r >> $min((s$2 >>> 0), 31)) >> 0) & 15))); + s$2 = s$2 - (4) >> 0; + } + } + } + s = s.substring(width); + } + buf = $append(buf, quote); + return $bytesToString(buf); + }; + Quote = $pkg.Quote = function(s) { + var s; + return quoteWith(s, 34, false); + }; + QuoteToASCII = $pkg.QuoteToASCII = function(s) { + var s; + return quoteWith(s, 34, true); + }; + QuoteRune = $pkg.QuoteRune = function(r) { + var r; + return quoteWith($encodeRune(r), 39, false); + }; + AppendQuoteRune = $pkg.AppendQuoteRune = function(dst, r) { + var dst, r; + return $appendSlice(dst, new sliceType$6($stringToBytes(QuoteRune(r)))); + }; + QuoteRuneToASCII = $pkg.QuoteRuneToASCII = function(r) { + var r; + return quoteWith($encodeRune(r), 39, true); + }; + AppendQuoteRuneToASCII = $pkg.AppendQuoteRuneToASCII = function(dst, r) { + var dst, r; + return $appendSlice(dst, new sliceType$6($stringToBytes(QuoteRuneToASCII(r)))); + }; + CanBackquote = $pkg.CanBackquote = function(s) { + var _tuple, r, s, wid; + while (true) { + if (!(s.length > 0)) { break; } + _tuple = utf8.DecodeRuneInString(s); r = _tuple[0]; wid = _tuple[1]; + s = s.substring(wid); + if (wid > 1) { + if (r === 65279) { + return false; + } + continue; + } + if (r === 65533) { + return false; + } + if ((r < 32 && !((r === 9))) || (r === 96) || (r === 127)) { + return false; + } + } + return true; + }; + unhex = function(b) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, b, c, ok = false, v = 0; + c = (b >> 0); + if (48 <= c && c <= 57) { + _tmp = c - 48 >> 0; _tmp$1 = true; v = _tmp; ok = _tmp$1; + return [v, ok]; + } else if (97 <= c && c <= 102) { + _tmp$2 = (c - 97 >> 0) + 10 >> 0; _tmp$3 = true; v = _tmp$2; ok = _tmp$3; + return [v, ok]; + } else if (65 <= c && c <= 70) { + _tmp$4 = (c - 65 >> 0) + 10 >> 0; _tmp$5 = true; v = _tmp$4; ok = _tmp$5; + return [v, ok]; + } + return [v, ok]; + }; + UnquoteChar = $pkg.UnquoteChar = function(s, quote) { + var _ref, _ref$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, c, c$1, err = $ifaceNil, j, j$1, multibyte = false, n, ok, quote, r, s, size, tail = "", v, v$1, value = 0, x, x$1; + c = s.charCodeAt(0); + if ((c === quote) && ((quote === 39) || (quote === 34))) { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } else if (c >= 128) { + _tuple = utf8.DecodeRuneInString(s); r = _tuple[0]; size = _tuple[1]; + _tmp = r; _tmp$1 = true; _tmp$2 = s.substring(size); _tmp$3 = $ifaceNil; value = _tmp; multibyte = _tmp$1; tail = _tmp$2; err = _tmp$3; + return [value, multibyte, tail, err]; + } else if (!((c === 92))) { + _tmp$4 = (s.charCodeAt(0) >> 0); _tmp$5 = false; _tmp$6 = s.substring(1); _tmp$7 = $ifaceNil; value = _tmp$4; multibyte = _tmp$5; tail = _tmp$6; err = _tmp$7; + return [value, multibyte, tail, err]; + } + if (s.length <= 1) { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } + c$1 = s.charCodeAt(1); + s = s.substring(2); + _ref = c$1; + switch (0) { default: if (_ref === 97) { + value = 7; + } else if (_ref === 98) { + value = 8; + } else if (_ref === 102) { + value = 12; + } else if (_ref === 110) { + value = 10; + } else if (_ref === 114) { + value = 13; + } else if (_ref === 116) { + value = 9; + } else if (_ref === 118) { + value = 11; + } else if (_ref === 120 || _ref === 117 || _ref === 85) { + n = 0; + _ref$1 = c$1; + if (_ref$1 === 120) { + n = 2; + } else if (_ref$1 === 117) { + n = 4; + } else if (_ref$1 === 85) { + n = 8; + } + v = 0; + if (s.length < n) { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } + j = 0; + while (true) { + if (!(j < n)) { break; } + _tuple$1 = unhex(s.charCodeAt(j)); x = _tuple$1[0]; ok = _tuple$1[1]; + if (!ok) { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } + v = (v << 4 >> 0) | x; + j = j + (1) >> 0; + } + s = s.substring(n); + if (c$1 === 120) { + value = v; + break; + } + if (v > 1114111) { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } + value = v; + multibyte = true; + } else if (_ref === 48 || _ref === 49 || _ref === 50 || _ref === 51 || _ref === 52 || _ref === 53 || _ref === 54 || _ref === 55) { + v$1 = (c$1 >> 0) - 48 >> 0; + if (s.length < 2) { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } + j$1 = 0; + while (true) { + if (!(j$1 < 2)) { break; } + x$1 = (s.charCodeAt(j$1) >> 0) - 48 >> 0; + if (x$1 < 0 || x$1 > 7) { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } + v$1 = ((v$1 << 3 >> 0)) | x$1; + j$1 = j$1 + (1) >> 0; + } + s = s.substring(2); + if (v$1 > 255) { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } + value = v$1; + } else if (_ref === 92) { + value = 92; + } else if (_ref === 39 || _ref === 34) { + if (!((c$1 === quote))) { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } + value = (c$1 >> 0); + } else { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } } + tail = s; + return [value, multibyte, tail, err]; + }; + Unquote = $pkg.Unquote = function(s) { + var _q, _ref, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, buf, c, err = $ifaceNil, err$1, multibyte, n, n$1, quote, r, runeTmp, s, size, ss, t = ""; + n = s.length; + if (n < 2) { + _tmp = ""; _tmp$1 = $pkg.ErrSyntax; t = _tmp; err = _tmp$1; + return [t, err]; + } + quote = s.charCodeAt(0); + if (!((quote === s.charCodeAt((n - 1 >> 0))))) { + _tmp$2 = ""; _tmp$3 = $pkg.ErrSyntax; t = _tmp$2; err = _tmp$3; + return [t, err]; + } + s = s.substring(1, (n - 1 >> 0)); + if (quote === 96) { + if (contains(s, 96)) { + _tmp$4 = ""; _tmp$5 = $pkg.ErrSyntax; t = _tmp$4; err = _tmp$5; + return [t, err]; + } + _tmp$6 = s; _tmp$7 = $ifaceNil; t = _tmp$6; err = _tmp$7; + return [t, err]; + } + if (!((quote === 34)) && !((quote === 39))) { + _tmp$8 = ""; _tmp$9 = $pkg.ErrSyntax; t = _tmp$8; err = _tmp$9; + return [t, err]; + } + if (contains(s, 10)) { + _tmp$10 = ""; _tmp$11 = $pkg.ErrSyntax; t = _tmp$10; err = _tmp$11; + return [t, err]; + } + if (!contains(s, 92) && !contains(s, quote)) { + _ref = quote; + if (_ref === 34) { + _tmp$12 = s; _tmp$13 = $ifaceNil; t = _tmp$12; err = _tmp$13; + return [t, err]; + } else if (_ref === 39) { + _tuple = utf8.DecodeRuneInString(s); r = _tuple[0]; size = _tuple[1]; + if ((size === s.length) && (!((r === 65533)) || !((size === 1)))) { + _tmp$14 = s; _tmp$15 = $ifaceNil; t = _tmp$14; err = _tmp$15; + return [t, err]; + } + } + } + runeTmp = $clone(arrayType$5.zero(), arrayType$5); + buf = $makeSlice(sliceType$6, 0, (_q = (3 * s.length >> 0) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))); + while (true) { + if (!(s.length > 0)) { break; } + _tuple$1 = UnquoteChar(s, quote); c = _tuple$1[0]; multibyte = _tuple$1[1]; ss = _tuple$1[2]; err$1 = _tuple$1[3]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + _tmp$16 = ""; _tmp$17 = err$1; t = _tmp$16; err = _tmp$17; + return [t, err]; + } + s = ss; + if (c < 128 || !multibyte) { + buf = $append(buf, (c << 24 >>> 24)); + } else { + n$1 = utf8.EncodeRune(new sliceType$6(runeTmp), c); + buf = $appendSlice(buf, $subslice(new sliceType$6(runeTmp), 0, n$1)); + } + if ((quote === 39) && !((s.length === 0))) { + _tmp$18 = ""; _tmp$19 = $pkg.ErrSyntax; t = _tmp$18; err = _tmp$19; + return [t, err]; + } + } + _tmp$20 = $bytesToString(buf); _tmp$21 = $ifaceNil; t = _tmp$20; err = _tmp$21; + return [t, err]; + }; + contains = function(s, c) { + var c, i, s; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + if (s.charCodeAt(i) === c) { + return true; + } + i = i + (1) >> 0; + } + return false; + }; + bsearch16 = function(a, x) { + var _q, _tmp, _tmp$1, a, h, i, j, x; + _tmp = 0; _tmp$1 = a.$length; i = _tmp; j = _tmp$1; + while (true) { + if (!(i < j)) { break; } + h = i + (_q = ((j - i >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0; + if (((h < 0 || h >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + h]) < x) { + i = h + 1 >> 0; + } else { + j = h; + } + } + return i; + }; + bsearch32 = function(a, x) { + var _q, _tmp, _tmp$1, a, h, i, j, x; + _tmp = 0; _tmp$1 = a.$length; i = _tmp; j = _tmp$1; + while (true) { + if (!(i < j)) { break; } + h = i + (_q = ((j - i >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0; + if (((h < 0 || h >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + h]) < x) { + i = h + 1 >> 0; + } else { + j = h; + } + } + return i; + }; + IsPrint = $pkg.IsPrint = function(r) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, i, i$1, isNotPrint, isNotPrint$1, isPrint, isPrint$1, j, j$1, r, rr, rr$1, x, x$1, x$2, x$3; + if (r <= 255) { + if (32 <= r && r <= 126) { + return true; + } + if (161 <= r && r <= 255) { + return !((r === 173)); + } + return false; + } + if (0 <= r && r < 65536) { + _tmp = (r << 16 >>> 16); _tmp$1 = isPrint16; _tmp$2 = isNotPrint16; rr = _tmp; isPrint = _tmp$1; isNotPrint = _tmp$2; + i = bsearch16(isPrint, rr); + if (i >= isPrint.$length || rr < (x = i & ~1, ((x < 0 || x >= isPrint.$length) ? $throwRuntimeError("index out of range") : isPrint.$array[isPrint.$offset + x])) || (x$1 = i | 1, ((x$1 < 0 || x$1 >= isPrint.$length) ? $throwRuntimeError("index out of range") : isPrint.$array[isPrint.$offset + x$1])) < rr) { + return false; + } + j = bsearch16(isNotPrint, rr); + return j >= isNotPrint.$length || !((((j < 0 || j >= isNotPrint.$length) ? $throwRuntimeError("index out of range") : isNotPrint.$array[isNotPrint.$offset + j]) === rr)); + } + _tmp$3 = (r >>> 0); _tmp$4 = isPrint32; _tmp$5 = isNotPrint32; rr$1 = _tmp$3; isPrint$1 = _tmp$4; isNotPrint$1 = _tmp$5; + i$1 = bsearch32(isPrint$1, rr$1); + if (i$1 >= isPrint$1.$length || rr$1 < (x$2 = i$1 & ~1, ((x$2 < 0 || x$2 >= isPrint$1.$length) ? $throwRuntimeError("index out of range") : isPrint$1.$array[isPrint$1.$offset + x$2])) || (x$3 = i$1 | 1, ((x$3 < 0 || x$3 >= isPrint$1.$length) ? $throwRuntimeError("index out of range") : isPrint$1.$array[isPrint$1.$offset + x$3])) < rr$1) { + return false; + } + if (r >= 131072) { + return true; + } + r = r - (65536) >> 0; + j$1 = bsearch16(isNotPrint$1, (r << 16 >>> 16)); + return j$1 >= isNotPrint$1.$length || !((((j$1 < 0 || j$1 >= isNotPrint$1.$length) ? $throwRuntimeError("index out of range") : isNotPrint$1.$array[isNotPrint$1.$offset + j$1]) === (r << 16 >>> 16))); + }; + ptrType$2.methods = [{prop: "set", name: "set", pkg: "strconv", typ: $funcType([$String], [$Bool], false)}, {prop: "floatBits", name: "floatBits", pkg: "strconv", typ: $funcType([ptrType$1], [$Uint64, $Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Assign", name: "Assign", pkg: "", typ: $funcType([$Uint64], [], false)}, {prop: "Shift", name: "Shift", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Round", name: "Round", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "RoundDown", name: "RoundDown", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "RoundUp", name: "RoundUp", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "RoundedInteger", name: "RoundedInteger", pkg: "", typ: $funcType([], [$Uint64], false)}]; + ptrType$4.methods = [{prop: "floatBits", name: "floatBits", pkg: "strconv", typ: $funcType([ptrType$1], [$Uint64, $Bool], false)}, {prop: "AssignComputeBounds", name: "AssignComputeBounds", pkg: "", typ: $funcType([$Uint64, $Int, $Bool, ptrType$1], [extFloat, extFloat], false)}, {prop: "Normalize", name: "Normalize", pkg: "", typ: $funcType([], [$Uint], false)}, {prop: "Multiply", name: "Multiply", pkg: "", typ: $funcType([extFloat], [], false)}, {prop: "AssignDecimal", name: "AssignDecimal", pkg: "", typ: $funcType([$Uint64, $Int, $Bool, $Bool, ptrType$1], [$Bool], false)}, {prop: "frexp10", name: "frexp10", pkg: "strconv", typ: $funcType([], [$Int, $Int], false)}, {prop: "FixedDecimal", name: "FixedDecimal", pkg: "", typ: $funcType([ptrType$3, $Int], [$Bool], false)}, {prop: "ShortestDecimal", name: "ShortestDecimal", pkg: "", typ: $funcType([ptrType$3, ptrType$4, ptrType$4], [$Bool], false)}]; + decimal.init([{prop: "d", name: "d", pkg: "strconv", typ: arrayType$6, tag: ""}, {prop: "nd", name: "nd", pkg: "strconv", typ: $Int, tag: ""}, {prop: "dp", name: "dp", pkg: "strconv", typ: $Int, tag: ""}, {prop: "neg", name: "neg", pkg: "strconv", typ: $Bool, tag: ""}, {prop: "trunc", name: "trunc", pkg: "strconv", typ: $Bool, tag: ""}]); + leftCheat.init([{prop: "delta", name: "delta", pkg: "strconv", typ: $Int, tag: ""}, {prop: "cutoff", name: "cutoff", pkg: "strconv", typ: $String, tag: ""}]); + extFloat.init([{prop: "mant", name: "mant", pkg: "strconv", typ: $Uint64, tag: ""}, {prop: "exp", name: "exp", pkg: "strconv", typ: $Int, tag: ""}, {prop: "neg", name: "neg", pkg: "strconv", typ: $Bool, tag: ""}]); + floatInfo.init([{prop: "mantbits", name: "mantbits", pkg: "strconv", typ: $Uint, tag: ""}, {prop: "expbits", name: "expbits", pkg: "strconv", typ: $Uint, tag: ""}, {prop: "bias", name: "bias", pkg: "strconv", typ: $Int, tag: ""}]); + decimalSlice.init([{prop: "d", name: "d", pkg: "strconv", typ: sliceType$6, tag: ""}, {prop: "nd", name: "nd", pkg: "strconv", typ: $Int, tag: ""}, {prop: "dp", name: "dp", pkg: "strconv", typ: $Int, tag: ""}, {prop: "neg", name: "neg", pkg: "strconv", typ: $Bool, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_strconv = function() { while (true) { switch ($s) { case 0: + $r = errors.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = math.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = utf8.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + optimize = true; + $pkg.ErrRange = errors.New("value out of range"); + $pkg.ErrSyntax = errors.New("invalid syntax"); + leftcheats = new sliceType$3([new leftCheat.ptr(0, ""), new leftCheat.ptr(1, "5"), new leftCheat.ptr(1, "25"), new leftCheat.ptr(1, "125"), new leftCheat.ptr(2, "625"), new leftCheat.ptr(2, "3125"), new leftCheat.ptr(2, "15625"), new leftCheat.ptr(3, "78125"), new leftCheat.ptr(3, "390625"), new leftCheat.ptr(3, "1953125"), new leftCheat.ptr(4, "9765625"), new leftCheat.ptr(4, "48828125"), new leftCheat.ptr(4, "244140625"), new leftCheat.ptr(4, "1220703125"), new leftCheat.ptr(5, "6103515625"), new leftCheat.ptr(5, "30517578125"), new leftCheat.ptr(5, "152587890625"), new leftCheat.ptr(6, "762939453125"), new leftCheat.ptr(6, "3814697265625"), new leftCheat.ptr(6, "19073486328125"), new leftCheat.ptr(7, "95367431640625"), new leftCheat.ptr(7, "476837158203125"), new leftCheat.ptr(7, "2384185791015625"), new leftCheat.ptr(7, "11920928955078125"), new leftCheat.ptr(8, "59604644775390625"), new leftCheat.ptr(8, "298023223876953125"), new leftCheat.ptr(8, "1490116119384765625"), new leftCheat.ptr(9, "7450580596923828125")]); + smallPowersOfTen = $toNativeArray($kindStruct, [new extFloat.ptr(new $Uint64(2147483648, 0), -63, false), new extFloat.ptr(new $Uint64(2684354560, 0), -60, false), new extFloat.ptr(new $Uint64(3355443200, 0), -57, false), new extFloat.ptr(new $Uint64(4194304000, 0), -54, false), new extFloat.ptr(new $Uint64(2621440000, 0), -50, false), new extFloat.ptr(new $Uint64(3276800000, 0), -47, false), new extFloat.ptr(new $Uint64(4096000000, 0), -44, false), new extFloat.ptr(new $Uint64(2560000000, 0), -40, false)]); + powersOfTen = $toNativeArray($kindStruct, [new extFloat.ptr(new $Uint64(4203730336, 136053384), -1220, false), new extFloat.ptr(new $Uint64(3132023167, 2722021238), -1193, false), new extFloat.ptr(new $Uint64(2333539104, 810921078), -1166, false), new extFloat.ptr(new $Uint64(3477244234, 1573795306), -1140, false), new extFloat.ptr(new $Uint64(2590748842, 1432697645), -1113, false), new extFloat.ptr(new $Uint64(3860516611, 1025131999), -1087, false), new extFloat.ptr(new $Uint64(2876309015, 3348809418), -1060, false), new extFloat.ptr(new $Uint64(4286034428, 3200048207), -1034, false), new extFloat.ptr(new $Uint64(3193344495, 1097586188), -1007, false), new extFloat.ptr(new $Uint64(2379227053, 2424306748), -980, false), new extFloat.ptr(new $Uint64(3545324584, 827693699), -954, false), new extFloat.ptr(new $Uint64(2641472655, 2913388981), -927, false), new extFloat.ptr(new $Uint64(3936100983, 602835915), -901, false), new extFloat.ptr(new $Uint64(2932623761, 1081627501), -874, false), new extFloat.ptr(new $Uint64(2184974969, 1572261463), -847, false), new extFloat.ptr(new $Uint64(3255866422, 1308317239), -821, false), new extFloat.ptr(new $Uint64(2425809519, 944281679), -794, false), new extFloat.ptr(new $Uint64(3614737867, 629291719), -768, false), new extFloat.ptr(new $Uint64(2693189581, 2545915892), -741, false), new extFloat.ptr(new $Uint64(4013165208, 388672741), -715, false), new extFloat.ptr(new $Uint64(2990041083, 708162190), -688, false), new extFloat.ptr(new $Uint64(2227754207, 3536207675), -661, false), new extFloat.ptr(new $Uint64(3319612455, 450088378), -635, false), new extFloat.ptr(new $Uint64(2473304014, 3139815830), -608, false), new extFloat.ptr(new $Uint64(3685510180, 2103616900), -582, false), new extFloat.ptr(new $Uint64(2745919064, 224385782), -555, false), new extFloat.ptr(new $Uint64(4091738259, 3737383206), -529, false), new extFloat.ptr(new $Uint64(3048582568, 2868871352), -502, false), new extFloat.ptr(new $Uint64(2271371013, 1820084875), -475, false), new extFloat.ptr(new $Uint64(3384606560, 885076051), -449, false), new extFloat.ptr(new $Uint64(2521728396, 2444895829), -422, false), new extFloat.ptr(new $Uint64(3757668132, 1881767613), -396, false), new extFloat.ptr(new $Uint64(2799680927, 3102062735), -369, false), new extFloat.ptr(new $Uint64(4171849679, 2289335700), -343, false), new extFloat.ptr(new $Uint64(3108270227, 2410191823), -316, false), new extFloat.ptr(new $Uint64(2315841784, 3205436779), -289, false), new extFloat.ptr(new $Uint64(3450873173, 1697722806), -263, false), new extFloat.ptr(new $Uint64(2571100870, 3497754540), -236, false), new extFloat.ptr(new $Uint64(3831238852, 707476230), -210, false), new extFloat.ptr(new $Uint64(2854495385, 1769181907), -183, false), new extFloat.ptr(new $Uint64(4253529586, 2197867022), -157, false), new extFloat.ptr(new $Uint64(3169126500, 2450594539), -130, false), new extFloat.ptr(new $Uint64(2361183241, 1867548876), -103, false), new extFloat.ptr(new $Uint64(3518437208, 3793315116), -77, false), new extFloat.ptr(new $Uint64(2621440000, 0), -50, false), new extFloat.ptr(new $Uint64(3906250000, 0), -24, false), new extFloat.ptr(new $Uint64(2910383045, 2892103680), 3, false), new extFloat.ptr(new $Uint64(2168404344, 4170451332), 30, false), new extFloat.ptr(new $Uint64(3231174267, 3372684723), 56, false), new extFloat.ptr(new $Uint64(2407412430, 2078956656), 83, false), new extFloat.ptr(new $Uint64(3587324068, 2884206696), 109, false), new extFloat.ptr(new $Uint64(2672764710, 395977285), 136, false), new extFloat.ptr(new $Uint64(3982729777, 3569679143), 162, false), new extFloat.ptr(new $Uint64(2967364920, 2361961896), 189, false), new extFloat.ptr(new $Uint64(2210859150, 447440347), 216, false), new extFloat.ptr(new $Uint64(3294436857, 1114709402), 242, false), new extFloat.ptr(new $Uint64(2454546732, 2786846552), 269, false), new extFloat.ptr(new $Uint64(3657559652, 443583978), 295, false), new extFloat.ptr(new $Uint64(2725094297, 2599384906), 322, false), new extFloat.ptr(new $Uint64(4060706939, 3028118405), 348, false), new extFloat.ptr(new $Uint64(3025462433, 2044532855), 375, false), new extFloat.ptr(new $Uint64(2254145170, 1536935362), 402, false), new extFloat.ptr(new $Uint64(3358938053, 3365297469), 428, false), new extFloat.ptr(new $Uint64(2502603868, 4204241075), 455, false), new extFloat.ptr(new $Uint64(3729170365, 2577424355), 481, false), new extFloat.ptr(new $Uint64(2778448436, 3677981733), 508, false), new extFloat.ptr(new $Uint64(4140210802, 2744688476), 534, false), new extFloat.ptr(new $Uint64(3084697427, 1424604878), 561, false), new extFloat.ptr(new $Uint64(2298278679, 4062331362), 588, false), new extFloat.ptr(new $Uint64(3424702107, 3546052773), 614, false), new extFloat.ptr(new $Uint64(2551601907, 2065781727), 641, false), new extFloat.ptr(new $Uint64(3802183132, 2535403578), 667, false), new extFloat.ptr(new $Uint64(2832847187, 1558426518), 694, false), new extFloat.ptr(new $Uint64(4221271257, 2762425404), 720, false), new extFloat.ptr(new $Uint64(3145092172, 2812560400), 747, false), new extFloat.ptr(new $Uint64(2343276271, 3057687578), 774, false), new extFloat.ptr(new $Uint64(3491753744, 2790753324), 800, false), new extFloat.ptr(new $Uint64(2601559269, 3918606633), 827, false), new extFloat.ptr(new $Uint64(3876625403, 2711358621), 853, false), new extFloat.ptr(new $Uint64(2888311001, 1648096297), 880, false), new extFloat.ptr(new $Uint64(2151959390, 2057817989), 907, false), new extFloat.ptr(new $Uint64(3206669376, 61660461), 933, false), new extFloat.ptr(new $Uint64(2389154863, 1581580175), 960, false), new extFloat.ptr(new $Uint64(3560118173, 2626467905), 986, false), new extFloat.ptr(new $Uint64(2652494738, 3034782633), 1013, false), new extFloat.ptr(new $Uint64(3952525166, 3135207385), 1039, false), new extFloat.ptr(new $Uint64(2944860731, 2616258155), 1066, false)]); + uint64pow10 = $toNativeArray($kindUint64, [new $Uint64(0, 1), new $Uint64(0, 10), new $Uint64(0, 100), new $Uint64(0, 1000), new $Uint64(0, 10000), new $Uint64(0, 100000), new $Uint64(0, 1000000), new $Uint64(0, 10000000), new $Uint64(0, 100000000), new $Uint64(0, 1000000000), new $Uint64(2, 1410065408), new $Uint64(23, 1215752192), new $Uint64(232, 3567587328), new $Uint64(2328, 1316134912), new $Uint64(23283, 276447232), new $Uint64(232830, 2764472320), new $Uint64(2328306, 1874919424), new $Uint64(23283064, 1569325056), new $Uint64(232830643, 2808348672), new $Uint64(2328306436, 2313682944)]); + float32info = new floatInfo.ptr(23, 8, -127); + float64info = new floatInfo.ptr(52, 11, -1023); + isPrint16 = new sliceType$4([32, 126, 161, 887, 890, 895, 900, 1366, 1369, 1418, 1421, 1479, 1488, 1514, 1520, 1524, 1542, 1563, 1566, 1805, 1808, 1866, 1869, 1969, 1984, 2042, 2048, 2093, 2096, 2139, 2142, 2142, 2208, 2226, 2276, 2444, 2447, 2448, 2451, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2531, 2534, 2555, 2561, 2570, 2575, 2576, 2579, 2617, 2620, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2654, 2662, 2677, 2689, 2745, 2748, 2765, 2768, 2768, 2784, 2787, 2790, 2801, 2817, 2828, 2831, 2832, 2835, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2915, 2918, 2935, 2946, 2954, 2958, 2965, 2969, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3021, 3024, 3024, 3031, 3031, 3046, 3066, 3072, 3129, 3133, 3149, 3157, 3161, 3168, 3171, 3174, 3183, 3192, 3257, 3260, 3277, 3285, 3286, 3294, 3299, 3302, 3314, 3329, 3386, 3389, 3406, 3415, 3415, 3424, 3427, 3430, 3445, 3449, 3455, 3458, 3478, 3482, 3517, 3520, 3526, 3530, 3530, 3535, 3551, 3558, 3567, 3570, 3572, 3585, 3642, 3647, 3675, 3713, 3716, 3719, 3722, 3725, 3725, 3732, 3751, 3754, 3773, 3776, 3789, 3792, 3801, 3804, 3807, 3840, 3948, 3953, 4058, 4096, 4295, 4301, 4301, 4304, 4685, 4688, 4701, 4704, 4749, 4752, 4789, 4792, 4805, 4808, 4885, 4888, 4954, 4957, 4988, 4992, 5017, 5024, 5108, 5120, 5788, 5792, 5880, 5888, 5908, 5920, 5942, 5952, 5971, 5984, 6003, 6016, 6109, 6112, 6121, 6128, 6137, 6144, 6157, 6160, 6169, 6176, 6263, 6272, 6314, 6320, 6389, 6400, 6443, 6448, 6459, 6464, 6464, 6468, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6618, 6622, 6683, 6686, 6780, 6783, 6793, 6800, 6809, 6816, 6829, 6832, 6846, 6912, 6987, 6992, 7036, 7040, 7155, 7164, 7223, 7227, 7241, 7245, 7295, 7360, 7367, 7376, 7417, 7424, 7669, 7676, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8061, 8064, 8147, 8150, 8175, 8178, 8190, 8208, 8231, 8240, 8286, 8304, 8305, 8308, 8348, 8352, 8381, 8400, 8432, 8448, 8585, 8592, 9210, 9216, 9254, 9280, 9290, 9312, 11123, 11126, 11157, 11160, 11193, 11197, 11217, 11264, 11507, 11513, 11559, 11565, 11565, 11568, 11623, 11631, 11632, 11647, 11670, 11680, 11842, 11904, 12019, 12032, 12245, 12272, 12283, 12289, 12438, 12441, 12543, 12549, 12589, 12593, 12730, 12736, 12771, 12784, 19893, 19904, 40908, 40960, 42124, 42128, 42182, 42192, 42539, 42560, 42743, 42752, 42925, 42928, 42929, 42999, 43051, 43056, 43065, 43072, 43127, 43136, 43204, 43214, 43225, 43232, 43259, 43264, 43347, 43359, 43388, 43392, 43481, 43486, 43574, 43584, 43597, 43600, 43609, 43612, 43714, 43739, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43871, 43876, 43877, 43968, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64449, 64467, 64831, 64848, 64911, 64914, 64967, 65008, 65021, 65024, 65049, 65056, 65069, 65072, 65131, 65136, 65276, 65281, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65504, 65518, 65532, 65533]); + isNotPrint16 = new sliceType$4([173, 907, 909, 930, 1328, 1376, 1416, 1424, 1757, 2111, 2436, 2473, 2481, 2526, 2564, 2601, 2609, 2612, 2615, 2621, 2653, 2692, 2702, 2706, 2729, 2737, 2740, 2758, 2762, 2820, 2857, 2865, 2868, 2910, 2948, 2961, 2971, 2973, 3017, 3076, 3085, 3089, 3113, 3141, 3145, 3159, 3200, 3204, 3213, 3217, 3241, 3252, 3269, 3273, 3295, 3312, 3332, 3341, 3345, 3397, 3401, 3460, 3506, 3516, 3541, 3543, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3770, 3781, 3783, 3912, 3992, 4029, 4045, 4294, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823, 4881, 5760, 5901, 5997, 6001, 6431, 6751, 7415, 8024, 8026, 8028, 8030, 8117, 8133, 8156, 8181, 8335, 11209, 11311, 11359, 11558, 11687, 11695, 11703, 11711, 11719, 11727, 11735, 11743, 11930, 12352, 12687, 12831, 13055, 42654, 42895, 43470, 43519, 43815, 43823, 64311, 64317, 64319, 64322, 64325, 65107, 65127, 65141, 65511]); + isPrint32 = new sliceType$5([65536, 65613, 65616, 65629, 65664, 65786, 65792, 65794, 65799, 65843, 65847, 65932, 65936, 65947, 65952, 65952, 66000, 66045, 66176, 66204, 66208, 66256, 66272, 66299, 66304, 66339, 66352, 66378, 66384, 66426, 66432, 66499, 66504, 66517, 66560, 66717, 66720, 66729, 66816, 66855, 66864, 66915, 66927, 66927, 67072, 67382, 67392, 67413, 67424, 67431, 67584, 67589, 67592, 67640, 67644, 67644, 67647, 67742, 67751, 67759, 67840, 67867, 67871, 67897, 67903, 67903, 67968, 68023, 68030, 68031, 68096, 68102, 68108, 68147, 68152, 68154, 68159, 68167, 68176, 68184, 68192, 68255, 68288, 68326, 68331, 68342, 68352, 68405, 68409, 68437, 68440, 68466, 68472, 68497, 68505, 68508, 68521, 68527, 68608, 68680, 69216, 69246, 69632, 69709, 69714, 69743, 69759, 69825, 69840, 69864, 69872, 69881, 69888, 69955, 69968, 70006, 70016, 70088, 70093, 70093, 70096, 70106, 70113, 70132, 70144, 70205, 70320, 70378, 70384, 70393, 70401, 70412, 70415, 70416, 70419, 70457, 70460, 70468, 70471, 70472, 70475, 70477, 70487, 70487, 70493, 70499, 70502, 70508, 70512, 70516, 70784, 70855, 70864, 70873, 71040, 71093, 71096, 71113, 71168, 71236, 71248, 71257, 71296, 71351, 71360, 71369, 71840, 71922, 71935, 71935, 72384, 72440, 73728, 74648, 74752, 74868, 77824, 78894, 92160, 92728, 92736, 92777, 92782, 92783, 92880, 92909, 92912, 92917, 92928, 92997, 93008, 93047, 93053, 93071, 93952, 94020, 94032, 94078, 94095, 94111, 110592, 110593, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 113820, 113823, 118784, 119029, 119040, 119078, 119081, 119154, 119163, 119261, 119296, 119365, 119552, 119638, 119648, 119665, 119808, 119967, 119970, 119970, 119973, 119974, 119977, 120074, 120077, 120134, 120138, 120485, 120488, 120779, 120782, 120831, 124928, 125124, 125127, 125142, 126464, 126500, 126503, 126523, 126530, 126530, 126535, 126548, 126551, 126564, 126567, 126619, 126625, 126651, 126704, 126705, 126976, 127019, 127024, 127123, 127136, 127150, 127153, 127221, 127232, 127244, 127248, 127339, 127344, 127386, 127462, 127490, 127504, 127546, 127552, 127560, 127568, 127569, 127744, 127788, 127792, 127869, 127872, 127950, 127956, 127991, 128000, 128330, 128336, 128578, 128581, 128719, 128736, 128748, 128752, 128755, 128768, 128883, 128896, 128980, 129024, 129035, 129040, 129095, 129104, 129113, 129120, 129159, 129168, 129197, 131072, 173782, 173824, 177972, 177984, 178205, 194560, 195101, 917760, 917999]); + isNotPrint32 = new sliceType$4([12, 39, 59, 62, 926, 2057, 2102, 2134, 2564, 2580, 2584, 4285, 4405, 4626, 4868, 4905, 4913, 4916, 9327, 27231, 27482, 27490, 54357, 54429, 54445, 54458, 54460, 54468, 54534, 54549, 54557, 54586, 54591, 54597, 54609, 60932, 60960, 60963, 60968, 60979, 60984, 60986, 61000, 61002, 61004, 61008, 61011, 61016, 61018, 61020, 61022, 61024, 61027, 61035, 61043, 61048, 61053, 61055, 61066, 61092, 61098, 61632, 61648, 61743, 62719, 62842, 62884]); + shifts = $toNativeArray($kindUint, [0, 0, 1, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0]); + /* */ } return; } }; $init_strconv.$blocking = true; return $init_strconv; + }; + return $pkg; +})(); +$packages["reflect"] = (function() { + var $pkg = {}, js, math, runtime, strconv, sync, mapIter, Type, Kind, rtype, typeAlg, method, uncommonType, ChanDir, arrayType, chanType, funcType, imethod, interfaceType, mapType, ptrType, sliceType, structField, structType, Method, StructField, StructTag, fieldScan, Value, flag, ValueError, nonEmptyInterface, ptrType$1, sliceType$1, ptrType$3, arrayType$1, ptrType$4, ptrType$5, sliceType$2, sliceType$3, sliceType$4, sliceType$5, structType$5, sliceType$6, ptrType$6, arrayType$2, structType$6, ptrType$7, sliceType$7, ptrType$8, ptrType$9, ptrType$10, ptrType$11, sliceType$9, sliceType$10, ptrType$12, ptrType$17, sliceType$12, sliceType$13, funcType$2, funcType$3, funcType$4, arrayType$3, ptrType$20, initialized, stringPtrMap, jsObject, jsContainer, kindNames, uint8Type, init, jsType, reflectType, setKindType, newStringPtr, isWrapped, copyStruct, makeValue, MakeSlice, TypeOf, ValueOf, SliceOf, Zero, unsafe_New, makeInt, memmove, mapaccess, mapassign, mapdelete, mapiterinit, mapiterkey, mapiternext, maplen, cvtDirect, methodReceiver, valueInterface, ifaceE2I, methodName, makeMethodValue, wrapJsObject, unwrapJsObject, PtrTo, implements$1, directlyAssignable, haveIdenticalUnderlyingType, toType, ifaceIndir, overflowFloat32, New, convertOp, makeFloat, makeComplex, makeString, makeBytes, makeRunes, cvtInt, cvtUint, cvtFloatInt, cvtFloatUint, cvtIntFloat, cvtUintFloat, cvtFloat, cvtComplex, cvtIntString, cvtUintString, cvtBytesString, cvtStringBytes, cvtRunesString, cvtStringRunes, cvtT2I, cvtI2I; + js = $packages["github.com/gopherjs/gopherjs/js"]; + math = $packages["math"]; + runtime = $packages["runtime"]; + strconv = $packages["strconv"]; + sync = $packages["sync"]; + mapIter = $pkg.mapIter = $newType(0, $kindStruct, "reflect.mapIter", "mapIter", "reflect", function(t_, m_, keys_, i_) { + this.$val = this; + this.t = t_ !== undefined ? t_ : $ifaceNil; + this.m = m_ !== undefined ? m_ : null; + this.keys = keys_ !== undefined ? keys_ : null; + this.i = i_ !== undefined ? i_ : 0; + }); + Type = $pkg.Type = $newType(8, $kindInterface, "reflect.Type", "Type", "reflect", null); + Kind = $pkg.Kind = $newType(4, $kindUint, "reflect.Kind", "Kind", "reflect", null); + rtype = $pkg.rtype = $newType(0, $kindStruct, "reflect.rtype", "rtype", "reflect", function(size_, hash_, _$2_, align_, fieldAlign_, kind_, alg_, gc_, string_, uncommonType_, ptrToThis_, zero_) { + this.$val = this; + this.size = size_ !== undefined ? size_ : 0; + this.hash = hash_ !== undefined ? hash_ : 0; + this._$2 = _$2_ !== undefined ? _$2_ : 0; + this.align = align_ !== undefined ? align_ : 0; + this.fieldAlign = fieldAlign_ !== undefined ? fieldAlign_ : 0; + this.kind = kind_ !== undefined ? kind_ : 0; + this.alg = alg_ !== undefined ? alg_ : ptrType$3.nil; + this.gc = gc_ !== undefined ? gc_ : arrayType$1.zero(); + this.string = string_ !== undefined ? string_ : ptrType$4.nil; + this.uncommonType = uncommonType_ !== undefined ? uncommonType_ : ptrType$5.nil; + this.ptrToThis = ptrToThis_ !== undefined ? ptrToThis_ : ptrType$1.nil; + this.zero = zero_ !== undefined ? zero_ : 0; + }); + typeAlg = $pkg.typeAlg = $newType(0, $kindStruct, "reflect.typeAlg", "typeAlg", "reflect", function(hash_, equal_) { + this.$val = this; + this.hash = hash_ !== undefined ? hash_ : $throwNilPointerError; + this.equal = equal_ !== undefined ? equal_ : $throwNilPointerError; + }); + method = $pkg.method = $newType(0, $kindStruct, "reflect.method", "method", "reflect", function(name_, pkgPath_, mtyp_, typ_, ifn_, tfn_) { + this.$val = this; + this.name = name_ !== undefined ? name_ : ptrType$4.nil; + this.pkgPath = pkgPath_ !== undefined ? pkgPath_ : ptrType$4.nil; + this.mtyp = mtyp_ !== undefined ? mtyp_ : ptrType$1.nil; + this.typ = typ_ !== undefined ? typ_ : ptrType$1.nil; + this.ifn = ifn_ !== undefined ? ifn_ : 0; + this.tfn = tfn_ !== undefined ? tfn_ : 0; + }); + uncommonType = $pkg.uncommonType = $newType(0, $kindStruct, "reflect.uncommonType", "uncommonType", "reflect", function(name_, pkgPath_, methods_) { + this.$val = this; + this.name = name_ !== undefined ? name_ : ptrType$4.nil; + this.pkgPath = pkgPath_ !== undefined ? pkgPath_ : ptrType$4.nil; + this.methods = methods_ !== undefined ? methods_ : sliceType$2.nil; + }); + ChanDir = $pkg.ChanDir = $newType(4, $kindInt, "reflect.ChanDir", "ChanDir", "reflect", null); + arrayType = $pkg.arrayType = $newType(0, $kindStruct, "reflect.arrayType", "arrayType", "reflect", function(rtype_, elem_, slice_, len_) { + this.$val = this; + this.rtype = rtype_ !== undefined ? rtype_ : new rtype.ptr(); + this.elem = elem_ !== undefined ? elem_ : ptrType$1.nil; + this.slice = slice_ !== undefined ? slice_ : ptrType$1.nil; + this.len = len_ !== undefined ? len_ : 0; + }); + chanType = $pkg.chanType = $newType(0, $kindStruct, "reflect.chanType", "chanType", "reflect", function(rtype_, elem_, dir_) { + this.$val = this; + this.rtype = rtype_ !== undefined ? rtype_ : new rtype.ptr(); + this.elem = elem_ !== undefined ? elem_ : ptrType$1.nil; + this.dir = dir_ !== undefined ? dir_ : 0; + }); + funcType = $pkg.funcType = $newType(0, $kindStruct, "reflect.funcType", "funcType", "reflect", function(rtype_, dotdotdot_, in$2_, out_) { + this.$val = this; + this.rtype = rtype_ !== undefined ? rtype_ : new rtype.ptr(); + this.dotdotdot = dotdotdot_ !== undefined ? dotdotdot_ : false; + this.in$2 = in$2_ !== undefined ? in$2_ : sliceType$3.nil; + this.out = out_ !== undefined ? out_ : sliceType$3.nil; + }); + imethod = $pkg.imethod = $newType(0, $kindStruct, "reflect.imethod", "imethod", "reflect", function(name_, pkgPath_, typ_) { + this.$val = this; + this.name = name_ !== undefined ? name_ : ptrType$4.nil; + this.pkgPath = pkgPath_ !== undefined ? pkgPath_ : ptrType$4.nil; + this.typ = typ_ !== undefined ? typ_ : ptrType$1.nil; + }); + interfaceType = $pkg.interfaceType = $newType(0, $kindStruct, "reflect.interfaceType", "interfaceType", "reflect", function(rtype_, methods_) { + this.$val = this; + this.rtype = rtype_ !== undefined ? rtype_ : new rtype.ptr(); + this.methods = methods_ !== undefined ? methods_ : sliceType$4.nil; + }); + mapType = $pkg.mapType = $newType(0, $kindStruct, "reflect.mapType", "mapType", "reflect", function(rtype_, key_, elem_, bucket_, hmap_, keysize_, indirectkey_, valuesize_, indirectvalue_, bucketsize_) { + this.$val = this; + this.rtype = rtype_ !== undefined ? rtype_ : new rtype.ptr(); + this.key = key_ !== undefined ? key_ : ptrType$1.nil; + this.elem = elem_ !== undefined ? elem_ : ptrType$1.nil; + this.bucket = bucket_ !== undefined ? bucket_ : ptrType$1.nil; + this.hmap = hmap_ !== undefined ? hmap_ : ptrType$1.nil; + this.keysize = keysize_ !== undefined ? keysize_ : 0; + this.indirectkey = indirectkey_ !== undefined ? indirectkey_ : 0; + this.valuesize = valuesize_ !== undefined ? valuesize_ : 0; + this.indirectvalue = indirectvalue_ !== undefined ? indirectvalue_ : 0; + this.bucketsize = bucketsize_ !== undefined ? bucketsize_ : 0; + }); + ptrType = $pkg.ptrType = $newType(0, $kindStruct, "reflect.ptrType", "ptrType", "reflect", function(rtype_, elem_) { + this.$val = this; + this.rtype = rtype_ !== undefined ? rtype_ : new rtype.ptr(); + this.elem = elem_ !== undefined ? elem_ : ptrType$1.nil; + }); + sliceType = $pkg.sliceType = $newType(0, $kindStruct, "reflect.sliceType", "sliceType", "reflect", function(rtype_, elem_) { + this.$val = this; + this.rtype = rtype_ !== undefined ? rtype_ : new rtype.ptr(); + this.elem = elem_ !== undefined ? elem_ : ptrType$1.nil; + }); + structField = $pkg.structField = $newType(0, $kindStruct, "reflect.structField", "structField", "reflect", function(name_, pkgPath_, typ_, tag_, offset_) { + this.$val = this; + this.name = name_ !== undefined ? name_ : ptrType$4.nil; + this.pkgPath = pkgPath_ !== undefined ? pkgPath_ : ptrType$4.nil; + this.typ = typ_ !== undefined ? typ_ : ptrType$1.nil; + this.tag = tag_ !== undefined ? tag_ : ptrType$4.nil; + this.offset = offset_ !== undefined ? offset_ : 0; + }); + structType = $pkg.structType = $newType(0, $kindStruct, "reflect.structType", "structType", "reflect", function(rtype_, fields_) { + this.$val = this; + this.rtype = rtype_ !== undefined ? rtype_ : new rtype.ptr(); + this.fields = fields_ !== undefined ? fields_ : sliceType$5.nil; + }); + Method = $pkg.Method = $newType(0, $kindStruct, "reflect.Method", "Method", "reflect", function(Name_, PkgPath_, Type_, Func_, Index_) { + this.$val = this; + this.Name = Name_ !== undefined ? Name_ : ""; + this.PkgPath = PkgPath_ !== undefined ? PkgPath_ : ""; + this.Type = Type_ !== undefined ? Type_ : $ifaceNil; + this.Func = Func_ !== undefined ? Func_ : new Value.ptr(); + this.Index = Index_ !== undefined ? Index_ : 0; + }); + StructField = $pkg.StructField = $newType(0, $kindStruct, "reflect.StructField", "StructField", "reflect", function(Name_, PkgPath_, Type_, Tag_, Offset_, Index_, Anonymous_) { + this.$val = this; + this.Name = Name_ !== undefined ? Name_ : ""; + this.PkgPath = PkgPath_ !== undefined ? PkgPath_ : ""; + this.Type = Type_ !== undefined ? Type_ : $ifaceNil; + this.Tag = Tag_ !== undefined ? Tag_ : ""; + this.Offset = Offset_ !== undefined ? Offset_ : 0; + this.Index = Index_ !== undefined ? Index_ : sliceType$9.nil; + this.Anonymous = Anonymous_ !== undefined ? Anonymous_ : false; + }); + StructTag = $pkg.StructTag = $newType(8, $kindString, "reflect.StructTag", "StructTag", "reflect", null); + fieldScan = $pkg.fieldScan = $newType(0, $kindStruct, "reflect.fieldScan", "fieldScan", "reflect", function(typ_, index_) { + this.$val = this; + this.typ = typ_ !== undefined ? typ_ : ptrType$12.nil; + this.index = index_ !== undefined ? index_ : sliceType$9.nil; + }); + Value = $pkg.Value = $newType(0, $kindStruct, "reflect.Value", "Value", "reflect", function(typ_, ptr_, flag_) { + this.$val = this; + this.typ = typ_ !== undefined ? typ_ : ptrType$1.nil; + this.ptr = ptr_ !== undefined ? ptr_ : 0; + this.flag = flag_ !== undefined ? flag_ : 0; + }); + flag = $pkg.flag = $newType(4, $kindUintptr, "reflect.flag", "flag", "reflect", null); + ValueError = $pkg.ValueError = $newType(0, $kindStruct, "reflect.ValueError", "ValueError", "reflect", function(Method_, Kind_) { + this.$val = this; + this.Method = Method_ !== undefined ? Method_ : ""; + this.Kind = Kind_ !== undefined ? Kind_ : 0; + }); + nonEmptyInterface = $pkg.nonEmptyInterface = $newType(0, $kindStruct, "reflect.nonEmptyInterface", "nonEmptyInterface", "reflect", function(itab_, word_) { + this.$val = this; + this.itab = itab_ !== undefined ? itab_ : ptrType$7.nil; + this.word = word_ !== undefined ? word_ : 0; + }); + ptrType$1 = $ptrType(rtype); + sliceType$1 = $sliceType($String); + ptrType$3 = $ptrType(typeAlg); + arrayType$1 = $arrayType($UnsafePointer, 2); + ptrType$4 = $ptrType($String); + ptrType$5 = $ptrType(uncommonType); + sliceType$2 = $sliceType(method); + sliceType$3 = $sliceType(ptrType$1); + sliceType$4 = $sliceType(imethod); + sliceType$5 = $sliceType(structField); + structType$5 = $structType([{prop: "str", name: "str", pkg: "reflect", typ: $String, tag: ""}]); + sliceType$6 = $sliceType(Value); + ptrType$6 = $ptrType(nonEmptyInterface); + arrayType$2 = $arrayType($UnsafePointer, 100000); + structType$6 = $structType([{prop: "ityp", name: "ityp", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "typ", name: "typ", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "link", name: "link", pkg: "reflect", typ: $UnsafePointer, tag: ""}, {prop: "bad", name: "bad", pkg: "reflect", typ: $Int32, tag: ""}, {prop: "unused", name: "unused", pkg: "reflect", typ: $Int32, tag: ""}, {prop: "fun", name: "fun", pkg: "reflect", typ: arrayType$2, tag: ""}]); + ptrType$7 = $ptrType(structType$6); + sliceType$7 = $sliceType(js.Object); + ptrType$8 = $ptrType($Uint8); + ptrType$9 = $ptrType(method); + ptrType$10 = $ptrType(interfaceType); + ptrType$11 = $ptrType(imethod); + sliceType$9 = $sliceType($Int); + sliceType$10 = $sliceType(fieldScan); + ptrType$12 = $ptrType(structType); + ptrType$17 = $ptrType($UnsafePointer); + sliceType$12 = $sliceType($Uint8); + sliceType$13 = $sliceType($Int32); + funcType$2 = $funcType([$String], [$Bool], false); + funcType$3 = $funcType([$UnsafePointer, $Uintptr, $Uintptr], [$Uintptr], false); + funcType$4 = $funcType([$UnsafePointer, $UnsafePointer, $Uintptr], [$Bool], false); + arrayType$3 = $arrayType($Uintptr, 2); + ptrType$20 = $ptrType(ValueError); + init = function() { + var used, x, x$1, x$10, x$11, x$12, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + used = (function(i) { + var i; + }); + used((x = new rtype.ptr(0, 0, 0, 0, 0, 0, ptrType$3.nil, arrayType$1.zero(), ptrType$4.nil, ptrType$5.nil, ptrType$1.nil, 0), new x.constructor.elem(x))); + used((x$1 = new uncommonType.ptr(ptrType$4.nil, ptrType$4.nil, sliceType$2.nil), new x$1.constructor.elem(x$1))); + used((x$2 = new method.ptr(ptrType$4.nil, ptrType$4.nil, ptrType$1.nil, ptrType$1.nil, 0, 0), new x$2.constructor.elem(x$2))); + used((x$3 = new arrayType.ptr(new rtype.ptr(), ptrType$1.nil, ptrType$1.nil, 0), new x$3.constructor.elem(x$3))); + used((x$4 = new chanType.ptr(new rtype.ptr(), ptrType$1.nil, 0), new x$4.constructor.elem(x$4))); + used((x$5 = new funcType.ptr(new rtype.ptr(), false, sliceType$3.nil, sliceType$3.nil), new x$5.constructor.elem(x$5))); + used((x$6 = new interfaceType.ptr(new rtype.ptr(), sliceType$4.nil), new x$6.constructor.elem(x$6))); + used((x$7 = new mapType.ptr(new rtype.ptr(), ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, 0, 0, 0, 0, 0), new x$7.constructor.elem(x$7))); + used((x$8 = new ptrType.ptr(new rtype.ptr(), ptrType$1.nil), new x$8.constructor.elem(x$8))); + used((x$9 = new sliceType.ptr(new rtype.ptr(), ptrType$1.nil), new x$9.constructor.elem(x$9))); + used((x$10 = new structType.ptr(new rtype.ptr(), sliceType$5.nil), new x$10.constructor.elem(x$10))); + used((x$11 = new imethod.ptr(ptrType$4.nil, ptrType$4.nil, ptrType$1.nil), new x$11.constructor.elem(x$11))); + used((x$12 = new structField.ptr(ptrType$4.nil, ptrType$4.nil, ptrType$1.nil, ptrType$4.nil, 0), new x$12.constructor.elem(x$12))); + initialized = true; + uint8Type = $assertType(TypeOf(new $Uint8(0)), ptrType$1); + }; + jsType = function(typ) { + var typ; + return typ.jsType; + }; + reflectType = function(typ) { + var _i, _i$1, _i$2, _i$3, _i$4, _ref, _ref$1, _ref$2, _ref$3, _ref$4, _ref$5, dir, f, fields, i, i$1, i$2, i$3, i$4, imethods, in$1, m, m$1, methodSet, methods, out, params, reflectFields, reflectMethods, results, rt, t, typ; + if (typ.reflectType === undefined) { + rt = new rtype.ptr((($parseInt(typ.size) >> 0) >>> 0), 0, 0, 0, 0, (($parseInt(typ.kind) >> 0) << 24 >>> 24), ptrType$3.nil, arrayType$1.zero(), newStringPtr(typ.string), ptrType$5.nil, ptrType$1.nil, 0); + rt.jsType = typ; + typ.reflectType = rt; + methodSet = $methodSet(typ); + if (!($internalize(typ.typeName, $String) === "") || !(($parseInt(methodSet.length) === 0))) { + reflectMethods = $makeSlice(sliceType$2, $parseInt(methodSet.length)); + _ref = reflectMethods; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + m = methodSet[i]; + t = m.typ; + $copy(((i < 0 || i >= reflectMethods.$length) ? $throwRuntimeError("index out of range") : reflectMethods.$array[reflectMethods.$offset + i]), new method.ptr(newStringPtr(m.name), newStringPtr(m.pkg), reflectType(t), reflectType($funcType(new ($global.Array)(typ).concat(t.params), t.results, t.variadic)), 0, 0), method); + _i++; + } + rt.uncommonType = new uncommonType.ptr(newStringPtr(typ.typeName), newStringPtr(typ.pkg), reflectMethods); + rt.uncommonType.jsType = typ; + } + _ref$1 = rt.Kind(); + if (_ref$1 === 17) { + setKindType(rt, new arrayType.ptr(new rtype.ptr(), reflectType(typ.elem), ptrType$1.nil, (($parseInt(typ.len) >> 0) >>> 0))); + } else if (_ref$1 === 18) { + dir = 3; + if (!!(typ.sendOnly)) { + dir = 2; + } + if (!!(typ.recvOnly)) { + dir = 1; + } + setKindType(rt, new chanType.ptr(new rtype.ptr(), reflectType(typ.elem), (dir >>> 0))); + } else if (_ref$1 === 19) { + params = typ.params; + in$1 = $makeSlice(sliceType$3, $parseInt(params.length)); + _ref$2 = in$1; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$2.$length)) { break; } + i$1 = _i$1; + (i$1 < 0 || i$1 >= in$1.$length) ? $throwRuntimeError("index out of range") : in$1.$array[in$1.$offset + i$1] = reflectType(params[i$1]); + _i$1++; + } + results = typ.results; + out = $makeSlice(sliceType$3, $parseInt(results.length)); + _ref$3 = out; + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$3.$length)) { break; } + i$2 = _i$2; + (i$2 < 0 || i$2 >= out.$length) ? $throwRuntimeError("index out of range") : out.$array[out.$offset + i$2] = reflectType(results[i$2]); + _i$2++; + } + setKindType(rt, new funcType.ptr($clone(rt, rtype), !!(typ.variadic), in$1, out)); + } else if (_ref$1 === 20) { + methods = typ.methods; + imethods = $makeSlice(sliceType$4, $parseInt(methods.length)); + _ref$4 = imethods; + _i$3 = 0; + while (true) { + if (!(_i$3 < _ref$4.$length)) { break; } + i$3 = _i$3; + m$1 = methods[i$3]; + $copy(((i$3 < 0 || i$3 >= imethods.$length) ? $throwRuntimeError("index out of range") : imethods.$array[imethods.$offset + i$3]), new imethod.ptr(newStringPtr(m$1.name), newStringPtr(m$1.pkg), reflectType(m$1.typ)), imethod); + _i$3++; + } + setKindType(rt, new interfaceType.ptr($clone(rt, rtype), imethods)); + } else if (_ref$1 === 21) { + setKindType(rt, new mapType.ptr(new rtype.ptr(), reflectType(typ.key), reflectType(typ.elem), ptrType$1.nil, ptrType$1.nil, 0, 0, 0, 0, 0)); + } else if (_ref$1 === 22) { + setKindType(rt, new ptrType.ptr(new rtype.ptr(), reflectType(typ.elem))); + } else if (_ref$1 === 23) { + setKindType(rt, new sliceType.ptr(new rtype.ptr(), reflectType(typ.elem))); + } else if (_ref$1 === 25) { + fields = typ.fields; + reflectFields = $makeSlice(sliceType$5, $parseInt(fields.length)); + _ref$5 = reflectFields; + _i$4 = 0; + while (true) { + if (!(_i$4 < _ref$5.$length)) { break; } + i$4 = _i$4; + f = fields[i$4]; + $copy(((i$4 < 0 || i$4 >= reflectFields.$length) ? $throwRuntimeError("index out of range") : reflectFields.$array[reflectFields.$offset + i$4]), new structField.ptr(newStringPtr(f.name), newStringPtr(f.pkg), reflectType(f.typ), newStringPtr(f.tag), (i$4 >>> 0)), structField); + _i$4++; + } + setKindType(rt, new structType.ptr($clone(rt, rtype), reflectFields)); + } + } + return typ.reflectType; + }; + setKindType = function(rt, kindType) { + var kindType, rt; + rt.kindType = kindType; + kindType.rtype = rt; + }; + newStringPtr = function(strObj) { + var _entry, _key, _tuple, c, ok, ptr, str, strObj; + c = $clone(new structType$5.ptr(), structType$5); + c.str = strObj; + str = c.str; + if (str === "") { + return ptrType$4.nil; + } + _tuple = (_entry = stringPtrMap[str], _entry !== undefined ? [_entry.v, true] : [ptrType$4.nil, false]); ptr = _tuple[0]; ok = _tuple[1]; + if (!ok) { + ptr = new ptrType$4(function() { return str; }, function($v) { str = $v; }); + _key = str; (stringPtrMap || $throwRuntimeError("assignment to entry in nil map"))[_key] = { k: _key, v: ptr }; + } + return ptr; + }; + isWrapped = function(typ) { + var _ref, typ; + _ref = typ.Kind(); + if (_ref === 1 || _ref === 2 || _ref === 3 || _ref === 4 || _ref === 5 || _ref === 7 || _ref === 8 || _ref === 9 || _ref === 10 || _ref === 12 || _ref === 13 || _ref === 14 || _ref === 17 || _ref === 21 || _ref === 19 || _ref === 24 || _ref === 25) { + return true; + } else if (_ref === 22) { + return typ.Elem().Kind() === 17; + } + return false; + }; + copyStruct = function(dst, src, typ) { + var dst, fields, i, prop, src, typ; + fields = jsType(typ).fields; + i = 0; + while (true) { + if (!(i < $parseInt(fields.length))) { break; } + prop = $internalize(fields[i].prop, $String); + dst[$externalize(prop, $String)] = src[$externalize(prop, $String)]; + i = i + (1) >> 0; + } + }; + makeValue = function(t, v, fl) { + var fl, rt, t, v; + rt = t.common(); + if ((t.Kind() === 17) || (t.Kind() === 25) || (t.Kind() === 22)) { + return new Value.ptr(rt, v, (fl | (t.Kind() >>> 0)) >>> 0); + } + return new Value.ptr(rt, $newDataPointer(v, jsType(rt.ptrTo())), (((fl | (t.Kind() >>> 0)) >>> 0) | 64) >>> 0); + }; + MakeSlice = $pkg.MakeSlice = function(typ, len, cap) { + var cap, len, typ; + if (!((typ.Kind() === 23))) { + $panic(new $String("reflect.MakeSlice of non-slice type")); + } + if (len < 0) { + $panic(new $String("reflect.MakeSlice: negative len")); + } + if (cap < 0) { + $panic(new $String("reflect.MakeSlice: negative cap")); + } + if (len > cap) { + $panic(new $String("reflect.MakeSlice: len > cap")); + } + return makeValue(typ, $makeSlice(jsType(typ), len, cap, (function() { + return jsType(typ.Elem()).zero(); + })), 0); + }; + TypeOf = $pkg.TypeOf = function(i) { + var i; + if (!initialized) { + return new rtype.ptr(0, 0, 0, 0, 0, 0, ptrType$3.nil, arrayType$1.zero(), ptrType$4.nil, ptrType$5.nil, ptrType$1.nil, 0); + } + if ($interfaceIsEqual(i, $ifaceNil)) { + return $ifaceNil; + } + return reflectType(i.constructor); + }; + ValueOf = $pkg.ValueOf = function(i) { + var i; + if ($interfaceIsEqual(i, $ifaceNil)) { + return new Value.ptr(ptrType$1.nil, 0, 0); + } + return makeValue(reflectType(i.constructor), i.$val, 0); + }; + rtype.ptr.prototype.ptrTo = function() { + var t; + t = this; + return reflectType($ptrType(jsType(t))); + }; + rtype.prototype.ptrTo = function() { return this.$val.ptrTo(); }; + SliceOf = $pkg.SliceOf = function(t) { + var t; + return reflectType($sliceType(jsType(t))); + }; + Zero = $pkg.Zero = function(typ) { + var typ; + return makeValue(typ, jsType(typ).zero(), 0); + }; + unsafe_New = function(typ) { + var _ref, typ; + _ref = typ.Kind(); + if (_ref === 25) { + return new (jsType(typ).ptr)(); + } else if (_ref === 17) { + return jsType(typ).zero(); + } else { + return $newDataPointer(jsType(typ).zero(), jsType(typ.ptrTo())); + } + }; + makeInt = function(f, bits, t) { + var _ref, bits, f, ptr, t, typ; + typ = t.common(); + ptr = unsafe_New(typ); + _ref = typ.Kind(); + if (_ref === 3) { + ptr.$set((bits.$low << 24 >> 24)); + } else if (_ref === 4) { + ptr.$set((bits.$low << 16 >> 16)); + } else if (_ref === 2 || _ref === 5) { + ptr.$set((bits.$low >> 0)); + } else if (_ref === 6) { + ptr.$set(new $Int64(bits.$high, bits.$low)); + } else if (_ref === 8) { + ptr.$set((bits.$low << 24 >>> 24)); + } else if (_ref === 9) { + ptr.$set((bits.$low << 16 >>> 16)); + } else if (_ref === 7 || _ref === 10 || _ref === 12) { + ptr.$set((bits.$low >>> 0)); + } else if (_ref === 11) { + ptr.$set(bits); + } + return new Value.ptr(typ, ptr, (((f | 64) >>> 0) | (typ.Kind() >>> 0)) >>> 0); + }; + memmove = function(adst, asrc, n) { + var adst, asrc, n; + adst.$set(asrc.$get()); + }; + mapaccess = function(t, m, key) { + var entry, k, key, m, t; + k = key.$get(); + if (!(k.$key === undefined)) { + k = k.$key(); + } + entry = m[$externalize($internalize(k, $String), $String)]; + if (entry === undefined) { + return 0; + } + return $newDataPointer(entry.v, jsType(PtrTo(t.Elem()))); + }; + mapassign = function(t, m, key, val) { + var entry, et, jsVal, k, key, kv, m, newVal, t, val; + kv = key.$get(); + k = kv; + if (!(k.$key === undefined)) { + k = k.$key(); + } + jsVal = val.$get(); + et = t.Elem(); + if (et.Kind() === 25) { + newVal = jsType(et).zero(); + copyStruct(newVal, jsVal, et); + jsVal = newVal; + } + entry = new ($global.Object)(); + entry.k = kv; + entry.v = jsVal; + m[$externalize($internalize(k, $String), $String)] = entry; + }; + mapdelete = function(t, m, key) { + var k, key, m, t; + k = key.$get(); + if (!(k.$key === undefined)) { + k = k.$key(); + } + delete m[$externalize($internalize(k, $String), $String)]; + }; + mapiterinit = function(t, m) { + var m, t; + return new mapIter.ptr(t, m, $keys(m), 0); + }; + mapiterkey = function(it) { + var it, iter, k; + iter = it; + k = iter.keys[iter.i]; + return $newDataPointer(iter.m[$externalize($internalize(k, $String), $String)].k, jsType(PtrTo(iter.t.Key()))); + }; + mapiternext = function(it) { + var it, iter; + iter = it; + iter.i = iter.i + (1) >> 0; + }; + maplen = function(m) { + var m; + return $parseInt($keys(m).length); + }; + cvtDirect = function(v, typ) { + var _ref, k, slice, srcVal, typ, v, val; + v = v; + srcVal = v.object(); + if (srcVal === jsType(v.typ).nil) { + return makeValue(typ, jsType(typ).nil, v.flag); + } + val = null; + k = typ.Kind(); + _ref = k; + switch (0) { default: if (_ref === 18) { + val = new (jsType(typ))(); + } else if (_ref === 23) { + slice = new (jsType(typ))(srcVal.$array); + slice.$offset = srcVal.$offset; + slice.$length = srcVal.$length; + slice.$capacity = srcVal.$capacity; + val = $newDataPointer(slice, jsType(PtrTo(typ))); + } else if (_ref === 22) { + if (typ.Elem().Kind() === 25) { + if ($interfaceIsEqual(typ.Elem(), v.typ.Elem())) { + val = srcVal; + break; + } + val = new (jsType(typ))(); + copyStruct(val, srcVal, typ.Elem()); + break; + } + val = new (jsType(typ))(srcVal.$get, srcVal.$set); + } else if (_ref === 25) { + val = new (jsType(typ).ptr)(); + copyStruct(val, srcVal, typ); + } else if (_ref === 17 || _ref === 19 || _ref === 20 || _ref === 21 || _ref === 24) { + val = v.ptr; + } else { + $panic(new ValueError.ptr("reflect.Convert", k)); + } } + return new Value.ptr(typ.common(), val, (((v.flag & 96) >>> 0) | (typ.Kind() >>> 0)) >>> 0); + }; + methodReceiver = function(op, v, i) { + var fn = 0, i, iface, m, m$1, op, prop, rcvr, rcvrtype = ptrType$1.nil, t = ptrType$1.nil, tt, ut, v, x, x$1; + v = v; + prop = ""; + if (v.typ.Kind() === 20) { + tt = v.typ.kindType; + if (i < 0 || i >= tt.methods.$length) { + $panic(new $String("reflect: internal error: invalid method index")); + } + m = (x = tt.methods, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + if (!($pointerIsEqual(m.pkgPath, ptrType$4.nil))) { + $panic(new $String("reflect: " + op + " of unexported method")); + } + iface = $pointerOfStructConversion(v.ptr, ptrType$6); + if (iface.itab === ptrType$7.nil) { + $panic(new $String("reflect: " + op + " of method on nil interface value")); + } + t = m.typ; + prop = m.name.$get(); + } else { + ut = v.typ.uncommonType.uncommon(); + if (ut === ptrType$5.nil || i < 0 || i >= ut.methods.$length) { + $panic(new $String("reflect: internal error: invalid method index")); + } + m$1 = (x$1 = ut.methods, ((i < 0 || i >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + i])); + if (!($pointerIsEqual(m$1.pkgPath, ptrType$4.nil))) { + $panic(new $String("reflect: " + op + " of unexported method")); + } + t = m$1.mtyp; + prop = $internalize($methodSet(jsType(v.typ))[i].prop, $String); + } + rcvr = v.object(); + if (isWrapped(v.typ)) { + rcvr = new (jsType(v.typ))(rcvr); + } + fn = rcvr[$externalize(prop, $String)]; + return [rcvrtype, t, fn]; + }; + valueInterface = function(v, safe) { + var safe, v; + v = v; + if (v.flag === 0) { + $panic(new ValueError.ptr("reflect.Value.Interface", 0)); + } + if (safe && !((((v.flag & 32) >>> 0) === 0))) { + $panic(new $String("reflect.Value.Interface: cannot return value obtained from unexported field or method")); + } + if (!((((v.flag & 256) >>> 0) === 0))) { + v = makeMethodValue("Interface", v); + } + if (isWrapped(v.typ)) { + return new (jsType(v.typ))(v.object()); + } + return v.object(); + }; + ifaceE2I = function(t, src, dst) { + var dst, src, t; + dst.$set(src); + }; + methodName = function() { + return "?FIXME?"; + }; + makeMethodValue = function(op, v) { + var _tuple, fn, fv, op, rcvr, v; + v = v; + if (((v.flag & 256) >>> 0) === 0) { + $panic(new $String("reflect: internal error: invalid use of makePartialFunc")); + } + _tuple = methodReceiver(op, v, (v.flag >> 0) >> 9 >> 0); fn = _tuple[2]; + rcvr = v.object(); + if (isWrapped(v.typ)) { + rcvr = new (jsType(v.typ))(rcvr); + } + fv = (function() { + return fn.apply(rcvr, $externalize(new ($sliceType(js.Object))($global.Array.prototype.slice.call(arguments, [])), sliceType$7)); + }); + return new Value.ptr(v.Type().common(), fv, (((v.flag & 32) >>> 0) | 19) >>> 0); + }; + rtype.ptr.prototype.pointers = function() { + var _ref, t; + t = this; + _ref = t.Kind(); + if (_ref === 22 || _ref === 21 || _ref === 18 || _ref === 19 || _ref === 25 || _ref === 17) { + return true; + } else { + return false; + } + }; + rtype.prototype.pointers = function() { return this.$val.pointers(); }; + rtype.ptr.prototype.Comparable = function() { + var _ref, i, t; + t = this; + _ref = t.Kind(); + if (_ref === 19 || _ref === 23 || _ref === 21) { + return false; + } else if (_ref === 17) { + return t.Elem().Comparable(); + } else if (_ref === 25) { + i = 0; + while (true) { + if (!(i < t.NumField())) { break; } + if (!t.Field(i).Type.Comparable()) { + return false; + } + i = i + (1) >> 0; + } + } + return true; + }; + rtype.prototype.Comparable = function() { return this.$val.Comparable(); }; + uncommonType.ptr.prototype.Method = function(i) { + var fl, fn, i, m = new Method.ptr(), mt, p, prop, t, x; + t = this; + if (t === ptrType$5.nil || i < 0 || i >= t.methods.$length) { + $panic(new $String("reflect: Method index out of range")); + } + p = (x = t.methods, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + if (!($pointerIsEqual(p.name, ptrType$4.nil))) { + m.Name = p.name.$get(); + } + fl = 19; + if (!($pointerIsEqual(p.pkgPath, ptrType$4.nil))) { + m.PkgPath = p.pkgPath.$get(); + fl = (fl | (32)) >>> 0; + } + mt = p.typ; + m.Type = mt; + prop = $internalize($methodSet(t.jsType)[i].prop, $String); + fn = (function(rcvr) { + var rcvr; + return rcvr[$externalize(prop, $String)].apply(rcvr, $externalize($subslice(new ($sliceType(js.Object))($global.Array.prototype.slice.call(arguments, [])), 1), sliceType$7)); + }); + m.Func = new Value.ptr(mt, fn, fl); + m.Index = i; + return m; + }; + uncommonType.prototype.Method = function(i) { return this.$val.Method(i); }; + Value.ptr.prototype.object = function() { + var _ref, newVal, v, val; + v = this; + if ((v.typ.Kind() === 17) || (v.typ.Kind() === 25)) { + return v.ptr; + } + if (!((((v.flag & 64) >>> 0) === 0))) { + val = v.ptr.$get(); + if (!(val === $ifaceNil) && !(val.constructor === jsType(v.typ))) { + _ref = v.typ.Kind(); + switch (0) { default: if (_ref === 11 || _ref === 6) { + val = new (jsType(v.typ))(val.$high, val.$low); + } else if (_ref === 15 || _ref === 16) { + val = new (jsType(v.typ))(val.$real, val.$imag); + } else if (_ref === 23) { + if (val === val.constructor.nil) { + val = jsType(v.typ).nil; + break; + } + newVal = new (jsType(v.typ))(val.$array); + newVal.$offset = val.$offset; + newVal.$length = val.$length; + newVal.$capacity = val.$capacity; + val = newVal; + } } + } + return val; + } + return v.ptr; + }; + Value.prototype.object = function() { return this.$val.object(); }; + Value.ptr.prototype.call = function(op, in$1) { + var _i, _i$1, _i$2, _ref, _ref$1, _ref$2, _ref$3, _tmp, _tmp$1, _tuple, arg, argsArray, elem, fn, i, i$1, i$2, i$3, in$1, isSlice, m, n, nin, nout, op, origIn, rcvr, results, ret, slice, t, targ, v, x, x$1, x$2, xt, xt$1; + v = this; + t = v.typ; + fn = 0; + rcvr = null; + if (!((((v.flag & 256) >>> 0) === 0))) { + _tuple = methodReceiver(op, v, (v.flag >> 0) >> 9 >> 0); t = _tuple[1]; fn = _tuple[2]; + rcvr = v.object(); + if (isWrapped(v.typ)) { + rcvr = new (jsType(v.typ))(rcvr); + } + } else { + fn = v.object(); + } + if (fn === 0) { + $panic(new $String("reflect.Value.Call: call of nil function")); + } + isSlice = op === "CallSlice"; + n = t.NumIn(); + if (isSlice) { + if (!t.IsVariadic()) { + $panic(new $String("reflect: CallSlice of non-variadic function")); + } + if (in$1.$length < n) { + $panic(new $String("reflect: CallSlice with too few input arguments")); + } + if (in$1.$length > n) { + $panic(new $String("reflect: CallSlice with too many input arguments")); + } + } else { + if (t.IsVariadic()) { + n = n - (1) >> 0; + } + if (in$1.$length < n) { + $panic(new $String("reflect: Call with too few input arguments")); + } + if (!t.IsVariadic() && in$1.$length > n) { + $panic(new $String("reflect: Call with too many input arguments")); + } + } + _ref = in$1; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + x = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (x.Kind() === 0) { + $panic(new $String("reflect: " + op + " using zero Value argument")); + } + _i++; + } + i = 0; + while (true) { + if (!(i < n)) { break; } + _tmp = ((i < 0 || i >= in$1.$length) ? $throwRuntimeError("index out of range") : in$1.$array[in$1.$offset + i]).Type(); _tmp$1 = t.In(i); xt = _tmp; targ = _tmp$1; + if (!xt.AssignableTo(targ)) { + $panic(new $String("reflect: " + op + " using " + xt.String() + " as type " + targ.String())); + } + i = i + (1) >> 0; + } + if (!isSlice && t.IsVariadic()) { + m = in$1.$length - n >> 0; + slice = MakeSlice(t.In(n), m, m); + elem = t.In(n).Elem(); + i$1 = 0; + while (true) { + if (!(i$1 < m)) { break; } + x$2 = (x$1 = n + i$1 >> 0, ((x$1 < 0 || x$1 >= in$1.$length) ? $throwRuntimeError("index out of range") : in$1.$array[in$1.$offset + x$1])); + xt$1 = x$2.Type(); + if (!xt$1.AssignableTo(elem)) { + $panic(new $String("reflect: cannot use " + xt$1.String() + " as type " + elem.String() + " in " + op)); + } + slice.Index(i$1).Set(x$2); + i$1 = i$1 + (1) >> 0; + } + origIn = in$1; + in$1 = $makeSlice(sliceType$6, (n + 1 >> 0)); + $copySlice($subslice(in$1, 0, n), origIn); + (n < 0 || n >= in$1.$length) ? $throwRuntimeError("index out of range") : in$1.$array[in$1.$offset + n] = slice; + } + nin = in$1.$length; + if (!((nin === t.NumIn()))) { + $panic(new $String("reflect.Value.Call: wrong argument count")); + } + nout = t.NumOut(); + argsArray = new ($global.Array)(t.NumIn()); + _ref$1 = in$1; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i$2 = _i$1; + arg = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i$1]); + argsArray[i$2] = unwrapJsObject(t.In(i$2), arg.assignTo("reflect.Value.Call", t.In(i$2).common(), 0).object()); + _i$1++; + } + results = fn.apply(rcvr, argsArray); + _ref$2 = nout; + if (_ref$2 === 0) { + return sliceType$6.nil; + } else if (_ref$2 === 1) { + return new sliceType$6([$clone(makeValue(t.Out(0), wrapJsObject(t.Out(0), results), 0), Value)]); + } else { + ret = $makeSlice(sliceType$6, nout); + _ref$3 = ret; + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$3.$length)) { break; } + i$3 = _i$2; + (i$3 < 0 || i$3 >= ret.$length) ? $throwRuntimeError("index out of range") : ret.$array[ret.$offset + i$3] = makeValue(t.Out(i$3), wrapJsObject(t.Out(i$3), results[i$3]), 0); + _i$2++; + } + return ret; + } + }; + Value.prototype.call = function(op, in$1) { return this.$val.call(op, in$1); }; + Value.ptr.prototype.Cap = function() { + var _ref, k, v; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 17) { + return v.typ.Len(); + } else if (_ref === 18 || _ref === 23) { + return $parseInt(v.object().$capacity) >> 0; + } + $panic(new ValueError.ptr("reflect.Value.Cap", k)); + }; + Value.prototype.Cap = function() { return this.$val.Cap(); }; + wrapJsObject = function(typ, val) { + var typ, val; + if ($interfaceIsEqual(typ, reflectType(jsObject))) { + return new (jsContainer)(val); + } + return val; + }; + unwrapJsObject = function(typ, val) { + var typ, val; + if ($interfaceIsEqual(typ, reflectType(jsObject))) { + return val.Object; + } + return val; + }; + Value.ptr.prototype.Elem = function() { + var _ref, fl, k, tt, typ, v, val, val$1; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 20) { + val = v.object(); + if (val === $ifaceNil) { + return new Value.ptr(ptrType$1.nil, 0, 0); + } + typ = reflectType(val.constructor); + return makeValue(typ, val.$val, (v.flag & 32) >>> 0); + } else if (_ref === 22) { + if (v.IsNil()) { + return new Value.ptr(ptrType$1.nil, 0, 0); + } + val$1 = v.object(); + tt = v.typ.kindType; + fl = (((((v.flag & 32) >>> 0) | 64) >>> 0) | 128) >>> 0; + fl = (fl | ((tt.elem.Kind() >>> 0))) >>> 0; + return new Value.ptr(tt.elem, wrapJsObject(tt.elem, val$1), fl); + } else { + $panic(new ValueError.ptr("reflect.Value.Elem", k)); + } + }; + Value.prototype.Elem = function() { return this.$val.Elem(); }; + Value.ptr.prototype.Field = function(i) { + var field, fl, i, prop, s, tt, typ, v, x; + v = this; + new flag(v.flag).mustBe(25); + tt = v.typ.kindType; + if (i < 0 || i >= tt.fields.$length) { + $panic(new $String("reflect: Field index out of range")); + } + field = (x = tt.fields, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + prop = $internalize(jsType(v.typ).fields[i].prop, $String); + typ = field.typ; + fl = (v.flag & 224) >>> 0; + if (!($pointerIsEqual(field.pkgPath, ptrType$4.nil))) { + fl = (fl | (32)) >>> 0; + } + fl = (fl | ((typ.Kind() >>> 0))) >>> 0; + s = v.ptr; + if (!((((fl & 64) >>> 0) === 0)) && !((typ.Kind() === 17)) && !((typ.Kind() === 25))) { + return new Value.ptr(typ, new (jsType(PtrTo(typ)))((function() { + return wrapJsObject(typ, s[$externalize(prop, $String)]); + }), (function(v$1) { + var v$1; + s[$externalize(prop, $String)] = unwrapJsObject(typ, v$1); + })), fl); + } + return makeValue(typ, wrapJsObject(typ, s[$externalize(prop, $String)]), fl); + }; + Value.prototype.Field = function(i) { return this.$val.Field(i); }; + Value.ptr.prototype.Index = function(i) { + var _ref, a, a$1, c, fl, fl$1, fl$2, i, k, s, str, tt, tt$1, typ, typ$1, v; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 17) { + tt = v.typ.kindType; + if (i < 0 || i > (tt.len >> 0)) { + $panic(new $String("reflect: array index out of range")); + } + typ = tt.elem; + fl = (v.flag & 224) >>> 0; + fl = (fl | ((typ.Kind() >>> 0))) >>> 0; + a = v.ptr; + if (!((((fl & 64) >>> 0) === 0)) && !((typ.Kind() === 17)) && !((typ.Kind() === 25))) { + return new Value.ptr(typ, new (jsType(PtrTo(typ)))((function() { + return wrapJsObject(typ, a[i]); + }), (function(v$1) { + var v$1; + a[i] = unwrapJsObject(typ, v$1); + })), fl); + } + return makeValue(typ, wrapJsObject(typ, a[i]), fl); + } else if (_ref === 23) { + s = v.object(); + if (i < 0 || i >= ($parseInt(s.$length) >> 0)) { + $panic(new $String("reflect: slice index out of range")); + } + tt$1 = v.typ.kindType; + typ$1 = tt$1.elem; + fl$1 = (192 | ((v.flag & 32) >>> 0)) >>> 0; + fl$1 = (fl$1 | ((typ$1.Kind() >>> 0))) >>> 0; + i = i + (($parseInt(s.$offset) >> 0)) >> 0; + a$1 = s.$array; + if (!((((fl$1 & 64) >>> 0) === 0)) && !((typ$1.Kind() === 17)) && !((typ$1.Kind() === 25))) { + return new Value.ptr(typ$1, new (jsType(PtrTo(typ$1)))((function() { + return wrapJsObject(typ$1, a$1[i]); + }), (function(v$1) { + var v$1; + a$1[i] = unwrapJsObject(typ$1, v$1); + })), fl$1); + } + return makeValue(typ$1, wrapJsObject(typ$1, a$1[i]), fl$1); + } else if (_ref === 24) { + str = v.ptr.$get(); + if (i < 0 || i >= str.length) { + $panic(new $String("reflect: string index out of range")); + } + fl$2 = (((v.flag & 32) >>> 0) | 8) >>> 0; + c = str.charCodeAt(i); + return new Value.ptr(uint8Type, new ptrType$8(function() { return c; }, function($v) { c = $v; }), (fl$2 | 64) >>> 0); + } else { + $panic(new ValueError.ptr("reflect.Value.Index", k)); + } + }; + Value.prototype.Index = function(i) { return this.$val.Index(i); }; + Value.ptr.prototype.IsNil = function() { + var _ref, k, v; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 18 || _ref === 22 || _ref === 23) { + return v.object() === jsType(v.typ).nil; + } else if (_ref === 19) { + return v.object() === $throwNilPointerError; + } else if (_ref === 21) { + return v.object() === false; + } else if (_ref === 20) { + return v.object() === $ifaceNil; + } else { + $panic(new ValueError.ptr("reflect.Value.IsNil", k)); + } + }; + Value.prototype.IsNil = function() { return this.$val.IsNil(); }; + Value.ptr.prototype.Len = function() { + var _ref, k, v; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 17 || _ref === 24) { + return $parseInt(v.object().length); + } else if (_ref === 23) { + return $parseInt(v.object().$length) >> 0; + } else if (_ref === 18) { + return $parseInt(v.object().$buffer.length) >> 0; + } else if (_ref === 21) { + return $parseInt($keys(v.object()).length); + } else { + $panic(new ValueError.ptr("reflect.Value.Len", k)); + } + }; + Value.prototype.Len = function() { return this.$val.Len(); }; + Value.ptr.prototype.Pointer = function() { + var _ref, k, v; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 18 || _ref === 21 || _ref === 22 || _ref === 26) { + if (v.IsNil()) { + return 0; + } + return v.object(); + } else if (_ref === 19) { + if (v.IsNil()) { + return 0; + } + return 1; + } else if (_ref === 23) { + if (v.IsNil()) { + return 0; + } + return v.object().$array; + } else { + $panic(new ValueError.ptr("reflect.Value.Pointer", k)); + } + }; + Value.prototype.Pointer = function() { return this.$val.Pointer(); }; + Value.ptr.prototype.Set = function(x) { + var _ref, v, x; + v = this; + x = x; + new flag(v.flag).mustBeAssignable(); + new flag(x.flag).mustBeExported(); + x = x.assignTo("reflect.Set", v.typ, 0); + if (!((((v.flag & 64) >>> 0) === 0))) { + _ref = v.typ.Kind(); + if (_ref === 17) { + $copy(v.ptr, x.ptr, jsType(v.typ)); + } else if (_ref === 20) { + v.ptr.$set(valueInterface(x, false)); + } else if (_ref === 25) { + copyStruct(v.ptr, x.ptr, v.typ); + } else { + v.ptr.$set(x.object()); + } + return; + } + v.ptr = x.ptr; + }; + Value.prototype.Set = function(x) { return this.$val.Set(x); }; + Value.ptr.prototype.SetCap = function(n) { + var n, newSlice, s, v; + v = this; + new flag(v.flag).mustBeAssignable(); + new flag(v.flag).mustBe(23); + s = v.ptr.$get(); + if (n < ($parseInt(s.$length) >> 0) || n > ($parseInt(s.$capacity) >> 0)) { + $panic(new $String("reflect: slice capacity out of range in SetCap")); + } + newSlice = new (jsType(v.typ))(s.$array); + newSlice.$offset = s.$offset; + newSlice.$length = s.$length; + newSlice.$capacity = n; + v.ptr.$set(newSlice); + }; + Value.prototype.SetCap = function(n) { return this.$val.SetCap(n); }; + Value.ptr.prototype.SetLen = function(n) { + var n, newSlice, s, v; + v = this; + new flag(v.flag).mustBeAssignable(); + new flag(v.flag).mustBe(23); + s = v.ptr.$get(); + if (n < 0 || n > ($parseInt(s.$capacity) >> 0)) { + $panic(new $String("reflect: slice length out of range in SetLen")); + } + newSlice = new (jsType(v.typ))(s.$array); + newSlice.$offset = s.$offset; + newSlice.$length = n; + newSlice.$capacity = s.$capacity; + v.ptr.$set(newSlice); + }; + Value.prototype.SetLen = function(n) { return this.$val.SetLen(n); }; + Value.ptr.prototype.Slice = function(i, j) { + var _ref, cap, i, j, kind, s, str, tt, typ, v; + v = this; + cap = 0; + typ = $ifaceNil; + s = null; + kind = new flag(v.flag).kind(); + _ref = kind; + if (_ref === 17) { + if (((v.flag & 128) >>> 0) === 0) { + $panic(new $String("reflect.Value.Slice: slice of unaddressable array")); + } + tt = v.typ.kindType; + cap = (tt.len >> 0); + typ = SliceOf(tt.elem); + s = new (jsType(typ))(v.object()); + } else if (_ref === 23) { + typ = v.typ; + s = v.object(); + cap = $parseInt(s.$capacity) >> 0; + } else if (_ref === 24) { + str = v.ptr.$get(); + if (i < 0 || j < i || j > str.length) { + $panic(new $String("reflect.Value.Slice: string slice index out of bounds")); + } + return ValueOf(new $String(str.substring(i, j))); + } else { + $panic(new ValueError.ptr("reflect.Value.Slice", kind)); + } + if (i < 0 || j < i || j > cap) { + $panic(new $String("reflect.Value.Slice: slice index out of bounds")); + } + return makeValue(typ, $subslice(s, i, j), (v.flag & 32) >>> 0); + }; + Value.prototype.Slice = function(i, j) { return this.$val.Slice(i, j); }; + Value.ptr.prototype.Slice3 = function(i, j, k) { + var _ref, cap, i, j, k, kind, s, tt, typ, v; + v = this; + cap = 0; + typ = $ifaceNil; + s = null; + kind = new flag(v.flag).kind(); + _ref = kind; + if (_ref === 17) { + if (((v.flag & 128) >>> 0) === 0) { + $panic(new $String("reflect.Value.Slice: slice of unaddressable array")); + } + tt = v.typ.kindType; + cap = (tt.len >> 0); + typ = SliceOf(tt.elem); + s = new (jsType(typ))(v.object()); + } else if (_ref === 23) { + typ = v.typ; + s = v.object(); + cap = $parseInt(s.$capacity) >> 0; + } else { + $panic(new ValueError.ptr("reflect.Value.Slice3", kind)); + } + if (i < 0 || j < i || k < j || k > cap) { + $panic(new $String("reflect.Value.Slice3: slice index out of bounds")); + } + return makeValue(typ, $subslice(s, i, j, k), (v.flag & 32) >>> 0); + }; + Value.prototype.Slice3 = function(i, j, k) { return this.$val.Slice3(i, j, k); }; + Value.ptr.prototype.Close = function() { + var v; + v = this; + new flag(v.flag).mustBe(18); + new flag(v.flag).mustBeExported(); + $close(v.object()); + }; + Value.prototype.Close = function() { return this.$val.Close(); }; + Value.ptr.prototype.TrySend = function(x) { + var c, tt, v, x; + v = this; + x = x; + new flag(v.flag).mustBe(18); + new flag(v.flag).mustBeExported(); + tt = v.typ.kindType; + if (((tt.dir >> 0) & 2) === 0) { + $panic(new $String("reflect: send on recv-only channel")); + } + new flag(x.flag).mustBeExported(); + c = v.object(); + if (!!!(c.$closed) && ($parseInt(c.$recvQueue.length) === 0) && ($parseInt(c.$buffer.length) === ($parseInt(c.$capacity) >> 0))) { + return false; + } + x = x.assignTo("reflect.Value.Send", tt.elem, 0); + $send(c, x.object()); + return true; + }; + Value.prototype.TrySend = function(x) { return this.$val.TrySend(x); }; + Value.ptr.prototype.Send = function(x) { + var v, x; + v = this; + x = x; + $panic(new runtime.NotSupportedError.ptr("reflect.Value.Send, use reflect.Value.TrySend if possible")); + }; + Value.prototype.Send = function(x) { return this.$val.Send(x); }; + Value.ptr.prototype.TryRecv = function() { + var _tmp, _tmp$1, _tmp$2, _tmp$3, ok = false, res, tt, v, x = new Value.ptr(); + v = this; + new flag(v.flag).mustBe(18); + new flag(v.flag).mustBeExported(); + tt = v.typ.kindType; + if (((tt.dir >> 0) & 1) === 0) { + $panic(new $String("reflect: recv on send-only channel")); + } + res = $recv(v.object()); + if (res.constructor === $global.Function) { + _tmp = new Value.ptr(ptrType$1.nil, 0, 0); _tmp$1 = false; x = _tmp; ok = _tmp$1; + return [x, ok]; + } + _tmp$2 = makeValue(tt.elem, res[0], 0); _tmp$3 = !!(res[1]); x = _tmp$2; ok = _tmp$3; + return [x, ok]; + }; + Value.prototype.TryRecv = function() { return this.$val.TryRecv(); }; + Value.ptr.prototype.Recv = function() { + var ok = false, v, x = new Value.ptr(); + v = this; + $panic(new runtime.NotSupportedError.ptr("reflect.Value.Recv, use reflect.Value.TryRecv if possible")); + }; + Value.prototype.Recv = function() { return this.$val.Recv(); }; + Kind.prototype.String = function() { + var k; + k = this.$val; + if ((k >> 0) < kindNames.$length) { + return ((k < 0 || k >= kindNames.$length) ? $throwRuntimeError("index out of range") : kindNames.$array[kindNames.$offset + k]); + } + return "kind" + strconv.Itoa((k >> 0)); + }; + $ptrType(Kind).prototype.String = function() { return new Kind(this.$get()).String(); }; + uncommonType.ptr.prototype.uncommon = function() { + var t; + t = this; + return t; + }; + uncommonType.prototype.uncommon = function() { return this.$val.uncommon(); }; + uncommonType.ptr.prototype.PkgPath = function() { + var t; + t = this; + if (t === ptrType$5.nil || $pointerIsEqual(t.pkgPath, ptrType$4.nil)) { + return ""; + } + return t.pkgPath.$get(); + }; + uncommonType.prototype.PkgPath = function() { return this.$val.PkgPath(); }; + uncommonType.ptr.prototype.Name = function() { + var t; + t = this; + if (t === ptrType$5.nil || $pointerIsEqual(t.name, ptrType$4.nil)) { + return ""; + } + return t.name.$get(); + }; + uncommonType.prototype.Name = function() { return this.$val.Name(); }; + rtype.ptr.prototype.String = function() { + var t; + t = this; + return t.string.$get(); + }; + rtype.prototype.String = function() { return this.$val.String(); }; + rtype.ptr.prototype.Size = function() { + var t; + t = this; + return t.size; + }; + rtype.prototype.Size = function() { return this.$val.Size(); }; + rtype.ptr.prototype.Bits = function() { + var k, t; + t = this; + if (t === ptrType$1.nil) { + $panic(new $String("reflect: Bits of nil Type")); + } + k = t.Kind(); + if (k < 2 || k > 16) { + $panic(new $String("reflect: Bits of non-arithmetic Type " + t.String())); + } + return (t.size >> 0) * 8 >> 0; + }; + rtype.prototype.Bits = function() { return this.$val.Bits(); }; + rtype.ptr.prototype.Align = function() { + var t; + t = this; + return (t.align >> 0); + }; + rtype.prototype.Align = function() { return this.$val.Align(); }; + rtype.ptr.prototype.FieldAlign = function() { + var t; + t = this; + return (t.fieldAlign >> 0); + }; + rtype.prototype.FieldAlign = function() { return this.$val.FieldAlign(); }; + rtype.ptr.prototype.Kind = function() { + var t; + t = this; + return (((t.kind & 31) >>> 0) >>> 0); + }; + rtype.prototype.Kind = function() { return this.$val.Kind(); }; + rtype.ptr.prototype.common = function() { + var t; + t = this; + return t; + }; + rtype.prototype.common = function() { return this.$val.common(); }; + uncommonType.ptr.prototype.NumMethod = function() { + var t; + t = this; + if (t === ptrType$5.nil) { + return 0; + } + return t.methods.$length; + }; + uncommonType.prototype.NumMethod = function() { return this.$val.NumMethod(); }; + uncommonType.ptr.prototype.MethodByName = function(name) { + var _i, _ref, _tmp, _tmp$1, i, m = new Method.ptr(), name, ok = false, p, t, x; + t = this; + if (t === ptrType$5.nil) { + return [m, ok]; + } + p = ptrType$9.nil; + _ref = t.methods; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + p = (x = t.methods, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + if (!($pointerIsEqual(p.name, ptrType$4.nil)) && p.name.$get() === name) { + _tmp = $clone(t.Method(i), Method); _tmp$1 = true; $copy(m, _tmp, Method); ok = _tmp$1; + return [m, ok]; + } + _i++; + } + return [m, ok]; + }; + uncommonType.prototype.MethodByName = function(name) { return this.$val.MethodByName(name); }; + rtype.ptr.prototype.NumMethod = function() { + var t, tt; + t = this; + if (t.Kind() === 20) { + tt = t.kindType; + return tt.NumMethod(); + } + return t.uncommonType.NumMethod(); + }; + rtype.prototype.NumMethod = function() { return this.$val.NumMethod(); }; + rtype.ptr.prototype.Method = function(i) { + var i, m = new Method.ptr(), t, tt; + t = this; + if (t.Kind() === 20) { + tt = t.kindType; + $copy(m, tt.Method(i), Method); + return m; + } + $copy(m, t.uncommonType.Method(i), Method); + return m; + }; + rtype.prototype.Method = function(i) { return this.$val.Method(i); }; + rtype.ptr.prototype.MethodByName = function(name) { + var _tuple, _tuple$1, m = new Method.ptr(), name, ok = false, t, tt; + t = this; + if (t.Kind() === 20) { + tt = t.kindType; + _tuple = tt.MethodByName(name); $copy(m, _tuple[0], Method); ok = _tuple[1]; + return [m, ok]; + } + _tuple$1 = t.uncommonType.MethodByName(name); $copy(m, _tuple$1[0], Method); ok = _tuple$1[1]; + return [m, ok]; + }; + rtype.prototype.MethodByName = function(name) { return this.$val.MethodByName(name); }; + rtype.ptr.prototype.PkgPath = function() { + var t; + t = this; + return t.uncommonType.PkgPath(); + }; + rtype.prototype.PkgPath = function() { return this.$val.PkgPath(); }; + rtype.ptr.prototype.Name = function() { + var t; + t = this; + return t.uncommonType.Name(); + }; + rtype.prototype.Name = function() { return this.$val.Name(); }; + rtype.ptr.prototype.ChanDir = function() { + var t, tt; + t = this; + if (!((t.Kind() === 18))) { + $panic(new $String("reflect: ChanDir of non-chan type")); + } + tt = t.kindType; + return (tt.dir >> 0); + }; + rtype.prototype.ChanDir = function() { return this.$val.ChanDir(); }; + rtype.ptr.prototype.IsVariadic = function() { + var t, tt; + t = this; + if (!((t.Kind() === 19))) { + $panic(new $String("reflect: IsVariadic of non-func type")); + } + tt = t.kindType; + return tt.dotdotdot; + }; + rtype.prototype.IsVariadic = function() { return this.$val.IsVariadic(); }; + rtype.ptr.prototype.Elem = function() { + var _ref, t, tt, tt$1, tt$2, tt$3, tt$4; + t = this; + _ref = t.Kind(); + if (_ref === 17) { + tt = t.kindType; + return toType(tt.elem); + } else if (_ref === 18) { + tt$1 = t.kindType; + return toType(tt$1.elem); + } else if (_ref === 21) { + tt$2 = t.kindType; + return toType(tt$2.elem); + } else if (_ref === 22) { + tt$3 = t.kindType; + return toType(tt$3.elem); + } else if (_ref === 23) { + tt$4 = t.kindType; + return toType(tt$4.elem); + } + $panic(new $String("reflect: Elem of invalid type")); + }; + rtype.prototype.Elem = function() { return this.$val.Elem(); }; + rtype.ptr.prototype.Field = function(i) { + var i, t, tt; + t = this; + if (!((t.Kind() === 25))) { + $panic(new $String("reflect: Field of non-struct type")); + } + tt = t.kindType; + return tt.Field(i); + }; + rtype.prototype.Field = function(i) { return this.$val.Field(i); }; + rtype.ptr.prototype.FieldByIndex = function(index) { + var index, t, tt; + t = this; + if (!((t.Kind() === 25))) { + $panic(new $String("reflect: FieldByIndex of non-struct type")); + } + tt = t.kindType; + return tt.FieldByIndex(index); + }; + rtype.prototype.FieldByIndex = function(index) { return this.$val.FieldByIndex(index); }; + rtype.ptr.prototype.FieldByName = function(name) { + var name, t, tt; + t = this; + if (!((t.Kind() === 25))) { + $panic(new $String("reflect: FieldByName of non-struct type")); + } + tt = t.kindType; + return tt.FieldByName(name); + }; + rtype.prototype.FieldByName = function(name) { return this.$val.FieldByName(name); }; + rtype.ptr.prototype.FieldByNameFunc = function(match) { + var match, t, tt; + t = this; + if (!((t.Kind() === 25))) { + $panic(new $String("reflect: FieldByNameFunc of non-struct type")); + } + tt = t.kindType; + return tt.FieldByNameFunc(match); + }; + rtype.prototype.FieldByNameFunc = function(match) { return this.$val.FieldByNameFunc(match); }; + rtype.ptr.prototype.In = function(i) { + var i, t, tt, x; + t = this; + if (!((t.Kind() === 19))) { + $panic(new $String("reflect: In of non-func type")); + } + tt = t.kindType; + return toType((x = tt.in$2, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i]))); + }; + rtype.prototype.In = function(i) { return this.$val.In(i); }; + rtype.ptr.prototype.Key = function() { + var t, tt; + t = this; + if (!((t.Kind() === 21))) { + $panic(new $String("reflect: Key of non-map type")); + } + tt = t.kindType; + return toType(tt.key); + }; + rtype.prototype.Key = function() { return this.$val.Key(); }; + rtype.ptr.prototype.Len = function() { + var t, tt; + t = this; + if (!((t.Kind() === 17))) { + $panic(new $String("reflect: Len of non-array type")); + } + tt = t.kindType; + return (tt.len >> 0); + }; + rtype.prototype.Len = function() { return this.$val.Len(); }; + rtype.ptr.prototype.NumField = function() { + var t, tt; + t = this; + if (!((t.Kind() === 25))) { + $panic(new $String("reflect: NumField of non-struct type")); + } + tt = t.kindType; + return tt.fields.$length; + }; + rtype.prototype.NumField = function() { return this.$val.NumField(); }; + rtype.ptr.prototype.NumIn = function() { + var t, tt; + t = this; + if (!((t.Kind() === 19))) { + $panic(new $String("reflect: NumIn of non-func type")); + } + tt = t.kindType; + return tt.in$2.$length; + }; + rtype.prototype.NumIn = function() { return this.$val.NumIn(); }; + rtype.ptr.prototype.NumOut = function() { + var t, tt; + t = this; + if (!((t.Kind() === 19))) { + $panic(new $String("reflect: NumOut of non-func type")); + } + tt = t.kindType; + return tt.out.$length; + }; + rtype.prototype.NumOut = function() { return this.$val.NumOut(); }; + rtype.ptr.prototype.Out = function(i) { + var i, t, tt, x; + t = this; + if (!((t.Kind() === 19))) { + $panic(new $String("reflect: Out of non-func type")); + } + tt = t.kindType; + return toType((x = tt.out, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i]))); + }; + rtype.prototype.Out = function(i) { return this.$val.Out(i); }; + ChanDir.prototype.String = function() { + var _ref, d; + d = this.$val; + _ref = d; + if (_ref === 2) { + return "chan<-"; + } else if (_ref === 1) { + return "<-chan"; + } else if (_ref === 3) { + return "chan"; + } + return "ChanDir" + strconv.Itoa((d >> 0)); + }; + $ptrType(ChanDir).prototype.String = function() { return new ChanDir(this.$get()).String(); }; + interfaceType.ptr.prototype.Method = function(i) { + var i, m = new Method.ptr(), p, t, x; + t = this; + if (i < 0 || i >= t.methods.$length) { + return m; + } + p = (x = t.methods, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + m.Name = p.name.$get(); + if (!($pointerIsEqual(p.pkgPath, ptrType$4.nil))) { + m.PkgPath = p.pkgPath.$get(); + } + m.Type = toType(p.typ); + m.Index = i; + return m; + }; + interfaceType.prototype.Method = function(i) { return this.$val.Method(i); }; + interfaceType.ptr.prototype.NumMethod = function() { + var t; + t = this; + return t.methods.$length; + }; + interfaceType.prototype.NumMethod = function() { return this.$val.NumMethod(); }; + interfaceType.ptr.prototype.MethodByName = function(name) { + var _i, _ref, _tmp, _tmp$1, i, m = new Method.ptr(), name, ok = false, p, t, x; + t = this; + if (t === ptrType$10.nil) { + return [m, ok]; + } + p = ptrType$11.nil; + _ref = t.methods; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + p = (x = t.methods, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + if (p.name.$get() === name) { + _tmp = $clone(t.Method(i), Method); _tmp$1 = true; $copy(m, _tmp, Method); ok = _tmp$1; + return [m, ok]; + } + _i++; + } + return [m, ok]; + }; + interfaceType.prototype.MethodByName = function(name) { return this.$val.MethodByName(name); }; + StructTag.prototype.Get = function(key) { + var _tuple, i, key, name, qvalue, tag, value; + tag = this.$val; + while (true) { + if (!(!(tag === ""))) { break; } + i = 0; + while (true) { + if (!(i < tag.length && (tag.charCodeAt(i) === 32))) { break; } + i = i + (1) >> 0; + } + tag = tag.substring(i); + if (tag === "") { + break; + } + i = 0; + while (true) { + if (!(i < tag.length && !((tag.charCodeAt(i) === 32)) && !((tag.charCodeAt(i) === 58)) && !((tag.charCodeAt(i) === 34)))) { break; } + i = i + (1) >> 0; + } + if ((i + 1 >> 0) >= tag.length || !((tag.charCodeAt(i) === 58)) || !((tag.charCodeAt((i + 1 >> 0)) === 34))) { + break; + } + name = tag.substring(0, i); + tag = tag.substring((i + 1 >> 0)); + i = 1; + while (true) { + if (!(i < tag.length && !((tag.charCodeAt(i) === 34)))) { break; } + if (tag.charCodeAt(i) === 92) { + i = i + (1) >> 0; + } + i = i + (1) >> 0; + } + if (i >= tag.length) { + break; + } + qvalue = tag.substring(0, (i + 1 >> 0)); + tag = tag.substring((i + 1 >> 0)); + if (key === name) { + _tuple = strconv.Unquote(qvalue); value = _tuple[0]; + return value; + } + } + return ""; + }; + $ptrType(StructTag).prototype.Get = function(key) { return new StructTag(this.$get()).Get(key); }; + structType.ptr.prototype.Field = function(i) { + var f = new StructField.ptr(), i, p, t, t$1, x; + t = this; + if (i < 0 || i >= t.fields.$length) { + return f; + } + p = (x = t.fields, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + f.Type = toType(p.typ); + if (!($pointerIsEqual(p.name, ptrType$4.nil))) { + f.Name = p.name.$get(); + } else { + t$1 = f.Type; + if (t$1.Kind() === 22) { + t$1 = t$1.Elem(); + } + f.Name = t$1.Name(); + f.Anonymous = true; + } + if (!($pointerIsEqual(p.pkgPath, ptrType$4.nil))) { + f.PkgPath = p.pkgPath.$get(); + } + if (!($pointerIsEqual(p.tag, ptrType$4.nil))) { + f.Tag = p.tag.$get(); + } + f.Offset = p.offset; + f.Index = new sliceType$9([i]); + return f; + }; + structType.prototype.Field = function(i) { return this.$val.Field(i); }; + structType.ptr.prototype.FieldByIndex = function(index) { + var _i, _ref, f = new StructField.ptr(), ft, i, index, t, x; + t = this; + f.Type = toType(t.rtype); + _ref = index; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + x = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (i > 0) { + ft = f.Type; + if ((ft.Kind() === 22) && (ft.Elem().Kind() === 25)) { + ft = ft.Elem(); + } + f.Type = ft; + } + $copy(f, f.Type.Field(x), StructField); + _i++; + } + return f; + }; + structType.prototype.FieldByIndex = function(index) { return this.$val.FieldByIndex(index); }; + structType.ptr.prototype.FieldByNameFunc = function(match) { + var _entry, _entry$1, _entry$2, _entry$3, _i, _i$1, _key, _key$1, _key$2, _key$3, _key$4, _key$5, _map, _map$1, _ref, _ref$1, _tmp, _tmp$1, _tmp$2, _tmp$3, count, current, f, fname, i, index, match, next, nextCount, ntyp, ok = false, result = new StructField.ptr(), scan, styp, t, t$1, visited, x; + t = this; + current = new sliceType$10([]); + next = new sliceType$10([new fieldScan.ptr(t, sliceType$9.nil)]); + nextCount = false; + visited = (_map = new $Map(), _map); + while (true) { + if (!(next.$length > 0)) { break; } + _tmp = next; _tmp$1 = $subslice(current, 0, 0); current = _tmp; next = _tmp$1; + count = nextCount; + nextCount = false; + _ref = current; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + scan = $clone(((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]), fieldScan); + t$1 = scan.typ; + if ((_entry = visited[t$1.$key()], _entry !== undefined ? _entry.v : false)) { + _i++; + continue; + } + _key$1 = t$1; (visited || $throwRuntimeError("assignment to entry in nil map"))[_key$1.$key()] = { k: _key$1, v: true }; + _ref$1 = t$1.fields; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i = _i$1; + f = (x = t$1.fields, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + fname = ""; + ntyp = ptrType$1.nil; + if (!($pointerIsEqual(f.name, ptrType$4.nil))) { + fname = f.name.$get(); + } else { + ntyp = f.typ; + if (ntyp.Kind() === 22) { + ntyp = ntyp.Elem().common(); + } + fname = ntyp.Name(); + } + if (match(fname)) { + if ((_entry$1 = count[t$1.$key()], _entry$1 !== undefined ? _entry$1.v : 0) > 1 || ok) { + _tmp$2 = new StructField.ptr("", "", $ifaceNil, "", 0, sliceType$9.nil, false); _tmp$3 = false; $copy(result, _tmp$2, StructField); ok = _tmp$3; + return [result, ok]; + } + $copy(result, t$1.Field(i), StructField); + result.Index = sliceType$9.nil; + result.Index = $appendSlice(result.Index, scan.index); + result.Index = $append(result.Index, i); + ok = true; + _i$1++; + continue; + } + if (ok || ntyp === ptrType$1.nil || !((ntyp.Kind() === 25))) { + _i$1++; + continue; + } + styp = ntyp.kindType; + if ((_entry$2 = nextCount[styp.$key()], _entry$2 !== undefined ? _entry$2.v : 0) > 0) { + _key$2 = styp; (nextCount || $throwRuntimeError("assignment to entry in nil map"))[_key$2.$key()] = { k: _key$2, v: 2 }; + _i$1++; + continue; + } + if (nextCount === false) { + nextCount = (_map$1 = new $Map(), _map$1); + } + _key$4 = styp; (nextCount || $throwRuntimeError("assignment to entry in nil map"))[_key$4.$key()] = { k: _key$4, v: 1 }; + if ((_entry$3 = count[t$1.$key()], _entry$3 !== undefined ? _entry$3.v : 0) > 1) { + _key$5 = styp; (nextCount || $throwRuntimeError("assignment to entry in nil map"))[_key$5.$key()] = { k: _key$5, v: 2 }; + } + index = sliceType$9.nil; + index = $appendSlice(index, scan.index); + index = $append(index, i); + next = $append(next, new fieldScan.ptr(styp, index)); + _i$1++; + } + _i++; + } + if (ok) { + break; + } + } + return [result, ok]; + }; + structType.prototype.FieldByNameFunc = function(match) { return this.$val.FieldByNameFunc(match); }; + structType.ptr.prototype.FieldByName = function(name) { + var _i, _ref, _tmp, _tmp$1, _tuple, f = new StructField.ptr(), hasAnon, i, name, present = false, t, tf, x; + t = this; + hasAnon = false; + if (!(name === "")) { + _ref = t.fields; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + tf = (x = t.fields, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + if ($pointerIsEqual(tf.name, ptrType$4.nil)) { + hasAnon = true; + _i++; + continue; + } + if (tf.name.$get() === name) { + _tmp = $clone(t.Field(i), StructField); _tmp$1 = true; $copy(f, _tmp, StructField); present = _tmp$1; + return [f, present]; + } + _i++; + } + } + if (!hasAnon) { + return [f, present]; + } + _tuple = t.FieldByNameFunc((function(s) { + var s; + return s === name; + })); $copy(f, _tuple[0], StructField); present = _tuple[1]; + return [f, present]; + }; + structType.prototype.FieldByName = function(name) { return this.$val.FieldByName(name); }; + PtrTo = $pkg.PtrTo = function(t) { + var t; + return $assertType(t, ptrType$1).ptrTo(); + }; + rtype.ptr.prototype.Implements = function(u) { + var t, u; + t = this; + if ($interfaceIsEqual(u, $ifaceNil)) { + $panic(new $String("reflect: nil type passed to Type.Implements")); + } + if (!((u.Kind() === 20))) { + $panic(new $String("reflect: non-interface type passed to Type.Implements")); + } + return implements$1($assertType(u, ptrType$1), t); + }; + rtype.prototype.Implements = function(u) { return this.$val.Implements(u); }; + rtype.ptr.prototype.AssignableTo = function(u) { + var t, u, uu; + t = this; + if ($interfaceIsEqual(u, $ifaceNil)) { + $panic(new $String("reflect: nil type passed to Type.AssignableTo")); + } + uu = $assertType(u, ptrType$1); + return directlyAssignable(uu, t) || implements$1(uu, t); + }; + rtype.prototype.AssignableTo = function(u) { return this.$val.AssignableTo(u); }; + rtype.ptr.prototype.ConvertibleTo = function(u) { + var t, u, uu; + t = this; + if ($interfaceIsEqual(u, $ifaceNil)) { + $panic(new $String("reflect: nil type passed to Type.ConvertibleTo")); + } + uu = $assertType(u, ptrType$1); + return !(convertOp(uu, t) === $throwNilPointerError); + }; + rtype.prototype.ConvertibleTo = function(u) { return this.$val.ConvertibleTo(u); }; + implements$1 = function(T, V) { + var T, V, i, i$1, j, j$1, t, tm, tm$1, v, v$1, vm, vm$1, x, x$1, x$2, x$3; + if (!((T.Kind() === 20))) { + return false; + } + t = T.kindType; + if (t.methods.$length === 0) { + return true; + } + if (V.Kind() === 20) { + v = V.kindType; + i = 0; + j = 0; + while (true) { + if (!(j < v.methods.$length)) { break; } + tm = (x = t.methods, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + vm = (x$1 = v.methods, ((j < 0 || j >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + j])); + if ($pointerIsEqual(vm.name, tm.name) && $pointerIsEqual(vm.pkgPath, tm.pkgPath) && vm.typ === tm.typ) { + i = i + (1) >> 0; + if (i >= t.methods.$length) { + return true; + } + } + j = j + (1) >> 0; + } + return false; + } + v$1 = V.uncommonType.uncommon(); + if (v$1 === ptrType$5.nil) { + return false; + } + i$1 = 0; + j$1 = 0; + while (true) { + if (!(j$1 < v$1.methods.$length)) { break; } + tm$1 = (x$2 = t.methods, ((i$1 < 0 || i$1 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + i$1])); + vm$1 = (x$3 = v$1.methods, ((j$1 < 0 || j$1 >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + j$1])); + if ($pointerIsEqual(vm$1.name, tm$1.name) && $pointerIsEqual(vm$1.pkgPath, tm$1.pkgPath) && vm$1.mtyp === tm$1.typ) { + i$1 = i$1 + (1) >> 0; + if (i$1 >= t.methods.$length) { + return true; + } + } + j$1 = j$1 + (1) >> 0; + } + return false; + }; + directlyAssignable = function(T, V) { + var T, V; + if (T === V) { + return true; + } + if (!(T.Name() === "") && !(V.Name() === "") || !((T.Kind() === V.Kind()))) { + return false; + } + return haveIdenticalUnderlyingType(T, V); + }; + haveIdenticalUnderlyingType = function(T, V) { + var T, V, _i, _i$1, _i$2, _ref, _ref$1, _ref$2, _ref$3, i, i$1, i$2, kind, t, t$1, t$2, tf, typ, typ$1, v, v$1, v$2, vf, x, x$1, x$2, x$3; + if (T === V) { + return true; + } + kind = T.Kind(); + if (!((kind === V.Kind()))) { + return false; + } + if (1 <= kind && kind <= 16 || (kind === 24) || (kind === 26)) { + return true; + } + _ref = kind; + if (_ref === 17) { + return $interfaceIsEqual(T.Elem(), V.Elem()) && (T.Len() === V.Len()); + } else if (_ref === 18) { + if ((V.ChanDir() === 3) && $interfaceIsEqual(T.Elem(), V.Elem())) { + return true; + } + return (V.ChanDir() === T.ChanDir()) && $interfaceIsEqual(T.Elem(), V.Elem()); + } else if (_ref === 19) { + t = T.kindType; + v = V.kindType; + if (!(t.dotdotdot === v.dotdotdot) || !((t.in$2.$length === v.in$2.$length)) || !((t.out.$length === v.out.$length))) { + return false; + } + _ref$1 = t.in$2; + _i = 0; + while (true) { + if (!(_i < _ref$1.$length)) { break; } + i = _i; + typ = ((_i < 0 || _i >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i]); + if (!(typ === (x = v.in$2, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])))) { + return false; + } + _i++; + } + _ref$2 = t.out; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$2.$length)) { break; } + i$1 = _i$1; + typ$1 = ((_i$1 < 0 || _i$1 >= _ref$2.$length) ? $throwRuntimeError("index out of range") : _ref$2.$array[_ref$2.$offset + _i$1]); + if (!(typ$1 === (x$1 = v.out, ((i$1 < 0 || i$1 >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + i$1])))) { + return false; + } + _i$1++; + } + return true; + } else if (_ref === 20) { + t$1 = T.kindType; + v$1 = V.kindType; + if ((t$1.methods.$length === 0) && (v$1.methods.$length === 0)) { + return true; + } + return false; + } else if (_ref === 21) { + return $interfaceIsEqual(T.Key(), V.Key()) && $interfaceIsEqual(T.Elem(), V.Elem()); + } else if (_ref === 22 || _ref === 23) { + return $interfaceIsEqual(T.Elem(), V.Elem()); + } else if (_ref === 25) { + t$2 = T.kindType; + v$2 = V.kindType; + if (!((t$2.fields.$length === v$2.fields.$length))) { + return false; + } + _ref$3 = t$2.fields; + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$3.$length)) { break; } + i$2 = _i$2; + tf = (x$2 = t$2.fields, ((i$2 < 0 || i$2 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + i$2])); + vf = (x$3 = v$2.fields, ((i$2 < 0 || i$2 >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + i$2])); + if (!($pointerIsEqual(tf.name, vf.name)) && ($pointerIsEqual(tf.name, ptrType$4.nil) || $pointerIsEqual(vf.name, ptrType$4.nil) || !(tf.name.$get() === vf.name.$get()))) { + return false; + } + if (!($pointerIsEqual(tf.pkgPath, vf.pkgPath)) && ($pointerIsEqual(tf.pkgPath, ptrType$4.nil) || $pointerIsEqual(vf.pkgPath, ptrType$4.nil) || !(tf.pkgPath.$get() === vf.pkgPath.$get()))) { + return false; + } + if (!(tf.typ === vf.typ)) { + return false; + } + if (!($pointerIsEqual(tf.tag, vf.tag)) && ($pointerIsEqual(tf.tag, ptrType$4.nil) || $pointerIsEqual(vf.tag, ptrType$4.nil) || !(tf.tag.$get() === vf.tag.$get()))) { + return false; + } + if (!((tf.offset === vf.offset))) { + return false; + } + _i$2++; + } + return true; + } + return false; + }; + toType = function(t) { + var t; + if (t === ptrType$1.nil) { + return $ifaceNil; + } + return t; + }; + ifaceIndir = function(t) { + var t; + return ((t.kind & 32) >>> 0) === 0; + }; + flag.prototype.kind = function() { + var f; + f = this.$val; + return (((f & 31) >>> 0) >>> 0); + }; + $ptrType(flag).prototype.kind = function() { return new flag(this.$get()).kind(); }; + Value.ptr.prototype.pointer = function() { + var v; + v = this; + if (!((v.typ.size === 4)) || !v.typ.pointers()) { + $panic(new $String("can't call pointer on a non-pointer Value")); + } + if (!((((v.flag & 64) >>> 0) === 0))) { + return v.ptr.$get(); + } + return v.ptr; + }; + Value.prototype.pointer = function() { return this.$val.pointer(); }; + ValueError.ptr.prototype.Error = function() { + var e; + e = this; + if (e.Kind === 0) { + return "reflect: call of " + e.Method + " on zero Value"; + } + return "reflect: call of " + e.Method + " on " + new Kind(e.Kind).String() + " Value"; + }; + ValueError.prototype.Error = function() { return this.$val.Error(); }; + flag.prototype.mustBe = function(expected) { + var expected, f; + f = this.$val; + if (!((new flag(f).kind() === expected))) { + $panic(new ValueError.ptr(methodName(), new flag(f).kind())); + } + }; + $ptrType(flag).prototype.mustBe = function(expected) { return new flag(this.$get()).mustBe(expected); }; + flag.prototype.mustBeExported = function() { + var f; + f = this.$val; + if (f === 0) { + $panic(new ValueError.ptr(methodName(), 0)); + } + if (!((((f & 32) >>> 0) === 0))) { + $panic(new $String("reflect: " + methodName() + " using value obtained using unexported field")); + } + }; + $ptrType(flag).prototype.mustBeExported = function() { return new flag(this.$get()).mustBeExported(); }; + flag.prototype.mustBeAssignable = function() { + var f; + f = this.$val; + if (f === 0) { + $panic(new ValueError.ptr(methodName(), 0)); + } + if (!((((f & 32) >>> 0) === 0))) { + $panic(new $String("reflect: " + methodName() + " using value obtained using unexported field")); + } + if (((f & 128) >>> 0) === 0) { + $panic(new $String("reflect: " + methodName() + " using unaddressable value")); + } + }; + $ptrType(flag).prototype.mustBeAssignable = function() { return new flag(this.$get()).mustBeAssignable(); }; + Value.ptr.prototype.Addr = function() { + var v; + v = this; + if (((v.flag & 128) >>> 0) === 0) { + $panic(new $String("reflect.Value.Addr of unaddressable value")); + } + return new Value.ptr(v.typ.ptrTo(), v.ptr, ((((v.flag & 32) >>> 0)) | 22) >>> 0); + }; + Value.prototype.Addr = function() { return this.$val.Addr(); }; + Value.ptr.prototype.Bool = function() { + var v; + v = this; + new flag(v.flag).mustBe(1); + return v.ptr.$get(); + }; + Value.prototype.Bool = function() { return this.$val.Bool(); }; + Value.ptr.prototype.Bytes = function() { + var v; + v = this; + new flag(v.flag).mustBe(23); + if (!((v.typ.Elem().Kind() === 8))) { + $panic(new $String("reflect.Value.Bytes of non-byte slice")); + } + return v.ptr.$get(); + }; + Value.prototype.Bytes = function() { return this.$val.Bytes(); }; + Value.ptr.prototype.runes = function() { + var v; + v = this; + new flag(v.flag).mustBe(23); + if (!((v.typ.Elem().Kind() === 5))) { + $panic(new $String("reflect.Value.Bytes of non-rune slice")); + } + return v.ptr.$get(); + }; + Value.prototype.runes = function() { return this.$val.runes(); }; + Value.ptr.prototype.CanAddr = function() { + var v; + v = this; + return !((((v.flag & 128) >>> 0) === 0)); + }; + Value.prototype.CanAddr = function() { return this.$val.CanAddr(); }; + Value.ptr.prototype.CanSet = function() { + var v; + v = this; + return ((v.flag & 160) >>> 0) === 128; + }; + Value.prototype.CanSet = function() { return this.$val.CanSet(); }; + Value.ptr.prototype.Call = function(in$1) { + var in$1, v; + v = this; + new flag(v.flag).mustBe(19); + new flag(v.flag).mustBeExported(); + return v.call("Call", in$1); + }; + Value.prototype.Call = function(in$1) { return this.$val.Call(in$1); }; + Value.ptr.prototype.CallSlice = function(in$1) { + var in$1, v; + v = this; + new flag(v.flag).mustBe(19); + new flag(v.flag).mustBeExported(); + return v.call("CallSlice", in$1); + }; + Value.prototype.CallSlice = function(in$1) { return this.$val.CallSlice(in$1); }; + Value.ptr.prototype.Complex = function() { + var _ref, k, v, x; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 15) { + return (x = v.ptr.$get(), new $Complex128(x.$real, x.$imag)); + } else if (_ref === 16) { + return v.ptr.$get(); + } + $panic(new ValueError.ptr("reflect.Value.Complex", new flag(v.flag).kind())); + }; + Value.prototype.Complex = function() { return this.$val.Complex(); }; + Value.ptr.prototype.FieldByIndex = function(index) { + var _i, _ref, i, index, v, x; + v = this; + if (index.$length === 1) { + return v.Field(((0 < 0 || 0 >= index.$length) ? $throwRuntimeError("index out of range") : index.$array[index.$offset + 0])); + } + new flag(v.flag).mustBe(25); + _ref = index; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + x = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (i > 0) { + if ((v.Kind() === 22) && (v.typ.Elem().Kind() === 25)) { + if (v.IsNil()) { + $panic(new $String("reflect: indirection through nil pointer to embedded struct")); + } + v = v.Elem(); + } + } + v = v.Field(x); + _i++; + } + return v; + }; + Value.prototype.FieldByIndex = function(index) { return this.$val.FieldByIndex(index); }; + Value.ptr.prototype.FieldByName = function(name) { + var _tuple, f, name, ok, v; + v = this; + new flag(v.flag).mustBe(25); + _tuple = v.typ.FieldByName(name); f = $clone(_tuple[0], StructField); ok = _tuple[1]; + if (ok) { + return v.FieldByIndex(f.Index); + } + return new Value.ptr(ptrType$1.nil, 0, 0); + }; + Value.prototype.FieldByName = function(name) { return this.$val.FieldByName(name); }; + Value.ptr.prototype.FieldByNameFunc = function(match) { + var _tuple, f, match, ok, v; + v = this; + _tuple = v.typ.FieldByNameFunc(match); f = $clone(_tuple[0], StructField); ok = _tuple[1]; + if (ok) { + return v.FieldByIndex(f.Index); + } + return new Value.ptr(ptrType$1.nil, 0, 0); + }; + Value.prototype.FieldByNameFunc = function(match) { return this.$val.FieldByNameFunc(match); }; + Value.ptr.prototype.Float = function() { + var _ref, k, v; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 13) { + return $coerceFloat32(v.ptr.$get()); + } else if (_ref === 14) { + return v.ptr.$get(); + } + $panic(new ValueError.ptr("reflect.Value.Float", new flag(v.flag).kind())); + }; + Value.prototype.Float = function() { return this.$val.Float(); }; + Value.ptr.prototype.Int = function() { + var _ref, k, p, v; + v = this; + k = new flag(v.flag).kind(); + p = v.ptr; + _ref = k; + if (_ref === 2) { + return new $Int64(0, p.$get()); + } else if (_ref === 3) { + return new $Int64(0, p.$get()); + } else if (_ref === 4) { + return new $Int64(0, p.$get()); + } else if (_ref === 5) { + return new $Int64(0, p.$get()); + } else if (_ref === 6) { + return p.$get(); + } + $panic(new ValueError.ptr("reflect.Value.Int", new flag(v.flag).kind())); + }; + Value.prototype.Int = function() { return this.$val.Int(); }; + Value.ptr.prototype.CanInterface = function() { + var v; + v = this; + if (v.flag === 0) { + $panic(new ValueError.ptr("reflect.Value.CanInterface", 0)); + } + return ((v.flag & 32) >>> 0) === 0; + }; + Value.prototype.CanInterface = function() { return this.$val.CanInterface(); }; + Value.ptr.prototype.Interface = function() { + var i = $ifaceNil, v; + v = this; + i = valueInterface(v, true); + return i; + }; + Value.prototype.Interface = function() { return this.$val.Interface(); }; + Value.ptr.prototype.InterfaceData = function() { + var v; + v = this; + new flag(v.flag).mustBe(20); + return v.ptr; + }; + Value.prototype.InterfaceData = function() { return this.$val.InterfaceData(); }; + Value.ptr.prototype.IsValid = function() { + var v; + v = this; + return !((v.flag === 0)); + }; + Value.prototype.IsValid = function() { return this.$val.IsValid(); }; + Value.ptr.prototype.Kind = function() { + var v; + v = this; + return new flag(v.flag).kind(); + }; + Value.prototype.Kind = function() { return this.$val.Kind(); }; + Value.ptr.prototype.MapIndex = function(key) { + var c, e, fl, k, key, tt, typ, v; + v = this; + key = key; + new flag(v.flag).mustBe(21); + tt = v.typ.kindType; + key = key.assignTo("reflect.Value.MapIndex", tt.key, 0); + k = 0; + if (!((((key.flag & 64) >>> 0) === 0))) { + k = key.ptr; + } else { + k = new ptrType$17(function() { return this.$target.ptr; }, function($v) { this.$target.ptr = $v; }, key); + } + e = mapaccess(v.typ, v.pointer(), k); + if (e === 0) { + return new Value.ptr(ptrType$1.nil, 0, 0); + } + typ = tt.elem; + fl = ((((v.flag | key.flag) >>> 0)) & 32) >>> 0; + fl = (fl | ((typ.Kind() >>> 0))) >>> 0; + if (ifaceIndir(typ)) { + c = unsafe_New(typ); + memmove(c, e, typ.size); + return new Value.ptr(typ, c, (fl | 64) >>> 0); + } else { + return new Value.ptr(typ, e.$get(), fl); + } + }; + Value.prototype.MapIndex = function(key) { return this.$val.MapIndex(key); }; + Value.ptr.prototype.MapKeys = function() { + var a, c, fl, i, it, key, keyType, m, mlen, tt, v; + v = this; + new flag(v.flag).mustBe(21); + tt = v.typ.kindType; + keyType = tt.key; + fl = (((v.flag & 32) >>> 0) | (keyType.Kind() >>> 0)) >>> 0; + m = v.pointer(); + mlen = 0; + if (!(m === 0)) { + mlen = maplen(m); + } + it = mapiterinit(v.typ, m); + a = $makeSlice(sliceType$6, mlen); + i = 0; + i = 0; + while (true) { + if (!(i < a.$length)) { break; } + key = mapiterkey(it); + if (key === 0) { + break; + } + if (ifaceIndir(keyType)) { + c = unsafe_New(keyType); + memmove(c, key, keyType.size); + (i < 0 || i >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + i] = new Value.ptr(keyType, c, (fl | 64) >>> 0); + } else { + (i < 0 || i >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + i] = new Value.ptr(keyType, key.$get(), fl); + } + mapiternext(it); + i = i + (1) >> 0; + } + return $subslice(a, 0, i); + }; + Value.prototype.MapKeys = function() { return this.$val.MapKeys(); }; + Value.ptr.prototype.Method = function(i) { + var fl, i, v; + v = this; + if (v.typ === ptrType$1.nil) { + $panic(new ValueError.ptr("reflect.Value.Method", 0)); + } + if (!((((v.flag & 256) >>> 0) === 0)) || (i >>> 0) >= (v.typ.NumMethod() >>> 0)) { + $panic(new $String("reflect: Method index out of range")); + } + if ((v.typ.Kind() === 20) && v.IsNil()) { + $panic(new $String("reflect: Method on nil interface value")); + } + fl = (v.flag & 96) >>> 0; + fl = (fl | (19)) >>> 0; + fl = (fl | (((((i >>> 0) << 9 >>> 0) | 256) >>> 0))) >>> 0; + return new Value.ptr(v.typ, v.ptr, fl); + }; + Value.prototype.Method = function(i) { return this.$val.Method(i); }; + Value.ptr.prototype.NumMethod = function() { + var v; + v = this; + if (v.typ === ptrType$1.nil) { + $panic(new ValueError.ptr("reflect.Value.NumMethod", 0)); + } + if (!((((v.flag & 256) >>> 0) === 0))) { + return 0; + } + return v.typ.NumMethod(); + }; + Value.prototype.NumMethod = function() { return this.$val.NumMethod(); }; + Value.ptr.prototype.MethodByName = function(name) { + var _tuple, m, name, ok, v; + v = this; + if (v.typ === ptrType$1.nil) { + $panic(new ValueError.ptr("reflect.Value.MethodByName", 0)); + } + if (!((((v.flag & 256) >>> 0) === 0))) { + return new Value.ptr(ptrType$1.nil, 0, 0); + } + _tuple = v.typ.MethodByName(name); m = $clone(_tuple[0], Method); ok = _tuple[1]; + if (!ok) { + return new Value.ptr(ptrType$1.nil, 0, 0); + } + return v.Method(m.Index); + }; + Value.prototype.MethodByName = function(name) { return this.$val.MethodByName(name); }; + Value.ptr.prototype.NumField = function() { + var tt, v; + v = this; + new flag(v.flag).mustBe(25); + tt = v.typ.kindType; + return tt.fields.$length; + }; + Value.prototype.NumField = function() { return this.$val.NumField(); }; + Value.ptr.prototype.OverflowComplex = function(x) { + var _ref, k, v, x; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 15) { + return overflowFloat32(x.$real) || overflowFloat32(x.$imag); + } else if (_ref === 16) { + return false; + } + $panic(new ValueError.ptr("reflect.Value.OverflowComplex", new flag(v.flag).kind())); + }; + Value.prototype.OverflowComplex = function(x) { return this.$val.OverflowComplex(x); }; + Value.ptr.prototype.OverflowFloat = function(x) { + var _ref, k, v, x; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 13) { + return overflowFloat32(x); + } else if (_ref === 14) { + return false; + } + $panic(new ValueError.ptr("reflect.Value.OverflowFloat", new flag(v.flag).kind())); + }; + Value.prototype.OverflowFloat = function(x) { return this.$val.OverflowFloat(x); }; + overflowFloat32 = function(x) { + var x; + if (x < 0) { + x = -x; + } + return 3.4028234663852886e+38 < x && x <= 1.7976931348623157e+308; + }; + Value.ptr.prototype.OverflowInt = function(x) { + var _ref, bitSize, k, trunc, v, x, x$1; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 2 || _ref === 3 || _ref === 4 || _ref === 5 || _ref === 6) { + bitSize = (x$1 = v.typ.size, (((x$1 >>> 16 << 16) * 8 >>> 0) + (x$1 << 16 >>> 16) * 8) >>> 0); + trunc = $shiftRightInt64(($shiftLeft64(x, ((64 - bitSize >>> 0)))), ((64 - bitSize >>> 0))); + return !((x.$high === trunc.$high && x.$low === trunc.$low)); + } + $panic(new ValueError.ptr("reflect.Value.OverflowInt", new flag(v.flag).kind())); + }; + Value.prototype.OverflowInt = function(x) { return this.$val.OverflowInt(x); }; + Value.ptr.prototype.OverflowUint = function(x) { + var _ref, bitSize, k, trunc, v, x, x$1; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 7 || _ref === 12 || _ref === 8 || _ref === 9 || _ref === 10 || _ref === 11) { + bitSize = (x$1 = v.typ.size, (((x$1 >>> 16 << 16) * 8 >>> 0) + (x$1 << 16 >>> 16) * 8) >>> 0); + trunc = $shiftRightUint64(($shiftLeft64(x, ((64 - bitSize >>> 0)))), ((64 - bitSize >>> 0))); + return !((x.$high === trunc.$high && x.$low === trunc.$low)); + } + $panic(new ValueError.ptr("reflect.Value.OverflowUint", new flag(v.flag).kind())); + }; + Value.prototype.OverflowUint = function(x) { return this.$val.OverflowUint(x); }; + Value.ptr.prototype.SetBool = function(x) { + var v, x; + v = this; + new flag(v.flag).mustBeAssignable(); + new flag(v.flag).mustBe(1); + v.ptr.$set(x); + }; + Value.prototype.SetBool = function(x) { return this.$val.SetBool(x); }; + Value.ptr.prototype.SetBytes = function(x) { + var v, x; + v = this; + new flag(v.flag).mustBeAssignable(); + new flag(v.flag).mustBe(23); + if (!((v.typ.Elem().Kind() === 8))) { + $panic(new $String("reflect.Value.SetBytes of non-byte slice")); + } + v.ptr.$set(x); + }; + Value.prototype.SetBytes = function(x) { return this.$val.SetBytes(x); }; + Value.ptr.prototype.setRunes = function(x) { + var v, x; + v = this; + new flag(v.flag).mustBeAssignable(); + new flag(v.flag).mustBe(23); + if (!((v.typ.Elem().Kind() === 5))) { + $panic(new $String("reflect.Value.setRunes of non-rune slice")); + } + v.ptr.$set(x); + }; + Value.prototype.setRunes = function(x) { return this.$val.setRunes(x); }; + Value.ptr.prototype.SetComplex = function(x) { + var _ref, k, v, x; + v = this; + new flag(v.flag).mustBeAssignable(); + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 15) { + v.ptr.$set(new $Complex64(x.$real, x.$imag)); + } else if (_ref === 16) { + v.ptr.$set(x); + } else { + $panic(new ValueError.ptr("reflect.Value.SetComplex", new flag(v.flag).kind())); + } + }; + Value.prototype.SetComplex = function(x) { return this.$val.SetComplex(x); }; + Value.ptr.prototype.SetFloat = function(x) { + var _ref, k, v, x; + v = this; + new flag(v.flag).mustBeAssignable(); + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 13) { + v.ptr.$set(x); + } else if (_ref === 14) { + v.ptr.$set(x); + } else { + $panic(new ValueError.ptr("reflect.Value.SetFloat", new flag(v.flag).kind())); + } + }; + Value.prototype.SetFloat = function(x) { return this.$val.SetFloat(x); }; + Value.ptr.prototype.SetInt = function(x) { + var _ref, k, v, x; + v = this; + new flag(v.flag).mustBeAssignable(); + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 2) { + v.ptr.$set(((x.$low + ((x.$high >> 31) * 4294967296)) >> 0)); + } else if (_ref === 3) { + v.ptr.$set(((x.$low + ((x.$high >> 31) * 4294967296)) << 24 >> 24)); + } else if (_ref === 4) { + v.ptr.$set(((x.$low + ((x.$high >> 31) * 4294967296)) << 16 >> 16)); + } else if (_ref === 5) { + v.ptr.$set(((x.$low + ((x.$high >> 31) * 4294967296)) >> 0)); + } else if (_ref === 6) { + v.ptr.$set(x); + } else { + $panic(new ValueError.ptr("reflect.Value.SetInt", new flag(v.flag).kind())); + } + }; + Value.prototype.SetInt = function(x) { return this.$val.SetInt(x); }; + Value.ptr.prototype.SetMapIndex = function(key, val) { + var e, k, key, tt, v, val; + v = this; + val = val; + key = key; + new flag(v.flag).mustBe(21); + new flag(v.flag).mustBeExported(); + new flag(key.flag).mustBeExported(); + tt = v.typ.kindType; + key = key.assignTo("reflect.Value.SetMapIndex", tt.key, 0); + k = 0; + if (!((((key.flag & 64) >>> 0) === 0))) { + k = key.ptr; + } else { + k = new ptrType$17(function() { return this.$target.ptr; }, function($v) { this.$target.ptr = $v; }, key); + } + if (val.typ === ptrType$1.nil) { + mapdelete(v.typ, v.pointer(), k); + return; + } + new flag(val.flag).mustBeExported(); + val = val.assignTo("reflect.Value.SetMapIndex", tt.elem, 0); + e = 0; + if (!((((val.flag & 64) >>> 0) === 0))) { + e = val.ptr; + } else { + e = new ptrType$17(function() { return this.$target.ptr; }, function($v) { this.$target.ptr = $v; }, val); + } + mapassign(v.typ, v.pointer(), k, e); + }; + Value.prototype.SetMapIndex = function(key, val) { return this.$val.SetMapIndex(key, val); }; + Value.ptr.prototype.SetUint = function(x) { + var _ref, k, v, x; + v = this; + new flag(v.flag).mustBeAssignable(); + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 7) { + v.ptr.$set((x.$low >>> 0)); + } else if (_ref === 8) { + v.ptr.$set((x.$low << 24 >>> 24)); + } else if (_ref === 9) { + v.ptr.$set((x.$low << 16 >>> 16)); + } else if (_ref === 10) { + v.ptr.$set((x.$low >>> 0)); + } else if (_ref === 11) { + v.ptr.$set(x); + } else if (_ref === 12) { + v.ptr.$set((x.$low >>> 0)); + } else { + $panic(new ValueError.ptr("reflect.Value.SetUint", new flag(v.flag).kind())); + } + }; + Value.prototype.SetUint = function(x) { return this.$val.SetUint(x); }; + Value.ptr.prototype.SetPointer = function(x) { + var v, x; + v = this; + new flag(v.flag).mustBeAssignable(); + new flag(v.flag).mustBe(26); + v.ptr.$set(x); + }; + Value.prototype.SetPointer = function(x) { return this.$val.SetPointer(x); }; + Value.ptr.prototype.SetString = function(x) { + var v, x; + v = this; + new flag(v.flag).mustBeAssignable(); + new flag(v.flag).mustBe(24); + v.ptr.$set(x); + }; + Value.prototype.SetString = function(x) { return this.$val.SetString(x); }; + Value.ptr.prototype.String = function() { + var _ref, k, v; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 0) { + return ""; + } else if (_ref === 24) { + return v.ptr.$get(); + } + return "<" + v.Type().String() + " Value>"; + }; + Value.prototype.String = function() { return this.$val.String(); }; + Value.ptr.prototype.Type = function() { + var f, i, m, m$1, tt, ut, v, x, x$1; + v = this; + f = v.flag; + if (f === 0) { + $panic(new ValueError.ptr("reflect.Value.Type", 0)); + } + if (((f & 256) >>> 0) === 0) { + return v.typ; + } + i = (v.flag >> 0) >> 9 >> 0; + if (v.typ.Kind() === 20) { + tt = v.typ.kindType; + if ((i >>> 0) >= (tt.methods.$length >>> 0)) { + $panic(new $String("reflect: internal error: invalid method index")); + } + m = (x = tt.methods, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + return m.typ; + } + ut = v.typ.uncommonType.uncommon(); + if (ut === ptrType$5.nil || (i >>> 0) >= (ut.methods.$length >>> 0)) { + $panic(new $String("reflect: internal error: invalid method index")); + } + m$1 = (x$1 = ut.methods, ((i < 0 || i >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + i])); + return m$1.mtyp; + }; + Value.prototype.Type = function() { return this.$val.Type(); }; + Value.ptr.prototype.Uint = function() { + var _ref, k, p, v, x; + v = this; + k = new flag(v.flag).kind(); + p = v.ptr; + _ref = k; + if (_ref === 7) { + return new $Uint64(0, p.$get()); + } else if (_ref === 8) { + return new $Uint64(0, p.$get()); + } else if (_ref === 9) { + return new $Uint64(0, p.$get()); + } else if (_ref === 10) { + return new $Uint64(0, p.$get()); + } else if (_ref === 11) { + return p.$get(); + } else if (_ref === 12) { + return (x = p.$get(), new $Uint64(0, x.constructor === Number ? x : 1)); + } + $panic(new ValueError.ptr("reflect.Value.Uint", new flag(v.flag).kind())); + }; + Value.prototype.Uint = function() { return this.$val.Uint(); }; + Value.ptr.prototype.UnsafeAddr = function() { + var v; + v = this; + if (v.typ === ptrType$1.nil) { + $panic(new ValueError.ptr("reflect.Value.UnsafeAddr", 0)); + } + if (((v.flag & 128) >>> 0) === 0) { + $panic(new $String("reflect.Value.UnsafeAddr of unaddressable value")); + } + return v.ptr; + }; + Value.prototype.UnsafeAddr = function() { return this.$val.UnsafeAddr(); }; + New = $pkg.New = function(typ) { + var fl, ptr, typ; + if ($interfaceIsEqual(typ, $ifaceNil)) { + $panic(new $String("reflect: New(nil)")); + } + ptr = unsafe_New($assertType(typ, ptrType$1)); + fl = 22; + return new Value.ptr(typ.common().ptrTo(), ptr, fl); + }; + Value.ptr.prototype.assignTo = function(context, dst, target) { + var context, dst, fl, target, v, x; + v = this; + if (!((((v.flag & 256) >>> 0) === 0))) { + v = makeMethodValue(context, v); + } + if (directlyAssignable(dst, v.typ)) { + v.typ = dst; + fl = (v.flag & 224) >>> 0; + fl = (fl | ((dst.Kind() >>> 0))) >>> 0; + return new Value.ptr(dst, v.ptr, fl); + } else if (implements$1(dst, v.typ)) { + if (target === 0) { + target = unsafe_New(dst); + } + x = valueInterface(v, false); + if (dst.NumMethod() === 0) { + target.$set(x); + } else { + ifaceE2I(dst, x, target); + } + return new Value.ptr(dst, target, 84); + } + $panic(new $String(context + ": value of type " + v.typ.String() + " is not assignable to type " + dst.String())); + }; + Value.prototype.assignTo = function(context, dst, target) { return this.$val.assignTo(context, dst, target); }; + Value.ptr.prototype.Convert = function(t) { + var op, t, v; + v = this; + if (!((((v.flag & 256) >>> 0) === 0))) { + v = makeMethodValue("Convert", v); + } + op = convertOp(t.common(), v.typ); + if (op === $throwNilPointerError) { + $panic(new $String("reflect.Value.Convert: value of type " + v.typ.String() + " cannot be converted to type " + t.String())); + } + return op(v, t); + }; + Value.prototype.Convert = function(t) { return this.$val.Convert(t); }; + convertOp = function(dst, src) { + var _ref, _ref$1, _ref$2, _ref$3, _ref$4, _ref$5, _ref$6, dst, src; + _ref = src.Kind(); + if (_ref === 2 || _ref === 3 || _ref === 4 || _ref === 5 || _ref === 6) { + _ref$1 = dst.Kind(); + if (_ref$1 === 2 || _ref$1 === 3 || _ref$1 === 4 || _ref$1 === 5 || _ref$1 === 6 || _ref$1 === 7 || _ref$1 === 8 || _ref$1 === 9 || _ref$1 === 10 || _ref$1 === 11 || _ref$1 === 12) { + return cvtInt; + } else if (_ref$1 === 13 || _ref$1 === 14) { + return cvtIntFloat; + } else if (_ref$1 === 24) { + return cvtIntString; + } + } else if (_ref === 7 || _ref === 8 || _ref === 9 || _ref === 10 || _ref === 11 || _ref === 12) { + _ref$2 = dst.Kind(); + if (_ref$2 === 2 || _ref$2 === 3 || _ref$2 === 4 || _ref$2 === 5 || _ref$2 === 6 || _ref$2 === 7 || _ref$2 === 8 || _ref$2 === 9 || _ref$2 === 10 || _ref$2 === 11 || _ref$2 === 12) { + return cvtUint; + } else if (_ref$2 === 13 || _ref$2 === 14) { + return cvtUintFloat; + } else if (_ref$2 === 24) { + return cvtUintString; + } + } else if (_ref === 13 || _ref === 14) { + _ref$3 = dst.Kind(); + if (_ref$3 === 2 || _ref$3 === 3 || _ref$3 === 4 || _ref$3 === 5 || _ref$3 === 6) { + return cvtFloatInt; + } else if (_ref$3 === 7 || _ref$3 === 8 || _ref$3 === 9 || _ref$3 === 10 || _ref$3 === 11 || _ref$3 === 12) { + return cvtFloatUint; + } else if (_ref$3 === 13 || _ref$3 === 14) { + return cvtFloat; + } + } else if (_ref === 15 || _ref === 16) { + _ref$4 = dst.Kind(); + if (_ref$4 === 15 || _ref$4 === 16) { + return cvtComplex; + } + } else if (_ref === 24) { + if ((dst.Kind() === 23) && dst.Elem().PkgPath() === "") { + _ref$5 = dst.Elem().Kind(); + if (_ref$5 === 8) { + return cvtStringBytes; + } else if (_ref$5 === 5) { + return cvtStringRunes; + } + } + } else if (_ref === 23) { + if ((dst.Kind() === 24) && src.Elem().PkgPath() === "") { + _ref$6 = src.Elem().Kind(); + if (_ref$6 === 8) { + return cvtBytesString; + } else if (_ref$6 === 5) { + return cvtRunesString; + } + } + } + if (haveIdenticalUnderlyingType(dst, src)) { + return cvtDirect; + } + if ((dst.Kind() === 22) && dst.Name() === "" && (src.Kind() === 22) && src.Name() === "" && haveIdenticalUnderlyingType(dst.Elem().common(), src.Elem().common())) { + return cvtDirect; + } + if (implements$1(dst, src)) { + if (src.Kind() === 20) { + return cvtI2I; + } + return cvtT2I; + } + return $throwNilPointerError; + }; + makeFloat = function(f, v, t) { + var _ref, f, ptr, t, typ, v; + typ = t.common(); + ptr = unsafe_New(typ); + _ref = typ.size; + if (_ref === 4) { + ptr.$set(v); + } else if (_ref === 8) { + ptr.$set(v); + } + return new Value.ptr(typ, ptr, (((f | 64) >>> 0) | (typ.Kind() >>> 0)) >>> 0); + }; + makeComplex = function(f, v, t) { + var _ref, f, ptr, t, typ, v; + typ = t.common(); + ptr = unsafe_New(typ); + _ref = typ.size; + if (_ref === 8) { + ptr.$set(new $Complex64(v.$real, v.$imag)); + } else if (_ref === 16) { + ptr.$set(v); + } + return new Value.ptr(typ, ptr, (((f | 64) >>> 0) | (typ.Kind() >>> 0)) >>> 0); + }; + makeString = function(f, v, t) { + var f, ret, t, v; + ret = New(t).Elem(); + ret.SetString(v); + ret.flag = ((ret.flag & ~128) | f) >>> 0; + return ret; + }; + makeBytes = function(f, v, t) { + var f, ret, t, v; + ret = New(t).Elem(); + ret.SetBytes(v); + ret.flag = ((ret.flag & ~128) | f) >>> 0; + return ret; + }; + makeRunes = function(f, v, t) { + var f, ret, t, v; + ret = New(t).Elem(); + ret.setRunes(v); + ret.flag = ((ret.flag & ~128) | f) >>> 0; + return ret; + }; + cvtInt = function(v, t) { + var t, v, x; + v = v; + return makeInt((v.flag & 32) >>> 0, (x = v.Int(), new $Uint64(x.$high, x.$low)), t); + }; + cvtUint = function(v, t) { + var t, v; + v = v; + return makeInt((v.flag & 32) >>> 0, v.Uint(), t); + }; + cvtFloatInt = function(v, t) { + var t, v, x; + v = v; + return makeInt((v.flag & 32) >>> 0, (x = new $Int64(0, v.Float()), new $Uint64(x.$high, x.$low)), t); + }; + cvtFloatUint = function(v, t) { + var t, v; + v = v; + return makeInt((v.flag & 32) >>> 0, new $Uint64(0, v.Float()), t); + }; + cvtIntFloat = function(v, t) { + var t, v; + v = v; + return makeFloat((v.flag & 32) >>> 0, $flatten64(v.Int()), t); + }; + cvtUintFloat = function(v, t) { + var t, v; + v = v; + return makeFloat((v.flag & 32) >>> 0, $flatten64(v.Uint()), t); + }; + cvtFloat = function(v, t) { + var t, v; + v = v; + return makeFloat((v.flag & 32) >>> 0, v.Float(), t); + }; + cvtComplex = function(v, t) { + var t, v; + v = v; + return makeComplex((v.flag & 32) >>> 0, v.Complex(), t); + }; + cvtIntString = function(v, t) { + var t, v; + v = v; + return makeString((v.flag & 32) >>> 0, $encodeRune(v.Int().$low), t); + }; + cvtUintString = function(v, t) { + var t, v; + v = v; + return makeString((v.flag & 32) >>> 0, $encodeRune(v.Uint().$low), t); + }; + cvtBytesString = function(v, t) { + var t, v; + v = v; + return makeString((v.flag & 32) >>> 0, $bytesToString(v.Bytes()), t); + }; + cvtStringBytes = function(v, t) { + var t, v; + v = v; + return makeBytes((v.flag & 32) >>> 0, new sliceType$12($stringToBytes(v.String())), t); + }; + cvtRunesString = function(v, t) { + var t, v; + v = v; + return makeString((v.flag & 32) >>> 0, $runesToString(v.runes()), t); + }; + cvtStringRunes = function(v, t) { + var t, v; + v = v; + return makeRunes((v.flag & 32) >>> 0, new sliceType$13($stringToRunes(v.String())), t); + }; + cvtT2I = function(v, typ) { + var target, typ, v, x; + v = v; + target = unsafe_New(typ.common()); + x = valueInterface(v, false); + if (typ.NumMethod() === 0) { + target.$set(x); + } else { + ifaceE2I($assertType(typ, ptrType$1), x, target); + } + return new Value.ptr(typ.common(), target, (((((v.flag & 32) >>> 0) | 64) >>> 0) | 20) >>> 0); + }; + cvtI2I = function(v, typ) { + var ret, typ, v; + v = v; + if (v.IsNil()) { + ret = Zero(typ); + ret.flag = (ret.flag | (((v.flag & 32) >>> 0))) >>> 0; + return ret; + } + return cvtT2I(v.Elem(), typ); + }; + Kind.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$1.methods = [{prop: "ptrTo", name: "ptrTo", pkg: "reflect", typ: $funcType([], [ptrType$1], false)}, {prop: "pointers", name: "pointers", pkg: "reflect", typ: $funcType([], [$Bool], false)}, {prop: "Comparable", name: "Comparable", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Uintptr], false)}, {prop: "Bits", name: "Bits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Align", name: "Align", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "FieldAlign", name: "FieldAlign", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Kind", name: "Kind", pkg: "", typ: $funcType([], [Kind], false)}, {prop: "common", name: "common", pkg: "reflect", typ: $funcType([], [ptrType$1], false)}, {prop: "NumMethod", name: "NumMethod", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Method", name: "Method", pkg: "", typ: $funcType([$Int], [Method], false)}, {prop: "MethodByName", name: "MethodByName", pkg: "", typ: $funcType([$String], [Method, $Bool], false)}, {prop: "PkgPath", name: "PkgPath", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "ChanDir", name: "ChanDir", pkg: "", typ: $funcType([], [ChanDir], false)}, {prop: "IsVariadic", name: "IsVariadic", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Elem", name: "Elem", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Field", name: "Field", pkg: "", typ: $funcType([$Int], [StructField], false)}, {prop: "FieldByIndex", name: "FieldByIndex", pkg: "", typ: $funcType([sliceType$9], [StructField], false)}, {prop: "FieldByName", name: "FieldByName", pkg: "", typ: $funcType([$String], [StructField, $Bool], false)}, {prop: "FieldByNameFunc", name: "FieldByNameFunc", pkg: "", typ: $funcType([funcType$2], [StructField, $Bool], false)}, {prop: "In", name: "In", pkg: "", typ: $funcType([$Int], [Type], false)}, {prop: "Key", name: "Key", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumField", name: "NumField", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumIn", name: "NumIn", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumOut", name: "NumOut", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Out", name: "Out", pkg: "", typ: $funcType([$Int], [Type], false)}, {prop: "Implements", name: "Implements", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "AssignableTo", name: "AssignableTo", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "ConvertibleTo", name: "ConvertibleTo", pkg: "", typ: $funcType([Type], [$Bool], false)}]; + ptrType$5.methods = [{prop: "Method", name: "Method", pkg: "", typ: $funcType([$Int], [Method], false)}, {prop: "uncommon", name: "uncommon", pkg: "reflect", typ: $funcType([], [ptrType$5], false)}, {prop: "PkgPath", name: "PkgPath", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "NumMethod", name: "NumMethod", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "MethodByName", name: "MethodByName", pkg: "", typ: $funcType([$String], [Method, $Bool], false)}]; + ChanDir.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$10.methods = [{prop: "Method", name: "Method", pkg: "", typ: $funcType([$Int], [Method], false)}, {prop: "NumMethod", name: "NumMethod", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "MethodByName", name: "MethodByName", pkg: "", typ: $funcType([$String], [Method, $Bool], false)}]; + ptrType$12.methods = [{prop: "Field", name: "Field", pkg: "", typ: $funcType([$Int], [StructField], false)}, {prop: "FieldByIndex", name: "FieldByIndex", pkg: "", typ: $funcType([sliceType$9], [StructField], false)}, {prop: "FieldByNameFunc", name: "FieldByNameFunc", pkg: "", typ: $funcType([funcType$2], [StructField, $Bool], false)}, {prop: "FieldByName", name: "FieldByName", pkg: "", typ: $funcType([$String], [StructField, $Bool], false)}]; + StructTag.methods = [{prop: "Get", name: "Get", pkg: "", typ: $funcType([$String], [$String], false)}]; + Value.methods = [{prop: "object", name: "object", pkg: "reflect", typ: $funcType([], [js.Object], false)}, {prop: "call", name: "call", pkg: "reflect", typ: $funcType([$String, sliceType$6], [sliceType$6], false)}, {prop: "Cap", name: "Cap", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Elem", name: "Elem", pkg: "", typ: $funcType([], [Value], false)}, {prop: "Field", name: "Field", pkg: "", typ: $funcType([$Int], [Value], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([$Int], [Value], false)}, {prop: "IsNil", name: "IsNil", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Pointer", name: "Pointer", pkg: "", typ: $funcType([], [$Uintptr], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([Value], [], false)}, {prop: "SetCap", name: "SetCap", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "SetLen", name: "SetLen", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Slice", name: "Slice", pkg: "", typ: $funcType([$Int, $Int], [Value], false)}, {prop: "Slice3", name: "Slice3", pkg: "", typ: $funcType([$Int, $Int, $Int], [Value], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [], false)}, {prop: "TrySend", name: "TrySend", pkg: "", typ: $funcType([Value], [$Bool], false)}, {prop: "Send", name: "Send", pkg: "", typ: $funcType([Value], [], false)}, {prop: "TryRecv", name: "TryRecv", pkg: "", typ: $funcType([], [Value, $Bool], false)}, {prop: "Recv", name: "Recv", pkg: "", typ: $funcType([], [Value, $Bool], false)}, {prop: "pointer", name: "pointer", pkg: "reflect", typ: $funcType([], [$UnsafePointer], false)}, {prop: "Addr", name: "Addr", pkg: "", typ: $funcType([], [Value], false)}, {prop: "Bool", name: "Bool", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([], [sliceType$12], false)}, {prop: "runes", name: "runes", pkg: "reflect", typ: $funcType([], [sliceType$13], false)}, {prop: "CanAddr", name: "CanAddr", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "CanSet", name: "CanSet", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Call", name: "Call", pkg: "", typ: $funcType([sliceType$6], [sliceType$6], false)}, {prop: "CallSlice", name: "CallSlice", pkg: "", typ: $funcType([sliceType$6], [sliceType$6], false)}, {prop: "Complex", name: "Complex", pkg: "", typ: $funcType([], [$Complex128], false)}, {prop: "FieldByIndex", name: "FieldByIndex", pkg: "", typ: $funcType([sliceType$9], [Value], false)}, {prop: "FieldByName", name: "FieldByName", pkg: "", typ: $funcType([$String], [Value], false)}, {prop: "FieldByNameFunc", name: "FieldByNameFunc", pkg: "", typ: $funcType([funcType$2], [Value], false)}, {prop: "Float", name: "Float", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Int", name: "Int", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "CanInterface", name: "CanInterface", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Interface", name: "Interface", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "InterfaceData", name: "InterfaceData", pkg: "", typ: $funcType([], [arrayType$3], false)}, {prop: "IsValid", name: "IsValid", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Kind", name: "Kind", pkg: "", typ: $funcType([], [Kind], false)}, {prop: "MapIndex", name: "MapIndex", pkg: "", typ: $funcType([Value], [Value], false)}, {prop: "MapKeys", name: "MapKeys", pkg: "", typ: $funcType([], [sliceType$6], false)}, {prop: "Method", name: "Method", pkg: "", typ: $funcType([$Int], [Value], false)}, {prop: "NumMethod", name: "NumMethod", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "MethodByName", name: "MethodByName", pkg: "", typ: $funcType([$String], [Value], false)}, {prop: "NumField", name: "NumField", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "OverflowComplex", name: "OverflowComplex", pkg: "", typ: $funcType([$Complex128], [$Bool], false)}, {prop: "OverflowFloat", name: "OverflowFloat", pkg: "", typ: $funcType([$Float64], [$Bool], false)}, {prop: "OverflowInt", name: "OverflowInt", pkg: "", typ: $funcType([$Int64], [$Bool], false)}, {prop: "OverflowUint", name: "OverflowUint", pkg: "", typ: $funcType([$Uint64], [$Bool], false)}, {prop: "recv", name: "recv", pkg: "reflect", typ: $funcType([$Bool], [Value, $Bool], false)}, {prop: "send", name: "send", pkg: "reflect", typ: $funcType([Value, $Bool], [$Bool], false)}, {prop: "SetBool", name: "SetBool", pkg: "", typ: $funcType([$Bool], [], false)}, {prop: "SetBytes", name: "SetBytes", pkg: "", typ: $funcType([sliceType$12], [], false)}, {prop: "setRunes", name: "setRunes", pkg: "reflect", typ: $funcType([sliceType$13], [], false)}, {prop: "SetComplex", name: "SetComplex", pkg: "", typ: $funcType([$Complex128], [], false)}, {prop: "SetFloat", name: "SetFloat", pkg: "", typ: $funcType([$Float64], [], false)}, {prop: "SetInt", name: "SetInt", pkg: "", typ: $funcType([$Int64], [], false)}, {prop: "SetMapIndex", name: "SetMapIndex", pkg: "", typ: $funcType([Value, Value], [], false)}, {prop: "SetUint", name: "SetUint", pkg: "", typ: $funcType([$Uint64], [], false)}, {prop: "SetPointer", name: "SetPointer", pkg: "", typ: $funcType([$UnsafePointer], [], false)}, {prop: "SetString", name: "SetString", pkg: "", typ: $funcType([$String], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Type", name: "Type", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Uint", name: "Uint", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "UnsafeAddr", name: "UnsafeAddr", pkg: "", typ: $funcType([], [$Uintptr], false)}, {prop: "assignTo", name: "assignTo", pkg: "reflect", typ: $funcType([$String, ptrType$1, $UnsafePointer], [Value], false)}, {prop: "Convert", name: "Convert", pkg: "", typ: $funcType([Type], [Value], false)}]; + flag.methods = [{prop: "kind", name: "kind", pkg: "reflect", typ: $funcType([], [Kind], false)}, {prop: "mustBe", name: "mustBe", pkg: "reflect", typ: $funcType([Kind], [], false)}, {prop: "mustBeExported", name: "mustBeExported", pkg: "reflect", typ: $funcType([], [], false)}, {prop: "mustBeAssignable", name: "mustBeAssignable", pkg: "reflect", typ: $funcType([], [], false)}]; + ptrType$20.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + mapIter.init([{prop: "t", name: "t", pkg: "reflect", typ: Type, tag: ""}, {prop: "m", name: "m", pkg: "reflect", typ: js.Object, tag: ""}, {prop: "keys", name: "keys", pkg: "reflect", typ: js.Object, tag: ""}, {prop: "i", name: "i", pkg: "reflect", typ: $Int, tag: ""}]); + Type.init([{prop: "Align", name: "Align", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "AssignableTo", name: "AssignableTo", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "Bits", name: "Bits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "ChanDir", name: "ChanDir", pkg: "", typ: $funcType([], [ChanDir], false)}, {prop: "Comparable", name: "Comparable", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "ConvertibleTo", name: "ConvertibleTo", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "Elem", name: "Elem", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Field", name: "Field", pkg: "", typ: $funcType([$Int], [StructField], false)}, {prop: "FieldAlign", name: "FieldAlign", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "FieldByIndex", name: "FieldByIndex", pkg: "", typ: $funcType([sliceType$9], [StructField], false)}, {prop: "FieldByName", name: "FieldByName", pkg: "", typ: $funcType([$String], [StructField, $Bool], false)}, {prop: "FieldByNameFunc", name: "FieldByNameFunc", pkg: "", typ: $funcType([funcType$2], [StructField, $Bool], false)}, {prop: "Implements", name: "Implements", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "In", name: "In", pkg: "", typ: $funcType([$Int], [Type], false)}, {prop: "IsVariadic", name: "IsVariadic", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Key", name: "Key", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Kind", name: "Kind", pkg: "", typ: $funcType([], [Kind], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Method", name: "Method", pkg: "", typ: $funcType([$Int], [Method], false)}, {prop: "MethodByName", name: "MethodByName", pkg: "", typ: $funcType([$String], [Method, $Bool], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "NumField", name: "NumField", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumIn", name: "NumIn", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumMethod", name: "NumMethod", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumOut", name: "NumOut", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Out", name: "Out", pkg: "", typ: $funcType([$Int], [Type], false)}, {prop: "PkgPath", name: "PkgPath", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Uintptr], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "common", name: "common", pkg: "reflect", typ: $funcType([], [ptrType$1], false)}, {prop: "uncommon", name: "uncommon", pkg: "reflect", typ: $funcType([], [ptrType$5], false)}]); + rtype.init([{prop: "size", name: "size", pkg: "reflect", typ: $Uintptr, tag: ""}, {prop: "hash", name: "hash", pkg: "reflect", typ: $Uint32, tag: ""}, {prop: "_$2", name: "_", pkg: "reflect", typ: $Uint8, tag: ""}, {prop: "align", name: "align", pkg: "reflect", typ: $Uint8, tag: ""}, {prop: "fieldAlign", name: "fieldAlign", pkg: "reflect", typ: $Uint8, tag: ""}, {prop: "kind", name: "kind", pkg: "reflect", typ: $Uint8, tag: ""}, {prop: "alg", name: "alg", pkg: "reflect", typ: ptrType$3, tag: ""}, {prop: "gc", name: "gc", pkg: "reflect", typ: arrayType$1, tag: ""}, {prop: "string", name: "string", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "uncommonType", name: "", pkg: "reflect", typ: ptrType$5, tag: ""}, {prop: "ptrToThis", name: "ptrToThis", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "zero", name: "zero", pkg: "reflect", typ: $UnsafePointer, tag: ""}]); + typeAlg.init([{prop: "hash", name: "hash", pkg: "reflect", typ: funcType$3, tag: ""}, {prop: "equal", name: "equal", pkg: "reflect", typ: funcType$4, tag: ""}]); + method.init([{prop: "name", name: "name", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "pkgPath", name: "pkgPath", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "mtyp", name: "mtyp", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "typ", name: "typ", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "ifn", name: "ifn", pkg: "reflect", typ: $UnsafePointer, tag: ""}, {prop: "tfn", name: "tfn", pkg: "reflect", typ: $UnsafePointer, tag: ""}]); + uncommonType.init([{prop: "name", name: "name", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "pkgPath", name: "pkgPath", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "methods", name: "methods", pkg: "reflect", typ: sliceType$2, tag: ""}]); + arrayType.init([{prop: "rtype", name: "", pkg: "reflect", typ: rtype, tag: "reflect:\"array\""}, {prop: "elem", name: "elem", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "slice", name: "slice", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "len", name: "len", pkg: "reflect", typ: $Uintptr, tag: ""}]); + chanType.init([{prop: "rtype", name: "", pkg: "reflect", typ: rtype, tag: "reflect:\"chan\""}, {prop: "elem", name: "elem", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "dir", name: "dir", pkg: "reflect", typ: $Uintptr, tag: ""}]); + funcType.init([{prop: "rtype", name: "", pkg: "reflect", typ: rtype, tag: "reflect:\"func\""}, {prop: "dotdotdot", name: "dotdotdot", pkg: "reflect", typ: $Bool, tag: ""}, {prop: "in$2", name: "in", pkg: "reflect", typ: sliceType$3, tag: ""}, {prop: "out", name: "out", pkg: "reflect", typ: sliceType$3, tag: ""}]); + imethod.init([{prop: "name", name: "name", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "pkgPath", name: "pkgPath", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "typ", name: "typ", pkg: "reflect", typ: ptrType$1, tag: ""}]); + interfaceType.init([{prop: "rtype", name: "", pkg: "reflect", typ: rtype, tag: "reflect:\"interface\""}, {prop: "methods", name: "methods", pkg: "reflect", typ: sliceType$4, tag: ""}]); + mapType.init([{prop: "rtype", name: "", pkg: "reflect", typ: rtype, tag: "reflect:\"map\""}, {prop: "key", name: "key", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "elem", name: "elem", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "bucket", name: "bucket", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "hmap", name: "hmap", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "keysize", name: "keysize", pkg: "reflect", typ: $Uint8, tag: ""}, {prop: "indirectkey", name: "indirectkey", pkg: "reflect", typ: $Uint8, tag: ""}, {prop: "valuesize", name: "valuesize", pkg: "reflect", typ: $Uint8, tag: ""}, {prop: "indirectvalue", name: "indirectvalue", pkg: "reflect", typ: $Uint8, tag: ""}, {prop: "bucketsize", name: "bucketsize", pkg: "reflect", typ: $Uint16, tag: ""}]); + ptrType.init([{prop: "rtype", name: "", pkg: "reflect", typ: rtype, tag: "reflect:\"ptr\""}, {prop: "elem", name: "elem", pkg: "reflect", typ: ptrType$1, tag: ""}]); + sliceType.init([{prop: "rtype", name: "", pkg: "reflect", typ: rtype, tag: "reflect:\"slice\""}, {prop: "elem", name: "elem", pkg: "reflect", typ: ptrType$1, tag: ""}]); + structField.init([{prop: "name", name: "name", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "pkgPath", name: "pkgPath", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "typ", name: "typ", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "tag", name: "tag", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "offset", name: "offset", pkg: "reflect", typ: $Uintptr, tag: ""}]); + structType.init([{prop: "rtype", name: "", pkg: "reflect", typ: rtype, tag: "reflect:\"struct\""}, {prop: "fields", name: "fields", pkg: "reflect", typ: sliceType$5, tag: ""}]); + Method.init([{prop: "Name", name: "Name", pkg: "", typ: $String, tag: ""}, {prop: "PkgPath", name: "PkgPath", pkg: "", typ: $String, tag: ""}, {prop: "Type", name: "Type", pkg: "", typ: Type, tag: ""}, {prop: "Func", name: "Func", pkg: "", typ: Value, tag: ""}, {prop: "Index", name: "Index", pkg: "", typ: $Int, tag: ""}]); + StructField.init([{prop: "Name", name: "Name", pkg: "", typ: $String, tag: ""}, {prop: "PkgPath", name: "PkgPath", pkg: "", typ: $String, tag: ""}, {prop: "Type", name: "Type", pkg: "", typ: Type, tag: ""}, {prop: "Tag", name: "Tag", pkg: "", typ: StructTag, tag: ""}, {prop: "Offset", name: "Offset", pkg: "", typ: $Uintptr, tag: ""}, {prop: "Index", name: "Index", pkg: "", typ: sliceType$9, tag: ""}, {prop: "Anonymous", name: "Anonymous", pkg: "", typ: $Bool, tag: ""}]); + fieldScan.init([{prop: "typ", name: "typ", pkg: "reflect", typ: ptrType$12, tag: ""}, {prop: "index", name: "index", pkg: "reflect", typ: sliceType$9, tag: ""}]); + Value.init([{prop: "typ", name: "typ", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "ptr", name: "ptr", pkg: "reflect", typ: $UnsafePointer, tag: ""}, {prop: "flag", name: "", pkg: "reflect", typ: flag, tag: ""}]); + ValueError.init([{prop: "Method", name: "Method", pkg: "", typ: $String, tag: ""}, {prop: "Kind", name: "Kind", pkg: "", typ: Kind, tag: ""}]); + nonEmptyInterface.init([{prop: "itab", name: "itab", pkg: "reflect", typ: ptrType$7, tag: ""}, {prop: "word", name: "word", pkg: "reflect", typ: $UnsafePointer, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_reflect = function() { while (true) { switch ($s) { case 0: + $r = js.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = math.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = runtime.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = strconv.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = sync.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + initialized = false; + stringPtrMap = new $Map(); + jsObject = $js.Object; + jsContainer = $js.container.ptr; + kindNames = new sliceType$1(["invalid", "bool", "int", "int8", "int16", "int32", "int64", "uint", "uint8", "uint16", "uint32", "uint64", "uintptr", "float32", "float64", "complex64", "complex128", "array", "chan", "func", "interface", "map", "ptr", "slice", "string", "struct", "unsafe.Pointer"]); + uint8Type = $assertType(TypeOf(new $Uint8(0)), ptrType$1); + init(); + /* */ } return; } }; $init_reflect.$blocking = true; return $init_reflect; + }; + return $pkg; +})(); +$packages["fmt"] = (function() { + var $pkg = {}, errors, io, math, os, reflect, strconv, sync, utf8, fmtFlags, fmt, State, Formatter, Stringer, GoStringer, buffer, pp, runeUnreader, scanError, ss, ssave, sliceType, sliceType$1, arrayType, sliceType$2, ptrType, ptrType$1, ptrType$2, ptrType$5, arrayType$1, arrayType$2, ptrType$25, funcType, padZeroBytes, padSpaceBytes, trueBytes, falseBytes, commaSpaceBytes, nilAngleBytes, nilParenBytes, nilBytes, mapBytes, percentBangBytes, panicBytes, irparenBytes, bytesBytes, ppFree, intBits, uintptrBits, byteType, space, ssFree, complexError, boolError, init, doPrec, newPrinter, Fprintln, Println, getField, isSpace, notSpace, indexRune; + errors = $packages["errors"]; + io = $packages["io"]; + math = $packages["math"]; + os = $packages["os"]; + reflect = $packages["reflect"]; + strconv = $packages["strconv"]; + sync = $packages["sync"]; + utf8 = $packages["unicode/utf8"]; + fmtFlags = $pkg.fmtFlags = $newType(0, $kindStruct, "fmt.fmtFlags", "fmtFlags", "fmt", function(widPresent_, precPresent_, minus_, plus_, sharp_, space_, unicode_, uniQuote_, zero_, plusV_, sharpV_) { + this.$val = this; + this.widPresent = widPresent_ !== undefined ? widPresent_ : false; + this.precPresent = precPresent_ !== undefined ? precPresent_ : false; + this.minus = minus_ !== undefined ? minus_ : false; + this.plus = plus_ !== undefined ? plus_ : false; + this.sharp = sharp_ !== undefined ? sharp_ : false; + this.space = space_ !== undefined ? space_ : false; + this.unicode = unicode_ !== undefined ? unicode_ : false; + this.uniQuote = uniQuote_ !== undefined ? uniQuote_ : false; + this.zero = zero_ !== undefined ? zero_ : false; + this.plusV = plusV_ !== undefined ? plusV_ : false; + this.sharpV = sharpV_ !== undefined ? sharpV_ : false; + }); + fmt = $pkg.fmt = $newType(0, $kindStruct, "fmt.fmt", "fmt", "fmt", function(intbuf_, buf_, wid_, prec_, fmtFlags_) { + this.$val = this; + this.intbuf = intbuf_ !== undefined ? intbuf_ : arrayType$2.zero(); + this.buf = buf_ !== undefined ? buf_ : ptrType$1.nil; + this.wid = wid_ !== undefined ? wid_ : 0; + this.prec = prec_ !== undefined ? prec_ : 0; + this.fmtFlags = fmtFlags_ !== undefined ? fmtFlags_ : new fmtFlags.ptr(); + }); + State = $pkg.State = $newType(8, $kindInterface, "fmt.State", "State", "fmt", null); + Formatter = $pkg.Formatter = $newType(8, $kindInterface, "fmt.Formatter", "Formatter", "fmt", null); + Stringer = $pkg.Stringer = $newType(8, $kindInterface, "fmt.Stringer", "Stringer", "fmt", null); + GoStringer = $pkg.GoStringer = $newType(8, $kindInterface, "fmt.GoStringer", "GoStringer", "fmt", null); + buffer = $pkg.buffer = $newType(12, $kindSlice, "fmt.buffer", "buffer", "fmt", null); + pp = $pkg.pp = $newType(0, $kindStruct, "fmt.pp", "pp", "fmt", function(n_, panicking_, erroring_, buf_, arg_, value_, reordered_, goodArgNum_, runeBuf_, fmt_) { + this.$val = this; + this.n = n_ !== undefined ? n_ : 0; + this.panicking = panicking_ !== undefined ? panicking_ : false; + this.erroring = erroring_ !== undefined ? erroring_ : false; + this.buf = buf_ !== undefined ? buf_ : buffer.nil; + this.arg = arg_ !== undefined ? arg_ : $ifaceNil; + this.value = value_ !== undefined ? value_ : new reflect.Value.ptr(); + this.reordered = reordered_ !== undefined ? reordered_ : false; + this.goodArgNum = goodArgNum_ !== undefined ? goodArgNum_ : false; + this.runeBuf = runeBuf_ !== undefined ? runeBuf_ : arrayType$1.zero(); + this.fmt = fmt_ !== undefined ? fmt_ : new fmt.ptr(); + }); + runeUnreader = $pkg.runeUnreader = $newType(8, $kindInterface, "fmt.runeUnreader", "runeUnreader", "fmt", null); + scanError = $pkg.scanError = $newType(0, $kindStruct, "fmt.scanError", "scanError", "fmt", function(err_) { + this.$val = this; + this.err = err_ !== undefined ? err_ : $ifaceNil; + }); + ss = $pkg.ss = $newType(0, $kindStruct, "fmt.ss", "ss", "fmt", function(rr_, buf_, peekRune_, prevRune_, count_, atEOF_, ssave_) { + this.$val = this; + this.rr = rr_ !== undefined ? rr_ : $ifaceNil; + this.buf = buf_ !== undefined ? buf_ : buffer.nil; + this.peekRune = peekRune_ !== undefined ? peekRune_ : 0; + this.prevRune = prevRune_ !== undefined ? prevRune_ : 0; + this.count = count_ !== undefined ? count_ : 0; + this.atEOF = atEOF_ !== undefined ? atEOF_ : false; + this.ssave = ssave_ !== undefined ? ssave_ : new ssave.ptr(); + }); + ssave = $pkg.ssave = $newType(0, $kindStruct, "fmt.ssave", "ssave", "fmt", function(validSave_, nlIsEnd_, nlIsSpace_, argLimit_, limit_, maxWid_) { + this.$val = this; + this.validSave = validSave_ !== undefined ? validSave_ : false; + this.nlIsEnd = nlIsEnd_ !== undefined ? nlIsEnd_ : false; + this.nlIsSpace = nlIsSpace_ !== undefined ? nlIsSpace_ : false; + this.argLimit = argLimit_ !== undefined ? argLimit_ : 0; + this.limit = limit_ !== undefined ? limit_ : 0; + this.maxWid = maxWid_ !== undefined ? maxWid_ : 0; + }); + sliceType = $sliceType($Uint8); + sliceType$1 = $sliceType($emptyInterface); + arrayType = $arrayType($Uint16, 2); + sliceType$2 = $sliceType(arrayType); + ptrType = $ptrType(pp); + ptrType$1 = $ptrType(buffer); + ptrType$2 = $ptrType(reflect.rtype); + ptrType$5 = $ptrType(ss); + arrayType$1 = $arrayType($Uint8, 4); + arrayType$2 = $arrayType($Uint8, 65); + ptrType$25 = $ptrType(fmt); + funcType = $funcType([$Int32], [$Bool], false); + init = function() { + var i; + i = 0; + while (true) { + if (!(i < 65)) { break; } + (i < 0 || i >= padZeroBytes.$length) ? $throwRuntimeError("index out of range") : padZeroBytes.$array[padZeroBytes.$offset + i] = 48; + (i < 0 || i >= padSpaceBytes.$length) ? $throwRuntimeError("index out of range") : padSpaceBytes.$array[padSpaceBytes.$offset + i] = 32; + i = i + (1) >> 0; + } + }; + fmt.ptr.prototype.clearflags = function() { + var f; + f = this; + $copy(f.fmtFlags, new fmtFlags.ptr(false, false, false, false, false, false, false, false, false, false, false), fmtFlags); + }; + fmt.prototype.clearflags = function() { return this.$val.clearflags(); }; + fmt.ptr.prototype.init = function(buf) { + var buf, f; + f = this; + f.buf = buf; + f.clearflags(); + }; + fmt.prototype.init = function(buf) { return this.$val.init(buf); }; + fmt.ptr.prototype.computePadding = function(width) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, f, left, leftWidth = 0, padding = sliceType.nil, rightWidth = 0, w, width; + f = this; + left = !f.fmtFlags.minus; + w = f.wid; + if (w < 0) { + left = false; + w = -w; + } + w = w - (width) >> 0; + if (w > 0) { + if (left && f.fmtFlags.zero) { + _tmp = padZeroBytes; _tmp$1 = w; _tmp$2 = 0; padding = _tmp; leftWidth = _tmp$1; rightWidth = _tmp$2; + return [padding, leftWidth, rightWidth]; + } + if (left) { + _tmp$3 = padSpaceBytes; _tmp$4 = w; _tmp$5 = 0; padding = _tmp$3; leftWidth = _tmp$4; rightWidth = _tmp$5; + return [padding, leftWidth, rightWidth]; + } else { + _tmp$6 = padSpaceBytes; _tmp$7 = 0; _tmp$8 = w; padding = _tmp$6; leftWidth = _tmp$7; rightWidth = _tmp$8; + return [padding, leftWidth, rightWidth]; + } + } + return [padding, leftWidth, rightWidth]; + }; + fmt.prototype.computePadding = function(width) { return this.$val.computePadding(width); }; + fmt.ptr.prototype.writePadding = function(n, padding) { + var f, m, n, padding; + f = this; + while (true) { + if (!(n > 0)) { break; } + m = n; + if (m > 65) { + m = 65; + } + f.buf.Write($subslice(padding, 0, m)); + n = n - (m) >> 0; + } + }; + fmt.prototype.writePadding = function(n, padding) { return this.$val.writePadding(n, padding); }; + fmt.ptr.prototype.pad = function(b) { + var _tuple, b, f, left, padding, right; + f = this; + if (!f.fmtFlags.widPresent || (f.wid === 0)) { + f.buf.Write(b); + return; + } + _tuple = f.computePadding(utf8.RuneCount(b)); padding = _tuple[0]; left = _tuple[1]; right = _tuple[2]; + if (left > 0) { + f.writePadding(left, padding); + } + f.buf.Write(b); + if (right > 0) { + f.writePadding(right, padding); + } + }; + fmt.prototype.pad = function(b) { return this.$val.pad(b); }; + fmt.ptr.prototype.padString = function(s) { + var _tuple, f, left, padding, right, s; + f = this; + if (!f.fmtFlags.widPresent || (f.wid === 0)) { + f.buf.WriteString(s); + return; + } + _tuple = f.computePadding(utf8.RuneCountInString(s)); padding = _tuple[0]; left = _tuple[1]; right = _tuple[2]; + if (left > 0) { + f.writePadding(left, padding); + } + f.buf.WriteString(s); + if (right > 0) { + f.writePadding(right, padding); + } + }; + fmt.prototype.padString = function(s) { return this.$val.padString(s); }; + fmt.ptr.prototype.fmt_boolean = function(v) { + var f, v; + f = this; + if (v) { + f.pad(trueBytes); + } else { + f.pad(falseBytes); + } + }; + fmt.prototype.fmt_boolean = function(v) { return this.$val.fmt_boolean(v); }; + fmt.ptr.prototype.integer = function(a, base, signedness, digits) { + var _ref, _ref$1, a, base, buf, digits, f, i, j, negative, next, prec, runeWidth, signedness, ua, width, width$1, x, x$1, x$2, x$3; + f = this; + if (f.fmtFlags.precPresent && (f.prec === 0) && (a.$high === 0 && a.$low === 0)) { + return; + } + buf = $subslice(new sliceType(f.intbuf), 0); + if (f.fmtFlags.widPresent) { + width = f.wid; + if ((base.$high === 0 && base.$low === 16) && f.fmtFlags.sharp) { + width = width + (2) >> 0; + } + if (width > 65) { + buf = $makeSlice(sliceType, width); + } + } + negative = signedness === true && (a.$high < 0 || (a.$high === 0 && a.$low < 0)); + if (negative) { + a = new $Int64(-a.$high, -a.$low); + } + prec = 0; + if (f.fmtFlags.precPresent) { + prec = f.prec; + f.fmtFlags.zero = false; + } else if (f.fmtFlags.zero && f.fmtFlags.widPresent && !f.fmtFlags.minus && f.wid > 0) { + prec = f.wid; + if (negative || f.fmtFlags.plus || f.fmtFlags.space) { + prec = prec - (1) >> 0; + } + } + i = buf.$length; + ua = new $Uint64(a.$high, a.$low); + _ref = base; + if ((_ref.$high === 0 && _ref.$low === 10)) { + while (true) { + if (!((ua.$high > 0 || (ua.$high === 0 && ua.$low >= 10)))) { break; } + i = i - (1) >> 0; + next = $div64(ua, new $Uint64(0, 10), false); + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = ((x = new $Uint64(0 + ua.$high, 48 + ua.$low), x$1 = $mul64(next, new $Uint64(0, 10)), new $Uint64(x.$high - x$1.$high, x.$low - x$1.$low)).$low << 24 >>> 24); + ua = next; + } + } else if ((_ref.$high === 0 && _ref.$low === 16)) { + while (true) { + if (!((ua.$high > 0 || (ua.$high === 0 && ua.$low >= 16)))) { break; } + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = digits.charCodeAt($flatten64(new $Uint64(ua.$high & 0, (ua.$low & 15) >>> 0))); + ua = $shiftRightUint64(ua, (4)); + } + } else if ((_ref.$high === 0 && _ref.$low === 8)) { + while (true) { + if (!((ua.$high > 0 || (ua.$high === 0 && ua.$low >= 8)))) { break; } + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = ((x$2 = new $Uint64(ua.$high & 0, (ua.$low & 7) >>> 0), new $Uint64(0 + x$2.$high, 48 + x$2.$low)).$low << 24 >>> 24); + ua = $shiftRightUint64(ua, (3)); + } + } else if ((_ref.$high === 0 && _ref.$low === 2)) { + while (true) { + if (!((ua.$high > 0 || (ua.$high === 0 && ua.$low >= 2)))) { break; } + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = ((x$3 = new $Uint64(ua.$high & 0, (ua.$low & 1) >>> 0), new $Uint64(0 + x$3.$high, 48 + x$3.$low)).$low << 24 >>> 24); + ua = $shiftRightUint64(ua, (1)); + } + } else { + $panic(new $String("fmt: unknown base; can't happen")); + } + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = digits.charCodeAt($flatten64(ua)); + while (true) { + if (!(i > 0 && prec > (buf.$length - i >> 0))) { break; } + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = 48; + } + if (f.fmtFlags.sharp) { + _ref$1 = base; + if ((_ref$1.$high === 0 && _ref$1.$low === 8)) { + if (!((((i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i]) === 48))) { + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = 48; + } + } else if ((_ref$1.$high === 0 && _ref$1.$low === 16)) { + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = (120 + digits.charCodeAt(10) << 24 >>> 24) - 97 << 24 >>> 24; + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = 48; + } + } + if (f.fmtFlags.unicode) { + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = 43; + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = 85; + } + if (negative) { + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = 45; + } else if (f.fmtFlags.plus) { + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = 43; + } else if (f.fmtFlags.space) { + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = 32; + } + if (f.fmtFlags.unicode && f.fmtFlags.uniQuote && (a.$high > 0 || (a.$high === 0 && a.$low >= 0)) && (a.$high < 0 || (a.$high === 0 && a.$low <= 1114111)) && strconv.IsPrint(((a.$low + ((a.$high >> 31) * 4294967296)) >> 0))) { + runeWidth = utf8.RuneLen(((a.$low + ((a.$high >> 31) * 4294967296)) >> 0)); + width$1 = (2 + runeWidth >> 0) + 1 >> 0; + $copySlice($subslice(buf, (i - width$1 >> 0)), $subslice(buf, i)); + i = i - (width$1) >> 0; + j = buf.$length - width$1 >> 0; + (j < 0 || j >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + j] = 32; + j = j + (1) >> 0; + (j < 0 || j >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + j] = 39; + j = j + (1) >> 0; + utf8.EncodeRune($subslice(buf, j), ((a.$low + ((a.$high >> 31) * 4294967296)) >> 0)); + j = j + (runeWidth) >> 0; + (j < 0 || j >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + j] = 39; + } + f.pad($subslice(buf, i)); + }; + fmt.prototype.integer = function(a, base, signedness, digits) { return this.$val.integer(a, base, signedness, digits); }; + fmt.ptr.prototype.truncate = function(s) { + var _i, _ref, _rune, f, i, n, s; + f = this; + if (f.fmtFlags.precPresent && f.prec < utf8.RuneCountInString(s)) { + n = f.prec; + _ref = s; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + i = _i; + if (n === 0) { + s = s.substring(0, i); + break; + } + n = n - (1) >> 0; + _i += _rune[1]; + } + } + return s; + }; + fmt.prototype.truncate = function(s) { return this.$val.truncate(s); }; + fmt.ptr.prototype.fmt_s = function(s) { + var f, s; + f = this; + s = f.truncate(s); + f.padString(s); + }; + fmt.prototype.fmt_s = function(s) { return this.$val.fmt_s(s); }; + fmt.ptr.prototype.fmt_sbx = function(s, b, digits) { + var b, buf, c, digits, f, i, n, s, x; + f = this; + n = b.$length; + if (b === sliceType.nil) { + n = s.length; + } + x = (digits.charCodeAt(10) - 97 << 24 >>> 24) + 120 << 24 >>> 24; + buf = sliceType.nil; + i = 0; + while (true) { + if (!(i < n)) { break; } + if (i > 0 && f.fmtFlags.space) { + buf = $append(buf, 32); + } + if (f.fmtFlags.sharp && (f.fmtFlags.space || (i === 0))) { + buf = $append(buf, 48, x); + } + c = 0; + if (b === sliceType.nil) { + c = s.charCodeAt(i); + } else { + c = ((i < 0 || i >= b.$length) ? $throwRuntimeError("index out of range") : b.$array[b.$offset + i]); + } + buf = $append(buf, digits.charCodeAt((c >>> 4 << 24 >>> 24)), digits.charCodeAt(((c & 15) >>> 0))); + i = i + (1) >> 0; + } + f.pad(buf); + }; + fmt.prototype.fmt_sbx = function(s, b, digits) { return this.$val.fmt_sbx(s, b, digits); }; + fmt.ptr.prototype.fmt_sx = function(s, digits) { + var digits, f, s; + f = this; + if (f.fmtFlags.precPresent && f.prec < s.length) { + s = s.substring(0, f.prec); + } + f.fmt_sbx(s, sliceType.nil, digits); + }; + fmt.prototype.fmt_sx = function(s, digits) { return this.$val.fmt_sx(s, digits); }; + fmt.ptr.prototype.fmt_bx = function(b, digits) { + var b, digits, f; + f = this; + if (f.fmtFlags.precPresent && f.prec < b.$length) { + b = $subslice(b, 0, f.prec); + } + f.fmt_sbx("", b, digits); + }; + fmt.prototype.fmt_bx = function(b, digits) { return this.$val.fmt_bx(b, digits); }; + fmt.ptr.prototype.fmt_q = function(s) { + var f, quoted, s; + f = this; + s = f.truncate(s); + quoted = ""; + if (f.fmtFlags.sharp && strconv.CanBackquote(s)) { + quoted = "`" + s + "`"; + } else { + if (f.fmtFlags.plus) { + quoted = strconv.QuoteToASCII(s); + } else { + quoted = strconv.Quote(s); + } + } + f.padString(quoted); + }; + fmt.prototype.fmt_q = function(s) { return this.$val.fmt_q(s); }; + fmt.ptr.prototype.fmt_qc = function(c) { + var c, f, quoted; + f = this; + quoted = sliceType.nil; + if (f.fmtFlags.plus) { + quoted = strconv.AppendQuoteRuneToASCII($subslice(new sliceType(f.intbuf), 0, 0), ((c.$low + ((c.$high >> 31) * 4294967296)) >> 0)); + } else { + quoted = strconv.AppendQuoteRune($subslice(new sliceType(f.intbuf), 0, 0), ((c.$low + ((c.$high >> 31) * 4294967296)) >> 0)); + } + f.pad(quoted); + }; + fmt.prototype.fmt_qc = function(c) { return this.$val.fmt_qc(c); }; + doPrec = function(f, def) { + var def, f; + if (f.fmtFlags.precPresent) { + return f.prec; + } + return def; + }; + fmt.ptr.prototype.formatFloat = function(v, verb, prec, n) { + var $deferred = [], $err = null, f, n, num, prec, v, verb; + /* */ try { $deferFrames.push($deferred); + f = this; + num = strconv.AppendFloat($subslice(new sliceType(f.intbuf), 0, 1), v, verb, prec, n); + if ((((1 < 0 || 1 >= num.$length) ? $throwRuntimeError("index out of range") : num.$array[num.$offset + 1]) === 45) || (((1 < 0 || 1 >= num.$length) ? $throwRuntimeError("index out of range") : num.$array[num.$offset + 1]) === 43)) { + num = $subslice(num, 1); + } else { + (0 < 0 || 0 >= num.$length) ? $throwRuntimeError("index out of range") : num.$array[num.$offset + 0] = 43; + } + if (math.IsInf(v, 0)) { + if (f.fmtFlags.zero) { + $deferred.push([(function() { + f.fmtFlags.zero = true; + }), []]); + f.fmtFlags.zero = false; + } + } + if (f.fmtFlags.zero && f.fmtFlags.widPresent && f.wid > num.$length) { + if (f.fmtFlags.space && v >= 0) { + f.buf.WriteByte(32); + f.wid = f.wid - (1) >> 0; + } else if (f.fmtFlags.plus || v < 0) { + f.buf.WriteByte(((0 < 0 || 0 >= num.$length) ? $throwRuntimeError("index out of range") : num.$array[num.$offset + 0])); + f.wid = f.wid - (1) >> 0; + } + f.pad($subslice(num, 1)); + return; + } + if (f.fmtFlags.space && (((0 < 0 || 0 >= num.$length) ? $throwRuntimeError("index out of range") : num.$array[num.$offset + 0]) === 43)) { + (0 < 0 || 0 >= num.$length) ? $throwRuntimeError("index out of range") : num.$array[num.$offset + 0] = 32; + f.pad(num); + return; + } + if (f.fmtFlags.plus || (((0 < 0 || 0 >= num.$length) ? $throwRuntimeError("index out of range") : num.$array[num.$offset + 0]) === 45) || math.IsInf(v, 0)) { + f.pad(num); + return; + } + f.pad($subslice(num, 1)); + /* */ } catch(err) { $err = err; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + fmt.prototype.formatFloat = function(v, verb, prec, n) { return this.$val.formatFloat(v, verb, prec, n); }; + fmt.ptr.prototype.fmt_e64 = function(v) { + var f, v; + f = this; + f.formatFloat(v, 101, doPrec(f, 6), 64); + }; + fmt.prototype.fmt_e64 = function(v) { return this.$val.fmt_e64(v); }; + fmt.ptr.prototype.fmt_E64 = function(v) { + var f, v; + f = this; + f.formatFloat(v, 69, doPrec(f, 6), 64); + }; + fmt.prototype.fmt_E64 = function(v) { return this.$val.fmt_E64(v); }; + fmt.ptr.prototype.fmt_f64 = function(v) { + var f, v; + f = this; + f.formatFloat(v, 102, doPrec(f, 6), 64); + }; + fmt.prototype.fmt_f64 = function(v) { return this.$val.fmt_f64(v); }; + fmt.ptr.prototype.fmt_g64 = function(v) { + var f, v; + f = this; + f.formatFloat(v, 103, doPrec(f, -1), 64); + }; + fmt.prototype.fmt_g64 = function(v) { return this.$val.fmt_g64(v); }; + fmt.ptr.prototype.fmt_G64 = function(v) { + var f, v; + f = this; + f.formatFloat(v, 71, doPrec(f, -1), 64); + }; + fmt.prototype.fmt_G64 = function(v) { return this.$val.fmt_G64(v); }; + fmt.ptr.prototype.fmt_fb64 = function(v) { + var f, v; + f = this; + f.formatFloat(v, 98, 0, 64); + }; + fmt.prototype.fmt_fb64 = function(v) { return this.$val.fmt_fb64(v); }; + fmt.ptr.prototype.fmt_e32 = function(v) { + var f, v; + f = this; + f.formatFloat($coerceFloat32(v), 101, doPrec(f, 6), 32); + }; + fmt.prototype.fmt_e32 = function(v) { return this.$val.fmt_e32(v); }; + fmt.ptr.prototype.fmt_E32 = function(v) { + var f, v; + f = this; + f.formatFloat($coerceFloat32(v), 69, doPrec(f, 6), 32); + }; + fmt.prototype.fmt_E32 = function(v) { return this.$val.fmt_E32(v); }; + fmt.ptr.prototype.fmt_f32 = function(v) { + var f, v; + f = this; + f.formatFloat($coerceFloat32(v), 102, doPrec(f, 6), 32); + }; + fmt.prototype.fmt_f32 = function(v) { return this.$val.fmt_f32(v); }; + fmt.ptr.prototype.fmt_g32 = function(v) { + var f, v; + f = this; + f.formatFloat($coerceFloat32(v), 103, doPrec(f, -1), 32); + }; + fmt.prototype.fmt_g32 = function(v) { return this.$val.fmt_g32(v); }; + fmt.ptr.prototype.fmt_G32 = function(v) { + var f, v; + f = this; + f.formatFloat($coerceFloat32(v), 71, doPrec(f, -1), 32); + }; + fmt.prototype.fmt_G32 = function(v) { return this.$val.fmt_G32(v); }; + fmt.ptr.prototype.fmt_fb32 = function(v) { + var f, v; + f = this; + f.formatFloat($coerceFloat32(v), 98, 0, 32); + }; + fmt.prototype.fmt_fb32 = function(v) { return this.$val.fmt_fb32(v); }; + fmt.ptr.prototype.fmt_c64 = function(v, verb) { + var f, v, verb; + f = this; + f.fmt_complex($coerceFloat32(v.$real), $coerceFloat32(v.$imag), 32, verb); + }; + fmt.prototype.fmt_c64 = function(v, verb) { return this.$val.fmt_c64(v, verb); }; + fmt.ptr.prototype.fmt_c128 = function(v, verb) { + var f, v, verb; + f = this; + f.fmt_complex(v.$real, v.$imag, 64, verb); + }; + fmt.prototype.fmt_c128 = function(v, verb) { return this.$val.fmt_c128(v, verb); }; + fmt.ptr.prototype.fmt_complex = function(r, j, size, verb) { + var _ref, f, i, j, oldPlus, oldSpace, oldWid, r, size, verb; + f = this; + f.buf.WriteByte(40); + oldPlus = f.fmtFlags.plus; + oldSpace = f.fmtFlags.space; + oldWid = f.wid; + i = 0; + while (true) { + if (!(true)) { break; } + _ref = verb; + if (_ref === 98) { + f.formatFloat(r, 98, 0, size); + } else if (_ref === 101) { + f.formatFloat(r, 101, doPrec(f, 6), size); + } else if (_ref === 69) { + f.formatFloat(r, 69, doPrec(f, 6), size); + } else if (_ref === 102 || _ref === 70) { + f.formatFloat(r, 102, doPrec(f, 6), size); + } else if (_ref === 103) { + f.formatFloat(r, 103, doPrec(f, -1), size); + } else if (_ref === 71) { + f.formatFloat(r, 71, doPrec(f, -1), size); + } + if (!((i === 0))) { + break; + } + f.fmtFlags.plus = true; + f.fmtFlags.space = false; + f.wid = oldWid; + r = j; + i = i + (1) >> 0; + } + f.fmtFlags.space = oldSpace; + f.fmtFlags.plus = oldPlus; + f.wid = oldWid; + f.buf.Write(irparenBytes); + }; + fmt.prototype.fmt_complex = function(r, j, size, verb) { return this.$val.fmt_complex(r, j, size, verb); }; + $ptrType(buffer).prototype.Write = function(p) { + var _tmp, _tmp$1, b, err = $ifaceNil, n = 0, p; + b = this; + b.$set($appendSlice(b.$get(), p)); + _tmp = p.$length; _tmp$1 = $ifaceNil; n = _tmp; err = _tmp$1; + return [n, err]; + }; + $ptrType(buffer).prototype.WriteString = function(s) { + var _tmp, _tmp$1, b, err = $ifaceNil, n = 0, s; + b = this; + b.$set($appendSlice(b.$get(), new buffer($stringToBytes(s)))); + _tmp = s.length; _tmp$1 = $ifaceNil; n = _tmp; err = _tmp$1; + return [n, err]; + }; + $ptrType(buffer).prototype.WriteByte = function(c) { + var b, c; + b = this; + b.$set($append(b.$get(), c)); + return $ifaceNil; + }; + $ptrType(buffer).prototype.WriteRune = function(r) { + var b, bp, n, r, w, x; + bp = this; + if (r < 128) { + bp.$set($append(bp.$get(), (r << 24 >>> 24))); + return $ifaceNil; + } + b = bp.$get(); + n = b.$length; + while (true) { + if (!((n + 4 >> 0) > b.$capacity)) { break; } + b = $append(b, 0); + } + w = utf8.EncodeRune((x = $subslice(b, n, (n + 4 >> 0)), $subslice(new sliceType(x.$array), x.$offset, x.$offset + x.$length)), r); + bp.$set($subslice(b, 0, (n + w >> 0))); + return $ifaceNil; + }; + newPrinter = function() { + var p; + p = $assertType(ppFree.Get(), ptrType); + p.panicking = false; + p.erroring = false; + p.fmt.init(new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p)); + return p; + }; + pp.ptr.prototype.free = function() { + var p; + p = this; + if (p.buf.$capacity > 1024) { + return; + } + p.buf = $subslice(p.buf, 0, 0); + p.arg = $ifaceNil; + p.value = new reflect.Value.ptr(ptrType$2.nil, 0, 0); + ppFree.Put(p); + }; + pp.prototype.free = function() { return this.$val.free(); }; + pp.ptr.prototype.Width = function() { + var _tmp, _tmp$1, ok = false, p, wid = 0; + p = this; + _tmp = p.fmt.wid; _tmp$1 = p.fmt.fmtFlags.widPresent; wid = _tmp; ok = _tmp$1; + return [wid, ok]; + }; + pp.prototype.Width = function() { return this.$val.Width(); }; + pp.ptr.prototype.Precision = function() { + var _tmp, _tmp$1, ok = false, p, prec = 0; + p = this; + _tmp = p.fmt.prec; _tmp$1 = p.fmt.fmtFlags.precPresent; prec = _tmp; ok = _tmp$1; + return [prec, ok]; + }; + pp.prototype.Precision = function() { return this.$val.Precision(); }; + pp.ptr.prototype.Flag = function(b) { + var _ref, b, p; + p = this; + _ref = b; + if (_ref === 45) { + return p.fmt.fmtFlags.minus; + } else if (_ref === 43) { + return p.fmt.fmtFlags.plus; + } else if (_ref === 35) { + return p.fmt.fmtFlags.sharp; + } else if (_ref === 32) { + return p.fmt.fmtFlags.space; + } else if (_ref === 48) { + return p.fmt.fmtFlags.zero; + } + return false; + }; + pp.prototype.Flag = function(b) { return this.$val.Flag(b); }; + pp.ptr.prototype.add = function(c) { + var c, p; + p = this; + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteRune(c); + }; + pp.prototype.add = function(c) { return this.$val.add(c); }; + pp.ptr.prototype.Write = function(b) { + var _tuple, b, err = $ifaceNil, p, ret = 0; + p = this; + _tuple = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(b); ret = _tuple[0]; err = _tuple[1]; + return [ret, err]; + }; + pp.prototype.Write = function(b) { return this.$val.Write(b); }; + Fprintln = $pkg.Fprintln = function(w, a) { + var _tuple, a, err = $ifaceNil, n = 0, p, w, x; + p = newPrinter(); + p.doPrint(a, true, true); + _tuple = w.Write((x = p.buf, $subslice(new sliceType(x.$array), x.$offset, x.$offset + x.$length))); n = _tuple[0]; err = _tuple[1]; + p.free(); + return [n, err]; + }; + Println = $pkg.Println = function(a) { + var _tuple, a, err = $ifaceNil, n = 0; + _tuple = Fprintln(os.Stdout, a); n = _tuple[0]; err = _tuple[1]; + return [n, err]; + }; + getField = function(v, i) { + var i, v, val; + v = v; + val = v.Field(i); + if ((val.Kind() === 20) && !val.IsNil()) { + val = val.Elem(); + } + return val; + }; + pp.ptr.prototype.unknownType = function(v) { + var p, v; + p = this; + v = v; + if (!v.IsValid()) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(nilAngleBytes); + return; + } + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(63); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(v.Type().String()); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(63); + }; + pp.prototype.unknownType = function(v) { return this.$val.unknownType(v); }; + pp.ptr.prototype.badVerb = function(verb) { + var p, verb; + p = this; + p.erroring = true; + p.add(37); + p.add(33); + p.add(verb); + p.add(40); + if (!($interfaceIsEqual(p.arg, $ifaceNil))) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(reflect.TypeOf(p.arg).String()); + p.add(61); + p.printArg(p.arg, 118, 0); + } else if (p.value.IsValid()) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(p.value.Type().String()); + p.add(61); + p.printValue(p.value, 118, 0); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(nilAngleBytes); + } + p.add(41); + p.erroring = false; + }; + pp.prototype.badVerb = function(verb) { return this.$val.badVerb(verb); }; + pp.ptr.prototype.fmtBool = function(v, verb) { + var _ref, p, v, verb; + p = this; + _ref = verb; + if (_ref === 116 || _ref === 118) { + p.fmt.fmt_boolean(v); + } else { + p.badVerb(verb); + } + }; + pp.prototype.fmtBool = function(v, verb) { return this.$val.fmtBool(v, verb); }; + pp.ptr.prototype.fmtC = function(c) { + var c, p, r, w, x; + p = this; + r = ((c.$low + ((c.$high >> 31) * 4294967296)) >> 0); + if (!((x = new $Int64(0, r), (x.$high === c.$high && x.$low === c.$low)))) { + r = 65533; + } + w = utf8.EncodeRune($subslice(new sliceType(p.runeBuf), 0, 4), r); + p.fmt.pad($subslice(new sliceType(p.runeBuf), 0, w)); + }; + pp.prototype.fmtC = function(c) { return this.$val.fmtC(c); }; + pp.ptr.prototype.fmtInt64 = function(v, verb) { + var _ref, p, v, verb; + p = this; + _ref = verb; + if (_ref === 98) { + p.fmt.integer(v, new $Uint64(0, 2), true, "0123456789abcdef"); + } else if (_ref === 99) { + p.fmtC(v); + } else if (_ref === 100 || _ref === 118) { + p.fmt.integer(v, new $Uint64(0, 10), true, "0123456789abcdef"); + } else if (_ref === 111) { + p.fmt.integer(v, new $Uint64(0, 8), true, "0123456789abcdef"); + } else if (_ref === 113) { + if ((0 < v.$high || (0 === v.$high && 0 <= v.$low)) && (v.$high < 0 || (v.$high === 0 && v.$low <= 1114111))) { + p.fmt.fmt_qc(v); + } else { + p.badVerb(verb); + } + } else if (_ref === 120) { + p.fmt.integer(v, new $Uint64(0, 16), true, "0123456789abcdef"); + } else if (_ref === 85) { + p.fmtUnicode(v); + } else if (_ref === 88) { + p.fmt.integer(v, new $Uint64(0, 16), true, "0123456789ABCDEF"); + } else { + p.badVerb(verb); + } + }; + pp.prototype.fmtInt64 = function(v, verb) { return this.$val.fmtInt64(v, verb); }; + pp.ptr.prototype.fmt0x64 = function(v, leading0x) { + var leading0x, p, sharp, v; + p = this; + sharp = p.fmt.fmtFlags.sharp; + p.fmt.fmtFlags.sharp = leading0x; + p.fmt.integer(new $Int64(v.$high, v.$low), new $Uint64(0, 16), false, "0123456789abcdef"); + p.fmt.fmtFlags.sharp = sharp; + }; + pp.prototype.fmt0x64 = function(v, leading0x) { return this.$val.fmt0x64(v, leading0x); }; + pp.ptr.prototype.fmtUnicode = function(v) { + var p, prec, precPresent, sharp, v; + p = this; + precPresent = p.fmt.fmtFlags.precPresent; + sharp = p.fmt.fmtFlags.sharp; + p.fmt.fmtFlags.sharp = false; + prec = p.fmt.prec; + if (!precPresent) { + p.fmt.prec = 4; + p.fmt.fmtFlags.precPresent = true; + } + p.fmt.fmtFlags.unicode = true; + p.fmt.fmtFlags.uniQuote = sharp; + p.fmt.integer(v, new $Uint64(0, 16), false, "0123456789ABCDEF"); + p.fmt.fmtFlags.unicode = false; + p.fmt.fmtFlags.uniQuote = false; + p.fmt.prec = prec; + p.fmt.fmtFlags.precPresent = precPresent; + p.fmt.fmtFlags.sharp = sharp; + }; + pp.prototype.fmtUnicode = function(v) { return this.$val.fmtUnicode(v); }; + pp.ptr.prototype.fmtUint64 = function(v, verb) { + var _ref, p, v, verb; + p = this; + _ref = verb; + if (_ref === 98) { + p.fmt.integer(new $Int64(v.$high, v.$low), new $Uint64(0, 2), false, "0123456789abcdef"); + } else if (_ref === 99) { + p.fmtC(new $Int64(v.$high, v.$low)); + } else if (_ref === 100) { + p.fmt.integer(new $Int64(v.$high, v.$low), new $Uint64(0, 10), false, "0123456789abcdef"); + } else if (_ref === 118) { + if (p.fmt.fmtFlags.sharpV) { + p.fmt0x64(v, true); + } else { + p.fmt.integer(new $Int64(v.$high, v.$low), new $Uint64(0, 10), false, "0123456789abcdef"); + } + } else if (_ref === 111) { + p.fmt.integer(new $Int64(v.$high, v.$low), new $Uint64(0, 8), false, "0123456789abcdef"); + } else if (_ref === 113) { + if ((0 < v.$high || (0 === v.$high && 0 <= v.$low)) && (v.$high < 0 || (v.$high === 0 && v.$low <= 1114111))) { + p.fmt.fmt_qc(new $Int64(v.$high, v.$low)); + } else { + p.badVerb(verb); + } + } else if (_ref === 120) { + p.fmt.integer(new $Int64(v.$high, v.$low), new $Uint64(0, 16), false, "0123456789abcdef"); + } else if (_ref === 88) { + p.fmt.integer(new $Int64(v.$high, v.$low), new $Uint64(0, 16), false, "0123456789ABCDEF"); + } else if (_ref === 85) { + p.fmtUnicode(new $Int64(v.$high, v.$low)); + } else { + p.badVerb(verb); + } + }; + pp.prototype.fmtUint64 = function(v, verb) { return this.$val.fmtUint64(v, verb); }; + pp.ptr.prototype.fmtFloat32 = function(v, verb) { + var _ref, p, v, verb; + p = this; + _ref = verb; + if (_ref === 98) { + p.fmt.fmt_fb32(v); + } else if (_ref === 101) { + p.fmt.fmt_e32(v); + } else if (_ref === 69) { + p.fmt.fmt_E32(v); + } else if (_ref === 102 || _ref === 70) { + p.fmt.fmt_f32(v); + } else if (_ref === 103 || _ref === 118) { + p.fmt.fmt_g32(v); + } else if (_ref === 71) { + p.fmt.fmt_G32(v); + } else { + p.badVerb(verb); + } + }; + pp.prototype.fmtFloat32 = function(v, verb) { return this.$val.fmtFloat32(v, verb); }; + pp.ptr.prototype.fmtFloat64 = function(v, verb) { + var _ref, p, v, verb; + p = this; + _ref = verb; + if (_ref === 98) { + p.fmt.fmt_fb64(v); + } else if (_ref === 101) { + p.fmt.fmt_e64(v); + } else if (_ref === 69) { + p.fmt.fmt_E64(v); + } else if (_ref === 102 || _ref === 70) { + p.fmt.fmt_f64(v); + } else if (_ref === 103 || _ref === 118) { + p.fmt.fmt_g64(v); + } else if (_ref === 71) { + p.fmt.fmt_G64(v); + } else { + p.badVerb(verb); + } + }; + pp.prototype.fmtFloat64 = function(v, verb) { return this.$val.fmtFloat64(v, verb); }; + pp.ptr.prototype.fmtComplex64 = function(v, verb) { + var _ref, p, v, verb; + p = this; + _ref = verb; + if (_ref === 98 || _ref === 101 || _ref === 69 || _ref === 102 || _ref === 70 || _ref === 103 || _ref === 71) { + p.fmt.fmt_c64(v, verb); + } else if (_ref === 118) { + p.fmt.fmt_c64(v, 103); + } else { + p.badVerb(verb); + } + }; + pp.prototype.fmtComplex64 = function(v, verb) { return this.$val.fmtComplex64(v, verb); }; + pp.ptr.prototype.fmtComplex128 = function(v, verb) { + var _ref, p, v, verb; + p = this; + _ref = verb; + if (_ref === 98 || _ref === 101 || _ref === 69 || _ref === 102 || _ref === 70 || _ref === 103 || _ref === 71) { + p.fmt.fmt_c128(v, verb); + } else if (_ref === 118) { + p.fmt.fmt_c128(v, 103); + } else { + p.badVerb(verb); + } + }; + pp.prototype.fmtComplex128 = function(v, verb) { return this.$val.fmtComplex128(v, verb); }; + pp.ptr.prototype.fmtString = function(v, verb) { + var _ref, p, v, verb; + p = this; + _ref = verb; + if (_ref === 118) { + if (p.fmt.fmtFlags.sharpV) { + p.fmt.fmt_q(v); + } else { + p.fmt.fmt_s(v); + } + } else if (_ref === 115) { + p.fmt.fmt_s(v); + } else if (_ref === 120) { + p.fmt.fmt_sx(v, "0123456789abcdef"); + } else if (_ref === 88) { + p.fmt.fmt_sx(v, "0123456789ABCDEF"); + } else if (_ref === 113) { + p.fmt.fmt_q(v); + } else { + p.badVerb(verb); + } + }; + pp.prototype.fmtString = function(v, verb) { return this.$val.fmtString(v, verb); }; + pp.ptr.prototype.fmtBytes = function(v, verb, typ, depth) { + var _i, _ref, _ref$1, c, depth, i, p, typ, v, verb; + p = this; + if ((verb === 118) || (verb === 100)) { + if (p.fmt.fmtFlags.sharpV) { + if (v === sliceType.nil) { + if ($interfaceIsEqual(typ, $ifaceNil)) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString("[]byte(nil)"); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(typ.String()); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(nilParenBytes); + } + return; + } + if ($interfaceIsEqual(typ, $ifaceNil)) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(bytesBytes); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(typ.String()); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(123); + } + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(91); + } + _ref = v; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + c = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (i > 0) { + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(commaSpaceBytes); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(32); + } + } + p.printArg(new $Uint8(c), 118, depth + 1 >> 0); + _i++; + } + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(125); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(93); + } + return; + } + _ref$1 = verb; + if (_ref$1 === 115) { + p.fmt.fmt_s($bytesToString(v)); + } else if (_ref$1 === 120) { + p.fmt.fmt_bx(v, "0123456789abcdef"); + } else if (_ref$1 === 88) { + p.fmt.fmt_bx(v, "0123456789ABCDEF"); + } else if (_ref$1 === 113) { + p.fmt.fmt_q($bytesToString(v)); + } else { + p.badVerb(verb); + } + }; + pp.prototype.fmtBytes = function(v, verb, typ, depth) { return this.$val.fmtBytes(v, verb, typ, depth); }; + pp.ptr.prototype.fmtPointer = function(value, verb) { + var _ref, _ref$1, p, u, use0x64, value, verb; + p = this; + value = value; + use0x64 = true; + _ref = verb; + if (_ref === 112 || _ref === 118) { + } else if (_ref === 98 || _ref === 100 || _ref === 111 || _ref === 120 || _ref === 88) { + use0x64 = false; + } else { + p.badVerb(verb); + return; + } + u = 0; + _ref$1 = value.Kind(); + if (_ref$1 === 18 || _ref$1 === 19 || _ref$1 === 21 || _ref$1 === 22 || _ref$1 === 23 || _ref$1 === 26) { + u = value.Pointer(); + } else { + p.badVerb(verb); + return; + } + if (p.fmt.fmtFlags.sharpV) { + p.add(40); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(value.Type().String()); + p.add(41); + p.add(40); + if (u === 0) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(nilBytes); + } else { + p.fmt0x64(new $Uint64(0, u.constructor === Number ? u : 1), true); + } + p.add(41); + } else if ((verb === 118) && (u === 0)) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(nilAngleBytes); + } else { + if (use0x64) { + p.fmt0x64(new $Uint64(0, u.constructor === Number ? u : 1), !p.fmt.fmtFlags.sharp); + } else { + p.fmtUint64(new $Uint64(0, u.constructor === Number ? u : 1), verb); + } + } + }; + pp.prototype.fmtPointer = function(value, verb) { return this.$val.fmtPointer(value, verb); }; + pp.ptr.prototype.catchPanic = function(arg, verb) { + var arg, err, p, v, verb; + p = this; + err = $recover(); + if (!($interfaceIsEqual(err, $ifaceNil))) { + v = reflect.ValueOf(arg); + if ((v.Kind() === 22) && v.IsNil()) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(nilAngleBytes); + return; + } + if (p.panicking) { + $panic(err); + } + p.fmt.clearflags(); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(percentBangBytes); + p.add(verb); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(panicBytes); + p.panicking = true; + p.printArg(err, 118, 0); + p.panicking = false; + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(41); + } + }; + pp.prototype.catchPanic = function(arg, verb) { return this.$val.catchPanic(arg, verb); }; + pp.ptr.prototype.clearSpecialFlags = function() { + var p, plusV = false, sharpV = false; + p = this; + plusV = p.fmt.fmtFlags.plusV; + if (plusV) { + p.fmt.fmtFlags.plus = true; + p.fmt.fmtFlags.plusV = false; + } + sharpV = p.fmt.fmtFlags.sharpV; + if (sharpV) { + p.fmt.fmtFlags.sharp = true; + p.fmt.fmtFlags.sharpV = false; + } + return [plusV, sharpV]; + }; + pp.prototype.clearSpecialFlags = function() { return this.$val.clearSpecialFlags(); }; + pp.ptr.prototype.restoreSpecialFlags = function(plusV, sharpV) { + var p, plusV, sharpV; + p = this; + if (plusV) { + p.fmt.fmtFlags.plus = false; + p.fmt.fmtFlags.plusV = true; + } + if (sharpV) { + p.fmt.fmtFlags.sharp = false; + p.fmt.fmtFlags.sharpV = true; + } + }; + pp.prototype.restoreSpecialFlags = function(plusV, sharpV) { return this.$val.restoreSpecialFlags(plusV, sharpV); }; + pp.ptr.prototype.handleMethods = function(verb, depth) { + var $deferred = [], $err = null, _ref, _ref$1, _tuple, _tuple$1, _tuple$2, depth, formatter, handled = false, ok, ok$1, p, stringer, v, verb; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.erroring) { + return handled; + } + _tuple = $assertType(p.arg, Formatter, true); formatter = _tuple[0]; ok = _tuple[1]; + if (ok) { + handled = true; + _tuple$1 = p.clearSpecialFlags(); + $deferred.push([$methodVal(p, "restoreSpecialFlags"), [_tuple$1[0], _tuple$1[1]]]); + $deferred.push([$methodVal(p, "catchPanic"), [p.arg, verb]]); + formatter.Format(p, verb); + return handled; + } + if (p.fmt.fmtFlags.sharpV) { + _tuple$2 = $assertType(p.arg, GoStringer, true); stringer = _tuple$2[0]; ok$1 = _tuple$2[1]; + if (ok$1) { + handled = true; + $deferred.push([$methodVal(p, "catchPanic"), [p.arg, verb]]); + p.fmt.fmt_s(stringer.GoString()); + return handled; + } + } else { + _ref = verb; + if (_ref === 118 || _ref === 115 || _ref === 120 || _ref === 88 || _ref === 113) { + _ref$1 = p.arg; + if ($assertType(_ref$1, $error, true)[1]) { + v = _ref$1; + handled = true; + $deferred.push([$methodVal(p, "catchPanic"), [p.arg, verb]]); + p.printArg(new $String(v.Error()), verb, depth); + return handled; + } else if ($assertType(_ref$1, Stringer, true)[1]) { + v = _ref$1; + handled = true; + $deferred.push([$methodVal(p, "catchPanic"), [p.arg, verb]]); + p.printArg(new $String(v.String()), verb, depth); + return handled; + } + } + } + handled = false; + return handled; + /* */ } catch(err) { $err = err; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); return handled; } + }; + pp.prototype.handleMethods = function(verb, depth) { return this.$val.handleMethods(verb, depth); }; + pp.ptr.prototype.printArg = function(arg, verb, depth) { + var _ref, _ref$1, arg, depth, f, handled, p, verb, wasString = false; + p = this; + p.arg = arg; + p.value = new reflect.Value.ptr(ptrType$2.nil, 0, 0); + if ($interfaceIsEqual(arg, $ifaceNil)) { + if ((verb === 84) || (verb === 118)) { + p.fmt.pad(nilAngleBytes); + } else { + p.badVerb(verb); + } + wasString = false; + return wasString; + } + _ref = verb; + if (_ref === 84) { + p.printArg(new $String(reflect.TypeOf(arg).String()), 115, 0); + wasString = false; + return wasString; + } else if (_ref === 112) { + p.fmtPointer(reflect.ValueOf(arg), verb); + wasString = false; + return wasString; + } + _ref$1 = arg; + if ($assertType(_ref$1, $Bool, true)[1]) { + f = _ref$1.$val; + p.fmtBool(f, verb); + } else if ($assertType(_ref$1, $Float32, true)[1]) { + f = _ref$1.$val; + p.fmtFloat32(f, verb); + } else if ($assertType(_ref$1, $Float64, true)[1]) { + f = _ref$1.$val; + p.fmtFloat64(f, verb); + } else if ($assertType(_ref$1, $Complex64, true)[1]) { + f = _ref$1.$val; + p.fmtComplex64(f, verb); + } else if ($assertType(_ref$1, $Complex128, true)[1]) { + f = _ref$1.$val; + p.fmtComplex128(f, verb); + } else if ($assertType(_ref$1, $Int, true)[1]) { + f = _ref$1.$val; + p.fmtInt64(new $Int64(0, f), verb); + } else if ($assertType(_ref$1, $Int8, true)[1]) { + f = _ref$1.$val; + p.fmtInt64(new $Int64(0, f), verb); + } else if ($assertType(_ref$1, $Int16, true)[1]) { + f = _ref$1.$val; + p.fmtInt64(new $Int64(0, f), verb); + } else if ($assertType(_ref$1, $Int32, true)[1]) { + f = _ref$1.$val; + p.fmtInt64(new $Int64(0, f), verb); + } else if ($assertType(_ref$1, $Int64, true)[1]) { + f = _ref$1.$val; + p.fmtInt64(f, verb); + } else if ($assertType(_ref$1, $Uint, true)[1]) { + f = _ref$1.$val; + p.fmtUint64(new $Uint64(0, f), verb); + } else if ($assertType(_ref$1, $Uint8, true)[1]) { + f = _ref$1.$val; + p.fmtUint64(new $Uint64(0, f), verb); + } else if ($assertType(_ref$1, $Uint16, true)[1]) { + f = _ref$1.$val; + p.fmtUint64(new $Uint64(0, f), verb); + } else if ($assertType(_ref$1, $Uint32, true)[1]) { + f = _ref$1.$val; + p.fmtUint64(new $Uint64(0, f), verb); + } else if ($assertType(_ref$1, $Uint64, true)[1]) { + f = _ref$1.$val; + p.fmtUint64(f, verb); + } else if ($assertType(_ref$1, $Uintptr, true)[1]) { + f = _ref$1.$val; + p.fmtUint64(new $Uint64(0, f.constructor === Number ? f : 1), verb); + } else if ($assertType(_ref$1, $String, true)[1]) { + f = _ref$1.$val; + p.fmtString(f, verb); + wasString = (verb === 115) || (verb === 118); + } else if ($assertType(_ref$1, sliceType, true)[1]) { + f = _ref$1.$val; + p.fmtBytes(f, verb, $ifaceNil, depth); + wasString = verb === 115; + } else { + f = _ref$1; + handled = p.handleMethods(verb, depth); + if (handled) { + wasString = false; + return wasString; + } + wasString = p.printReflectValue(reflect.ValueOf(arg), verb, depth); + return wasString; + } + p.arg = $ifaceNil; + return wasString; + }; + pp.prototype.printArg = function(arg, verb, depth) { return this.$val.printArg(arg, verb, depth); }; + pp.ptr.prototype.printValue = function(value, verb, depth) { + var _ref, depth, handled, p, value, verb, wasString = false; + p = this; + value = value; + if (!value.IsValid()) { + if ((verb === 84) || (verb === 118)) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(nilAngleBytes); + } else { + p.badVerb(verb); + } + wasString = false; + return wasString; + } + _ref = verb; + if (_ref === 84) { + p.printArg(new $String(value.Type().String()), 115, 0); + wasString = false; + return wasString; + } else if (_ref === 112) { + p.fmtPointer(value, verb); + wasString = false; + return wasString; + } + p.arg = $ifaceNil; + if (value.CanInterface()) { + p.arg = value.Interface(); + } + handled = p.handleMethods(verb, depth); + if (handled) { + wasString = false; + return wasString; + } + wasString = p.printReflectValue(value, verb, depth); + return wasString; + }; + pp.prototype.printValue = function(value, verb, depth) { return this.$val.printValue(value, verb, depth); }; + pp.ptr.prototype.printReflectValue = function(value, verb, depth) { + var _i, _i$1, _ref, _ref$1, _ref$2, _ref$3, a, bytes, depth, f, f$1, i, i$1, i$2, i$3, key, keys, oldValue, p, t, typ, v, v$1, value, value$1, verb, wasString = false, x; + p = this; + value = value; + oldValue = p.value; + p.value = value; + f = value; + _ref = f.Kind(); + BigSwitch: + switch (0) { default: if (_ref === 1) { + p.fmtBool(f.Bool(), verb); + } else if (_ref === 2 || _ref === 3 || _ref === 4 || _ref === 5 || _ref === 6) { + p.fmtInt64(f.Int(), verb); + } else if (_ref === 7 || _ref === 8 || _ref === 9 || _ref === 10 || _ref === 11 || _ref === 12) { + p.fmtUint64(f.Uint(), verb); + } else if (_ref === 13 || _ref === 14) { + if (f.Type().Size() === 4) { + p.fmtFloat32(f.Float(), verb); + } else { + p.fmtFloat64(f.Float(), verb); + } + } else if (_ref === 15 || _ref === 16) { + if (f.Type().Size() === 8) { + p.fmtComplex64((x = f.Complex(), new $Complex64(x.$real, x.$imag)), verb); + } else { + p.fmtComplex128(f.Complex(), verb); + } + } else if (_ref === 24) { + p.fmtString(f.String(), verb); + } else if (_ref === 21) { + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(f.Type().String()); + if (f.IsNil()) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString("(nil)"); + break; + } + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(123); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(mapBytes); + } + keys = f.MapKeys(); + _ref$1 = keys; + _i = 0; + while (true) { + if (!(_i < _ref$1.$length)) { break; } + i = _i; + key = ((_i < 0 || _i >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i]); + if (i > 0) { + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(commaSpaceBytes); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(32); + } + } + p.printValue(key, verb, depth + 1 >> 0); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(58); + p.printValue(f.MapIndex(key), verb, depth + 1 >> 0); + _i++; + } + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(125); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(93); + } + } else if (_ref === 25) { + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(value.Type().String()); + } + p.add(123); + v = f; + t = v.Type(); + i$1 = 0; + while (true) { + if (!(i$1 < v.NumField())) { break; } + if (i$1 > 0) { + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(commaSpaceBytes); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(32); + } + } + if (p.fmt.fmtFlags.plusV || p.fmt.fmtFlags.sharpV) { + f$1 = $clone(t.Field(i$1), reflect.StructField); + if (!(f$1.Name === "")) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(f$1.Name); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(58); + } + } + p.printValue(getField(v, i$1), verb, depth + 1 >> 0); + i$1 = i$1 + (1) >> 0; + } + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(125); + } else if (_ref === 20) { + value$1 = f.Elem(); + if (!value$1.IsValid()) { + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(f.Type().String()); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(nilParenBytes); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(nilAngleBytes); + } + } else { + wasString = p.printValue(value$1, verb, depth + 1 >> 0); + } + } else if (_ref === 17 || _ref === 23) { + typ = f.Type(); + if ((typ.Elem().Kind() === 8) && ($interfaceIsEqual(typ.Elem(), byteType) || (verb === 115) || (verb === 113) || (verb === 120))) { + bytes = sliceType.nil; + if (f.Kind() === 23) { + bytes = f.Bytes(); + } else if (f.CanAddr()) { + bytes = f.Slice(0, f.Len()).Bytes(); + } else { + bytes = $makeSlice(sliceType, f.Len()); + _ref$2 = bytes; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$2.$length)) { break; } + i$2 = _i$1; + (i$2 < 0 || i$2 >= bytes.$length) ? $throwRuntimeError("index out of range") : bytes.$array[bytes.$offset + i$2] = (f.Index(i$2).Uint().$low << 24 >>> 24); + _i$1++; + } + } + p.fmtBytes(bytes, verb, typ, depth); + wasString = verb === 115; + break; + } + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(value.Type().String()); + if ((f.Kind() === 23) && f.IsNil()) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString("(nil)"); + break; + } + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(123); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(91); + } + i$3 = 0; + while (true) { + if (!(i$3 < f.Len())) { break; } + if (i$3 > 0) { + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(commaSpaceBytes); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(32); + } + } + p.printValue(f.Index(i$3), verb, depth + 1 >> 0); + i$3 = i$3 + (1) >> 0; + } + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(125); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(93); + } + } else if (_ref === 22) { + v$1 = f.Pointer(); + if (!((v$1 === 0)) && (depth === 0)) { + a = f.Elem(); + _ref$3 = a.Kind(); + if (_ref$3 === 17 || _ref$3 === 23) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(38); + p.printValue(a, verb, depth + 1 >> 0); + break BigSwitch; + } else if (_ref$3 === 25) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(38); + p.printValue(a, verb, depth + 1 >> 0); + break BigSwitch; + } else if (_ref$3 === 21) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(38); + p.printValue(a, verb, depth + 1 >> 0); + break BigSwitch; + } + } + p.fmtPointer(value, verb); + } else if (_ref === 18 || _ref === 19 || _ref === 26) { + p.fmtPointer(value, verb); + } else { + p.unknownType(f); + } } + p.value = oldValue; + wasString = wasString; + return wasString; + }; + pp.prototype.printReflectValue = function(value, verb, depth) { return this.$val.printReflectValue(value, verb, depth); }; + pp.ptr.prototype.doPrint = function(a, addspace, addnewline) { + var a, addnewline, addspace, arg, argNum, isString, p, prevString; + p = this; + prevString = false; + argNum = 0; + while (true) { + if (!(argNum < a.$length)) { break; } + p.fmt.clearflags(); + arg = ((argNum < 0 || argNum >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + argNum]); + if (argNum > 0) { + isString = !($interfaceIsEqual(arg, $ifaceNil)) && (reflect.TypeOf(arg).Kind() === 24); + if (addspace || !isString && !prevString) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(32); + } + } + prevString = p.printArg(arg, 118, 0); + argNum = argNum + (1) >> 0; + } + if (addnewline) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(10); + } + }; + pp.prototype.doPrint = function(a, addspace, addnewline) { return this.$val.doPrint(a, addspace, addnewline); }; + ss.ptr.prototype.Read = function(buf) { + var _tmp, _tmp$1, buf, err = $ifaceNil, n = 0, s; + s = this; + _tmp = 0; _tmp$1 = errors.New("ScanState's Read should not be called. Use ReadRune"); n = _tmp; err = _tmp$1; + return [n, err]; + }; + ss.prototype.Read = function(buf) { return this.$val.Read(buf); }; + ss.ptr.prototype.ReadRune = function() { + var _tuple, err = $ifaceNil, r = 0, s, size = 0; + s = this; + if (s.peekRune >= 0) { + s.count = s.count + (1) >> 0; + r = s.peekRune; + size = utf8.RuneLen(r); + s.prevRune = r; + s.peekRune = -1; + return [r, size, err]; + } + if (s.atEOF || s.ssave.nlIsEnd && (s.prevRune === 10) || s.count >= s.ssave.argLimit) { + err = io.EOF; + return [r, size, err]; + } + _tuple = s.rr.ReadRune(); r = _tuple[0]; size = _tuple[1]; err = _tuple[2]; + if ($interfaceIsEqual(err, $ifaceNil)) { + s.count = s.count + (1) >> 0; + s.prevRune = r; + } else if ($interfaceIsEqual(err, io.EOF)) { + s.atEOF = true; + } + return [r, size, err]; + }; + ss.prototype.ReadRune = function() { return this.$val.ReadRune(); }; + ss.ptr.prototype.Width = function() { + var _tmp, _tmp$1, _tmp$2, _tmp$3, ok = false, s, wid = 0; + s = this; + if (s.ssave.maxWid === 1073741824) { + _tmp = 0; _tmp$1 = false; wid = _tmp; ok = _tmp$1; + return [wid, ok]; + } + _tmp$2 = s.ssave.maxWid; _tmp$3 = true; wid = _tmp$2; ok = _tmp$3; + return [wid, ok]; + }; + ss.prototype.Width = function() { return this.$val.Width(); }; + ss.ptr.prototype.getRune = function() { + var _tuple, err, r = 0, s; + s = this; + _tuple = s.ReadRune(); r = _tuple[0]; err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + if ($interfaceIsEqual(err, io.EOF)) { + r = -1; + return r; + } + s.error(err); + } + return r; + }; + ss.prototype.getRune = function() { return this.$val.getRune(); }; + ss.ptr.prototype.UnreadRune = function() { + var _tuple, ok, s, u; + s = this; + _tuple = $assertType(s.rr, runeUnreader, true); u = _tuple[0]; ok = _tuple[1]; + if (ok) { + u.UnreadRune(); + } else { + s.peekRune = s.prevRune; + } + s.prevRune = -1; + s.count = s.count - (1) >> 0; + return $ifaceNil; + }; + ss.prototype.UnreadRune = function() { return this.$val.UnreadRune(); }; + ss.ptr.prototype.error = function(err) { + var err, s, x; + s = this; + $panic((x = new scanError.ptr(err), new x.constructor.elem(x))); + }; + ss.prototype.error = function(err) { return this.$val.error(err); }; + ss.ptr.prototype.errorString = function(err) { + var err, s, x; + s = this; + $panic((x = new scanError.ptr(errors.New(err)), new x.constructor.elem(x))); + }; + ss.prototype.errorString = function(err) { return this.$val.errorString(err); }; + ss.ptr.prototype.Token = function(skipSpace, f) { + var $deferred = [], $err = null, err = $ifaceNil, f, s, skipSpace, tok = sliceType.nil; + /* */ try { $deferFrames.push($deferred); + s = this; + $deferred.push([(function() { + var _tuple, e, ok, se; + e = $recover(); + if (!($interfaceIsEqual(e, $ifaceNil))) { + _tuple = $assertType(e, scanError, true); se = $clone(_tuple[0], scanError); ok = _tuple[1]; + if (ok) { + err = se.err; + } else { + $panic(e); + } + } + }), []]); + if (f === $throwNilPointerError) { + f = notSpace; + } + s.buf = $subslice(s.buf, 0, 0); + tok = s.token(skipSpace, f); + return [tok, err]; + /* */ } catch(err) { $err = err; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); return [tok, err]; } + }; + ss.prototype.Token = function(skipSpace, f) { return this.$val.Token(skipSpace, f); }; + isSpace = function(r) { + var _i, _ref, r, rng, rx; + if (r >= 65536) { + return false; + } + rx = (r << 16 >>> 16); + _ref = space; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + rng = $clone(((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]), arrayType); + if (rx < rng[0]) { + return false; + } + if (rx <= rng[1]) { + return true; + } + _i++; + } + return false; + }; + notSpace = function(r) { + var r; + return !isSpace(r); + }; + ss.ptr.prototype.SkipSpace = function() { + var s; + s = this; + s.skipSpace(false); + }; + ss.prototype.SkipSpace = function() { return this.$val.SkipSpace(); }; + ss.ptr.prototype.free = function(old) { + var old, s; + s = this; + old = $clone(old, ssave); + if (old.validSave) { + $copy(s.ssave, old, ssave); + return; + } + if (s.buf.$capacity > 1024) { + return; + } + s.buf = $subslice(s.buf, 0, 0); + s.rr = $ifaceNil; + ssFree.Put(s); + }; + ss.prototype.free = function(old) { return this.$val.free(old); }; + ss.ptr.prototype.skipSpace = function(stopAtNewline) { + var r, s, stopAtNewline; + s = this; + while (true) { + if (!(true)) { break; } + r = s.getRune(); + if (r === -1) { + return; + } + if ((r === 13) && s.peek("\n")) { + continue; + } + if (r === 10) { + if (stopAtNewline) { + break; + } + if (s.ssave.nlIsSpace) { + continue; + } + s.errorString("unexpected newline"); + return; + } + if (!isSpace(r)) { + s.UnreadRune(); + break; + } + } + }; + ss.prototype.skipSpace = function(stopAtNewline) { return this.$val.skipSpace(stopAtNewline); }; + ss.ptr.prototype.token = function(skipSpace, f) { + var f, r, s, skipSpace, x; + s = this; + if (skipSpace) { + s.skipSpace(false); + } + while (true) { + if (!(true)) { break; } + r = s.getRune(); + if (r === -1) { + break; + } + if (!f(r)) { + s.UnreadRune(); + break; + } + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, s).WriteRune(r); + } + return (x = s.buf, $subslice(new sliceType(x.$array), x.$offset, x.$offset + x.$length)); + }; + ss.prototype.token = function(skipSpace, f) { return this.$val.token(skipSpace, f); }; + indexRune = function(s, r) { + var _i, _ref, _rune, c, i, r, s; + _ref = s; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + i = _i; + c = _rune[0]; + if (c === r) { + return i; + } + _i += _rune[1]; + } + return -1; + }; + ss.ptr.prototype.peek = function(ok) { + var ok, r, s; + s = this; + r = s.getRune(); + if (!((r === -1))) { + s.UnreadRune(); + } + return indexRune(ok, r) >= 0; + }; + ss.prototype.peek = function(ok) { return this.$val.peek(ok); }; + ptrType$25.methods = [{prop: "clearflags", name: "clearflags", pkg: "fmt", typ: $funcType([], [], false)}, {prop: "init", name: "init", pkg: "fmt", typ: $funcType([ptrType$1], [], false)}, {prop: "computePadding", name: "computePadding", pkg: "fmt", typ: $funcType([$Int], [sliceType, $Int, $Int], false)}, {prop: "writePadding", name: "writePadding", pkg: "fmt", typ: $funcType([$Int, sliceType], [], false)}, {prop: "pad", name: "pad", pkg: "fmt", typ: $funcType([sliceType], [], false)}, {prop: "padString", name: "padString", pkg: "fmt", typ: $funcType([$String], [], false)}, {prop: "fmt_boolean", name: "fmt_boolean", pkg: "fmt", typ: $funcType([$Bool], [], false)}, {prop: "integer", name: "integer", pkg: "fmt", typ: $funcType([$Int64, $Uint64, $Bool, $String], [], false)}, {prop: "truncate", name: "truncate", pkg: "fmt", typ: $funcType([$String], [$String], false)}, {prop: "fmt_s", name: "fmt_s", pkg: "fmt", typ: $funcType([$String], [], false)}, {prop: "fmt_sbx", name: "fmt_sbx", pkg: "fmt", typ: $funcType([$String, sliceType, $String], [], false)}, {prop: "fmt_sx", name: "fmt_sx", pkg: "fmt", typ: $funcType([$String, $String], [], false)}, {prop: "fmt_bx", name: "fmt_bx", pkg: "fmt", typ: $funcType([sliceType, $String], [], false)}, {prop: "fmt_q", name: "fmt_q", pkg: "fmt", typ: $funcType([$String], [], false)}, {prop: "fmt_qc", name: "fmt_qc", pkg: "fmt", typ: $funcType([$Int64], [], false)}, {prop: "formatFloat", name: "formatFloat", pkg: "fmt", typ: $funcType([$Float64, $Uint8, $Int, $Int], [], false)}, {prop: "fmt_e64", name: "fmt_e64", pkg: "fmt", typ: $funcType([$Float64], [], false)}, {prop: "fmt_E64", name: "fmt_E64", pkg: "fmt", typ: $funcType([$Float64], [], false)}, {prop: "fmt_f64", name: "fmt_f64", pkg: "fmt", typ: $funcType([$Float64], [], false)}, {prop: "fmt_g64", name: "fmt_g64", pkg: "fmt", typ: $funcType([$Float64], [], false)}, {prop: "fmt_G64", name: "fmt_G64", pkg: "fmt", typ: $funcType([$Float64], [], false)}, {prop: "fmt_fb64", name: "fmt_fb64", pkg: "fmt", typ: $funcType([$Float64], [], false)}, {prop: "fmt_e32", name: "fmt_e32", pkg: "fmt", typ: $funcType([$Float32], [], false)}, {prop: "fmt_E32", name: "fmt_E32", pkg: "fmt", typ: $funcType([$Float32], [], false)}, {prop: "fmt_f32", name: "fmt_f32", pkg: "fmt", typ: $funcType([$Float32], [], false)}, {prop: "fmt_g32", name: "fmt_g32", pkg: "fmt", typ: $funcType([$Float32], [], false)}, {prop: "fmt_G32", name: "fmt_G32", pkg: "fmt", typ: $funcType([$Float32], [], false)}, {prop: "fmt_fb32", name: "fmt_fb32", pkg: "fmt", typ: $funcType([$Float32], [], false)}, {prop: "fmt_c64", name: "fmt_c64", pkg: "fmt", typ: $funcType([$Complex64, $Int32], [], false)}, {prop: "fmt_c128", name: "fmt_c128", pkg: "fmt", typ: $funcType([$Complex128, $Int32], [], false)}, {prop: "fmt_complex", name: "fmt_complex", pkg: "fmt", typ: $funcType([$Float64, $Float64, $Int, $Int32], [], false)}]; + ptrType$1.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}, {prop: "WriteByte", name: "WriteByte", pkg: "", typ: $funcType([$Uint8], [$error], false)}, {prop: "WriteRune", name: "WriteRune", pkg: "", typ: $funcType([$Int32], [$error], false)}]; + ptrType.methods = [{prop: "free", name: "free", pkg: "fmt", typ: $funcType([], [], false)}, {prop: "Width", name: "Width", pkg: "", typ: $funcType([], [$Int, $Bool], false)}, {prop: "Precision", name: "Precision", pkg: "", typ: $funcType([], [$Int, $Bool], false)}, {prop: "Flag", name: "Flag", pkg: "", typ: $funcType([$Int], [$Bool], false)}, {prop: "add", name: "add", pkg: "fmt", typ: $funcType([$Int32], [], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "unknownType", name: "unknownType", pkg: "fmt", typ: $funcType([reflect.Value], [], false)}, {prop: "badVerb", name: "badVerb", pkg: "fmt", typ: $funcType([$Int32], [], false)}, {prop: "fmtBool", name: "fmtBool", pkg: "fmt", typ: $funcType([$Bool, $Int32], [], false)}, {prop: "fmtC", name: "fmtC", pkg: "fmt", typ: $funcType([$Int64], [], false)}, {prop: "fmtInt64", name: "fmtInt64", pkg: "fmt", typ: $funcType([$Int64, $Int32], [], false)}, {prop: "fmt0x64", name: "fmt0x64", pkg: "fmt", typ: $funcType([$Uint64, $Bool], [], false)}, {prop: "fmtUnicode", name: "fmtUnicode", pkg: "fmt", typ: $funcType([$Int64], [], false)}, {prop: "fmtUint64", name: "fmtUint64", pkg: "fmt", typ: $funcType([$Uint64, $Int32], [], false)}, {prop: "fmtFloat32", name: "fmtFloat32", pkg: "fmt", typ: $funcType([$Float32, $Int32], [], false)}, {prop: "fmtFloat64", name: "fmtFloat64", pkg: "fmt", typ: $funcType([$Float64, $Int32], [], false)}, {prop: "fmtComplex64", name: "fmtComplex64", pkg: "fmt", typ: $funcType([$Complex64, $Int32], [], false)}, {prop: "fmtComplex128", name: "fmtComplex128", pkg: "fmt", typ: $funcType([$Complex128, $Int32], [], false)}, {prop: "fmtString", name: "fmtString", pkg: "fmt", typ: $funcType([$String, $Int32], [], false)}, {prop: "fmtBytes", name: "fmtBytes", pkg: "fmt", typ: $funcType([sliceType, $Int32, reflect.Type, $Int], [], false)}, {prop: "fmtPointer", name: "fmtPointer", pkg: "fmt", typ: $funcType([reflect.Value, $Int32], [], false)}, {prop: "catchPanic", name: "catchPanic", pkg: "fmt", typ: $funcType([$emptyInterface, $Int32], [], false)}, {prop: "clearSpecialFlags", name: "clearSpecialFlags", pkg: "fmt", typ: $funcType([], [$Bool, $Bool], false)}, {prop: "restoreSpecialFlags", name: "restoreSpecialFlags", pkg: "fmt", typ: $funcType([$Bool, $Bool], [], false)}, {prop: "handleMethods", name: "handleMethods", pkg: "fmt", typ: $funcType([$Int32, $Int], [$Bool], false)}, {prop: "printArg", name: "printArg", pkg: "fmt", typ: $funcType([$emptyInterface, $Int32, $Int], [$Bool], false)}, {prop: "printValue", name: "printValue", pkg: "fmt", typ: $funcType([reflect.Value, $Int32, $Int], [$Bool], false)}, {prop: "printReflectValue", name: "printReflectValue", pkg: "fmt", typ: $funcType([reflect.Value, $Int32, $Int], [$Bool], false)}, {prop: "argNumber", name: "argNumber", pkg: "fmt", typ: $funcType([$Int, $String, $Int, $Int], [$Int, $Int, $Bool], false)}, {prop: "doPrintf", name: "doPrintf", pkg: "fmt", typ: $funcType([$String, sliceType$1], [], false)}, {prop: "doPrint", name: "doPrint", pkg: "fmt", typ: $funcType([sliceType$1, $Bool, $Bool], [], false)}]; + ptrType$5.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "ReadRune", name: "ReadRune", pkg: "", typ: $funcType([], [$Int32, $Int, $error], false)}, {prop: "Width", name: "Width", pkg: "", typ: $funcType([], [$Int, $Bool], false)}, {prop: "getRune", name: "getRune", pkg: "fmt", typ: $funcType([], [$Int32], false)}, {prop: "mustReadRune", name: "mustReadRune", pkg: "fmt", typ: $funcType([], [$Int32], false)}, {prop: "UnreadRune", name: "UnreadRune", pkg: "", typ: $funcType([], [$error], false)}, {prop: "error", name: "error", pkg: "fmt", typ: $funcType([$error], [], false)}, {prop: "errorString", name: "errorString", pkg: "fmt", typ: $funcType([$String], [], false)}, {prop: "Token", name: "Token", pkg: "", typ: $funcType([$Bool, funcType], [sliceType, $error], false)}, {prop: "SkipSpace", name: "SkipSpace", pkg: "", typ: $funcType([], [], false)}, {prop: "free", name: "free", pkg: "fmt", typ: $funcType([ssave], [], false)}, {prop: "skipSpace", name: "skipSpace", pkg: "fmt", typ: $funcType([$Bool], [], false)}, {prop: "token", name: "token", pkg: "fmt", typ: $funcType([$Bool, funcType], [sliceType], false)}, {prop: "consume", name: "consume", pkg: "fmt", typ: $funcType([$String, $Bool], [$Bool], false)}, {prop: "peek", name: "peek", pkg: "fmt", typ: $funcType([$String], [$Bool], false)}, {prop: "notEOF", name: "notEOF", pkg: "fmt", typ: $funcType([], [], false)}, {prop: "accept", name: "accept", pkg: "fmt", typ: $funcType([$String], [$Bool], false)}, {prop: "okVerb", name: "okVerb", pkg: "fmt", typ: $funcType([$Int32, $String, $String], [$Bool], false)}, {prop: "scanBool", name: "scanBool", pkg: "fmt", typ: $funcType([$Int32], [$Bool], false)}, {prop: "getBase", name: "getBase", pkg: "fmt", typ: $funcType([$Int32], [$Int, $String], false)}, {prop: "scanNumber", name: "scanNumber", pkg: "fmt", typ: $funcType([$String, $Bool], [$String], false)}, {prop: "scanRune", name: "scanRune", pkg: "fmt", typ: $funcType([$Int], [$Int64], false)}, {prop: "scanBasePrefix", name: "scanBasePrefix", pkg: "fmt", typ: $funcType([], [$Int, $String, $Bool], false)}, {prop: "scanInt", name: "scanInt", pkg: "fmt", typ: $funcType([$Int32, $Int], [$Int64], false)}, {prop: "scanUint", name: "scanUint", pkg: "fmt", typ: $funcType([$Int32, $Int], [$Uint64], false)}, {prop: "floatToken", name: "floatToken", pkg: "fmt", typ: $funcType([], [$String], false)}, {prop: "complexTokens", name: "complexTokens", pkg: "fmt", typ: $funcType([], [$String, $String], false)}, {prop: "convertFloat", name: "convertFloat", pkg: "fmt", typ: $funcType([$String, $Int], [$Float64], false)}, {prop: "scanComplex", name: "scanComplex", pkg: "fmt", typ: $funcType([$Int32, $Int], [$Complex128], false)}, {prop: "convertString", name: "convertString", pkg: "fmt", typ: $funcType([$Int32], [$String], false)}, {prop: "quotedString", name: "quotedString", pkg: "fmt", typ: $funcType([], [$String], false)}, {prop: "hexDigit", name: "hexDigit", pkg: "fmt", typ: $funcType([$Int32], [$Int], false)}, {prop: "hexByte", name: "hexByte", pkg: "fmt", typ: $funcType([], [$Uint8, $Bool], false)}, {prop: "hexString", name: "hexString", pkg: "fmt", typ: $funcType([], [$String], false)}, {prop: "scanOne", name: "scanOne", pkg: "fmt", typ: $funcType([$Int32, $emptyInterface], [], false)}, {prop: "doScan", name: "doScan", pkg: "fmt", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "advance", name: "advance", pkg: "fmt", typ: $funcType([$String], [$Int], false)}, {prop: "doScanf", name: "doScanf", pkg: "fmt", typ: $funcType([$String, sliceType$1], [$Int, $error], false)}]; + fmtFlags.init([{prop: "widPresent", name: "widPresent", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "precPresent", name: "precPresent", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "minus", name: "minus", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "plus", name: "plus", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "sharp", name: "sharp", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "space", name: "space", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "unicode", name: "unicode", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "uniQuote", name: "uniQuote", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "zero", name: "zero", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "plusV", name: "plusV", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "sharpV", name: "sharpV", pkg: "fmt", typ: $Bool, tag: ""}]); + fmt.init([{prop: "intbuf", name: "intbuf", pkg: "fmt", typ: arrayType$2, tag: ""}, {prop: "buf", name: "buf", pkg: "fmt", typ: ptrType$1, tag: ""}, {prop: "wid", name: "wid", pkg: "fmt", typ: $Int, tag: ""}, {prop: "prec", name: "prec", pkg: "fmt", typ: $Int, tag: ""}, {prop: "fmtFlags", name: "", pkg: "fmt", typ: fmtFlags, tag: ""}]); + State.init([{prop: "Flag", name: "Flag", pkg: "", typ: $funcType([$Int], [$Bool], false)}, {prop: "Precision", name: "Precision", pkg: "", typ: $funcType([], [$Int, $Bool], false)}, {prop: "Width", name: "Width", pkg: "", typ: $funcType([], [$Int, $Bool], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}]); + Formatter.init([{prop: "Format", name: "Format", pkg: "", typ: $funcType([State, $Int32], [], false)}]); + Stringer.init([{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]); + GoStringer.init([{prop: "GoString", name: "GoString", pkg: "", typ: $funcType([], [$String], false)}]); + buffer.init($Uint8); + pp.init([{prop: "n", name: "n", pkg: "fmt", typ: $Int, tag: ""}, {prop: "panicking", name: "panicking", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "erroring", name: "erroring", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "buf", name: "buf", pkg: "fmt", typ: buffer, tag: ""}, {prop: "arg", name: "arg", pkg: "fmt", typ: $emptyInterface, tag: ""}, {prop: "value", name: "value", pkg: "fmt", typ: reflect.Value, tag: ""}, {prop: "reordered", name: "reordered", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "goodArgNum", name: "goodArgNum", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "runeBuf", name: "runeBuf", pkg: "fmt", typ: arrayType$1, tag: ""}, {prop: "fmt", name: "fmt", pkg: "fmt", typ: fmt, tag: ""}]); + runeUnreader.init([{prop: "UnreadRune", name: "UnreadRune", pkg: "", typ: $funcType([], [$error], false)}]); + scanError.init([{prop: "err", name: "err", pkg: "fmt", typ: $error, tag: ""}]); + ss.init([{prop: "rr", name: "rr", pkg: "fmt", typ: io.RuneReader, tag: ""}, {prop: "buf", name: "buf", pkg: "fmt", typ: buffer, tag: ""}, {prop: "peekRune", name: "peekRune", pkg: "fmt", typ: $Int32, tag: ""}, {prop: "prevRune", name: "prevRune", pkg: "fmt", typ: $Int32, tag: ""}, {prop: "count", name: "count", pkg: "fmt", typ: $Int, tag: ""}, {prop: "atEOF", name: "atEOF", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "ssave", name: "", pkg: "fmt", typ: ssave, tag: ""}]); + ssave.init([{prop: "validSave", name: "validSave", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "nlIsEnd", name: "nlIsEnd", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "nlIsSpace", name: "nlIsSpace", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "argLimit", name: "argLimit", pkg: "fmt", typ: $Int, tag: ""}, {prop: "limit", name: "limit", pkg: "fmt", typ: $Int, tag: ""}, {prop: "maxWid", name: "maxWid", pkg: "fmt", typ: $Int, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_fmt = function() { while (true) { switch ($s) { case 0: + $r = errors.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = io.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = math.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = os.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = reflect.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + $r = strconv.$init($BLOCKING); /* */ $s = 6; case 6: if ($r && $r.$blocking) { $r = $r(); } + $r = sync.$init($BLOCKING); /* */ $s = 7; case 7: if ($r && $r.$blocking) { $r = $r(); } + $r = utf8.$init($BLOCKING); /* */ $s = 8; case 8: if ($r && $r.$blocking) { $r = $r(); } + padZeroBytes = $makeSlice(sliceType, 65); + padSpaceBytes = $makeSlice(sliceType, 65); + trueBytes = new sliceType($stringToBytes("true")); + falseBytes = new sliceType($stringToBytes("false")); + commaSpaceBytes = new sliceType($stringToBytes(", ")); + nilAngleBytes = new sliceType($stringToBytes("")); + nilParenBytes = new sliceType($stringToBytes("(nil)")); + nilBytes = new sliceType($stringToBytes("nil")); + mapBytes = new sliceType($stringToBytes("map[")); + percentBangBytes = new sliceType($stringToBytes("%!")); + panicBytes = new sliceType($stringToBytes("(PANIC=")); + irparenBytes = new sliceType($stringToBytes("i)")); + bytesBytes = new sliceType($stringToBytes("[]byte{")); + ppFree = new sync.Pool.ptr(0, 0, sliceType$1.nil, (function() { + return new pp.ptr(); + })); + intBits = reflect.TypeOf(new $Int(0)).Bits(); + uintptrBits = reflect.TypeOf(new $Uintptr(0)).Bits(); + byteType = reflect.TypeOf(new $Uint8(0)); + space = new sliceType$2([$toNativeArray($kindUint16, [9, 13]), $toNativeArray($kindUint16, [32, 32]), $toNativeArray($kindUint16, [133, 133]), $toNativeArray($kindUint16, [160, 160]), $toNativeArray($kindUint16, [5760, 5760]), $toNativeArray($kindUint16, [8192, 8202]), $toNativeArray($kindUint16, [8232, 8233]), $toNativeArray($kindUint16, [8239, 8239]), $toNativeArray($kindUint16, [8287, 8287]), $toNativeArray($kindUint16, [12288, 12288])]); + ssFree = new sync.Pool.ptr(0, 0, sliceType$1.nil, (function() { + return new ss.ptr(); + })); + complexError = errors.New("syntax error scanning complex number"); + boolError = errors.New("syntax error scanning boolean"); + init(); + /* */ } return; } }; $init_fmt.$blocking = true; return $init_fmt; + }; + return $pkg; +})(); +$packages["main"] = (function() { + var $pkg = {}, fmt, sliceType, main; + fmt = $packages["fmt"]; + sliceType = $sliceType($emptyInterface); + main = function() { + fmt.Println(new sliceType([new $String("Hello.")])); + }; + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_main = function() { while (true) { switch ($s) { case 0: + $r = fmt.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + main(); + /* */ } return; } }; $init_main.$blocking = true; return $init_main; + }; + return $pkg; +})(); +$synthesizeMethods(); +$packages["runtime"].$init()(); +$go($packages["main"].$init, [], true); +$flushConsole(); + +}).call(this); +//# sourceMappingURL=fmt_simple.js.map diff --git a/104/build/fmt_simple.js.gz b/104/build/fmt_simple.js.gz new file mode 100644 index 0000000..313cbf8 Binary files /dev/null and b/104/build/fmt_simple.js.gz differ diff --git a/104/build/fmt_simple_min.js b/104/build/fmt_simple_min.js new file mode 100644 index 0000000..93f5039 --- /dev/null +++ b/104/build/fmt_simple_min.js @@ -0,0 +1,30 @@ +"use strict"; +(function() { + +Error.stackTraceLimit=Infinity;var $global,$module;if(typeof window!=="undefined"){$global=window;}else if(typeof self!=="undefined"){$global=self;}else if(typeof global!=="undefined"){$global=global;$global.require=require;}else{$global=this;}if($global===undefined||$global.Array===undefined){throw new Error("no global object found");}if(typeof module!=="undefined"){$module=module;}var $packages={},$idCounter=0;var $keys=function(m){return m?Object.keys(m):[];};var $min=Math.min;var $mod=function(x,y){return x%y;};var $parseInt=parseInt;var $parseFloat=function(f){if(f!==undefined&&f!==null&&f.constructor===Number){return f;}return parseFloat(f);};var $flushConsole=function(){};var $throwRuntimeError;var $throwNilPointerError=function(){$throwRuntimeError("invalid memory address or nil pointer dereference");};var $mapArray=function(array,f){var newArray=new array.constructor(array.length);for(var i=0;islice.$capacity||max>slice.$capacity){$throwRuntimeError("slice bounds out of range");}var s=new slice.constructor(slice.$array);s.$offset=slice.$offset+low;s.$length=slice.$length-low;s.$capacity=slice.$capacity-low;if(high!==undefined){s.$length=high-low;}if(max!==undefined){s.$capacity=max-low;}return s;};var $sliceToArray=function(slice){if(slice.$length===0){return[];}if(slice.$array.constructor!==Array){return slice.$array.subarray(slice.$offset,slice.$offset+slice.$length);}return slice.$array.slice(slice.$offset,slice.$offset+slice.$length);};var $decodeRune=function(str,pos){var c0=str.charCodeAt(pos);if(c0<0x80){return[c0,1];}if(c0!==c0||c0<0xC0){return[0xFFFD,1];}var c1=str.charCodeAt(pos+1);if(c1!==c1||c1<0x80||0xC0<=c1){return[0xFFFD,1];}if(c0<0xE0){var r=(c0&0x1F)<<6|(c1&0x3F);if(r<=0x7F){return[0xFFFD,1];}return[r,2];}var c2=str.charCodeAt(pos+2);if(c2!==c2||c2<0x80||0xC0<=c2){return[0xFFFD,1];}if(c0<0xF0){var r=(c0&0x0F)<<12|(c1&0x3F)<<6|(c2&0x3F);if(r<=0x7FF){return[0xFFFD,1];}if(0xD800<=r&&r<=0xDFFF){return[0xFFFD,1];}return[r,3];}var c3=str.charCodeAt(pos+3);if(c3!==c3||c3<0x80||0xC0<=c3){return[0xFFFD,1];}if(c0<0xF8){var r=(c0&0x07)<<18|(c1&0x3F)<<12|(c2&0x3F)<<6|(c3&0x3F);if(r<=0xFFFF||0x10FFFF0x10FFFF||(0xD800<=r&&r<=0xDFFF)){r=0xFFFD;}if(r<=0x7F){return String.fromCharCode(r);}if(r<=0x7FF){return String.fromCharCode(0xC0|r>>6,0x80|(r&0x3F));}if(r<=0xFFFF){return String.fromCharCode(0xE0|r>>12,0x80|(r>>6&0x3F),0x80|(r&0x3F));}return String.fromCharCode(0xF0|r>>18,0x80|(r>>12&0x3F),0x80|(r>>6&0x3F),0x80|(r&0x3F));};var $stringToBytes=function(str){var array=new Uint8Array(str.length);for(var i=0;isrcOffset){for(var i=n-1;i>=0;i--){$copy(dst[dstOffset+i],src[srcOffset+i],elem);}return;}for(var i=0;isrcOffset){for(var i=n-1;i>=0;i--){dst[dstOffset+i]=src[srcOffset+i];}return;}for(var i=0;inewCapacity){newOffset=0;newCapacity=Math.max(newLength,slice.$capacity<1024?slice.$capacity*2:Math.floor(slice.$capacity*5/4));if(slice.$array.constructor===Array){newArray=slice.$array.slice(slice.$offset,slice.$offset+slice.$length);newArray.length=newCapacity;var zero=slice.constructor.elem.zero;for(var i=slice.$length;i>0;this.$low=low>>>0;this.$val=this;};typ.prototype.$key=function(){return string+"$"+this.$high+"$"+this.$low;};break;case $kindUint64:typ=function(high,low){this.$high=(high+Math.floor(Math.ceil(low)/4294967296))>>>0;this.$low=low>>>0;this.$val=this;};typ.prototype.$key=function(){return string+"$"+this.$high+"$"+this.$low;};break;case $kindComplex64:case $kindComplex128:typ=function(real,imag){this.$real=real;this.$imag=imag;this.$val=this;};typ.prototype.$key=function(){return string+"$"+this.$real+"$"+this.$imag;};break;case $kindArray:typ=function(v){this.$val=v;};typ.ptr=$newType(4,$kindPtr,"*"+string,"","",function(array){this.$get=function(){return array;};this.$set=function(v){$copy(this,v,typ);};this.$val=array;});typ.init=function(elem,len){typ.elem=elem;typ.len=len;typ.comparable=elem.comparable;typ.prototype.$key=function(){return string+"$"+Array.prototype.join.call($mapArray(this.$val,function(e){var key=e.$key?e.$key():String(e);return key.replace(/\\/g,"\\\\").replace(/\$/g,"\\$");}),"$");};typ.ptr.init(typ);Object.defineProperty(typ.ptr.nil,"nilCheck",{get:$throwNilPointerError});};break;case $kindChan:typ=function(capacity){this.$val=this;this.$capacity=capacity;this.$buffer=[];this.$sendQueue=[];this.$recvQueue=[];this.$closed=false;};typ.prototype.$key=function(){if(this.$id===undefined){$idCounter++;this.$id=$idCounter;}return String(this.$id);};typ.init=function(elem,sendOnly,recvOnly){typ.elem=elem;typ.sendOnly=sendOnly;typ.recvOnly=recvOnly;typ.nil=new typ(0);typ.nil.$sendQueue=typ.nil.$recvQueue={length:0,push:function(){},shift:function(){return undefined;},indexOf:function(){return-1;}};};break;case $kindFunc:typ=function(v){this.$val=v;};typ.init=function(params,results,variadic){typ.params=params;typ.results=results;typ.variadic=variadic;typ.comparable=false;};break;case $kindInterface:typ={implementedBy:{},missingMethodFor:{}};typ.init=function(methods){typ.methods=methods;methods.forEach(function(m){$ifaceNil[m.prop]=$throwNilPointerError;});};break;case $kindMap:typ=function(v){this.$val=v;};typ.init=function(key,elem){typ.key=key;typ.elem=elem;typ.comparable=false;};break;case $kindPtr:typ=constructor||function(getter,setter,target){this.$get=getter;this.$set=setter;this.$target=target;this.$val=this;};typ.prototype.$key=function(){if(this.$id===undefined){$idCounter++;this.$id=$idCounter;}return String(this.$id);};typ.init=function(elem){typ.elem=elem;typ.nil=new typ($throwNilPointerError,$throwNilPointerError);};break;case $kindSlice:typ=function(array){if(array.constructor!==typ.nativeArray){array=new typ.nativeArray(array);}this.$array=array;this.$offset=0;this.$length=array.length;this.$capacity=array.length;this.$val=this;};typ.init=function(elem){typ.elem=elem;typ.comparable=false;typ.nativeArray=$nativeArray(elem.kind);typ.nil=new typ([]);};break;case $kindStruct:typ=function(v){this.$val=v;};typ.ptr=$newType(4,$kindPtr,"*"+string,"","",constructor);typ.ptr.elem=typ;typ.ptr.prototype.$get=function(){return this;};typ.ptr.prototype.$set=function(v){$copy(this,v,typ);};typ.init=function(fields){typ.fields=fields;fields.forEach(function(f){if(!f.typ.comparable){typ.comparable=false;}});typ.prototype.$key=function(){var val=this.$val;return string+"$"+$mapArray(fields,function(f){var e=val[f.prop];var key=e.$key?e.$key():String(e);return key.replace(/\\/g,"\\\\").replace(/\$/g,"\\$");}).join("$");};var properties={};fields.forEach(function(f){properties[f.prop]={get:$throwNilPointerError,set:$throwNilPointerError};});typ.ptr.nil=Object.create(constructor.prototype,properties);typ.ptr.nil.$val=typ.ptr.nil;$addMethodSynthesizer(function(){var synthesizeMethod=function(target,m,f){if(target.prototype[m.prop]!==undefined){return;}target.prototype[m.prop]=function(){var v=this.$val[f.prop];if(f.typ===$js.Object){v=new $js.container.ptr(v);}if(v.$val===undefined){v=new f.typ(v);}return v[m.prop].apply(v,arguments);};};fields.forEach(function(f){if(f.name===""){$methodSet(f.typ).forEach(function(m){synthesizeMethod(typ,m,f);synthesizeMethod(typ.ptr,m,f);});$methodSet($ptrType(f.typ)).forEach(function(m){synthesizeMethod(typ.ptr,m,f);});}});});};break;default:$panic(new $String("invalid kind: "+kind));}switch(kind){case $kindBool:case $kindMap:typ.zero=function(){return false;};break;case $kindInt:case $kindInt8:case $kindInt16:case $kindInt32:case $kindUint:case $kindUint8:case $kindUint16:case $kindUint32:case $kindUintptr:case $kindUnsafePointer:case $kindFloat32:case $kindFloat64:typ.zero=function(){return 0;};break;case $kindString:typ.zero=function(){return"";};break;case $kindInt64:case $kindUint64:case $kindComplex64:case $kindComplex128:var zero=new typ(0,0);typ.zero=function(){return zero;};break;case $kindChan:case $kindPtr:case $kindSlice:typ.zero=function(){return typ.nil;};break;case $kindFunc:typ.zero=function(){return $throwNilPointerError;};break;case $kindInterface:typ.zero=function(){return $ifaceNil;};break;case $kindArray:typ.zero=function(){var arrayClass=$nativeArray(typ.elem.kind);if(arrayClass!==Array){return new arrayClass(typ.len);}var array=new Array(typ.len);for(var i=0;i0){var next=[];var mset=[];current.forEach(function(e){if(seen[e.typ.string]){return;}seen[e.typ.string]=true;if(e.typ.typeName!==""){mset=mset.concat(e.typ.methods);if(e.indirect){mset=mset.concat($ptrType(e.typ).methods);}}switch(e.typ.kind){case $kindStruct:e.typ.fields.forEach(function(f){if(f.name===""){var fTyp=f.typ;var fIsPtr=(fTyp.kind===$kindPtr);next.push({typ:fIsPtr?fTyp.elem:fTyp,indirect:e.indirect||fIsPtr});}});break;case $kindInterface:mset=mset.concat(e.typ.methods);break;}});mset.forEach(function(m){if(base[m.name]===undefined){base[m.name]=m;}});current=next;}typ.methodSetCache=[];Object.keys(base).sort().forEach(function(name){typ.methodSetCache.push(base[name]);});return typ.methodSetCache;};var $Bool=$newType(1,$kindBool,"bool","bool","",null);var $Int=$newType(4,$kindInt,"int","int","",null);var $Int8=$newType(1,$kindInt8,"int8","int8","",null);var $Int16=$newType(2,$kindInt16,"int16","int16","",null);var $Int32=$newType(4,$kindInt32,"int32","int32","",null);var $Int64=$newType(8,$kindInt64,"int64","int64","",null);var $Uint=$newType(4,$kindUint,"uint","uint","",null);var $Uint8=$newType(1,$kindUint8,"uint8","uint8","",null);var $Uint16=$newType(2,$kindUint16,"uint16","uint16","",null);var $Uint32=$newType(4,$kindUint32,"uint32","uint32","",null);var $Uint64=$newType(8,$kindUint64,"uint64","uint64","",null);var $Uintptr=$newType(4,$kindUintptr,"uintptr","uintptr","",null);var $Float32=$newType(4,$kindFloat32,"float32","float32","",null);var $Float64=$newType(8,$kindFloat64,"float64","float64","",null);var $Complex64=$newType(8,$kindComplex64,"complex64","complex64","",null);var $Complex128=$newType(16,$kindComplex128,"complex128","complex128","",null);var $String=$newType(8,$kindString,"string","string","",null);var $UnsafePointer=$newType(4,$kindUnsafePointer,"unsafe.Pointer","Pointer","",null);var $nativeArray=function(elemKind){switch(elemKind){case $kindInt:return Int32Array;case $kindInt8:return Int8Array;case $kindInt16:return Int16Array;case $kindInt32:return Int32Array;case $kindUint:return Uint32Array;case $kindUint8:return Uint8Array;case $kindUint16:return Uint16Array;case $kindUint32:return Uint32Array;case $kindUintptr:return Uint32Array;case $kindFloat32:return Float32Array;case $kindFloat64:return Float64Array;default:return Array;}};var $toNativeArray=function(elemKind,array){var nativeArray=$nativeArray(elemKind);if(nativeArray===Array){return array;}return new nativeArray(array);};var $arrayTypes={};var $arrayType=function(elem,len){var string="["+len+"]"+elem.string;var typ=$arrayTypes[string];if(typ===undefined){typ=$newType(12,$kindArray,string,"","",null);$arrayTypes[string]=typ;typ.init(elem,len);}return typ;};var $chanType=function(elem,sendOnly,recvOnly){var string=(recvOnly?"<-":"")+"chan"+(sendOnly?"<- ":" ")+elem.string;var field=sendOnly?"SendChan":(recvOnly?"RecvChan":"Chan");var typ=elem[field];if(typ===undefined){typ=$newType(4,$kindChan,string,"","",null);elem[field]=typ;typ.init(elem,sendOnly,recvOnly);}return typ;};var $funcTypes={};var $funcType=function(params,results,variadic){var paramTypes=$mapArray(params,function(p){return p.string;});if(variadic){paramTypes[paramTypes.length-1]="..."+paramTypes[paramTypes.length-1].substr(2);}var string="func("+paramTypes.join(", ")+")";if(results.length===1){string+=" "+results[0].string;}else if(results.length>1){string+=" ("+$mapArray(results,function(r){return r.string;}).join(", ")+")";}var typ=$funcTypes[string];if(typ===undefined){typ=$newType(4,$kindFunc,string,"","",null);$funcTypes[string]=typ;typ.init(params,results,variadic);}return typ;};var $interfaceTypes={};var $interfaceType=function(methods){var string="interface {}";if(methods.length!==0){string="interface { "+$mapArray(methods,function(m){return(m.pkg!==""?m.pkg+".":"")+m.name+m.typ.string.substr(4);}).join("; ")+" }";}var typ=$interfaceTypes[string];if(typ===undefined){typ=$newType(8,$kindInterface,string,"","",null);$interfaceTypes[string]=typ;typ.init(methods);}return typ;};var $emptyInterface=$interfaceType([]);var $ifaceNil={$key:function(){return"nil";}};var $error=$newType(8,$kindInterface,"error","error","",null);$error.init([{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}]);var $Map=function(){};(function(){var names=Object.getOwnPropertyNames(Object.prototype);for(var i=0;i>>(32-y),(x.$low<>>0);}if(y<64){return new x.constructor(x.$low<<(y-32),0);}return new x.constructor(0,0);};var $shiftRightInt64=function(x,y){if(y===0){return x;}if(y<32){return new x.constructor(x.$high>>y,(x.$low>>>y|x.$high<<(32-y))>>>0);}if(y<64){return new x.constructor(x.$high>>31,(x.$high>>(y-32))>>>0);}if(x.$high<0){return new x.constructor(-1,4294967295);}return new x.constructor(0,0);};var $shiftRightUint64=function(x,y){if(y===0){return x;}if(y<32){return new x.constructor(x.$high>>>y,(x.$low>>>y|x.$high<<(32-y))>>>0);}if(y<64){return new x.constructor(0,x.$high>>>(y-32));}return new x.constructor(0,0);};var $mul64=function(x,y){var high=0,low=0;if((y.$low&1)!==0){high=x.$high;low=x.$low;}for(var i=1;i<32;i++){if((y.$low&1<>>(32-i);low+=(x.$low<>>0;}}for(var i=0;i<32;i++){if((y.$high&1<yHigh)||(xHigh===yHigh&&xLow>yLow))){yHigh=(yHigh<<1|yLow>>>31)>>>0;yLow=(yLow<<1)>>>0;n++;}for(var i=0;i<=n;i++){high=high<<1|low>>>31;low=(low<<1)>>>0;if((xHigh>yHigh)||(xHigh===yHigh&&xLow>=yLow)){xHigh=xHigh-yHigh;xLow=xLow-yLow;if(xLow<0){xHigh--;xLow+=4294967296;}low++;if(low===4294967296){high++;low=0;}}yLow=(yLow>>>1|yHigh<<(32-1))>>>0;yHigh=yHigh>>>1;}if(returnRemainder){return new x.constructor(xHigh*rs,xLow*rs);}return new x.constructor(high*s,low*s);};var $divComplex=function(n,d){var ninf=n.$real===1/0||n.$real===-1/0||n.$imag===1/0||n.$imag===-1/0;var dinf=d.$real===1/0||d.$real===-1/0||d.$imag===1/0||d.$imag===-1/0;var nnan=!ninf&&(n.$real!==n.$real||n.$imag!==n.$imag);var dnan=!dinf&&(d.$real!==d.$real||d.$imag!==d.$imag);if(nnan||dnan){return new n.constructor(0/0,0/0);}if(ninf&&!dinf){return new n.constructor(1/0,1/0);}if(!ninf&&dinf){return new n.constructor(0,0);}if(d.$real===0&&d.$imag===0){if(n.$real===0&&n.$imag===0){return new n.constructor(0/0,0/0);}return new n.constructor(1/0,1/0);}var a=Math.abs(d.$real);var b=Math.abs(d.$imag);if(a<=b){var ratio=d.$real/d.$imag;var denom=d.$real*ratio+d.$imag;return new n.constructor((n.$real*ratio+n.$imag)/denom,(n.$imag*ratio-n.$real)/denom);}var ratio=d.$imag/d.$real;var denom=d.$imag*ratio+d.$real;return new n.constructor((n.$imag*ratio+n.$real)/denom,(n.$imag-n.$real*ratio)/denom);};var $stackDepthOffset=0;var $getStackDepth=function(){var err=new Error();if(err.stack===undefined){return undefined;}return $stackDepthOffset+err.stack.split("\n").length;};var $deferFrames=[],$skippedDeferFrames=0,$jumpToDefer=false,$panicStackDepth=null,$panicValue;var $callDeferred=function(deferred,jsErr){if($skippedDeferFrames!==0){$skippedDeferFrames--;throw jsErr;}if($jumpToDefer){$jumpToDefer=false;throw jsErr;}if(jsErr){var newErr=null;try{$deferFrames.push(deferred);$panic(new $js.Error.ptr(jsErr));}catch(err){newErr=err;}$deferFrames.pop();$callDeferred(deferred,newErr);return;}$stackDepthOffset--;var outerPanicStackDepth=$panicStackDepth;var outerPanicValue=$panicValue;var localPanicValue=$curGoroutine.panicStack.pop();if(localPanicValue!==undefined){$panicStackDepth=$getStackDepth();$panicValue=localPanicValue;}var call,localSkippedDeferFrames=0;try{while(true){if(deferred===null){deferred=$deferFrames[$deferFrames.length-1-localSkippedDeferFrames];if(deferred===undefined){if(localPanicValue.Object instanceof Error){throw localPanicValue.Object;}var msg;if(localPanicValue.constructor===$String){msg=localPanicValue.$val;}else if(localPanicValue.Error!==undefined){msg=localPanicValue.Error();}else if(localPanicValue.String!==undefined){msg=localPanicValue.String();}else{msg=localPanicValue;}throw new Error(msg);}}var call=deferred.pop();if(call===undefined){if(localPanicValue!==undefined){localSkippedDeferFrames++;deferred=null;continue;}return;}var r=call[0].apply(undefined,call[1]);if(r&&r.$blocking){deferred.push([r,[]]);}if(localPanicValue!==undefined&&$panicStackDepth===null){throw null;}}}finally{$skippedDeferFrames+=localSkippedDeferFrames;if($curGoroutine.asleep){deferred.push(call);$jumpToDefer=true;}if(localPanicValue!==undefined){if($panicStackDepth!==null){$curGoroutine.panicStack.push(localPanicValue);}$panicStackDepth=outerPanicStackDepth;$panicValue=outerPanicValue;}$stackDepthOffset++;}};var $panic=function(value){$curGoroutine.panicStack.push(value);$callDeferred(null,null);};var $recover=function(){if($panicStackDepth===null||($panicStackDepth!==undefined&&$panicStackDepth!==$getStackDepth()-2)){return $ifaceNil;}$panicStackDepth=null;return $panicValue;};var $throw=function(err){throw err;};var $BLOCKING=new Object();var $nonblockingCall=function(){$panic(new $packages["runtime"].NotSupportedError.ptr("non-blocking call to blocking function, see https://github.com/gopherjs/gopherjs#goroutines"));};var $dummyGoroutine={asleep:false,exit:false,panicStack:[]};var $curGoroutine=$dummyGoroutine,$totalGoroutines=0,$awakeGoroutines=0,$checkForDeadlock=true;var $go=function(fun,args,direct){$totalGoroutines++;$awakeGoroutines++;args.push($BLOCKING);var goroutine=function(){var rescheduled=false;try{$curGoroutine=goroutine;$skippedDeferFrames=0;$jumpToDefer=false;var r=fun.apply(undefined,args);if(r&&r.$blocking){fun=r;args=[];$schedule(goroutine,direct);rescheduled=true;return;}goroutine.exit=true;}catch(err){if(!$curGoroutine.asleep){goroutine.exit=true;throw err;}}finally{$curGoroutine=$dummyGoroutine;if(goroutine.exit&&!rescheduled){$totalGoroutines--;goroutine.asleep=true;}if(goroutine.asleep&&!rescheduled){$awakeGoroutines--;if($awakeGoroutines===0&&$totalGoroutines!==0&&$checkForDeadlock){console.error("fatal error: all goroutines are asleep - deadlock!");}}}};goroutine.asleep=false;goroutine.exit=false;goroutine.panicStack=[];$schedule(goroutine,direct);};var $scheduled=[],$schedulerLoopActive=false;var $schedule=function(goroutine,direct){if(goroutine.asleep){goroutine.asleep=false;$awakeGoroutines++;}if(direct){goroutine();return;}$scheduled.push(goroutine);if(!$schedulerLoopActive){$schedulerLoopActive=true;setTimeout(function(){while(true){var r=$scheduled.shift();if(r===undefined){$schedulerLoopActive=false;break;}r();};},0);}};var $send=function(chan,value){if(chan.$closed){$throwRuntimeError("send on closed channel");}var queuedRecv=chan.$recvQueue.shift();if(queuedRecv!==undefined){queuedRecv([value,true]);return;}if(chan.$buffer.length>24;case $kindInt16:return parseInt(v)<<16>>16;case $kindInt32:return parseInt(v)>>0;case $kindUint:return parseInt(v);case $kindUint8:return parseInt(v)<<24>>>24;case $kindUint16:return parseInt(v)<<16>>>16;case $kindUint32:case $kindUintptr:return parseInt(v)>>>0;case $kindInt64:case $kindUint64:return new t(0,v);case $kindFloat32:case $kindFloat64:return parseFloat(v);case $kindArray:if(v.length!==t.len){$throwRuntimeError("got array with wrong size from JavaScript native");}return $mapArray(v,function(e){return $internalize(e,t.elem);});case $kindFunc:return function(){var args=[];for(var i=0;i>0;};B.prototype.Int=function(){return this.$val.Int();};B.ptr.prototype.Int64=function(){var a;a=this;return $internalize(a.Object,$Int64);};B.prototype.Int64=function(){return this.$val.Int64();};B.ptr.prototype.Uint64=function(){var a;a=this;return $internalize(a.Object,$Uint64);};B.prototype.Uint64=function(){return this.$val.Uint64();};B.ptr.prototype.Float=function(){var a;a=this;return $parseFloat(a.Object);};B.prototype.Float=function(){return this.$val.Float();};B.ptr.prototype.Interface=function(){var a;a=this;return $internalize(a.Object,$emptyInterface);};B.prototype.Interface=function(){return this.$val.Interface();};B.ptr.prototype.Unsafe=function(){var a;a=this;return a.Object;};B.prototype.Unsafe=function(){return this.$val.Unsafe();};C.ptr.prototype.Error=function(){var a;a=this;return"JavaScript error: "+$internalize(a.Object.message,$String);};C.prototype.Error=function(){return this.$val.Error();};C.ptr.prototype.Stack=function(){var a;a=this;return $internalize(a.Object.stack,$String);};C.prototype.Stack=function(){return this.$val.Stack();};K=function(){var a,b,c,d;a=new B.ptr(null);b=new C.ptr(null);};P.methods=[{prop:"Get",name:"Get",pkg:"",typ:$funcType([$String],[A],false)},{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String,$emptyInterface],[],false)},{prop:"Delete",name:"Delete",pkg:"",typ:$funcType([$String],[],false)},{prop:"Length",name:"Length",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Index",name:"Index",pkg:"",typ:$funcType([$Int],[A],false)},{prop:"SetIndex",name:"SetIndex",pkg:"",typ:$funcType([$Int,$emptyInterface],[],false)},{prop:"Call",name:"Call",pkg:"",typ:$funcType([$String,M],[A],true)},{prop:"Invoke",name:"Invoke",pkg:"",typ:$funcType([M],[A],true)},{prop:"New",name:"New",pkg:"",typ:$funcType([M],[A],true)},{prop:"Bool",name:"Bool",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Int",name:"Int",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Int64",name:"Int64",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Uint64",name:"Uint64",pkg:"",typ:$funcType([],[$Uint64],false)},{prop:"Float",name:"Float",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Interface",name:"Interface",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"Unsafe",name:"Unsafe",pkg:"",typ:$funcType([],[$Uintptr],false)}];Q.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)},{prop:"Stack",name:"Stack",pkg:"",typ:$funcType([],[$String],false)}];A.init([{prop:"Bool",name:"Bool",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Call",name:"Call",pkg:"",typ:$funcType([$String,M],[A],true)},{prop:"Delete",name:"Delete",pkg:"",typ:$funcType([$String],[],false)},{prop:"Float",name:"Float",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Get",name:"Get",pkg:"",typ:$funcType([$String],[A],false)},{prop:"Index",name:"Index",pkg:"",typ:$funcType([$Int],[A],false)},{prop:"Int",name:"Int",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Int64",name:"Int64",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Interface",name:"Interface",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"Invoke",name:"Invoke",pkg:"",typ:$funcType([M],[A],true)},{prop:"Length",name:"Length",pkg:"",typ:$funcType([],[$Int],false)},{prop:"New",name:"New",pkg:"",typ:$funcType([M],[A],true)},{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String,$emptyInterface],[],false)},{prop:"SetIndex",name:"SetIndex",pkg:"",typ:$funcType([$Int,$emptyInterface],[],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Uint64",name:"Uint64",pkg:"",typ:$funcType([],[$Uint64],false)},{prop:"Unsafe",name:"Unsafe",pkg:"",typ:$funcType([],[$Uintptr],false)}]);B.init([{prop:"Object",name:"",pkg:"",typ:A,tag:""}]);C.init([{prop:"Object",name:"",pkg:"",typ:A,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_js=function(){while(true){switch($s){case 0:K();}return;}};$init_js.$blocking=true;return $init_js;};return $pkg;})(); +$packages["runtime"]=(function(){var $pkg={},A,C,X,Z,AO,AS,D,E,P;A=$packages["github.com/gopherjs/gopherjs/js"];C=$pkg.NotSupportedError=$newType(0,$kindStruct,"runtime.NotSupportedError","NotSupportedError","runtime",function(Feature_){this.$val=this;this.Feature=Feature_!==undefined?Feature_:"";});X=$pkg.TypeAssertionError=$newType(0,$kindStruct,"runtime.TypeAssertionError","TypeAssertionError","runtime",function(interfaceString_,concreteString_,assertedString_,missingMethod_){this.$val=this;this.interfaceString=interfaceString_!==undefined?interfaceString_:"";this.concreteString=concreteString_!==undefined?concreteString_:"";this.assertedString=assertedString_!==undefined?assertedString_:"";this.missingMethod=missingMethod_!==undefined?missingMethod_:"";});Z=$pkg.errorString=$newType(8,$kindString,"runtime.errorString","errorString","runtime",null);AO=$ptrType(C);AS=$ptrType(X);C.ptr.prototype.Error=function(){var a;a=this;return"not supported by GopherJS: "+a.Feature;};C.prototype.Error=function(){return this.$val.Error();};D=function(){var a;$js=$packages[$externalize("github.com/gopherjs/gopherjs/js",$String)];$throwRuntimeError=(function(a){var a;$panic(new Z(a));});a=$ifaceNil;a=new X.ptr("","","","");a=new C.ptr("");};E=$pkg.GOROOT=function(){var a,b;a=$global.process;if(a===undefined){return"/";}b=a.env.GOROOT;if(!(b===undefined)){return $internalize(b,$String);}return"/usr/local/go";};P=$pkg.SetFinalizer=function(a,b){var a,b;};X.ptr.prototype.RuntimeError=function(){};X.prototype.RuntimeError=function(){return this.$val.RuntimeError();};X.ptr.prototype.Error=function(){var a,b;a=this;b=a.interfaceString;if(b===""){b="interface";}if(a.concreteString===""){return"interface conversion: "+b+" is nil, not "+a.assertedString;}if(a.missingMethod===""){return"interface conversion: "+b+" is "+a.concreteString+", not "+a.assertedString;}return"interface conversion: "+a.concreteString+" is not "+a.assertedString+": missing method "+a.missingMethod;};X.prototype.Error=function(){return this.$val.Error();};Z.prototype.RuntimeError=function(){var a;a=this.$val;};$ptrType(Z).prototype.RuntimeError=function(){return new Z(this.$get()).RuntimeError();};Z.prototype.Error=function(){var a;a=this.$val;return"runtime error: "+a;};$ptrType(Z).prototype.Error=function(){return new Z(this.$get()).Error();};AO.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];AS.methods=[{prop:"RuntimeError",name:"RuntimeError",pkg:"",typ:$funcType([],[],false)},{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];Z.methods=[{prop:"RuntimeError",name:"RuntimeError",pkg:"",typ:$funcType([],[],false)},{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];C.init([{prop:"Feature",name:"Feature",pkg:"",typ:$String,tag:""}]);X.init([{prop:"interfaceString",name:"interfaceString",pkg:"runtime",typ:$String,tag:""},{prop:"concreteString",name:"concreteString",pkg:"runtime",typ:$String,tag:""},{prop:"assertedString",name:"assertedString",pkg:"runtime",typ:$String,tag:""},{prop:"missingMethod",name:"missingMethod",pkg:"runtime",typ:$String,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_runtime=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}D();}return;}};$init_runtime.$blocking=true;return $init_runtime;};return $pkg;})(); +$packages["errors"]=(function(){var $pkg={},B,C,A;B=$pkg.errorString=$newType(0,$kindStruct,"errors.errorString","errorString","errors",function(s_){this.$val=this;this.s=s_!==undefined?s_:"";});C=$ptrType(B);A=$pkg.New=function(a){var a;return new B.ptr(a);};B.ptr.prototype.Error=function(){var a;a=this;return a.s;};B.prototype.Error=function(){return this.$val.Error();};C.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];B.init([{prop:"s",name:"s",pkg:"errors",typ:$String,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_errors=function(){while(true){switch($s){case 0:}return;}};$init_errors.$blocking=true;return $init_errors;};return $pkg;})(); +$packages["sync/atomic"]=(function(){var $pkg={},A,H,N,U,Y,AA;A=$packages["github.com/gopherjs/gopherjs/js"];H=$pkg.CompareAndSwapInt32=function(ad,ae,af){var ad,ae,af;if(ad.$get()===ae){ad.$set(af);return true;}return false;};N=$pkg.AddInt32=function(ad,ae){var ad,ae,af;af=ad.$get()+ae>>0;ad.$set(af);return af;};U=$pkg.LoadUint32=function(ad){var ad;return ad.$get();};Y=$pkg.StoreInt32=function(ad,ae){var ad,ae;ad.$set(ae);};AA=$pkg.StoreUint32=function(ad,ae){var ad,ae;ad.$set(ae);};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_atomic=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}}return;}};$init_atomic.$blocking=true;return $init_atomic;};return $pkg;})(); +$packages["sync"]=(function(){var $pkg={},B,A,C,L,M,N,O,AD,AH,AI,AK,AL,AM,AN,AO,AQ,AR,AT,AW,AX,AY,AZ,BB,BC,BD,BE,E,R,D,F,G,H,P,S,T,AA,AG;B=$packages["runtime"];A=$packages["sync/atomic"];C=$pkg.Pool=$newType(0,$kindStruct,"sync.Pool","Pool","sync",function(local_,localSize_,store_,New_){this.$val=this;this.local=local_!==undefined?local_:0;this.localSize=localSize_!==undefined?localSize_:0;this.store=store_!==undefined?store_:AW.nil;this.New=New_!==undefined?New_:$throwNilPointerError;});L=$pkg.Mutex=$newType(0,$kindStruct,"sync.Mutex","Mutex","sync",function(state_,sema_){this.$val=this;this.state=state_!==undefined?state_:0;this.sema=sema_!==undefined?sema_:0;});M=$pkg.Locker=$newType(8,$kindInterface,"sync.Locker","Locker","sync",null);N=$pkg.Once=$newType(0,$kindStruct,"sync.Once","Once","sync",function(m_,done_){this.$val=this;this.m=m_!==undefined?m_:new L.ptr();this.done=done_!==undefined?done_:0;});O=$pkg.poolLocal=$newType(0,$kindStruct,"sync.poolLocal","poolLocal","sync",function(private$0_,shared_,Mutex_,pad_){this.$val=this;this.private$0=private$0_!==undefined?private$0_:$ifaceNil;this.shared=shared_!==undefined?shared_:AW.nil;this.Mutex=Mutex_!==undefined?Mutex_:new L.ptr();this.pad=pad_!==undefined?pad_:BE.zero();});AD=$pkg.syncSema=$newType(0,$kindStruct,"sync.syncSema","syncSema","sync",function(lock_,head_,tail_){this.$val=this;this.lock=lock_!==undefined?lock_:0;this.head=head_!==undefined?head_:0;this.tail=tail_!==undefined?tail_:0;});AH=$pkg.RWMutex=$newType(0,$kindStruct,"sync.RWMutex","RWMutex","sync",function(w_,writerSem_,readerSem_,readerCount_,readerWait_){this.$val=this;this.w=w_!==undefined?w_:new L.ptr();this.writerSem=writerSem_!==undefined?writerSem_:0;this.readerSem=readerSem_!==undefined?readerSem_:0;this.readerCount=readerCount_!==undefined?readerCount_:0;this.readerWait=readerWait_!==undefined?readerWait_:0;});AI=$pkg.rlocker=$newType(0,$kindStruct,"sync.rlocker","rlocker","sync",function(w_,writerSem_,readerSem_,readerCount_,readerWait_){this.$val=this;this.w=w_!==undefined?w_:new L.ptr();this.writerSem=writerSem_!==undefined?writerSem_:0;this.readerSem=readerSem_!==undefined?readerSem_:0;this.readerCount=readerCount_!==undefined?readerCount_:0;this.readerWait=readerWait_!==undefined?readerWait_:0;});AK=$ptrType(C);AL=$sliceType(AK);AM=$structType([]);AN=$chanType(AM,false,false);AO=$sliceType(AN);AQ=$ptrType($Uint32);AR=$ptrType($Int32);AT=$ptrType(O);AW=$sliceType($emptyInterface);AX=$ptrType(AI);AY=$ptrType(AH);AZ=$funcType([],[$emptyInterface],false);BB=$ptrType(L);BC=$funcType([],[],false);BD=$ptrType(N);BE=$arrayType($Uint8,128);C.ptr.prototype.Get=function(){var f,g,h,i;f=this;if(f.store.$length===0){if(!(f.New===$throwNilPointerError)){return f.New();}return $ifaceNil;}i=(g=f.store,h=f.store.$length-1>>0,((h<0||h>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]));f.store=$subslice(f.store,0,(f.store.$length-1>>0));return i;};C.prototype.Get=function(){return this.$val.Get();};C.ptr.prototype.Put=function(f){var f,g;g=this;if($interfaceIsEqual(f,$ifaceNil)){return;}g.store=$append(g.store,f);};C.prototype.Put=function(f){return this.$val.Put(f);};D=function(f){var f;};F=function(f,$b){var $args=arguments,$r,$s=0,$this=this,g,h,i,j;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:if(f.$get()===0){}else{$s=1;continue;}g=new AN(0);h=f;(E||$throwRuntimeError("assignment to entry in nil map"))[h.$key()]={k:h,v:$append((i=E[f.$key()],i!==undefined?i.v:AO.nil),g)};j=$recv(g,$BLOCKING);$s=2;case 2:if(j&&j.$blocking){j=j();}j[0];case 1:f.$set(f.$get()-(1)>>>0);case-1:}return;}};$f.$blocking=true;return $f;};G=function(f,$b){var $args=arguments,$r,$s=0,$this=this,g,h,i,j;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:f.$set(f.$get()+(1)>>>0);h=(g=E[f.$key()],g!==undefined?g.v:AO.nil);if(h.$length===0){return;}i=((0<0||0>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+0]);h=$subslice(h,1);j=f;(E||$throwRuntimeError("assignment to entry in nil map"))[j.$key()]={k:j,v:h};if(h.$length===0){delete E[f.$key()];}$r=$send(i,new AM.ptr(),$BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}case-1:}return;}};$f.$blocking=true;return $f;};H=function(f){var f;};L.ptr.prototype.Lock=function($b){var $args=arguments,$r,$s=0,$this=this,f,g,h,i;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:f=$this;if(A.CompareAndSwapInt32(new AR(function(){return this.$target.state;},function($v){this.$target.state=$v;},f),0,1)){return;}g=false;case 1:if(!(true)){$s=2;continue;}h=f.state;i=h|1;if(!(((h&1)===0))){i=h+4>>0;}if(g){i=i&~(2);}if(A.CompareAndSwapInt32(new AR(function(){return this.$target.state;},function($v){this.$target.state=$v;},f),h,i)){}else{$s=3;continue;}if((h&1)===0){$s=2;continue;}$r=F(new AQ(function(){return this.$target.sema;},function($v){this.$target.sema=$v;},f),$BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}g=true;case 3:$s=1;continue;case 2:case-1:}return;}};$f.$blocking=true;return $f;};L.prototype.Lock=function($b){return this.$val.Lock($b);};L.ptr.prototype.Unlock=function($b){var $args=arguments,$r,$s=0,$this=this,f,g,h;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:f=$this;g=A.AddInt32(new AR(function(){return this.$target.state;},function($v){this.$target.state=$v;},f),-1);if((((g+1>>0))&1)===0){$panic(new $String("sync: unlock of unlocked mutex"));}h=g;case 1:if(!(true)){$s=2;continue;}if(((h>>2>>0)===0)||!(((h&3)===0))){return;}g=((h-4>>0))|2;if(A.CompareAndSwapInt32(new AR(function(){return this.$target.state;},function($v){this.$target.state=$v;},f),h,g)){}else{$s=3;continue;}$r=G(new AQ(function(){return this.$target.sema;},function($v){this.$target.sema=$v;},f),$BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}return;case 3:h=f.state;$s=1;continue;case 2:case-1:}return;}};$f.$blocking=true;return $f;};L.prototype.Unlock=function($b){return this.$val.Unlock($b);};N.ptr.prototype.Do=function(f,$b){var $args=arguments,$deferred=[],$err=null,$r,$s=0,$this=this,g;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){try{$deferFrames.push($deferred);s:while(true){switch($s){case 0:g=$this;if(A.LoadUint32(new AQ(function(){return this.$target.done;},function($v){this.$target.done=$v;},g))===1){return;}$r=g.m.Lock($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$deferred.push([$methodVal(g.m,"Unlock"),[$BLOCKING]]);if(g.done===0){$deferred.push([A.StoreUint32,[new AQ(function(){return this.$target.done;},function($v){this.$target.done=$v;},g),1,$BLOCKING]]);f();}case-1:}return;}}catch(err){$err=err;}finally{$deferFrames.pop();if($curGoroutine.asleep&&!$jumpToDefer){throw null;}$s=-1;$callDeferred($deferred,$err);}};$f.$blocking=true;return $f;};N.prototype.Do=function(f,$b){return this.$val.Do(f,$b);};P=function(){var f,g,h,i,j,k,l,m,n,o;f=R;g=0;while(true){if(!(g=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]);(h<0||h>=R.$length)?$throwRuntimeError("index out of range"):R.$array[R.$offset+h]=AK.nil;j=0;while(true){if(!(j<(i.localSize>>0))){break;}k=T(i.local,j);k.private$0=$ifaceNil;l=k.shared;m=0;while(true){if(!(m=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+n]=$ifaceNil);m++;}k.shared=AW.nil;j=j+(1)>>0;}i.local=0;i.localSize=0;g++;}R=new AL([]);};S=function(){D(P);};T=function(f,g){var f,g,h;return(h=f,(h.nilCheck,((g<0||g>=h.length)?$throwRuntimeError("index out of range"):h[g])));};AA=function(){};AG=function(){var f;f=$clone(new AD.ptr(),AD);H(12);};AH.ptr.prototype.RLock=function($b){var $args=arguments,$r,$s=0,$this=this,f;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:f=$this;if(A.AddInt32(new AR(function(){return this.$target.readerCount;},function($v){this.$target.readerCount=$v;},f),1)<0){}else{$s=1;continue;}$r=F(new AQ(function(){return this.$target.readerSem;},function($v){this.$target.readerSem=$v;},f),$BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}case 1:case-1:}return;}};$f.$blocking=true;return $f;};AH.prototype.RLock=function($b){return this.$val.RLock($b);};AH.ptr.prototype.RUnlock=function($b){var $args=arguments,$r,$s=0,$this=this,f,g;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:f=$this;g=A.AddInt32(new AR(function(){return this.$target.readerCount;},function($v){this.$target.readerCount=$v;},f),-1);if(g<0){}else{$s=1;continue;}if(((g+1>>0)===0)||((g+1>>0)===-1073741824)){AA();$panic(new $String("sync: RUnlock of unlocked RWMutex"));}if(A.AddInt32(new AR(function(){return this.$target.readerWait;},function($v){this.$target.readerWait=$v;},f),-1)===0){}else{$s=2;continue;}$r=G(new AQ(function(){return this.$target.writerSem;},function($v){this.$target.writerSem=$v;},f),$BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}case 2:case 1:case-1:}return;}};$f.$blocking=true;return $f;};AH.prototype.RUnlock=function($b){return this.$val.RUnlock($b);};AH.ptr.prototype.Lock=function($b){var $args=arguments,$r,$s=0,$this=this,f,g;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:f=$this;$r=f.w.Lock($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}g=A.AddInt32(new AR(function(){return this.$target.readerCount;},function($v){this.$target.readerCount=$v;},f),-1073741824)+1073741824>>0;if(!((g===0))&&!((A.AddInt32(new AR(function(){return this.$target.readerWait;},function($v){this.$target.readerWait=$v;},f),g)===0))){}else{$s=2;continue;}$r=F(new AQ(function(){return this.$target.writerSem;},function($v){this.$target.writerSem=$v;},f),$BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}case 2:case-1:}return;}};$f.$blocking=true;return $f;};AH.prototype.Lock=function($b){return this.$val.Lock($b);};AH.ptr.prototype.Unlock=function($b){var $args=arguments,$r,$s=0,$this=this,f,g,h;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:f=$this;g=A.AddInt32(new AR(function(){return this.$target.readerCount;},function($v){this.$target.readerCount=$v;},f),1073741824);if(g>=1073741824){AA();$panic(new $String("sync: Unlock of unlocked RWMutex"));}h=0;case 1:if(!(h<(g>>0))){$s=2;continue;}$r=G(new AQ(function(){return this.$target.readerSem;},function($v){this.$target.readerSem=$v;},f),$BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}h=h+(1)>>0;$s=1;continue;case 2:$r=f.w.Unlock($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}case-1:}return;}};$f.$blocking=true;return $f;};AH.prototype.Unlock=function($b){return this.$val.Unlock($b);};AH.ptr.prototype.RLocker=function(){var f;f=this;return $pointerOfStructConversion(f,AX);};AH.prototype.RLocker=function(){return this.$val.RLocker();};AI.ptr.prototype.Lock=function($b){var $args=arguments,$r,$s=0,$this=this,f;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:f=$this;$r=$pointerOfStructConversion(f,AY).RLock($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}case-1:}return;}};$f.$blocking=true;return $f;};AI.prototype.Lock=function($b){return this.$val.Lock($b);};AI.ptr.prototype.Unlock=function($b){var $args=arguments,$r,$s=0,$this=this,f;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:f=$this;$r=$pointerOfStructConversion(f,AY).RUnlock($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}case-1:}return;}};$f.$blocking=true;return $f;};AI.prototype.Unlock=function($b){return this.$val.Unlock($b);};AK.methods=[{prop:"Get",name:"Get",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"Put",name:"Put",pkg:"",typ:$funcType([$emptyInterface],[],false)},{prop:"getSlow",name:"getSlow",pkg:"sync",typ:$funcType([],[$emptyInterface],false)},{prop:"pin",name:"pin",pkg:"sync",typ:$funcType([],[AT],false)},{prop:"pinSlow",name:"pinSlow",pkg:"sync",typ:$funcType([],[AT],false)}];BB.methods=[{prop:"Lock",name:"Lock",pkg:"",typ:$funcType([],[],false)},{prop:"Unlock",name:"Unlock",pkg:"",typ:$funcType([],[],false)}];BD.methods=[{prop:"Do",name:"Do",pkg:"",typ:$funcType([BC],[],false)}];AY.methods=[{prop:"RLock",name:"RLock",pkg:"",typ:$funcType([],[],false)},{prop:"RUnlock",name:"RUnlock",pkg:"",typ:$funcType([],[],false)},{prop:"Lock",name:"Lock",pkg:"",typ:$funcType([],[],false)},{prop:"Unlock",name:"Unlock",pkg:"",typ:$funcType([],[],false)},{prop:"RLocker",name:"RLocker",pkg:"",typ:$funcType([],[M],false)}];AX.methods=[{prop:"Lock",name:"Lock",pkg:"",typ:$funcType([],[],false)},{prop:"Unlock",name:"Unlock",pkg:"",typ:$funcType([],[],false)}];C.init([{prop:"local",name:"local",pkg:"sync",typ:$UnsafePointer,tag:""},{prop:"localSize",name:"localSize",pkg:"sync",typ:$Uintptr,tag:""},{prop:"store",name:"store",pkg:"sync",typ:AW,tag:""},{prop:"New",name:"New",pkg:"",typ:AZ,tag:""}]);L.init([{prop:"state",name:"state",pkg:"sync",typ:$Int32,tag:""},{prop:"sema",name:"sema",pkg:"sync",typ:$Uint32,tag:""}]);M.init([{prop:"Lock",name:"Lock",pkg:"",typ:$funcType([],[],false)},{prop:"Unlock",name:"Unlock",pkg:"",typ:$funcType([],[],false)}]);N.init([{prop:"m",name:"m",pkg:"sync",typ:L,tag:""},{prop:"done",name:"done",pkg:"sync",typ:$Uint32,tag:""}]);O.init([{prop:"private$0",name:"private",pkg:"sync",typ:$emptyInterface,tag:""},{prop:"shared",name:"shared",pkg:"sync",typ:AW,tag:""},{prop:"Mutex",name:"",pkg:"",typ:L,tag:""},{prop:"pad",name:"pad",pkg:"sync",typ:BE,tag:""}]);AD.init([{prop:"lock",name:"lock",pkg:"sync",typ:$Uintptr,tag:""},{prop:"head",name:"head",pkg:"sync",typ:$UnsafePointer,tag:""},{prop:"tail",name:"tail",pkg:"sync",typ:$UnsafePointer,tag:""}]);AH.init([{prop:"w",name:"w",pkg:"sync",typ:L,tag:""},{prop:"writerSem",name:"writerSem",pkg:"sync",typ:$Uint32,tag:""},{prop:"readerSem",name:"readerSem",pkg:"sync",typ:$Uint32,tag:""},{prop:"readerCount",name:"readerCount",pkg:"sync",typ:$Int32,tag:""},{prop:"readerWait",name:"readerWait",pkg:"sync",typ:$Int32,tag:""}]);AI.init([{prop:"w",name:"w",pkg:"sync",typ:L,tag:""},{prop:"writerSem",name:"writerSem",pkg:"sync",typ:$Uint32,tag:""},{prop:"readerSem",name:"readerSem",pkg:"sync",typ:$Uint32,tag:""},{prop:"readerCount",name:"readerCount",pkg:"sync",typ:$Int32,tag:""},{prop:"readerWait",name:"readerWait",pkg:"sync",typ:$Int32,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_sync=function(){while(true){switch($s){case 0:$r=B.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}R=AL.nil;E=new $Map();S();AG();}return;}};$init_sync.$blocking=true;return $init_sync;};return $pkg;})(); +$packages["io"]=(function(){var $pkg={},B,A,C,W,AI,AJ;B=$packages["errors"];A=$packages["runtime"];C=$packages["sync"];W=$pkg.RuneReader=$newType(8,$kindInterface,"io.RuneReader","RuneReader","io",null);W.init([{prop:"ReadRune",name:"ReadRune",pkg:"",typ:$funcType([],[$Int32,$Int,$error],false)}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_io=function(){while(true){switch($s){case 0:$r=B.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$pkg.ErrShortWrite=B.New("short write");$pkg.ErrShortBuffer=B.New("short buffer");$pkg.EOF=B.New("EOF");$pkg.ErrUnexpectedEOF=B.New("unexpected EOF");$pkg.ErrNoProgress=B.New("multiple Read calls return no data or error");AI=B.New("Seek: invalid whence");AJ=B.New("Seek: invalid offset");$pkg.ErrClosedPipe=B.New("io: read/write on closed pipe");}return;}};$init_io.$blocking=true;return $init_io;};return $pkg;})(); +$packages["math"]=(function(){var $pkg={},A,FG,B,C,D,E,F,EN,G,X,Z,AR,AS,AT,EP;A=$packages["github.com/gopherjs/gopherjs/js"];FG=$arrayType($Float64,70);G=function(){AR(0);AS(0);};X=$pkg.IsInf=function(ao,ap){var ao,ap;if(ao===D){return ap>=0;}if(ao===E){return ap<=0;}return false;};Z=$pkg.Ldexp=function(ao,ap){var ao,ap;if(ao===0){return ao;}if(ap>=1024){return ao*$parseFloat(B.pow(2,1023))*$parseFloat(B.pow(2,ap-1023>>0));}if(ap<=-1024){return ao*$parseFloat(B.pow(2,-1023))*$parseFloat(B.pow(2,ap+1023>>0));}return ao*$parseFloat(B.pow(2,ap));};AR=$pkg.Float32bits=function(ao){var ao,ap,aq,ar;if(ao===0){if(1/ao===E){return 2147483648;}return 0;}if(!(ao===ao)){return 2143289344;}ap=0;if(ao<0){ap=2147483648;ao=-ao;}aq=150;while(true){if(!(ao>=1.6777216e+07)){break;}ao=ao/(2);aq=aq+(1)>>>0;if(aq===255){if(ao>=8.388608e+06){ao=D;}break;}}while(true){if(!(ao<8.388608e+06)){break;}aq=aq-(1)>>>0;if(aq===0){break;}ao=ao*(2);}ar=$parseFloat($mod(ao,2));if((ar>0.5&&ar<1)||ar>=1.5){ao=ao+(1);}return(((ap|(aq<<23>>>0))>>>0)|(((ao>>0)&~8388608)))>>>0;};AS=$pkg.Float32frombits=function(ao){var ao,ap,aq,ar;ap=1;if(!((((ao&2147483648)>>>0)===0))){ap=-1;}aq=(((ao>>>23>>>0))&255)>>>0;ar=(ao&8388607)>>>0;if(aq===255){if(ar===0){return ap/0;}return F;}if(!((aq===0))){ar=ar+(8388608)>>>0;}if(aq===0){aq=1;}return Z(ar,((aq>>0)-127>>0)-23>>0)*ap;};AT=$pkg.Float64bits=function(ao){var ao,ap,aq,ar,as,at,au;if(ao===0){if(1/ao===E){return new $Uint64(2147483648,0);}return new $Uint64(0,0);}if(!((ao===ao))){return new $Uint64(2146959360,1);}ap=new $Uint64(0,0);if(ao<0){ap=new $Uint64(2147483648,0);ao=-ao;}aq=1075;while(true){if(!(ao>=9.007199254740992e+15)){break;}ao=ao/(2);aq=aq+(1)>>>0;if(aq===2047){break;}}while(true){if(!(ao<4.503599627370496e+15)){break;}aq=aq-(1)>>>0;if(aq===0){break;}ao=ao*(2);}return(ar=(as=$shiftLeft64(new $Uint64(0,aq),52),new $Uint64(ap.$high|as.$high,(ap.$low|as.$low)>>>0)),at=(au=new $Uint64(0,ao),new $Uint64(au.$high&~1048576,(au.$low&~0)>>>0)),new $Uint64(ar.$high|at.$high,(ar.$low|at.$low)>>>0));};EP=function(){var ao,ap,aq,ar;EN[0]=1;EN[1]=10;ao=2;while(true){if(!(ao<70)){break;}aq=(ap=ao/2,(ap===ap&&ap!==1/0&&ap!==-1/0)?ap>>0:$throwRuntimeError("integer divide by zero"));(ao<0||ao>=EN.length)?$throwRuntimeError("index out of range"):EN[ao]=((aq<0||aq>=EN.length)?$throwRuntimeError("index out of range"):EN[aq])*(ar=ao-aq>>0,((ar<0||ar>=EN.length)?$throwRuntimeError("index out of range"):EN[ar]));ao=ao+(1)>>0;}};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_math=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}EN=FG.zero();B=$global.Math;C=0;D=1/C;E=-1/C;F=0/C;G();EP();}return;}};$init_math.$blocking=true;return $init_math;};return $pkg;})(); +$packages["unicode"]=(function(){var $pkg={};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_unicode=function(){while(true){switch($s){case 0:}return;}};$init_unicode.$blocking=true;return $init_unicode;};return $pkg;})(); +$packages["unicode/utf8"]=(function(){var $pkg={},A,B,E,F,I,J,K,L;A=function(a){var a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b=0,ba,bb,bc,bd,be,bf,bg,bh,c=0,d=false,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;e=a.$length;if(e<1){f=65533;g=0;h=true;b=f;c=g;d=h;return[b,c,d];}i=((0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]);if(i<128){j=(i>>0);k=1;l=false;b=j;c=k;d=l;return[b,c,d];}if(i<192){m=65533;n=1;o=false;b=m;c=n;d=o;return[b,c,d];}if(e<2){p=65533;q=1;r=true;b=p;c=q;d=r;return[b,c,d];}s=((1<0||1>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+1]);if(s<128||192<=s){t=65533;u=1;v=false;b=t;c=u;d=v;return[b,c,d];}if(i<224){b=((((i&31)>>>0)>>0)<<6>>0)|(((s&63)>>>0)>>0);if(b<=127){w=65533;x=1;y=false;b=w;c=x;d=y;return[b,c,d];}z=b;aa=2;ab=false;b=z;c=aa;d=ab;return[b,c,d];}if(e<3){ac=65533;ad=1;ae=true;b=ac;c=ad;d=ae;return[b,c,d];}af=((2<0||2>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+2]);if(af<128||192<=af){ag=65533;ah=1;ai=false;b=ag;c=ah;d=ai;return[b,c,d];}if(i<240){b=(((((i&15)>>>0)>>0)<<12>>0)|((((s&63)>>>0)>>0)<<6>>0))|(((af&63)>>>0)>>0);if(b<=2047){aj=65533;ak=1;al=false;b=aj;c=ak;d=al;return[b,c,d];}if(55296<=b&&b<=57343){am=65533;an=1;ao=false;b=am;c=an;d=ao;return[b,c,d];}ap=b;aq=3;ar=false;b=ap;c=aq;d=ar;return[b,c,d];}if(e<4){as=65533;at=1;au=true;b=as;c=at;d=au;return[b,c,d];}av=((3<0||3>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+3]);if(av<128||192<=av){aw=65533;ax=1;ay=false;b=aw;c=ax;d=ay;return[b,c,d];}if(i<248){b=((((((i&7)>>>0)>>0)<<18>>0)|((((s&63)>>>0)>>0)<<12>>0))|((((af&63)>>>0)>>0)<<6>>0))|(((av&63)>>>0)>>0);if(b<=65535||1114111>0);k=1;l=false;b=j;c=k;d=l;return[b,c,d];}if(i<192){m=65533;n=1;o=false;b=m;c=n;d=o;return[b,c,d];}if(e<2){p=65533;q=1;r=true;b=p;c=q;d=r;return[b,c,d];}s=a.charCodeAt(1);if(s<128||192<=s){t=65533;u=1;v=false;b=t;c=u;d=v;return[b,c,d];}if(i<224){b=((((i&31)>>>0)>>0)<<6>>0)|(((s&63)>>>0)>>0);if(b<=127){w=65533;x=1;y=false;b=w;c=x;d=y;return[b,c,d];}z=b;aa=2;ab=false;b=z;c=aa;d=ab;return[b,c,d];}if(e<3){ac=65533;ad=1;ae=true;b=ac;c=ad;d=ae;return[b,c,d];}af=a.charCodeAt(2);if(af<128||192<=af){ag=65533;ah=1;ai=false;b=ag;c=ah;d=ai;return[b,c,d];}if(i<240){b=(((((i&15)>>>0)>>0)<<12>>0)|((((s&63)>>>0)>>0)<<6>>0))|(((af&63)>>>0)>>0);if(b<=2047){aj=65533;ak=1;al=false;b=aj;c=ak;d=al;return[b,c,d];}if(55296<=b&&b<=57343){am=65533;an=1;ao=false;b=am;c=an;d=ao;return[b,c,d];}ap=b;aq=3;ar=false;b=ap;c=aq;d=ar;return[b,c,d];}if(e<4){as=65533;at=1;au=true;b=as;c=at;d=au;return[b,c,d];}av=a.charCodeAt(3);if(av<128||192<=av){aw=65533;ax=1;ay=false;b=aw;c=ax;d=ay;return[b,c,d];}if(i<248){b=((((((i&7)>>>0)>>0)<<18>>0)|((((s&63)>>>0)>>0)<<12>>0))|((((af&63)>>>0)>>0)<<6>>0))|(((av&63)>>>0)>>0);if(b<=65535||1114111>>0);if(c<=127){(0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]=(b<<24>>>24);return 1;}else if(c<=2047){(0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]=(192|((b>>6>>0)<<24>>>24))>>>0;(1<0||1>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+1]=(128|(((b<<24>>>24)&63)>>>0))>>>0;return 2;}else if(c>1114111||55296<=c&&c<=57343){b=65533;(0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]=(224|((b>>12>>0)<<24>>>24))>>>0;(1<0||1>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+1]=(128|((((b>>6>>0)<<24>>>24)&63)>>>0))>>>0;(2<0||2>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+2]=(128|(((b<<24>>>24)&63)>>>0))>>>0;return 3;}else if(c<=65535){(0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]=(224|((b>>12>>0)<<24>>>24))>>>0;(1<0||1>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+1]=(128|((((b>>6>>0)<<24>>>24)&63)>>>0))>>>0;(2<0||2>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+2]=(128|(((b<<24>>>24)&63)>>>0))>>>0;return 3;}else{(0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]=(240|((b>>18>>0)<<24>>>24))>>>0;(1<0||1>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+1]=(128|((((b>>12>>0)<<24>>>24)&63)>>>0))>>>0;(2<0||2>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+2]=(128|((((b>>6>>0)<<24>>>24)&63)>>>0))>>>0;(3<0||3>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+3]=(128|(((b<<24>>>24)&63)>>>0))>>>0;return 4;}};K=$pkg.RuneCount=function(a){var a,b,c,d,e;b=0;c=0;c=0;while(true){if(!(b=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+b])<128){b=b+(1)>>0;}else{d=E($subslice(a,b));e=d[1];b=b+(e)>>0;}c=c+(1)>>0;}return c;};L=$pkg.RuneCountInString=function(a){var a,b=0,c,d,e;c=a;d=0;while(true){if(!(d>0;d+=e[1];}return b;};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_utf8=function(){while(true){switch($s){case 0:}return;}};$init_utf8.$blocking=true;return $init_utf8;};return $pkg;})(); +$packages["bytes"]=(function(){var $pkg={},A,B,D,C,E;A=$packages["errors"];B=$packages["io"];D=$packages["unicode"];C=$packages["unicode/utf8"];E=$pkg.IndexByte=function(d,e){var d,e,f,g,h,i;f=d;g=0;while(true){if(!(g=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]);if(i===e){return h;}g++;}return-1;};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_bytes=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$pkg.ErrTooLarge=A.New("bytes.Buffer: too large");}return;}};$init_bytes.$blocking=true;return $init_bytes;};return $pkg;})(); +$packages["syscall"]=(function(){var $pkg={},A,E,B,D,C,EQ,ER,KF,KI,KO,KW,MD,ME,MF,MS,MT,MZ,NE,NG,NH,NK,NX,NY,NZ,OA,OE,OF,OH,OJ,F,G,N,O,P,AP,AQ,AR,AS,DT,FS,H,I,J,K,L,Q,R,S,V,AU,AW,CQ,CR,CT,CY,DO,DY,DZ,ET,EU,GM,HA,HF,HH,HI,HL,HN,HO,HP,II,IT,IU,IV,JA,JY,JZ,KA;A=$packages["bytes"];E=$packages["errors"];B=$packages["github.com/gopherjs/gopherjs/js"];D=$packages["runtime"];C=$packages["sync"];EQ=$pkg.mmapper=$newType(0,$kindStruct,"syscall.mmapper","mmapper","syscall",function(Mutex_,active_,mmap_,munmap_){this.$val=this;this.Mutex=Mutex_!==undefined?Mutex_:new C.Mutex.ptr();this.active=active_!==undefined?active_:false;this.mmap=mmap_!==undefined?mmap_:$throwNilPointerError;this.munmap=munmap_!==undefined?munmap_:$throwNilPointerError;});ER=$pkg.Errno=$newType(4,$kindUintptr,"syscall.Errno","Errno","syscall",null);KF=$pkg._C_int=$newType(4,$kindInt32,"syscall._C_int","_C_int","syscall",null);KI=$pkg.Timespec=$newType(0,$kindStruct,"syscall.Timespec","Timespec","syscall",function(Sec_,Nsec_){this.$val=this;this.Sec=Sec_!==undefined?Sec_:new $Int64(0,0);this.Nsec=Nsec_!==undefined?Nsec_:new $Int64(0,0);});KO=$pkg.Stat_t=$newType(0,$kindStruct,"syscall.Stat_t","Stat_t","syscall",function(Dev_,Mode_,Nlink_,Ino_,Uid_,Gid_,Rdev_,Pad_cgo_0_,Atimespec_,Mtimespec_,Ctimespec_,Birthtimespec_,Size_,Blocks_,Blksize_,Flags_,Gen_,Lspare_,Qspare_){this.$val=this;this.Dev=Dev_!==undefined?Dev_:0;this.Mode=Mode_!==undefined?Mode_:0;this.Nlink=Nlink_!==undefined?Nlink_:0;this.Ino=Ino_!==undefined?Ino_:new $Uint64(0,0);this.Uid=Uid_!==undefined?Uid_:0;this.Gid=Gid_!==undefined?Gid_:0;this.Rdev=Rdev_!==undefined?Rdev_:0;this.Pad_cgo_0=Pad_cgo_0_!==undefined?Pad_cgo_0_:NG.zero();this.Atimespec=Atimespec_!==undefined?Atimespec_:new KI.ptr();this.Mtimespec=Mtimespec_!==undefined?Mtimespec_:new KI.ptr();this.Ctimespec=Ctimespec_!==undefined?Ctimespec_:new KI.ptr();this.Birthtimespec=Birthtimespec_!==undefined?Birthtimespec_:new KI.ptr();this.Size=Size_!==undefined?Size_:new $Int64(0,0);this.Blocks=Blocks_!==undefined?Blocks_:new $Int64(0,0);this.Blksize=Blksize_!==undefined?Blksize_:0;this.Flags=Flags_!==undefined?Flags_:0;this.Gen=Gen_!==undefined?Gen_:0;this.Lspare=Lspare_!==undefined?Lspare_:0;this.Qspare=Qspare_!==undefined?Qspare_:OF.zero();});KW=$pkg.Dirent=$newType(0,$kindStruct,"syscall.Dirent","Dirent","syscall",function(Ino_,Seekoff_,Reclen_,Namlen_,Type_,Name_,Pad_cgo_0_){this.$val=this;this.Ino=Ino_!==undefined?Ino_:new $Uint64(0,0);this.Seekoff=Seekoff_!==undefined?Seekoff_:new $Uint64(0,0);this.Reclen=Reclen_!==undefined?Reclen_:0;this.Namlen=Namlen_!==undefined?Namlen_:0;this.Type=Type_!==undefined?Type_:0;this.Name=Name_!==undefined?Name_:OH.zero();this.Pad_cgo_0=Pad_cgo_0_!==undefined?Pad_cgo_0_:OJ.zero();});MD=$sliceType($Uint8);ME=$sliceType($String);MF=$ptrType($Uint8);MS=$sliceType(KF);MT=$ptrType($Uintptr);MZ=$arrayType($Uint8,32);NE=$sliceType($Uint8);NG=$arrayType($Uint8,4);NH=$arrayType(KF,14);NK=$structType([{prop:"addr",name:"addr",pkg:"syscall",typ:$Uintptr,tag:""},{prop:"len",name:"len",pkg:"syscall",typ:$Int,tag:""},{prop:"cap",name:"cap",pkg:"syscall",typ:$Int,tag:""}]);NX=$ptrType(EQ);NY=$mapType(MF,MD);NZ=$funcType([$Uintptr,$Uintptr,$Int,$Int,$Int,$Int64],[$Uintptr,$error],false);OA=$funcType([$Uintptr,$Uintptr],[$error],false);OE=$ptrType(KI);OF=$arrayType($Int64,2);OH=$arrayType($Int8,1024);OJ=$arrayType($Uint8,3);H=function(){$flushConsole=(function(){if(!((G.$length===0))){$global.console.log($externalize($bytesToString(G),$String));G=MD.nil;}});};I=function(){if(!F){console.log("warning: system calls not available, see https://github.com/gopherjs/gopherjs/blob/master/doc/syscalls.md");}F=true;};J=function(i){var i,j,k;j=$global.goPrintToConsole;if(!(j===undefined)){j(i);return;}G=$appendSlice(G,i);while(true){if(!(true)){break;}k=A.IndexByte(G,10);if(k===-1){break;}$global.console.log($externalize($bytesToString($subslice(G,0,k)),$String));G=$subslice(G,(k+1>>0));}};K=function(i){var i;};L=function(){var i,j,k,l,m,n;i=$global.process;if(i===undefined){return ME.nil;}j=i.env;k=$global.Object.keys(j);l=$makeSlice(ME,$parseInt(k.length));m=0;while(true){if(!(m<$parseInt(k.length))){break;}n=$internalize(k[m],$String);(m<0||m>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+m]=n+"="+$internalize(j[$externalize(n,$String)],$String);m=m+(1)>>0;}return l;};Q=function(i){var $deferred=[],$err=null,i,j;try{$deferFrames.push($deferred);$deferred.push([(function(){$recover();}),[]]);if(N===null){if(O){return null;}O=true;j=$global.require;if(j===undefined){$panic(new $String(""));}N=j($externalize("syscall",$String));}return N[$externalize(i,$String)];}catch(err){$err=err;return null;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};R=$pkg.Syscall=function(i,j,k,l){var aa,ab,i,j,k,l,m=0,n=0,o=0,p,q,r,s,t,u,v,w,x,y,z;p=Q("Syscall");if(!(p===null)){q=p(i,j,k,l);r=(($parseInt(q[0])>>0)>>>0);s=(($parseInt(q[1])>>0)>>>0);t=(($parseInt(q[2])>>0)>>>0);m=r;n=s;o=t;return[m,n,o];}if((i===4)&&((j===1)||(j===2))){u=k;v=$makeSlice(MD,$parseInt(u.length));v.$array=u;J(v);w=($parseInt(u.length)>>>0);x=0;y=0;m=w;n=x;o=y;return[m,n,o];}I();z=(P>>>0);aa=0;ab=13;m=z;n=aa;o=ab;return[m,n,o];};S=$pkg.Syscall6=function(i,j,k,l,m,n,o){var i,j,k,l,m,n,o,p=0,q=0,r=0,s,t,u,v,w,x,y,z;s=Q("Syscall6");if(!(s===null)){t=s(i,j,k,l,m,n,o);u=(($parseInt(t[0])>>0)>>>0);v=(($parseInt(t[1])>>0)>>>0);w=(($parseInt(t[2])>>0)>>>0);p=u;q=v;r=w;return[p,q,r];}if(!((i===202))){I();}x=(P>>>0);y=0;z=13;p=x;q=y;r=z;return[p,q,r];};V=$pkg.BytePtrFromString=function(i){var i,j,k,l,m,n;j=new($global.Uint8Array)(i.length+1>>0);k=new MD($stringToBytes(i));l=0;while(true){if(!(l=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+l]);if(n===0){return[MF.nil,new ER(22)];}j[m]=n;l++;}j[i.length]=0;return[j,$ifaceNil];};AU=function(){var i,j,k,l,m,n,o,p,q,r;AR=new $Map();i=AS;j=0;while(true){if(!(j=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]);m=0;while(true){if(!(m=AS.$length)?$throwRuntimeError("index out of range"):AS.$array[AS.$offset+k]="";}break;}m=m+(1)>>0;}j++;}};AW=$pkg.Getenv=function(i,$b){var $args=arguments,$deferred=[],$err=null,$r,$s=0,$this=this,j="",k=false,l,m,n,o,p,q,r,s,t,u,v,w,x,y;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){try{$deferFrames.push($deferred);s:while(true){switch($s){case 0:$r=AP.Do(AU,$BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}if(i.length===0){l="";m=false;j=l;k=m;return[j,k];}$r=AQ.RLock($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$deferred.push([$methodVal(AQ,"RUnlock"),[$BLOCKING]]);n=(o=AR[i],o!==undefined?[o.v,true]:[0,false]);p=n[0];q=n[1];if(!q){r="";s=false;j=r;k=s;return[j,k];}t=((p<0||p>=AS.$length)?$throwRuntimeError("index out of range"):AS.$array[AS.$offset+p]);u=0;while(true){if(!(u>0));w=true;j=v;k=w;return[j,k];}u=u+(1)>>0;}x="";y=false;j=x;k=y;return[j,k];case-1:}return;}}catch(err){$err=err;}finally{$deferFrames.pop();if($curGoroutine.asleep&&!$jumpToDefer){throw null;}$s=-1;$callDeferred($deferred,$err);return[j,k];}};$f.$blocking=true;return $f;};CQ=function(i){var i;if(i<0){return"-"+CR((-i>>>0));}return CR((i>>>0));};CR=function(i){var i,j,k,l,m;j=$clone(MZ.zero(),MZ);k=31;while(true){if(!(i>=10)){break;}(k<0||k>=j.length)?$throwRuntimeError("index out of range"):j[k]=(((l=i%10,l===l?l:$throwRuntimeError("integer divide by zero"))+48>>>0)<<24>>>24);k=k-(1)>>0;i=(m=i/(10),(m===m&&m!==1/0&&m!==-1/0)?m>>>0:$throwRuntimeError("integer divide by zero"));}(k<0||k>=j.length)?$throwRuntimeError("index out of range"):j[k]=((i+48>>>0)<<24>>>24);return $bytesToString($subslice(new MD(j),k));};CT=$pkg.ByteSliceFromString=function(i){var i,j,k;j=0;while(true){if(!(j>0;}k=$makeSlice(MD,(i.length+1>>0));$copyString(k,i);return[k,$ifaceNil];};KI.ptr.prototype.Unix=function(){var i=new $Int64(0,0),j=new $Int64(0,0),k,l,m;k=this;l=k.Sec;m=k.Nsec;i=l;j=m;return[i,j];};KI.prototype.Unix=function(){return this.$val.Unix();};KI.ptr.prototype.Nano=function(){var i,j,k;i=this;return(j=$mul64(i.Sec,new $Int64(0,1000000000)),k=i.Nsec,new $Int64(j.$high+k.$high,j.$low+k.$low));};KI.prototype.Nano=function(){return this.$val.Nano();};CY=$pkg.ReadDirent=function(i,j){var i,j,k=0,l=$ifaceNil,m,n;m=new Uint8Array(8);n=HP(i,j,m);k=n[0];l=n[1];if(true&&($interfaceIsEqual(l,new ER(22))||$interfaceIsEqual(l,new ER(2)))){l=$ifaceNil;}return[k,l];};DO=$pkg.Sysctl=function(i){var i,j="",k=$ifaceNil,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;l=DY(i);m=l[0];k=l[1];if(!($interfaceIsEqual(k,$ifaceNil))){n="";o=k;j=n;k=o;return[j,k];}p=0;k=GM(m,MF.nil,new MT(function(){return p;},function($v){p=$v;}),MF.nil,0);if(!($interfaceIsEqual(k,$ifaceNil))){q="";r=k;j=q;k=r;return[j,k];}if(p===0){s="";t=$ifaceNil;j=s;k=t;return[j,k];}u=$makeSlice(MD,p);k=GM(m,new MF(function(){return((0<0||0>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+0]);},function($v){(0<0||0>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+0]=$v;},u),new MT(function(){return p;},function($v){p=$v;}),MF.nil,0);if(!($interfaceIsEqual(k,$ifaceNil))){v="";w=k;j=v;k=w;return[j,k];}if(p>0&&((x=p-1>>>0,((x<0||x>=u.$length)?$throwRuntimeError("index out of range"):u.$array[u.$offset+x]))===0)){p=p-(1)>>>0;}y=$bytesToString($subslice(u,0,p));z=$ifaceNil;j=y;k=z;return[j,k];};DY=function(i){var i,j=MS.nil,k=$ifaceNil,l,m,n,o,p,q,r,s,t,u,v,w;l=$clone(NH.zero(),NH);m=48;n=$sliceToArray(new NE(l));o=CT(i);p=o[0];k=o[1];if(!($interfaceIsEqual(k,$ifaceNil))){q=MS.nil;r=k;j=q;k=r;return[j,k];}k=GM(new MS([0,3]),n,new MT(function(){return m;},function($v){m=$v;}),new MF(function(){return((0<0||0>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+0]);},function($v){(0<0||0>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+0]=$v;},p),(i.length>>>0));if(!($interfaceIsEqual(k,$ifaceNil))){s=MS.nil;t=k;j=s;k=t;return[j,k];}u=$subslice(new MS(l),0,(v=m/4,(v===v&&v!==1/0&&v!==-1/0)?v>>>0:$throwRuntimeError("integer divide by zero")));w=$ifaceNil;j=u;k=w;return[j,k];};DZ=$pkg.ParseDirent=function(i,j,k){var i,j,k,l=0,m=0,n=ME.nil,o,p,q,r,s,t,u,v,w,x,y;o=i.$length;while(true){if(!(!((j===0))&&i.$length>0)){break;}p=[undefined];p[0]=(q=$sliceToArray(i),r=new KW.ptr(),s=new DataView(q.buffer,q.byteOffset),r.Ino=new $Uint64(s.getUint32(4,true),s.getUint32(0,true)),r.Seekoff=new $Uint64(s.getUint32(12,true),s.getUint32(8,true)),r.Reclen=s.getUint16(16,true),r.Namlen=s.getUint16(18,true),r.Type=s.getUint8(20,true),r.Name=new($nativeArray($kindInt8))(q.buffer,$min(q.byteOffset+21,q.buffer.byteLength)),r.Pad_cgo_0=new($nativeArray($kindUint8))(q.buffer,$min(q.byteOffset+1045,q.buffer.byteLength)),r);if(p[0].Reclen===0){i=MD.nil;break;}i=$subslice(i,p[0].Reclen);if((t=p[0].Ino,(t.$high===0&&t.$low===0))){continue;}u=$sliceToArray(new NE(p[0].Name));v=$bytesToString($subslice(new MD(u),0,p[0].Namlen));if(v==="."||v===".."){continue;}j=j-(1)>>0;m=m+(1)>>0;k=$append(k,v);}w=o-i.$length>>0;x=m;y=k;l=w;m=x;n=y;return[l,m,n];};EQ.ptr.prototype.Mmap=function(i,j,k,l,m,$b){var $args=arguments,$deferred=[],$err=null,$r,$s=0,$this=this,aa,ab,ac,ad,ae,n=MD.nil,o=$ifaceNil,p,q,r,s,t,u,v,w,x,y,z;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){try{$deferFrames.push($deferred);s:while(true){switch($s){case 0:p=$this;if(k<=0){q=MD.nil;r=new ER(22);n=q;o=r;return[n,o];}s=p.mmap(0,(k>>>0),l,m,i,j);t=s[0];u=s[1];if(!($interfaceIsEqual(u,$ifaceNil))){v=MD.nil;w=u;n=v;o=w;return[n,o];}x=new NK.ptr(t,k,k);y=x;ab=new MF(function(){return(aa=y.$capacity-1>>0,((aa<0||aa>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+aa]));},function($v){(z=y.$capacity-1>>0,(z<0||z>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+z]=$v);},y);$r=p.Mutex.Lock($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$deferred.push([$methodVal(p.Mutex,"Unlock"),[$BLOCKING]]);ac=ab;(p.active||$throwRuntimeError("assignment to entry in nil map"))[ac.$key()]={k:ac,v:y};ad=y;ae=$ifaceNil;n=ad;o=ae;return[n,o];case-1:}return;}}catch(err){$err=err;}finally{$deferFrames.pop();if($curGoroutine.asleep&&!$jumpToDefer){throw null;}$s=-1;$callDeferred($deferred,$err);return[n,o];}};$f.$blocking=true;return $f;};EQ.prototype.Mmap=function(i,j,k,l,m,$b){return this.$val.Mmap(i,j,k,l,m,$b);};EQ.ptr.prototype.Munmap=function(i,$b){var $args=arguments,$deferred=[],$err=null,$r,$s=0,$this=this,j=$ifaceNil,k,l,m,n,o,p,q;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){try{$deferFrames.push($deferred);s:while(true){switch($s){case 0:k=$this;if((i.$length===0)||!((i.$length===i.$capacity))){j=new ER(22);return j;}n=new MF(function(){return(m=i.$capacity-1>>0,((m<0||m>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+m]));},function($v){(l=i.$capacity-1>>0,(l<0||l>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+l]=$v);},i);$r=k.Mutex.Lock($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$deferred.push([$methodVal(k.Mutex,"Unlock"),[$BLOCKING]]);p=(o=k.active[n.$key()],o!==undefined?o.v:MD.nil);if(p===MD.nil||!($pointerIsEqual(new MF(function(){return((0<0||0>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+0]);},function($v){(0<0||0>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+0]=$v;},p),new MF(function(){return((0<0||0>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+0]);},function($v){(0<0||0>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+0]=$v;},i)))){j=new ER(22);return j;}q=k.munmap($sliceToArray(p),(p.$length>>>0));if(!($interfaceIsEqual(q,$ifaceNil))){j=q;return j;}delete k.active[n.$key()];j=$ifaceNil;return j;case-1:}return;}}catch(err){$err=err;}finally{$deferFrames.pop();if($curGoroutine.asleep&&!$jumpToDefer){throw null;}$s=-1;$callDeferred($deferred,$err);return j;}};$f.$blocking=true;return $f;};EQ.prototype.Munmap=function(i,$b){return this.$val.Munmap(i,$b);};ER.prototype.Error=function(){var i,j;i=this.$val;if(0<=(i>>0)&&(i>>0)<106){j=((i<0||i>=FS.length)?$throwRuntimeError("index out of range"):FS[i]);if(!(j==="")){return j;}}return"errno "+CQ((i>>0));};$ptrType(ER).prototype.Error=function(){return new ER(this.$get()).Error();};ER.prototype.Temporary=function(){var i;i=this.$val;return(i===4)||(i===24)||(i===54)||(i===53)||new ER(i).Timeout();};$ptrType(ER).prototype.Temporary=function(){return new ER(this.$get()).Temporary();};ER.prototype.Timeout=function(){var i;i=this.$val;return(i===35)||(i===35)||(i===60);};$ptrType(ER).prototype.Timeout=function(){return new ER(this.$get()).Timeout();};ET=$pkg.Read=function(i,j){var i,j,k=0,l=$ifaceNil,m;m=IV(i,j);k=m[0];l=m[1];return[k,l];};EU=$pkg.Write=function(i,j){var i,j,k=0,l=$ifaceNil,m;m=JY(i,j);k=m[0];l=m[1];return[k,l];};GM=function(i,j,k,l,m){var i,j,k,l,m,n=$ifaceNil,o,p,q;o=0;if(i.$length>0){o=$sliceToArray(i);}else{o=new Uint8Array(0);}p=S(202,o,(i.$length>>>0),j,k,l,m);q=p[2];if(!((q===0))){n=new ER(q);}return n;};HA=$pkg.Close=function(i){var i,j=$ifaceNil,k,l;k=R(6,(i>>>0),0,0);l=k[2];if(!((l===0))){j=new ER(l);}return j;};HF=$pkg.Fchdir=function(i){var i,j=$ifaceNil,k,l;k=R(13,(i>>>0),0,0);l=k[2];if(!((l===0))){j=new ER(l);}return j;};HH=$pkg.Fchmod=function(i,j){var i,j,k=$ifaceNil,l,m;l=R(124,(i>>>0),(j>>>0),0);m=l[2];if(!((m===0))){k=new ER(m);}return k;};HI=$pkg.Fchown=function(i,j,k){var i,j,k,l=$ifaceNil,m,n;m=R(123,(i>>>0),(j>>>0),(k>>>0));n=m[2];if(!((n===0))){l=new ER(n);}return l;};HL=$pkg.Fstat=function(i,j){var i,j,k=$ifaceNil,l,m,n,o,p;m=new Uint8Array(144);l=R(339,(i>>>0),m,0);p=l[2];n=j,o=new DataView(m.buffer,m.byteOffset),n.Dev=o.getInt32(0,true),n.Mode=o.getUint16(4,true),n.Nlink=o.getUint16(6,true),n.Ino=new $Uint64(o.getUint32(12,true),o.getUint32(8,true)),n.Uid=o.getUint32(16,true),n.Gid=o.getUint32(20,true),n.Rdev=o.getInt32(24,true),n.Pad_cgo_0=new($nativeArray($kindUint8))(m.buffer,$min(m.byteOffset+28,m.buffer.byteLength)),n.Atimespec.Sec=new $Int64(o.getUint32(36,true),o.getUint32(32,true)),n.Atimespec.Nsec=new $Int64(o.getUint32(44,true),o.getUint32(40,true)),n.Mtimespec.Sec=new $Int64(o.getUint32(52,true),o.getUint32(48,true)),n.Mtimespec.Nsec=new $Int64(o.getUint32(60,true),o.getUint32(56,true)),n.Ctimespec.Sec=new $Int64(o.getUint32(68,true),o.getUint32(64,true)),n.Ctimespec.Nsec=new $Int64(o.getUint32(76,true),o.getUint32(72,true)),n.Birthtimespec.Sec=new $Int64(o.getUint32(84,true),o.getUint32(80,true)),n.Birthtimespec.Nsec=new $Int64(o.getUint32(92,true),o.getUint32(88,true)),n.Size=new $Int64(o.getUint32(100,true),o.getUint32(96,true)),n.Blocks=new $Int64(o.getUint32(108,true),o.getUint32(104,true)),n.Blksize=o.getInt32(112,true),n.Flags=o.getUint32(116,true),n.Gen=o.getUint32(120,true),n.Lspare=o.getInt32(124,true),n.Qspare=new($nativeArray($kindInt64))(m.buffer,$min(m.byteOffset+128,m.buffer.byteLength));if(!((p===0))){k=new ER(p);}return k;};HN=$pkg.Fsync=function(i){var i,j=$ifaceNil,k,l;k=R(95,(i>>>0),0,0);l=k[2];if(!((l===0))){j=new ER(l);}return j;};HO=$pkg.Ftruncate=function(i,j){var i,j,k=$ifaceNil,l,m;l=R(201,(i>>>0),(j.$low>>>0),0);m=l[2];if(!((m===0))){k=new ER(m);}return k;};HP=$pkg.Getdirentries=function(i,j,k){var i,j,k,l=0,m=$ifaceNil,n,o,p,q;n=0;if(j.$length>0){n=$sliceToArray(j);}else{n=new Uint8Array(0);}o=S(344,(i>>>0),n,(j.$length>>>0),k,0,0);p=o[0];q=o[2];l=(p>>0);if(!((q===0))){m=new ER(q);}return[l,m];};II=$pkg.Lstat=function(i,j){var i,j,k=$ifaceNil,l,m,n,o,p,q,r;l=MF.nil;m=V(i);l=m[0];k=m[1];if(!($interfaceIsEqual(k,$ifaceNil))){return k;}o=new Uint8Array(144);n=R(340,l,o,0);r=n[2];p=j,q=new DataView(o.buffer,o.byteOffset),p.Dev=q.getInt32(0,true),p.Mode=q.getUint16(4,true),p.Nlink=q.getUint16(6,true),p.Ino=new $Uint64(q.getUint32(12,true),q.getUint32(8,true)),p.Uid=q.getUint32(16,true),p.Gid=q.getUint32(20,true),p.Rdev=q.getInt32(24,true),p.Pad_cgo_0=new($nativeArray($kindUint8))(o.buffer,$min(o.byteOffset+28,o.buffer.byteLength)),p.Atimespec.Sec=new $Int64(q.getUint32(36,true),q.getUint32(32,true)),p.Atimespec.Nsec=new $Int64(q.getUint32(44,true),q.getUint32(40,true)),p.Mtimespec.Sec=new $Int64(q.getUint32(52,true),q.getUint32(48,true)),p.Mtimespec.Nsec=new $Int64(q.getUint32(60,true),q.getUint32(56,true)),p.Ctimespec.Sec=new $Int64(q.getUint32(68,true),q.getUint32(64,true)),p.Ctimespec.Nsec=new $Int64(q.getUint32(76,true),q.getUint32(72,true)),p.Birthtimespec.Sec=new $Int64(q.getUint32(84,true),q.getUint32(80,true)),p.Birthtimespec.Nsec=new $Int64(q.getUint32(92,true),q.getUint32(88,true)),p.Size=new $Int64(q.getUint32(100,true),q.getUint32(96,true)),p.Blocks=new $Int64(q.getUint32(108,true),q.getUint32(104,true)),p.Blksize=q.getInt32(112,true),p.Flags=q.getUint32(116,true),p.Gen=q.getUint32(120,true),p.Lspare=q.getInt32(124,true),p.Qspare=new($nativeArray($kindInt64))(o.buffer,$min(o.byteOffset+128,o.buffer.byteLength));K(l);if(!((r===0))){k=new ER(r);}return k;};IT=$pkg.Pread=function(i,j,k){var i,j,k,l=0,m=$ifaceNil,n,o,p,q;n=0;if(j.$length>0){n=$sliceToArray(j);}else{n=new Uint8Array(0);}o=S(153,(i>>>0),n,(j.$length>>>0),(k.$low>>>0),0,0);p=o[0];q=o[2];l=(p>>0);if(!((q===0))){m=new ER(q);}return[l,m];};IU=$pkg.Pwrite=function(i,j,k){var i,j,k,l=0,m=$ifaceNil,n,o,p,q;n=0;if(j.$length>0){n=$sliceToArray(j);}else{n=new Uint8Array(0);}o=S(154,(i>>>0),n,(j.$length>>>0),(k.$low>>>0),0,0);p=o[0];q=o[2];l=(p>>0);if(!((q===0))){m=new ER(q);}return[l,m];};IV=function(i,j){var i,j,k=0,l=$ifaceNil,m,n,o,p;m=0;if(j.$length>0){m=$sliceToArray(j);}else{m=new Uint8Array(0);}n=R(3,(i>>>0),m,(j.$length>>>0));o=n[0];p=n[2];k=(o>>0);if(!((p===0))){l=new ER(p);}return[k,l];};JA=$pkg.Seek=function(i,j,k){var i,j,k,l=new $Int64(0,0),m=$ifaceNil,n,o,p;n=R(199,(i>>>0),(j.$low>>>0),(k>>>0));o=n[0];p=n[2];l=new $Int64(0,o.constructor===Number?o:1);if(!((p===0))){m=new ER(p);}return[l,m];};JY=function(i,j){var i,j,k=0,l=$ifaceNil,m,n,o,p;m=0;if(j.$length>0){m=$sliceToArray(j);}else{m=new Uint8Array(0);}n=R(4,(i>>>0),m,(j.$length>>>0));o=n[0];p=n[2];k=(o>>0);if(!((p===0))){l=new ER(p);}return[k,l];};JZ=function(i,j,k,l,m,n){var i,j,k,l,m,n,o=0,p=$ifaceNil,q,r,s;q=S(197,i,j,(k>>>0),(l>>>0),(m>>>0),(n.$low>>>0));r=q[0];s=q[2];o=r;if(!((s===0))){p=new ER(s);}return[o,p];};KA=function(i,j){var i,j,k=$ifaceNil,l,m;l=R(73,i,j,0);m=l[2];if(!((m===0))){k=new ER(m);}return k;};NX.methods=[{prop:"Mmap",name:"Mmap",pkg:"",typ:$funcType([$Int,$Int64,$Int,$Int,$Int],[MD,$error],false)},{prop:"Munmap",name:"Munmap",pkg:"",typ:$funcType([MD],[$error],false)}];ER.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)},{prop:"Temporary",name:"Temporary",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Timeout",name:"Timeout",pkg:"",typ:$funcType([],[$Bool],false)}];OE.methods=[{prop:"Unix",name:"Unix",pkg:"",typ:$funcType([],[$Int64,$Int64],false)},{prop:"Nano",name:"Nano",pkg:"",typ:$funcType([],[$Int64],false)}];EQ.init([{prop:"Mutex",name:"",pkg:"",typ:C.Mutex,tag:""},{prop:"active",name:"active",pkg:"syscall",typ:NY,tag:""},{prop:"mmap",name:"mmap",pkg:"syscall",typ:NZ,tag:""},{prop:"munmap",name:"munmap",pkg:"syscall",typ:OA,tag:""}]);KI.init([{prop:"Sec",name:"Sec",pkg:"",typ:$Int64,tag:""},{prop:"Nsec",name:"Nsec",pkg:"",typ:$Int64,tag:""}]);KO.init([{prop:"Dev",name:"Dev",pkg:"",typ:$Int32,tag:""},{prop:"Mode",name:"Mode",pkg:"",typ:$Uint16,tag:""},{prop:"Nlink",name:"Nlink",pkg:"",typ:$Uint16,tag:""},{prop:"Ino",name:"Ino",pkg:"",typ:$Uint64,tag:""},{prop:"Uid",name:"Uid",pkg:"",typ:$Uint32,tag:""},{prop:"Gid",name:"Gid",pkg:"",typ:$Uint32,tag:""},{prop:"Rdev",name:"Rdev",pkg:"",typ:$Int32,tag:""},{prop:"Pad_cgo_0",name:"Pad_cgo_0",pkg:"",typ:NG,tag:""},{prop:"Atimespec",name:"Atimespec",pkg:"",typ:KI,tag:""},{prop:"Mtimespec",name:"Mtimespec",pkg:"",typ:KI,tag:""},{prop:"Ctimespec",name:"Ctimespec",pkg:"",typ:KI,tag:""},{prop:"Birthtimespec",name:"Birthtimespec",pkg:"",typ:KI,tag:""},{prop:"Size",name:"Size",pkg:"",typ:$Int64,tag:""},{prop:"Blocks",name:"Blocks",pkg:"",typ:$Int64,tag:""},{prop:"Blksize",name:"Blksize",pkg:"",typ:$Int32,tag:""},{prop:"Flags",name:"Flags",pkg:"",typ:$Uint32,tag:""},{prop:"Gen",name:"Gen",pkg:"",typ:$Uint32,tag:""},{prop:"Lspare",name:"Lspare",pkg:"",typ:$Int32,tag:""},{prop:"Qspare",name:"Qspare",pkg:"",typ:OF,tag:""}]);KW.init([{prop:"Ino",name:"Ino",pkg:"",typ:$Uint64,tag:""},{prop:"Seekoff",name:"Seekoff",pkg:"",typ:$Uint64,tag:""},{prop:"Reclen",name:"Reclen",pkg:"",typ:$Uint16,tag:""},{prop:"Namlen",name:"Namlen",pkg:"",typ:$Uint16,tag:""},{prop:"Type",name:"Type",pkg:"",typ:$Uint8,tag:""},{prop:"Name",name:"Name",pkg:"",typ:OH,tag:""},{prop:"Pad_cgo_0",name:"Pad_cgo_0",pkg:"",typ:OJ,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_syscall=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}G=MD.nil;AP=new C.Once.ptr();AQ=new C.RWMutex.ptr();AR=false;F=false;N=null;O=false;P=-1;AS=L();$pkg.Stdin=0;$pkg.Stdout=1;$pkg.Stderr=2;FS=$toNativeArray($kindString,["","operation not permitted","no such file or directory","no such process","interrupted system call","input/output error","device not configured","argument list too long","exec format error","bad file descriptor","no child processes","resource deadlock avoided","cannot allocate memory","permission denied","bad address","block device required","resource busy","file exists","cross-device link","operation not supported by device","not a directory","is a directory","invalid argument","too many open files in system","too many open files","inappropriate ioctl for device","text file busy","file too large","no space left on device","illegal seek","read-only file system","too many links","broken pipe","numerical argument out of domain","result too large","resource temporarily unavailable","operation now in progress","operation already in progress","socket operation on non-socket","destination address required","message too long","protocol wrong type for socket","protocol not available","protocol not supported","socket type not supported","operation not supported","protocol family not supported","address family not supported by protocol family","address already in use","can't assign requested address","network is down","network is unreachable","network dropped connection on reset","software caused connection abort","connection reset by peer","no buffer space available","socket is already connected","socket is not connected","can't send after socket shutdown","too many references: can't splice","operation timed out","connection refused","too many levels of symbolic links","file name too long","host is down","no route to host","directory not empty","too many processes","too many users","disc quota exceeded","stale NFS file handle","too many levels of remote in path","RPC struct is bad","RPC version wrong","RPC prog. not avail","program version wrong","bad procedure for program","no locks available","function not implemented","inappropriate file type or format","authentication error","need authenticator","device power is off","device error","value too large to be stored in data type","bad executable (or shared library)","bad CPU type in executable","shared library version mismatch","malformed Mach-o file","operation canceled","identifier removed","no message of desired type","illegal byte sequence","attribute not found","bad message","EMULTIHOP (Reserved)","no message available on STREAM","ENOLINK (Reserved)","no STREAM resources","not a STREAM","protocol error","STREAM ioctl timeout","operation not supported on socket","policy not found","state not recoverable","previous owner died"]);DT=new EQ.ptr(new C.Mutex.ptr(),new $Map(),JZ,KA);H();}return;}};$init_syscall.$blocking=true;return $init_syscall;};return $pkg;})(); +$packages["github.com/gopherjs/gopherjs/nosync"]=(function(){var $pkg={},D,I,J;D=$pkg.Once=$newType(0,$kindStruct,"nosync.Once","Once","github.com/gopherjs/gopherjs/nosync",function(doing_,done_){this.$val=this;this.doing=doing_!==undefined?doing_:false;this.done=done_!==undefined?done_:false;});I=$funcType([],[],false);J=$ptrType(D);D.ptr.prototype.Do=function(a){var $deferred=[],$err=null,a,b;try{$deferFrames.push($deferred);b=this;if(b.done){return;}if(b.doing){$panic(new $String("nosync: Do called within f"));}b.doing=true;$deferred.push([(function(){b.doing=false;b.done=true;}),[]]);a();}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};D.prototype.Do=function(a){return this.$val.Do(a);};J.methods=[{prop:"Do",name:"Do",pkg:"",typ:$funcType([I],[],false)}];D.init([{prop:"doing",name:"doing",pkg:"github.com/gopherjs/gopherjs/nosync",typ:$Bool,tag:""},{prop:"done",name:"done",pkg:"github.com/gopherjs/gopherjs/nosync",typ:$Bool,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_nosync=function(){while(true){switch($s){case 0:}return;}};$init_nosync.$blocking=true;return $init_nosync;};return $pkg;})(); +$packages["strings"]=(function(){var $pkg={},B,A,C,E,D,F;B=$packages["errors"];A=$packages["github.com/gopherjs/gopherjs/js"];C=$packages["io"];E=$packages["unicode"];D=$packages["unicode/utf8"];F=$pkg.IndexByte=function(b,c){var b,c;return $parseInt(b.indexOf($global.String.fromCharCode(c)))>>0;};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_strings=function(){while(true){switch($s){case 0:$r=B.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}}return;}};$init_strings.$blocking=true;return $init_strings;};return $pkg;})(); +$packages["time"]=(function(){var $pkg={},C,B,E,F,A,D,AB,BG,BH,BJ,BN,CA,CB,CC,CW,CX,CY,CZ,DD,DE,DF,DG,DH,DN,DQ,N,Q,R,S,T,X,AA,AN,BI,BK,BS,CD,CE,CF,CH,CL,CS,j,k,H,O,P,U,V,W,Y,Z,AC,AD,AE,AF,AG,AH,AJ,AK,AL,AM,AO,BL,BM,BO,BP,BR,BV,BW,BX,BY,BZ,CG;C=$packages["errors"];B=$packages["github.com/gopherjs/gopherjs/js"];E=$packages["github.com/gopherjs/gopherjs/nosync"];F=$packages["runtime"];A=$packages["strings"];D=$packages["syscall"];AB=$pkg.ParseError=$newType(0,$kindStruct,"time.ParseError","ParseError","time",function(Layout_,Value_,LayoutElem_,ValueElem_,Message_){this.$val=this;this.Layout=Layout_!==undefined?Layout_:"";this.Value=Value_!==undefined?Value_:"";this.LayoutElem=LayoutElem_!==undefined?LayoutElem_:"";this.ValueElem=ValueElem_!==undefined?ValueElem_:"";this.Message=Message_!==undefined?Message_:"";});BG=$pkg.Time=$newType(0,$kindStruct,"time.Time","Time","time",function(sec_,nsec_,loc_){this.$val=this;this.sec=sec_!==undefined?sec_:new $Int64(0,0);this.nsec=nsec_!==undefined?nsec_:0;this.loc=loc_!==undefined?loc_:DH.nil;});BH=$pkg.Month=$newType(4,$kindInt,"time.Month","Month","time",null);BJ=$pkg.Weekday=$newType(4,$kindInt,"time.Weekday","Weekday","time",null);BN=$pkg.Duration=$newType(8,$kindInt64,"time.Duration","Duration","time",null);CA=$pkg.Location=$newType(0,$kindStruct,"time.Location","Location","time",function(name_,zone_,tx_,cacheStart_,cacheEnd_,cacheZone_){this.$val=this;this.name=name_!==undefined?name_:"";this.zone=zone_!==undefined?zone_:CX.nil;this.tx=tx_!==undefined?tx_:CY.nil;this.cacheStart=cacheStart_!==undefined?cacheStart_:new $Int64(0,0);this.cacheEnd=cacheEnd_!==undefined?cacheEnd_:new $Int64(0,0);this.cacheZone=cacheZone_!==undefined?cacheZone_:CZ.nil;});CB=$pkg.zone=$newType(0,$kindStruct,"time.zone","zone","time",function(name_,offset_,isDST_){this.$val=this;this.name=name_!==undefined?name_:"";this.offset=offset_!==undefined?offset_:0;this.isDST=isDST_!==undefined?isDST_:false;});CC=$pkg.zoneTrans=$newType(0,$kindStruct,"time.zoneTrans","zoneTrans","time",function(when_,index_,isstd_,isutc_){this.$val=this;this.when=when_!==undefined?when_:new $Int64(0,0);this.index=index_!==undefined?index_:0;this.isstd=isstd_!==undefined?isstd_:false;this.isutc=isutc_!==undefined?isutc_:false;});CW=$sliceType($String);CX=$sliceType(CB);CY=$sliceType(CC);CZ=$ptrType(CB);DD=$arrayType($Uint8,32);DE=$sliceType($Uint8);DF=$arrayType($Uint8,9);DG=$arrayType($Uint8,64);DH=$ptrType(CA);DN=$ptrType(AB);DQ=$ptrType(BG);H=function(){var l,m,n,o;l=new($global.Date)();m=$internalize(l,$String);n=A.IndexByte(m,40);o=A.IndexByte(m,41);if((n===-1)||(o===-1)){CE.name="UTC";return;}CE.name=m.substring((n+1>>0),o);CE.zone=new CX([new CB.ptr(CE.name,($parseInt(l.getTimezoneOffset())>>0)*-60>>0,false)]);};O=function(l){var l,m;if(l.length===0){return false;}m=l.charCodeAt(0);return 97<=m&&m<=122;};P=function(l){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,cw,cx,cy,l,m="",n=0,o="",p,q,r,s,t,u,v,w,x,y,z;p=0;while(true){if(!(p>0);r=q;if(r===74){if(l.length>=(p+3>>0)&&l.substring(p,(p+3>>0))==="Jan"){if(l.length>=(p+7>>0)&&l.substring(p,(p+7>>0))==="January"){s=l.substring(0,p);t=257;u=l.substring((p+7>>0));m=s;n=t;o=u;return[m,n,o];}if(!O(l.substring((p+3>>0)))){v=l.substring(0,p);w=258;x=l.substring((p+3>>0));m=v;n=w;o=x;return[m,n,o];}}}else if(r===77){if(l.length>=(p+3>>0)){if(l.substring(p,(p+3>>0))==="Mon"){if(l.length>=(p+6>>0)&&l.substring(p,(p+6>>0))==="Monday"){y=l.substring(0,p);z=261;aa=l.substring((p+6>>0));m=y;n=z;o=aa;return[m,n,o];}if(!O(l.substring((p+3>>0)))){ab=l.substring(0,p);ac=262;ad=l.substring((p+3>>0));m=ab;n=ac;o=ad;return[m,n,o];}}if(l.substring(p,(p+3>>0))==="MST"){ae=l.substring(0,p);af=21;ag=l.substring((p+3>>0));m=ae;n=af;o=ag;return[m,n,o];}}}else if(r===48){if(l.length>=(p+2>>0)&&49<=l.charCodeAt((p+1>>0))&&l.charCodeAt((p+1>>0))<=54){ah=l.substring(0,p);ai=(aj=l.charCodeAt((p+1>>0))-49<<24>>>24,((aj<0||aj>=N.length)?$throwRuntimeError("index out of range"):N[aj]));ak=l.substring((p+2>>0));m=ah;n=ai;o=ak;return[m,n,o];}}else if(r===49){if(l.length>=(p+2>>0)&&(l.charCodeAt((p+1>>0))===53)){al=l.substring(0,p);am=522;an=l.substring((p+2>>0));m=al;n=am;o=an;return[m,n,o];}ao=l.substring(0,p);ap=259;aq=l.substring((p+1>>0));m=ao;n=ap;o=aq;return[m,n,o];}else if(r===50){if(l.length>=(p+4>>0)&&l.substring(p,(p+4>>0))==="2006"){ar=l.substring(0,p);as=273;at=l.substring((p+4>>0));m=ar;n=as;o=at;return[m,n,o];}au=l.substring(0,p);av=263;aw=l.substring((p+1>>0));m=au;n=av;o=aw;return[m,n,o];}else if(r===95){if(l.length>=(p+2>>0)&&(l.charCodeAt((p+1>>0))===50)){ax=l.substring(0,p);ay=264;az=l.substring((p+2>>0));m=ax;n=ay;o=az;return[m,n,o];}}else if(r===51){ba=l.substring(0,p);bb=523;bc=l.substring((p+1>>0));m=ba;n=bb;o=bc;return[m,n,o];}else if(r===52){bd=l.substring(0,p);be=525;bf=l.substring((p+1>>0));m=bd;n=be;o=bf;return[m,n,o];}else if(r===53){bg=l.substring(0,p);bh=527;bi=l.substring((p+1>>0));m=bg;n=bh;o=bi;return[m,n,o];}else if(r===80){if(l.length>=(p+2>>0)&&(l.charCodeAt((p+1>>0))===77)){bj=l.substring(0,p);bk=531;bl=l.substring((p+2>>0));m=bj;n=bk;o=bl;return[m,n,o];}}else if(r===112){if(l.length>=(p+2>>0)&&(l.charCodeAt((p+1>>0))===109)){bm=l.substring(0,p);bn=532;bo=l.substring((p+2>>0));m=bm;n=bn;o=bo;return[m,n,o];}}else if(r===45){if(l.length>=(p+7>>0)&&l.substring(p,(p+7>>0))==="-070000"){bp=l.substring(0,p);bq=27;br=l.substring((p+7>>0));m=bp;n=bq;o=br;return[m,n,o];}if(l.length>=(p+9>>0)&&l.substring(p,(p+9>>0))==="-07:00:00"){bs=l.substring(0,p);bt=30;bu=l.substring((p+9>>0));m=bs;n=bt;o=bu;return[m,n,o];}if(l.length>=(p+5>>0)&&l.substring(p,(p+5>>0))==="-0700"){bv=l.substring(0,p);bw=26;bx=l.substring((p+5>>0));m=bv;n=bw;o=bx;return[m,n,o];}if(l.length>=(p+6>>0)&&l.substring(p,(p+6>>0))==="-07:00"){by=l.substring(0,p);bz=29;ca=l.substring((p+6>>0));m=by;n=bz;o=ca;return[m,n,o];}if(l.length>=(p+3>>0)&&l.substring(p,(p+3>>0))==="-07"){cb=l.substring(0,p);cc=28;cd=l.substring((p+3>>0));m=cb;n=cc;o=cd;return[m,n,o];}}else if(r===90){if(l.length>=(p+7>>0)&&l.substring(p,(p+7>>0))==="Z070000"){ce=l.substring(0,p);cf=23;cg=l.substring((p+7>>0));m=ce;n=cf;o=cg;return[m,n,o];}if(l.length>=(p+9>>0)&&l.substring(p,(p+9>>0))==="Z07:00:00"){ch=l.substring(0,p);ci=25;cj=l.substring((p+9>>0));m=ch;n=ci;o=cj;return[m,n,o];}if(l.length>=(p+5>>0)&&l.substring(p,(p+5>>0))==="Z0700"){ck=l.substring(0,p);cl=22;cm=l.substring((p+5>>0));m=ck;n=cl;o=cm;return[m,n,o];}if(l.length>=(p+6>>0)&&l.substring(p,(p+6>>0))==="Z07:00"){cn=l.substring(0,p);co=24;cp=l.substring((p+6>>0));m=cn;n=co;o=cp;return[m,n,o];}}else if(r===46){if((p+1>>0)>0))===48)||(l.charCodeAt((p+1>>0))===57))){cq=l.charCodeAt((p+1>>0));cr=p+1>>0;while(true){if(!(cr>0;}if(!AD(l,cr)){cs=31;if(l.charCodeAt((p+1>>0))===57){cs=32;}cs=cs|((((cr-((p+1>>0))>>0))<<16>>0));ct=l.substring(0,p);cu=cs;cv=l.substring(cr);m=ct;n=cu;o=cv;return[m,n,o];}}}p=p+(1)>>0;}cw=l;cx=0;cy="";m=cw;n=cx;o=cy;return[m,n,o];};U=function(l,m){var l,m,n,o,p;n=0;while(true){if(!(n>>0;p=(p|(32))>>>0;if(!((o===p))||o<97||o>122){return false;}}n=n+(1)>>0;}return true;};V=function(l,m){var l,m,n,o,p,q;n=l;o=0;while(true){if(!(o=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+o]);if(m.length>=q.length&&U(m.substring(0,q.length),q)){return[p,m.substring(q.length),$ifaceNil];}o++;}return[-1,m,AA];};W=function(l,m,n){var l,m,n,o,p,q,r,s,t;if(m<10){if(!((n===0))){l=$append(l,n);}return $append(l,((48+m>>>0)<<24>>>24));}if(m<100){l=$append(l,((48+(o=m/10,(o===o&&o!==1/0&&o!==-1/0)?o>>>0:$throwRuntimeError("integer divide by zero"))>>>0)<<24>>>24));l=$append(l,((48+(p=m%10,p===p?p:$throwRuntimeError("integer divide by zero"))>>>0)<<24>>>24));return l;}q=$clone(DD.zero(),DD);r=32;if(m===0){return $append(l,48);}while(true){if(!(m>=10)){break;}r=r-(1)>>0;(r<0||r>=q.length)?$throwRuntimeError("index out of range"):q[r]=(((s=m%10,s===s?s:$throwRuntimeError("integer divide by zero"))+48>>>0)<<24>>>24);m=(t=m/(10),(t===t&&t!==1/0&&t!==-1/0)?t>>>0:$throwRuntimeError("integer divide by zero"));}r=r-(1)>>0;(r<0||r>=q.length)?$throwRuntimeError("index out of range"):q[r]=((m+48>>>0)<<24>>>24);return $appendSlice(l,$subslice(new DE(q),r));};Y=function(l){var l,m=0,n=$ifaceNil,o,p,q,r,s,t,u,v;o=false;if(!(l==="")&&((l.charCodeAt(0)===45)||(l.charCodeAt(0)===43))){o=l.charCodeAt(0)===45;l=l.substring(1);}p=AO(l);q=p[0];r=p[1];n=p[2];m=((q.$low+((q.$high>>31)*4294967296))>>0);if(!($interfaceIsEqual(n,$ifaceNil))||!(r==="")){s=0;t=X;m=s;n=t;return[m,n];}if(o){m=-m;}u=m;v=$ifaceNil;m=u;n=v;return[m,n];};Z=function(l,m,n,o){var l,m,n,o,p,q,r,s,t,u;p=m;q=$clone(DF.zero(),DF);r=9;while(true){if(!(r>0)){break;}r=r-(1)>>0;(r<0||r>=q.length)?$throwRuntimeError("index out of range"):q[r]=(((s=p%10,s===s?s:$throwRuntimeError("integer divide by zero"))+48>>>0)<<24>>>24);p=(t=p/(10),(t===t&&t!==1/0&&t!==-1/0)?t>>>0:$throwRuntimeError("integer divide by zero"));}if(n>9){n=9;}if(o){while(true){if(!(n>0&&((u=n-1>>0,((u<0||u>=q.length)?$throwRuntimeError("index out of range"):q[u]))===48))){break;}n=n-(1)>>0;}if(n===0){return l;}}l=$append(l,46);return $appendSlice(l,$subslice(new DE(q),0,n));};BG.ptr.prototype.String=function(){var l;l=$clone(this,BG);return l.Format("2006-01-02 15:04:05.999999999 -0700 MST");};BG.prototype.String=function(){return this.$val.String();};BG.ptr.prototype.Format=function(l){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;m=$clone(this,BG);n=m.locabs();o=n[0];p=n[1];q=n[2];r=-1;s=0;t=0;u=-1;v=0;w=0;x=DE.nil;y=$clone(DG.zero(),DG);z=l.length+10>>0;if(z<=64){x=$subslice(new DE(y),0,0);}else{x=$makeSlice(DE,0,z);}while(true){if(!(!(l===""))){break;}aa=P(l);ab=aa[0];ac=aa[1];ad=aa[2];if(!(ab==="")){x=$appendSlice(x,new DE($stringToBytes(ab)));}if(ac===0){break;}l=ad;if(r<0&&!(((ac&256)===0))){ae=BR(q,true);r=ae[0];s=ae[1];t=ae[2];}if(u<0&&!(((ac&512)===0))){af=BM(q);u=af[0];v=af[1];w=af[2];}ag=ac&65535;switch(0){default:if(ag===274){ah=r;if(ah<0){ah=-ah;}x=W(x,((ai=ah%100,ai===ai?ai:$throwRuntimeError("integer divide by zero"))>>>0),48);}else if(ag===273){aj=r;if(r<=-1000){x=$append(x,45);aj=-aj;}else if(r<=-100){x=$appendSlice(x,new DE($stringToBytes("-0")));aj=-aj;}else if(r<=-10){x=$appendSlice(x,new DE($stringToBytes("-00")));aj=-aj;}else if(r<0){x=$appendSlice(x,new DE($stringToBytes("-000")));aj=-aj;}else if(r<10){x=$appendSlice(x,new DE($stringToBytes("000")));}else if(r<100){x=$appendSlice(x,new DE($stringToBytes("00")));}else if(r<1000){x=$append(x,48);}x=W(x,(aj>>>0),0);}else if(ag===258){x=$appendSlice(x,new DE($stringToBytes(new BH(s).String().substring(0,3))));}else if(ag===257){ak=new BH(s).String();x=$appendSlice(x,new DE($stringToBytes(ak)));}else if(ag===259){x=W(x,(s>>>0),0);}else if(ag===260){x=W(x,(s>>>0),48);}else if(ag===262){x=$appendSlice(x,new DE($stringToBytes(new BJ(BL(q)).String().substring(0,3))));}else if(ag===261){al=new BJ(BL(q)).String();x=$appendSlice(x,new DE($stringToBytes(al)));}else if(ag===263){x=W(x,(t>>>0),0);}else if(ag===264){x=W(x,(t>>>0),32);}else if(ag===265){x=W(x,(t>>>0),48);}else if(ag===522){x=W(x,(u>>>0),48);}else if(ag===523){an=(am=u%12,am===am?am:$throwRuntimeError("integer divide by zero"));if(an===0){an=12;}x=W(x,(an>>>0),0);}else if(ag===524){ap=(ao=u%12,ao===ao?ao:$throwRuntimeError("integer divide by zero"));if(ap===0){ap=12;}x=W(x,(ap>>>0),48);}else if(ag===525){x=W(x,(v>>>0),0);}else if(ag===526){x=W(x,(v>>>0),48);}else if(ag===527){x=W(x,(w>>>0),0);}else if(ag===528){x=W(x,(w>>>0),48);}else if(ag===531){if(u>=12){x=$appendSlice(x,new DE($stringToBytes("PM")));}else{x=$appendSlice(x,new DE($stringToBytes("AM")));}}else if(ag===532){if(u>=12){x=$appendSlice(x,new DE($stringToBytes("pm")));}else{x=$appendSlice(x,new DE($stringToBytes("am")));}}else if(ag===22||ag===24||ag===23||ag===25||ag===26||ag===29||ag===27||ag===30){if((p===0)&&((ac===22)||(ac===24)||(ac===23)||(ac===25))){x=$append(x,90);break;}ar=(aq=p/60,(aq===aq&&aq!==1/0&&aq!==-1/0)?aq>>0:$throwRuntimeError("integer divide by zero"));as=p;if(ar<0){x=$append(x,45);ar=-ar;as=-as;}else{x=$append(x,43);}x=W(x,((at=ar/60,(at===at&&at!==1/0&&at!==-1/0)?at>>0:$throwRuntimeError("integer divide by zero"))>>>0),48);if((ac===24)||(ac===29)||(ac===25)||(ac===30)){x=$append(x,58);}x=W(x,((au=ar%60,au===au?au:$throwRuntimeError("integer divide by zero"))>>>0),48);if((ac===23)||(ac===27)||(ac===30)||(ac===25)){if((ac===30)||(ac===25)){x=$append(x,58);}x=W(x,((av=as%60,av===av?av:$throwRuntimeError("integer divide by zero"))>>>0),48);}}else if(ag===21){if(!(o==="")){x=$appendSlice(x,new DE($stringToBytes(o)));break;}ax=(aw=p/60,(aw===aw&&aw!==1/0&&aw!==-1/0)?aw>>0:$throwRuntimeError("integer divide by zero"));if(ax<0){x=$append(x,45);ax=-ax;}else{x=$append(x,43);}x=W(x,((ay=ax/60,(ay===ay&&ay!==1/0&&ay!==-1/0)?ay>>0:$throwRuntimeError("integer divide by zero"))>>>0),48);x=W(x,((az=ax%60,az===az?az:$throwRuntimeError("integer divide by zero"))>>>0),48);}else if(ag===31||ag===32){x=Z(x,(m.Nanosecond()>>>0),ac>>16>>0,(ac&65535)===32);}}}return $bytesToString(x);};BG.prototype.Format=function(l){return this.$val.Format(l);};AC=function(l){var l;return"\""+l+"\"";};AB.ptr.prototype.Error=function(){var l;l=this;if(l.Message===""){return"parsing time "+AC(l.Value)+" as "+AC(l.Layout)+": cannot parse "+AC(l.ValueElem)+" as "+AC(l.LayoutElem);}return"parsing time "+AC(l.Value)+l.Message;};AB.prototype.Error=function(){return this.$val.Error();};AD=function(l,m){var l,m,n;if(l.length<=m){return false;}n=l.charCodeAt(m);return 48<=n&&n<=57;};AE=function(l,m){var l,m;if(!AD(l,0)){return[0,l,AA];}if(!AD(l,1)){if(m){return[0,l,AA];}return[((l.charCodeAt(0)-48<<24>>>24)>>0),l.substring(1),$ifaceNil];}return[(((l.charCodeAt(0)-48<<24>>>24)>>0)*10>>0)+((l.charCodeAt(1)-48<<24>>>24)>>0)>>0,l.substring(2),$ifaceNil];};AF=function(l){var l;while(true){if(!(l.length>0&&(l.charCodeAt(0)===32))){break;}l=l.substring(1);}return l;};AG=function(l,m){var l,m;while(true){if(!(m.length>0)){break;}if(m.charCodeAt(0)===32){if(l.length>0&&!((l.charCodeAt(0)===32))){return[l,AA];}m=AF(m);l=AF(l);continue;}if((l.length===0)||!((l.charCodeAt(0)===m.charCodeAt(0)))){return[l,AA];}m=m.substring(1);l=l.substring(1);}return[l,$ifaceNil];};AH=$pkg.Parse=function(l,m){var l,m;return AJ(l,m,$pkg.UTC,$pkg.Local);};AJ=function(l,m,n,o){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,cw,cx,cy,cz,da,db,dc,dd,de,df,dg,dh,di,dj,dk,dl,dm,dn,dp,dq,dr,ds,dt,du,dv,dw,dx,dy,dz,ea,eb,ec,ed,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;p=l;q=m;r=p;s=q;t="";u=false;v=false;w=0;x=1;y=1;z=0;aa=0;ab=0;ac=0;ad=DH.nil;ae=-1;af="";while(true){if(!(true)){break;}ag=$ifaceNil;ah=P(l);ai=ah[0];aj=ah[1];ak=ah[2];al=l.substring(ai.length,(l.length-ak.length>>0));am=AG(m,ai);m=am[0];ag=am[1];if(!($interfaceIsEqual(ag,$ifaceNil))){return[new BG.ptr(new $Int64(0,0),0,DH.nil),new AB.ptr(r,s,ai,m,"")];}if(aj===0){if(!((m.length===0))){return[new BG.ptr(new $Int64(0,0),0,DH.nil),new AB.ptr(r,s,"",m,": extra text: "+m)];}break;}l=ak;an="";ao=aj&65535;switch(0){default:if(ao===274){if(m.length<2){ag=AA;break;}ap=m.substring(0,2);aq=m.substring(2);an=ap;m=aq;ar=Y(an);w=ar[0];ag=ar[1];if(w>=69){w=w+(1900)>>0;}else{w=w+(2000)>>0;}}else if(ao===273){if(m.length<4||!AD(m,0)){ag=AA;break;}as=m.substring(0,4);at=m.substring(4);an=as;m=at;au=Y(an);w=au[0];ag=au[1];}else if(ao===258){av=V(S,m);x=av[0];m=av[1];ag=av[2];}else if(ao===257){aw=V(T,m);x=aw[0];m=aw[1];ag=aw[2];}else if(ao===259||ao===260){ax=AE(m,aj===260);x=ax[0];m=ax[1];ag=ax[2];if(x<=0||120&&(m.charCodeAt(0)===32)){m=m.substring(1);}ba=AE(m,aj===265);y=ba[0];m=ba[1];ag=ba[2];if(y<0||31=2&&(m.charCodeAt(0)===46)&&AD(m,1)){bf=P(l);aj=bf[1];aj=aj&(65535);if((aj===31)||(aj===32)){break;}bg=2;while(true){if(!(bg>0;}bh=AM(m,bg);ac=bh[0];t=bh[1];ag=bh[2];m=m.substring(bg);}}else if(ao===531){if(m.length<2){ag=AA;break;}bi=m.substring(0,2);bj=m.substring(2);an=bi;m=bj;bk=an;if(bk==="PM"){v=true;}else if(bk==="AM"){u=true;}else{ag=AA;}}else if(ao===532){if(m.length<2){ag=AA;break;}bl=m.substring(0,2);bm=m.substring(2);an=bl;m=bm;bn=an;if(bn==="pm"){v=true;}else if(bn==="am"){u=true;}else{ag=AA;}}else if(ao===22||ao===24||ao===23||ao===25||ao===26||ao===28||ao===29||ao===27||ao===30){if(((aj===22)||(aj===24))&&m.length>=1&&(m.charCodeAt(0)===90)){m=m.substring(1);ad=$pkg.UTC;break;}bo="";bp="";bq="";br="";bs=bo;bt=bp;bu=bq;bv=br;if((aj===24)||(aj===29)){if(m.length<6){ag=AA;break;}if(!((m.charCodeAt(3)===58))){ag=AA;break;}bw=m.substring(0,1);bx=m.substring(1,3);by=m.substring(4,6);bz="00";ca=m.substring(6);bs=bw;bt=bx;bu=by;bv=bz;m=ca;}else if(aj===28){if(m.length<3){ag=AA;break;}cb=m.substring(0,1);cc=m.substring(1,3);cd="00";ce="00";cf=m.substring(3);bs=cb;bt=cc;bu=cd;bv=ce;m=cf;}else if((aj===25)||(aj===30)){if(m.length<9){ag=AA;break;}if(!((m.charCodeAt(3)===58))||!((m.charCodeAt(6)===58))){ag=AA;break;}cg=m.substring(0,1);ch=m.substring(1,3);ci=m.substring(4,6);cj=m.substring(7,9);ck=m.substring(9);bs=cg;bt=ch;bu=ci;bv=cj;m=ck;}else if((aj===23)||(aj===27)){if(m.length<7){ag=AA;break;}cl=m.substring(0,1);cm=m.substring(1,3);cn=m.substring(3,5);co=m.substring(5,7);cp=m.substring(7);bs=cl;bt=cm;bu=cn;bv=co;m=cp;}else{if(m.length<5){ag=AA;break;}cq=m.substring(0,1);cr=m.substring(1,3);cs=m.substring(3,5);ct="00";cu=m.substring(5);bs=cq;bt=cr;bu=cs;bv=ct;m=cu;}cv=0;cw=0;cx=0;cy=cv;cz=cw;da=cx;db=Y(bt);cy=db[0];ag=db[1];if($interfaceIsEqual(ag,$ifaceNil)){dc=Y(bu);cz=dc[0];ag=dc[1];}if($interfaceIsEqual(ag,$ifaceNil)){dd=Y(bv);da=dd[0];ag=dd[1];}ae=((((cy*60>>0)+cz>>0))*60>>0)+da>>0;de=bs.charCodeAt(0);if(de===43){}else if(de===45){ae=-ae;}else{ag=AA;}}else if(ao===21){if(m.length>=3&&m.substring(0,3)==="UTC"){ad=$pkg.UTC;m=m.substring(3);break;}df=AK(m);dg=df[0];dh=df[1];if(!dh){ag=AA;break;}di=m.substring(0,dg);dj=m.substring(dg);af=di;m=dj;}else if(ao===31){dk=1+((aj>>16>>0))>>0;if(m.length>0)>0))&&m.charCodeAt((dm+1>>0))<=57)){break;}dm=dm+(1)>>0;}dn=AM(m,1+dm>>0);ac=dn[0];t=dn[1];ag=dn[2];m=m.substring((1+dm>>0));}}if(!(t==="")){return[new BG.ptr(new $Int64(0,0),0,DH.nil),new AB.ptr(r,s,al,m,": "+t+" out of range")];}if(!($interfaceIsEqual(ag,$ifaceNil))){return[new BG.ptr(new $Int64(0,0),0,DH.nil),new AB.ptr(r,s,al,m,"")];}}if(v&&z<12){z=z+(12)>>0;}else if(u&&(z===12)){z=0;}if(!(ad===DH.nil)){return[BY(w,(x>>0),y,z,aa,ab,ac,ad),$ifaceNil];}if(!((ae===-1))){dp=$clone(BY(w,(x>>0),y,z,aa,ab,ac,$pkg.UTC),BG);dp.sec=(dq=dp.sec,dr=new $Int64(0,ae),new $Int64(dq.$high-dr.$high,dq.$low-dr.$low));ds=o.lookup((dt=dp.sec,new $Int64(dt.$high+-15,dt.$low+2288912640)));du=ds[0];dv=ds[1];if((dv===ae)&&(af===""||du===af)){dp.loc=o;return[dp,$ifaceNil];}dp.loc=CG(af,ae);return[dp,$ifaceNil];}if(!(af==="")){dw=$clone(BY(w,(x>>0),y,z,aa,ab,ac,$pkg.UTC),BG);dx=o.lookupName(af,(dy=dw.sec,new $Int64(dy.$high+-15,dy.$low+2288912640)));dz=dx[0];ea=dx[2];if(ea){dw.sec=(eb=dw.sec,ec=new $Int64(0,dz),new $Int64(eb.$high-ec.$high,eb.$low-ec.$low));dw.loc=o;return[dw,$ifaceNil];}if(af.length>3&&af.substring(0,3)==="GMT"){ed=Y(af.substring(3));dz=ed[0];dz=dz*(3600)>>0;}dw.loc=CG(af,dz);return[dw,$ifaceNil];}return[BY(w,(x>>0),y,z,aa,ab,ac,n),$ifaceNil];};AK=function(l){var aa,ab,ac,ad,ae,af,ag,l,m=0,n=false,o,p,q,r,s,t,u,v,w,x,y,z;if(l.length<3){o=0;p=false;m=o;n=p;return[m,n];}if(l.length>=4&&(l.substring(0,4)==="ChST"||l.substring(0,4)==="MeST")){q=4;r=true;m=q;n=r;return[m,n];}if(l.substring(0,3)==="GMT"){m=AL(l);s=m;t=true;m=s;n=t;return[m,n];}u=0;u=0;while(true){if(!(u<6)){break;}if(u>=l.length){break;}v=l.charCodeAt(u);if(v<65||90>0;}w=u;if(w===0||w===1||w===2||w===6){x=0;y=false;m=x;n=y;return[m,n];}else if(w===5){if(l.charCodeAt(4)===84){z=5;aa=true;m=z;n=aa;return[m,n];}}else if(w===4){if(l.charCodeAt(3)===84){ab=4;ac=true;m=ab;n=ac;return[m,n];}}else if(w===3){ad=3;ae=true;m=ad;n=ae;return[m,n];}af=0;ag=false;m=af;n=ag;return[m,n];};AL=function(l){var l,m,n,o,p,q;l=l.substring(3);if(l.length===0){return 3;}m=l.charCodeAt(0);if(!((m===45))&&!((m===43))){return 3;}n=AO(l.substring(1));o=n[0];p=n[1];q=n[2];if(!($interfaceIsEqual(q,$ifaceNil))){return 3;}if(m===45){o=new $Int64(-o.$high,-o.$low);}if((o.$high===0&&o.$low===0)||(o.$high<-1||(o.$high===-1&&o.$low<4294967282))||(0>0)-p.length>>0;};AM=function(l,m){var l,m,n=0,o="",p=$ifaceNil,q,r,s;if(!((l.charCodeAt(0)===46))){p=AA;return[n,o,p];}q=Y(l.substring(1,m));n=q[0];p=q[1];if(!($interfaceIsEqual(p,$ifaceNil))){return[n,o,p];}if(n<0||1000000000<=n){o="fractional second";return[n,o,p];}r=10-m>>0;s=0;while(true){if(!(s>0;s=s+(1)>>0;}return[n,o,p];};AO=function(l){var l,m=new $Int64(0,0),n="",o=$ifaceNil,p,q,r,s,t,u,v,w,x,y,z;p=0;while(true){if(!(p57){break;}if((m.$high>214748364||(m.$high===214748364&&m.$low>=3435973835))){r=new $Int64(0,0);s="";t=AN;m=r;n=s;o=t;return[m,n,o];}m=(u=(v=$mul64(m,new $Int64(0,10)),w=new $Int64(0,q),new $Int64(v.$high+w.$high,v.$low+w.$low)),new $Int64(u.$high-0,u.$low-48));p=p+(1)>>0;}x=m;y=l.substring(p);z=$ifaceNil;m=x;n=y;o=z;return[m,n,o];};BG.ptr.prototype.After=function(l){var l,m,n,o,p,q;m=$clone(this,BG);l=$clone(l,BG);return(n=m.sec,o=l.sec,(n.$high>o.$high||(n.$high===o.$high&&n.$low>o.$low)))||(p=m.sec,q=l.sec,(p.$high===q.$high&&p.$low===q.$low))&&m.nsec>l.nsec;};BG.prototype.After=function(l){return this.$val.After(l);};BG.ptr.prototype.Before=function(l){var l,m,n,o,p,q;m=$clone(this,BG);l=$clone(l,BG);return(n=m.sec,o=l.sec,(n.$high>0,((m<0||m>=BI.length)?$throwRuntimeError("index out of range"):BI[m]));};$ptrType(BH).prototype.String=function(){return new BH(this.$get()).String();};BJ.prototype.String=function(){var l;l=this.$val;return((l<0||l>=BK.length)?$throwRuntimeError("index out of range"):BK[l]);};$ptrType(BJ).prototype.String=function(){return new BJ(this.$get()).String();};BG.ptr.prototype.IsZero=function(){var l,m;l=$clone(this,BG);return(m=l.sec,(m.$high===0&&m.$low===0))&&(l.nsec===0);};BG.prototype.IsZero=function(){return this.$val.IsZero();};BG.ptr.prototype.abs=function(){var l,m,n,o,p,q,r,s,t,u,v;l=$clone(this,BG);m=l.loc;if(m===DH.nil||m===CE){m=m.get();}o=(n=l.sec,new $Int64(n.$high+-15,n.$low+2288912640));if(!(m===CD)){if(!(m.cacheZone===CZ.nil)&&(p=m.cacheStart,(p.$high>0)/86400,(n===n&&n!==1/0&&n!==-1/0)?n>>0:$throwRuntimeError("integer divide by zero"))>>0);};BG.ptr.prototype.ISOWeek=function(){var l=0,m=0,n,o,p,q,r,s,t,u,v,w,x,y;n=$clone(this,BG);o=n.date(true);l=o[0];p=o[1];q=o[2];r=o[3];t=(s=((n.Weekday()+6>>0)>>0)%7,s===s?s:$throwRuntimeError("integer divide by zero"));m=(u=(((r-t>>0)+7>>0))/7,(u===u&&u!==1/0&&u!==-1/0)?u>>0:$throwRuntimeError("integer divide by zero"));w=(v=(((t-r>>0)+371>>0))%7,v===v?v:$throwRuntimeError("integer divide by zero"));if(1<=w&&w<=3){m=m+(1)>>0;}if(m===0){l=l-(1)>>0;m=52;if((w===4)||((w===5)&&BW(l))){m=m+(1)>>0;}}if((p===12)&&q>=29&&t<3){y=(x=(((t+31>>0)-q>>0))%7,x===x?x:$throwRuntimeError("integer divide by zero"));if(0<=y&&y<=2){l=l+(1)>>0;m=1;}}return[l,m];};BG.prototype.ISOWeek=function(){return this.$val.ISOWeek();};BG.ptr.prototype.Clock=function(){var l=0,m=0,n=0,o,p;o=$clone(this,BG);p=BM(o.abs());l=p[0];m=p[1];n=p[2];return[l,m,n];};BG.prototype.Clock=function(){return this.$val.Clock();};BM=function(l){var l,m=0,n=0,o=0,p,q;o=($div64(l,new $Uint64(0,86400),true).$low>>0);m=(p=o/3600,(p===p&&p!==1/0&&p!==-1/0)?p>>0:$throwRuntimeError("integer divide by zero"));o=o-((m*3600>>0))>>0;n=(q=o/60,(q===q&&q!==1/0&&q!==-1/0)?q>>0:$throwRuntimeError("integer divide by zero"));o=o-((n*60>>0))>>0;return[m,n,o];};BG.ptr.prototype.Hour=function(){var l,m;l=$clone(this,BG);return(m=($div64(l.abs(),new $Uint64(0,86400),true).$low>>0)/3600,(m===m&&m!==1/0&&m!==-1/0)?m>>0:$throwRuntimeError("integer divide by zero"));};BG.prototype.Hour=function(){return this.$val.Hour();};BG.ptr.prototype.Minute=function(){var l,m;l=$clone(this,BG);return(m=($div64(l.abs(),new $Uint64(0,3600),true).$low>>0)/60,(m===m&&m!==1/0&&m!==-1/0)?m>>0:$throwRuntimeError("integer divide by zero"));};BG.prototype.Minute=function(){return this.$val.Minute();};BG.ptr.prototype.Second=function(){var l;l=$clone(this,BG);return($div64(l.abs(),new $Uint64(0,60),true).$low>>0);};BG.prototype.Second=function(){return this.$val.Second();};BG.ptr.prototype.Nanosecond=function(){var l;l=$clone(this,BG);return(l.nsec>>0);};BG.prototype.Nanosecond=function(){return this.$val.Nanosecond();};BG.ptr.prototype.YearDay=function(){var l,m,n;l=$clone(this,BG);m=l.date(false);n=m[3];return n+1>>0;};BG.prototype.YearDay=function(){return this.$val.YearDay();};BN.prototype.String=function(){var l,m,n,o,p,q,r,s;l=this;m=$clone(DD.zero(),DD);n=32;o=new $Uint64(l.$high,l.$low);p=(l.$high<0||(l.$high===0&&l.$low<0));if(p){o=new $Uint64(-o.$high,-o.$low);}if((o.$high<0||(o.$high===0&&o.$low<1000000000))){q=0;n=n-(1)>>0;(n<0||n>=m.length)?$throwRuntimeError("index out of range"):m[n]=115;n=n-(1)>>0;if((o.$high===0&&o.$low===0)){return"0";}else if((o.$high<0||(o.$high===0&&o.$low<1000))){q=0;(n<0||n>=m.length)?$throwRuntimeError("index out of range"):m[n]=110;}else if((o.$high<0||(o.$high===0&&o.$low<1000000))){q=3;n=n-(1)>>0;$copyString($subslice(new DE(m),n),"\xC2\xB5");}else{q=6;(n<0||n>=m.length)?$throwRuntimeError("index out of range"):m[n]=109;}r=BO($subslice(new DE(m),0,n),o,q);n=r[0];o=r[1];n=BP($subslice(new DE(m),0,n),o);}else{n=n-(1)>>0;(n<0||n>=m.length)?$throwRuntimeError("index out of range"):m[n]=115;s=BO($subslice(new DE(m),0,n),o,9);n=s[0];o=s[1];n=BP($subslice(new DE(m),0,n),$div64(o,new $Uint64(0,60),true));o=$div64(o,(new $Uint64(0,60)),false);if((o.$high>0||(o.$high===0&&o.$low>0))){n=n-(1)>>0;(n<0||n>=m.length)?$throwRuntimeError("index out of range"):m[n]=109;n=BP($subslice(new DE(m),0,n),$div64(o,new $Uint64(0,60),true));o=$div64(o,(new $Uint64(0,60)),false);if((o.$high>0||(o.$high===0&&o.$low>0))){n=n-(1)>>0;(n<0||n>=m.length)?$throwRuntimeError("index out of range"):m[n]=104;n=BP($subslice(new DE(m),0,n),o);}}}if(p){n=n-(1)>>0;(n<0||n>=m.length)?$throwRuntimeError("index out of range"):m[n]=45;}return $bytesToString($subslice(new DE(m),n));};$ptrType(BN).prototype.String=function(){return this.$get().String();};BO=function(l,m,n){var l,m,n,o=0,p=new $Uint64(0,0),q,r,s,t,u,v;q=l.$length;r=false;s=0;while(true){if(!(s>0;(q<0||q>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+q]=(t.$low<<24>>>24)+48<<24>>>24;}m=$div64(m,(new $Uint64(0,10)),false);s=s+(1)>>0;}if(r){q=q-(1)>>0;(q<0||q>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+q]=46;}u=q;v=m;o=u;p=v;return[o,p];};BP=function(l,m){var l,m,n;n=l.$length;if((m.$high===0&&m.$low===0)){n=n-(1)>>0;(n<0||n>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+n]=48;}else{while(true){if(!((m.$high>0||(m.$high===0&&m.$low>0)))){break;}n=n-(1)>>0;(n<0||n>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+n]=($div64(m,new $Uint64(0,10),true).$low<<24>>>24)+48<<24>>>24;m=$div64(m,(new $Uint64(0,10)),false);}}return n;};BN.prototype.Nanoseconds=function(){var l;l=this;return new $Int64(l.$high,l.$low);};$ptrType(BN).prototype.Nanoseconds=function(){return this.$get().Nanoseconds();};BN.prototype.Seconds=function(){var l,m,n;l=this;m=$div64(l,new BN(0,1000000000),false);n=$div64(l,new BN(0,1000000000),true);return $flatten64(m)+$flatten64(n)*1e-09;};$ptrType(BN).prototype.Seconds=function(){return this.$get().Seconds();};BN.prototype.Minutes=function(){var l,m,n;l=this;m=$div64(l,new BN(13,4165425152),false);n=$div64(l,new BN(13,4165425152),true);return $flatten64(m)+$flatten64(n)*1.6666666666666667e-11;};$ptrType(BN).prototype.Minutes=function(){return this.$get().Minutes();};BN.prototype.Hours=function(){var l,m,n;l=this;m=$div64(l,new BN(838,817405952),false);n=$div64(l,new BN(838,817405952),true);return $flatten64(m)+$flatten64(n)*2.777777777777778e-13;};$ptrType(BN).prototype.Hours=function(){return this.$get().Hours();};BG.ptr.prototype.Add=function(l){var l,m,n,o,p,q,r,s,t,u,v;m=$clone(this,BG);m.sec=(n=m.sec,o=(p=$div64(l,new BN(0,1000000000),false),new $Int64(p.$high,p.$low)),new $Int64(n.$high+o.$high,n.$low+o.$low));r=m.nsec+((q=$div64(l,new BN(0,1000000000),true),q.$low+((q.$high>>31)*4294967296))>>0)>>0;if(r>=1000000000){m.sec=(s=m.sec,t=new $Int64(0,1),new $Int64(s.$high+t.$high,s.$low+t.$low));r=r-(1000000000)>>0;}else if(r<0){m.sec=(u=m.sec,v=new $Int64(0,1),new $Int64(u.$high-v.$high,u.$low-v.$low));r=r+(1000000000)>>0;}m.nsec=r;return m;};BG.prototype.Add=function(l){return this.$val.Add(l);};BG.ptr.prototype.Sub=function(l){var l,m,n,o,p,q,r,s;m=$clone(this,BG);l=$clone(l,BG);s=(n=$mul64((o=(p=m.sec,q=l.sec,new $Int64(p.$high-q.$high,p.$low-q.$low)),new BN(o.$high,o.$low)),new BN(0,1000000000)),r=new BN(0,(m.nsec-l.nsec>>0)),new BN(n.$high+r.$high,n.$low+r.$low));if(l.Add(s).Equal(m)){return s;}else if(m.Before(l)){return new BN(-2147483648,0);}else{return new BN(2147483647,4294967295);}};BG.prototype.Sub=function(l){return this.$val.Sub(l);};BG.ptr.prototype.AddDate=function(l,m,n){var l,m,n,o,p,q,r,s,t,u,v,w;o=$clone(this,BG);p=o.Date();q=p[0];r=p[1];s=p[2];t=o.Clock();u=t[0];v=t[1];w=t[2];return BY(q+l>>0,r+(m>>0)>>0,s+n>>0,u,v,w,(o.nsec>>0),o.loc);};BG.prototype.AddDate=function(l,m,n){return this.$val.AddDate(l,m,n);};BG.ptr.prototype.date=function(l){var l,m=0,n=0,o=0,p=0,q,r;q=$clone(this,BG);r=BR(q.abs(),l);m=r[0];n=r[1];o=r[2];p=r[3];return[m,n,o,p];};BG.prototype.date=function(l){return this.$val.date(l);};BR=function(l,m){var aa,ab,ac,ad,ae,af,ag,ah,ai,l,m,n=0,o=0,p=0,q=0,r,s,t,u,v,w,x,y,z;r=$div64(l,new $Uint64(0,86400),false);s=$div64(r,new $Uint64(0,146097),false);t=$mul64(new $Uint64(0,400),s);r=(u=$mul64(new $Uint64(0,146097),s),new $Uint64(r.$high-u.$high,r.$low-u.$low));s=$div64(r,new $Uint64(0,36524),false);s=(v=$shiftRightUint64(s,2),new $Uint64(s.$high-v.$high,s.$low-v.$low));t=(w=$mul64(new $Uint64(0,100),s),new $Uint64(t.$high+w.$high,t.$low+w.$low));r=(x=$mul64(new $Uint64(0,36524),s),new $Uint64(r.$high-x.$high,r.$low-x.$low));s=$div64(r,new $Uint64(0,1461),false);t=(y=$mul64(new $Uint64(0,4),s),new $Uint64(t.$high+y.$high,t.$low+y.$low));r=(z=$mul64(new $Uint64(0,1461),s),new $Uint64(r.$high-z.$high,r.$low-z.$low));s=$div64(r,new $Uint64(0,365),false);s=(aa=$shiftRightUint64(s,2),new $Uint64(s.$high-aa.$high,s.$low-aa.$low));t=(ab=s,new $Uint64(t.$high+ab.$high,t.$low+ab.$low));r=(ac=$mul64(new $Uint64(0,365),s),new $Uint64(r.$high-ac.$high,r.$low-ac.$low));n=((ad=(ae=new $Int64(t.$high,t.$low),new $Int64(ae.$high+-69,ae.$low+4075721025)),ad.$low+((ad.$high>>31)*4294967296))>>0);q=(r.$low>>0);if(!m){return[n,o,p,q];}p=q;if(BW(n)){if(p>59){p=p-(1)>>0;}else if(p===59){o=2;p=29;return[n,o,p,q];}}o=((af=p/31,(af===af&&af!==1/0&&af!==-1/0)?af>>0:$throwRuntimeError("integer divide by zero"))>>0);ah=((ag=o+1>>0,((ag<0||ag>=BS.length)?$throwRuntimeError("index out of range"):BS[ag]))>>0);ai=0;if(p>=ah){o=o+(1)>>0;ai=ah;}else{ai=(((o<0||o>=BS.length)?$throwRuntimeError("index out of range"):BS[o])>>0);}o=o+(1)>>0;p=(p-ai>>0)+1>>0;return[n,o,p,q];};BG.ptr.prototype.UTC=function(){var l;l=$clone(this,BG);l.loc=$pkg.UTC;return l;};BG.prototype.UTC=function(){return this.$val.UTC();};BG.ptr.prototype.Local=function(){var l;l=$clone(this,BG);l.loc=$pkg.Local;return l;};BG.prototype.Local=function(){return this.$val.Local();};BG.ptr.prototype.In=function(l){var l,m;m=$clone(this,BG);if(l===DH.nil){$panic(new $String("time: missing Location in call to Time.In"));}m.loc=l;return m;};BG.prototype.In=function(l){return this.$val.In(l);};BG.ptr.prototype.Location=function(){var l,m;l=$clone(this,BG);m=l.loc;if(m===DH.nil){m=$pkg.UTC;}return m;};BG.prototype.Location=function(){return this.$val.Location();};BG.ptr.prototype.Zone=function(){var l="",m=0,n,o,p;n=$clone(this,BG);o=n.loc.lookup((p=n.sec,new $Int64(p.$high+-15,p.$low+2288912640)));l=o[0];m=o[1];return[l,m];};BG.prototype.Zone=function(){return this.$val.Zone();};BG.ptr.prototype.Unix=function(){var l,m;l=$clone(this,BG);return(m=l.sec,new $Int64(m.$high+-15,m.$low+2288912640));};BG.prototype.Unix=function(){return this.$val.Unix();};BG.ptr.prototype.UnixNano=function(){var l,m,n,o;l=$clone(this,BG);return(m=$mul64(((n=l.sec,new $Int64(n.$high+-15,n.$low+2288912640))),new $Int64(0,1000000000)),o=new $Int64(0,l.nsec),new $Int64(m.$high+o.$high,m.$low+o.$low));};BG.prototype.UnixNano=function(){return this.$val.UnixNano();};BG.ptr.prototype.MarshalBinary=function(){var l,m,n,o,p,q,r;l=$clone(this,BG);m=0;if(l.Location()===CD){m=-1;}else{n=l.Zone();o=n[1];if(!(((p=o%60,p===p?p:$throwRuntimeError("integer divide by zero"))===0))){return[DE.nil,C.New("Time.MarshalBinary: zone offset has fractional minute")];}o=(q=o/(60),(q===q&&q!==1/0&&q!==-1/0)?q>>0:$throwRuntimeError("integer divide by zero"));if(o<-32768||(o===-1)||o>32767){return[DE.nil,C.New("Time.MarshalBinary: unexpected zone offset")];}m=(o<<16>>16);}r=new DE([1,($shiftRightInt64(l.sec,56).$low<<24>>>24),($shiftRightInt64(l.sec,48).$low<<24>>>24),($shiftRightInt64(l.sec,40).$low<<24>>>24),($shiftRightInt64(l.sec,32).$low<<24>>>24),($shiftRightInt64(l.sec,24).$low<<24>>>24),($shiftRightInt64(l.sec,16).$low<<24>>>24),($shiftRightInt64(l.sec,8).$low<<24>>>24),(l.sec.$low<<24>>>24),((l.nsec>>24>>0)<<24>>>24),((l.nsec>>16>>0)<<24>>>24),((l.nsec>>8>>0)<<24>>>24),(l.nsec<<24>>>24),((m>>8<<16>>16)<<24>>>24),(m<<24>>>24)]);return[r,$ifaceNil];};BG.prototype.MarshalBinary=function(){return this.$val.MarshalBinary();};BG.ptr.prototype.UnmarshalBinary=function(l){var aa,ab,ac,ad,ae,af,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;m=this;n=l;if(n.$length===0){return C.New("Time.UnmarshalBinary: no data");}if(!((((0<0||0>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+0])===1))){return C.New("Time.UnmarshalBinary: unsupported version");}if(!((n.$length===15))){return C.New("Time.UnmarshalBinary: invalid length");}n=$subslice(n,1);m.sec=(o=(p=(q=(r=(s=(t=(u=new $Int64(0,((7<0||7>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+7])),v=$shiftLeft64(new $Int64(0,((6<0||6>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+6])),8),new $Int64(u.$high|v.$high,(u.$low|v.$low)>>>0)),w=$shiftLeft64(new $Int64(0,((5<0||5>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+5])),16),new $Int64(t.$high|w.$high,(t.$low|w.$low)>>>0)),x=$shiftLeft64(new $Int64(0,((4<0||4>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+4])),24),new $Int64(s.$high|x.$high,(s.$low|x.$low)>>>0)),y=$shiftLeft64(new $Int64(0,((3<0||3>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+3])),32),new $Int64(r.$high|y.$high,(r.$low|y.$low)>>>0)),z=$shiftLeft64(new $Int64(0,((2<0||2>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+2])),40),new $Int64(q.$high|z.$high,(q.$low|z.$low)>>>0)),aa=$shiftLeft64(new $Int64(0,((1<0||1>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+1])),48),new $Int64(p.$high|aa.$high,(p.$low|aa.$low)>>>0)),ab=$shiftLeft64(new $Int64(0,((0<0||0>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+0])),56),new $Int64(o.$high|ab.$high,(o.$low|ab.$low)>>>0));n=$subslice(n,8);m.nsec=(((((3<0||3>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+3])>>0)|((((2<0||2>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+2])>>0)<<8>>0))|((((1<0||1>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+1])>>0)<<16>>0))|((((0<0||0>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+0])>>0)<<24>>0);n=$subslice(n,4);ac=(((((1<0||1>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+1])<<16>>16)|((((0<0||0>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+0])<<16>>16)<<8<<16>>16))>>0)*60>>0;if(ac===-60){m.loc=CD;}else{ad=$pkg.Local.lookup((ae=m.sec,new $Int64(ae.$high+-15,ae.$low+2288912640)));af=ad[1];if(ac===af){m.loc=$pkg.Local;}else{m.loc=CG("",ac);}}return $ifaceNil;};BG.prototype.UnmarshalBinary=function(l){return this.$val.UnmarshalBinary(l);};BG.ptr.prototype.GobEncode=function(){var l;l=$clone(this,BG);return l.MarshalBinary();};BG.prototype.GobEncode=function(){return this.$val.GobEncode();};BG.ptr.prototype.GobDecode=function(l){var l,m;m=this;return m.UnmarshalBinary(l);};BG.prototype.GobDecode=function(l){return this.$val.GobDecode(l);};BG.ptr.prototype.MarshalJSON=function(){var l,m;l=$clone(this,BG);m=l.Year();if(m<0||m>=10000){return[DE.nil,C.New("Time.MarshalJSON: year outside of range [0,9999]")];}return[new DE($stringToBytes(l.Format("\"2006-01-02T15:04:05.999999999Z07:00\""))),$ifaceNil];};BG.prototype.MarshalJSON=function(){return this.$val.MarshalJSON();};BG.ptr.prototype.UnmarshalJSON=function(l){var l,m=$ifaceNil,n,o;n=this;o=AH("\"2006-01-02T15:04:05Z07:00\"",$bytesToString(l));$copy(n,o[0],BG);m=o[1];return m;};BG.prototype.UnmarshalJSON=function(l){return this.$val.UnmarshalJSON(l);};BG.ptr.prototype.MarshalText=function(){var l,m;l=$clone(this,BG);m=l.Year();if(m<0||m>=10000){return[DE.nil,C.New("Time.MarshalText: year outside of range [0,9999]")];}return[new DE($stringToBytes(l.Format("2006-01-02T15:04:05.999999999Z07:00"))),$ifaceNil];};BG.prototype.MarshalText=function(){return this.$val.MarshalText();};BG.ptr.prototype.UnmarshalText=function(l){var l,m=$ifaceNil,n,o;n=this;o=AH("2006-01-02T15:04:05Z07:00",$bytesToString(l));$copy(n,o[0],BG);m=o[1];return m;};BG.prototype.UnmarshalText=function(l){return this.$val.UnmarshalText(l);};BV=$pkg.Unix=function(l,m){var l,m,n,o,p,q,r;if((m.$high<0||(m.$high===0&&m.$low<0))||(m.$high>0||(m.$high===0&&m.$low>=1000000000))){n=$div64(m,new $Int64(0,1000000000),false);l=(o=n,new $Int64(l.$high+o.$high,l.$low+o.$low));m=(p=$mul64(n,new $Int64(0,1000000000)),new $Int64(m.$high-p.$high,m.$low-p.$low));if((m.$high<0||(m.$high===0&&m.$low<0))){m=(q=new $Int64(0,1000000000),new $Int64(m.$high+q.$high,m.$low+q.$low));l=(r=new $Int64(0,1),new $Int64(l.$high-r.$high,l.$low-r.$low));}}return new BG.ptr(new $Int64(l.$high+14,l.$low+2006054656),((m.$low+((m.$high>>31)*4294967296))>>0),$pkg.Local);};BW=function(l){var l,m,n,o;return((m=l%4,m===m?m:$throwRuntimeError("integer divide by zero"))===0)&&(!(((n=l%100,n===n?n:$throwRuntimeError("integer divide by zero"))===0))||((o=l%400,o===o?o:$throwRuntimeError("integer divide by zero"))===0));};BX=function(l,m,n){var l,m,n,o=0,p=0,q,r,s,t,u,v;if(m<0){r=(q=((-m-1>>0))/n,(q===q&&q!==1/0&&q!==-1/0)?q>>0:$throwRuntimeError("integer divide by zero"))+1>>0;l=l-(r)>>0;m=m+((r*n>>0))>>0;}if(m>=n){t=(s=m/n,(s===s&&s!==1/0&&s!==-1/0)?s>>0:$throwRuntimeError("integer divide by zero"));l=l+(t)>>0;m=m-((t*n>>0))>>0;}u=l;v=m;o=u;p=v;return[o,p];};BY=$pkg.Date=function(l,m,n,o,p,q,r,s){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;if(s===DH.nil){$panic(new $String("time: missing Location in call to Date"));}t=(m>>0)-1>>0;u=BX(l,t,12);l=u[0];t=u[1];m=(t>>0)+1>>0;v=BX(q,r,1000000000);q=v[0];r=v[1];w=BX(p,q,60);p=w[0];q=w[1];x=BX(o,p,60);o=x[0];p=x[1];y=BX(n,o,24);n=y[0];o=y[1];ab=(z=(aa=new $Int64(0,l),new $Int64(aa.$high- -69,aa.$low-4075721025)),new $Uint64(z.$high,z.$low));ac=$div64(ab,new $Uint64(0,400),false);ab=(ad=$mul64(new $Uint64(0,400),ac),new $Uint64(ab.$high-ad.$high,ab.$low-ad.$low));ae=$mul64(new $Uint64(0,146097),ac);ac=$div64(ab,new $Uint64(0,100),false);ab=(af=$mul64(new $Uint64(0,100),ac),new $Uint64(ab.$high-af.$high,ab.$low-af.$low));ae=(ag=$mul64(new $Uint64(0,36524),ac),new $Uint64(ae.$high+ag.$high,ae.$low+ag.$low));ac=$div64(ab,new $Uint64(0,4),false);ab=(ah=$mul64(new $Uint64(0,4),ac),new $Uint64(ab.$high-ah.$high,ab.$low-ah.$low));ae=(ai=$mul64(new $Uint64(0,1461),ac),new $Uint64(ae.$high+ai.$high,ae.$low+ai.$low));ac=ab;ae=(aj=$mul64(new $Uint64(0,365),ac),new $Uint64(ae.$high+aj.$high,ae.$low+aj.$low));ae=(ak=new $Uint64(0,(al=m-1>>0,((al<0||al>=BS.length)?$throwRuntimeError("index out of range"):BS[al]))),new $Uint64(ae.$high+ak.$high,ae.$low+ak.$low));if(BW(l)&&m>=3){ae=(am=new $Uint64(0,1),new $Uint64(ae.$high+am.$high,ae.$low+am.$low));}ae=(an=new $Uint64(0,(n-1>>0)),new $Uint64(ae.$high+an.$high,ae.$low+an.$low));ao=$mul64(ae,new $Uint64(0,86400));ao=(ap=new $Uint64(0,(((o*3600>>0)+(p*60>>0)>>0)+q>>0)),new $Uint64(ao.$high+ap.$high,ao.$low+ap.$low));ar=(aq=new $Int64(ao.$high,ao.$low),new $Int64(aq.$high+-2147483647,aq.$low+3844486912));as=s.lookup(ar);at=as[1];au=as[3];av=as[4];if(!((at===0))){ax=(aw=new $Int64(0,at),new $Int64(ar.$high-aw.$high,ar.$low-aw.$low));if((ax.$highav.$high||(ax.$high===av.$high&&ax.$low>=av.$low))){az=s.lookup(av);at=az[1];}ar=(ba=new $Int64(0,at),new $Int64(ar.$high-ba.$high,ar.$low-ba.$low));}return new BG.ptr(new $Int64(ar.$high+14,ar.$low+2006054656),(r>>0),s);};BG.ptr.prototype.Truncate=function(l){var l,m,n,o;m=$clone(this,BG);if((l.$high<0||(l.$high===0&&l.$low<=0))){return m;}n=BZ(m,l);o=n[1];return m.Add(new BN(-o.$high,-o.$low));};BG.prototype.Truncate=function(l){return this.$val.Truncate(l);};BG.ptr.prototype.Round=function(l){var l,m,n,o,p;m=$clone(this,BG);if((l.$high<0||(l.$high===0&&l.$low<=0))){return m;}n=BZ(m,l);o=n[1];if((p=new BN(o.$high+o.$high,o.$low+o.$low),(p.$high>0;l.sec=(t=l.sec,u=new $Int64(0,1),new $Int64(t.$high-u.$high,t.$low-u.$low));}}if((m.$high<0||(m.$high===0&&m.$low<1000000000))&&(v=$div64(new BN(0,1000000000),(new BN(m.$high+m.$high,m.$low+m.$low)),true),(v.$high===0&&v.$low===0))){n=((x=q/((m.$low+((m.$high>>31)*4294967296))>>0),(x===x&&x!==1/0&&x!==-1/0)?x>>0:$throwRuntimeError("integer divide by zero"))>>0)&1;o=new BN(0,(y=q%((m.$low+((m.$high>>31)*4294967296))>>0),y===y?y:$throwRuntimeError("integer divide by zero")));}else if((w=$div64(m,new BN(0,1000000000),true),(w.$high===0&&w.$low===0))){aa=(z=$div64(m,new BN(0,1000000000),false),new $Int64(z.$high,z.$low));n=((ab=$div64(l.sec,aa,false),ab.$low+((ab.$high>>31)*4294967296))>>0)&1;o=(ac=$mul64((ad=$div64(l.sec,aa,true),new BN(ad.$high,ad.$low)),new BN(0,1000000000)),ae=new BN(0,q),new BN(ac.$high+ae.$high,ac.$low+ae.$low));}else{ag=(af=l.sec,new $Uint64(af.$high,af.$low));ah=$mul64(($shiftRightUint64(ag,32)),new $Uint64(0,1000000000));ai=$shiftRightUint64(ah,32);aj=$shiftLeft64(ah,32);ah=$mul64(new $Uint64(ag.$high&0,(ag.$low&4294967295)>>>0),new $Uint64(0,1000000000));ak=aj;al=new $Uint64(aj.$high+ah.$high,aj.$low+ah.$low);am=ak;aj=al;if((aj.$highas.$high||(ai.$high===as.$high&&ai.$low>as.$low))||(ai.$high===as.$high&&ai.$low===as.$low)&&(aj.$high>au.$high||(aj.$high===au.$high&&aj.$low>=au.$low))){n=1;av=aj;aw=new $Uint64(aj.$high-au.$high,aj.$low-au.$low);am=av;aj=aw;if((aj.$high>am.$high||(aj.$high===am.$high&&aj.$low>am.$low))){ai=(ax=new $Uint64(0,1),new $Uint64(ai.$high-ax.$high,ai.$low-ax.$low));}ai=(ay=as,new $Uint64(ai.$high-ay.$high,ai.$low-ay.$low));}if((as.$high===0&&as.$low===0)&&(az=new $Uint64(m.$high,m.$low),(au.$high===az.$high&&au.$low===az.$low))){break;}au=$shiftRightUint64(au,(1));au=(ba=$shiftLeft64((new $Uint64(as.$high&0,(as.$low&1)>>>0)),63),new $Uint64(au.$high|ba.$high,(au.$low|ba.$low)>>>0));as=$shiftRightUint64(as,(1));}o=new BN(aj.$high,aj.$low);}if(p&&!((o.$high===0&&o.$low===0))){n=(n^(1))>>0;o=new BN(m.$high-o.$high,m.$low-o.$low);}return[n,o];};CA.ptr.prototype.get=function(){var l;l=this;if(l===DH.nil){return CD;}if(l===CE){CF.Do(H);}return l;};CA.prototype.get=function(){return this.$val.get();};CA.ptr.prototype.String=function(){var l;l=this;return l.get().name;};CA.prototype.String=function(){return this.$val.String();};CG=$pkg.FixedZone=function(l,m){var l,m,n,o;n=new CA.ptr(l,new CX([new CB.ptr(l,m,false)]),new CY([new CC.ptr(new $Int64(-2147483648,0),0,false,false)]),new $Int64(-2147483648,0),new $Int64(2147483647,4294967295),CZ.nil);n.cacheZone=(o=n.zone,((0<0||0>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+0]));return n;};CA.ptr.prototype.lookup=function(l){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,l,m="",n=0,o=false,p=new $Int64(0,0),q=new $Int64(0,0),r,s,t,u,v,w,x,y,z;r=this;r=r.get();if(r.zone.$length===0){m="UTC";n=0;o=false;p=new $Int64(-2147483648,0);q=new $Int64(2147483647,4294967295);return[m,n,o,p,q];}s=r.cacheZone;if(!(s===CZ.nil)&&(t=r.cacheStart,(t.$high=w.$length)?$throwRuntimeError("index out of range"):w.$array[w.$offset+0])).when,(l.$high=x.$length)?$throwRuntimeError("index out of range"):x.$array[x.$offset+y]));m=z.name;n=z.offset;o=z.isDST;p=new $Int64(-2147483648,0);if(r.tx.$length>0){q=(aa=r.tx,((0<0||0>=aa.$length)?$throwRuntimeError("index out of range"):aa.$array[aa.$offset+0])).when;}else{q=new $Int64(2147483647,4294967295);}return[m,n,o,p,q];}ab=r.tx;q=new $Int64(2147483647,4294967295);ac=0;ad=ab.$length;while(true){if(!((ad-ac>>0)>1)){break;}af=ac+(ae=((ad-ac>>0))/2,(ae===ae&&ae!==1/0&&ae!==-1/0)?ae>>0:$throwRuntimeError("integer divide by zero"))>>0;ag=((af<0||af>=ab.$length)?$throwRuntimeError("index out of range"):ab.$array[ab.$offset+af]).when;if((l.$high=ab.$length)?$throwRuntimeError("index out of range"):ab.$array[ab.$offset+ac]).index,((ai<0||ai>=ah.$length)?$throwRuntimeError("index out of range"):ah.$array[ah.$offset+ai]));m=aj.name;n=aj.offset;o=aj.isDST;p=((ac<0||ac>=ab.$length)?$throwRuntimeError("index out of range"):ab.$array[ab.$offset+ac]).when;return[m,n,o,p,q];};CA.prototype.lookup=function(l){return this.$val.lookup(l);};CA.ptr.prototype.lookupFirstZone=function(){var l,m,n,o,p,q,r,s,t,u,v;l=this;if(!l.firstZoneUsed()){return 0;}if(l.tx.$length>0&&(m=l.zone,n=(o=l.tx,((0<0||0>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+0])).index,((n<0||n>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+n])).isDST){q=((p=l.tx,((0<0||0>=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+0])).index>>0)-1>>0;while(true){if(!(q>=0)){break;}if(!(r=l.zone,((q<0||q>=r.$length)?$throwRuntimeError("index out of range"):r.$array[r.$offset+q])).isDST){return q;}q=q-(1)>>0;}}s=l.zone;t=0;while(true){if(!(t=v.$length)?$throwRuntimeError("index out of range"):v.$array[v.$offset+u])).isDST){return u;}t++;}return 0;};CA.prototype.lookupFirstZone=function(){return this.$val.lookupFirstZone();};CA.ptr.prototype.firstZoneUsed=function(){var l,m,n,o;l=this;m=l.tx;n=0;while(true){if(!(n=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+n]),CC);if(o.index===0){return true;}n++;}return false;};CA.prototype.firstZoneUsed=function(){return this.$val.firstZoneUsed();};CA.ptr.prototype.lookupName=function(l,m){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,l,m,n=0,o=false,p=false,q,r,s,t,u,v,w,x,y,z;q=this;q=q.get();r=q.zone;s=0;while(true){if(!(s=u.$length)?$throwRuntimeError("index out of range"):u.$array[u.$offset+t]));if(v.name===l){w=q.lookup((x=new $Int64(0,v.offset),new $Int64(m.$high-x.$high,m.$low-x.$low)));y=w[0];z=w[1];aa=w[2];if(y===v.name){ab=z;ac=aa;ad=true;n=ab;o=ac;p=ad;return[n,o,p];}}s++;}ae=q.zone;af=0;while(true){if(!(af=ah.$length)?$throwRuntimeError("index out of range"):ah.$array[ah.$offset+ag]));if(ai.name===l){aj=ai.offset;ak=ai.isDST;al=true;n=aj;o=ak;p=al;return[n,o,p];}af++;}return[n,o,p];};CA.prototype.lookupName=function(l,m){return this.$val.lookupName(l,m);};DN.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];BG.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Format",name:"Format",pkg:"",typ:$funcType([$String],[$String],false)},{prop:"After",name:"After",pkg:"",typ:$funcType([BG],[$Bool],false)},{prop:"Before",name:"Before",pkg:"",typ:$funcType([BG],[$Bool],false)},{prop:"Equal",name:"Equal",pkg:"",typ:$funcType([BG],[$Bool],false)},{prop:"IsZero",name:"IsZero",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"abs",name:"abs",pkg:"time",typ:$funcType([],[$Uint64],false)},{prop:"locabs",name:"locabs",pkg:"time",typ:$funcType([],[$String,$Int,$Uint64],false)},{prop:"Date",name:"Date",pkg:"",typ:$funcType([],[$Int,BH,$Int],false)},{prop:"Year",name:"Year",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Month",name:"Month",pkg:"",typ:$funcType([],[BH],false)},{prop:"Day",name:"Day",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Weekday",name:"Weekday",pkg:"",typ:$funcType([],[BJ],false)},{prop:"ISOWeek",name:"ISOWeek",pkg:"",typ:$funcType([],[$Int,$Int],false)},{prop:"Clock",name:"Clock",pkg:"",typ:$funcType([],[$Int,$Int,$Int],false)},{prop:"Hour",name:"Hour",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Minute",name:"Minute",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Second",name:"Second",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Nanosecond",name:"Nanosecond",pkg:"",typ:$funcType([],[$Int],false)},{prop:"YearDay",name:"YearDay",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Add",name:"Add",pkg:"",typ:$funcType([BN],[BG],false)},{prop:"Sub",name:"Sub",pkg:"",typ:$funcType([BG],[BN],false)},{prop:"AddDate",name:"AddDate",pkg:"",typ:$funcType([$Int,$Int,$Int],[BG],false)},{prop:"date",name:"date",pkg:"time",typ:$funcType([$Bool],[$Int,BH,$Int,$Int],false)},{prop:"UTC",name:"UTC",pkg:"",typ:$funcType([],[BG],false)},{prop:"Local",name:"Local",pkg:"",typ:$funcType([],[BG],false)},{prop:"In",name:"In",pkg:"",typ:$funcType([DH],[BG],false)},{prop:"Location",name:"Location",pkg:"",typ:$funcType([],[DH],false)},{prop:"Zone",name:"Zone",pkg:"",typ:$funcType([],[$String,$Int],false)},{prop:"Unix",name:"Unix",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"UnixNano",name:"UnixNano",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"MarshalBinary",name:"MarshalBinary",pkg:"",typ:$funcType([],[DE,$error],false)},{prop:"GobEncode",name:"GobEncode",pkg:"",typ:$funcType([],[DE,$error],false)},{prop:"MarshalJSON",name:"MarshalJSON",pkg:"",typ:$funcType([],[DE,$error],false)},{prop:"MarshalText",name:"MarshalText",pkg:"",typ:$funcType([],[DE,$error],false)},{prop:"Truncate",name:"Truncate",pkg:"",typ:$funcType([BN],[BG],false)},{prop:"Round",name:"Round",pkg:"",typ:$funcType([BN],[BG],false)}];DQ.methods=[{prop:"UnmarshalBinary",name:"UnmarshalBinary",pkg:"",typ:$funcType([DE],[$error],false)},{prop:"GobDecode",name:"GobDecode",pkg:"",typ:$funcType([DE],[$error],false)},{prop:"UnmarshalJSON",name:"UnmarshalJSON",pkg:"",typ:$funcType([DE],[$error],false)},{prop:"UnmarshalText",name:"UnmarshalText",pkg:"",typ:$funcType([DE],[$error],false)}];BH.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];BJ.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];BN.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Nanoseconds",name:"Nanoseconds",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Seconds",name:"Seconds",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Minutes",name:"Minutes",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Hours",name:"Hours",pkg:"",typ:$funcType([],[$Float64],false)}];DH.methods=[{prop:"get",name:"get",pkg:"time",typ:$funcType([],[DH],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"lookup",name:"lookup",pkg:"time",typ:$funcType([$Int64],[$String,$Int,$Bool,$Int64,$Int64],false)},{prop:"lookupFirstZone",name:"lookupFirstZone",pkg:"time",typ:$funcType([],[$Int],false)},{prop:"firstZoneUsed",name:"firstZoneUsed",pkg:"time",typ:$funcType([],[$Bool],false)},{prop:"lookupName",name:"lookupName",pkg:"time",typ:$funcType([$String,$Int64],[$Int,$Bool,$Bool],false)}];AB.init([{prop:"Layout",name:"Layout",pkg:"",typ:$String,tag:""},{prop:"Value",name:"Value",pkg:"",typ:$String,tag:""},{prop:"LayoutElem",name:"LayoutElem",pkg:"",typ:$String,tag:""},{prop:"ValueElem",name:"ValueElem",pkg:"",typ:$String,tag:""},{prop:"Message",name:"Message",pkg:"",typ:$String,tag:""}]);BG.init([{prop:"sec",name:"sec",pkg:"time",typ:$Int64,tag:""},{prop:"nsec",name:"nsec",pkg:"time",typ:$Int32,tag:""},{prop:"loc",name:"loc",pkg:"time",typ:DH,tag:""}]);CA.init([{prop:"name",name:"name",pkg:"time",typ:$String,tag:""},{prop:"zone",name:"zone",pkg:"time",typ:CX,tag:""},{prop:"tx",name:"tx",pkg:"time",typ:CY,tag:""},{prop:"cacheStart",name:"cacheStart",pkg:"time",typ:$Int64,tag:""},{prop:"cacheEnd",name:"cacheEnd",pkg:"time",typ:$Int64,tag:""},{prop:"cacheZone",name:"cacheZone",pkg:"time",typ:CZ,tag:""}]);CB.init([{prop:"name",name:"name",pkg:"time",typ:$String,tag:""},{prop:"offset",name:"offset",pkg:"time",typ:$Int,tag:""},{prop:"isDST",name:"isDST",pkg:"time",typ:$Bool,tag:""}]);CC.init([{prop:"when",name:"when",pkg:"time",typ:$Int64,tag:""},{prop:"index",name:"index",pkg:"time",typ:$Uint8,tag:""},{prop:"isstd",name:"isstd",pkg:"time",typ:$Bool,tag:""},{prop:"isutc",name:"isutc",pkg:"time",typ:$Bool,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_time=function(){while(true){switch($s){case 0:$r=C.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=F.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=6;case 6:if($r&&$r.$blocking){$r=$r();}CE=new CA.ptr();CF=new E.Once.ptr();N=$toNativeArray($kindInt,[260,265,524,526,528,274]);Q=new CW(["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]);R=new CW(["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]);S=new CW(["---","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]);T=new CW(["---","January","February","March","April","May","June","July","August","September","October","November","December"]);X=C.New("time: invalid number");AA=C.New("bad value for field");AN=C.New("time: bad [0-9]*");BI=$toNativeArray($kindString,["January","February","March","April","May","June","July","August","September","October","November","December"]);BK=$toNativeArray($kindString,["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]);BS=$toNativeArray($kindInt32,[0,31,59,90,120,151,181,212,243,273,304,334,365]);CD=new CA.ptr("UTC",CX.nil,CY.nil,new $Int64(0,0),new $Int64(0,0),CZ.nil);$pkg.UTC=CD;$pkg.Local=CE;k=D.Getenv("ZONEINFO",$BLOCKING);$s=7;case 7:if(k&&k.$blocking){k=k();}j=k;CH=j[0];CL=C.New("malformed time zone information");CS=new CW(["/usr/share/zoneinfo/","/usr/share/lib/zoneinfo/","/usr/lib/locale/TZ/",F.GOROOT()+"/lib/time/zoneinfo.zip"]);}return;}};$init_time.$blocking=true;return $init_time;};return $pkg;})(); +$packages["os"]=(function(){var $pkg={},E,A,B,F,H,G,C,D,X,Y,AR,BH,BI,BK,CT,CU,CW,CY,CZ,DA,DC,DD,DE,DF,DL,DR,DS,DT,DX,DY,AP,AW,BW,CQ,I,J,Z,AB,AE,AY,AZ,BC,BJ,BL,BO,BR,BY,BZ,CE,CM,CN,CR;E=$packages["errors"];A=$packages["github.com/gopherjs/gopherjs/js"];B=$packages["io"];F=$packages["runtime"];H=$packages["sync"];G=$packages["sync/atomic"];C=$packages["syscall"];D=$packages["time"];X=$pkg.PathError=$newType(0,$kindStruct,"os.PathError","PathError","os",function(Op_,Path_,Err_){this.$val=this;this.Op=Op_!==undefined?Op_:"";this.Path=Path_!==undefined?Path_:"";this.Err=Err_!==undefined?Err_:$ifaceNil;});Y=$pkg.SyscallError=$newType(0,$kindStruct,"os.SyscallError","SyscallError","os",function(Syscall_,Err_){this.$val=this;this.Syscall=Syscall_!==undefined?Syscall_:"";this.Err=Err_!==undefined?Err_:$ifaceNil;});AR=$pkg.LinkError=$newType(0,$kindStruct,"os.LinkError","LinkError","os",function(Op_,Old_,New_,Err_){this.$val=this;this.Op=Op_!==undefined?Op_:"";this.Old=Old_!==undefined?Old_:"";this.New=New_!==undefined?New_:"";this.Err=Err_!==undefined?Err_:$ifaceNil;});BH=$pkg.File=$newType(0,$kindStruct,"os.File","File","os",function(file_){this.$val=this;this.file=file_!==undefined?file_:DR.nil;});BI=$pkg.file=$newType(0,$kindStruct,"os.file","file","os",function(fd_,name_,dirinfo_,nepipe_){this.$val=this;this.fd=fd_!==undefined?fd_:0;this.name=name_!==undefined?name_:"";this.dirinfo=dirinfo_!==undefined?dirinfo_:CZ.nil;this.nepipe=nepipe_!==undefined?nepipe_:0;});BK=$pkg.dirInfo=$newType(0,$kindStruct,"os.dirInfo","dirInfo","os",function(buf_,nbuf_,bufp_){this.$val=this;this.buf=buf_!==undefined?buf_:DA.nil;this.nbuf=nbuf_!==undefined?nbuf_:0;this.bufp=bufp_!==undefined?bufp_:0;});CT=$pkg.FileInfo=$newType(8,$kindInterface,"os.FileInfo","FileInfo","os",null);CU=$pkg.FileMode=$newType(4,$kindUint32,"os.FileMode","FileMode","os",null);CW=$pkg.fileStat=$newType(0,$kindStruct,"os.fileStat","fileStat","os",function(name_,size_,mode_,modTime_,sys_){this.$val=this;this.name=name_!==undefined?name_:"";this.size=size_!==undefined?size_:new $Int64(0,0);this.mode=mode_!==undefined?mode_:0;this.modTime=modTime_!==undefined?modTime_:new D.Time.ptr();this.sys=sys_!==undefined?sys_:$ifaceNil;});CY=$sliceType($String);CZ=$ptrType(BK);DA=$sliceType($Uint8);DC=$sliceType(CT);DD=$ptrType(BH);DE=$ptrType(X);DF=$ptrType(AR);DL=$arrayType($Uint8,32);DR=$ptrType(BI);DS=$funcType([DR],[$error],false);DT=$ptrType($Int32);DX=$ptrType(CW);DY=$ptrType(Y);I=function(){return $pkg.Args;};J=function(){var b,c,d;b=$global.process;if(!(b===undefined)){c=b.argv;$pkg.Args=$makeSlice(CY,($parseInt(c.length)-1>>0));d=0;while(true){if(!(d<($parseInt(c.length)-1>>0))){break;}(d<0||d>=$pkg.Args.$length)?$throwRuntimeError("index out of range"):$pkg.Args.$array[$pkg.Args.$offset+d]=$internalize(c[(d+1>>0)],$String);d=d+(1)>>0;}}if($pkg.Args.$length===0){$pkg.Args=new CY(["?"]);}};BH.ptr.prototype.readdirnames=function(b){var b,c=CY.nil,d=$ifaceNil,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;e=this;if(e.file.dirinfo===CZ.nil){e.file.dirinfo=new BK.ptr();e.file.dirinfo.buf=$makeSlice(DA,4096);}f=e.file.dirinfo;g=b;if(g<=0){g=100;b=-1;}c=$makeSlice(CY,0,g);while(true){if(!(!((b===0)))){break;}if(f.bufp>=f.nbuf){f.bufp=0;h=$ifaceNil;j=C.ReadDirent(e.file.fd,f.buf);i=AY(j[0],j[1]);f.nbuf=i[0];h=i[1];if(!($interfaceIsEqual(h,$ifaceNil))){k=c;l=Z("readdirent",h);c=k;d=l;return[c,d];}if(f.nbuf<=0){break;}}m=0;n=0;o=m;p=n;q=C.ParseDirent($subslice(f.buf,f.bufp,f.nbuf),b,c);o=q[0];p=q[1];c=q[2];f.bufp=f.bufp+(o)>>0;b=b-(p)>>0;}if(b>=0&&(c.$length===0)){r=c;s=B.EOF;c=r;d=s;return[c,d];}t=c;u=$ifaceNil;c=t;d=u;return[c,d];};BH.prototype.readdirnames=function(b){return this.$val.readdirnames(b);};BH.ptr.prototype.Readdir=function(b){var b,c=DC.nil,d=$ifaceNil,e,f,g,h;e=this;if(e===DD.nil){f=DC.nil;g=$pkg.ErrInvalid;c=f;d=g;return[c,d];}h=e.readdir(b);c=h[0];d=h[1];return[c,d];};BH.prototype.Readdir=function(b){return this.$val.Readdir(b);};BH.ptr.prototype.Readdirnames=function(b){var b,c=CY.nil,d=$ifaceNil,e,f,g,h;e=this;if(e===DD.nil){f=CY.nil;g=$pkg.ErrInvalid;c=f;d=g;return[c,d];}h=e.readdirnames(b);c=h[0];d=h[1];return[c,d];};BH.prototype.Readdirnames=function(b){return this.$val.Readdirnames(b);};X.ptr.prototype.Error=function(){var b;b=this;return b.Op+" "+b.Path+": "+b.Err.Error();};X.prototype.Error=function(){return this.$val.Error();};Y.ptr.prototype.Error=function(){var b;b=this;return b.Syscall+": "+b.Err.Error();};Y.prototype.Error=function(){return this.$val.Error();};Z=$pkg.NewSyscallError=function(b,c){var b,c;if($interfaceIsEqual(c,$ifaceNil)){return $ifaceNil;}return new Y.ptr(b,c);};AB=$pkg.IsNotExist=function(b){var b;return AE(b);};AE=function(b){var b,c,d;d=b;if(d===$ifaceNil){c=d;return false;}else if($assertType(d,DE,true)[1]){c=d.$val;b=c.Err;}else if($assertType(d,DF,true)[1]){c=d.$val;b=c.Err;}return $interfaceIsEqual(b,new C.Errno(2))||$interfaceIsEqual(b,$pkg.ErrNotExist);};BH.ptr.prototype.Name=function(){var b;b=this;return b.file.name;};BH.prototype.Name=function(){return this.$val.Name();};AR.ptr.prototype.Error=function(){var b;b=this;return b.Op+" "+b.Old+" "+b.New+": "+b.Err.Error();};AR.prototype.Error=function(){return this.$val.Error();};BH.ptr.prototype.Read=function(b){var b,c=0,d=$ifaceNil,e,f,g,h,i,j,k,l,m;e=this;if(e===DD.nil){f=0;g=$pkg.ErrInvalid;c=f;d=g;return[c,d];}h=e.read(b);c=h[0];i=h[1];if(c<0){c=0;}if((c===0)&&b.$length>0&&$interfaceIsEqual(i,$ifaceNil)){j=0;k=B.EOF;c=j;d=k;return[c,d];}if(!($interfaceIsEqual(i,$ifaceNil))){d=new X.ptr("read",e.file.name,i);}l=c;m=d;c=l;d=m;return[c,d];};BH.prototype.Read=function(b){return this.$val.Read(b);};BH.ptr.prototype.ReadAt=function(b,c){var b,c,d=0,e=$ifaceNil,f,g,h,i,j,k,l,m,n;f=this;if(f===DD.nil){g=0;h=$pkg.ErrInvalid;d=g;e=h;return[d,e];}while(true){if(!(b.$length>0)){break;}i=f.pread(b,c);j=i[0];k=i[1];if((j===0)&&$interfaceIsEqual(k,$ifaceNil)){l=d;m=B.EOF;d=l;e=m;return[d,e];}if(!($interfaceIsEqual(k,$ifaceNil))){e=new X.ptr("read",f.file.name,k);break;}d=d+(j)>>0;b=$subslice(b,j);c=(n=new $Int64(0,j),new $Int64(c.$high+n.$high,c.$low+n.$low));}return[d,e];};BH.prototype.ReadAt=function(b,c){return this.$val.ReadAt(b,c);};BH.ptr.prototype.Write=function(b){var b,c=0,d=$ifaceNil,e,f,g,h,i,j,k;e=this;if(e===DD.nil){f=0;g=$pkg.ErrInvalid;c=f;d=g;return[c,d];}h=e.write(b);c=h[0];i=h[1];if(c<0){c=0;}if(!((c===b.$length))){d=B.ErrShortWrite;}BL(e,i);if(!($interfaceIsEqual(i,$ifaceNil))){d=new X.ptr("write",e.file.name,i);}j=c;k=d;c=j;d=k;return[c,d];};BH.prototype.Write=function(b){return this.$val.Write(b);};BH.ptr.prototype.WriteAt=function(b,c){var b,c,d=0,e=$ifaceNil,f,g,h,i,j,k,l;f=this;if(f===DD.nil){g=0;h=$pkg.ErrInvalid;d=g;e=h;return[d,e];}while(true){if(!(b.$length>0)){break;}i=f.pwrite(b,c);j=i[0];k=i[1];if(!($interfaceIsEqual(k,$ifaceNil))){e=new X.ptr("write",f.file.name,k);break;}d=d+(j)>>0;b=$subslice(b,j);c=(l=new $Int64(0,j),new $Int64(c.$high+l.$high,c.$low+l.$low));}return[d,e];};BH.prototype.WriteAt=function(b,c){return this.$val.WriteAt(b,c);};BH.ptr.prototype.Seek=function(b,c){var b,c,d=new $Int64(0,0),e=$ifaceNil,f,g,h,i,j,k,l,m,n,o;f=this;if(f===DD.nil){g=new $Int64(0,0);h=$pkg.ErrInvalid;d=g;e=h;return[d,e];}i=f.seek(b,c);j=i[0];k=i[1];if($interfaceIsEqual(k,$ifaceNil)&&!(f.file.dirinfo===CZ.nil)&&!((j.$high===0&&j.$low===0))){k=new C.Errno(21);}if(!($interfaceIsEqual(k,$ifaceNil))){l=new $Int64(0,0);m=new X.ptr("seek",f.file.name,k);d=l;e=m;return[d,e];}n=j;o=$ifaceNil;d=n;e=o;return[d,e];};BH.prototype.Seek=function(b,c){return this.$val.Seek(b,c);};BH.ptr.prototype.WriteString=function(b){var b,c=0,d=$ifaceNil,e,f,g,h;e=this;if(e===DD.nil){f=0;g=$pkg.ErrInvalid;c=f;d=g;return[c,d];}h=e.Write(new DA($stringToBytes(b)));c=h[0];d=h[1];return[c,d];};BH.prototype.WriteString=function(b){return this.$val.WriteString(b);};BH.ptr.prototype.Chdir=function(){var b,c;b=this;if(b===DD.nil){return $pkg.ErrInvalid;}c=C.Fchdir(b.file.fd);if(!($interfaceIsEqual(c,$ifaceNil))){return new X.ptr("chdir",b.file.name,c);}return $ifaceNil;};BH.prototype.Chdir=function(){return this.$val.Chdir();};AY=function(b,c){var b,c;if(b<0){b=0;}return[b,c];};AZ=function(){$panic("Native function not implemented: os.sigpipe");};BC=function(b){var b,c=0;c=(c|((new CU(b).Perm()>>>0)))>>>0;if(!((((b&8388608)>>>0)===0))){c=(c|(2048))>>>0;}if(!((((b&4194304)>>>0)===0))){c=(c|(1024))>>>0;}if(!((((b&1048576)>>>0)===0))){c=(c|(512))>>>0;}return c;};BH.ptr.prototype.Chmod=function(b){var b,c,d;c=this;if(c===DD.nil){return $pkg.ErrInvalid;}d=C.Fchmod(c.file.fd,BC(b));if(!($interfaceIsEqual(d,$ifaceNil))){return new X.ptr("chmod",c.file.name,d);}return $ifaceNil;};BH.prototype.Chmod=function(b){return this.$val.Chmod(b);};BH.ptr.prototype.Chown=function(b,c){var b,c,d,e;d=this;if(d===DD.nil){return $pkg.ErrInvalid;}e=C.Fchown(d.file.fd,b,c);if(!($interfaceIsEqual(e,$ifaceNil))){return new X.ptr("chown",d.file.name,e);}return $ifaceNil;};BH.prototype.Chown=function(b,c){return this.$val.Chown(b,c);};BH.ptr.prototype.Truncate=function(b){var b,c,d;c=this;if(c===DD.nil){return $pkg.ErrInvalid;}d=C.Ftruncate(c.file.fd,b);if(!($interfaceIsEqual(d,$ifaceNil))){return new X.ptr("truncate",c.file.name,d);}return $ifaceNil;};BH.prototype.Truncate=function(b){return this.$val.Truncate(b);};BH.ptr.prototype.Sync=function(){var b=$ifaceNil,c,d;c=this;if(c===DD.nil){b=$pkg.ErrInvalid;return b;}d=C.Fsync(c.file.fd);if(!($interfaceIsEqual(d,$ifaceNil))){b=Z("fsync",d);return b;}b=$ifaceNil;return b;};BH.prototype.Sync=function(){return this.$val.Sync();};BH.ptr.prototype.Fd=function(){var b;b=this;if(b===DD.nil){return 4294967295;}return(b.file.fd>>>0);};BH.prototype.Fd=function(){return this.$val.Fd();};BJ=$pkg.NewFile=function(b,c){var b,c,d,e;d=(b>>0);if(d<0){return DD.nil;}e=new BH.ptr(new BI.ptr(d,c,CZ.nil,0));F.SetFinalizer(e.file,new DS($methodExpr(DR.prototype.close)));return e;};BL=function(b,c){var b,c;if($interfaceIsEqual(c,new C.Errno(32))){if(G.AddInt32(new DT(function(){return this.$target.file.nepipe;},function($v){this.$target.file.nepipe=$v;},b),1)>=10){AZ();}}else{G.StoreInt32(new DT(function(){return this.$target.file.nepipe;},function($v){this.$target.file.nepipe=$v;},b),0);}};BH.ptr.prototype.Close=function(){var b;b=this;if(b===DD.nil){return $pkg.ErrInvalid;}return b.file.close();};BH.prototype.Close=function(){return this.$val.Close();};BI.ptr.prototype.close=function(){var b,c,d;b=this;if(b===DR.nil||b.fd<0){return new C.Errno(22);}c=$ifaceNil;d=C.Close(b.fd);if(!($interfaceIsEqual(d,$ifaceNil))){c=new X.ptr("close",b.name,d);}b.fd=-1;F.SetFinalizer(b,$ifaceNil);return c;};BI.prototype.close=function(){return this.$val.close();};BH.ptr.prototype.Stat=function(){var b=$ifaceNil,c=$ifaceNil,d,e,f,g,h,i,j,k;d=this;if(d===DD.nil){e=$ifaceNil;f=$pkg.ErrInvalid;b=e;c=f;return[b,c];}g=$clone(new C.Stat_t.ptr(),C.Stat_t);c=C.Fstat(d.file.fd,g);if(!($interfaceIsEqual(c,$ifaceNil))){h=$ifaceNil;i=new X.ptr("stat",d.file.name,c);b=h;c=i;return[b,c];}j=CM(g,d.file.name);k=$ifaceNil;b=j;c=k;return[b,c];};BH.prototype.Stat=function(){return this.$val.Stat();};BO=$pkg.Lstat=function(b){var b,c=$ifaceNil,d=$ifaceNil,e,f,g,h,i;e=$clone(new C.Stat_t.ptr(),C.Stat_t);d=C.Lstat(b,e);if(!($interfaceIsEqual(d,$ifaceNil))){f=$ifaceNil;g=new X.ptr("lstat",b,d);c=f;d=g;return[c,d];}h=CM(e,b);i=$ifaceNil;c=h;d=i;return[c,d];};BH.ptr.prototype.readdir=function(b){var b,c=DC.nil,d=$ifaceNil,e,f,g,h,i,j,k,l,m,n,o,p,q,r;e=this;f=e.file.name;if(f===""){f=".";}g=e.Readdirnames(b);h=g[0];d=g[1];c=$makeSlice(DC,0,h.$length);i=h;j=0;while(true){if(!(j=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]);l=AW(f+"/"+k);m=l[0];n=l[1];if(AB(n)){j++;continue;}if(!($interfaceIsEqual(n,$ifaceNil))){o=c;p=n;c=o;d=p;return[c,d];}c=$append(c,m);j++;}q=c;r=d;c=q;d=r;return[c,d];};BH.prototype.readdir=function(b){return this.$val.readdir(b);};BH.ptr.prototype.read=function(b){var b,c=0,d=$ifaceNil,e,f,g;e=this;if(true&&b.$length>1073741824){b=$subslice(b,0,1073741824);}g=C.Read(e.file.fd,b);f=AY(g[0],g[1]);c=f[0];d=f[1];return[c,d];};BH.prototype.read=function(b){return this.$val.read(b);};BH.ptr.prototype.pread=function(b,c){var b,c,d=0,e=$ifaceNil,f,g,h;f=this;if(true&&b.$length>1073741824){b=$subslice(b,0,1073741824);}h=C.Pread(f.file.fd,b,c);g=AY(h[0],h[1]);d=g[0];e=g[1];return[d,e];};BH.prototype.pread=function(b,c){return this.$val.pread(b,c);};BH.ptr.prototype.write=function(b){var b,c=0,d=$ifaceNil,e,f,g,h,i,j,k,l;e=this;while(true){if(!(true)){break;}f=b;if(true&&f.$length>1073741824){f=$subslice(f,0,1073741824);}h=C.Write(e.file.fd,f);g=AY(h[0],h[1]);i=g[0];j=g[1];c=c+(i)>>0;if(01073741824){b=$subslice(b,0,1073741824);}h=C.Pwrite(f.file.fd,b,c);g=AY(h[0],h[1]);d=g[0];e=g[1];return[d,e];};BH.prototype.pwrite=function(b,c){return this.$val.pwrite(b,c);};BH.ptr.prototype.seek=function(b,c){var b,c,d=new $Int64(0,0),e=$ifaceNil,f,g;f=this;g=C.Seek(f.file.fd,b,c);d=g[0];e=g[1];return[d,e];};BH.prototype.seek=function(b,c){return this.$val.seek(b,c);};BR=function(b){var b,c;c=b.length-1>>0;while(true){if(!(c>0&&(b.charCodeAt(c)===47))){break;}b=b.substring(0,c);c=c-(1)>>0;}c=c-(1)>>0;while(true){if(!(c>=0)){break;}if(b.charCodeAt(c)===47){b=b.substring((c+1>>0));break;}c=c-(1)>>0;}return b;};BY=function(){BW=BZ;};BZ=function(b){var b;return!($interfaceIsEqual(b,new C.Errno(45)));};CE=function(){$pkg.Args=I();};CM=function(b,c){var b,c,d,e;d=new CW.ptr(BR(c),b.Size,0,$clone(CN(b.Mtimespec),D.Time),b);d.mode=(((b.Mode&511)>>>0)>>>0);e=(b.Mode&61440)>>>0;if(e===24576||e===57344){d.mode=(d.mode|(67108864))>>>0;}else if(e===8192){d.mode=(d.mode|(69206016))>>>0;}else if(e===16384){d.mode=(d.mode|(2147483648))>>>0;}else if(e===4096){d.mode=(d.mode|(33554432))>>>0;}else if(e===40960){d.mode=(d.mode|(134217728))>>>0;}else if(e===32768){}else if(e===49152){d.mode=(d.mode|(16777216))>>>0;}if(!((((b.Mode&1024)>>>0)===0))){d.mode=(d.mode|(4194304))>>>0;}if(!((((b.Mode&2048)>>>0)===0))){d.mode=(d.mode|(8388608))>>>0;}if(!((((b.Mode&512)>>>0)===0))){d.mode=(d.mode|(1048576))>>>0;}return d;};CN=function(b){var b;b=$clone(b,C.Timespec);return D.Unix(b.Sec,b.Nsec);};CR=function(){var b,c,d,e,f,g,h;b=C.Sysctl("kern.osrelease");c=b[0];d=b[1];if(!($interfaceIsEqual(d,$ifaceNil))){return;}e=0;f=c;g=0;while(true){if(!(g2||(e===2)&&c.charCodeAt(0)>=49&&c.charCodeAt(1)>=49){CQ=true;}};CU.prototype.String=function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;b=this.$val;c=$clone(DL.zero(),DL);d=0;e="dalTLDpSugct";f=0;while(true){if(!(f>0)>>>0),j<32?(1<>>0)))>>>0)===0))){(d<0||d>=c.length)?$throwRuntimeError("index out of range"):c[d]=(i<<24>>>24);d=d+(1)>>0;}f+=g[1];}if(d===0){(d<0||d>=c.length)?$throwRuntimeError("index out of range"):c[d]=45;d=d+(1)>>0;}k="rwxrwxrwx";l=0;while(true){if(!(l>0)>>>0),p<32?(1<>>0)))>>>0)===0))){(d<0||d>=c.length)?$throwRuntimeError("index out of range"):c[d]=(o<<24>>>24);}else{(d<0||d>=c.length)?$throwRuntimeError("index out of range"):c[d]=45;}d=d+(1)>>0;l+=m[1];}return $bytesToString($subslice(new DA(c),0,d));};$ptrType(CU).prototype.String=function(){return new CU(this.$get()).String();};CU.prototype.IsDir=function(){var b;b=this.$val;return!((((b&2147483648)>>>0)===0));};$ptrType(CU).prototype.IsDir=function(){return new CU(this.$get()).IsDir();};CU.prototype.IsRegular=function(){var b;b=this.$val;return((b&2399141888)>>>0)===0;};$ptrType(CU).prototype.IsRegular=function(){return new CU(this.$get()).IsRegular();};CU.prototype.Perm=function(){var b;b=this.$val;return(b&511)>>>0;};$ptrType(CU).prototype.Perm=function(){return new CU(this.$get()).Perm();};CW.ptr.prototype.Name=function(){var b;b=this;return b.name;};CW.prototype.Name=function(){return this.$val.Name();};CW.ptr.prototype.IsDir=function(){var b;b=this;return new CU(b.Mode()).IsDir();};CW.prototype.IsDir=function(){return this.$val.IsDir();};CW.ptr.prototype.Size=function(){var b;b=this;return b.size;};CW.prototype.Size=function(){return this.$val.Size();};CW.ptr.prototype.Mode=function(){var b;b=this;return b.mode;};CW.prototype.Mode=function(){return this.$val.Mode();};CW.ptr.prototype.ModTime=function(){var b;b=this;return b.modTime;};CW.prototype.ModTime=function(){return this.$val.ModTime();};CW.ptr.prototype.Sys=function(){var b;b=this;return b.sys;};CW.prototype.Sys=function(){return this.$val.Sys();};DE.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];DY.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];DF.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];DD.methods=[{prop:"readdirnames",name:"readdirnames",pkg:"os",typ:$funcType([$Int],[CY,$error],false)},{prop:"Readdir",name:"Readdir",pkg:"",typ:$funcType([$Int],[DC,$error],false)},{prop:"Readdirnames",name:"Readdirnames",pkg:"",typ:$funcType([$Int],[CY,$error],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"Read",name:"Read",pkg:"",typ:$funcType([DA],[$Int,$error],false)},{prop:"ReadAt",name:"ReadAt",pkg:"",typ:$funcType([DA,$Int64],[$Int,$error],false)},{prop:"Write",name:"Write",pkg:"",typ:$funcType([DA],[$Int,$error],false)},{prop:"WriteAt",name:"WriteAt",pkg:"",typ:$funcType([DA,$Int64],[$Int,$error],false)},{prop:"Seek",name:"Seek",pkg:"",typ:$funcType([$Int64,$Int],[$Int64,$error],false)},{prop:"WriteString",name:"WriteString",pkg:"",typ:$funcType([$String],[$Int,$error],false)},{prop:"Chdir",name:"Chdir",pkg:"",typ:$funcType([],[$error],false)},{prop:"Chmod",name:"Chmod",pkg:"",typ:$funcType([CU],[$error],false)},{prop:"Chown",name:"Chown",pkg:"",typ:$funcType([$Int,$Int],[$error],false)},{prop:"Truncate",name:"Truncate",pkg:"",typ:$funcType([$Int64],[$error],false)},{prop:"Sync",name:"Sync",pkg:"",typ:$funcType([],[$error],false)},{prop:"Fd",name:"Fd",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"Close",name:"Close",pkg:"",typ:$funcType([],[$error],false)},{prop:"Stat",name:"Stat",pkg:"",typ:$funcType([],[CT,$error],false)},{prop:"readdir",name:"readdir",pkg:"os",typ:$funcType([$Int],[DC,$error],false)},{prop:"read",name:"read",pkg:"os",typ:$funcType([DA],[$Int,$error],false)},{prop:"pread",name:"pread",pkg:"os",typ:$funcType([DA,$Int64],[$Int,$error],false)},{prop:"write",name:"write",pkg:"os",typ:$funcType([DA],[$Int,$error],false)},{prop:"pwrite",name:"pwrite",pkg:"os",typ:$funcType([DA,$Int64],[$Int,$error],false)},{prop:"seek",name:"seek",pkg:"os",typ:$funcType([$Int64,$Int],[$Int64,$error],false)}];DR.methods=[{prop:"close",name:"close",pkg:"os",typ:$funcType([],[$error],false)}];CU.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"IsDir",name:"IsDir",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"IsRegular",name:"IsRegular",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Perm",name:"Perm",pkg:"",typ:$funcType([],[CU],false)}];DX.methods=[{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"IsDir",name:"IsDir",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Size",name:"Size",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Mode",name:"Mode",pkg:"",typ:$funcType([],[CU],false)},{prop:"ModTime",name:"ModTime",pkg:"",typ:$funcType([],[D.Time],false)},{prop:"Sys",name:"Sys",pkg:"",typ:$funcType([],[$emptyInterface],false)}];X.init([{prop:"Op",name:"Op",pkg:"",typ:$String,tag:""},{prop:"Path",name:"Path",pkg:"",typ:$String,tag:""},{prop:"Err",name:"Err",pkg:"",typ:$error,tag:""}]);Y.init([{prop:"Syscall",name:"Syscall",pkg:"",typ:$String,tag:""},{prop:"Err",name:"Err",pkg:"",typ:$error,tag:""}]);AR.init([{prop:"Op",name:"Op",pkg:"",typ:$String,tag:""},{prop:"Old",name:"Old",pkg:"",typ:$String,tag:""},{prop:"New",name:"New",pkg:"",typ:$String,tag:""},{prop:"Err",name:"Err",pkg:"",typ:$error,tag:""}]);BH.init([{prop:"file",name:"",pkg:"os",typ:DR,tag:""}]);BI.init([{prop:"fd",name:"fd",pkg:"os",typ:$Int,tag:""},{prop:"name",name:"name",pkg:"os",typ:$String,tag:""},{prop:"dirinfo",name:"dirinfo",pkg:"os",typ:CZ,tag:""},{prop:"nepipe",name:"nepipe",pkg:"os",typ:$Int32,tag:""}]);BK.init([{prop:"buf",name:"buf",pkg:"os",typ:DA,tag:""},{prop:"nbuf",name:"nbuf",pkg:"os",typ:$Int,tag:""},{prop:"bufp",name:"bufp",pkg:"os",typ:$Int,tag:""}]);CT.init([{prop:"IsDir",name:"IsDir",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"ModTime",name:"ModTime",pkg:"",typ:$funcType([],[D.Time],false)},{prop:"Mode",name:"Mode",pkg:"",typ:$funcType([],[CU],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"Size",name:"Size",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Sys",name:"Sys",pkg:"",typ:$funcType([],[$emptyInterface],false)}]);CW.init([{prop:"name",name:"name",pkg:"os",typ:$String,tag:""},{prop:"size",name:"size",pkg:"os",typ:$Int64,tag:""},{prop:"mode",name:"mode",pkg:"os",typ:CU,tag:""},{prop:"modTime",name:"modTime",pkg:"os",typ:D.Time,tag:""},{prop:"sys",name:"sys",pkg:"os",typ:$emptyInterface,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_os=function(){while(true){switch($s){case 0:$r=E.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=F.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=H.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}$r=G.$init($BLOCKING);$s=6;case 6:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=7;case 7:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=8;case 8:if($r&&$r.$blocking){$r=$r();}$pkg.Args=CY.nil;CQ=false;$pkg.ErrInvalid=E.New("invalid argument");$pkg.ErrPermission=E.New("permission denied");$pkg.ErrExist=E.New("file already exists");$pkg.ErrNotExist=E.New("file does not exist");AP=E.New("os: process already finished");$pkg.Stdin=BJ((C.Stdin>>>0),"/dev/stdin");$pkg.Stdout=BJ((C.Stdout>>>0),"/dev/stdout");$pkg.Stderr=BJ((C.Stderr>>>0),"/dev/stderr");BW=(function(b){var b;return true;});AW=BO;J();BY();CE();CR();}return;}};$init_os.$blocking=true;return $init_os;};return $pkg;})(); +$packages["strconv"]=(function(){var $pkg={},B,A,C,Z,AD,AI,AP,AY,CI,CJ,CK,CL,CN,CO,CP,CQ,CR,CS,CT,CU,CV,CW,CX,G,AE,AJ,AK,AL,AQ,AR,BD,BE,BF,BG,BM,AA,AB,AC,AF,AG,AH,AM,AN,AO,AT,AU,AV,AW,AX,AZ,BA,BB,BC,BI,BJ,BN,BO,BP,BR,BT,BU,BV,BW,BX,BY,BZ,CA,CB,CC,CD,CE;B=$packages["errors"];A=$packages["math"];C=$packages["unicode/utf8"];Z=$pkg.decimal=$newType(0,$kindStruct,"strconv.decimal","decimal","strconv",function(d_,nd_,dp_,neg_,trunc_){this.$val=this;this.d=d_!==undefined?d_:CU.zero();this.nd=nd_!==undefined?nd_:0;this.dp=dp_!==undefined?dp_:0;this.neg=neg_!==undefined?neg_:false;this.trunc=trunc_!==undefined?trunc_:false;});AD=$pkg.leftCheat=$newType(0,$kindStruct,"strconv.leftCheat","leftCheat","strconv",function(delta_,cutoff_){this.$val=this;this.delta=delta_!==undefined?delta_:0;this.cutoff=cutoff_!==undefined?cutoff_:"";});AI=$pkg.extFloat=$newType(0,$kindStruct,"strconv.extFloat","extFloat","strconv",function(mant_,exp_,neg_){this.$val=this;this.mant=mant_!==undefined?mant_:new $Uint64(0,0);this.exp=exp_!==undefined?exp_:0;this.neg=neg_!==undefined?neg_:false;});AP=$pkg.floatInfo=$newType(0,$kindStruct,"strconv.floatInfo","floatInfo","strconv",function(mantbits_,expbits_,bias_){this.$val=this;this.mantbits=mantbits_!==undefined?mantbits_:0;this.expbits=expbits_!==undefined?expbits_:0;this.bias=bias_!==undefined?bias_:0;});AY=$pkg.decimalSlice=$newType(0,$kindStruct,"strconv.decimalSlice","decimalSlice","strconv",function(d_,nd_,dp_,neg_){this.$val=this;this.d=d_!==undefined?d_:CL.nil;this.nd=nd_!==undefined?nd_:0;this.dp=dp_!==undefined?dp_:0;this.neg=neg_!==undefined?neg_:false;});CI=$sliceType(AD);CJ=$sliceType($Uint16);CK=$sliceType($Uint32);CL=$sliceType($Uint8);CN=$arrayType($Uint8,24);CO=$arrayType($Uint8,32);CP=$ptrType(AP);CQ=$arrayType($Uint8,3);CR=$arrayType($Uint8,50);CS=$arrayType($Uint8,65);CT=$arrayType($Uint8,4);CU=$arrayType($Uint8,800);CV=$ptrType(Z);CW=$ptrType(AY);CX=$ptrType(AI);Z.ptr.prototype.String=function(){var a,b,c,d;a=this;b=10+a.nd>>0;if(a.dp>0){b=b+(a.dp)>>0;}if(a.dp<0){b=b+(-a.dp)>>0;}c=$makeSlice(CL,b);d=0;if(a.nd===0){return"0";}else if(a.dp<=0){(d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]=48;d=d+(1)>>0;(d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]=46;d=d+(1)>>0;d=d+(AA($subslice(c,d,(d+-a.dp>>0))))>>0;d=d+($copySlice($subslice(c,d),$subslice(new CL(a.d),0,a.nd)))>>0;}else if(a.dp>0;(d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]=46;d=d+(1)>>0;d=d+($copySlice($subslice(c,d),$subslice(new CL(a.d),a.dp,a.nd)))>>0;}else{d=d+($copySlice($subslice(c,d),$subslice(new CL(a.d),0,a.nd)))>>0;d=d+(AA($subslice(c,d,((d+a.dp>>0)-a.nd>>0))))>>0;}return $bytesToString($subslice(c,0,d));};Z.prototype.String=function(){return this.$val.String();};AA=function(a){var a,b,c,d;b=a;c=0;while(true){if(!(c=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+d]=48;c++;}return a.$length;};AB=function(a){var a,b,c;while(true){if(!(a.nd>0&&((b=a.d,c=a.nd-1>>0,((c<0||c>=b.length)?$throwRuntimeError("index out of range"):b[c]))===48))){break;}a.nd=a.nd-(1)>>0;}if(a.nd===0){a.dp=0;}};Z.ptr.prototype.Assign=function(a){var a,b,c,d,e,f,g,h;b=this;c=$clone(CN.zero(),CN);d=0;while(true){if(!((a.$high>0||(a.$high===0&&a.$low>0)))){break;}e=$div64(a,new $Uint64(0,10),false);a=(f=$mul64(new $Uint64(0,10),e),new $Uint64(a.$high-f.$high,a.$low-f.$low));(d<0||d>=c.length)?$throwRuntimeError("index out of range"):c[d]=(new $Uint64(a.$high+0,a.$low+48).$low<<24>>>24);d=d+(1)>>0;a=e;}b.nd=0;d=d-(1)>>0;while(true){if(!(d>=0)){break;}(g=b.d,h=b.nd,(h<0||h>=g.length)?$throwRuntimeError("index out of range"):g[h]=((d<0||d>=c.length)?$throwRuntimeError("index out of range"):c[d]));b.nd=b.nd+(1)>>0;d=d-(1)>>0;}b.dp=b.nd;AB(b);};Z.prototype.Assign=function(a){return this.$val.Assign(a);};AC=function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o;c=0;d=0;e=0;while(true){if(!(((e>>$min(b,31))>>0)===0)){break;}if(c>=a.nd){if(e===0){a.nd=0;return;}while(true){if(!(((e>>$min(b,31))>>0)===0)){break;}e=e*10>>0;c=c+(1)>>0;}break;}g=((f=a.d,((c<0||c>=f.length)?$throwRuntimeError("index out of range"):f[c]))>>0);e=((e*10>>0)+g>>0)-48>>0;c=c+(1)>>0;}a.dp=a.dp-((c-1>>0))>>0;while(true){if(!(c=h.length)?$throwRuntimeError("index out of range"):h[c]))>>0);j=(e>>$min(b,31))>>0;e=e-(((k=b,k<32?(j<>0))>>0;(l=a.d,(d<0||d>=l.length)?$throwRuntimeError("index out of range"):l[d]=((j+48>>0)<<24>>>24));d=d+(1)>>0;e=((e*10>>0)+i>>0)-48>>0;c=c+(1)>>0;}while(true){if(!(e>0)){break;}m=(e>>$min(b,31))>>0;e=e-(((n=b,n<32?(m<>0))>>0;if(d<800){(o=a.d,(d<0||d>=o.length)?$throwRuntimeError("index out of range"):o[d]=((m+48>>0)<<24>>>24));d=d+(1)>>0;}else if(m>0){a.trunc=true;}e=e*10>>0;}a.nd=d;AB(a);};AF=function(a,b){var a,b,c;c=0;while(true){if(!(c=a.$length){return true;}if(!((((c<0||c>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+c])===b.charCodeAt(c)))){return((c<0||c>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+c])>0;}return false;};AG=function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;c=((b<0||b>=AE.$length)?$throwRuntimeError("index out of range"):AE.$array[AE.$offset+b]).delta;if(AF($subslice(new CL(a.d),0,a.nd),((b<0||b>=AE.$length)?$throwRuntimeError("index out of range"):AE.$array[AE.$offset+b]).cutoff)){c=c-(1)>>0;}d=a.nd;e=a.nd+c>>0;f=0;d=d-(1)>>0;while(true){if(!(d>=0)){break;}f=f+(((g=b,g<32?(((((h=a.d,((d<0||d>=h.length)?$throwRuntimeError("index out of range"):h[d]))>>0)-48>>0))<>0))>>0;j=(i=f/10,(i===i&&i!==1/0&&i!==-1/0)?i>>0:$throwRuntimeError("integer divide by zero"));k=f-(10*j>>0)>>0;e=e-(1)>>0;if(e<800){(l=a.d,(e<0||e>=l.length)?$throwRuntimeError("index out of range"):l[e]=((k+48>>0)<<24>>>24));}else if(!((k===0))){a.trunc=true;}f=j;d=d-(1)>>0;}while(true){if(!(f>0)){break;}n=(m=f/10,(m===m&&m!==1/0&&m!==-1/0)?m>>0:$throwRuntimeError("integer divide by zero"));o=f-(10*n>>0)>>0;e=e-(1)>>0;if(e<800){(p=a.d,(e<0||e>=p.length)?$throwRuntimeError("index out of range"):p[e]=((o+48>>0)<<24>>>24));}else if(!((o===0))){a.trunc=true;}f=n;}a.nd=a.nd+(c)>>0;if(a.nd>=800){a.nd=800;}a.dp=a.dp+(c)>>0;AB(a);};Z.ptr.prototype.Shift=function(a){var a,b;b=this;if(b.nd===0){}else if(a>0){while(true){if(!(a>27)){break;}AG(b,27);a=a-(27)>>0;}AG(b,(a>>>0));}else if(a<0){while(true){if(!(a<-27)){break;}AC(b,27);a=a+(27)>>0;}AC(b,(-a>>>0));}};Z.prototype.Shift=function(a){return this.$val.Shift(a);};AH=function(a,b){var a,b,c,d,e,f,g;if(b<0||b>=a.nd){return false;}if(((c=a.d,((b<0||b>=c.length)?$throwRuntimeError("index out of range"):c[b]))===53)&&((b+1>>0)===a.nd)){if(a.trunc){return true;}return b>0&&!(((d=(((e=a.d,f=b-1>>0,((f<0||f>=e.length)?$throwRuntimeError("index out of range"):e[f]))-48<<24>>>24))%2,d===d?d:$throwRuntimeError("integer divide by zero"))===0));}return(g=a.d,((b<0||b>=g.length)?$throwRuntimeError("index out of range"):g[b]))>=53;};Z.ptr.prototype.Round=function(a){var a,b;b=this;if(a<0||a>=b.nd){return;}if(AH(b,a)){b.RoundUp(a);}else{b.RoundDown(a);}};Z.prototype.Round=function(a){return this.$val.Round(a);};Z.ptr.prototype.RoundDown=function(a){var a,b;b=this;if(a<0||a>=b.nd){return;}b.nd=a;AB(b);};Z.prototype.RoundDown=function(a){return this.$val.RoundDown(a);};Z.ptr.prototype.RoundUp=function(a){var a,b,c,d,e,f,g;b=this;if(a<0||a>=b.nd){return;}c=a-1>>0;while(true){if(!(c>=0)){break;}e=(d=b.d,((c<0||c>=d.length)?$throwRuntimeError("index out of range"):d[c]));if(e<57){(g=b.d,(c<0||c>=g.length)?$throwRuntimeError("index out of range"):g[c]=(f=b.d,((c<0||c>=f.length)?$throwRuntimeError("index out of range"):f[c]))+(1)<<24>>>24);b.nd=c+1>>0;return;}c=c-(1)>>0;}b.d[0]=49;b.nd=1;b.dp=b.dp+(1)>>0;};Z.prototype.RoundUp=function(a){return this.$val.RoundUp(a);};Z.ptr.prototype.RoundedInteger=function(){var a,b,c,d,e,f,g;a=this;if(a.dp>20){return new $Uint64(4294967295,4294967295);}b=0;c=new $Uint64(0,0);b=0;while(true){if(!(b=f.length)?$throwRuntimeError("index out of range"):f[b]))-48<<24>>>24)),new $Uint64(d.$high+e.$high,d.$low+e.$low));b=b+(1)>>0;}while(true){if(!(b>0;}if(AH(a,a.dp)){c=(g=new $Uint64(0,1),new $Uint64(c.$high+g.$high,c.$low+g.$low));}return c;};Z.prototype.RoundedInteger=function(){return this.$val.RoundedInteger();};AI.ptr.prototype.AssignComputeBounds=function(a,b,c,d){var a,b,c,d,e=new AI.ptr(),f=new AI.ptr(),g,h,i,j,k,l,m,n,o;g=this;g.mant=a;g.exp=b-(d.mantbits>>0)>>0;g.neg=c;if(g.exp<=0&&(h=$shiftLeft64(($shiftRightUint64(a,(-g.exp>>>0))),(-g.exp>>>0)),(a.$high===h.$high&&a.$low===h.$low))){g.mant=$shiftRightUint64(g.mant,((-g.exp>>>0)));g.exp=0;i=$clone(g,AI);j=$clone(g,AI);$copy(e,i,AI);$copy(f,j,AI);return[e,f];}k=b-d.bias>>0;$copy(f,new AI.ptr((l=$mul64(new $Uint64(0,2),g.mant),new $Uint64(l.$high+0,l.$low+1)),g.exp-1>>0,g.neg),AI);if(!((m=$shiftLeft64(new $Uint64(0,1),d.mantbits),(a.$high===m.$high&&a.$low===m.$low)))||(k===1)){$copy(e,new AI.ptr((n=$mul64(new $Uint64(0,2),g.mant),new $Uint64(n.$high-0,n.$low-1)),g.exp-1>>0,g.neg),AI);}else{$copy(e,new AI.ptr((o=$mul64(new $Uint64(0,4),g.mant),new $Uint64(o.$high-0,o.$low-1)),g.exp-2>>0,g.neg),AI);}return[e,f];};AI.prototype.AssignComputeBounds=function(a,b,c,d){return this.$val.AssignComputeBounds(a,b,c,d);};AI.ptr.prototype.Normalize=function(){var a=0,b,c,d,e,f,g,h,i,j,k,l,m,n;b=this;c=b.mant;d=b.exp;e=c;f=d;if((e.$high===0&&e.$low===0)){a=0;return a;}if((g=$shiftRightUint64(e,32),(g.$high===0&&g.$low===0))){e=$shiftLeft64(e,(32));f=f-(32)>>0;}if((h=$shiftRightUint64(e,48),(h.$high===0&&h.$low===0))){e=$shiftLeft64(e,(16));f=f-(16)>>0;}if((i=$shiftRightUint64(e,56),(i.$high===0&&i.$low===0))){e=$shiftLeft64(e,(8));f=f-(8)>>0;}if((j=$shiftRightUint64(e,60),(j.$high===0&&j.$low===0))){e=$shiftLeft64(e,(4));f=f-(4)>>0;}if((k=$shiftRightUint64(e,62),(k.$high===0&&k.$low===0))){e=$shiftLeft64(e,(2));f=f-(2)>>0;}if((l=$shiftRightUint64(e,63),(l.$high===0&&l.$low===0))){e=$shiftLeft64(e,(1));f=f-(1)>>0;}a=((b.exp-f>>0)>>>0);m=e;n=f;b.mant=m;b.exp=n;return a;};AI.prototype.Normalize=function(){return this.$val.Normalize();};AI.ptr.prototype.Multiply=function(a){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x;b=this;a=$clone(a,AI);c=$shiftRightUint64(b.mant,32);d=new $Uint64(0,(b.mant.$low>>>0));e=c;f=d;g=$shiftRightUint64(a.mant,32);h=new $Uint64(0,(a.mant.$low>>>0));i=g;j=h;k=$mul64(e,j);l=$mul64(f,i);b.mant=(m=(n=$mul64(e,i),o=$shiftRightUint64(k,32),new $Uint64(n.$high+o.$high,n.$low+o.$low)),p=$shiftRightUint64(l,32),new $Uint64(m.$high+p.$high,m.$low+p.$low));u=(q=(r=new $Uint64(0,(k.$low>>>0)),s=new $Uint64(0,(l.$low>>>0)),new $Uint64(r.$high+s.$high,r.$low+s.$low)),t=$shiftRightUint64(($mul64(f,j)),32),new $Uint64(q.$high+t.$high,q.$low+t.$low));u=(v=new $Uint64(0,2147483648),new $Uint64(u.$high+v.$high,u.$low+v.$low));b.mant=(w=b.mant,x=($shiftRightUint64(u,32)),new $Uint64(w.$high+x.$high,w.$low+x.$low));b.exp=(b.exp+a.exp>>0)+64>>0;};AI.prototype.Multiply=function(a){return this.$val.Multiply(a);};AI.ptr.prototype.AssignDecimal=function(a,b,c,d,e){var a,aa,ab,ac,ad,ae,b,c,d,e,f=false,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;g=this;h=0;if(d){h=h+(4)>>0;}g.mant=a;g.exp=0;g.neg=c;j=(i=((b- -348>>0))/8,(i===i&&i!==1/0&&i!==-1/0)?i>>0:$throwRuntimeError("integer divide by zero"));if(b<-348||j>=87){f=false;return f;}l=(k=((b- -348>>0))%8,k===k?k:$throwRuntimeError("integer divide by zero"));if(l<19&&(m=(n=19-l>>0,((n<0||n>=AL.length)?$throwRuntimeError("index out of range"):AL[n])),(a.$high=AL.length)?$throwRuntimeError("index out of range"):AL[l])));g.Normalize();}else{g.Normalize();g.Multiply(((l<0||l>=AJ.length)?$throwRuntimeError("index out of range"):AJ[l]));h=h+(4)>>0;}g.Multiply(((j<0||j>=AK.length)?$throwRuntimeError("index out of range"):AK[j]));if(h>0){h=h+(1)>>0;}h=h+(4)>>0;o=g.Normalize();h=(p=(o),p<32?(h<>0;q=e.bias-63>>0;r=0;if(g.exp<=q){r=(((63-e.mantbits>>>0)+1>>>0)+((q-g.exp>>0)>>>0)>>>0);}else{r=(63-e.mantbits>>>0);}s=$shiftLeft64(new $Uint64(0,1),((r-1>>>0)));w=(t=g.mant,u=(v=$shiftLeft64(new $Uint64(0,1),r),new $Uint64(v.$high-0,v.$low-1)),new $Uint64(t.$high&u.$high,(t.$low&u.$low)>>>0));if((x=(y=new $Int64(s.$high,s.$low),z=new $Int64(0,h),new $Int64(y.$high-z.$high,y.$low-z.$low)),aa=new $Int64(w.$high,w.$low),(x.$high>0))*28>>0)/93,(d===d&&d!==1/0&&d!==-1/0)?d>>0:$throwRuntimeError("integer divide by zero"));g=(f=((e- -348>>0))/8,(f===f&&f!==1/0&&f!==-1/0)?f>>0:$throwRuntimeError("integer divide by zero"));Loop:while(true){if(!(true)){break;}h=(c.exp+((g<0||g>=AK.length)?$throwRuntimeError("index out of range"):AK[g]).exp>>0)+64>>0;if(h<-60){g=g+(1)>>0;}else if(h>-32){g=g-(1)>>0;}else{break Loop;}}c.Multiply(((g<0||g>=AK.length)?$throwRuntimeError("index out of range"):AK[g]));i=-((-348+(g*8>>0)>>0));j=g;a=i;b=j;return[a,b];};AI.prototype.frexp10=function(){return this.$val.frexp10();};AM=function(a,b,c){var a,b,c,d=0,e,f;e=c.frexp10();d=e[0];f=e[1];a.Multiply(((f<0||f>=AK.length)?$throwRuntimeError("index out of range"):AK[f]));b.Multiply(((f<0||f>=AK.length)?$throwRuntimeError("index out of range"):AK[f]));return d;};AI.ptr.prototype.FixedDecimal=function(a,b){var a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;c=this;if((d=c.mant,(d.$high===0&&d.$low===0))){a.nd=0;a.dp=0;a.neg=c.neg;return true;}if(b===0){$panic(new $String("strconv: internal error: extFloat.FixedDecimal called with n == 0"));}c.Normalize();e=c.frexp10();f=e[0];g=(-c.exp>>>0);h=($shiftRightUint64(c.mant,g).$low>>>0);k=(i=c.mant,j=$shiftLeft64(new $Uint64(0,h),g),new $Uint64(i.$high-j.$high,i.$low-j.$low));l=new $Uint64(0,1);m=b;n=0;o=new $Uint64(0,1);p=0;q=new $Uint64(0,1);r=p;s=q;while(true){if(!(r<20)){break;}if((t=new $Uint64(0,h),(s.$high>t.$high||(s.$high===t.$high&&s.$low>t.$low)))){n=r;break;}s=$mul64(s,(new $Uint64(0,10)));r=r+(1)>>0;}u=h;if(n>m){o=(v=n-m>>0,((v<0||v>=AL.length)?$throwRuntimeError("index out of range"):AL[v]));h=(w=h/((o.$low>>>0)),(w===w&&w!==1/0&&w!==-1/0)?w>>>0:$throwRuntimeError("integer divide by zero"));u=u-((x=(o.$low>>>0),(((h>>>16<<16)*x>>>0)+(h<<16>>>16)*x)>>>0))>>>0;}else{u=0;}y=$clone(CO.zero(),CO);z=32;aa=h;while(true){if(!(aa>0)){break;}ac=(ab=aa/10,(ab===ab&&ab!==1/0&&ab!==-1/0)?ab>>>0:$throwRuntimeError("integer divide by zero"));aa=aa-(((((10>>>16<<16)*ac>>>0)+(10<<16>>>16)*ac)>>>0))>>>0;z=z-(1)>>0;(z<0||z>=y.length)?$throwRuntimeError("index out of range"):y[z]=((aa+48>>>0)<<24>>>24);aa=ac;}ad=z;while(true){if(!(ad<32)){break;}(ae=a.d,af=ad-z>>0,(af<0||af>=ae.$length)?$throwRuntimeError("index out of range"):ae.$array[ae.$offset+af]=((ad<0||ad>=y.length)?$throwRuntimeError("index out of range"):y[ad]));ad=ad+(1)>>0;}ag=32-z>>0;a.nd=ag;a.dp=n+f>>0;m=m-(ag)>>0;if(m>0){if(!((u===0))||!((o.$high===0&&o.$low===1))){$panic(new $String("strconv: internal error, rest != 0 but needed > 0"));}while(true){if(!(m>0)){break;}k=$mul64(k,(new $Uint64(0,10)));l=$mul64(l,(new $Uint64(0,10)));if((ah=$mul64(new $Uint64(0,2),l),ai=$shiftLeft64(new $Uint64(0,1),g),(ah.$high>ai.$high||(ah.$high===ai.$high&&ah.$low>ai.$low)))){return false;}aj=$shiftRightUint64(k,g);(ak=a.d,(ag<0||ag>=ak.$length)?$throwRuntimeError("index out of range"):ak.$array[ak.$offset+ag]=(new $Uint64(aj.$high+0,aj.$low+48).$low<<24>>>24));k=(al=$shiftLeft64(aj,g),new $Uint64(k.$high-al.$high,k.$low-al.$low));ag=ag+(1)>>0;m=m-(1)>>0;}a.nd=ag;}an=AN(a,(am=$shiftLeft64(new $Uint64(0,u),g),new $Uint64(am.$high|k.$high,(am.$low|k.$low)>>>0)),o,g,l);if(!an){return false;}ao=a.nd-1>>0;while(true){if(!(ao>=0)){break;}if(!(((ap=a.d,((ao<0||ao>=ap.$length)?$throwRuntimeError("index out of range"):ap.$array[ap.$offset+ao]))===48))){a.nd=ao+1>>0;break;}ao=ao-(1)>>0;}return true;};AI.prototype.FixedDecimal=function(a,b){return this.$val.FixedDecimal(a,b);};AN=function(a,b,c,d,e){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;if((f=$shiftLeft64(c,d),(b.$high>f.$high||(b.$high===f.$high&&b.$low>f.$low)))){$panic(new $String("strconv: num > den<h.$high||(g.$high===h.$high&&g.$low>h.$low)))){$panic(new $String("strconv: \xCE\xB5 > (den<l.$high||(k.$high===l.$high&&k.$low>l.$low)))){m=a.nd-1>>0;while(true){if(!(m>=0)){break;}if((n=a.d,((m<0||m>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+m]))===57){a.nd=a.nd-(1)>>0;}else{break;}m=m-(1)>>0;}if(m<0){(o=a.d,(0<0||0>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+0]=49);a.nd=1;a.dp=a.dp+(1)>>0;}else{(q=a.d,(m<0||m>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+m]=(p=a.d,((m<0||m>=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+m]))+(1)<<24>>>24);}return true;}return false;};AI.ptr.prototype.ShortestDecimal=function(a,b,c){var a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b,ba,bb,bc,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;d=this;if((e=d.mant,(e.$high===0&&e.$low===0))){a.nd=0;a.dp=0;a.neg=d.neg;return true;}if((d.exp===0)&&$equal(b,d,AI)&&$equal(b,c,AI)){f=$clone(CN.zero(),CN);g=23;h=d.mant;while(true){if(!((h.$high>0||(h.$high===0&&h.$low>0)))){break;}i=$div64(h,new $Uint64(0,10),false);h=(j=$mul64(new $Uint64(0,10),i),new $Uint64(h.$high-j.$high,h.$low-j.$low));(g<0||g>=f.length)?$throwRuntimeError("index out of range"):f[g]=(new $Uint64(h.$high+0,h.$low+48).$low<<24>>>24);g=g-(1)>>0;h=i;}k=(24-g>>0)-1>>0;l=0;while(true){if(!(l=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+l]=(m=(g+1>>0)+l>>0,((m<0||m>=f.length)?$throwRuntimeError("index out of range"):f[m])));l=l+(1)>>0;}o=k;p=k;a.nd=o;a.dp=p;while(true){if(!(a.nd>0&&((q=a.d,r=a.nd-1>>0,((r<0||r>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+r]))===48))){break;}a.nd=a.nd-(1)>>0;}if(a.nd===0){a.dp=0;}a.neg=d.neg;return true;}c.Normalize();if(d.exp>c.exp){d.mant=$shiftLeft64(d.mant,(((d.exp-c.exp>>0)>>>0)));d.exp=c.exp;}if(b.exp>c.exp){b.mant=$shiftLeft64(b.mant,(((b.exp-c.exp>>0)>>>0)));b.exp=c.exp;}s=AM(b,d,c);c.mant=(t=c.mant,u=new $Uint64(0,1),new $Uint64(t.$high+u.$high,t.$low+u.$low));b.mant=(v=b.mant,w=new $Uint64(0,1),new $Uint64(v.$high-w.$high,v.$low-w.$low));x=(-c.exp>>>0);y=($shiftRightUint64(c.mant,x).$low>>>0);ab=(z=c.mant,aa=$shiftLeft64(new $Uint64(0,y),x),new $Uint64(z.$high-aa.$high,z.$low-aa.$low));ae=(ac=c.mant,ad=b.mant,new $Uint64(ac.$high-ad.$high,ac.$low-ad.$low));ah=(af=c.mant,ag=d.mant,new $Uint64(af.$high-ag.$high,af.$low-ag.$low));ai=0;aj=0;ak=new $Uint64(0,1);al=aj;am=ak;while(true){if(!(al<20)){break;}if((an=new $Uint64(0,y),(am.$high>an.$high||(am.$high===an.$high&&am.$low>an.$low)))){ai=al;break;}am=$mul64(am,(new $Uint64(0,10)));al=al+(1)>>0;}ao=0;while(true){if(!(ao>0)-1>>0,((ap<0||ap>=AL.length)?$throwRuntimeError("index out of range"):AL[ap]));as=(ar=y/(aq.$low>>>0),(ar===ar&&ar!==1/0&&ar!==-1/0)?ar>>>0:$throwRuntimeError("integer divide by zero"));(at=a.d,(ao<0||ao>=at.$length)?$throwRuntimeError("index out of range"):at.$array[at.$offset+ao]=((as+48>>>0)<<24>>>24));y=y-((au=(aq.$low>>>0),(((as>>>16<<16)*au>>>0)+(as<<16>>>16)*au)>>>0))>>>0;aw=(av=$shiftLeft64(new $Uint64(0,y),x),new $Uint64(av.$high+ab.$high,av.$low+ab.$low));if((aw.$high>0;a.dp=ai+s>>0;a.neg=d.neg;return AO(a,aw,ah,ae,$shiftLeft64(aq,x),new $Uint64(0,2));}ao=ao+(1)>>0;}a.nd=ai;a.dp=a.nd+s>>0;a.neg=d.neg;ax=0;ay=new $Uint64(0,1);while(true){if(!(true)){break;}ab=$mul64(ab,(new $Uint64(0,10)));ay=$mul64(ay,(new $Uint64(0,10)));ax=($shiftRightUint64(ab,x).$low>>0);(az=a.d,ba=a.nd,(ba<0||ba>=az.$length)?$throwRuntimeError("index out of range"):az.$array[az.$offset+ba]=((ax+48>>0)<<24>>>24));a.nd=a.nd+(1)>>0;ab=(bb=$shiftLeft64(new $Uint64(0,ax),x),new $Uint64(ab.$high-bb.$high,ab.$low-bb.$low));if((bc=$mul64(ae,ay),(ab.$high>0;(m=a.d,(k<0||k>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+k]=(l=a.d,((k<0||k>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+k]))-(1)<<24>>>24);b=(n=e,new $Uint64(b.$high+n.$high,b.$low+n.$low));}if((o=new $Uint64(b.$high+e.$high,b.$low+e.$low),p=(q=(r=$div64(e,new $Uint64(0,2),false),new $Uint64(c.$high+r.$high,c.$low+r.$low)),new $Uint64(q.$high+f.$high,q.$low+f.$low)),(o.$highs.$high||(b.$high===s.$high&&b.$low>s.$low)))){return false;}if((a.nd===1)&&((t=a.d,((0<0||0>=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+0]))===48)){a.nd=0;a.dp=0;}return true;};AT=$pkg.AppendFloat=function(a,b,c,d,e){var a,b,c,d,e;return AU(a,b,c,d,e);};AU=function(a,b,c,d,e){var a,aa,ab,ac,ad,ae,af,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;f=new $Uint64(0,0);g=CP.nil;h=e;if(h===32){f=new $Uint64(0,A.Float32bits(b));g=AQ;}else if(h===64){f=A.Float64bits(b);g=AR;}else{$panic(new $String("strconv: illegal AppendFloat/FormatFloat bitSize"));}j=!((i=$shiftRightUint64(f,((g.expbits+g.mantbits>>>0))),(i.$high===0&&i.$low===0)));l=($shiftRightUint64(f,g.mantbits).$low>>0)&((((k=g.expbits,k<32?(1<>0)-1>>0));o=(m=(n=$shiftLeft64(new $Uint64(0,1),g.mantbits),new $Uint64(n.$high-0,n.$low-1)),new $Uint64(f.$high&m.$high,(f.$low&m.$low)>>>0));p=l;if(p===(((q=g.expbits,q<32?(1<>0)-1>>0)){r="";if(!((o.$high===0&&o.$low===0))){r="NaN";}else if(j){r="-Inf";}else{r="+Inf";}return $appendSlice(a,new CL($stringToBytes(r)));}else if(p===0){l=l+(1)>>0;}else{o=(s=$shiftLeft64(new $Uint64(0,1),g.mantbits),new $Uint64(o.$high|s.$high,(o.$low|s.$low)>>>0));}l=l+(g.bias)>>0;if(c===98){return BB(a,j,o,l,g);}if(!G){return AV(a,d,c,j,o,l,g);}t=$clone(new AY.ptr(),AY);u=false;v=d<0;if(v){w=new AI.ptr();x=w.AssignComputeBounds(o,l,j,g);y=$clone(x[0],AI);z=$clone(x[1],AI);aa=$clone(CO.zero(),CO);t.d=new CL(aa);u=w.ShortestDecimal(t,y,z);if(!u){return AV(a,d,c,j,o,l,g);}ab=c;if(ab===101||ab===69){d=t.nd-1>>0;}else if(ab===102){d=BC(t.nd-t.dp>>0,0);}else if(ab===103||ab===71){d=t.nd;}}else if(!((c===102))){ac=d;ad=c;if(ad===101||ad===69){ac=ac+(1)>>0;}else if(ad===103||ad===71){if(d===0){d=1;}ac=d;}if(ac<=15){ae=$clone(CN.zero(),CN);t.d=new CL(ae);af=new AI.ptr(o,l-(g.mantbits>>0)>>0,j);u=af.FixedDecimal(t,ac);}}if(!u){return AV(a,d,c,j,o,l,g);}return AW(a,v,j,t,d,c);};AV=function(a,b,c,d,e,f,g){var a,b,c,d,e,f,g,h,i,j,k,l;h=new Z.ptr();h.Assign(e);h.Shift(f-(g.mantbits>>0)>>0);i=$clone(new AY.ptr(),AY);j=b<0;if(j){AX(h,e,f,g);$copy(i,new AY.ptr(new CL(h.d),h.nd,h.dp,false),AY);k=c;if(k===101||k===69){b=i.nd-1>>0;}else if(k===102){b=BC(i.nd-i.dp>>0,0);}else if(k===103||k===71){b=i.nd;}}else{l=c;if(l===101||l===69){h.Round(b+1>>0);}else if(l===102){h.Round(h.dp+b>>0);}else if(l===103||l===71){if(b===0){b=1;}h.Round(b);}$copy(i,new AY.ptr(new CL(h.d),h.nd,h.dp,false),AY);}return AW(a,j,d,i,b,c);};AW=function(a,b,c,d,e,f){var a,b,c,d,e,f,g,h,i;d=$clone(d,AY);g=f;if(g===101||g===69){return AZ(a,c,d,e,f);}else if(g===102){return BA(a,c,d,e);}else if(g===103||g===71){h=e;if(h>d.nd&&d.nd>=d.dp){h=d.nd;}if(b){h=6;}i=d.dp-1>>0;if(i<-4||i>=h){if(e>d.nd){e=d.nd;}return AZ(a,c,d,e-1>>0,(f+101<<24>>>24)-103<<24>>>24);}if(e>d.dp){e=d.nd;}return BA(a,c,d,BC(e-d.dp>>0,0));}return $append(a,37,f);};AX=function(a,b,c,d){var a,aa,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;if((b.$high===0&&b.$low===0)){a.nd=0;return;}e=d.bias+1>>0;if(c>e&&(332*((a.dp-a.nd>>0))>>0)>=(100*((c-(d.mantbits>>0)>>0))>>0)){return;}f=new Z.ptr();f.Assign((g=$mul64(b,new $Uint64(0,2)),new $Uint64(g.$high+0,g.$low+1)));f.Shift((c-(d.mantbits>>0)>>0)-1>>0);h=new $Uint64(0,0);i=0;if((j=$shiftLeft64(new $Uint64(0,1),d.mantbits),(b.$high>j.$high||(b.$high===j.$high&&b.$low>j.$low)))||(c===e)){h=new $Uint64(b.$high-0,b.$low-1);i=c;}else{h=(k=$mul64(b,new $Uint64(0,2)),new $Uint64(k.$high-0,k.$low-1));i=c-1>>0;}l=new Z.ptr();l.Assign((m=$mul64(h,new $Uint64(0,2)),new $Uint64(m.$high+0,m.$low+1)));l.Shift((i-(d.mantbits>>0)>>0)-1>>0);o=(n=$div64(b,new $Uint64(0,2),true),(n.$high===0&&n.$low===0));p=0;while(true){if(!(p=w.length)?$throwRuntimeError("index out of range"):w[p]));}else{t=48;}u=(x=a.d,((p<0||p>=x.length)?$throwRuntimeError("index out of range"):x[p]));if(p=y.length)?$throwRuntimeError("index out of range"):y[p]));}else{v=48;}z=!((t===u))||(o&&(t===u)&&((p+1>>0)===l.nd));aa=!((u===v))&&(o||(u+1<<24>>>24)>0)>0);return;}else if(z){a.RoundDown(p+1>>0);return;}else if(aa){a.RoundUp(p+1>>0);return;}p=p+(1)>>0;}};AZ=function(a,b,c,d,e){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;c=$clone(c,AY);if(b){a=$append(a,45);}f=48;if(!((c.nd===0))){f=(g=c.d,((0<0||0>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+0]));}a=$append(a,f);if(d>0){a=$append(a,46);h=1;i=((c.nd+d>>0)+1>>0)-BC(c.nd,d+1>>0)>>0;while(true){if(!(h=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+h])));h=h+(1)>>0;}while(true){if(!(h<=d)){break;}a=$append(a,48);h=h+(1)>>0;}}a=$append(a,e);k=c.dp-1>>0;if(c.nd===0){k=0;}if(k<0){f=45;k=-k;}else{f=43;}a=$append(a,f);l=$clone(CQ.zero(),CQ);m=3;while(true){if(!(k>=10)){break;}m=m-(1)>>0;(m<0||m>=l.length)?$throwRuntimeError("index out of range"):l[m]=(((n=k%10,n===n?n:$throwRuntimeError("integer divide by zero"))+48>>0)<<24>>>24);k=(o=k/(10),(o===o&&o!==1/0&&o!==-1/0)?o>>0:$throwRuntimeError("integer divide by zero"));}m=m-(1)>>0;(m<0||m>=l.length)?$throwRuntimeError("index out of range"):l[m]=((k+48>>0)<<24>>>24);p=m;if(p===0){a=$append(a,l[0],l[1],l[2]);}else if(p===1){a=$append(a,l[1],l[2]);}else if(p===2){a=$append(a,48,l[2]);}return a;};BA=function(a,b,c,d){var a,b,c,d,e,f,g,h,i,j;c=$clone(c,AY);if(b){a=$append(a,45);}if(c.dp>0){e=0;e=0;while(true){if(!(e=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+e])));e=e+(1)>>0;}while(true){if(!(e>0;}}else{a=$append(a,48);}if(d>0){a=$append(a,46);g=0;while(true){if(!(g>0;if(0<=i&&i=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+i]));}a=$append(a,h);g=g+(1)>>0;}}return a;};BB=function(a,b,c,d,e){var a,b,c,d,e,f,g,h,i,j,k,l;f=$clone(CR.zero(),CR);g=50;d=d-((e.mantbits>>0))>>0;h=43;if(d<0){h=45;d=-d;}i=0;while(true){if(!(d>0||i<1)){break;}i=i+(1)>>0;g=g-(1)>>0;(g<0||g>=f.length)?$throwRuntimeError("index out of range"):f[g]=(((j=d%10,j===j?j:$throwRuntimeError("integer divide by zero"))+48>>0)<<24>>>24);d=(k=d/(10),(k===k&&k!==1/0&&k!==-1/0)?k>>0:$throwRuntimeError("integer divide by zero"));}g=g-(1)>>0;(g<0||g>=f.length)?$throwRuntimeError("index out of range"):f[g]=h;g=g-(1)>>0;(g<0||g>=f.length)?$throwRuntimeError("index out of range"):f[g]=112;i=0;while(true){if(!((c.$high>0||(c.$high===0&&c.$low>0))||i<1)){break;}i=i+(1)>>0;g=g-(1)>>0;(g<0||g>=f.length)?$throwRuntimeError("index out of range"):f[g]=((l=$div64(c,new $Uint64(0,10),true),new $Uint64(l.$high+0,l.$low+48)).$low<<24>>>24);c=$div64(c,(new $Uint64(0,10)),false);}if(b){g=g-(1)>>0;(g<0||g>=f.length)?$throwRuntimeError("index out of range"):f[g]=45;}return $appendSlice(a,$subslice(new CL(f),g));};BC=function(a,b){var a,b;if(a>b){return a;}return b;};BI=$pkg.FormatInt=function(a,b){var a,b,c,d;c=BN(CL.nil,new $Uint64(a.$high,a.$low),b,(a.$high<0||(a.$high===0&&a.$low<0)),false);d=c[1];return d;};BJ=$pkg.Itoa=function(a){var a;return BI(new $Int64(0,a),10);};BN=function(a,b,c,d,e){var a,b,c,d,e,f=CL.nil,g="",h,i,j,k,l,m,n,o,p,q,r,s,t;if(c<2||c>36){$panic(new $String("strconv: illegal AppendInt/FormatInt base"));}h=$clone(CS.zero(),CS);i=65;if(d){b=new $Uint64(-b.$high,-b.$low);}if(c===10){while(true){if(!((b.$high>0||(b.$high===0&&b.$low>=100)))){break;}i=i-(2)>>0;j=$div64(b,new $Uint64(0,100),false);l=((k=$mul64(j,new $Uint64(0,100)),new $Uint64(b.$high-k.$high,b.$low-k.$low)).$low>>>0);(m=i+1>>0,(m<0||m>=h.length)?$throwRuntimeError("index out of range"):h[m]="0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789".charCodeAt(l));(n=i+0>>0,(n<0||n>=h.length)?$throwRuntimeError("index out of range"):h[n]="0000000000111111111122222222223333333333444444444455555555556666666666777777777788888888889999999999".charCodeAt(l));b=j;}if((b.$high>0||(b.$high===0&&b.$low>=10))){i=i-(1)>>0;o=$div64(b,new $Uint64(0,10),false);(i<0||i>=h.length)?$throwRuntimeError("index out of range"):h[i]="0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt(((p=$mul64(o,new $Uint64(0,10)),new $Uint64(b.$high-p.$high,b.$low-p.$low)).$low>>>0));b=o;}}else{q=((c<0||c>=BM.length)?$throwRuntimeError("index out of range"):BM[c]);if(q>0){r=new $Uint64(0,c);s=(r.$low>>>0)-1>>>0;while(true){if(!((b.$high>r.$high||(b.$high===r.$high&&b.$low>=r.$low)))){break;}i=i-(1)>>0;(i<0||i>=h.length)?$throwRuntimeError("index out of range"):h[i]="0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt((((b.$low>>>0)&s)>>>0));b=$shiftRightUint64(b,(q));}}else{t=new $Uint64(0,c);while(true){if(!((b.$high>t.$high||(b.$high===t.$high&&b.$low>=t.$low)))){break;}i=i-(1)>>0;(i<0||i>=h.length)?$throwRuntimeError("index out of range"):h[i]="0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt(($div64(b,t,true).$low>>>0));b=$div64(b,(t),false);}}}i=i-(1)>>0;(i<0||i>=h.length)?$throwRuntimeError("index out of range"):h[i]="0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt((b.$low>>>0));if(d){i=i-(1)>>0;(i<0||i>=h.length)?$throwRuntimeError("index out of range"):h[i]=45;}if(e){f=$appendSlice(a,$subslice(new CL(h),i));return[f,g];}g=$bytesToString($subslice(new CL(h),i));return[f,g];};BO=function(a,b,c){var a,b,c,d,e,f,g,h,i,j,k,l,m;d=$clone(CT.zero(),CT);f=$makeSlice(CL,0,(e=(3*a.length>>0)/2,(e===e&&e!==1/0&&e!==-1/0)?e>>0:$throwRuntimeError("integer divide by zero")));f=$append(f,b);g=0;while(true){if(!(a.length>0)){break;}h=(a.charCodeAt(0)>>0);g=1;if(h>=128){i=C.DecodeRuneInString(a);h=i[0];g=i[1];}if((g===1)&&(h===65533)){f=$appendSlice(f,new CL($stringToBytes("\\x")));f=$append(f,"0123456789abcdef".charCodeAt((a.charCodeAt(0)>>>4<<24>>>24)));f=$append(f,"0123456789abcdef".charCodeAt(((a.charCodeAt(0)&15)>>>0)));a=a.substring(g);continue;}if((h===(b>>0))||(h===92)){f=$append(f,92);f=$append(f,(h<<24>>>24));a=a.substring(g);continue;}if(c){if(h<128&&CE(h)){f=$append(f,(h<<24>>>24));a=a.substring(g);continue;}}else if(CE(h)){j=C.EncodeRune(new CL(d),h);f=$appendSlice(f,$subslice(new CL(d),0,j));a=a.substring(g);continue;}k=h;if(k===7){f=$appendSlice(f,new CL($stringToBytes("\\a")));}else if(k===8){f=$appendSlice(f,new CL($stringToBytes("\\b")));}else if(k===12){f=$appendSlice(f,new CL($stringToBytes("\\f")));}else if(k===10){f=$appendSlice(f,new CL($stringToBytes("\\n")));}else if(k===13){f=$appendSlice(f,new CL($stringToBytes("\\r")));}else if(k===9){f=$appendSlice(f,new CL($stringToBytes("\\t")));}else if(k===11){f=$appendSlice(f,new CL($stringToBytes("\\v")));}else{if(h<32){f=$appendSlice(f,new CL($stringToBytes("\\x")));f=$append(f,"0123456789abcdef".charCodeAt((a.charCodeAt(0)>>>4<<24>>>24)));f=$append(f,"0123456789abcdef".charCodeAt(((a.charCodeAt(0)&15)>>>0)));}else if(h>1114111){h=65533;f=$appendSlice(f,new CL($stringToBytes("\\u")));l=12;while(true){if(!(l>=0)){break;}f=$append(f,"0123456789abcdef".charCodeAt((((h>>$min((l>>>0),31))>>0)&15)));l=l-(4)>>0;}}else if(h<65536){f=$appendSlice(f,new CL($stringToBytes("\\u")));l=12;while(true){if(!(l>=0)){break;}f=$append(f,"0123456789abcdef".charCodeAt((((h>>$min((l>>>0),31))>>0)&15)));l=l-(4)>>0;}}else{f=$appendSlice(f,new CL($stringToBytes("\\U")));m=28;while(true){if(!(m>=0)){break;}f=$append(f,"0123456789abcdef".charCodeAt((((h>>$min((m>>>0),31))>>0)&15)));m=m-(4)>>0;}}}a=a.substring(g);}f=$append(f,b);return $bytesToString(f);};BP=$pkg.Quote=function(a){var a;return BO(a,34,false);};BR=$pkg.QuoteToASCII=function(a){var a;return BO(a,34,true);};BT=$pkg.QuoteRune=function(a){var a;return BO($encodeRune(a),39,false);};BU=$pkg.AppendQuoteRune=function(a,b){var a,b;return $appendSlice(a,new CL($stringToBytes(BT(b))));};BV=$pkg.QuoteRuneToASCII=function(a){var a;return BO($encodeRune(a),39,true);};BW=$pkg.AppendQuoteRuneToASCII=function(a,b){var a,b;return $appendSlice(a,new CL($stringToBytes(BV(b))));};BX=$pkg.CanBackquote=function(a){var a,b,c,d;while(true){if(!(a.length>0)){break;}b=C.DecodeRuneInString(a);c=b[0];d=b[1];a=a.substring(d);if(d>1){if(c===65279){return false;}continue;}if(c===65533){return false;}if((c<32&&!((c===9)))||(c===96)||(c===127)){return false;}}return true;};BY=function(a){var a,b=0,c=false,d,e,f,g,h,i,j;d=(a>>0);if(48<=d&&d<=57){e=d-48>>0;f=true;b=e;c=f;return[b,c];}else if(97<=d&&d<=102){g=(d-97>>0)+10>>0;h=true;b=g;c=h;return[b,c];}else if(65<=d&&d<=70){i=(d-65>>0)+10>>0;j=true;b=i;c=j;return[b,c];}return[b,c];};BZ=$pkg.UnquoteChar=function(a,b){var a,aa,ab,ac,ad,b,c=0,d=false,e="",f=$ifaceNil,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;g=a.charCodeAt(0);if((g===b)&&((b===39)||(b===34))){f=$pkg.ErrSyntax;return[c,d,e,f];}else if(g>=128){h=C.DecodeRuneInString(a);i=h[0];j=h[1];k=i;l=true;m=a.substring(j);n=$ifaceNil;c=k;d=l;e=m;f=n;return[c,d,e,f];}else if(!((g===92))){o=(a.charCodeAt(0)>>0);p=false;q=a.substring(1);r=$ifaceNil;c=o;d=p;e=q;f=r;return[c,d,e,f];}if(a.length<=1){f=$pkg.ErrSyntax;return[c,d,e,f];}s=a.charCodeAt(1);a=a.substring(2);t=s;switch(0){default:if(t===97){c=7;}else if(t===98){c=8;}else if(t===102){c=12;}else if(t===110){c=10;}else if(t===114){c=13;}else if(t===116){c=9;}else if(t===118){c=11;}else if(t===120||t===117||t===85){u=0;v=s;if(v===120){u=2;}else if(v===117){u=4;}else if(v===85){u=8;}w=0;if(a.length>0)|z;x=x+(1)>>0;}a=a.substring(u);if(s===120){c=w;break;}if(w>1114111){f=$pkg.ErrSyntax;return[c,d,e,f];}c=w;d=true;}else if(t===48||t===49||t===50||t===51||t===52||t===53||t===54||t===55){ab=(s>>0)-48>>0;if(a.length<2){f=$pkg.ErrSyntax;return[c,d,e,f];}ac=0;while(true){if(!(ac<2)){break;}ad=(a.charCodeAt(ac)>>0)-48>>0;if(ad<0||ad>7){f=$pkg.ErrSyntax;return[c,d,e,f];}ab=((ab<<3>>0))|ad;ac=ac+(1)>>0;}a=a.substring(2);if(ab>255){f=$pkg.ErrSyntax;return[c,d,e,f];}c=ab;}else if(t===92){c=92;}else if(t===39||t===34){if(!((s===b))){f=$pkg.ErrSyntax;return[c,d,e,f];}c=(s>>0);}else{f=$pkg.ErrSyntax;return[c,d,e,f];}}e=a;return[c,d,e,f];};CA=$pkg.Unquote=function(a){var a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,b="",c=$ifaceNil,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;d=a.length;if(d<2){e="";f=$pkg.ErrSyntax;b=e;c=f;return[b,c];}g=a.charCodeAt(0);if(!((g===a.charCodeAt((d-1>>0))))){h="";i=$pkg.ErrSyntax;b=h;c=i;return[b,c];}a=a.substring(1,(d-1>>0));if(g===96){if(CB(a,96)){j="";k=$pkg.ErrSyntax;b=j;c=k;return[b,c];}l=a;m=$ifaceNil;b=l;c=m;return[b,c];}if(!((g===34))&&!((g===39))){n="";o=$pkg.ErrSyntax;b=n;c=o;return[b,c];}if(CB(a,10)){p="";q=$pkg.ErrSyntax;b=p;c=q;return[b,c];}if(!CB(a,92)&&!CB(a,g)){r=g;if(r===34){s=a;t=$ifaceNil;b=s;c=t;return[b,c];}else if(r===39){u=C.DecodeRuneInString(a);v=u[0];w=u[1];if((w===a.length)&&(!((v===65533))||!((w===1)))){x=a;y=$ifaceNil;b=x;c=y;return[b,c];}}}z=$clone(CT.zero(),CT);ab=$makeSlice(CL,0,(aa=(3*a.length>>0)/2,(aa===aa&&aa!==1/0&&aa!==-1/0)?aa>>0:$throwRuntimeError("integer divide by zero")));while(true){if(!(a.length>0)){break;}ac=BZ(a,g);ad=ac[0];ae=ac[1];af=ac[2];ag=ac[3];if(!($interfaceIsEqual(ag,$ifaceNil))){ah="";ai=ag;b=ah;c=ai;return[b,c];}a=af;if(ad<128||!ae){ab=$append(ab,(ad<<24>>>24));}else{aj=C.EncodeRune(new CL(z),ad);ab=$appendSlice(ab,$subslice(new CL(z),0,aj));}if((g===39)&&!((a.length===0))){ak="";al=$pkg.ErrSyntax;b=ak;c=al;return[b,c];}}am=$bytesToString(ab);an=$ifaceNil;b=am;c=an;return[b,c];};CB=function(a,b){var a,b,c;c=0;while(true){if(!(c>0;}return false;};CC=function(a,b){var a,b,c,d,e,f,g,h;c=0;d=a.$length;e=c;f=d;while(true){if(!(e>0))/2,(g===g&&g!==1/0&&g!==-1/0)?g>>0:$throwRuntimeError("integer divide by zero"))>>0;if(((h<0||h>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+h])>0;}else{f=h;}}return e;};CD=function(a,b){var a,b,c,d,e,f,g,h;c=0;d=a.$length;e=c;f=d;while(true){if(!(e>0))/2,(g===g&&g!==1/0&&g!==-1/0)?g>>0:$throwRuntimeError("integer divide by zero"))>>0;if(((h<0||h>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+h])>0;}else{f=h;}}return e;};CE=$pkg.IsPrint=function(a){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;if(a<=255){if(32<=a&&a<=126){return true;}if(161<=a&&a<=255){return!((a===173));}return false;}if(0<=a&&a<65536){b=(a<<16>>>16);c=BD;d=BE;e=b;f=c;g=d;h=CC(f,e);if(h>=f.$length||e<(i=h&~1,((i<0||i>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+i]))||(j=h|1,((j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]))=g.$length||!((((k<0||k>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+k])===e));}l=(a>>>0);m=BF;n=BG;o=l;p=m;q=n;r=CD(p,o);if(r>=p.$length||o<(s=r&~1,((s<0||s>=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+s]))||(t=r|1,((t<0||t>=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+t]))=131072){return true;}a=a-(65536)>>0;u=CC(q,(a<<16>>>16));return u>=q.$length||!((((u<0||u>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+u])===(a<<16>>>16)));};CV.methods=[{prop:"set",name:"set",pkg:"strconv",typ:$funcType([$String],[$Bool],false)},{prop:"floatBits",name:"floatBits",pkg:"strconv",typ:$funcType([CP],[$Uint64,$Bool],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Assign",name:"Assign",pkg:"",typ:$funcType([$Uint64],[],false)},{prop:"Shift",name:"Shift",pkg:"",typ:$funcType([$Int],[],false)},{prop:"Round",name:"Round",pkg:"",typ:$funcType([$Int],[],false)},{prop:"RoundDown",name:"RoundDown",pkg:"",typ:$funcType([$Int],[],false)},{prop:"RoundUp",name:"RoundUp",pkg:"",typ:$funcType([$Int],[],false)},{prop:"RoundedInteger",name:"RoundedInteger",pkg:"",typ:$funcType([],[$Uint64],false)}];CX.methods=[{prop:"floatBits",name:"floatBits",pkg:"strconv",typ:$funcType([CP],[$Uint64,$Bool],false)},{prop:"AssignComputeBounds",name:"AssignComputeBounds",pkg:"",typ:$funcType([$Uint64,$Int,$Bool,CP],[AI,AI],false)},{prop:"Normalize",name:"Normalize",pkg:"",typ:$funcType([],[$Uint],false)},{prop:"Multiply",name:"Multiply",pkg:"",typ:$funcType([AI],[],false)},{prop:"AssignDecimal",name:"AssignDecimal",pkg:"",typ:$funcType([$Uint64,$Int,$Bool,$Bool,CP],[$Bool],false)},{prop:"frexp10",name:"frexp10",pkg:"strconv",typ:$funcType([],[$Int,$Int],false)},{prop:"FixedDecimal",name:"FixedDecimal",pkg:"",typ:$funcType([CW,$Int],[$Bool],false)},{prop:"ShortestDecimal",name:"ShortestDecimal",pkg:"",typ:$funcType([CW,CX,CX],[$Bool],false)}];Z.init([{prop:"d",name:"d",pkg:"strconv",typ:CU,tag:""},{prop:"nd",name:"nd",pkg:"strconv",typ:$Int,tag:""},{prop:"dp",name:"dp",pkg:"strconv",typ:$Int,tag:""},{prop:"neg",name:"neg",pkg:"strconv",typ:$Bool,tag:""},{prop:"trunc",name:"trunc",pkg:"strconv",typ:$Bool,tag:""}]);AD.init([{prop:"delta",name:"delta",pkg:"strconv",typ:$Int,tag:""},{prop:"cutoff",name:"cutoff",pkg:"strconv",typ:$String,tag:""}]);AI.init([{prop:"mant",name:"mant",pkg:"strconv",typ:$Uint64,tag:""},{prop:"exp",name:"exp",pkg:"strconv",typ:$Int,tag:""},{prop:"neg",name:"neg",pkg:"strconv",typ:$Bool,tag:""}]);AP.init([{prop:"mantbits",name:"mantbits",pkg:"strconv",typ:$Uint,tag:""},{prop:"expbits",name:"expbits",pkg:"strconv",typ:$Uint,tag:""},{prop:"bias",name:"bias",pkg:"strconv",typ:$Int,tag:""}]);AY.init([{prop:"d",name:"d",pkg:"strconv",typ:CL,tag:""},{prop:"nd",name:"nd",pkg:"strconv",typ:$Int,tag:""},{prop:"dp",name:"dp",pkg:"strconv",typ:$Int,tag:""},{prop:"neg",name:"neg",pkg:"strconv",typ:$Bool,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_strconv=function(){while(true){switch($s){case 0:$r=B.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}G=true;$pkg.ErrRange=B.New("value out of range");$pkg.ErrSyntax=B.New("invalid syntax");AE=new CI([new AD.ptr(0,""),new AD.ptr(1,"5"),new AD.ptr(1,"25"),new AD.ptr(1,"125"),new AD.ptr(2,"625"),new AD.ptr(2,"3125"),new AD.ptr(2,"15625"),new AD.ptr(3,"78125"),new AD.ptr(3,"390625"),new AD.ptr(3,"1953125"),new AD.ptr(4,"9765625"),new AD.ptr(4,"48828125"),new AD.ptr(4,"244140625"),new AD.ptr(4,"1220703125"),new AD.ptr(5,"6103515625"),new AD.ptr(5,"30517578125"),new AD.ptr(5,"152587890625"),new AD.ptr(6,"762939453125"),new AD.ptr(6,"3814697265625"),new AD.ptr(6,"19073486328125"),new AD.ptr(7,"95367431640625"),new AD.ptr(7,"476837158203125"),new AD.ptr(7,"2384185791015625"),new AD.ptr(7,"11920928955078125"),new AD.ptr(8,"59604644775390625"),new AD.ptr(8,"298023223876953125"),new AD.ptr(8,"1490116119384765625"),new AD.ptr(9,"7450580596923828125")]);AJ=$toNativeArray($kindStruct,[new AI.ptr(new $Uint64(2147483648,0),-63,false),new AI.ptr(new $Uint64(2684354560,0),-60,false),new AI.ptr(new $Uint64(3355443200,0),-57,false),new AI.ptr(new $Uint64(4194304000,0),-54,false),new AI.ptr(new $Uint64(2621440000,0),-50,false),new AI.ptr(new $Uint64(3276800000,0),-47,false),new AI.ptr(new $Uint64(4096000000,0),-44,false),new AI.ptr(new $Uint64(2560000000,0),-40,false)]);AK=$toNativeArray($kindStruct,[new AI.ptr(new $Uint64(4203730336,136053384),-1220,false),new AI.ptr(new $Uint64(3132023167,2722021238),-1193,false),new AI.ptr(new $Uint64(2333539104,810921078),-1166,false),new AI.ptr(new $Uint64(3477244234,1573795306),-1140,false),new AI.ptr(new $Uint64(2590748842,1432697645),-1113,false),new AI.ptr(new $Uint64(3860516611,1025131999),-1087,false),new AI.ptr(new $Uint64(2876309015,3348809418),-1060,false),new AI.ptr(new $Uint64(4286034428,3200048207),-1034,false),new AI.ptr(new $Uint64(3193344495,1097586188),-1007,false),new AI.ptr(new $Uint64(2379227053,2424306748),-980,false),new AI.ptr(new $Uint64(3545324584,827693699),-954,false),new AI.ptr(new $Uint64(2641472655,2913388981),-927,false),new AI.ptr(new $Uint64(3936100983,602835915),-901,false),new AI.ptr(new $Uint64(2932623761,1081627501),-874,false),new AI.ptr(new $Uint64(2184974969,1572261463),-847,false),new AI.ptr(new $Uint64(3255866422,1308317239),-821,false),new AI.ptr(new $Uint64(2425809519,944281679),-794,false),new AI.ptr(new $Uint64(3614737867,629291719),-768,false),new AI.ptr(new $Uint64(2693189581,2545915892),-741,false),new AI.ptr(new $Uint64(4013165208,388672741),-715,false),new AI.ptr(new $Uint64(2990041083,708162190),-688,false),new AI.ptr(new $Uint64(2227754207,3536207675),-661,false),new AI.ptr(new $Uint64(3319612455,450088378),-635,false),new AI.ptr(new $Uint64(2473304014,3139815830),-608,false),new AI.ptr(new $Uint64(3685510180,2103616900),-582,false),new AI.ptr(new $Uint64(2745919064,224385782),-555,false),new AI.ptr(new $Uint64(4091738259,3737383206),-529,false),new AI.ptr(new $Uint64(3048582568,2868871352),-502,false),new AI.ptr(new $Uint64(2271371013,1820084875),-475,false),new AI.ptr(new $Uint64(3384606560,885076051),-449,false),new AI.ptr(new $Uint64(2521728396,2444895829),-422,false),new AI.ptr(new $Uint64(3757668132,1881767613),-396,false),new AI.ptr(new $Uint64(2799680927,3102062735),-369,false),new AI.ptr(new $Uint64(4171849679,2289335700),-343,false),new AI.ptr(new $Uint64(3108270227,2410191823),-316,false),new AI.ptr(new $Uint64(2315841784,3205436779),-289,false),new AI.ptr(new $Uint64(3450873173,1697722806),-263,false),new AI.ptr(new $Uint64(2571100870,3497754540),-236,false),new AI.ptr(new $Uint64(3831238852,707476230),-210,false),new AI.ptr(new $Uint64(2854495385,1769181907),-183,false),new AI.ptr(new $Uint64(4253529586,2197867022),-157,false),new AI.ptr(new $Uint64(3169126500,2450594539),-130,false),new AI.ptr(new $Uint64(2361183241,1867548876),-103,false),new AI.ptr(new $Uint64(3518437208,3793315116),-77,false),new AI.ptr(new $Uint64(2621440000,0),-50,false),new AI.ptr(new $Uint64(3906250000,0),-24,false),new AI.ptr(new $Uint64(2910383045,2892103680),3,false),new AI.ptr(new $Uint64(2168404344,4170451332),30,false),new AI.ptr(new $Uint64(3231174267,3372684723),56,false),new AI.ptr(new $Uint64(2407412430,2078956656),83,false),new AI.ptr(new $Uint64(3587324068,2884206696),109,false),new AI.ptr(new $Uint64(2672764710,395977285),136,false),new AI.ptr(new $Uint64(3982729777,3569679143),162,false),new AI.ptr(new $Uint64(2967364920,2361961896),189,false),new AI.ptr(new $Uint64(2210859150,447440347),216,false),new AI.ptr(new $Uint64(3294436857,1114709402),242,false),new AI.ptr(new $Uint64(2454546732,2786846552),269,false),new AI.ptr(new $Uint64(3657559652,443583978),295,false),new AI.ptr(new $Uint64(2725094297,2599384906),322,false),new AI.ptr(new $Uint64(4060706939,3028118405),348,false),new AI.ptr(new $Uint64(3025462433,2044532855),375,false),new AI.ptr(new $Uint64(2254145170,1536935362),402,false),new AI.ptr(new $Uint64(3358938053,3365297469),428,false),new AI.ptr(new $Uint64(2502603868,4204241075),455,false),new AI.ptr(new $Uint64(3729170365,2577424355),481,false),new AI.ptr(new $Uint64(2778448436,3677981733),508,false),new AI.ptr(new $Uint64(4140210802,2744688476),534,false),new AI.ptr(new $Uint64(3084697427,1424604878),561,false),new AI.ptr(new $Uint64(2298278679,4062331362),588,false),new AI.ptr(new $Uint64(3424702107,3546052773),614,false),new AI.ptr(new $Uint64(2551601907,2065781727),641,false),new AI.ptr(new $Uint64(3802183132,2535403578),667,false),new AI.ptr(new $Uint64(2832847187,1558426518),694,false),new AI.ptr(new $Uint64(4221271257,2762425404),720,false),new AI.ptr(new $Uint64(3145092172,2812560400),747,false),new AI.ptr(new $Uint64(2343276271,3057687578),774,false),new AI.ptr(new $Uint64(3491753744,2790753324),800,false),new AI.ptr(new $Uint64(2601559269,3918606633),827,false),new AI.ptr(new $Uint64(3876625403,2711358621),853,false),new AI.ptr(new $Uint64(2888311001,1648096297),880,false),new AI.ptr(new $Uint64(2151959390,2057817989),907,false),new AI.ptr(new $Uint64(3206669376,61660461),933,false),new AI.ptr(new $Uint64(2389154863,1581580175),960,false),new AI.ptr(new $Uint64(3560118173,2626467905),986,false),new AI.ptr(new $Uint64(2652494738,3034782633),1013,false),new AI.ptr(new $Uint64(3952525166,3135207385),1039,false),new AI.ptr(new $Uint64(2944860731,2616258155),1066,false)]);AL=$toNativeArray($kindUint64,[new $Uint64(0,1),new $Uint64(0,10),new $Uint64(0,100),new $Uint64(0,1000),new $Uint64(0,10000),new $Uint64(0,100000),new $Uint64(0,1000000),new $Uint64(0,10000000),new $Uint64(0,100000000),new $Uint64(0,1000000000),new $Uint64(2,1410065408),new $Uint64(23,1215752192),new $Uint64(232,3567587328),new $Uint64(2328,1316134912),new $Uint64(23283,276447232),new $Uint64(232830,2764472320),new $Uint64(2328306,1874919424),new $Uint64(23283064,1569325056),new $Uint64(232830643,2808348672),new $Uint64(2328306436,2313682944)]);AQ=new AP.ptr(23,8,-127);AR=new AP.ptr(52,11,-1023);BD=new CJ([32,126,161,887,890,895,900,1366,1369,1418,1421,1479,1488,1514,1520,1524,1542,1563,1566,1805,1808,1866,1869,1969,1984,2042,2048,2093,2096,2139,2142,2142,2208,2226,2276,2444,2447,2448,2451,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2531,2534,2555,2561,2570,2575,2576,2579,2617,2620,2626,2631,2632,2635,2637,2641,2641,2649,2654,2662,2677,2689,2745,2748,2765,2768,2768,2784,2787,2790,2801,2817,2828,2831,2832,2835,2873,2876,2884,2887,2888,2891,2893,2902,2903,2908,2915,2918,2935,2946,2954,2958,2965,2969,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3021,3024,3024,3031,3031,3046,3066,3072,3129,3133,3149,3157,3161,3168,3171,3174,3183,3192,3257,3260,3277,3285,3286,3294,3299,3302,3314,3329,3386,3389,3406,3415,3415,3424,3427,3430,3445,3449,3455,3458,3478,3482,3517,3520,3526,3530,3530,3535,3551,3558,3567,3570,3572,3585,3642,3647,3675,3713,3716,3719,3722,3725,3725,3732,3751,3754,3773,3776,3789,3792,3801,3804,3807,3840,3948,3953,4058,4096,4295,4301,4301,4304,4685,4688,4701,4704,4749,4752,4789,4792,4805,4808,4885,4888,4954,4957,4988,4992,5017,5024,5108,5120,5788,5792,5880,5888,5908,5920,5942,5952,5971,5984,6003,6016,6109,6112,6121,6128,6137,6144,6157,6160,6169,6176,6263,6272,6314,6320,6389,6400,6443,6448,6459,6464,6464,6468,6509,6512,6516,6528,6571,6576,6601,6608,6618,6622,6683,6686,6780,6783,6793,6800,6809,6816,6829,6832,6846,6912,6987,6992,7036,7040,7155,7164,7223,7227,7241,7245,7295,7360,7367,7376,7417,7424,7669,7676,7957,7960,7965,7968,8005,8008,8013,8016,8061,8064,8147,8150,8175,8178,8190,8208,8231,8240,8286,8304,8305,8308,8348,8352,8381,8400,8432,8448,8585,8592,9210,9216,9254,9280,9290,9312,11123,11126,11157,11160,11193,11197,11217,11264,11507,11513,11559,11565,11565,11568,11623,11631,11632,11647,11670,11680,11842,11904,12019,12032,12245,12272,12283,12289,12438,12441,12543,12549,12589,12593,12730,12736,12771,12784,19893,19904,40908,40960,42124,42128,42182,42192,42539,42560,42743,42752,42925,42928,42929,42999,43051,43056,43065,43072,43127,43136,43204,43214,43225,43232,43259,43264,43347,43359,43388,43392,43481,43486,43574,43584,43597,43600,43609,43612,43714,43739,43766,43777,43782,43785,43790,43793,43798,43808,43871,43876,43877,43968,44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64449,64467,64831,64848,64911,64914,64967,65008,65021,65024,65049,65056,65069,65072,65131,65136,65276,65281,65470,65474,65479,65482,65487,65490,65495,65498,65500,65504,65518,65532,65533]);BE=new CJ([173,907,909,930,1328,1376,1416,1424,1757,2111,2436,2473,2481,2526,2564,2601,2609,2612,2615,2621,2653,2692,2702,2706,2729,2737,2740,2758,2762,2820,2857,2865,2868,2910,2948,2961,2971,2973,3017,3076,3085,3089,3113,3141,3145,3159,3200,3204,3213,3217,3241,3252,3269,3273,3295,3312,3332,3341,3345,3397,3401,3460,3506,3516,3541,3543,3715,3721,3736,3744,3748,3750,3756,3770,3781,3783,3912,3992,4029,4045,4294,4681,4695,4697,4745,4785,4799,4801,4823,4881,5760,5901,5997,6001,6431,6751,7415,8024,8026,8028,8030,8117,8133,8156,8181,8335,11209,11311,11359,11558,11687,11695,11703,11711,11719,11727,11735,11743,11930,12352,12687,12831,13055,42654,42895,43470,43519,43815,43823,64311,64317,64319,64322,64325,65107,65127,65141,65511]);BF=new CK([65536,65613,65616,65629,65664,65786,65792,65794,65799,65843,65847,65932,65936,65947,65952,65952,66000,66045,66176,66204,66208,66256,66272,66299,66304,66339,66352,66378,66384,66426,66432,66499,66504,66517,66560,66717,66720,66729,66816,66855,66864,66915,66927,66927,67072,67382,67392,67413,67424,67431,67584,67589,67592,67640,67644,67644,67647,67742,67751,67759,67840,67867,67871,67897,67903,67903,67968,68023,68030,68031,68096,68102,68108,68147,68152,68154,68159,68167,68176,68184,68192,68255,68288,68326,68331,68342,68352,68405,68409,68437,68440,68466,68472,68497,68505,68508,68521,68527,68608,68680,69216,69246,69632,69709,69714,69743,69759,69825,69840,69864,69872,69881,69888,69955,69968,70006,70016,70088,70093,70093,70096,70106,70113,70132,70144,70205,70320,70378,70384,70393,70401,70412,70415,70416,70419,70457,70460,70468,70471,70472,70475,70477,70487,70487,70493,70499,70502,70508,70512,70516,70784,70855,70864,70873,71040,71093,71096,71113,71168,71236,71248,71257,71296,71351,71360,71369,71840,71922,71935,71935,72384,72440,73728,74648,74752,74868,77824,78894,92160,92728,92736,92777,92782,92783,92880,92909,92912,92917,92928,92997,93008,93047,93053,93071,93952,94020,94032,94078,94095,94111,110592,110593,113664,113770,113776,113788,113792,113800,113808,113817,113820,113823,118784,119029,119040,119078,119081,119154,119163,119261,119296,119365,119552,119638,119648,119665,119808,119967,119970,119970,119973,119974,119977,120074,120077,120134,120138,120485,120488,120779,120782,120831,124928,125124,125127,125142,126464,126500,126503,126523,126530,126530,126535,126548,126551,126564,126567,126619,126625,126651,126704,126705,126976,127019,127024,127123,127136,127150,127153,127221,127232,127244,127248,127339,127344,127386,127462,127490,127504,127546,127552,127560,127568,127569,127744,127788,127792,127869,127872,127950,127956,127991,128000,128330,128336,128578,128581,128719,128736,128748,128752,128755,128768,128883,128896,128980,129024,129035,129040,129095,129104,129113,129120,129159,129168,129197,131072,173782,173824,177972,177984,178205,194560,195101,917760,917999]);BG=new CJ([12,39,59,62,926,2057,2102,2134,2564,2580,2584,4285,4405,4626,4868,4905,4913,4916,9327,27231,27482,27490,54357,54429,54445,54458,54460,54468,54534,54549,54557,54586,54591,54597,54609,60932,60960,60963,60968,60979,60984,60986,61000,61002,61004,61008,61011,61016,61018,61020,61022,61024,61027,61035,61043,61048,61053,61055,61066,61092,61098,61632,61648,61743,62719,62842,62884]);BM=$toNativeArray($kindUint,[0,0,1,0,2,0,0,0,3,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0]);}return;}};$init_strconv.$blocking=true;return $init_strconv;};return $pkg;})(); +$packages["reflect"]=(function(){var $pkg={},B,E,A,C,D,AH,BF,BG,BH,BI,BJ,BK,BL,BM,BN,BO,BP,BQ,BR,BS,BT,BU,BV,BW,BY,BZ,CA,CZ,DA,DD,DF,FL,FU,FV,FW,FX,FY,FZ,GA,GB,GC,GD,GE,GF,GG,GH,GI,GJ,GK,GM,GN,GO,GP,GQ,GR,GW,GY,GZ,HC,HD,HE,HG,HH,F,K,AT,AU,BX,DM,G,H,I,J,L,M,N,O,P,Q,R,V,W,X,Y,AA,AE,AF,AG,AI,AJ,AK,AL,AM,AO,AP,AQ,AR,AS,AV,AW,CC,CE,CF,CG,CR,CW,DN,EF,EH,EI,EJ,EK,EL,EM,EN,EO,EP,EQ,ER,ES,ET,EU,EV,EW,EX,EY,EZ,FA,FB,FC;B=$packages["github.com/gopherjs/gopherjs/js"];E=$packages["math"];A=$packages["runtime"];C=$packages["strconv"];D=$packages["sync"];AH=$pkg.mapIter=$newType(0,$kindStruct,"reflect.mapIter","mapIter","reflect",function(t_,m_,keys_,i_){this.$val=this;this.t=t_!==undefined?t_:$ifaceNil;this.m=m_!==undefined?m_:null;this.keys=keys_!==undefined?keys_:null;this.i=i_!==undefined?i_:0;});BF=$pkg.Type=$newType(8,$kindInterface,"reflect.Type","Type","reflect",null);BG=$pkg.Kind=$newType(4,$kindUint,"reflect.Kind","Kind","reflect",null);BH=$pkg.rtype=$newType(0,$kindStruct,"reflect.rtype","rtype","reflect",function(size_,hash_,_$2_,align_,fieldAlign_,kind_,alg_,gc_,string_,uncommonType_,ptrToThis_,zero_){this.$val=this;this.size=size_!==undefined?size_:0;this.hash=hash_!==undefined?hash_:0;this._$2=_$2_!==undefined?_$2_:0;this.align=align_!==undefined?align_:0;this.fieldAlign=fieldAlign_!==undefined?fieldAlign_:0;this.kind=kind_!==undefined?kind_:0;this.alg=alg_!==undefined?alg_:FV.nil;this.gc=gc_!==undefined?gc_:FW.zero();this.string=string_!==undefined?string_:FX.nil;this.uncommonType=uncommonType_!==undefined?uncommonType_:FY.nil;this.ptrToThis=ptrToThis_!==undefined?ptrToThis_:FL.nil;this.zero=zero_!==undefined?zero_:0;});BI=$pkg.typeAlg=$newType(0,$kindStruct,"reflect.typeAlg","typeAlg","reflect",function(hash_,equal_){this.$val=this;this.hash=hash_!==undefined?hash_:$throwNilPointerError;this.equal=equal_!==undefined?equal_:$throwNilPointerError;});BJ=$pkg.method=$newType(0,$kindStruct,"reflect.method","method","reflect",function(name_,pkgPath_,mtyp_,typ_,ifn_,tfn_){this.$val=this;this.name=name_!==undefined?name_:FX.nil;this.pkgPath=pkgPath_!==undefined?pkgPath_:FX.nil;this.mtyp=mtyp_!==undefined?mtyp_:FL.nil;this.typ=typ_!==undefined?typ_:FL.nil;this.ifn=ifn_!==undefined?ifn_:0;this.tfn=tfn_!==undefined?tfn_:0;});BK=$pkg.uncommonType=$newType(0,$kindStruct,"reflect.uncommonType","uncommonType","reflect",function(name_,pkgPath_,methods_){this.$val=this;this.name=name_!==undefined?name_:FX.nil;this.pkgPath=pkgPath_!==undefined?pkgPath_:FX.nil;this.methods=methods_!==undefined?methods_:FZ.nil;});BL=$pkg.ChanDir=$newType(4,$kindInt,"reflect.ChanDir","ChanDir","reflect",null);BM=$pkg.arrayType=$newType(0,$kindStruct,"reflect.arrayType","arrayType","reflect",function(rtype_,elem_,slice_,len_){this.$val=this;this.rtype=rtype_!==undefined?rtype_:new BH.ptr();this.elem=elem_!==undefined?elem_:FL.nil;this.slice=slice_!==undefined?slice_:FL.nil;this.len=len_!==undefined?len_:0;});BN=$pkg.chanType=$newType(0,$kindStruct,"reflect.chanType","chanType","reflect",function(rtype_,elem_,dir_){this.$val=this;this.rtype=rtype_!==undefined?rtype_:new BH.ptr();this.elem=elem_!==undefined?elem_:FL.nil;this.dir=dir_!==undefined?dir_:0;});BO=$pkg.funcType=$newType(0,$kindStruct,"reflect.funcType","funcType","reflect",function(rtype_,dotdotdot_,in$2_,out_){this.$val=this;this.rtype=rtype_!==undefined?rtype_:new BH.ptr();this.dotdotdot=dotdotdot_!==undefined?dotdotdot_:false;this.in$2=in$2_!==undefined?in$2_:GA.nil;this.out=out_!==undefined?out_:GA.nil;});BP=$pkg.imethod=$newType(0,$kindStruct,"reflect.imethod","imethod","reflect",function(name_,pkgPath_,typ_){this.$val=this;this.name=name_!==undefined?name_:FX.nil;this.pkgPath=pkgPath_!==undefined?pkgPath_:FX.nil;this.typ=typ_!==undefined?typ_:FL.nil;});BQ=$pkg.interfaceType=$newType(0,$kindStruct,"reflect.interfaceType","interfaceType","reflect",function(rtype_,methods_){this.$val=this;this.rtype=rtype_!==undefined?rtype_:new BH.ptr();this.methods=methods_!==undefined?methods_:GB.nil;});BR=$pkg.mapType=$newType(0,$kindStruct,"reflect.mapType","mapType","reflect",function(rtype_,key_,elem_,bucket_,hmap_,keysize_,indirectkey_,valuesize_,indirectvalue_,bucketsize_){this.$val=this;this.rtype=rtype_!==undefined?rtype_:new BH.ptr();this.key=key_!==undefined?key_:FL.nil;this.elem=elem_!==undefined?elem_:FL.nil;this.bucket=bucket_!==undefined?bucket_:FL.nil;this.hmap=hmap_!==undefined?hmap_:FL.nil;this.keysize=keysize_!==undefined?keysize_:0;this.indirectkey=indirectkey_!==undefined?indirectkey_:0;this.valuesize=valuesize_!==undefined?valuesize_:0;this.indirectvalue=indirectvalue_!==undefined?indirectvalue_:0;this.bucketsize=bucketsize_!==undefined?bucketsize_:0;});BS=$pkg.ptrType=$newType(0,$kindStruct,"reflect.ptrType","ptrType","reflect",function(rtype_,elem_){this.$val=this;this.rtype=rtype_!==undefined?rtype_:new BH.ptr();this.elem=elem_!==undefined?elem_:FL.nil;});BT=$pkg.sliceType=$newType(0,$kindStruct,"reflect.sliceType","sliceType","reflect",function(rtype_,elem_){this.$val=this;this.rtype=rtype_!==undefined?rtype_:new BH.ptr();this.elem=elem_!==undefined?elem_:FL.nil;});BU=$pkg.structField=$newType(0,$kindStruct,"reflect.structField","structField","reflect",function(name_,pkgPath_,typ_,tag_,offset_){this.$val=this;this.name=name_!==undefined?name_:FX.nil;this.pkgPath=pkgPath_!==undefined?pkgPath_:FX.nil;this.typ=typ_!==undefined?typ_:FL.nil;this.tag=tag_!==undefined?tag_:FX.nil;this.offset=offset_!==undefined?offset_:0;});BV=$pkg.structType=$newType(0,$kindStruct,"reflect.structType","structType","reflect",function(rtype_,fields_){this.$val=this;this.rtype=rtype_!==undefined?rtype_:new BH.ptr();this.fields=fields_!==undefined?fields_:GC.nil;});BW=$pkg.Method=$newType(0,$kindStruct,"reflect.Method","Method","reflect",function(Name_,PkgPath_,Type_,Func_,Index_){this.$val=this;this.Name=Name_!==undefined?Name_:"";this.PkgPath=PkgPath_!==undefined?PkgPath_:"";this.Type=Type_!==undefined?Type_:$ifaceNil;this.Func=Func_!==undefined?Func_:new CZ.ptr();this.Index=Index_!==undefined?Index_:0;});BY=$pkg.StructField=$newType(0,$kindStruct,"reflect.StructField","StructField","reflect",function(Name_,PkgPath_,Type_,Tag_,Offset_,Index_,Anonymous_){this.$val=this;this.Name=Name_!==undefined?Name_:"";this.PkgPath=PkgPath_!==undefined?PkgPath_:"";this.Type=Type_!==undefined?Type_:$ifaceNil;this.Tag=Tag_!==undefined?Tag_:"";this.Offset=Offset_!==undefined?Offset_:0;this.Index=Index_!==undefined?Index_:GP.nil;this.Anonymous=Anonymous_!==undefined?Anonymous_:false;});BZ=$pkg.StructTag=$newType(8,$kindString,"reflect.StructTag","StructTag","reflect",null);CA=$pkg.fieldScan=$newType(0,$kindStruct,"reflect.fieldScan","fieldScan","reflect",function(typ_,index_){this.$val=this;this.typ=typ_!==undefined?typ_:GR.nil;this.index=index_!==undefined?index_:GP.nil;});CZ=$pkg.Value=$newType(0,$kindStruct,"reflect.Value","Value","reflect",function(typ_,ptr_,flag_){this.$val=this;this.typ=typ_!==undefined?typ_:FL.nil;this.ptr=ptr_!==undefined?ptr_:0;this.flag=flag_!==undefined?flag_:0;});DA=$pkg.flag=$newType(4,$kindUintptr,"reflect.flag","flag","reflect",null);DD=$pkg.ValueError=$newType(0,$kindStruct,"reflect.ValueError","ValueError","reflect",function(Method_,Kind_){this.$val=this;this.Method=Method_!==undefined?Method_:"";this.Kind=Kind_!==undefined?Kind_:0;});DF=$pkg.nonEmptyInterface=$newType(0,$kindStruct,"reflect.nonEmptyInterface","nonEmptyInterface","reflect",function(itab_,word_){this.$val=this;this.itab=itab_!==undefined?itab_:GI.nil;this.word=word_!==undefined?word_:0;});FL=$ptrType(BH);FU=$sliceType($String);FV=$ptrType(BI);FW=$arrayType($UnsafePointer,2);FX=$ptrType($String);FY=$ptrType(BK);FZ=$sliceType(BJ);GA=$sliceType(FL);GB=$sliceType(BP);GC=$sliceType(BU);GD=$structType([{prop:"str",name:"str",pkg:"reflect",typ:$String,tag:""}]);GE=$sliceType(CZ);GF=$ptrType(DF);GG=$arrayType($UnsafePointer,100000);GH=$structType([{prop:"ityp",name:"ityp",pkg:"reflect",typ:FL,tag:""},{prop:"typ",name:"typ",pkg:"reflect",typ:FL,tag:""},{prop:"link",name:"link",pkg:"reflect",typ:$UnsafePointer,tag:""},{prop:"bad",name:"bad",pkg:"reflect",typ:$Int32,tag:""},{prop:"unused",name:"unused",pkg:"reflect",typ:$Int32,tag:""},{prop:"fun",name:"fun",pkg:"reflect",typ:GG,tag:""}]);GI=$ptrType(GH);GJ=$sliceType(B.Object);GK=$ptrType($Uint8);GM=$ptrType(BJ);GN=$ptrType(BQ);GO=$ptrType(BP);GP=$sliceType($Int);GQ=$sliceType(CA);GR=$ptrType(BV);GW=$ptrType($UnsafePointer);GY=$sliceType($Uint8);GZ=$sliceType($Int32);HC=$funcType([$String],[$Bool],false);HD=$funcType([$UnsafePointer,$Uintptr,$Uintptr],[$Uintptr],false);HE=$funcType([$UnsafePointer,$UnsafePointer,$Uintptr],[$Bool],false);HG=$arrayType($Uintptr,2);HH=$ptrType(DD);G=function(){var ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq;ad=(function(ad){var ad;});ad((ae=new BH.ptr(0,0,0,0,0,0,FV.nil,FW.zero(),FX.nil,FY.nil,FL.nil,0),new ae.constructor.elem(ae)));ad((af=new BK.ptr(FX.nil,FX.nil,FZ.nil),new af.constructor.elem(af)));ad((ag=new BJ.ptr(FX.nil,FX.nil,FL.nil,FL.nil,0,0),new ag.constructor.elem(ag)));ad((ah=new BM.ptr(new BH.ptr(),FL.nil,FL.nil,0),new ah.constructor.elem(ah)));ad((ai=new BN.ptr(new BH.ptr(),FL.nil,0),new ai.constructor.elem(ai)));ad((aj=new BO.ptr(new BH.ptr(),false,GA.nil,GA.nil),new aj.constructor.elem(aj)));ad((ak=new BQ.ptr(new BH.ptr(),GB.nil),new ak.constructor.elem(ak)));ad((al=new BR.ptr(new BH.ptr(),FL.nil,FL.nil,FL.nil,FL.nil,0,0,0,0,0),new al.constructor.elem(al)));ad((am=new BS.ptr(new BH.ptr(),FL.nil),new am.constructor.elem(am)));ad((an=new BT.ptr(new BH.ptr(),FL.nil),new an.constructor.elem(an)));ad((ao=new BV.ptr(new BH.ptr(),GC.nil),new ao.constructor.elem(ao)));ad((ap=new BP.ptr(FX.nil,FX.nil,FL.nil),new ap.constructor.elem(ap)));ad((aq=new BU.ptr(FX.nil,FX.nil,FL.nil,FX.nil,0),new aq.constructor.elem(aq)));F=true;DM=$assertType(Q(new $Uint8(0)),FL);};H=function(ad){var ad;return ad.jsType;};I=function(ad){var ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj;if(ad.reflectType===undefined){ae=new BH.ptr((($parseInt(ad.size)>>0)>>>0),0,0,0,0,(($parseInt(ad.kind)>>0)<<24>>>24),FV.nil,FW.zero(),L(ad.string),FY.nil,FL.nil,0);ae.jsType=ad;ad.reflectType=ae;af=$methodSet(ad);if(!($internalize(ad.typeName,$String)==="")||!(($parseInt(af.length)===0))){ag=$makeSlice(FZ,$parseInt(af.length));ah=ag;ai=0;while(true){if(!(ai=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+aj]),new BJ.ptr(L(ak.name),L(ak.pkg),I(al),I($funcType(new($global.Array)(ad).concat(al.params),al.results,al.variadic)),0,0),BJ);ai++;}ae.uncommonType=new BK.ptr(L(ad.typeName),L(ad.pkg),ag);ae.uncommonType.jsType=ad;}am=ae.Kind();if(am===17){J(ae,new BM.ptr(new BH.ptr(),I(ad.elem),FL.nil,(($parseInt(ad.len)>>0)>>>0)));}else if(am===18){an=3;if(!!(ad.sendOnly)){an=2;}if(!!(ad.recvOnly)){an=1;}J(ae,new BN.ptr(new BH.ptr(),I(ad.elem),(an>>>0)));}else if(am===19){ao=ad.params;ap=$makeSlice(GA,$parseInt(ao.length));aq=ap;ar=0;while(true){if(!(ar=ap.$length)?$throwRuntimeError("index out of range"):ap.$array[ap.$offset+as]=I(ao[as]);ar++;}at=ad.results;au=$makeSlice(GA,$parseInt(at.length));av=au;aw=0;while(true){if(!(aw=au.$length)?$throwRuntimeError("index out of range"):au.$array[au.$offset+ax]=I(at[ax]);aw++;}J(ae,new BO.ptr($clone(ae,BH),!!(ad.variadic),ap,au));}else if(am===20){ay=ad.methods;az=$makeSlice(GB,$parseInt(ay.length));ba=az;bb=0;while(true){if(!(bb=az.$length)?$throwRuntimeError("index out of range"):az.$array[az.$offset+bc]),new BP.ptr(L(bd.name),L(bd.pkg),I(bd.typ)),BP);bb++;}J(ae,new BQ.ptr($clone(ae,BH),az));}else if(am===21){J(ae,new BR.ptr(new BH.ptr(),I(ad.key),I(ad.elem),FL.nil,FL.nil,0,0,0,0,0));}else if(am===22){J(ae,new BS.ptr(new BH.ptr(),I(ad.elem)));}else if(am===23){J(ae,new BT.ptr(new BH.ptr(),I(ad.elem)));}else if(am===25){be=ad.fields;bf=$makeSlice(GC,$parseInt(be.length));bg=bf;bh=0;while(true){if(!(bh=bf.$length)?$throwRuntimeError("index out of range"):bf.$array[bf.$offset+bi]),new BU.ptr(L(bj.name),L(bj.pkg),I(bj.typ),L(bj.tag),(bi>>>0)),BU);bh++;}J(ae,new BV.ptr($clone(ae,BH),bf));}}return ad.reflectType;};J=function(ad,ae){var ad,ae;ad.kindType=ae;ae.rtype=ad;};L=function(ad){var ad,ae,af,ag,ah,ai,aj,ak;ae=$clone(new GD.ptr(),GD);ae.str=ad;af=ae.str;if(af===""){return FX.nil;}ag=(ah=K[af],ah!==undefined?[ah.v,true]:[FX.nil,false]);ai=ag[0];aj=ag[1];if(!aj){ai=new FX(function(){return af;},function($v){af=$v;});ak=af;(K||$throwRuntimeError("assignment to entry in nil map"))[ak]={k:ak,v:ai};}return ai;};M=function(ad){var ad,ae;ae=ad.Kind();if(ae===1||ae===2||ae===3||ae===4||ae===5||ae===7||ae===8||ae===9||ae===10||ae===12||ae===13||ae===14||ae===17||ae===21||ae===19||ae===24||ae===25){return true;}else if(ae===22){return ad.Elem().Kind()===17;}return false;};N=function(ad,ae,af){var ad,ae,af,ag,ah,ai;ag=H(af).fields;ah=0;while(true){if(!(ah<$parseInt(ag.length))){break;}ai=$internalize(ag[ah].prop,$String);ad[$externalize(ai,$String)]=ae[$externalize(ai,$String)];ah=ah+(1)>>0;}};O=function(ad,ae,af){var ad,ae,af,ag;ag=ad.common();if((ad.Kind()===17)||(ad.Kind()===25)||(ad.Kind()===22)){return new CZ.ptr(ag,ae,(af|(ad.Kind()>>>0))>>>0);}return new CZ.ptr(ag,$newDataPointer(ae,H(ag.ptrTo())),(((af|(ad.Kind()>>>0))>>>0)|64)>>>0);};P=$pkg.MakeSlice=function(ad,ae,af){var ad,ae,af;if(!((ad.Kind()===23))){$panic(new $String("reflect.MakeSlice of non-slice type"));}if(ae<0){$panic(new $String("reflect.MakeSlice: negative len"));}if(af<0){$panic(new $String("reflect.MakeSlice: negative cap"));}if(ae>af){$panic(new $String("reflect.MakeSlice: len > cap"));}return O(ad,$makeSlice(H(ad),ae,af,(function(){return H(ad.Elem()).zero();})),0);};Q=$pkg.TypeOf=function(ad){var ad;if(!F){return new BH.ptr(0,0,0,0,0,0,FV.nil,FW.zero(),FX.nil,FY.nil,FL.nil,0);}if($interfaceIsEqual(ad,$ifaceNil)){return $ifaceNil;}return I(ad.constructor);};R=$pkg.ValueOf=function(ad){var ad;if($interfaceIsEqual(ad,$ifaceNil)){return new CZ.ptr(FL.nil,0,0);}return O(I(ad.constructor),ad.$val,0);};BH.ptr.prototype.ptrTo=function(){var ad;ad=this;return I($ptrType(H(ad)));};BH.prototype.ptrTo=function(){return this.$val.ptrTo();};V=$pkg.SliceOf=function(ad){var ad;return I($sliceType(H(ad)));};W=$pkg.Zero=function(ad){var ad;return O(ad,H(ad).zero(),0);};X=function(ad){var ad,ae;ae=ad.Kind();if(ae===25){return new(H(ad).ptr)();}else if(ae===17){return H(ad).zero();}else{return $newDataPointer(H(ad).zero(),H(ad.ptrTo()));}};Y=function(ad,ae,af){var ad,ae,af,ag,ah,ai;ag=af.common();ah=X(ag);ai=ag.Kind();if(ai===3){ah.$set((ae.$low<<24>>24));}else if(ai===4){ah.$set((ae.$low<<16>>16));}else if(ai===2||ai===5){ah.$set((ae.$low>>0));}else if(ai===6){ah.$set(new $Int64(ae.$high,ae.$low));}else if(ai===8){ah.$set((ae.$low<<24>>>24));}else if(ai===9){ah.$set((ae.$low<<16>>>16));}else if(ai===7||ai===10||ai===12){ah.$set((ae.$low>>>0));}else if(ai===11){ah.$set(ae);}return new CZ.ptr(ag,ah,(((ad|64)>>>0)|(ag.Kind()>>>0))>>>0);};AA=function(ad,ae,af){var ad,ae,af;ad.$set(ae.$get());};AE=function(ad,ae,af){var ad,ae,af,ag,ah;ag=af.$get();if(!(ag.$key===undefined)){ag=ag.$key();}ah=ae[$externalize($internalize(ag,$String),$String)];if(ah===undefined){return 0;}return $newDataPointer(ah.v,H(CC(ad.Elem())));};AF=function(ad,ae,af,ag){var ad,ae,af,ag,ah,ai,aj,ak,al,am;ah=af.$get();ai=ah;if(!(ai.$key===undefined)){ai=ai.$key();}aj=ag.$get();ak=ad.Elem();if(ak.Kind()===25){al=H(ak).zero();N(al,aj,ak);aj=al;}am=new($global.Object)();am.k=ah;am.v=aj;ae[$externalize($internalize(ai,$String),$String)]=am;};AG=function(ad,ae,af){var ad,ae,af,ag;ag=af.$get();if(!(ag.$key===undefined)){ag=ag.$key();}delete ae[$externalize($internalize(ag,$String),$String)];};AI=function(ad,ae){var ad,ae;return new AH.ptr(ad,ae,$keys(ae),0);};AJ=function(ad){var ad,ae,af;ae=ad;af=ae.keys[ae.i];return $newDataPointer(ae.m[$externalize($internalize(af,$String),$String)].k,H(CC(ae.t.Key())));};AK=function(ad){var ad,ae;ae=ad;ae.i=ae.i+(1)>>0;};AL=function(ad){var ad;return $parseInt($keys(ad).length);};AM=function(ad,ae){var ad,ae,af,ag,ah,ai,aj;ad=ad;af=ad.object();if(af===H(ad.typ).nil){return O(ae,H(ae).nil,ad.flag);}ag=null;ah=ae.Kind();ai=ah;switch(0){default:if(ai===18){ag=new(H(ae))();}else if(ai===23){aj=new(H(ae))(af.$array);aj.$offset=af.$offset;aj.$length=af.$length;aj.$capacity=af.$capacity;ag=$newDataPointer(aj,H(CC(ae)));}else if(ai===22){if(ae.Elem().Kind()===25){if($interfaceIsEqual(ae.Elem(),ad.typ.Elem())){ag=af;break;}ag=new(H(ae))();N(ag,af,ae.Elem());break;}ag=new(H(ae))(af.$get,af.$set);}else if(ai===25){ag=new(H(ae).ptr)();N(ag,af,ae);}else if(ai===17||ai===19||ai===20||ai===21||ai===24){ag=ad.ptr;}else{$panic(new DD.ptr("reflect.Convert",ah));}}return new CZ.ptr(ae.common(),ag,(((ad.flag&96)>>>0)|(ae.Kind()>>>0))>>>0);};AO=function(ad,ae,af){var ad,ae,af,ag=FL.nil,ah=FL.nil,ai=0,aj,ak,al,am,an,ao,ap,aq,ar;ae=ae;aj="";if(ae.typ.Kind()===20){ak=ae.typ.kindType;if(af<0||af>=ak.methods.$length){$panic(new $String("reflect: internal error: invalid method index"));}am=(al=ak.methods,((af<0||af>=al.$length)?$throwRuntimeError("index out of range"):al.$array[al.$offset+af]));if(!($pointerIsEqual(am.pkgPath,FX.nil))){$panic(new $String("reflect: "+ad+" of unexported method"));}an=$pointerOfStructConversion(ae.ptr,GF);if(an.itab===GI.nil){$panic(new $String("reflect: "+ad+" of method on nil interface value"));}ah=am.typ;aj=am.name.$get();}else{ao=ae.typ.uncommonType.uncommon();if(ao===FY.nil||af<0||af>=ao.methods.$length){$panic(new $String("reflect: internal error: invalid method index"));}aq=(ap=ao.methods,((af<0||af>=ap.$length)?$throwRuntimeError("index out of range"):ap.$array[ap.$offset+af]));if(!($pointerIsEqual(aq.pkgPath,FX.nil))){$panic(new $String("reflect: "+ad+" of unexported method"));}ah=aq.mtyp;aj=$internalize($methodSet(H(ae.typ))[af].prop,$String);}ar=ae.object();if(M(ae.typ)){ar=new(H(ae.typ))(ar);}ai=ar[$externalize(aj,$String)];return[ag,ah,ai];};AP=function(ad,ae){var ad,ae;ad=ad;if(ad.flag===0){$panic(new DD.ptr("reflect.Value.Interface",0));}if(ae&&!((((ad.flag&32)>>>0)===0))){$panic(new $String("reflect.Value.Interface: cannot return value obtained from unexported field or method"));}if(!((((ad.flag&256)>>>0)===0))){ad=AS("Interface",ad);}if(M(ad.typ)){return new(H(ad.typ))(ad.object());}return ad.object();};AQ=function(ad,ae,af){var ad,ae,af;af.$set(ae);};AR=function(){return"?FIXME?";};AS=function(ad,ae){var ad,ae,af,ag,ah,ai;ae=ae;if(((ae.flag&256)>>>0)===0){$panic(new $String("reflect: internal error: invalid use of makePartialFunc"));}af=AO(ad,ae,(ae.flag>>0)>>9>>0);ag=af[2];ah=ae.object();if(M(ae.typ)){ah=new(H(ae.typ))(ah);}ai=(function(){return ag.apply(ah,$externalize(new($sliceType(B.Object))($global.Array.prototype.slice.call(arguments,[])),GJ));});return new CZ.ptr(ae.Type().common(),ai,(((ae.flag&32)>>>0)|19)>>>0);};BH.ptr.prototype.pointers=function(){var ad,ae;ad=this;ae=ad.Kind();if(ae===22||ae===21||ae===18||ae===19||ae===25||ae===17){return true;}else{return false;}};BH.prototype.pointers=function(){return this.$val.pointers();};BH.ptr.prototype.Comparable=function(){var ad,ae,af;ad=this;ae=ad.Kind();if(ae===19||ae===23||ae===21){return false;}else if(ae===17){return ad.Elem().Comparable();}else if(ae===25){af=0;while(true){if(!(af>0;}}return true;};BH.prototype.Comparable=function(){return this.$val.Comparable();};BK.ptr.prototype.Method=function(ad){var ad,ae=new BW.ptr(),af,ag,ah,ai,aj,ak,al;af=this;if(af===FY.nil||ad<0||ad>=af.methods.$length){$panic(new $String("reflect: Method index out of range"));}ah=(ag=af.methods,((ad<0||ad>=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+ad]));if(!($pointerIsEqual(ah.name,FX.nil))){ae.Name=ah.name.$get();}ai=19;if(!($pointerIsEqual(ah.pkgPath,FX.nil))){ae.PkgPath=ah.pkgPath.$get();ai=(ai|(32))>>>0;}aj=ah.typ;ae.Type=aj;ak=$internalize($methodSet(af.jsType)[ad].prop,$String);al=(function(al){var al;return al[$externalize(ak,$String)].apply(al,$externalize($subslice(new($sliceType(B.Object))($global.Array.prototype.slice.call(arguments,[])),1),GJ));});ae.Func=new CZ.ptr(aj,al,ai);ae.Index=ad;return ae;};BK.prototype.Method=function(ad){return this.$val.Method(ad);};CZ.ptr.prototype.object=function(){var ad,ae,af,ag;ad=this;if((ad.typ.Kind()===17)||(ad.typ.Kind()===25)){return ad.ptr;}if(!((((ad.flag&64)>>>0)===0))){ae=ad.ptr.$get();if(!(ae===$ifaceNil)&&!(ae.constructor===H(ad.typ))){af=ad.typ.Kind();switch(0){default:if(af===11||af===6){ae=new(H(ad.typ))(ae.$high,ae.$low);}else if(af===15||af===16){ae=new(H(ad.typ))(ae.$real,ae.$imag);}else if(af===23){if(ae===ae.constructor.nil){ae=H(ad.typ).nil;break;}ag=new(H(ad.typ))(ae.$array);ag.$offset=ae.$offset;ag.$length=ae.$length;ag.$capacity=ae.$capacity;ae=ag;}}}return ae;}return ad.ptr;};CZ.prototype.object=function(){return this.$val.object();};CZ.ptr.prototype.call=function(ad,ae){var ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo;af=this;ag=af.typ;ah=0;ai=null;if(!((((af.flag&256)>>>0)===0))){aj=AO(ad,af,(af.flag>>0)>>9>>0);ag=aj[1];ah=aj[2];ai=af.object();if(M(af.typ)){ai=new(H(af.typ))(ai);}}else{ah=af.object();}if(ah===0){$panic(new $String("reflect.Value.Call: call of nil function"));}ak=ad==="CallSlice";al=ag.NumIn();if(ak){if(!ag.IsVariadic()){$panic(new $String("reflect: CallSlice of non-variadic function"));}if(ae.$lengthal){$panic(new $String("reflect: CallSlice with too many input arguments"));}}else{if(ag.IsVariadic()){al=al-(1)>>0;}if(ae.$lengthal){$panic(new $String("reflect: Call with too many input arguments"));}}am=ae;an=0;while(true){if(!(an=am.$length)?$throwRuntimeError("index out of range"):am.$array[am.$offset+an]);if(ao.Kind()===0){$panic(new $String("reflect: "+ad+" using zero Value argument"));}an++;}ap=0;while(true){if(!(ap=ae.$length)?$throwRuntimeError("index out of range"):ae.$array[ae.$offset+ap]).Type();ar=ag.In(ap);as=aq;at=ar;if(!as.AssignableTo(at)){$panic(new $String("reflect: "+ad+" using "+as.String()+" as type "+at.String()));}ap=ap+(1)>>0;}if(!ak&&ag.IsVariadic()){au=ae.$length-al>>0;av=P(ag.In(al),au,au);aw=ag.In(al).Elem();ax=0;while(true){if(!(ax>0,((ay<0||ay>=ae.$length)?$throwRuntimeError("index out of range"):ae.$array[ae.$offset+ay]));ba=az.Type();if(!ba.AssignableTo(aw)){$panic(new $String("reflect: cannot use "+ba.String()+" as type "+aw.String()+" in "+ad));}av.Index(ax).Set(az);ax=ax+(1)>>0;}bb=ae;ae=$makeSlice(GE,(al+1>>0));$copySlice($subslice(ae,0,al),bb);(al<0||al>=ae.$length)?$throwRuntimeError("index out of range"):ae.$array[ae.$offset+al]=av;}bc=ae.$length;if(!((bc===ag.NumIn()))){$panic(new $String("reflect.Value.Call: wrong argument count"));}bd=ag.NumOut();be=new($global.Array)(ag.NumIn());bf=ae;bg=0;while(true){if(!(bg=bf.$length)?$throwRuntimeError("index out of range"):bf.$array[bf.$offset+bg]);be[bh]=AW(ag.In(bh),bi.assignTo("reflect.Value.Call",ag.In(bh).common(),0).object());bg++;}bj=ah.apply(ai,be);bk=bd;if(bk===0){return GE.nil;}else if(bk===1){return new GE([$clone(O(ag.Out(0),AV(ag.Out(0),bj),0),CZ)]);}else{bl=$makeSlice(GE,bd);bm=bl;bn=0;while(true){if(!(bn=bl.$length)?$throwRuntimeError("index out of range"):bl.$array[bl.$offset+bo]=O(ag.Out(bo),AV(ag.Out(bo),bj[bo]),0);bn++;}return bl;}};CZ.prototype.call=function(ad,ae){return this.$val.call(ad,ae);};CZ.ptr.prototype.Cap=function(){var ad,ae,af;ad=this;ae=new DA(ad.flag).kind();af=ae;if(af===17){return ad.typ.Len();}else if(af===18||af===23){return $parseInt(ad.object().$capacity)>>0;}$panic(new DD.ptr("reflect.Value.Cap",ae));};CZ.prototype.Cap=function(){return this.$val.Cap();};AV=function(ad,ae){var ad,ae;if($interfaceIsEqual(ad,I(AT))){return new(AU)(ae);}return ae;};AW=function(ad,ae){var ad,ae;if($interfaceIsEqual(ad,I(AT))){return ae.Object;}return ae;};CZ.ptr.prototype.Elem=function(){var ad,ae,af,ag,ah,ai,aj,ak;ad=this;ae=new DA(ad.flag).kind();af=ae;if(af===20){ag=ad.object();if(ag===$ifaceNil){return new CZ.ptr(FL.nil,0,0);}ah=I(ag.constructor);return O(ah,ag.$val,(ad.flag&32)>>>0);}else if(af===22){if(ad.IsNil()){return new CZ.ptr(FL.nil,0,0);}ai=ad.object();aj=ad.typ.kindType;ak=(((((ad.flag&32)>>>0)|64)>>>0)|128)>>>0;ak=(ak|((aj.elem.Kind()>>>0)))>>>0;return new CZ.ptr(aj.elem,AV(aj.elem,ai),ak);}else{$panic(new DD.ptr("reflect.Value.Elem",ae));}};CZ.prototype.Elem=function(){return this.$val.Elem();};CZ.ptr.prototype.Field=function(ad){var ad,ae,af,ag,ah,ai,aj,ak,al;ae=this;new DA(ae.flag).mustBe(25);af=ae.typ.kindType;if(ad<0||ad>=af.fields.$length){$panic(new $String("reflect: Field index out of range"));}ah=(ag=af.fields,((ad<0||ad>=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+ad]));ai=$internalize(H(ae.typ).fields[ad].prop,$String);aj=ah.typ;ak=(ae.flag&224)>>>0;if(!($pointerIsEqual(ah.pkgPath,FX.nil))){ak=(ak|(32))>>>0;}ak=(ak|((aj.Kind()>>>0)))>>>0;al=ae.ptr;if(!((((ak&64)>>>0)===0))&&!((aj.Kind()===17))&&!((aj.Kind()===25))){return new CZ.ptr(aj,new(H(CC(aj)))((function(){return AV(aj,al[$externalize(ai,$String)]);}),(function(am){var am;al[$externalize(ai,$String)]=AW(aj,am);})),ak);}return O(aj,AV(aj,al[$externalize(ai,$String)]),ak);};CZ.prototype.Field=function(ad){return this.$val.Field(ad);};CZ.ptr.prototype.Index=function(ad){var ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as;ae=this;af=new DA(ae.flag).kind();ag=af;if(ag===17){ah=ae.typ.kindType;if(ad<0||ad>(ah.len>>0)){$panic(new $String("reflect: array index out of range"));}ai=ah.elem;aj=(ae.flag&224)>>>0;aj=(aj|((ai.Kind()>>>0)))>>>0;ak=ae.ptr;if(!((((aj&64)>>>0)===0))&&!((ai.Kind()===17))&&!((ai.Kind()===25))){return new CZ.ptr(ai,new(H(CC(ai)))((function(){return AV(ai,ak[ad]);}),(function(al){var al;ak[ad]=AW(ai,al);})),aj);}return O(ai,AV(ai,ak[ad]),aj);}else if(ag===23){al=ae.object();if(ad<0||ad>=($parseInt(al.$length)>>0)){$panic(new $String("reflect: slice index out of range"));}am=ae.typ.kindType;an=am.elem;ao=(192|((ae.flag&32)>>>0))>>>0;ao=(ao|((an.Kind()>>>0)))>>>0;ad=ad+(($parseInt(al.$offset)>>0))>>0;ap=al.$array;if(!((((ao&64)>>>0)===0))&&!((an.Kind()===17))&&!((an.Kind()===25))){return new CZ.ptr(an,new(H(CC(an)))((function(){return AV(an,ap[ad]);}),(function(aq){var aq;ap[ad]=AW(an,aq);})),ao);}return O(an,AV(an,ap[ad]),ao);}else if(ag===24){aq=ae.ptr.$get();if(ad<0||ad>=aq.length){$panic(new $String("reflect: string index out of range"));}ar=(((ae.flag&32)>>>0)|8)>>>0;as=aq.charCodeAt(ad);return new CZ.ptr(DM,new GK(function(){return as;},function($v){as=$v;}),(ar|64)>>>0);}else{$panic(new DD.ptr("reflect.Value.Index",af));}};CZ.prototype.Index=function(ad){return this.$val.Index(ad);};CZ.ptr.prototype.IsNil=function(){var ad,ae,af;ad=this;ae=new DA(ad.flag).kind();af=ae;if(af===18||af===22||af===23){return ad.object()===H(ad.typ).nil;}else if(af===19){return ad.object()===$throwNilPointerError;}else if(af===21){return ad.object()===false;}else if(af===20){return ad.object()===$ifaceNil;}else{$panic(new DD.ptr("reflect.Value.IsNil",ae));}};CZ.prototype.IsNil=function(){return this.$val.IsNil();};CZ.ptr.prototype.Len=function(){var ad,ae,af;ad=this;ae=new DA(ad.flag).kind();af=ae;if(af===17||af===24){return $parseInt(ad.object().length);}else if(af===23){return $parseInt(ad.object().$length)>>0;}else if(af===18){return $parseInt(ad.object().$buffer.length)>>0;}else if(af===21){return $parseInt($keys(ad.object()).length);}else{$panic(new DD.ptr("reflect.Value.Len",ae));}};CZ.prototype.Len=function(){return this.$val.Len();};CZ.ptr.prototype.Pointer=function(){var ad,ae,af;ad=this;ae=new DA(ad.flag).kind();af=ae;if(af===18||af===21||af===22||af===26){if(ad.IsNil()){return 0;}return ad.object();}else if(af===19){if(ad.IsNil()){return 0;}return 1;}else if(af===23){if(ad.IsNil()){return 0;}return ad.object().$array;}else{$panic(new DD.ptr("reflect.Value.Pointer",ae));}};CZ.prototype.Pointer=function(){return this.$val.Pointer();};CZ.ptr.prototype.Set=function(ad){var ad,ae,af;ae=this;ad=ad;new DA(ae.flag).mustBeAssignable();new DA(ad.flag).mustBeExported();ad=ad.assignTo("reflect.Set",ae.typ,0);if(!((((ae.flag&64)>>>0)===0))){af=ae.typ.Kind();if(af===17){$copy(ae.ptr,ad.ptr,H(ae.typ));}else if(af===20){ae.ptr.$set(AP(ad,false));}else if(af===25){N(ae.ptr,ad.ptr,ae.typ);}else{ae.ptr.$set(ad.object());}return;}ae.ptr=ad.ptr;};CZ.prototype.Set=function(ad){return this.$val.Set(ad);};CZ.ptr.prototype.SetCap=function(ad){var ad,ae,af,ag;ae=this;new DA(ae.flag).mustBeAssignable();new DA(ae.flag).mustBe(23);af=ae.ptr.$get();if(ad<($parseInt(af.$length)>>0)||ad>($parseInt(af.$capacity)>>0)){$panic(new $String("reflect: slice capacity out of range in SetCap"));}ag=new(H(ae.typ))(af.$array);ag.$offset=af.$offset;ag.$length=af.$length;ag.$capacity=ad;ae.ptr.$set(ag);};CZ.prototype.SetCap=function(ad){return this.$val.SetCap(ad);};CZ.ptr.prototype.SetLen=function(ad){var ad,ae,af,ag;ae=this;new DA(ae.flag).mustBeAssignable();new DA(ae.flag).mustBe(23);af=ae.ptr.$get();if(ad<0||ad>($parseInt(af.$capacity)>>0)){$panic(new $String("reflect: slice length out of range in SetLen"));}ag=new(H(ae.typ))(af.$array);ag.$offset=af.$offset;ag.$length=ad;ag.$capacity=af.$capacity;ae.ptr.$set(ag);};CZ.prototype.SetLen=function(ad){return this.$val.SetLen(ad);};CZ.ptr.prototype.Slice=function(ad,ae){var ad,ae,af,ag,ah,ai,aj,ak,al,am;af=this;ag=0;ah=$ifaceNil;ai=null;aj=new DA(af.flag).kind();ak=aj;if(ak===17){if(((af.flag&128)>>>0)===0){$panic(new $String("reflect.Value.Slice: slice of unaddressable array"));}al=af.typ.kindType;ag=(al.len>>0);ah=V(al.elem);ai=new(H(ah))(af.object());}else if(ak===23){ah=af.typ;ai=af.object();ag=$parseInt(ai.$capacity)>>0;}else if(ak===24){am=af.ptr.$get();if(ad<0||aeam.length){$panic(new $String("reflect.Value.Slice: string slice index out of bounds"));}return R(new $String(am.substring(ad,ae)));}else{$panic(new DD.ptr("reflect.Value.Slice",aj));}if(ad<0||aeag){$panic(new $String("reflect.Value.Slice: slice index out of bounds"));}return O(ah,$subslice(ai,ad,ae),(af.flag&32)>>>0);};CZ.prototype.Slice=function(ad,ae){return this.$val.Slice(ad,ae);};CZ.ptr.prototype.Slice3=function(ad,ae,af){var ad,ae,af,ag,ah,ai,aj,ak,al,am;ag=this;ah=0;ai=$ifaceNil;aj=null;ak=new DA(ag.flag).kind();al=ak;if(al===17){if(((ag.flag&128)>>>0)===0){$panic(new $String("reflect.Value.Slice: slice of unaddressable array"));}am=ag.typ.kindType;ah=(am.len>>0);ai=V(am.elem);aj=new(H(ai))(ag.object());}else if(al===23){ai=ag.typ;aj=ag.object();ah=$parseInt(aj.$capacity)>>0;}else{$panic(new DD.ptr("reflect.Value.Slice3",ak));}if(ad<0||aeah){$panic(new $String("reflect.Value.Slice3: slice index out of bounds"));}return O(ai,$subslice(aj,ad,ae,af),(ag.flag&32)>>>0);};CZ.prototype.Slice3=function(ad,ae,af){return this.$val.Slice3(ad,ae,af);};CZ.ptr.prototype.Close=function(){var ad;ad=this;new DA(ad.flag).mustBe(18);new DA(ad.flag).mustBeExported();$close(ad.object());};CZ.prototype.Close=function(){return this.$val.Close();};CZ.ptr.prototype.TrySend=function(ad){var ad,ae,af,ag;ae=this;ad=ad;new DA(ae.flag).mustBe(18);new DA(ae.flag).mustBeExported();af=ae.typ.kindType;if(((af.dir>>0)&2)===0){$panic(new $String("reflect: send on recv-only channel"));}new DA(ad.flag).mustBeExported();ag=ae.object();if(!!!(ag.$closed)&&($parseInt(ag.$recvQueue.length)===0)&&($parseInt(ag.$buffer.length)===($parseInt(ag.$capacity)>>0))){return false;}ad=ad.assignTo("reflect.Value.Send",af.elem,0);$send(ag,ad.object());return true;};CZ.prototype.TrySend=function(ad){return this.$val.TrySend(ad);};CZ.ptr.prototype.Send=function(ad){var ad,ae;ae=this;ad=ad;$panic(new A.NotSupportedError.ptr("reflect.Value.Send, use reflect.Value.TrySend if possible"));};CZ.prototype.Send=function(ad){return this.$val.Send(ad);};CZ.ptr.prototype.TryRecv=function(){var ad=new CZ.ptr(),ae=false,af,ag,ah,ai,aj,ak,al;af=this;new DA(af.flag).mustBe(18);new DA(af.flag).mustBeExported();ag=af.typ.kindType;if(((ag.dir>>0)&1)===0){$panic(new $String("reflect: recv on send-only channel"));}ah=$recv(af.object());if(ah.constructor===$global.Function){ai=new CZ.ptr(FL.nil,0,0);aj=false;ad=ai;ae=aj;return[ad,ae];}ak=O(ag.elem,ah[0],0);al=!!(ah[1]);ad=ak;ae=al;return[ad,ae];};CZ.prototype.TryRecv=function(){return this.$val.TryRecv();};CZ.ptr.prototype.Recv=function(){var ad=new CZ.ptr(),ae=false,af;af=this;$panic(new A.NotSupportedError.ptr("reflect.Value.Recv, use reflect.Value.TryRecv if possible"));};CZ.prototype.Recv=function(){return this.$val.Recv();};BG.prototype.String=function(){var ad;ad=this.$val;if((ad>>0)=BX.$length)?$throwRuntimeError("index out of range"):BX.$array[BX.$offset+ad]);}return"kind"+C.Itoa((ad>>0));};$ptrType(BG).prototype.String=function(){return new BG(this.$get()).String();};BK.ptr.prototype.uncommon=function(){var ad;ad=this;return ad;};BK.prototype.uncommon=function(){return this.$val.uncommon();};BK.ptr.prototype.PkgPath=function(){var ad;ad=this;if(ad===FY.nil||$pointerIsEqual(ad.pkgPath,FX.nil)){return"";}return ad.pkgPath.$get();};BK.prototype.PkgPath=function(){return this.$val.PkgPath();};BK.ptr.prototype.Name=function(){var ad;ad=this;if(ad===FY.nil||$pointerIsEqual(ad.name,FX.nil)){return"";}return ad.name.$get();};BK.prototype.Name=function(){return this.$val.Name();};BH.ptr.prototype.String=function(){var ad;ad=this;return ad.string.$get();};BH.prototype.String=function(){return this.$val.String();};BH.ptr.prototype.Size=function(){var ad;ad=this;return ad.size;};BH.prototype.Size=function(){return this.$val.Size();};BH.ptr.prototype.Bits=function(){var ad,ae;ad=this;if(ad===FL.nil){$panic(new $String("reflect: Bits of nil Type"));}ae=ad.Kind();if(ae<2||ae>16){$panic(new $String("reflect: Bits of non-arithmetic Type "+ad.String()));}return(ad.size>>0)*8>>0;};BH.prototype.Bits=function(){return this.$val.Bits();};BH.ptr.prototype.Align=function(){var ad;ad=this;return(ad.align>>0);};BH.prototype.Align=function(){return this.$val.Align();};BH.ptr.prototype.FieldAlign=function(){var ad;ad=this;return(ad.fieldAlign>>0);};BH.prototype.FieldAlign=function(){return this.$val.FieldAlign();};BH.ptr.prototype.Kind=function(){var ad;ad=this;return(((ad.kind&31)>>>0)>>>0);};BH.prototype.Kind=function(){return this.$val.Kind();};BH.ptr.prototype.common=function(){var ad;ad=this;return ad;};BH.prototype.common=function(){return this.$val.common();};BK.ptr.prototype.NumMethod=function(){var ad;ad=this;if(ad===FY.nil){return 0;}return ad.methods.$length;};BK.prototype.NumMethod=function(){return this.$val.NumMethod();};BK.ptr.prototype.MethodByName=function(ad){var ad,ae=new BW.ptr(),af=false,ag,ah,ai,aj,ak,al,am,an;ag=this;if(ag===FY.nil){return[ae,af];}ah=GM.nil;ai=ag.methods;aj=0;while(true){if(!(aj=al.$length)?$throwRuntimeError("index out of range"):al.$array[al.$offset+ak]));if(!($pointerIsEqual(ah.name,FX.nil))&&ah.name.$get()===ad){am=$clone(ag.Method(ak),BW);an=true;$copy(ae,am,BW);af=an;return[ae,af];}aj++;}return[ae,af];};BK.prototype.MethodByName=function(ad){return this.$val.MethodByName(ad);};BH.ptr.prototype.NumMethod=function(){var ad,ae;ad=this;if(ad.Kind()===20){ae=ad.kindType;return ae.NumMethod();}return ad.uncommonType.NumMethod();};BH.prototype.NumMethod=function(){return this.$val.NumMethod();};BH.ptr.prototype.Method=function(ad){var ad,ae=new BW.ptr(),af,ag;af=this;if(af.Kind()===20){ag=af.kindType;$copy(ae,ag.Method(ad),BW);return ae;}$copy(ae,af.uncommonType.Method(ad),BW);return ae;};BH.prototype.Method=function(ad){return this.$val.Method(ad);};BH.ptr.prototype.MethodByName=function(ad){var ad,ae=new BW.ptr(),af=false,ag,ah,ai,aj;ag=this;if(ag.Kind()===20){ah=ag.kindType;ai=ah.MethodByName(ad);$copy(ae,ai[0],BW);af=ai[1];return[ae,af];}aj=ag.uncommonType.MethodByName(ad);$copy(ae,aj[0],BW);af=aj[1];return[ae,af];};BH.prototype.MethodByName=function(ad){return this.$val.MethodByName(ad);};BH.ptr.prototype.PkgPath=function(){var ad;ad=this;return ad.uncommonType.PkgPath();};BH.prototype.PkgPath=function(){return this.$val.PkgPath();};BH.ptr.prototype.Name=function(){var ad;ad=this;return ad.uncommonType.Name();};BH.prototype.Name=function(){return this.$val.Name();};BH.ptr.prototype.ChanDir=function(){var ad,ae;ad=this;if(!((ad.Kind()===18))){$panic(new $String("reflect: ChanDir of non-chan type"));}ae=ad.kindType;return(ae.dir>>0);};BH.prototype.ChanDir=function(){return this.$val.ChanDir();};BH.ptr.prototype.IsVariadic=function(){var ad,ae;ad=this;if(!((ad.Kind()===19))){$panic(new $String("reflect: IsVariadic of non-func type"));}ae=ad.kindType;return ae.dotdotdot;};BH.prototype.IsVariadic=function(){return this.$val.IsVariadic();};BH.ptr.prototype.Elem=function(){var ad,ae,af,ag,ah,ai,aj;ad=this;ae=ad.Kind();if(ae===17){af=ad.kindType;return CR(af.elem);}else if(ae===18){ag=ad.kindType;return CR(ag.elem);}else if(ae===21){ah=ad.kindType;return CR(ah.elem);}else if(ae===22){ai=ad.kindType;return CR(ai.elem);}else if(ae===23){aj=ad.kindType;return CR(aj.elem);}$panic(new $String("reflect: Elem of invalid type"));};BH.prototype.Elem=function(){return this.$val.Elem();};BH.ptr.prototype.Field=function(ad){var ad,ae,af;ae=this;if(!((ae.Kind()===25))){$panic(new $String("reflect: Field of non-struct type"));}af=ae.kindType;return af.Field(ad);};BH.prototype.Field=function(ad){return this.$val.Field(ad);};BH.ptr.prototype.FieldByIndex=function(ad){var ad,ae,af;ae=this;if(!((ae.Kind()===25))){$panic(new $String("reflect: FieldByIndex of non-struct type"));}af=ae.kindType;return af.FieldByIndex(ad);};BH.prototype.FieldByIndex=function(ad){return this.$val.FieldByIndex(ad);};BH.ptr.prototype.FieldByName=function(ad){var ad,ae,af;ae=this;if(!((ae.Kind()===25))){$panic(new $String("reflect: FieldByName of non-struct type"));}af=ae.kindType;return af.FieldByName(ad);};BH.prototype.FieldByName=function(ad){return this.$val.FieldByName(ad);};BH.ptr.prototype.FieldByNameFunc=function(ad){var ad,ae,af;ae=this;if(!((ae.Kind()===25))){$panic(new $String("reflect: FieldByNameFunc of non-struct type"));}af=ae.kindType;return af.FieldByNameFunc(ad);};BH.prototype.FieldByNameFunc=function(ad){return this.$val.FieldByNameFunc(ad);};BH.ptr.prototype.In=function(ad){var ad,ae,af,ag;ae=this;if(!((ae.Kind()===19))){$panic(new $String("reflect: In of non-func type"));}af=ae.kindType;return CR((ag=af.in$2,((ad<0||ad>=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+ad])));};BH.prototype.In=function(ad){return this.$val.In(ad);};BH.ptr.prototype.Key=function(){var ad,ae;ad=this;if(!((ad.Kind()===21))){$panic(new $String("reflect: Key of non-map type"));}ae=ad.kindType;return CR(ae.key);};BH.prototype.Key=function(){return this.$val.Key();};BH.ptr.prototype.Len=function(){var ad,ae;ad=this;if(!((ad.Kind()===17))){$panic(new $String("reflect: Len of non-array type"));}ae=ad.kindType;return(ae.len>>0);};BH.prototype.Len=function(){return this.$val.Len();};BH.ptr.prototype.NumField=function(){var ad,ae;ad=this;if(!((ad.Kind()===25))){$panic(new $String("reflect: NumField of non-struct type"));}ae=ad.kindType;return ae.fields.$length;};BH.prototype.NumField=function(){return this.$val.NumField();};BH.ptr.prototype.NumIn=function(){var ad,ae;ad=this;if(!((ad.Kind()===19))){$panic(new $String("reflect: NumIn of non-func type"));}ae=ad.kindType;return ae.in$2.$length;};BH.prototype.NumIn=function(){return this.$val.NumIn();};BH.ptr.prototype.NumOut=function(){var ad,ae;ad=this;if(!((ad.Kind()===19))){$panic(new $String("reflect: NumOut of non-func type"));}ae=ad.kindType;return ae.out.$length;};BH.prototype.NumOut=function(){return this.$val.NumOut();};BH.ptr.prototype.Out=function(ad){var ad,ae,af,ag;ae=this;if(!((ae.Kind()===19))){$panic(new $String("reflect: Out of non-func type"));}af=ae.kindType;return CR((ag=af.out,((ad<0||ad>=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+ad])));};BH.prototype.Out=function(ad){return this.$val.Out(ad);};BL.prototype.String=function(){var ad,ae;ad=this.$val;ae=ad;if(ae===2){return"chan<-";}else if(ae===1){return"<-chan";}else if(ae===3){return"chan";}return"ChanDir"+C.Itoa((ad>>0));};$ptrType(BL).prototype.String=function(){return new BL(this.$get()).String();};BQ.ptr.prototype.Method=function(ad){var ad,ae=new BW.ptr(),af,ag,ah;af=this;if(ad<0||ad>=af.methods.$length){return ae;}ah=(ag=af.methods,((ad<0||ad>=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+ad]));ae.Name=ah.name.$get();if(!($pointerIsEqual(ah.pkgPath,FX.nil))){ae.PkgPath=ah.pkgPath.$get();}ae.Type=CR(ah.typ);ae.Index=ad;return ae;};BQ.prototype.Method=function(ad){return this.$val.Method(ad);};BQ.ptr.prototype.NumMethod=function(){var ad;ad=this;return ad.methods.$length;};BQ.prototype.NumMethod=function(){return this.$val.NumMethod();};BQ.ptr.prototype.MethodByName=function(ad){var ad,ae=new BW.ptr(),af=false,ag,ah,ai,aj,ak,al,am,an;ag=this;if(ag===GN.nil){return[ae,af];}ah=GO.nil;ai=ag.methods;aj=0;while(true){if(!(aj=al.$length)?$throwRuntimeError("index out of range"):al.$array[al.$offset+ak]));if(ah.name.$get()===ad){am=$clone(ag.Method(ak),BW);an=true;$copy(ae,am,BW);af=an;return[ae,af];}aj++;}return[ae,af];};BQ.prototype.MethodByName=function(ad){return this.$val.MethodByName(ad);};BZ.prototype.Get=function(ad){var ad,ae,af,ag,ah,ai,aj;ae=this.$val;while(true){if(!(!(ae===""))){break;}af=0;while(true){if(!(af>0;}ae=ae.substring(af);if(ae===""){break;}af=0;while(true){if(!(af>0;}if((af+1>>0)>=ae.length||!((ae.charCodeAt(af)===58))||!((ae.charCodeAt((af+1>>0))===34))){break;}ag=ae.substring(0,af);ae=ae.substring((af+1>>0));af=1;while(true){if(!(af>0;}af=af+(1)>>0;}if(af>=ae.length){break;}ah=ae.substring(0,(af+1>>0));ae=ae.substring((af+1>>0));if(ad===ag){ai=C.Unquote(ah);aj=ai[0];return aj;}}return"";};$ptrType(BZ).prototype.Get=function(ad){return new BZ(this.$get()).Get(ad);};BV.ptr.prototype.Field=function(ad){var ad,ae=new BY.ptr(),af,ag,ah,ai;af=this;if(ad<0||ad>=af.fields.$length){return ae;}ah=(ag=af.fields,((ad<0||ad>=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+ad]));ae.Type=CR(ah.typ);if(!($pointerIsEqual(ah.name,FX.nil))){ae.Name=ah.name.$get();}else{ai=ae.Type;if(ai.Kind()===22){ai=ai.Elem();}ae.Name=ai.Name();ae.Anonymous=true;}if(!($pointerIsEqual(ah.pkgPath,FX.nil))){ae.PkgPath=ah.pkgPath.$get();}if(!($pointerIsEqual(ah.tag,FX.nil))){ae.Tag=ah.tag.$get();}ae.Offset=ah.offset;ae.Index=new GP([ad]);return ae;};BV.prototype.Field=function(ad){return this.$val.Field(ad);};BV.ptr.prototype.FieldByIndex=function(ad){var ad,ae=new BY.ptr(),af,ag,ah,ai,aj,ak;af=this;ae.Type=CR(af.rtype);ag=ad;ah=0;while(true){if(!(ah=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+ah]);if(ai>0){ak=ae.Type;if((ak.Kind()===22)&&(ak.Elem().Kind()===25)){ak=ak.Elem();}ae.Type=ak;}$copy(ae,ae.Type.Field(aj),BY);ah++;}return ae;};BV.prototype.FieldByIndex=function(ad){return this.$val.FieldByIndex(ad);};BV.ptr.prototype.FieldByNameFunc=function(ad){var ad,ae=new BY.ptr(),af=false,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo;ag=this;ah=new GQ([]);ai=new GQ([new CA.ptr(ag,GP.nil)]);aj=false;ak=(al=new $Map(),al);while(true){if(!(ai.$length>0)){break;}an=ai;ao=$subslice(ah,0,0);ah=an;ai=ao;ap=aj;aj=false;aq=ah;ar=0;while(true){if(!(ar=aq.$length)?$throwRuntimeError("index out of range"):aq.$array[aq.$offset+ar]),CA);at=as.typ;if((au=ak[at.$key()],au!==undefined?au.v:false)){ar++;continue;}av=at;(ak||$throwRuntimeError("assignment to entry in nil map"))[av.$key()]={k:av,v:true};aw=at.fields;ax=0;while(true){if(!(ax=az.$length)?$throwRuntimeError("index out of range"):az.$array[az.$offset+ay]));bb="";bc=FL.nil;if(!($pointerIsEqual(ba.name,FX.nil))){bb=ba.name.$get();}else{bc=ba.typ;if(bc.Kind()===22){bc=bc.Elem().common();}bb=bc.Name();}if(ad(bb)){if((bd=ap[at.$key()],bd!==undefined?bd.v:0)>1||af){be=new BY.ptr("","",$ifaceNil,"",0,GP.nil,false);bf=false;$copy(ae,be,BY);af=bf;return[ae,af];}$copy(ae,at.Field(ay),BY);ae.Index=GP.nil;ae.Index=$appendSlice(ae.Index,as.index);ae.Index=$append(ae.Index,ay);af=true;ax++;continue;}if(af||bc===FL.nil||!((bc.Kind()===25))){ax++;continue;}bg=bc.kindType;if((bh=aj[bg.$key()],bh!==undefined?bh.v:0)>0){bi=bg;(aj||$throwRuntimeError("assignment to entry in nil map"))[bi.$key()]={k:bi,v:2};ax++;continue;}if(aj===false){aj=(bj=new $Map(),bj);}bl=bg;(aj||$throwRuntimeError("assignment to entry in nil map"))[bl.$key()]={k:bl,v:1};if((bm=ap[at.$key()],bm!==undefined?bm.v:0)>1){bn=bg;(aj||$throwRuntimeError("assignment to entry in nil map"))[bn.$key()]={k:bn,v:2};}bo=GP.nil;bo=$appendSlice(bo,as.index);bo=$append(bo,ay);ai=$append(ai,new CA.ptr(bg,bo));ax++;}ar++;}if(af){break;}}return[ae,af];};BV.prototype.FieldByNameFunc=function(ad){return this.$val.FieldByNameFunc(ad);};BV.ptr.prototype.FieldByName=function(ad){var ad,ae=new BY.ptr(),af=false,ag,ah,ai,aj,ak,al,am,an,ao,ap;ag=this;ah=false;if(!(ad==="")){ai=ag.fields;aj=0;while(true){if(!(aj=al.$length)?$throwRuntimeError("index out of range"):al.$array[al.$offset+ak]));if($pointerIsEqual(am.name,FX.nil)){ah=true;aj++;continue;}if(am.name.$get()===ad){an=$clone(ag.Field(ak),BY);ao=true;$copy(ae,an,BY);af=ao;return[ae,af];}aj++;}}if(!ah){return[ae,af];}ap=ag.FieldByNameFunc((function(aq){var aq;return aq===ad;}));$copy(ae,ap[0],BY);af=ap[1];return[ae,af];};BV.prototype.FieldByName=function(ad){return this.$val.FieldByName(ad);};CC=$pkg.PtrTo=function(ad){var ad;return $assertType(ad,FL).ptrTo();};BH.ptr.prototype.Implements=function(ad){var ad,ae;ae=this;if($interfaceIsEqual(ad,$ifaceNil)){$panic(new $String("reflect: nil type passed to Type.Implements"));}if(!((ad.Kind()===20))){$panic(new $String("reflect: non-interface type passed to Type.Implements"));}return CE($assertType(ad,FL),ae);};BH.prototype.Implements=function(ad){return this.$val.Implements(ad);};BH.ptr.prototype.AssignableTo=function(ad){var ad,ae,af;ae=this;if($interfaceIsEqual(ad,$ifaceNil)){$panic(new $String("reflect: nil type passed to Type.AssignableTo"));}af=$assertType(ad,FL);return CF(af,ae)||CE(af,ae);};BH.prototype.AssignableTo=function(ad){return this.$val.AssignableTo(ad);};BH.ptr.prototype.ConvertibleTo=function(ad){var ad,ae,af;ae=this;if($interfaceIsEqual(ad,$ifaceNil)){$panic(new $String("reflect: nil type passed to Type.ConvertibleTo"));}af=$assertType(ad,FL);return!(EH(af,ae)===$throwNilPointerError);};BH.prototype.ConvertibleTo=function(ad){return this.$val.ConvertibleTo(ad);};CE=function(ad,ae){var ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at;if(!((ad.Kind()===20))){return false;}af=ad.kindType;if(af.methods.$length===0){return true;}if(ae.Kind()===20){ag=ae.kindType;ah=0;ai=0;while(true){if(!(ai=aj.$length)?$throwRuntimeError("index out of range"):aj.$array[aj.$offset+ah]));am=(al=ag.methods,((ai<0||ai>=al.$length)?$throwRuntimeError("index out of range"):al.$array[al.$offset+ai]));if($pointerIsEqual(am.name,ak.name)&&$pointerIsEqual(am.pkgPath,ak.pkgPath)&&am.typ===ak.typ){ah=ah+(1)>>0;if(ah>=af.methods.$length){return true;}}ai=ai+(1)>>0;}return false;}an=ae.uncommonType.uncommon();if(an===FY.nil){return false;}ao=0;ap=0;while(true){if(!(ap=aq.$length)?$throwRuntimeError("index out of range"):aq.$array[aq.$offset+ao]));at=(as=an.methods,((ap<0||ap>=as.$length)?$throwRuntimeError("index out of range"):as.$array[as.$offset+ap]));if($pointerIsEqual(at.name,ar.name)&&$pointerIsEqual(at.pkgPath,ar.pkgPath)&&at.mtyp===ar.typ){ao=ao+(1)>>0;if(ao>=af.methods.$length){return true;}}ap=ap+(1)>>0;}return false;};CF=function(ad,ae){var ad,ae;if(ad===ae){return true;}if(!(ad.Name()==="")&&!(ae.Name()==="")||!((ad.Kind()===ae.Kind()))){return false;}return CG(ad,ae);};CG=function(ad,ae){var ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd;if(ad===ae){return true;}af=ad.Kind();if(!((af===ae.Kind()))){return false;}if(1<=af&&af<=16||(af===24)||(af===26)){return true;}ag=af;if(ag===17){return $interfaceIsEqual(ad.Elem(),ae.Elem())&&(ad.Len()===ae.Len());}else if(ag===18){if((ae.ChanDir()===3)&&$interfaceIsEqual(ad.Elem(),ae.Elem())){return true;}return(ae.ChanDir()===ad.ChanDir())&&$interfaceIsEqual(ad.Elem(),ae.Elem());}else if(ag===19){ah=ad.kindType;ai=ae.kindType;if(!(ah.dotdotdot===ai.dotdotdot)||!((ah.in$2.$length===ai.in$2.$length))||!((ah.out.$length===ai.out.$length))){return false;}aj=ah.in$2;ak=0;while(true){if(!(ak=aj.$length)?$throwRuntimeError("index out of range"):aj.$array[aj.$offset+ak]);if(!(am===(an=ai.in$2,((al<0||al>=an.$length)?$throwRuntimeError("index out of range"):an.$array[an.$offset+al])))){return false;}ak++;}ao=ah.out;ap=0;while(true){if(!(ap=ao.$length)?$throwRuntimeError("index out of range"):ao.$array[ao.$offset+ap]);if(!(ar===(as=ai.out,((aq<0||aq>=as.$length)?$throwRuntimeError("index out of range"):as.$array[as.$offset+aq])))){return false;}ap++;}return true;}else if(ag===20){at=ad.kindType;au=ae.kindType;if((at.methods.$length===0)&&(au.methods.$length===0)){return true;}return false;}else if(ag===21){return $interfaceIsEqual(ad.Key(),ae.Key())&&$interfaceIsEqual(ad.Elem(),ae.Elem());}else if(ag===22||ag===23){return $interfaceIsEqual(ad.Elem(),ae.Elem());}else if(ag===25){av=ad.kindType;aw=ae.kindType;if(!((av.fields.$length===aw.fields.$length))){return false;}ax=av.fields;ay=0;while(true){if(!(ay=ba.$length)?$throwRuntimeError("index out of range"):ba.$array[ba.$offset+az]));bd=(bc=aw.fields,((az<0||az>=bc.$length)?$throwRuntimeError("index out of range"):bc.$array[bc.$offset+az]));if(!($pointerIsEqual(bb.name,bd.name))&&($pointerIsEqual(bb.name,FX.nil)||$pointerIsEqual(bd.name,FX.nil)||!(bb.name.$get()===bd.name.$get()))){return false;}if(!($pointerIsEqual(bb.pkgPath,bd.pkgPath))&&($pointerIsEqual(bb.pkgPath,FX.nil)||$pointerIsEqual(bd.pkgPath,FX.nil)||!(bb.pkgPath.$get()===bd.pkgPath.$get()))){return false;}if(!(bb.typ===bd.typ)){return false;}if(!($pointerIsEqual(bb.tag,bd.tag))&&($pointerIsEqual(bb.tag,FX.nil)||$pointerIsEqual(bd.tag,FX.nil)||!(bb.tag.$get()===bd.tag.$get()))){return false;}if(!((bb.offset===bd.offset))){return false;}ay++;}return true;}return false;};CR=function(ad){var ad;if(ad===FL.nil){return $ifaceNil;}return ad;};CW=function(ad){var ad;return((ad.kind&32)>>>0)===0;};DA.prototype.kind=function(){var ad;ad=this.$val;return(((ad&31)>>>0)>>>0);};$ptrType(DA).prototype.kind=function(){return new DA(this.$get()).kind();};CZ.ptr.prototype.pointer=function(){var ad;ad=this;if(!((ad.typ.size===4))||!ad.typ.pointers()){$panic(new $String("can't call pointer on a non-pointer Value"));}if(!((((ad.flag&64)>>>0)===0))){return ad.ptr.$get();}return ad.ptr;};CZ.prototype.pointer=function(){return this.$val.pointer();};DD.ptr.prototype.Error=function(){var ad;ad=this;if(ad.Kind===0){return"reflect: call of "+ad.Method+" on zero Value";}return"reflect: call of "+ad.Method+" on "+new BG(ad.Kind).String()+" Value";};DD.prototype.Error=function(){return this.$val.Error();};DA.prototype.mustBe=function(ad){var ad,ae;ae=this.$val;if(!((new DA(ae).kind()===ad))){$panic(new DD.ptr(AR(),new DA(ae).kind()));}};$ptrType(DA).prototype.mustBe=function(ad){return new DA(this.$get()).mustBe(ad);};DA.prototype.mustBeExported=function(){var ad;ad=this.$val;if(ad===0){$panic(new DD.ptr(AR(),0));}if(!((((ad&32)>>>0)===0))){$panic(new $String("reflect: "+AR()+" using value obtained using unexported field"));}};$ptrType(DA).prototype.mustBeExported=function(){return new DA(this.$get()).mustBeExported();};DA.prototype.mustBeAssignable=function(){var ad;ad=this.$val;if(ad===0){$panic(new DD.ptr(AR(),0));}if(!((((ad&32)>>>0)===0))){$panic(new $String("reflect: "+AR()+" using value obtained using unexported field"));}if(((ad&128)>>>0)===0){$panic(new $String("reflect: "+AR()+" using unaddressable value"));}};$ptrType(DA).prototype.mustBeAssignable=function(){return new DA(this.$get()).mustBeAssignable();};CZ.ptr.prototype.Addr=function(){var ad;ad=this;if(((ad.flag&128)>>>0)===0){$panic(new $String("reflect.Value.Addr of unaddressable value"));}return new CZ.ptr(ad.typ.ptrTo(),ad.ptr,((((ad.flag&32)>>>0))|22)>>>0);};CZ.prototype.Addr=function(){return this.$val.Addr();};CZ.ptr.prototype.Bool=function(){var ad;ad=this;new DA(ad.flag).mustBe(1);return ad.ptr.$get();};CZ.prototype.Bool=function(){return this.$val.Bool();};CZ.ptr.prototype.Bytes=function(){var ad;ad=this;new DA(ad.flag).mustBe(23);if(!((ad.typ.Elem().Kind()===8))){$panic(new $String("reflect.Value.Bytes of non-byte slice"));}return ad.ptr.$get();};CZ.prototype.Bytes=function(){return this.$val.Bytes();};CZ.ptr.prototype.runes=function(){var ad;ad=this;new DA(ad.flag).mustBe(23);if(!((ad.typ.Elem().Kind()===5))){$panic(new $String("reflect.Value.Bytes of non-rune slice"));}return ad.ptr.$get();};CZ.prototype.runes=function(){return this.$val.runes();};CZ.ptr.prototype.CanAddr=function(){var ad;ad=this;return!((((ad.flag&128)>>>0)===0));};CZ.prototype.CanAddr=function(){return this.$val.CanAddr();};CZ.ptr.prototype.CanSet=function(){var ad;ad=this;return((ad.flag&160)>>>0)===128;};CZ.prototype.CanSet=function(){return this.$val.CanSet();};CZ.ptr.prototype.Call=function(ad){var ad,ae;ae=this;new DA(ae.flag).mustBe(19);new DA(ae.flag).mustBeExported();return ae.call("Call",ad);};CZ.prototype.Call=function(ad){return this.$val.Call(ad);};CZ.ptr.prototype.CallSlice=function(ad){var ad,ae;ae=this;new DA(ae.flag).mustBe(19);new DA(ae.flag).mustBeExported();return ae.call("CallSlice",ad);};CZ.prototype.CallSlice=function(ad){return this.$val.CallSlice(ad);};CZ.ptr.prototype.Complex=function(){var ad,ae,af,ag;ad=this;ae=new DA(ad.flag).kind();af=ae;if(af===15){return(ag=ad.ptr.$get(),new $Complex128(ag.$real,ag.$imag));}else if(af===16){return ad.ptr.$get();}$panic(new DD.ptr("reflect.Value.Complex",new DA(ad.flag).kind()));};CZ.prototype.Complex=function(){return this.$val.Complex();};CZ.ptr.prototype.FieldByIndex=function(ad){var ad,ae,af,ag,ah,ai;ae=this;if(ad.$length===1){return ae.Field(((0<0||0>=ad.$length)?$throwRuntimeError("index out of range"):ad.$array[ad.$offset+0]));}new DA(ae.flag).mustBe(25);af=ad;ag=0;while(true){if(!(ag=af.$length)?$throwRuntimeError("index out of range"):af.$array[af.$offset+ag]);if(ah>0){if((ae.Kind()===22)&&(ae.typ.Elem().Kind()===25)){if(ae.IsNil()){$panic(new $String("reflect: indirection through nil pointer to embedded struct"));}ae=ae.Elem();}}ae=ae.Field(ai);ag++;}return ae;};CZ.prototype.FieldByIndex=function(ad){return this.$val.FieldByIndex(ad);};CZ.ptr.prototype.FieldByName=function(ad){var ad,ae,af,ag,ah;ae=this;new DA(ae.flag).mustBe(25);af=ae.typ.FieldByName(ad);ag=$clone(af[0],BY);ah=af[1];if(ah){return ae.FieldByIndex(ag.Index);}return new CZ.ptr(FL.nil,0,0);};CZ.prototype.FieldByName=function(ad){return this.$val.FieldByName(ad);};CZ.ptr.prototype.FieldByNameFunc=function(ad){var ad,ae,af,ag,ah;ae=this;af=ae.typ.FieldByNameFunc(ad);ag=$clone(af[0],BY);ah=af[1];if(ah){return ae.FieldByIndex(ag.Index);}return new CZ.ptr(FL.nil,0,0);};CZ.prototype.FieldByNameFunc=function(ad){return this.$val.FieldByNameFunc(ad);};CZ.ptr.prototype.Float=function(){var ad,ae,af;ad=this;ae=new DA(ad.flag).kind();af=ae;if(af===13){return $coerceFloat32(ad.ptr.$get());}else if(af===14){return ad.ptr.$get();}$panic(new DD.ptr("reflect.Value.Float",new DA(ad.flag).kind()));};CZ.prototype.Float=function(){return this.$val.Float();};CZ.ptr.prototype.Int=function(){var ad,ae,af,ag;ad=this;ae=new DA(ad.flag).kind();af=ad.ptr;ag=ae;if(ag===2){return new $Int64(0,af.$get());}else if(ag===3){return new $Int64(0,af.$get());}else if(ag===4){return new $Int64(0,af.$get());}else if(ag===5){return new $Int64(0,af.$get());}else if(ag===6){return af.$get();}$panic(new DD.ptr("reflect.Value.Int",new DA(ad.flag).kind()));};CZ.prototype.Int=function(){return this.$val.Int();};CZ.ptr.prototype.CanInterface=function(){var ad;ad=this;if(ad.flag===0){$panic(new DD.ptr("reflect.Value.CanInterface",0));}return((ad.flag&32)>>>0)===0;};CZ.prototype.CanInterface=function(){return this.$val.CanInterface();};CZ.ptr.prototype.Interface=function(){var ad=$ifaceNil,ae;ae=this;ad=AP(ae,true);return ad;};CZ.prototype.Interface=function(){return this.$val.Interface();};CZ.ptr.prototype.InterfaceData=function(){var ad;ad=this;new DA(ad.flag).mustBe(20);return ad.ptr;};CZ.prototype.InterfaceData=function(){return this.$val.InterfaceData();};CZ.ptr.prototype.IsValid=function(){var ad;ad=this;return!((ad.flag===0));};CZ.prototype.IsValid=function(){return this.$val.IsValid();};CZ.ptr.prototype.Kind=function(){var ad;ad=this;return new DA(ad.flag).kind();};CZ.prototype.Kind=function(){return this.$val.Kind();};CZ.ptr.prototype.MapIndex=function(ad){var ad,ae,af,ag,ah,ai,aj,ak;ae=this;ad=ad;new DA(ae.flag).mustBe(21);af=ae.typ.kindType;ad=ad.assignTo("reflect.Value.MapIndex",af.key,0);ag=0;if(!((((ad.flag&64)>>>0)===0))){ag=ad.ptr;}else{ag=new GW(function(){return this.$target.ptr;},function($v){this.$target.ptr=$v;},ad);}ah=AE(ae.typ,ae.pointer(),ag);if(ah===0){return new CZ.ptr(FL.nil,0,0);}ai=af.elem;aj=((((ae.flag|ad.flag)>>>0))&32)>>>0;aj=(aj|((ai.Kind()>>>0)))>>>0;if(CW(ai)){ak=X(ai);AA(ak,ah,ai.size);return new CZ.ptr(ai,ak,(aj|64)>>>0);}else{return new CZ.ptr(ai,ah.$get(),aj);}};CZ.prototype.MapIndex=function(ad){return this.$val.MapIndex(ad);};CZ.ptr.prototype.MapKeys=function(){var ad,ae,af,ag,ah,ai,aj,ak,al,am,an;ad=this;new DA(ad.flag).mustBe(21);ae=ad.typ.kindType;af=ae.key;ag=(((ad.flag&32)>>>0)|(af.Kind()>>>0))>>>0;ah=ad.pointer();ai=0;if(!(ah===0)){ai=AL(ah);}aj=AI(ad.typ,ah);ak=$makeSlice(GE,ai);al=0;al=0;while(true){if(!(al=ak.$length)?$throwRuntimeError("index out of range"):ak.$array[ak.$offset+al]=new CZ.ptr(af,an,(ag|64)>>>0);}else{(al<0||al>=ak.$length)?$throwRuntimeError("index out of range"):ak.$array[ak.$offset+al]=new CZ.ptr(af,am.$get(),ag);}AK(aj);al=al+(1)>>0;}return $subslice(ak,0,al);};CZ.prototype.MapKeys=function(){return this.$val.MapKeys();};CZ.ptr.prototype.Method=function(ad){var ad,ae,af;ae=this;if(ae.typ===FL.nil){$panic(new DD.ptr("reflect.Value.Method",0));}if(!((((ae.flag&256)>>>0)===0))||(ad>>>0)>=(ae.typ.NumMethod()>>>0)){$panic(new $String("reflect: Method index out of range"));}if((ae.typ.Kind()===20)&&ae.IsNil()){$panic(new $String("reflect: Method on nil interface value"));}af=(ae.flag&96)>>>0;af=(af|(19))>>>0;af=(af|(((((ad>>>0)<<9>>>0)|256)>>>0)))>>>0;return new CZ.ptr(ae.typ,ae.ptr,af);};CZ.prototype.Method=function(ad){return this.$val.Method(ad);};CZ.ptr.prototype.NumMethod=function(){var ad;ad=this;if(ad.typ===FL.nil){$panic(new DD.ptr("reflect.Value.NumMethod",0));}if(!((((ad.flag&256)>>>0)===0))){return 0;}return ad.typ.NumMethod();};CZ.prototype.NumMethod=function(){return this.$val.NumMethod();};CZ.ptr.prototype.MethodByName=function(ad){var ad,ae,af,ag,ah;ae=this;if(ae.typ===FL.nil){$panic(new DD.ptr("reflect.Value.MethodByName",0));}if(!((((ae.flag&256)>>>0)===0))){return new CZ.ptr(FL.nil,0,0);}af=ae.typ.MethodByName(ad);ag=$clone(af[0],BW);ah=af[1];if(!ah){return new CZ.ptr(FL.nil,0,0);}return ae.Method(ag.Index);};CZ.prototype.MethodByName=function(ad){return this.$val.MethodByName(ad);};CZ.ptr.prototype.NumField=function(){var ad,ae;ad=this;new DA(ad.flag).mustBe(25);ae=ad.typ.kindType;return ae.fields.$length;};CZ.prototype.NumField=function(){return this.$val.NumField();};CZ.ptr.prototype.OverflowComplex=function(ad){var ad,ae,af,ag;ae=this;af=new DA(ae.flag).kind();ag=af;if(ag===15){return DN(ad.$real)||DN(ad.$imag);}else if(ag===16){return false;}$panic(new DD.ptr("reflect.Value.OverflowComplex",new DA(ae.flag).kind()));};CZ.prototype.OverflowComplex=function(ad){return this.$val.OverflowComplex(ad);};CZ.ptr.prototype.OverflowFloat=function(ad){var ad,ae,af,ag;ae=this;af=new DA(ae.flag).kind();ag=af;if(ag===13){return DN(ad);}else if(ag===14){return false;}$panic(new DD.ptr("reflect.Value.OverflowFloat",new DA(ae.flag).kind()));};CZ.prototype.OverflowFloat=function(ad){return this.$val.OverflowFloat(ad);};DN=function(ad){var ad;if(ad<0){ad=-ad;}return 3.4028234663852886e+38>>16<<16)*8>>>0)+(ah<<16>>>16)*8)>>>0);aj=$shiftRightInt64(($shiftLeft64(ad,((64-ai>>>0)))),((64-ai>>>0)));return!((ad.$high===aj.$high&&ad.$low===aj.$low));}$panic(new DD.ptr("reflect.Value.OverflowInt",new DA(ae.flag).kind()));};CZ.prototype.OverflowInt=function(ad){return this.$val.OverflowInt(ad);};CZ.ptr.prototype.OverflowUint=function(ad){var ad,ae,af,ag,ah,ai,aj;ae=this;af=new DA(ae.flag).kind();ag=af;if(ag===7||ag===12||ag===8||ag===9||ag===10||ag===11){ai=(ah=ae.typ.size,(((ah>>>16<<16)*8>>>0)+(ah<<16>>>16)*8)>>>0);aj=$shiftRightUint64(($shiftLeft64(ad,((64-ai>>>0)))),((64-ai>>>0)));return!((ad.$high===aj.$high&&ad.$low===aj.$low));}$panic(new DD.ptr("reflect.Value.OverflowUint",new DA(ae.flag).kind()));};CZ.prototype.OverflowUint=function(ad){return this.$val.OverflowUint(ad);};CZ.ptr.prototype.SetBool=function(ad){var ad,ae;ae=this;new DA(ae.flag).mustBeAssignable();new DA(ae.flag).mustBe(1);ae.ptr.$set(ad);};CZ.prototype.SetBool=function(ad){return this.$val.SetBool(ad);};CZ.ptr.prototype.SetBytes=function(ad){var ad,ae;ae=this;new DA(ae.flag).mustBeAssignable();new DA(ae.flag).mustBe(23);if(!((ae.typ.Elem().Kind()===8))){$panic(new $String("reflect.Value.SetBytes of non-byte slice"));}ae.ptr.$set(ad);};CZ.prototype.SetBytes=function(ad){return this.$val.SetBytes(ad);};CZ.ptr.prototype.setRunes=function(ad){var ad,ae;ae=this;new DA(ae.flag).mustBeAssignable();new DA(ae.flag).mustBe(23);if(!((ae.typ.Elem().Kind()===5))){$panic(new $String("reflect.Value.setRunes of non-rune slice"));}ae.ptr.$set(ad);};CZ.prototype.setRunes=function(ad){return this.$val.setRunes(ad);};CZ.ptr.prototype.SetComplex=function(ad){var ad,ae,af,ag;ae=this;new DA(ae.flag).mustBeAssignable();af=new DA(ae.flag).kind();ag=af;if(ag===15){ae.ptr.$set(new $Complex64(ad.$real,ad.$imag));}else if(ag===16){ae.ptr.$set(ad);}else{$panic(new DD.ptr("reflect.Value.SetComplex",new DA(ae.flag).kind()));}};CZ.prototype.SetComplex=function(ad){return this.$val.SetComplex(ad);};CZ.ptr.prototype.SetFloat=function(ad){var ad,ae,af,ag;ae=this;new DA(ae.flag).mustBeAssignable();af=new DA(ae.flag).kind();ag=af;if(ag===13){ae.ptr.$set(ad);}else if(ag===14){ae.ptr.$set(ad);}else{$panic(new DD.ptr("reflect.Value.SetFloat",new DA(ae.flag).kind()));}};CZ.prototype.SetFloat=function(ad){return this.$val.SetFloat(ad);};CZ.ptr.prototype.SetInt=function(ad){var ad,ae,af,ag;ae=this;new DA(ae.flag).mustBeAssignable();af=new DA(ae.flag).kind();ag=af;if(ag===2){ae.ptr.$set(((ad.$low+((ad.$high>>31)*4294967296))>>0));}else if(ag===3){ae.ptr.$set(((ad.$low+((ad.$high>>31)*4294967296))<<24>>24));}else if(ag===4){ae.ptr.$set(((ad.$low+((ad.$high>>31)*4294967296))<<16>>16));}else if(ag===5){ae.ptr.$set(((ad.$low+((ad.$high>>31)*4294967296))>>0));}else if(ag===6){ae.ptr.$set(ad);}else{$panic(new DD.ptr("reflect.Value.SetInt",new DA(ae.flag).kind()));}};CZ.prototype.SetInt=function(ad){return this.$val.SetInt(ad);};CZ.ptr.prototype.SetMapIndex=function(ad,ae){var ad,ae,af,ag,ah,ai;af=this;ae=ae;ad=ad;new DA(af.flag).mustBe(21);new DA(af.flag).mustBeExported();new DA(ad.flag).mustBeExported();ag=af.typ.kindType;ad=ad.assignTo("reflect.Value.SetMapIndex",ag.key,0);ah=0;if(!((((ad.flag&64)>>>0)===0))){ah=ad.ptr;}else{ah=new GW(function(){return this.$target.ptr;},function($v){this.$target.ptr=$v;},ad);}if(ae.typ===FL.nil){AG(af.typ,af.pointer(),ah);return;}new DA(ae.flag).mustBeExported();ae=ae.assignTo("reflect.Value.SetMapIndex",ag.elem,0);ai=0;if(!((((ae.flag&64)>>>0)===0))){ai=ae.ptr;}else{ai=new GW(function(){return this.$target.ptr;},function($v){this.$target.ptr=$v;},ae);}AF(af.typ,af.pointer(),ah,ai);};CZ.prototype.SetMapIndex=function(ad,ae){return this.$val.SetMapIndex(ad,ae);};CZ.ptr.prototype.SetUint=function(ad){var ad,ae,af,ag;ae=this;new DA(ae.flag).mustBeAssignable();af=new DA(ae.flag).kind();ag=af;if(ag===7){ae.ptr.$set((ad.$low>>>0));}else if(ag===8){ae.ptr.$set((ad.$low<<24>>>24));}else if(ag===9){ae.ptr.$set((ad.$low<<16>>>16));}else if(ag===10){ae.ptr.$set((ad.$low>>>0));}else if(ag===11){ae.ptr.$set(ad);}else if(ag===12){ae.ptr.$set((ad.$low>>>0));}else{$panic(new DD.ptr("reflect.Value.SetUint",new DA(ae.flag).kind()));}};CZ.prototype.SetUint=function(ad){return this.$val.SetUint(ad);};CZ.ptr.prototype.SetPointer=function(ad){var ad,ae;ae=this;new DA(ae.flag).mustBeAssignable();new DA(ae.flag).mustBe(26);ae.ptr.$set(ad);};CZ.prototype.SetPointer=function(ad){return this.$val.SetPointer(ad);};CZ.ptr.prototype.SetString=function(ad){var ad,ae;ae=this;new DA(ae.flag).mustBeAssignable();new DA(ae.flag).mustBe(24);ae.ptr.$set(ad);};CZ.prototype.SetString=function(ad){return this.$val.SetString(ad);};CZ.ptr.prototype.String=function(){var ad,ae,af;ad=this;ae=new DA(ad.flag).kind();af=ae;if(af===0){return"";}else if(af===24){return ad.ptr.$get();}return"<"+ad.Type().String()+" Value>";};CZ.prototype.String=function(){return this.$val.String();};CZ.ptr.prototype.Type=function(){var ad,ae,af,ag,ah,ai,aj,ak,al;ad=this;ae=ad.flag;if(ae===0){$panic(new DD.ptr("reflect.Value.Type",0));}if(((ae&256)>>>0)===0){return ad.typ;}af=(ad.flag>>0)>>9>>0;if(ad.typ.Kind()===20){ag=ad.typ.kindType;if((af>>>0)>=(ag.methods.$length>>>0)){$panic(new $String("reflect: internal error: invalid method index"));}ai=(ah=ag.methods,((af<0||af>=ah.$length)?$throwRuntimeError("index out of range"):ah.$array[ah.$offset+af]));return ai.typ;}aj=ad.typ.uncommonType.uncommon();if(aj===FY.nil||(af>>>0)>=(aj.methods.$length>>>0)){$panic(new $String("reflect: internal error: invalid method index"));}al=(ak=aj.methods,((af<0||af>=ak.$length)?$throwRuntimeError("index out of range"):ak.$array[ak.$offset+af]));return al.mtyp;};CZ.prototype.Type=function(){return this.$val.Type();};CZ.ptr.prototype.Uint=function(){var ad,ae,af,ag,ah;ad=this;ae=new DA(ad.flag).kind();af=ad.ptr;ag=ae;if(ag===7){return new $Uint64(0,af.$get());}else if(ag===8){return new $Uint64(0,af.$get());}else if(ag===9){return new $Uint64(0,af.$get());}else if(ag===10){return new $Uint64(0,af.$get());}else if(ag===11){return af.$get();}else if(ag===12){return(ah=af.$get(),new $Uint64(0,ah.constructor===Number?ah:1));}$panic(new DD.ptr("reflect.Value.Uint",new DA(ad.flag).kind()));};CZ.prototype.Uint=function(){return this.$val.Uint();};CZ.ptr.prototype.UnsafeAddr=function(){var ad;ad=this;if(ad.typ===FL.nil){$panic(new DD.ptr("reflect.Value.UnsafeAddr",0));}if(((ad.flag&128)>>>0)===0){$panic(new $String("reflect.Value.UnsafeAddr of unaddressable value"));}return ad.ptr;};CZ.prototype.UnsafeAddr=function(){return this.$val.UnsafeAddr();};EF=$pkg.New=function(ad){var ad,ae,af;if($interfaceIsEqual(ad,$ifaceNil)){$panic(new $String("reflect: New(nil)"));}ae=X($assertType(ad,FL));af=22;return new CZ.ptr(ad.common().ptrTo(),ae,af);};CZ.ptr.prototype.assignTo=function(ad,ae,af){var ad,ae,af,ag,ah,ai;ag=this;if(!((((ag.flag&256)>>>0)===0))){ag=AS(ad,ag);}if(CF(ae,ag.typ)){ag.typ=ae;ah=(ag.flag&224)>>>0;ah=(ah|((ae.Kind()>>>0)))>>>0;return new CZ.ptr(ae,ag.ptr,ah);}else if(CE(ae,ag.typ)){if(af===0){af=X(ae);}ai=AP(ag,false);if(ae.NumMethod()===0){af.$set(ai);}else{AQ(ae,ai,af);}return new CZ.ptr(ae,af,84);}$panic(new $String(ad+": value of type "+ag.typ.String()+" is not assignable to type "+ae.String()));};CZ.prototype.assignTo=function(ad,ae,af){return this.$val.assignTo(ad,ae,af);};CZ.ptr.prototype.Convert=function(ad){var ad,ae,af;ae=this;if(!((((ae.flag&256)>>>0)===0))){ae=AS("Convert",ae);}af=EH(ad.common(),ae.typ);if(af===$throwNilPointerError){$panic(new $String("reflect.Value.Convert: value of type "+ae.typ.String()+" cannot be converted to type "+ad.String()));}return af(ae,ad);};CZ.prototype.Convert=function(ad){return this.$val.Convert(ad);};EH=function(ad,ae){var ad,ae,af,ag,ah,ai,aj,ak,al;af=ae.Kind();if(af===2||af===3||af===4||af===5||af===6){ag=ad.Kind();if(ag===2||ag===3||ag===4||ag===5||ag===6||ag===7||ag===8||ag===9||ag===10||ag===11||ag===12){return EN;}else if(ag===13||ag===14){return ER;}else if(ag===24){return EV;}}else if(af===7||af===8||af===9||af===10||af===11||af===12){ah=ad.Kind();if(ah===2||ah===3||ah===4||ah===5||ah===6||ah===7||ah===8||ah===9||ah===10||ah===11||ah===12){return EO;}else if(ah===13||ah===14){return ES;}else if(ah===24){return EW;}}else if(af===13||af===14){ai=ad.Kind();if(ai===2||ai===3||ai===4||ai===5||ai===6){return EP;}else if(ai===7||ai===8||ai===9||ai===10||ai===11||ai===12){return EQ;}else if(ai===13||ai===14){return ET;}}else if(af===15||af===16){aj=ad.Kind();if(aj===15||aj===16){return EU;}}else if(af===24){if((ad.Kind()===23)&&ad.Elem().PkgPath()===""){ak=ad.Elem().Kind();if(ak===8){return EY;}else if(ak===5){return FA;}}}else if(af===23){if((ad.Kind()===24)&&ae.Elem().PkgPath()===""){al=ae.Elem().Kind();if(al===8){return EX;}else if(al===5){return EZ;}}}if(CG(ad,ae)){return AM;}if((ad.Kind()===22)&&ad.Name()===""&&(ae.Kind()===22)&&ae.Name()===""&&CG(ad.Elem().common(),ae.Elem().common())){return AM;}if(CE(ad,ae)){if(ae.Kind()===20){return FC;}return FB;}return $throwNilPointerError;};EI=function(ad,ae,af){var ad,ae,af,ag,ah,ai;ag=af.common();ah=X(ag);ai=ag.size;if(ai===4){ah.$set(ae);}else if(ai===8){ah.$set(ae);}return new CZ.ptr(ag,ah,(((ad|64)>>>0)|(ag.Kind()>>>0))>>>0);};EJ=function(ad,ae,af){var ad,ae,af,ag,ah,ai;ag=af.common();ah=X(ag);ai=ag.size;if(ai===8){ah.$set(new $Complex64(ae.$real,ae.$imag));}else if(ai===16){ah.$set(ae);}return new CZ.ptr(ag,ah,(((ad|64)>>>0)|(ag.Kind()>>>0))>>>0);};EK=function(ad,ae,af){var ad,ae,af,ag;ag=EF(af).Elem();ag.SetString(ae);ag.flag=((ag.flag&~128)|ad)>>>0;return ag;};EL=function(ad,ae,af){var ad,ae,af,ag;ag=EF(af).Elem();ag.SetBytes(ae);ag.flag=((ag.flag&~128)|ad)>>>0;return ag;};EM=function(ad,ae,af){var ad,ae,af,ag;ag=EF(af).Elem();ag.setRunes(ae);ag.flag=((ag.flag&~128)|ad)>>>0;return ag;};EN=function(ad,ae){var ad,ae,af;ad=ad;return Y((ad.flag&32)>>>0,(af=ad.Int(),new $Uint64(af.$high,af.$low)),ae);};EO=function(ad,ae){var ad,ae;ad=ad;return Y((ad.flag&32)>>>0,ad.Uint(),ae);};EP=function(ad,ae){var ad,ae,af;ad=ad;return Y((ad.flag&32)>>>0,(af=new $Int64(0,ad.Float()),new $Uint64(af.$high,af.$low)),ae);};EQ=function(ad,ae){var ad,ae;ad=ad;return Y((ad.flag&32)>>>0,new $Uint64(0,ad.Float()),ae);};ER=function(ad,ae){var ad,ae;ad=ad;return EI((ad.flag&32)>>>0,$flatten64(ad.Int()),ae);};ES=function(ad,ae){var ad,ae;ad=ad;return EI((ad.flag&32)>>>0,$flatten64(ad.Uint()),ae);};ET=function(ad,ae){var ad,ae;ad=ad;return EI((ad.flag&32)>>>0,ad.Float(),ae);};EU=function(ad,ae){var ad,ae;ad=ad;return EJ((ad.flag&32)>>>0,ad.Complex(),ae);};EV=function(ad,ae){var ad,ae;ad=ad;return EK((ad.flag&32)>>>0,$encodeRune(ad.Int().$low),ae);};EW=function(ad,ae){var ad,ae;ad=ad;return EK((ad.flag&32)>>>0,$encodeRune(ad.Uint().$low),ae);};EX=function(ad,ae){var ad,ae;ad=ad;return EK((ad.flag&32)>>>0,$bytesToString(ad.Bytes()),ae);};EY=function(ad,ae){var ad,ae;ad=ad;return EL((ad.flag&32)>>>0,new GY($stringToBytes(ad.String())),ae);};EZ=function(ad,ae){var ad,ae;ad=ad;return EK((ad.flag&32)>>>0,$runesToString(ad.runes()),ae);};FA=function(ad,ae){var ad,ae;ad=ad;return EM((ad.flag&32)>>>0,new GZ($stringToRunes(ad.String())),ae);};FB=function(ad,ae){var ad,ae,af,ag;ad=ad;af=X(ae.common());ag=AP(ad,false);if(ae.NumMethod()===0){af.$set(ag);}else{AQ($assertType(ae,FL),ag,af);}return new CZ.ptr(ae.common(),af,(((((ad.flag&32)>>>0)|64)>>>0)|20)>>>0);};FC=function(ad,ae){var ad,ae,af;ad=ad;if(ad.IsNil()){af=W(ae);af.flag=(af.flag|(((ad.flag&32)>>>0)))>>>0;return af;}return FB(ad.Elem(),ae);};BG.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];FL.methods=[{prop:"ptrTo",name:"ptrTo",pkg:"reflect",typ:$funcType([],[FL],false)},{prop:"pointers",name:"pointers",pkg:"reflect",typ:$funcType([],[$Bool],false)},{prop:"Comparable",name:"Comparable",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Size",name:"Size",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"Bits",name:"Bits",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Align",name:"Align",pkg:"",typ:$funcType([],[$Int],false)},{prop:"FieldAlign",name:"FieldAlign",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Kind",name:"Kind",pkg:"",typ:$funcType([],[BG],false)},{prop:"common",name:"common",pkg:"reflect",typ:$funcType([],[FL],false)},{prop:"NumMethod",name:"NumMethod",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Method",name:"Method",pkg:"",typ:$funcType([$Int],[BW],false)},{prop:"MethodByName",name:"MethodByName",pkg:"",typ:$funcType([$String],[BW,$Bool],false)},{prop:"PkgPath",name:"PkgPath",pkg:"",typ:$funcType([],[$String],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"ChanDir",name:"ChanDir",pkg:"",typ:$funcType([],[BL],false)},{prop:"IsVariadic",name:"IsVariadic",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Elem",name:"Elem",pkg:"",typ:$funcType([],[BF],false)},{prop:"Field",name:"Field",pkg:"",typ:$funcType([$Int],[BY],false)},{prop:"FieldByIndex",name:"FieldByIndex",pkg:"",typ:$funcType([GP],[BY],false)},{prop:"FieldByName",name:"FieldByName",pkg:"",typ:$funcType([$String],[BY,$Bool],false)},{prop:"FieldByNameFunc",name:"FieldByNameFunc",pkg:"",typ:$funcType([HC],[BY,$Bool],false)},{prop:"In",name:"In",pkg:"",typ:$funcType([$Int],[BF],false)},{prop:"Key",name:"Key",pkg:"",typ:$funcType([],[BF],false)},{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumField",name:"NumField",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumIn",name:"NumIn",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumOut",name:"NumOut",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Out",name:"Out",pkg:"",typ:$funcType([$Int],[BF],false)},{prop:"Implements",name:"Implements",pkg:"",typ:$funcType([BF],[$Bool],false)},{prop:"AssignableTo",name:"AssignableTo",pkg:"",typ:$funcType([BF],[$Bool],false)},{prop:"ConvertibleTo",name:"ConvertibleTo",pkg:"",typ:$funcType([BF],[$Bool],false)}];FY.methods=[{prop:"Method",name:"Method",pkg:"",typ:$funcType([$Int],[BW],false)},{prop:"uncommon",name:"uncommon",pkg:"reflect",typ:$funcType([],[FY],false)},{prop:"PkgPath",name:"PkgPath",pkg:"",typ:$funcType([],[$String],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"NumMethod",name:"NumMethod",pkg:"",typ:$funcType([],[$Int],false)},{prop:"MethodByName",name:"MethodByName",pkg:"",typ:$funcType([$String],[BW,$Bool],false)}];BL.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];GN.methods=[{prop:"Method",name:"Method",pkg:"",typ:$funcType([$Int],[BW],false)},{prop:"NumMethod",name:"NumMethod",pkg:"",typ:$funcType([],[$Int],false)},{prop:"MethodByName",name:"MethodByName",pkg:"",typ:$funcType([$String],[BW,$Bool],false)}];GR.methods=[{prop:"Field",name:"Field",pkg:"",typ:$funcType([$Int],[BY],false)},{prop:"FieldByIndex",name:"FieldByIndex",pkg:"",typ:$funcType([GP],[BY],false)},{prop:"FieldByNameFunc",name:"FieldByNameFunc",pkg:"",typ:$funcType([HC],[BY,$Bool],false)},{prop:"FieldByName",name:"FieldByName",pkg:"",typ:$funcType([$String],[BY,$Bool],false)}];BZ.methods=[{prop:"Get",name:"Get",pkg:"",typ:$funcType([$String],[$String],false)}];CZ.methods=[{prop:"object",name:"object",pkg:"reflect",typ:$funcType([],[B.Object],false)},{prop:"call",name:"call",pkg:"reflect",typ:$funcType([$String,GE],[GE],false)},{prop:"Cap",name:"Cap",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Elem",name:"Elem",pkg:"",typ:$funcType([],[CZ],false)},{prop:"Field",name:"Field",pkg:"",typ:$funcType([$Int],[CZ],false)},{prop:"Index",name:"Index",pkg:"",typ:$funcType([$Int],[CZ],false)},{prop:"IsNil",name:"IsNil",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Pointer",name:"Pointer",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"Set",name:"Set",pkg:"",typ:$funcType([CZ],[],false)},{prop:"SetCap",name:"SetCap",pkg:"",typ:$funcType([$Int],[],false)},{prop:"SetLen",name:"SetLen",pkg:"",typ:$funcType([$Int],[],false)},{prop:"Slice",name:"Slice",pkg:"",typ:$funcType([$Int,$Int],[CZ],false)},{prop:"Slice3",name:"Slice3",pkg:"",typ:$funcType([$Int,$Int,$Int],[CZ],false)},{prop:"Close",name:"Close",pkg:"",typ:$funcType([],[],false)},{prop:"TrySend",name:"TrySend",pkg:"",typ:$funcType([CZ],[$Bool],false)},{prop:"Send",name:"Send",pkg:"",typ:$funcType([CZ],[],false)},{prop:"TryRecv",name:"TryRecv",pkg:"",typ:$funcType([],[CZ,$Bool],false)},{prop:"Recv",name:"Recv",pkg:"",typ:$funcType([],[CZ,$Bool],false)},{prop:"pointer",name:"pointer",pkg:"reflect",typ:$funcType([],[$UnsafePointer],false)},{prop:"Addr",name:"Addr",pkg:"",typ:$funcType([],[CZ],false)},{prop:"Bool",name:"Bool",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Bytes",name:"Bytes",pkg:"",typ:$funcType([],[GY],false)},{prop:"runes",name:"runes",pkg:"reflect",typ:$funcType([],[GZ],false)},{prop:"CanAddr",name:"CanAddr",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"CanSet",name:"CanSet",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Call",name:"Call",pkg:"",typ:$funcType([GE],[GE],false)},{prop:"CallSlice",name:"CallSlice",pkg:"",typ:$funcType([GE],[GE],false)},{prop:"Complex",name:"Complex",pkg:"",typ:$funcType([],[$Complex128],false)},{prop:"FieldByIndex",name:"FieldByIndex",pkg:"",typ:$funcType([GP],[CZ],false)},{prop:"FieldByName",name:"FieldByName",pkg:"",typ:$funcType([$String],[CZ],false)},{prop:"FieldByNameFunc",name:"FieldByNameFunc",pkg:"",typ:$funcType([HC],[CZ],false)},{prop:"Float",name:"Float",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Int",name:"Int",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"CanInterface",name:"CanInterface",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Interface",name:"Interface",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"InterfaceData",name:"InterfaceData",pkg:"",typ:$funcType([],[HG],false)},{prop:"IsValid",name:"IsValid",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Kind",name:"Kind",pkg:"",typ:$funcType([],[BG],false)},{prop:"MapIndex",name:"MapIndex",pkg:"",typ:$funcType([CZ],[CZ],false)},{prop:"MapKeys",name:"MapKeys",pkg:"",typ:$funcType([],[GE],false)},{prop:"Method",name:"Method",pkg:"",typ:$funcType([$Int],[CZ],false)},{prop:"NumMethod",name:"NumMethod",pkg:"",typ:$funcType([],[$Int],false)},{prop:"MethodByName",name:"MethodByName",pkg:"",typ:$funcType([$String],[CZ],false)},{prop:"NumField",name:"NumField",pkg:"",typ:$funcType([],[$Int],false)},{prop:"OverflowComplex",name:"OverflowComplex",pkg:"",typ:$funcType([$Complex128],[$Bool],false)},{prop:"OverflowFloat",name:"OverflowFloat",pkg:"",typ:$funcType([$Float64],[$Bool],false)},{prop:"OverflowInt",name:"OverflowInt",pkg:"",typ:$funcType([$Int64],[$Bool],false)},{prop:"OverflowUint",name:"OverflowUint",pkg:"",typ:$funcType([$Uint64],[$Bool],false)},{prop:"recv",name:"recv",pkg:"reflect",typ:$funcType([$Bool],[CZ,$Bool],false)},{prop:"send",name:"send",pkg:"reflect",typ:$funcType([CZ,$Bool],[$Bool],false)},{prop:"SetBool",name:"SetBool",pkg:"",typ:$funcType([$Bool],[],false)},{prop:"SetBytes",name:"SetBytes",pkg:"",typ:$funcType([GY],[],false)},{prop:"setRunes",name:"setRunes",pkg:"reflect",typ:$funcType([GZ],[],false)},{prop:"SetComplex",name:"SetComplex",pkg:"",typ:$funcType([$Complex128],[],false)},{prop:"SetFloat",name:"SetFloat",pkg:"",typ:$funcType([$Float64],[],false)},{prop:"SetInt",name:"SetInt",pkg:"",typ:$funcType([$Int64],[],false)},{prop:"SetMapIndex",name:"SetMapIndex",pkg:"",typ:$funcType([CZ,CZ],[],false)},{prop:"SetUint",name:"SetUint",pkg:"",typ:$funcType([$Uint64],[],false)},{prop:"SetPointer",name:"SetPointer",pkg:"",typ:$funcType([$UnsafePointer],[],false)},{prop:"SetString",name:"SetString",pkg:"",typ:$funcType([$String],[],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Type",name:"Type",pkg:"",typ:$funcType([],[BF],false)},{prop:"Uint",name:"Uint",pkg:"",typ:$funcType([],[$Uint64],false)},{prop:"UnsafeAddr",name:"UnsafeAddr",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"assignTo",name:"assignTo",pkg:"reflect",typ:$funcType([$String,FL,$UnsafePointer],[CZ],false)},{prop:"Convert",name:"Convert",pkg:"",typ:$funcType([BF],[CZ],false)}];DA.methods=[{prop:"kind",name:"kind",pkg:"reflect",typ:$funcType([],[BG],false)},{prop:"mustBe",name:"mustBe",pkg:"reflect",typ:$funcType([BG],[],false)},{prop:"mustBeExported",name:"mustBeExported",pkg:"reflect",typ:$funcType([],[],false)},{prop:"mustBeAssignable",name:"mustBeAssignable",pkg:"reflect",typ:$funcType([],[],false)}];HH.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];AH.init([{prop:"t",name:"t",pkg:"reflect",typ:BF,tag:""},{prop:"m",name:"m",pkg:"reflect",typ:B.Object,tag:""},{prop:"keys",name:"keys",pkg:"reflect",typ:B.Object,tag:""},{prop:"i",name:"i",pkg:"reflect",typ:$Int,tag:""}]);BF.init([{prop:"Align",name:"Align",pkg:"",typ:$funcType([],[$Int],false)},{prop:"AssignableTo",name:"AssignableTo",pkg:"",typ:$funcType([BF],[$Bool],false)},{prop:"Bits",name:"Bits",pkg:"",typ:$funcType([],[$Int],false)},{prop:"ChanDir",name:"ChanDir",pkg:"",typ:$funcType([],[BL],false)},{prop:"Comparable",name:"Comparable",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"ConvertibleTo",name:"ConvertibleTo",pkg:"",typ:$funcType([BF],[$Bool],false)},{prop:"Elem",name:"Elem",pkg:"",typ:$funcType([],[BF],false)},{prop:"Field",name:"Field",pkg:"",typ:$funcType([$Int],[BY],false)},{prop:"FieldAlign",name:"FieldAlign",pkg:"",typ:$funcType([],[$Int],false)},{prop:"FieldByIndex",name:"FieldByIndex",pkg:"",typ:$funcType([GP],[BY],false)},{prop:"FieldByName",name:"FieldByName",pkg:"",typ:$funcType([$String],[BY,$Bool],false)},{prop:"FieldByNameFunc",name:"FieldByNameFunc",pkg:"",typ:$funcType([HC],[BY,$Bool],false)},{prop:"Implements",name:"Implements",pkg:"",typ:$funcType([BF],[$Bool],false)},{prop:"In",name:"In",pkg:"",typ:$funcType([$Int],[BF],false)},{prop:"IsVariadic",name:"IsVariadic",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Key",name:"Key",pkg:"",typ:$funcType([],[BF],false)},{prop:"Kind",name:"Kind",pkg:"",typ:$funcType([],[BG],false)},{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Method",name:"Method",pkg:"",typ:$funcType([$Int],[BW],false)},{prop:"MethodByName",name:"MethodByName",pkg:"",typ:$funcType([$String],[BW,$Bool],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"NumField",name:"NumField",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumIn",name:"NumIn",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumMethod",name:"NumMethod",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumOut",name:"NumOut",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Out",name:"Out",pkg:"",typ:$funcType([$Int],[BF],false)},{prop:"PkgPath",name:"PkgPath",pkg:"",typ:$funcType([],[$String],false)},{prop:"Size",name:"Size",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"common",name:"common",pkg:"reflect",typ:$funcType([],[FL],false)},{prop:"uncommon",name:"uncommon",pkg:"reflect",typ:$funcType([],[FY],false)}]);BH.init([{prop:"size",name:"size",pkg:"reflect",typ:$Uintptr,tag:""},{prop:"hash",name:"hash",pkg:"reflect",typ:$Uint32,tag:""},{prop:"_$2",name:"_",pkg:"reflect",typ:$Uint8,tag:""},{prop:"align",name:"align",pkg:"reflect",typ:$Uint8,tag:""},{prop:"fieldAlign",name:"fieldAlign",pkg:"reflect",typ:$Uint8,tag:""},{prop:"kind",name:"kind",pkg:"reflect",typ:$Uint8,tag:""},{prop:"alg",name:"alg",pkg:"reflect",typ:FV,tag:""},{prop:"gc",name:"gc",pkg:"reflect",typ:FW,tag:""},{prop:"string",name:"string",pkg:"reflect",typ:FX,tag:""},{prop:"uncommonType",name:"",pkg:"reflect",typ:FY,tag:""},{prop:"ptrToThis",name:"ptrToThis",pkg:"reflect",typ:FL,tag:""},{prop:"zero",name:"zero",pkg:"reflect",typ:$UnsafePointer,tag:""}]);BI.init([{prop:"hash",name:"hash",pkg:"reflect",typ:HD,tag:""},{prop:"equal",name:"equal",pkg:"reflect",typ:HE,tag:""}]);BJ.init([{prop:"name",name:"name",pkg:"reflect",typ:FX,tag:""},{prop:"pkgPath",name:"pkgPath",pkg:"reflect",typ:FX,tag:""},{prop:"mtyp",name:"mtyp",pkg:"reflect",typ:FL,tag:""},{prop:"typ",name:"typ",pkg:"reflect",typ:FL,tag:""},{prop:"ifn",name:"ifn",pkg:"reflect",typ:$UnsafePointer,tag:""},{prop:"tfn",name:"tfn",pkg:"reflect",typ:$UnsafePointer,tag:""}]);BK.init([{prop:"name",name:"name",pkg:"reflect",typ:FX,tag:""},{prop:"pkgPath",name:"pkgPath",pkg:"reflect",typ:FX,tag:""},{prop:"methods",name:"methods",pkg:"reflect",typ:FZ,tag:""}]);BM.init([{prop:"rtype",name:"",pkg:"reflect",typ:BH,tag:"reflect:\"array\""},{prop:"elem",name:"elem",pkg:"reflect",typ:FL,tag:""},{prop:"slice",name:"slice",pkg:"reflect",typ:FL,tag:""},{prop:"len",name:"len",pkg:"reflect",typ:$Uintptr,tag:""}]);BN.init([{prop:"rtype",name:"",pkg:"reflect",typ:BH,tag:"reflect:\"chan\""},{prop:"elem",name:"elem",pkg:"reflect",typ:FL,tag:""},{prop:"dir",name:"dir",pkg:"reflect",typ:$Uintptr,tag:""}]);BO.init([{prop:"rtype",name:"",pkg:"reflect",typ:BH,tag:"reflect:\"func\""},{prop:"dotdotdot",name:"dotdotdot",pkg:"reflect",typ:$Bool,tag:""},{prop:"in$2",name:"in",pkg:"reflect",typ:GA,tag:""},{prop:"out",name:"out",pkg:"reflect",typ:GA,tag:""}]);BP.init([{prop:"name",name:"name",pkg:"reflect",typ:FX,tag:""},{prop:"pkgPath",name:"pkgPath",pkg:"reflect",typ:FX,tag:""},{prop:"typ",name:"typ",pkg:"reflect",typ:FL,tag:""}]);BQ.init([{prop:"rtype",name:"",pkg:"reflect",typ:BH,tag:"reflect:\"interface\""},{prop:"methods",name:"methods",pkg:"reflect",typ:GB,tag:""}]);BR.init([{prop:"rtype",name:"",pkg:"reflect",typ:BH,tag:"reflect:\"map\""},{prop:"key",name:"key",pkg:"reflect",typ:FL,tag:""},{prop:"elem",name:"elem",pkg:"reflect",typ:FL,tag:""},{prop:"bucket",name:"bucket",pkg:"reflect",typ:FL,tag:""},{prop:"hmap",name:"hmap",pkg:"reflect",typ:FL,tag:""},{prop:"keysize",name:"keysize",pkg:"reflect",typ:$Uint8,tag:""},{prop:"indirectkey",name:"indirectkey",pkg:"reflect",typ:$Uint8,tag:""},{prop:"valuesize",name:"valuesize",pkg:"reflect",typ:$Uint8,tag:""},{prop:"indirectvalue",name:"indirectvalue",pkg:"reflect",typ:$Uint8,tag:""},{prop:"bucketsize",name:"bucketsize",pkg:"reflect",typ:$Uint16,tag:""}]);BS.init([{prop:"rtype",name:"",pkg:"reflect",typ:BH,tag:"reflect:\"ptr\""},{prop:"elem",name:"elem",pkg:"reflect",typ:FL,tag:""}]);BT.init([{prop:"rtype",name:"",pkg:"reflect",typ:BH,tag:"reflect:\"slice\""},{prop:"elem",name:"elem",pkg:"reflect",typ:FL,tag:""}]);BU.init([{prop:"name",name:"name",pkg:"reflect",typ:FX,tag:""},{prop:"pkgPath",name:"pkgPath",pkg:"reflect",typ:FX,tag:""},{prop:"typ",name:"typ",pkg:"reflect",typ:FL,tag:""},{prop:"tag",name:"tag",pkg:"reflect",typ:FX,tag:""},{prop:"offset",name:"offset",pkg:"reflect",typ:$Uintptr,tag:""}]);BV.init([{prop:"rtype",name:"",pkg:"reflect",typ:BH,tag:"reflect:\"struct\""},{prop:"fields",name:"fields",pkg:"reflect",typ:GC,tag:""}]);BW.init([{prop:"Name",name:"Name",pkg:"",typ:$String,tag:""},{prop:"PkgPath",name:"PkgPath",pkg:"",typ:$String,tag:""},{prop:"Type",name:"Type",pkg:"",typ:BF,tag:""},{prop:"Func",name:"Func",pkg:"",typ:CZ,tag:""},{prop:"Index",name:"Index",pkg:"",typ:$Int,tag:""}]);BY.init([{prop:"Name",name:"Name",pkg:"",typ:$String,tag:""},{prop:"PkgPath",name:"PkgPath",pkg:"",typ:$String,tag:""},{prop:"Type",name:"Type",pkg:"",typ:BF,tag:""},{prop:"Tag",name:"Tag",pkg:"",typ:BZ,tag:""},{prop:"Offset",name:"Offset",pkg:"",typ:$Uintptr,tag:""},{prop:"Index",name:"Index",pkg:"",typ:GP,tag:""},{prop:"Anonymous",name:"Anonymous",pkg:"",typ:$Bool,tag:""}]);CA.init([{prop:"typ",name:"typ",pkg:"reflect",typ:GR,tag:""},{prop:"index",name:"index",pkg:"reflect",typ:GP,tag:""}]);CZ.init([{prop:"typ",name:"typ",pkg:"reflect",typ:FL,tag:""},{prop:"ptr",name:"ptr",pkg:"reflect",typ:$UnsafePointer,tag:""},{prop:"flag",name:"",pkg:"reflect",typ:DA,tag:""}]);DD.init([{prop:"Method",name:"Method",pkg:"",typ:$String,tag:""},{prop:"Kind",name:"Kind",pkg:"",typ:BG,tag:""}]);DF.init([{prop:"itab",name:"itab",pkg:"reflect",typ:GI,tag:""},{prop:"word",name:"word",pkg:"reflect",typ:$UnsafePointer,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_reflect=function(){while(true){switch($s){case 0:$r=B.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}F=false;K=new $Map();AT=$js.Object;AU=$js.container.ptr;BX=new FU(["invalid","bool","int","int8","int16","int32","int64","uint","uint8","uint16","uint32","uint64","uintptr","float32","float64","complex64","complex128","array","chan","func","interface","map","ptr","slice","string","struct","unsafe.Pointer"]);DM=$assertType(Q(new $Uint8(0)),FL);G();}return;}};$init_reflect.$blocking=true;return $init_reflect;};return $pkg;})(); +$packages["fmt"]=(function(){var $pkg={},D,E,A,F,G,B,H,C,L,M,AF,AG,AH,AI,AJ,AK,BE,BR,BS,BT,CE,CF,CG,CH,CI,CJ,CK,CN,CO,DI,DJ,DK,I,J,N,O,Q,R,S,T,U,V,Y,AA,AB,AL,AZ,BA,BB,BU,BY,CA,CB,K,P,AM,AU,AV,AX,BV,BW,CC;D=$packages["errors"];E=$packages["io"];A=$packages["math"];F=$packages["os"];G=$packages["reflect"];B=$packages["strconv"];H=$packages["sync"];C=$packages["unicode/utf8"];L=$pkg.fmtFlags=$newType(0,$kindStruct,"fmt.fmtFlags","fmtFlags","fmt",function(widPresent_,precPresent_,minus_,plus_,sharp_,space_,unicode_,uniQuote_,zero_,plusV_,sharpV_){this.$val=this;this.widPresent=widPresent_!==undefined?widPresent_:false;this.precPresent=precPresent_!==undefined?precPresent_:false;this.minus=minus_!==undefined?minus_:false;this.plus=plus_!==undefined?plus_:false;this.sharp=sharp_!==undefined?sharp_:false;this.space=space_!==undefined?space_:false;this.unicode=unicode_!==undefined?unicode_:false;this.uniQuote=uniQuote_!==undefined?uniQuote_:false;this.zero=zero_!==undefined?zero_:false;this.plusV=plusV_!==undefined?plusV_:false;this.sharpV=sharpV_!==undefined?sharpV_:false;});M=$pkg.fmt=$newType(0,$kindStruct,"fmt.fmt","fmt","fmt",function(intbuf_,buf_,wid_,prec_,fmtFlags_){this.$val=this;this.intbuf=intbuf_!==undefined?intbuf_:DI.zero();this.buf=buf_!==undefined?buf_:CJ.nil;this.wid=wid_!==undefined?wid_:0;this.prec=prec_!==undefined?prec_:0;this.fmtFlags=fmtFlags_!==undefined?fmtFlags_:new L.ptr();});AF=$pkg.State=$newType(8,$kindInterface,"fmt.State","State","fmt",null);AG=$pkg.Formatter=$newType(8,$kindInterface,"fmt.Formatter","Formatter","fmt",null);AH=$pkg.Stringer=$newType(8,$kindInterface,"fmt.Stringer","Stringer","fmt",null);AI=$pkg.GoStringer=$newType(8,$kindInterface,"fmt.GoStringer","GoStringer","fmt",null);AJ=$pkg.buffer=$newType(12,$kindSlice,"fmt.buffer","buffer","fmt",null);AK=$pkg.pp=$newType(0,$kindStruct,"fmt.pp","pp","fmt",function(n_,panicking_,erroring_,buf_,arg_,value_,reordered_,goodArgNum_,runeBuf_,fmt_){this.$val=this;this.n=n_!==undefined?n_:0;this.panicking=panicking_!==undefined?panicking_:false;this.erroring=erroring_!==undefined?erroring_:false;this.buf=buf_!==undefined?buf_:AJ.nil;this.arg=arg_!==undefined?arg_:$ifaceNil;this.value=value_!==undefined?value_:new G.Value.ptr();this.reordered=reordered_!==undefined?reordered_:false;this.goodArgNum=goodArgNum_!==undefined?goodArgNum_:false;this.runeBuf=runeBuf_!==undefined?runeBuf_:CO.zero();this.fmt=fmt_!==undefined?fmt_:new M.ptr();});BE=$pkg.runeUnreader=$newType(8,$kindInterface,"fmt.runeUnreader","runeUnreader","fmt",null);BR=$pkg.scanError=$newType(0,$kindStruct,"fmt.scanError","scanError","fmt",function(err_){this.$val=this;this.err=err_!==undefined?err_:$ifaceNil;});BS=$pkg.ss=$newType(0,$kindStruct,"fmt.ss","ss","fmt",function(rr_,buf_,peekRune_,prevRune_,count_,atEOF_,ssave_){this.$val=this;this.rr=rr_!==undefined?rr_:$ifaceNil;this.buf=buf_!==undefined?buf_:AJ.nil;this.peekRune=peekRune_!==undefined?peekRune_:0;this.prevRune=prevRune_!==undefined?prevRune_:0;this.count=count_!==undefined?count_:0;this.atEOF=atEOF_!==undefined?atEOF_:false;this.ssave=ssave_!==undefined?ssave_:new BT.ptr();});BT=$pkg.ssave=$newType(0,$kindStruct,"fmt.ssave","ssave","fmt",function(validSave_,nlIsEnd_,nlIsSpace_,argLimit_,limit_,maxWid_){this.$val=this;this.validSave=validSave_!==undefined?validSave_:false;this.nlIsEnd=nlIsEnd_!==undefined?nlIsEnd_:false;this.nlIsSpace=nlIsSpace_!==undefined?nlIsSpace_:false;this.argLimit=argLimit_!==undefined?argLimit_:0;this.limit=limit_!==undefined?limit_:0;this.maxWid=maxWid_!==undefined?maxWid_:0;});CE=$sliceType($Uint8);CF=$sliceType($emptyInterface);CG=$arrayType($Uint16,2);CH=$sliceType(CG);CI=$ptrType(AK);CJ=$ptrType(AJ);CK=$ptrType(G.rtype);CN=$ptrType(BS);CO=$arrayType($Uint8,4);DI=$arrayType($Uint8,65);DJ=$ptrType(M);DK=$funcType([$Int32],[$Bool],false);K=function(){var a;a=0;while(true){if(!(a<65)){break;}(a<0||a>=I.$length)?$throwRuntimeError("index out of range"):I.$array[I.$offset+a]=48;(a<0||a>=J.$length)?$throwRuntimeError("index out of range"):J.$array[J.$offset+a]=32;a=a+(1)>>0;}};M.ptr.prototype.clearflags=function(){var a;a=this;$copy(a.fmtFlags,new L.ptr(false,false,false,false,false,false,false,false,false,false,false),L);};M.prototype.clearflags=function(){return this.$val.clearflags();};M.ptr.prototype.init=function(a){var a,b;b=this;b.buf=a;b.clearflags();};M.prototype.init=function(a){return this.$val.init(a);};M.ptr.prototype.computePadding=function(a){var a,b=CE.nil,c=0,d=0,e,f,g,h,i,j,k,l,m,n,o,p;e=this;f=!e.fmtFlags.minus;g=e.wid;if(g<0){f=false;g=-g;}g=g-(a)>>0;if(g>0){if(f&&e.fmtFlags.zero){h=I;i=g;j=0;b=h;c=i;d=j;return[b,c,d];}if(f){k=J;l=g;m=0;b=k;c=l;d=m;return[b,c,d];}else{n=J;o=0;p=g;b=n;c=o;d=p;return[b,c,d];}}return[b,c,d];};M.prototype.computePadding=function(a){return this.$val.computePadding(a);};M.ptr.prototype.writePadding=function(a,b){var a,b,c,d;c=this;while(true){if(!(a>0)){break;}d=a;if(d>65){d=65;}c.buf.Write($subslice(b,0,d));a=a-(d)>>0;}};M.prototype.writePadding=function(a,b){return this.$val.writePadding(a,b);};M.ptr.prototype.pad=function(a){var a,b,c,d,e,f;b=this;if(!b.fmtFlags.widPresent||(b.wid===0)){b.buf.Write(a);return;}c=b.computePadding(C.RuneCount(a));d=c[0];e=c[1];f=c[2];if(e>0){b.writePadding(e,d);}b.buf.Write(a);if(f>0){b.writePadding(f,d);}};M.prototype.pad=function(a){return this.$val.pad(a);};M.ptr.prototype.padString=function(a){var a,b,c,d,e,f;b=this;if(!b.fmtFlags.widPresent||(b.wid===0)){b.buf.WriteString(a);return;}c=b.computePadding(C.RuneCountInString(a));d=c[0];e=c[1];f=c[2];if(e>0){b.writePadding(e,d);}b.buf.WriteString(a);if(f>0){b.writePadding(f,d);}};M.prototype.padString=function(a){return this.$val.padString(a);};M.ptr.prototype.fmt_boolean=function(a){var a,b;b=this;if(a){b.pad(N);}else{b.pad(O);}};M.prototype.fmt_boolean=function(a){return this.$val.fmt_boolean(a);};M.ptr.prototype.integer=function(a,b,c,d){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;e=this;if(e.fmtFlags.precPresent&&(e.prec===0)&&(a.$high===0&&a.$low===0)){return;}f=$subslice(new CE(e.intbuf),0);if(e.fmtFlags.widPresent){g=e.wid;if((b.$high===0&&b.$low===16)&&e.fmtFlags.sharp){g=g+(2)>>0;}if(g>65){f=$makeSlice(CE,g);}}h=c===true&&(a.$high<0||(a.$high===0&&a.$low<0));if(h){a=new $Int64(-a.$high,-a.$low);}i=0;if(e.fmtFlags.precPresent){i=e.prec;e.fmtFlags.zero=false;}else if(e.fmtFlags.zero&&e.fmtFlags.widPresent&&!e.fmtFlags.minus&&e.wid>0){i=e.wid;if(h||e.fmtFlags.plus||e.fmtFlags.space){i=i-(1)>>0;}}j=f.$length;k=new $Uint64(a.$high,a.$low);l=b;if((l.$high===0&&l.$low===10)){while(true){if(!((k.$high>0||(k.$high===0&&k.$low>=10)))){break;}j=j-(1)>>0;m=$div64(k,new $Uint64(0,10),false);(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=((n=new $Uint64(0+k.$high,48+k.$low),o=$mul64(m,new $Uint64(0,10)),new $Uint64(n.$high-o.$high,n.$low-o.$low)).$low<<24>>>24);k=m;}}else if((l.$high===0&&l.$low===16)){while(true){if(!((k.$high>0||(k.$high===0&&k.$low>=16)))){break;}j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=d.charCodeAt($flatten64(new $Uint64(k.$high&0,(k.$low&15)>>>0)));k=$shiftRightUint64(k,(4));}}else if((l.$high===0&&l.$low===8)){while(true){if(!((k.$high>0||(k.$high===0&&k.$low>=8)))){break;}j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=((p=new $Uint64(k.$high&0,(k.$low&7)>>>0),new $Uint64(0+p.$high,48+p.$low)).$low<<24>>>24);k=$shiftRightUint64(k,(3));}}else if((l.$high===0&&l.$low===2)){while(true){if(!((k.$high>0||(k.$high===0&&k.$low>=2)))){break;}j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=((q=new $Uint64(k.$high&0,(k.$low&1)>>>0),new $Uint64(0+q.$high,48+q.$low)).$low<<24>>>24);k=$shiftRightUint64(k,(1));}}else{$panic(new $String("fmt: unknown base; can't happen"));}j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=d.charCodeAt($flatten64(k));while(true){if(!(j>0&&i>(f.$length-j>>0))){break;}j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=48;}if(e.fmtFlags.sharp){r=b;if((r.$high===0&&r.$low===8)){if(!((((j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j])===48))){j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=48;}}else if((r.$high===0&&r.$low===16)){j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=(120+d.charCodeAt(10)<<24>>>24)-97<<24>>>24;j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=48;}}if(e.fmtFlags.unicode){j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=43;j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=85;}if(h){j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=45;}else if(e.fmtFlags.plus){j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=43;}else if(e.fmtFlags.space){j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=32;}if(e.fmtFlags.unicode&&e.fmtFlags.uniQuote&&(a.$high>0||(a.$high===0&&a.$low>=0))&&(a.$high<0||(a.$high===0&&a.$low<=1114111))&&B.IsPrint(((a.$low+((a.$high>>31)*4294967296))>>0))){s=C.RuneLen(((a.$low+((a.$high>>31)*4294967296))>>0));t=(2+s>>0)+1>>0;$copySlice($subslice(f,(j-t>>0)),$subslice(f,j));j=j-(t)>>0;u=f.$length-t>>0;(u<0||u>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+u]=32;u=u+(1)>>0;(u<0||u>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+u]=39;u=u+(1)>>0;C.EncodeRune($subslice(f,u),((a.$low+((a.$high>>31)*4294967296))>>0));u=u+(s)>>0;(u<0||u>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+u]=39;}e.pad($subslice(f,j));};M.prototype.integer=function(a,b,c,d){return this.$val.integer(a,b,c,d);};M.ptr.prototype.truncate=function(a){var a,b,c,d,e,f,g;b=this;if(b.fmtFlags.precPresent&&b.prec>0;e+=f[1];}}return a;};M.prototype.truncate=function(a){return this.$val.truncate(a);};M.ptr.prototype.fmt_s=function(a){var a,b;b=this;a=b.truncate(a);b.padString(a);};M.prototype.fmt_s=function(a){return this.$val.fmt_s(a);};M.ptr.prototype.fmt_sbx=function(a,b,c){var a,b,c,d,e,f,g,h,i;d=this;e=b.$length;if(b===CE.nil){e=a.length;}f=(c.charCodeAt(10)-97<<24>>>24)+120<<24>>>24;g=CE.nil;h=0;while(true){if(!(h0&&d.fmtFlags.space){g=$append(g,32);}if(d.fmtFlags.sharp&&(d.fmtFlags.space||(h===0))){g=$append(g,48,f);}i=0;if(b===CE.nil){i=a.charCodeAt(h);}else{i=((h<0||h>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+h]);}g=$append(g,c.charCodeAt((i>>>4<<24>>>24)),c.charCodeAt(((i&15)>>>0)));h=h+(1)>>0;}d.pad(g);};M.prototype.fmt_sbx=function(a,b,c){return this.$val.fmt_sbx(a,b,c);};M.ptr.prototype.fmt_sx=function(a,b){var a,b,c;c=this;if(c.fmtFlags.precPresent&&c.prec>31)*4294967296))>>0));}else{c=B.AppendQuoteRune($subslice(new CE(b.intbuf),0,0),((a.$low+((a.$high>>31)*4294967296))>>0));}b.pad(c);};M.prototype.fmt_qc=function(a){return this.$val.fmt_qc(a);};P=function(a,b){var a,b;if(a.fmtFlags.precPresent){return a.prec;}return b;};M.ptr.prototype.formatFloat=function(a,b,c,d){var $deferred=[],$err=null,a,b,c,d,e,f;try{$deferFrames.push($deferred);e=this;f=B.AppendFloat($subslice(new CE(e.intbuf),0,1),a,b,c,d);if((((1<0||1>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+1])===45)||(((1<0||1>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+1])===43)){f=$subslice(f,1);}else{(0<0||0>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+0]=43;}if(A.IsInf(a,0)){if(e.fmtFlags.zero){$deferred.push([(function(){e.fmtFlags.zero=true;}),[]]);e.fmtFlags.zero=false;}}if(e.fmtFlags.zero&&e.fmtFlags.widPresent&&e.wid>f.$length){if(e.fmtFlags.space&&a>=0){e.buf.WriteByte(32);e.wid=e.wid-(1)>>0;}else if(e.fmtFlags.plus||a<0){e.buf.WriteByte(((0<0||0>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+0]));e.wid=e.wid-(1)>>0;}e.pad($subslice(f,1));return;}if(e.fmtFlags.space&&(((0<0||0>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+0])===43)){(0<0||0>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+0]=32;e.pad(f);return;}if(e.fmtFlags.plus||(((0<0||0>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+0])===45)||A.IsInf(a,0)){e.pad(f);return;}e.pad($subslice(f,1));}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};M.prototype.formatFloat=function(a,b,c,d){return this.$val.formatFloat(a,b,c,d);};M.ptr.prototype.fmt_e64=function(a){var a,b;b=this;b.formatFloat(a,101,P(b,6),64);};M.prototype.fmt_e64=function(a){return this.$val.fmt_e64(a);};M.ptr.prototype.fmt_E64=function(a){var a,b;b=this;b.formatFloat(a,69,P(b,6),64);};M.prototype.fmt_E64=function(a){return this.$val.fmt_E64(a);};M.ptr.prototype.fmt_f64=function(a){var a,b;b=this;b.formatFloat(a,102,P(b,6),64);};M.prototype.fmt_f64=function(a){return this.$val.fmt_f64(a);};M.ptr.prototype.fmt_g64=function(a){var a,b;b=this;b.formatFloat(a,103,P(b,-1),64);};M.prototype.fmt_g64=function(a){return this.$val.fmt_g64(a);};M.ptr.prototype.fmt_G64=function(a){var a,b;b=this;b.formatFloat(a,71,P(b,-1),64);};M.prototype.fmt_G64=function(a){return this.$val.fmt_G64(a);};M.ptr.prototype.fmt_fb64=function(a){var a,b;b=this;b.formatFloat(a,98,0,64);};M.prototype.fmt_fb64=function(a){return this.$val.fmt_fb64(a);};M.ptr.prototype.fmt_e32=function(a){var a,b;b=this;b.formatFloat($coerceFloat32(a),101,P(b,6),32);};M.prototype.fmt_e32=function(a){return this.$val.fmt_e32(a);};M.ptr.prototype.fmt_E32=function(a){var a,b;b=this;b.formatFloat($coerceFloat32(a),69,P(b,6),32);};M.prototype.fmt_E32=function(a){return this.$val.fmt_E32(a);};M.ptr.prototype.fmt_f32=function(a){var a,b;b=this;b.formatFloat($coerceFloat32(a),102,P(b,6),32);};M.prototype.fmt_f32=function(a){return this.$val.fmt_f32(a);};M.ptr.prototype.fmt_g32=function(a){var a,b;b=this;b.formatFloat($coerceFloat32(a),103,P(b,-1),32);};M.prototype.fmt_g32=function(a){return this.$val.fmt_g32(a);};M.ptr.prototype.fmt_G32=function(a){var a,b;b=this;b.formatFloat($coerceFloat32(a),71,P(b,-1),32);};M.prototype.fmt_G32=function(a){return this.$val.fmt_G32(a);};M.ptr.prototype.fmt_fb32=function(a){var a,b;b=this;b.formatFloat($coerceFloat32(a),98,0,32);};M.prototype.fmt_fb32=function(a){return this.$val.fmt_fb32(a);};M.ptr.prototype.fmt_c64=function(a,b){var a,b,c;c=this;c.fmt_complex($coerceFloat32(a.$real),$coerceFloat32(a.$imag),32,b);};M.prototype.fmt_c64=function(a,b){return this.$val.fmt_c64(a,b);};M.ptr.prototype.fmt_c128=function(a,b){var a,b,c;c=this;c.fmt_complex(a.$real,a.$imag,64,b);};M.prototype.fmt_c128=function(a,b){return this.$val.fmt_c128(a,b);};M.ptr.prototype.fmt_complex=function(a,b,c,d){var a,b,c,d,e,f,g,h,i,j;e=this;e.buf.WriteByte(40);f=e.fmtFlags.plus;g=e.fmtFlags.space;h=e.wid;i=0;while(true){if(!(true)){break;}j=d;if(j===98){e.formatFloat(a,98,0,c);}else if(j===101){e.formatFloat(a,101,P(e,6),c);}else if(j===69){e.formatFloat(a,69,P(e,6),c);}else if(j===102||j===70){e.formatFloat(a,102,P(e,6),c);}else if(j===103){e.formatFloat(a,103,P(e,-1),c);}else if(j===71){e.formatFloat(a,71,P(e,-1),c);}if(!((i===0))){break;}e.fmtFlags.plus=true;e.fmtFlags.space=false;e.wid=h;a=b;i=i+(1)>>0;}e.fmtFlags.space=g;e.fmtFlags.plus=f;e.wid=h;e.buf.Write(AA);};M.prototype.fmt_complex=function(a,b,c,d){return this.$val.fmt_complex(a,b,c,d);};$ptrType(AJ).prototype.Write=function(a){var a,b=0,c=$ifaceNil,d,e,f;d=this;d.$set($appendSlice(d.$get(),a));e=a.$length;f=$ifaceNil;b=e;c=f;return[b,c];};$ptrType(AJ).prototype.WriteString=function(a){var a,b=0,c=$ifaceNil,d,e,f;d=this;d.$set($appendSlice(d.$get(),new AJ($stringToBytes(a))));e=a.length;f=$ifaceNil;b=e;c=f;return[b,c];};$ptrType(AJ).prototype.WriteByte=function(a){var a,b;b=this;b.$set($append(b.$get(),a));return $ifaceNil;};$ptrType(AJ).prototype.WriteRune=function(a){var a,b,c,d,e,f;b=this;if(a<128){b.$set($append(b.$get(),(a<<24>>>24)));return $ifaceNil;}c=b.$get();d=c.$length;while(true){if(!((d+4>>0)>c.$capacity)){break;}c=$append(c,0);}f=C.EncodeRune((e=$subslice(c,d,(d+4>>0)),$subslice(new CE(e.$array),e.$offset,e.$offset+e.$length)),a);b.$set($subslice(c,0,(d+f>>0)));return $ifaceNil;};AM=function(){var a;a=$assertType(AL.Get(),CI);a.panicking=false;a.erroring=false;a.fmt.init(new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},a));return a;};AK.ptr.prototype.free=function(){var a;a=this;if(a.buf.$capacity>1024){return;}a.buf=$subslice(a.buf,0,0);a.arg=$ifaceNil;a.value=new G.Value.ptr(CK.nil,0,0);AL.Put(a);};AK.prototype.free=function(){return this.$val.free();};AK.ptr.prototype.Width=function(){var a=0,b=false,c,d,e;c=this;d=c.fmt.wid;e=c.fmt.fmtFlags.widPresent;a=d;b=e;return[a,b];};AK.prototype.Width=function(){return this.$val.Width();};AK.ptr.prototype.Precision=function(){var a=0,b=false,c,d,e;c=this;d=c.fmt.prec;e=c.fmt.fmtFlags.precPresent;a=d;b=e;return[a,b];};AK.prototype.Precision=function(){return this.$val.Precision();};AK.ptr.prototype.Flag=function(a){var a,b,c;b=this;c=a;if(c===45){return b.fmt.fmtFlags.minus;}else if(c===43){return b.fmt.fmtFlags.plus;}else if(c===35){return b.fmt.fmtFlags.sharp;}else if(c===32){return b.fmt.fmtFlags.space;}else if(c===48){return b.fmt.fmtFlags.zero;}return false;};AK.prototype.Flag=function(a){return this.$val.Flag(a);};AK.ptr.prototype.add=function(a){var a,b;b=this;new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b).WriteRune(a);};AK.prototype.add=function(a){return this.$val.add(a);};AK.ptr.prototype.Write=function(a){var a,b=0,c=$ifaceNil,d,e;d=this;e=new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d).Write(a);b=e[0];c=e[1];return[b,c];};AK.prototype.Write=function(a){return this.$val.Write(a);};AU=$pkg.Fprintln=function(a,b){var a,b,c=0,d=$ifaceNil,e,f,g;e=AM();e.doPrint(b,true,true);f=a.Write((g=e.buf,$subslice(new CE(g.$array),g.$offset,g.$offset+g.$length)));c=f[0];d=f[1];e.free();return[c,d];};AV=$pkg.Println=function(a){var a,b=0,c=$ifaceNil,d;d=AU(F.Stdout,a);b=d[0];c=d[1];return[b,c];};AX=function(a,b){var a,b,c;a=a;c=a.Field(b);if((c.Kind()===20)&&!c.IsNil()){c=c.Elem();}return c;};AK.ptr.prototype.unknownType=function(a){var a,b;b=this;a=a;if(!a.IsValid()){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b).Write(R);return;}new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b).WriteByte(63);new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b).WriteString(a.Type().String());new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b).WriteByte(63);};AK.prototype.unknownType=function(a){return this.$val.unknownType(a);};AK.ptr.prototype.badVerb=function(a){var a,b;b=this;b.erroring=true;b.add(37);b.add(33);b.add(a);b.add(40);if(!($interfaceIsEqual(b.arg,$ifaceNil))){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b).WriteString(G.TypeOf(b.arg).String());b.add(61);b.printArg(b.arg,118,0);}else if(b.value.IsValid()){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b).WriteString(b.value.Type().String());b.add(61);b.printValue(b.value,118,0);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b).Write(R);}b.add(41);b.erroring=false;};AK.prototype.badVerb=function(a){return this.$val.badVerb(a);};AK.ptr.prototype.fmtBool=function(a,b){var a,b,c,d;c=this;d=b;if(d===116||d===118){c.fmt.fmt_boolean(a);}else{c.badVerb(b);}};AK.prototype.fmtBool=function(a,b){return this.$val.fmtBool(a,b);};AK.ptr.prototype.fmtC=function(a){var a,b,c,d,e;b=this;c=((a.$low+((a.$high>>31)*4294967296))>>0);if(!((d=new $Int64(0,c),(d.$high===a.$high&&d.$low===a.$low)))){c=65533;}e=C.EncodeRune($subslice(new CE(b.runeBuf),0,4),c);b.fmt.pad($subslice(new CE(b.runeBuf),0,e));};AK.prototype.fmtC=function(a){return this.$val.fmtC(a);};AK.ptr.prototype.fmtInt64=function(a,b){var a,b,c,d;c=this;d=b;if(d===98){c.fmt.integer(a,new $Uint64(0,2),true,"0123456789abcdef");}else if(d===99){c.fmtC(a);}else if(d===100||d===118){c.fmt.integer(a,new $Uint64(0,10),true,"0123456789abcdef");}else if(d===111){c.fmt.integer(a,new $Uint64(0,8),true,"0123456789abcdef");}else if(d===113){if((0=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]);if(h>0){if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).Write(Q);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(32);}}e.printArg(new $Uint8(i),118,d+1>>0);g++;}if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(125);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(93);}return;}j=b;if(j===115){e.fmt.fmt_s($bytesToString(a));}else if(j===120){e.fmt.fmt_bx(a,"0123456789abcdef");}else if(j===88){e.fmt.fmt_bx(a,"0123456789ABCDEF");}else if(j===113){e.fmt.fmt_q($bytesToString(a));}else{e.badVerb(b);}};AK.prototype.fmtBytes=function(a,b,c,d){return this.$val.fmtBytes(a,b,c,d);};AK.ptr.prototype.fmtPointer=function(a,b){var a,b,c,d,e,f,g;c=this;a=a;d=true;e=b;if(e===112||e===118){}else if(e===98||e===100||e===111||e===120||e===88){d=false;}else{c.badVerb(b);return;}f=0;g=a.Kind();if(g===18||g===19||g===21||g===22||g===23||g===26){f=a.Pointer();}else{c.badVerb(b);return;}if(c.fmt.fmtFlags.sharpV){c.add(40);new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).WriteString(a.Type().String());c.add(41);c.add(40);if(f===0){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).Write(T);}else{c.fmt0x64(new $Uint64(0,f.constructor===Number?f:1),true);}c.add(41);}else if((b===118)&&(f===0)){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).Write(R);}else{if(d){c.fmt0x64(new $Uint64(0,f.constructor===Number?f:1),!c.fmt.fmtFlags.sharp);}else{c.fmtUint64(new $Uint64(0,f.constructor===Number?f:1),b);}}};AK.prototype.fmtPointer=function(a,b){return this.$val.fmtPointer(a,b);};AK.ptr.prototype.catchPanic=function(a,b){var a,b,c,d,e;c=this;d=$recover();if(!($interfaceIsEqual(d,$ifaceNil))){e=G.ValueOf(a);if((e.Kind()===22)&&e.IsNil()){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).Write(R);return;}if(c.panicking){$panic(d);}c.fmt.clearflags();new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).Write(V);c.add(b);new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).Write(Y);c.panicking=true;c.printArg(d,118,0);c.panicking=false;new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).WriteByte(41);}};AK.prototype.catchPanic=function(a,b){return this.$val.catchPanic(a,b);};AK.ptr.prototype.clearSpecialFlags=function(){var a=false,b=false,c;c=this;a=c.fmt.fmtFlags.plusV;if(a){c.fmt.fmtFlags.plus=true;c.fmt.fmtFlags.plusV=false;}b=c.fmt.fmtFlags.sharpV;if(b){c.fmt.fmtFlags.sharp=true;c.fmt.fmtFlags.sharpV=false;}return[a,b];};AK.prototype.clearSpecialFlags=function(){return this.$val.clearSpecialFlags();};AK.ptr.prototype.restoreSpecialFlags=function(a,b){var a,b,c;c=this;if(a){c.fmt.fmtFlags.plus=false;c.fmt.fmtFlags.plusV=true;}if(b){c.fmt.fmtFlags.sharp=false;c.fmt.fmtFlags.sharpV=true;}};AK.prototype.restoreSpecialFlags=function(a,b){return this.$val.restoreSpecialFlags(a,b);};AK.ptr.prototype.handleMethods=function(a,b){var $deferred=[],$err=null,a,b,c=false,d,e,f,g,h,i,j,k,l,m,n;try{$deferFrames.push($deferred);d=this;if(d.erroring){return c;}e=$assertType(d.arg,AG,true);f=e[0];g=e[1];if(g){c=true;h=d.clearSpecialFlags();$deferred.push([$methodVal(d,"restoreSpecialFlags"),[h[0],h[1]]]);$deferred.push([$methodVal(d,"catchPanic"),[d.arg,a]]);f.Format(d,a);return c;}if(d.fmt.fmtFlags.sharpV){i=$assertType(d.arg,AI,true);j=i[0];k=i[1];if(k){c=true;$deferred.push([$methodVal(d,"catchPanic"),[d.arg,a]]);d.fmt.fmt_s(j.GoString());return c;}}else{l=a;if(l===118||l===115||l===120||l===88||l===113){n=d.arg;if($assertType(n,$error,true)[1]){m=n;c=true;$deferred.push([$methodVal(d,"catchPanic"),[d.arg,a]]);d.printArg(new $String(m.Error()),a,b);return c;}else if($assertType(n,AH,true)[1]){m=n;c=true;$deferred.push([$methodVal(d,"catchPanic"),[d.arg,a]]);d.printArg(new $String(m.String()),a,b);return c;}}}c=false;return c;}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);return c;}};AK.prototype.handleMethods=function(a,b){return this.$val.handleMethods(a,b);};AK.ptr.prototype.printArg=function(a,b,c){var a,b,c,d=false,e,f,g,h,i;e=this;e.arg=a;e.value=new G.Value.ptr(CK.nil,0,0);if($interfaceIsEqual(a,$ifaceNil)){if((b===84)||(b===118)){e.fmt.pad(R);}else{e.badVerb(b);}d=false;return d;}f=b;if(f===84){e.printArg(new $String(G.TypeOf(a).String()),115,0);d=false;return d;}else if(f===112){e.fmtPointer(G.ValueOf(a),b);d=false;return d;}h=a;if($assertType(h,$Bool,true)[1]){g=h.$val;e.fmtBool(g,b);}else if($assertType(h,$Float32,true)[1]){g=h.$val;e.fmtFloat32(g,b);}else if($assertType(h,$Float64,true)[1]){g=h.$val;e.fmtFloat64(g,b);}else if($assertType(h,$Complex64,true)[1]){g=h.$val;e.fmtComplex64(g,b);}else if($assertType(h,$Complex128,true)[1]){g=h.$val;e.fmtComplex128(g,b);}else if($assertType(h,$Int,true)[1]){g=h.$val;e.fmtInt64(new $Int64(0,g),b);}else if($assertType(h,$Int8,true)[1]){g=h.$val;e.fmtInt64(new $Int64(0,g),b);}else if($assertType(h,$Int16,true)[1]){g=h.$val;e.fmtInt64(new $Int64(0,g),b);}else if($assertType(h,$Int32,true)[1]){g=h.$val;e.fmtInt64(new $Int64(0,g),b);}else if($assertType(h,$Int64,true)[1]){g=h.$val;e.fmtInt64(g,b);}else if($assertType(h,$Uint,true)[1]){g=h.$val;e.fmtUint64(new $Uint64(0,g),b);}else if($assertType(h,$Uint8,true)[1]){g=h.$val;e.fmtUint64(new $Uint64(0,g),b);}else if($assertType(h,$Uint16,true)[1]){g=h.$val;e.fmtUint64(new $Uint64(0,g),b);}else if($assertType(h,$Uint32,true)[1]){g=h.$val;e.fmtUint64(new $Uint64(0,g),b);}else if($assertType(h,$Uint64,true)[1]){g=h.$val;e.fmtUint64(g,b);}else if($assertType(h,$Uintptr,true)[1]){g=h.$val;e.fmtUint64(new $Uint64(0,g.constructor===Number?g:1),b);}else if($assertType(h,$String,true)[1]){g=h.$val;e.fmtString(g,b);d=(b===115)||(b===118);}else if($assertType(h,CE,true)[1]){g=h.$val;e.fmtBytes(g,b,$ifaceNil,c);d=b===115;}else{g=h;i=e.handleMethods(b,c);if(i){d=false;return d;}d=e.printReflectValue(G.ValueOf(a),b,c);return d;}e.arg=$ifaceNil;return d;};AK.prototype.printArg=function(a,b,c){return this.$val.printArg(a,b,c);};AK.ptr.prototype.printValue=function(a,b,c){var a,b,c,d=false,e,f,g;e=this;a=a;if(!a.IsValid()){if((b===84)||(b===118)){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).Write(R);}else{e.badVerb(b);}d=false;return d;}f=b;if(f===84){e.printArg(new $String(a.Type().String()),115,0);d=false;return d;}else if(f===112){e.fmtPointer(a,b);d=false;return d;}e.arg=$ifaceNil;if(a.CanInterface()){e.arg=a.Interface();}g=e.handleMethods(b,c);if(g){d=false;return d;}d=e.printReflectValue(a,b,c);return d;};AK.prototype.printValue=function(a,b,c){return this.$val.printValue(a,b,c);};AK.ptr.prototype.printReflectValue=function(a,b,c){var a,aa,ab,b,c,d=false,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;e=this;a=a;f=e.value;e.value=a;g=a;h=g.Kind();BigSwitch:switch(0){default:if(h===1){e.fmtBool(g.Bool(),b);}else if(h===2||h===3||h===4||h===5||h===6){e.fmtInt64(g.Int(),b);}else if(h===7||h===8||h===9||h===10||h===11||h===12){e.fmtUint64(g.Uint(),b);}else if(h===13||h===14){if(g.Type().Size()===4){e.fmtFloat32(g.Float(),b);}else{e.fmtFloat64(g.Float(),b);}}else if(h===15||h===16){if(g.Type().Size()===8){e.fmtComplex64((i=g.Complex(),new $Complex64(i.$real,i.$imag)),b);}else{e.fmtComplex128(g.Complex(),b);}}else if(h===24){e.fmtString(g.String(),b);}else if(h===21){if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteString(g.Type().String());if(g.IsNil()){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteString("(nil)");break;}new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(123);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).Write(U);}j=g.MapKeys();k=j;l=0;while(true){if(!(l=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+l]);if(m>0){if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).Write(Q);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(32);}}e.printValue(n,b,c+1>>0);new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(58);e.printValue(g.MapIndex(n),b,c+1>>0);l++;}if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(125);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(93);}}else if(h===25){if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteString(a.Type().String());}e.add(123);o=g;p=o.Type();q=0;while(true){if(!(q0){if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).Write(Q);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(32);}}if(e.fmt.fmtFlags.plusV||e.fmt.fmtFlags.sharpV){r=$clone(p.Field(q),G.StructField);if(!(r.Name==="")){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteString(r.Name);new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(58);}}e.printValue(AX(o,q),b,c+1>>0);q=q+(1)>>0;}new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(125);}else if(h===20){s=g.Elem();if(!s.IsValid()){if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteString(g.Type().String());new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).Write(S);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).Write(R);}}else{d=e.printValue(s,b,c+1>>0);}}else if(h===17||h===23){t=g.Type();if((t.Elem().Kind()===8)&&($interfaceIsEqual(t.Elem(),BB)||(b===115)||(b===113)||(b===120))){u=CE.nil;if(g.Kind()===23){u=g.Bytes();}else if(g.CanAddr()){u=g.Slice(0,g.Len()).Bytes();}else{u=$makeSlice(CE,g.Len());v=u;w=0;while(true){if(!(w=u.$length)?$throwRuntimeError("index out of range"):u.$array[u.$offset+x]=(g.Index(x).Uint().$low<<24>>>24);w++;}}e.fmtBytes(u,b,t,c);d=b===115;break;}if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteString(a.Type().String());if((g.Kind()===23)&&g.IsNil()){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteString("(nil)");break;}new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(123);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(91);}y=0;while(true){if(!(y0){if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).Write(Q);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(32);}}e.printValue(g.Index(y),b,c+1>>0);y=y+(1)>>0;}if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(125);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(93);}}else if(h===22){z=g.Pointer();if(!((z===0))&&(c===0)){aa=g.Elem();ab=aa.Kind();if(ab===17||ab===23){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(38);e.printValue(aa,b,c+1>>0);break BigSwitch;}else if(ab===25){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(38);e.printValue(aa,b,c+1>>0);break BigSwitch;}else if(ab===21){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(38);e.printValue(aa,b,c+1>>0);break BigSwitch;}}e.fmtPointer(a,b);}else if(h===18||h===19||h===26){e.fmtPointer(a,b);}else{e.unknownType(g);}}e.value=f;d=d;return d;};AK.prototype.printReflectValue=function(a,b,c){return this.$val.printReflectValue(a,b,c);};AK.ptr.prototype.doPrint=function(a,b,c){var a,b,c,d,e,f,g,h;d=this;e=false;f=0;while(true){if(!(f=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+f]);if(f>0){h=!($interfaceIsEqual(g,$ifaceNil))&&(G.TypeOf(g).Kind()===24);if(b||!h&&!e){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d).WriteByte(32);}}e=d.printArg(g,118,0);f=f+(1)>>0;}if(c){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d).WriteByte(10);}};AK.prototype.doPrint=function(a,b,c){return this.$val.doPrint(a,b,c);};BS.ptr.prototype.Read=function(a){var a,b=0,c=$ifaceNil,d,e,f;d=this;e=0;f=D.New("ScanState's Read should not be called. Use ReadRune");b=e;c=f;return[b,c];};BS.prototype.Read=function(a){return this.$val.Read(a);};BS.ptr.prototype.ReadRune=function(){var a=0,b=0,c=$ifaceNil,d,e;d=this;if(d.peekRune>=0){d.count=d.count+(1)>>0;a=d.peekRune;b=C.RuneLen(a);d.prevRune=a;d.peekRune=-1;return[a,b,c];}if(d.atEOF||d.ssave.nlIsEnd&&(d.prevRune===10)||d.count>=d.ssave.argLimit){c=E.EOF;return[a,b,c];}e=d.rr.ReadRune();a=e[0];b=e[1];c=e[2];if($interfaceIsEqual(c,$ifaceNil)){d.count=d.count+(1)>>0;d.prevRune=a;}else if($interfaceIsEqual(c,E.EOF)){d.atEOF=true;}return[a,b,c];};BS.prototype.ReadRune=function(){return this.$val.ReadRune();};BS.ptr.prototype.Width=function(){var a=0,b=false,c,d,e,f,g;c=this;if(c.ssave.maxWid===1073741824){d=0;e=false;a=d;b=e;return[a,b];}f=c.ssave.maxWid;g=true;a=f;b=g;return[a,b];};BS.prototype.Width=function(){return this.$val.Width();};BS.ptr.prototype.getRune=function(){var a=0,b,c,d;b=this;c=b.ReadRune();a=c[0];d=c[2];if(!($interfaceIsEqual(d,$ifaceNil))){if($interfaceIsEqual(d,E.EOF)){a=-1;return a;}b.error(d);}return a;};BS.prototype.getRune=function(){return this.$val.getRune();};BS.ptr.prototype.UnreadRune=function(){var a,b,c,d;a=this;b=$assertType(a.rr,BE,true);c=b[0];d=b[1];if(d){c.UnreadRune();}else{a.peekRune=a.prevRune;}a.prevRune=-1;a.count=a.count-(1)>>0;return $ifaceNil;};BS.prototype.UnreadRune=function(){return this.$val.UnreadRune();};BS.ptr.prototype.error=function(a){var a,b,c;b=this;$panic((c=new BR.ptr(a),new c.constructor.elem(c)));};BS.prototype.error=function(a){return this.$val.error(a);};BS.ptr.prototype.errorString=function(a){var a,b,c;b=this;$panic((c=new BR.ptr(D.New(a)),new c.constructor.elem(c)));};BS.prototype.errorString=function(a){return this.$val.errorString(a);};BS.ptr.prototype.Token=function(a,b){var $deferred=[],$err=null,a,b,c=CE.nil,d=$ifaceNil,e;try{$deferFrames.push($deferred);e=this;$deferred.push([(function(){var f,g,h,i;f=$recover();if(!($interfaceIsEqual(f,$ifaceNil))){g=$assertType(f,BR,true);h=$clone(g[0],BR);i=g[1];if(i){d=h.err;}else{$panic(f);}}}),[]]);if(b===$throwNilPointerError){b=BW;}e.buf=$subslice(e.buf,0,0);c=e.token(a,b);return[c,d];}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);return[c,d];}};BS.prototype.Token=function(a,b){return this.$val.Token(a,b);};BV=function(a){var a,b,c,d,e;if(a>=65536){return false;}b=(a<<16>>>16);c=BU;d=0;while(true){if(!(d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]),CG);if(b1024){return;}b.buf=$subslice(b.buf,0,0);b.rr=$ifaceNil;BY.Put(b);};BS.prototype.free=function(a){return this.$val.free(a);};BS.ptr.prototype.skipSpace=function(a){var a,b,c;b=this;while(true){if(!(true)){break;}c=b.getRune();if(c===-1){return;}if((c===13)&&b.peek("\n")){continue;}if(c===10){if(a){break;}if(b.ssave.nlIsSpace){continue;}b.errorString("unexpected newline");return;}if(!BV(c)){b.UnreadRune();break;}}};BS.prototype.skipSpace=function(a){return this.$val.skipSpace(a);};BS.ptr.prototype.token=function(a,b){var a,b,c,d,e;c=this;if(a){c.skipSpace(false);}while(true){if(!(true)){break;}d=c.getRune();if(d===-1){break;}if(!b(d)){c.UnreadRune();break;}new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).WriteRune(d);}return(e=c.buf,$subslice(new CE(e.$array),e.$offset,e.$offset+e.$length));};BS.prototype.token=function(a,b){return this.$val.token(a,b);};CC=function(a,b){var a,b,c,d,e,f,g;c=a;d=0;while(true){if(!(d=0;};BS.prototype.peek=function(a){return this.$val.peek(a);};DJ.methods=[{prop:"clearflags",name:"clearflags",pkg:"fmt",typ:$funcType([],[],false)},{prop:"init",name:"init",pkg:"fmt",typ:$funcType([CJ],[],false)},{prop:"computePadding",name:"computePadding",pkg:"fmt",typ:$funcType([$Int],[CE,$Int,$Int],false)},{prop:"writePadding",name:"writePadding",pkg:"fmt",typ:$funcType([$Int,CE],[],false)},{prop:"pad",name:"pad",pkg:"fmt",typ:$funcType([CE],[],false)},{prop:"padString",name:"padString",pkg:"fmt",typ:$funcType([$String],[],false)},{prop:"fmt_boolean",name:"fmt_boolean",pkg:"fmt",typ:$funcType([$Bool],[],false)},{prop:"integer",name:"integer",pkg:"fmt",typ:$funcType([$Int64,$Uint64,$Bool,$String],[],false)},{prop:"truncate",name:"truncate",pkg:"fmt",typ:$funcType([$String],[$String],false)},{prop:"fmt_s",name:"fmt_s",pkg:"fmt",typ:$funcType([$String],[],false)},{prop:"fmt_sbx",name:"fmt_sbx",pkg:"fmt",typ:$funcType([$String,CE,$String],[],false)},{prop:"fmt_sx",name:"fmt_sx",pkg:"fmt",typ:$funcType([$String,$String],[],false)},{prop:"fmt_bx",name:"fmt_bx",pkg:"fmt",typ:$funcType([CE,$String],[],false)},{prop:"fmt_q",name:"fmt_q",pkg:"fmt",typ:$funcType([$String],[],false)},{prop:"fmt_qc",name:"fmt_qc",pkg:"fmt",typ:$funcType([$Int64],[],false)},{prop:"formatFloat",name:"formatFloat",pkg:"fmt",typ:$funcType([$Float64,$Uint8,$Int,$Int],[],false)},{prop:"fmt_e64",name:"fmt_e64",pkg:"fmt",typ:$funcType([$Float64],[],false)},{prop:"fmt_E64",name:"fmt_E64",pkg:"fmt",typ:$funcType([$Float64],[],false)},{prop:"fmt_f64",name:"fmt_f64",pkg:"fmt",typ:$funcType([$Float64],[],false)},{prop:"fmt_g64",name:"fmt_g64",pkg:"fmt",typ:$funcType([$Float64],[],false)},{prop:"fmt_G64",name:"fmt_G64",pkg:"fmt",typ:$funcType([$Float64],[],false)},{prop:"fmt_fb64",name:"fmt_fb64",pkg:"fmt",typ:$funcType([$Float64],[],false)},{prop:"fmt_e32",name:"fmt_e32",pkg:"fmt",typ:$funcType([$Float32],[],false)},{prop:"fmt_E32",name:"fmt_E32",pkg:"fmt",typ:$funcType([$Float32],[],false)},{prop:"fmt_f32",name:"fmt_f32",pkg:"fmt",typ:$funcType([$Float32],[],false)},{prop:"fmt_g32",name:"fmt_g32",pkg:"fmt",typ:$funcType([$Float32],[],false)},{prop:"fmt_G32",name:"fmt_G32",pkg:"fmt",typ:$funcType([$Float32],[],false)},{prop:"fmt_fb32",name:"fmt_fb32",pkg:"fmt",typ:$funcType([$Float32],[],false)},{prop:"fmt_c64",name:"fmt_c64",pkg:"fmt",typ:$funcType([$Complex64,$Int32],[],false)},{prop:"fmt_c128",name:"fmt_c128",pkg:"fmt",typ:$funcType([$Complex128,$Int32],[],false)},{prop:"fmt_complex",name:"fmt_complex",pkg:"fmt",typ:$funcType([$Float64,$Float64,$Int,$Int32],[],false)}];CJ.methods=[{prop:"Write",name:"Write",pkg:"",typ:$funcType([CE],[$Int,$error],false)},{prop:"WriteString",name:"WriteString",pkg:"",typ:$funcType([$String],[$Int,$error],false)},{prop:"WriteByte",name:"WriteByte",pkg:"",typ:$funcType([$Uint8],[$error],false)},{prop:"WriteRune",name:"WriteRune",pkg:"",typ:$funcType([$Int32],[$error],false)}];CI.methods=[{prop:"free",name:"free",pkg:"fmt",typ:$funcType([],[],false)},{prop:"Width",name:"Width",pkg:"",typ:$funcType([],[$Int,$Bool],false)},{prop:"Precision",name:"Precision",pkg:"",typ:$funcType([],[$Int,$Bool],false)},{prop:"Flag",name:"Flag",pkg:"",typ:$funcType([$Int],[$Bool],false)},{prop:"add",name:"add",pkg:"fmt",typ:$funcType([$Int32],[],false)},{prop:"Write",name:"Write",pkg:"",typ:$funcType([CE],[$Int,$error],false)},{prop:"unknownType",name:"unknownType",pkg:"fmt",typ:$funcType([G.Value],[],false)},{prop:"badVerb",name:"badVerb",pkg:"fmt",typ:$funcType([$Int32],[],false)},{prop:"fmtBool",name:"fmtBool",pkg:"fmt",typ:$funcType([$Bool,$Int32],[],false)},{prop:"fmtC",name:"fmtC",pkg:"fmt",typ:$funcType([$Int64],[],false)},{prop:"fmtInt64",name:"fmtInt64",pkg:"fmt",typ:$funcType([$Int64,$Int32],[],false)},{prop:"fmt0x64",name:"fmt0x64",pkg:"fmt",typ:$funcType([$Uint64,$Bool],[],false)},{prop:"fmtUnicode",name:"fmtUnicode",pkg:"fmt",typ:$funcType([$Int64],[],false)},{prop:"fmtUint64",name:"fmtUint64",pkg:"fmt",typ:$funcType([$Uint64,$Int32],[],false)},{prop:"fmtFloat32",name:"fmtFloat32",pkg:"fmt",typ:$funcType([$Float32,$Int32],[],false)},{prop:"fmtFloat64",name:"fmtFloat64",pkg:"fmt",typ:$funcType([$Float64,$Int32],[],false)},{prop:"fmtComplex64",name:"fmtComplex64",pkg:"fmt",typ:$funcType([$Complex64,$Int32],[],false)},{prop:"fmtComplex128",name:"fmtComplex128",pkg:"fmt",typ:$funcType([$Complex128,$Int32],[],false)},{prop:"fmtString",name:"fmtString",pkg:"fmt",typ:$funcType([$String,$Int32],[],false)},{prop:"fmtBytes",name:"fmtBytes",pkg:"fmt",typ:$funcType([CE,$Int32,G.Type,$Int],[],false)},{prop:"fmtPointer",name:"fmtPointer",pkg:"fmt",typ:$funcType([G.Value,$Int32],[],false)},{prop:"catchPanic",name:"catchPanic",pkg:"fmt",typ:$funcType([$emptyInterface,$Int32],[],false)},{prop:"clearSpecialFlags",name:"clearSpecialFlags",pkg:"fmt",typ:$funcType([],[$Bool,$Bool],false)},{prop:"restoreSpecialFlags",name:"restoreSpecialFlags",pkg:"fmt",typ:$funcType([$Bool,$Bool],[],false)},{prop:"handleMethods",name:"handleMethods",pkg:"fmt",typ:$funcType([$Int32,$Int],[$Bool],false)},{prop:"printArg",name:"printArg",pkg:"fmt",typ:$funcType([$emptyInterface,$Int32,$Int],[$Bool],false)},{prop:"printValue",name:"printValue",pkg:"fmt",typ:$funcType([G.Value,$Int32,$Int],[$Bool],false)},{prop:"printReflectValue",name:"printReflectValue",pkg:"fmt",typ:$funcType([G.Value,$Int32,$Int],[$Bool],false)},{prop:"argNumber",name:"argNumber",pkg:"fmt",typ:$funcType([$Int,$String,$Int,$Int],[$Int,$Int,$Bool],false)},{prop:"doPrintf",name:"doPrintf",pkg:"fmt",typ:$funcType([$String,CF],[],false)},{prop:"doPrint",name:"doPrint",pkg:"fmt",typ:$funcType([CF,$Bool,$Bool],[],false)}];CN.methods=[{prop:"Read",name:"Read",pkg:"",typ:$funcType([CE],[$Int,$error],false)},{prop:"ReadRune",name:"ReadRune",pkg:"",typ:$funcType([],[$Int32,$Int,$error],false)},{prop:"Width",name:"Width",pkg:"",typ:$funcType([],[$Int,$Bool],false)},{prop:"getRune",name:"getRune",pkg:"fmt",typ:$funcType([],[$Int32],false)},{prop:"mustReadRune",name:"mustReadRune",pkg:"fmt",typ:$funcType([],[$Int32],false)},{prop:"UnreadRune",name:"UnreadRune",pkg:"",typ:$funcType([],[$error],false)},{prop:"error",name:"error",pkg:"fmt",typ:$funcType([$error],[],false)},{prop:"errorString",name:"errorString",pkg:"fmt",typ:$funcType([$String],[],false)},{prop:"Token",name:"Token",pkg:"",typ:$funcType([$Bool,DK],[CE,$error],false)},{prop:"SkipSpace",name:"SkipSpace",pkg:"",typ:$funcType([],[],false)},{prop:"free",name:"free",pkg:"fmt",typ:$funcType([BT],[],false)},{prop:"skipSpace",name:"skipSpace",pkg:"fmt",typ:$funcType([$Bool],[],false)},{prop:"token",name:"token",pkg:"fmt",typ:$funcType([$Bool,DK],[CE],false)},{prop:"consume",name:"consume",pkg:"fmt",typ:$funcType([$String,$Bool],[$Bool],false)},{prop:"peek",name:"peek",pkg:"fmt",typ:$funcType([$String],[$Bool],false)},{prop:"notEOF",name:"notEOF",pkg:"fmt",typ:$funcType([],[],false)},{prop:"accept",name:"accept",pkg:"fmt",typ:$funcType([$String],[$Bool],false)},{prop:"okVerb",name:"okVerb",pkg:"fmt",typ:$funcType([$Int32,$String,$String],[$Bool],false)},{prop:"scanBool",name:"scanBool",pkg:"fmt",typ:$funcType([$Int32],[$Bool],false)},{prop:"getBase",name:"getBase",pkg:"fmt",typ:$funcType([$Int32],[$Int,$String],false)},{prop:"scanNumber",name:"scanNumber",pkg:"fmt",typ:$funcType([$String,$Bool],[$String],false)},{prop:"scanRune",name:"scanRune",pkg:"fmt",typ:$funcType([$Int],[$Int64],false)},{prop:"scanBasePrefix",name:"scanBasePrefix",pkg:"fmt",typ:$funcType([],[$Int,$String,$Bool],false)},{prop:"scanInt",name:"scanInt",pkg:"fmt",typ:$funcType([$Int32,$Int],[$Int64],false)},{prop:"scanUint",name:"scanUint",pkg:"fmt",typ:$funcType([$Int32,$Int],[$Uint64],false)},{prop:"floatToken",name:"floatToken",pkg:"fmt",typ:$funcType([],[$String],false)},{prop:"complexTokens",name:"complexTokens",pkg:"fmt",typ:$funcType([],[$String,$String],false)},{prop:"convertFloat",name:"convertFloat",pkg:"fmt",typ:$funcType([$String,$Int],[$Float64],false)},{prop:"scanComplex",name:"scanComplex",pkg:"fmt",typ:$funcType([$Int32,$Int],[$Complex128],false)},{prop:"convertString",name:"convertString",pkg:"fmt",typ:$funcType([$Int32],[$String],false)},{prop:"quotedString",name:"quotedString",pkg:"fmt",typ:$funcType([],[$String],false)},{prop:"hexDigit",name:"hexDigit",pkg:"fmt",typ:$funcType([$Int32],[$Int],false)},{prop:"hexByte",name:"hexByte",pkg:"fmt",typ:$funcType([],[$Uint8,$Bool],false)},{prop:"hexString",name:"hexString",pkg:"fmt",typ:$funcType([],[$String],false)},{prop:"scanOne",name:"scanOne",pkg:"fmt",typ:$funcType([$Int32,$emptyInterface],[],false)},{prop:"doScan",name:"doScan",pkg:"fmt",typ:$funcType([CF],[$Int,$error],false)},{prop:"advance",name:"advance",pkg:"fmt",typ:$funcType([$String],[$Int],false)},{prop:"doScanf",name:"doScanf",pkg:"fmt",typ:$funcType([$String,CF],[$Int,$error],false)}];L.init([{prop:"widPresent",name:"widPresent",pkg:"fmt",typ:$Bool,tag:""},{prop:"precPresent",name:"precPresent",pkg:"fmt",typ:$Bool,tag:""},{prop:"minus",name:"minus",pkg:"fmt",typ:$Bool,tag:""},{prop:"plus",name:"plus",pkg:"fmt",typ:$Bool,tag:""},{prop:"sharp",name:"sharp",pkg:"fmt",typ:$Bool,tag:""},{prop:"space",name:"space",pkg:"fmt",typ:$Bool,tag:""},{prop:"unicode",name:"unicode",pkg:"fmt",typ:$Bool,tag:""},{prop:"uniQuote",name:"uniQuote",pkg:"fmt",typ:$Bool,tag:""},{prop:"zero",name:"zero",pkg:"fmt",typ:$Bool,tag:""},{prop:"plusV",name:"plusV",pkg:"fmt",typ:$Bool,tag:""},{prop:"sharpV",name:"sharpV",pkg:"fmt",typ:$Bool,tag:""}]);M.init([{prop:"intbuf",name:"intbuf",pkg:"fmt",typ:DI,tag:""},{prop:"buf",name:"buf",pkg:"fmt",typ:CJ,tag:""},{prop:"wid",name:"wid",pkg:"fmt",typ:$Int,tag:""},{prop:"prec",name:"prec",pkg:"fmt",typ:$Int,tag:""},{prop:"fmtFlags",name:"",pkg:"fmt",typ:L,tag:""}]);AF.init([{prop:"Flag",name:"Flag",pkg:"",typ:$funcType([$Int],[$Bool],false)},{prop:"Precision",name:"Precision",pkg:"",typ:$funcType([],[$Int,$Bool],false)},{prop:"Width",name:"Width",pkg:"",typ:$funcType([],[$Int,$Bool],false)},{prop:"Write",name:"Write",pkg:"",typ:$funcType([CE],[$Int,$error],false)}]);AG.init([{prop:"Format",name:"Format",pkg:"",typ:$funcType([AF,$Int32],[],false)}]);AH.init([{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}]);AI.init([{prop:"GoString",name:"GoString",pkg:"",typ:$funcType([],[$String],false)}]);AJ.init($Uint8);AK.init([{prop:"n",name:"n",pkg:"fmt",typ:$Int,tag:""},{prop:"panicking",name:"panicking",pkg:"fmt",typ:$Bool,tag:""},{prop:"erroring",name:"erroring",pkg:"fmt",typ:$Bool,tag:""},{prop:"buf",name:"buf",pkg:"fmt",typ:AJ,tag:""},{prop:"arg",name:"arg",pkg:"fmt",typ:$emptyInterface,tag:""},{prop:"value",name:"value",pkg:"fmt",typ:G.Value,tag:""},{prop:"reordered",name:"reordered",pkg:"fmt",typ:$Bool,tag:""},{prop:"goodArgNum",name:"goodArgNum",pkg:"fmt",typ:$Bool,tag:""},{prop:"runeBuf",name:"runeBuf",pkg:"fmt",typ:CO,tag:""},{prop:"fmt",name:"fmt",pkg:"fmt",typ:M,tag:""}]);BE.init([{prop:"UnreadRune",name:"UnreadRune",pkg:"",typ:$funcType([],[$error],false)}]);BR.init([{prop:"err",name:"err",pkg:"fmt",typ:$error,tag:""}]);BS.init([{prop:"rr",name:"rr",pkg:"fmt",typ:E.RuneReader,tag:""},{prop:"buf",name:"buf",pkg:"fmt",typ:AJ,tag:""},{prop:"peekRune",name:"peekRune",pkg:"fmt",typ:$Int32,tag:""},{prop:"prevRune",name:"prevRune",pkg:"fmt",typ:$Int32,tag:""},{prop:"count",name:"count",pkg:"fmt",typ:$Int,tag:""},{prop:"atEOF",name:"atEOF",pkg:"fmt",typ:$Bool,tag:""},{prop:"ssave",name:"",pkg:"fmt",typ:BT,tag:""}]);BT.init([{prop:"validSave",name:"validSave",pkg:"fmt",typ:$Bool,tag:""},{prop:"nlIsEnd",name:"nlIsEnd",pkg:"fmt",typ:$Bool,tag:""},{prop:"nlIsSpace",name:"nlIsSpace",pkg:"fmt",typ:$Bool,tag:""},{prop:"argLimit",name:"argLimit",pkg:"fmt",typ:$Int,tag:""},{prop:"limit",name:"limit",pkg:"fmt",typ:$Int,tag:""},{prop:"maxWid",name:"maxWid",pkg:"fmt",typ:$Int,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_fmt=function(){while(true){switch($s){case 0:$r=D.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=F.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=G.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=6;case 6:if($r&&$r.$blocking){$r=$r();}$r=H.$init($BLOCKING);$s=7;case 7:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=8;case 8:if($r&&$r.$blocking){$r=$r();}I=$makeSlice(CE,65);J=$makeSlice(CE,65);N=new CE($stringToBytes("true"));O=new CE($stringToBytes("false"));Q=new CE($stringToBytes(", "));R=new CE($stringToBytes(""));S=new CE($stringToBytes("(nil)"));T=new CE($stringToBytes("nil"));U=new CE($stringToBytes("map["));V=new CE($stringToBytes("%!"));Y=new CE($stringToBytes("(PANIC="));AA=new CE($stringToBytes("i)"));AB=new CE($stringToBytes("[]byte{"));AL=new H.Pool.ptr(0,0,CF.nil,(function(){return new AK.ptr();}));AZ=G.TypeOf(new $Int(0)).Bits();BA=G.TypeOf(new $Uintptr(0)).Bits();BB=G.TypeOf(new $Uint8(0));BU=new CH([$toNativeArray($kindUint16,[9,13]),$toNativeArray($kindUint16,[32,32]),$toNativeArray($kindUint16,[133,133]),$toNativeArray($kindUint16,[160,160]),$toNativeArray($kindUint16,[5760,5760]),$toNativeArray($kindUint16,[8192,8202]),$toNativeArray($kindUint16,[8232,8233]),$toNativeArray($kindUint16,[8239,8239]),$toNativeArray($kindUint16,[8287,8287]),$toNativeArray($kindUint16,[12288,12288])]);BY=new H.Pool.ptr(0,0,CF.nil,(function(){return new BS.ptr();}));CA=D.New("syntax error scanning complex number");CB=D.New("syntax error scanning boolean");K();}return;}};$init_fmt.$blocking=true;return $init_fmt;};return $pkg;})(); +$packages["main"]=(function(){var $pkg={},A,C,B;A=$packages["fmt"];C=$sliceType($emptyInterface);B=function(){A.Println(new C([new $String("Hello.")]));};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_main=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}B();}return;}};$init_main.$blocking=true;return $init_main;};return $pkg;})(); +$synthesizeMethods(); +$packages["runtime"].$init()(); +$go($packages["main"].$init, [], true); +$flushConsole(); + +}).call(this); +//# sourceMappingURL=fmt_simple_min.js.map diff --git a/104/build/fmt_simple_min.js.gz b/104/build/fmt_simple_min.js.gz new file mode 100644 index 0000000..8ac84f5 Binary files /dev/null and b/104/build/fmt_simple_min.js.gz differ diff --git a/104/build/go_version.txt b/104/build/go_version.txt new file mode 100644 index 0000000..9bc4249 --- /dev/null +++ b/104/build/go_version.txt @@ -0,0 +1 @@ +go version go1.4.1 darwin/amd64 diff --git a/104/build/gopherjs_version.txt b/104/build/gopherjs_version.txt new file mode 100644 index 0000000..5c7b1c9 --- /dev/null +++ b/104/build/gopherjs_version.txt @@ -0,0 +1 @@ +ea801edf2841b2262ee58aff3970bacac895e827 diff --git a/104/build/markdownfmt b/104/build/markdownfmt new file mode 100755 index 0000000..70ee048 Binary files /dev/null and b/104/build/markdownfmt differ diff --git a/104/build/markdownfmt.js b/104/build/markdownfmt.js new file mode 100644 index 0000000..ff994b4 --- /dev/null +++ b/104/build/markdownfmt.js @@ -0,0 +1,34275 @@ +"use strict"; +(function() { + +Error.stackTraceLimit = Infinity; + +var $global, $module; +if (typeof window !== "undefined") { /* web page */ + $global = window; +} else if (typeof self !== "undefined") { /* web worker */ + $global = self; +} else if (typeof global !== "undefined") { /* Node.js */ + $global = global; + $global.require = require; +} else { /* others (e.g. Nashorn) */ + $global = this; +} + +if ($global === undefined || $global.Array === undefined) { + throw new Error("no global object found"); +} +if (typeof module !== "undefined") { + $module = module; +} + +var $packages = {}, $idCounter = 0; +var $keys = function(m) { return m ? Object.keys(m) : []; }; +var $min = Math.min; +var $mod = function(x, y) { return x % y; }; +var $parseInt = parseInt; +var $parseFloat = function(f) { + if (f !== undefined && f !== null && f.constructor === Number) { + return f; + } + return parseFloat(f); +}; +var $flushConsole = function() {}; +var $throwRuntimeError; /* set by package "runtime" */ +var $throwNilPointerError = function() { $throwRuntimeError("invalid memory address or nil pointer dereference"); }; + +var $mapArray = function(array, f) { + var newArray = new array.constructor(array.length); + for (var i = 0; i < array.length; i++) { + newArray[i] = f(array[i]); + } + return newArray; +}; + +var $methodVal = function(recv, name) { + var vals = recv.$methodVals || {}; + recv.$methodVals = vals; /* noop for primitives */ + var f = vals[name]; + if (f !== undefined) { + return f; + } + var method = recv[name]; + f = function() { + $stackDepthOffset--; + try { + return method.apply(recv, arguments); + } finally { + $stackDepthOffset++; + } + }; + vals[name] = f; + return f; +}; + +var $methodExpr = function(method) { + if (method.$expr === undefined) { + method.$expr = function() { + $stackDepthOffset--; + try { + return Function.call.apply(method, arguments); + } finally { + $stackDepthOffset++; + } + }; + } + return method.$expr; +}; + +var $subslice = function(slice, low, high, max) { + if (low < 0 || high < low || max < high || high > slice.$capacity || max > slice.$capacity) { + $throwRuntimeError("slice bounds out of range"); + } + var s = new slice.constructor(slice.$array); + s.$offset = slice.$offset + low; + s.$length = slice.$length - low; + s.$capacity = slice.$capacity - low; + if (high !== undefined) { + s.$length = high - low; + } + if (max !== undefined) { + s.$capacity = max - low; + } + return s; +}; + +var $sliceToArray = function(slice) { + if (slice.$length === 0) { + return []; + } + if (slice.$array.constructor !== Array) { + return slice.$array.subarray(slice.$offset, slice.$offset + slice.$length); + } + return slice.$array.slice(slice.$offset, slice.$offset + slice.$length); +}; + +var $decodeRune = function(str, pos) { + var c0 = str.charCodeAt(pos); + + if (c0 < 0x80) { + return [c0, 1]; + } + + if (c0 !== c0 || c0 < 0xC0) { + return [0xFFFD, 1]; + } + + var c1 = str.charCodeAt(pos + 1); + if (c1 !== c1 || c1 < 0x80 || 0xC0 <= c1) { + return [0xFFFD, 1]; + } + + if (c0 < 0xE0) { + var r = (c0 & 0x1F) << 6 | (c1 & 0x3F); + if (r <= 0x7F) { + return [0xFFFD, 1]; + } + return [r, 2]; + } + + var c2 = str.charCodeAt(pos + 2); + if (c2 !== c2 || c2 < 0x80 || 0xC0 <= c2) { + return [0xFFFD, 1]; + } + + if (c0 < 0xF0) { + var r = (c0 & 0x0F) << 12 | (c1 & 0x3F) << 6 | (c2 & 0x3F); + if (r <= 0x7FF) { + return [0xFFFD, 1]; + } + if (0xD800 <= r && r <= 0xDFFF) { + return [0xFFFD, 1]; + } + return [r, 3]; + } + + var c3 = str.charCodeAt(pos + 3); + if (c3 !== c3 || c3 < 0x80 || 0xC0 <= c3) { + return [0xFFFD, 1]; + } + + if (c0 < 0xF8) { + var r = (c0 & 0x07) << 18 | (c1 & 0x3F) << 12 | (c2 & 0x3F) << 6 | (c3 & 0x3F); + if (r <= 0xFFFF || 0x10FFFF < r) { + return [0xFFFD, 1]; + } + return [r, 4]; + } + + return [0xFFFD, 1]; +}; + +var $encodeRune = function(r) { + if (r < 0 || r > 0x10FFFF || (0xD800 <= r && r <= 0xDFFF)) { + r = 0xFFFD; + } + if (r <= 0x7F) { + return String.fromCharCode(r); + } + if (r <= 0x7FF) { + return String.fromCharCode(0xC0 | r >> 6, 0x80 | (r & 0x3F)); + } + if (r <= 0xFFFF) { + return String.fromCharCode(0xE0 | r >> 12, 0x80 | (r >> 6 & 0x3F), 0x80 | (r & 0x3F)); + } + return String.fromCharCode(0xF0 | r >> 18, 0x80 | (r >> 12 & 0x3F), 0x80 | (r >> 6 & 0x3F), 0x80 | (r & 0x3F)); +}; + +var $stringToBytes = function(str) { + var array = new Uint8Array(str.length); + for (var i = 0; i < str.length; i++) { + array[i] = str.charCodeAt(i); + } + return array; +}; + +var $bytesToString = function(slice) { + if (slice.$length === 0) { + return ""; + } + var str = ""; + for (var i = 0; i < slice.$length; i += 10000) { + str += String.fromCharCode.apply(null, slice.$array.subarray(slice.$offset + i, slice.$offset + Math.min(slice.$length, i + 10000))); + } + return str; +}; + +var $stringToRunes = function(str) { + var array = new Int32Array(str.length); + var rune, j = 0; + for (var i = 0; i < str.length; i += rune[1], j++) { + rune = $decodeRune(str, i); + array[j] = rune[0]; + } + return array.subarray(0, j); +}; + +var $runesToString = function(slice) { + if (slice.$length === 0) { + return ""; + } + var str = ""; + for (var i = 0; i < slice.$length; i++) { + str += $encodeRune(slice.$array[slice.$offset + i]); + } + return str; +}; + +var $copyString = function(dst, src) { + var n = Math.min(src.length, dst.$length); + for (var i = 0; i < n; i++) { + dst.$array[dst.$offset + i] = src.charCodeAt(i); + } + return n; +}; + +var $copySlice = function(dst, src) { + var n = Math.min(src.$length, dst.$length); + $internalCopy(dst.$array, src.$array, dst.$offset, src.$offset, n, dst.constructor.elem); + return n; +}; + +var $copy = function(dst, src, typ) { + switch (typ.kind) { + case $kindArray: + $internalCopy(dst, src, 0, 0, src.length, typ.elem); + break; + case $kindStruct: + for (var i = 0; i < typ.fields.length; i++) { + var f = typ.fields[i]; + switch (f.typ.kind) { + case $kindArray: + case $kindStruct: + $copy(dst[f.prop], src[f.prop], f.typ); + continue; + default: + dst[f.prop] = src[f.prop]; + continue; + } + } + break; + } +}; + +var $internalCopy = function(dst, src, dstOffset, srcOffset, n, elem) { + if (n === 0 || (dst === src && dstOffset === srcOffset)) { + return; + } + + if (src.subarray) { + dst.set(src.subarray(srcOffset, srcOffset + n), dstOffset); + return; + } + + switch (elem.kind) { + case $kindArray: + case $kindStruct: + if (dst === src && dstOffset > srcOffset) { + for (var i = n - 1; i >= 0; i--) { + $copy(dst[dstOffset + i], src[srcOffset + i], elem); + } + return; + } + for (var i = 0; i < n; i++) { + $copy(dst[dstOffset + i], src[srcOffset + i], elem); + } + return; + } + + if (dst === src && dstOffset > srcOffset) { + for (var i = n - 1; i >= 0; i--) { + dst[dstOffset + i] = src[srcOffset + i]; + } + return; + } + for (var i = 0; i < n; i++) { + dst[dstOffset + i] = src[srcOffset + i]; + } +}; + +var $clone = function(src, type) { + var clone = type.zero(); + $copy(clone, src, type); + return clone; +}; + +var $pointerOfStructConversion = function(obj, type) { + if(obj.$proxies === undefined) { + obj.$proxies = {}; + obj.$proxies[obj.constructor.string] = obj; + } + var proxy = obj.$proxies[type.string]; + if (proxy === undefined) { + var properties = {}; + for (var i = 0; i < type.elem.fields.length; i++) { + (function(fieldProp) { + properties[fieldProp] = { + get: function() { return obj[fieldProp]; }, + set: function(value) { obj[fieldProp] = value; }, + }; + })(type.elem.fields[i].prop); + } + proxy = Object.create(type.prototype, properties); + proxy.$val = proxy; + obj.$proxies[type.string] = proxy; + proxy.$proxies = obj.$proxies; + } + return proxy; +}; + +var $append = function(slice) { + return $internalAppend(slice, arguments, 1, arguments.length - 1); +}; + +var $appendSlice = function(slice, toAppend) { + return $internalAppend(slice, toAppend.$array, toAppend.$offset, toAppend.$length); +}; + +var $internalAppend = function(slice, array, offset, length) { + if (length === 0) { + return slice; + } + + var newArray = slice.$array; + var newOffset = slice.$offset; + var newLength = slice.$length + length; + var newCapacity = slice.$capacity; + + if (newLength > newCapacity) { + newOffset = 0; + newCapacity = Math.max(newLength, slice.$capacity < 1024 ? slice.$capacity * 2 : Math.floor(slice.$capacity * 5 / 4)); + + if (slice.$array.constructor === Array) { + newArray = slice.$array.slice(slice.$offset, slice.$offset + slice.$length); + newArray.length = newCapacity; + var zero = slice.constructor.elem.zero; + for (var i = slice.$length; i < newCapacity; i++) { + newArray[i] = zero(); + } + } else { + newArray = new slice.$array.constructor(newCapacity); + newArray.set(slice.$array.subarray(slice.$offset, slice.$offset + slice.$length)); + } + } + + $internalCopy(newArray, array, newOffset + slice.$length, offset, length, slice.constructor.elem); + + var newSlice = new slice.constructor(newArray); + newSlice.$offset = newOffset; + newSlice.$length = newLength; + newSlice.$capacity = newCapacity; + return newSlice; +}; + +var $equal = function(a, b, type) { + if (type === $js.Object) { + return a === b; + } + switch (type.kind) { + case $kindFloat32: + return $float32IsEqual(a, b); + case $kindComplex64: + return $float32IsEqual(a.$real, b.$real) && $float32IsEqual(a.$imag, b.$imag); + case $kindComplex128: + return a.$real === b.$real && a.$imag === b.$imag; + case $kindInt64: + case $kindUint64: + return a.$high === b.$high && a.$low === b.$low; + case $kindPtr: + if (a.constructor.elem) { + return a === b; + } + return $pointerIsEqual(a, b); + case $kindArray: + if (a.length != b.length) { + return false; + } + for (var i = 0; i < a.length; i++) { + if (!$equal(a[i], b[i], type.elem)) { + return false; + } + } + return true; + case $kindStruct: + for (var i = 0; i < type.fields.length; i++) { + var f = type.fields[i]; + if (!$equal(a[f.prop], b[f.prop], f.typ)) { + return false; + } + } + return true; + case $kindInterface: + return $interfaceIsEqual(a, b); + default: + return a === b; + } +}; + +var $interfaceIsEqual = function(a, b) { + if (a === $ifaceNil || b === $ifaceNil) { + return a === b; + } + if (a.constructor !== b.constructor) { + return false; + } + if (!a.constructor.comparable) { + $throwRuntimeError("comparing uncomparable type " + a.constructor.string); + } + return $equal(a.$val, b.$val, a.constructor); +}; + +var $float32IsEqual = function(a, b) { + if (a === b) { + return true; + } + if (a === 1/0 || b === 1/0 || a === -1/0 || b === -1/0 || a !== a || b !== b) { + return false; + } + var math = $packages["math"]; + return math !== undefined && math.Float32bits(a) === math.Float32bits(b); +}; + +var $pointerIsEqual = function(a, b) { + if (a === b) { + return true; + } + if (a.$get === $throwNilPointerError || b.$get === $throwNilPointerError) { + return a.$get === $throwNilPointerError && b.$get === $throwNilPointerError; + } + var va = a.$get(); + var vb = b.$get(); + if (va !== vb) { + return false; + } + var dummy = va + 1; + a.$set(dummy); + var equal = b.$get() === dummy; + a.$set(va); + return equal; +}; + +var $kindBool = 1; +var $kindInt = 2; +var $kindInt8 = 3; +var $kindInt16 = 4; +var $kindInt32 = 5; +var $kindInt64 = 6; +var $kindUint = 7; +var $kindUint8 = 8; +var $kindUint16 = 9; +var $kindUint32 = 10; +var $kindUint64 = 11; +var $kindUintptr = 12; +var $kindFloat32 = 13; +var $kindFloat64 = 14; +var $kindComplex64 = 15; +var $kindComplex128 = 16; +var $kindArray = 17; +var $kindChan = 18; +var $kindFunc = 19; +var $kindInterface = 20; +var $kindMap = 21; +var $kindPtr = 22; +var $kindSlice = 23; +var $kindString = 24; +var $kindStruct = 25; +var $kindUnsafePointer = 26; + +var $methodSynthesizers = []; +var $addMethodSynthesizer = function(f) { + if ($methodSynthesizers === null) { + f(); + return; + } + $methodSynthesizers.push(f); +}; +var $synthesizeMethods = function() { + $methodSynthesizers.forEach(function(f) { f(); }); + $methodSynthesizers = null; +}; + +var $newType = function(size, kind, string, name, pkg, constructor) { + var typ; + switch(kind) { + case $kindBool: + case $kindInt: + case $kindInt8: + case $kindInt16: + case $kindInt32: + case $kindUint: + case $kindUint8: + case $kindUint16: + case $kindUint32: + case $kindUintptr: + case $kindString: + case $kindUnsafePointer: + typ = function(v) { this.$val = v; }; + typ.prototype.$key = function() { return string + "$" + this.$val; }; + break; + + case $kindFloat32: + case $kindFloat64: + typ = function(v) { this.$val = v; }; + typ.prototype.$key = function() { return string + "$" + $floatKey(this.$val); }; + break; + + case $kindInt64: + typ = function(high, low) { + this.$high = (high + Math.floor(Math.ceil(low) / 4294967296)) >> 0; + this.$low = low >>> 0; + this.$val = this; + }; + typ.prototype.$key = function() { return string + "$" + this.$high + "$" + this.$low; }; + break; + + case $kindUint64: + typ = function(high, low) { + this.$high = (high + Math.floor(Math.ceil(low) / 4294967296)) >>> 0; + this.$low = low >>> 0; + this.$val = this; + }; + typ.prototype.$key = function() { return string + "$" + this.$high + "$" + this.$low; }; + break; + + case $kindComplex64: + case $kindComplex128: + typ = function(real, imag) { + this.$real = real; + this.$imag = imag; + this.$val = this; + }; + typ.prototype.$key = function() { return string + "$" + this.$real + "$" + this.$imag; }; + break; + + case $kindArray: + typ = function(v) { this.$val = v; }; + typ.ptr = $newType(4, $kindPtr, "*" + string, "", "", function(array) { + this.$get = function() { return array; }; + this.$set = function(v) { $copy(this, v, typ); }; + this.$val = array; + }); + typ.init = function(elem, len) { + typ.elem = elem; + typ.len = len; + typ.comparable = elem.comparable; + typ.prototype.$key = function() { + return string + "$" + Array.prototype.join.call($mapArray(this.$val, function(e) { + var key = e.$key ? e.$key() : String(e); + return key.replace(/\\/g, "\\\\").replace(/\$/g, "\\$"); + }), "$"); + }; + typ.ptr.init(typ); + Object.defineProperty(typ.ptr.nil, "nilCheck", { get: $throwNilPointerError }); + }; + break; + + case $kindChan: + typ = function(capacity) { + this.$val = this; + this.$capacity = capacity; + this.$buffer = []; + this.$sendQueue = []; + this.$recvQueue = []; + this.$closed = false; + }; + typ.prototype.$key = function() { + if (this.$id === undefined) { + $idCounter++; + this.$id = $idCounter; + } + return String(this.$id); + }; + typ.init = function(elem, sendOnly, recvOnly) { + typ.elem = elem; + typ.sendOnly = sendOnly; + typ.recvOnly = recvOnly; + typ.nil = new typ(0); + typ.nil.$sendQueue = typ.nil.$recvQueue = { length: 0, push: function() {}, shift: function() { return undefined; }, indexOf: function() { return -1; } }; + }; + break; + + case $kindFunc: + typ = function(v) { this.$val = v; }; + typ.init = function(params, results, variadic) { + typ.params = params; + typ.results = results; + typ.variadic = variadic; + typ.comparable = false; + }; + break; + + case $kindInterface: + typ = { implementedBy: {}, missingMethodFor: {} }; + typ.init = function(methods) { + typ.methods = methods; + methods.forEach(function(m) { + $ifaceNil[m.prop] = $throwNilPointerError; + }); + }; + break; + + case $kindMap: + typ = function(v) { this.$val = v; }; + typ.init = function(key, elem) { + typ.key = key; + typ.elem = elem; + typ.comparable = false; + }; + break; + + case $kindPtr: + typ = constructor || function(getter, setter, target) { + this.$get = getter; + this.$set = setter; + this.$target = target; + this.$val = this; + }; + typ.prototype.$key = function() { + if (this.$id === undefined) { + $idCounter++; + this.$id = $idCounter; + } + return String(this.$id); + }; + typ.init = function(elem) { + typ.elem = elem; + typ.nil = new typ($throwNilPointerError, $throwNilPointerError); + }; + break; + + case $kindSlice: + typ = function(array) { + if (array.constructor !== typ.nativeArray) { + array = new typ.nativeArray(array); + } + this.$array = array; + this.$offset = 0; + this.$length = array.length; + this.$capacity = array.length; + this.$val = this; + }; + typ.init = function(elem) { + typ.elem = elem; + typ.comparable = false; + typ.nativeArray = $nativeArray(elem.kind); + typ.nil = new typ([]); + }; + break; + + case $kindStruct: + typ = function(v) { this.$val = v; }; + typ.ptr = $newType(4, $kindPtr, "*" + string, "", "", constructor); + typ.ptr.elem = typ; + typ.ptr.prototype.$get = function() { return this; }; + typ.ptr.prototype.$set = function(v) { $copy(this, v, typ); }; + typ.init = function(fields) { + typ.fields = fields; + fields.forEach(function(f) { + if (!f.typ.comparable) { + typ.comparable = false; + } + }); + typ.prototype.$key = function() { + var val = this.$val; + return string + "$" + $mapArray(fields, function(f) { + var e = val[f.prop]; + var key = e.$key ? e.$key() : String(e); + return key.replace(/\\/g, "\\\\").replace(/\$/g, "\\$"); + }).join("$"); + }; + /* nil value */ + var properties = {}; + fields.forEach(function(f) { + properties[f.prop] = { get: $throwNilPointerError, set: $throwNilPointerError }; + }); + typ.ptr.nil = Object.create(constructor.prototype, properties); + typ.ptr.nil.$val = typ.ptr.nil; + /* methods for embedded fields */ + $addMethodSynthesizer(function() { + var synthesizeMethod = function(target, m, f) { + if (target.prototype[m.prop] !== undefined) { return; } + target.prototype[m.prop] = function() { + var v = this.$val[f.prop]; + if (f.typ === $js.Object) { + v = new $js.container.ptr(v); + } + if (v.$val === undefined) { + v = new f.typ(v); + } + return v[m.prop].apply(v, arguments); + }; + }; + fields.forEach(function(f) { + if (f.name === "") { + $methodSet(f.typ).forEach(function(m) { + synthesizeMethod(typ, m, f); + synthesizeMethod(typ.ptr, m, f); + }); + $methodSet($ptrType(f.typ)).forEach(function(m) { + synthesizeMethod(typ.ptr, m, f); + }); + } + }); + }); + }; + break; + + default: + $panic(new $String("invalid kind: " + kind)); + } + + switch (kind) { + case $kindBool: + case $kindMap: + typ.zero = function() { return false; }; + break; + + case $kindInt: + case $kindInt8: + case $kindInt16: + case $kindInt32: + case $kindUint: + case $kindUint8 : + case $kindUint16: + case $kindUint32: + case $kindUintptr: + case $kindUnsafePointer: + case $kindFloat32: + case $kindFloat64: + typ.zero = function() { return 0; }; + break; + + case $kindString: + typ.zero = function() { return ""; }; + break; + + case $kindInt64: + case $kindUint64: + case $kindComplex64: + case $kindComplex128: + var zero = new typ(0, 0); + typ.zero = function() { return zero; }; + break; + + case $kindChan: + case $kindPtr: + case $kindSlice: + typ.zero = function() { return typ.nil; }; + break; + + case $kindFunc: + typ.zero = function() { return $throwNilPointerError; }; + break; + + case $kindInterface: + typ.zero = function() { return $ifaceNil; }; + break; + + case $kindArray: + typ.zero = function() { + var arrayClass = $nativeArray(typ.elem.kind); + if (arrayClass !== Array) { + return new arrayClass(typ.len); + } + var array = new Array(typ.len); + for (var i = 0; i < typ.len; i++) { + array[i] = typ.elem.zero(); + } + return array; + }; + break; + + case $kindStruct: + typ.zero = function() { return new typ.ptr(); }; + break; + + default: + $panic(new $String("invalid kind: " + kind)); + } + + typ.size = size; + typ.kind = kind; + typ.string = string; + typ.typeName = name; + typ.pkg = pkg; + typ.methods = []; + typ.methodSetCache = null; + typ.comparable = true; + return typ; +}; + +var $methodSet = function(typ) { + if (typ.methodSetCache !== null) { + return typ.methodSetCache; + } + var base = {}; + + var isPtr = (typ.kind === $kindPtr); + if (isPtr && typ.elem.kind === $kindInterface) { + typ.methodSetCache = []; + return []; + } + + var current = [{typ: isPtr ? typ.elem : typ, indirect: isPtr}]; + + var seen = {}; + + while (current.length > 0) { + var next = []; + var mset = []; + + current.forEach(function(e) { + if (seen[e.typ.string]) { + return; + } + seen[e.typ.string] = true; + + if(e.typ.typeName !== "") { + mset = mset.concat(e.typ.methods); + if (e.indirect) { + mset = mset.concat($ptrType(e.typ).methods); + } + } + + switch (e.typ.kind) { + case $kindStruct: + e.typ.fields.forEach(function(f) { + if (f.name === "") { + var fTyp = f.typ; + var fIsPtr = (fTyp.kind === $kindPtr); + next.push({typ: fIsPtr ? fTyp.elem : fTyp, indirect: e.indirect || fIsPtr}); + } + }); + break; + + case $kindInterface: + mset = mset.concat(e.typ.methods); + break; + } + }); + + mset.forEach(function(m) { + if (base[m.name] === undefined) { + base[m.name] = m; + } + }); + + current = next; + } + + typ.methodSetCache = []; + Object.keys(base).sort().forEach(function(name) { + typ.methodSetCache.push(base[name]); + }); + return typ.methodSetCache; +}; + +var $Bool = $newType( 1, $kindBool, "bool", "bool", "", null); +var $Int = $newType( 4, $kindInt, "int", "int", "", null); +var $Int8 = $newType( 1, $kindInt8, "int8", "int8", "", null); +var $Int16 = $newType( 2, $kindInt16, "int16", "int16", "", null); +var $Int32 = $newType( 4, $kindInt32, "int32", "int32", "", null); +var $Int64 = $newType( 8, $kindInt64, "int64", "int64", "", null); +var $Uint = $newType( 4, $kindUint, "uint", "uint", "", null); +var $Uint8 = $newType( 1, $kindUint8, "uint8", "uint8", "", null); +var $Uint16 = $newType( 2, $kindUint16, "uint16", "uint16", "", null); +var $Uint32 = $newType( 4, $kindUint32, "uint32", "uint32", "", null); +var $Uint64 = $newType( 8, $kindUint64, "uint64", "uint64", "", null); +var $Uintptr = $newType( 4, $kindUintptr, "uintptr", "uintptr", "", null); +var $Float32 = $newType( 4, $kindFloat32, "float32", "float32", "", null); +var $Float64 = $newType( 8, $kindFloat64, "float64", "float64", "", null); +var $Complex64 = $newType( 8, $kindComplex64, "complex64", "complex64", "", null); +var $Complex128 = $newType(16, $kindComplex128, "complex128", "complex128", "", null); +var $String = $newType( 8, $kindString, "string", "string", "", null); +var $UnsafePointer = $newType( 4, $kindUnsafePointer, "unsafe.Pointer", "Pointer", "", null); + +var $nativeArray = function(elemKind) { + switch (elemKind) { + case $kindInt: + return Int32Array; + case $kindInt8: + return Int8Array; + case $kindInt16: + return Int16Array; + case $kindInt32: + return Int32Array; + case $kindUint: + return Uint32Array; + case $kindUint8: + return Uint8Array; + case $kindUint16: + return Uint16Array; + case $kindUint32: + return Uint32Array; + case $kindUintptr: + return Uint32Array; + case $kindFloat32: + return Float32Array; + case $kindFloat64: + return Float64Array; + default: + return Array; + } +}; +var $toNativeArray = function(elemKind, array) { + var nativeArray = $nativeArray(elemKind); + if (nativeArray === Array) { + return array; + } + return new nativeArray(array); +}; +var $arrayTypes = {}; +var $arrayType = function(elem, len) { + var string = "[" + len + "]" + elem.string; + var typ = $arrayTypes[string]; + if (typ === undefined) { + typ = $newType(12, $kindArray, string, "", "", null); + $arrayTypes[string] = typ; + typ.init(elem, len); + } + return typ; +}; + +var $chanType = function(elem, sendOnly, recvOnly) { + var string = (recvOnly ? "<-" : "") + "chan" + (sendOnly ? "<- " : " ") + elem.string; + var field = sendOnly ? "SendChan" : (recvOnly ? "RecvChan" : "Chan"); + var typ = elem[field]; + if (typ === undefined) { + typ = $newType(4, $kindChan, string, "", "", null); + elem[field] = typ; + typ.init(elem, sendOnly, recvOnly); + } + return typ; +}; + +var $funcTypes = {}; +var $funcType = function(params, results, variadic) { + var paramTypes = $mapArray(params, function(p) { return p.string; }); + if (variadic) { + paramTypes[paramTypes.length - 1] = "..." + paramTypes[paramTypes.length - 1].substr(2); + } + var string = "func(" + paramTypes.join(", ") + ")"; + if (results.length === 1) { + string += " " + results[0].string; + } else if (results.length > 1) { + string += " (" + $mapArray(results, function(r) { return r.string; }).join(", ") + ")"; + } + var typ = $funcTypes[string]; + if (typ === undefined) { + typ = $newType(4, $kindFunc, string, "", "", null); + $funcTypes[string] = typ; + typ.init(params, results, variadic); + } + return typ; +}; + +var $interfaceTypes = {}; +var $interfaceType = function(methods) { + var string = "interface {}"; + if (methods.length !== 0) { + string = "interface { " + $mapArray(methods, function(m) { + return (m.pkg !== "" ? m.pkg + "." : "") + m.name + m.typ.string.substr(4); + }).join("; ") + " }"; + } + var typ = $interfaceTypes[string]; + if (typ === undefined) { + typ = $newType(8, $kindInterface, string, "", "", null); + $interfaceTypes[string] = typ; + typ.init(methods); + } + return typ; +}; +var $emptyInterface = $interfaceType([]); +var $ifaceNil = { $key: function() { return "nil"; } }; +var $error = $newType(8, $kindInterface, "error", "error", "", null); +$error.init([{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]); + +var $Map = function() {}; +(function() { + var names = Object.getOwnPropertyNames(Object.prototype); + for (var i = 0; i < names.length; i++) { + $Map.prototype[names[i]] = undefined; + } +})(); +var $mapTypes = {}; +var $mapType = function(key, elem) { + var string = "map[" + key.string + "]" + elem.string; + var typ = $mapTypes[string]; + if (typ === undefined) { + typ = $newType(4, $kindMap, string, "", "", null); + $mapTypes[string] = typ; + typ.init(key, elem); + } + return typ; +}; + +var $ptrType = function(elem) { + var typ = elem.ptr; + if (typ === undefined) { + typ = $newType(4, $kindPtr, "*" + elem.string, "", "", null); + elem.ptr = typ; + typ.init(elem); + } + return typ; +}; + +var $newDataPointer = function(data, constructor) { + if (constructor.elem.kind === $kindStruct) { + return data; + } + return new constructor(function() { return data; }, function(v) { data = v; }); +}; + +var $sliceType = function(elem) { + var typ = elem.Slice; + if (typ === undefined) { + typ = $newType(12, $kindSlice, "[]" + elem.string, "", "", null); + elem.Slice = typ; + typ.init(elem); + } + return typ; +}; +var $makeSlice = function(typ, length, capacity) { + capacity = capacity || length; + var array = new typ.nativeArray(capacity); + if (typ.nativeArray === Array) { + for (var i = 0; i < capacity; i++) { + array[i] = typ.elem.zero(); + } + } + var slice = new typ(array); + slice.$length = length; + return slice; +}; + +var $structTypes = {}; +var $structType = function(fields) { + var string = "struct { " + $mapArray(fields, function(f) { + return f.name + " " + f.typ.string + (f.tag !== "" ? (" \"" + f.tag.replace(/\\/g, "\\\\").replace(/"/g, "\\\"") + "\"") : ""); + }).join("; ") + " }"; + if (fields.length === 0) { + string = "struct {}"; + } + var typ = $structTypes[string]; + if (typ === undefined) { + typ = $newType(0, $kindStruct, string, "", "", function() { + this.$val = this; + for (var i = 0; i < fields.length; i++) { + var f = fields[i]; + var arg = arguments[i]; + this[f.prop] = arg !== undefined ? arg : f.typ.zero(); + } + }); + $structTypes[string] = typ; + typ.init(fields); + } + return typ; +}; + +var $assertType = function(value, type, returnTuple) { + var isInterface = (type.kind === $kindInterface), ok, missingMethod = ""; + if (value === $ifaceNil) { + ok = false; + } else if (!isInterface) { + ok = value.constructor === type; + } else { + var valueTypeString = value.constructor.string; + ok = type.implementedBy[valueTypeString]; + if (ok === undefined) { + ok = true; + var valueMethodSet = $methodSet(value.constructor); + var interfaceMethods = type.methods; + for (var i = 0; i < interfaceMethods.length; i++) { + var tm = interfaceMethods[i]; + var found = false; + for (var j = 0; j < valueMethodSet.length; j++) { + var vm = valueMethodSet[j]; + if (vm.name === tm.name && vm.pkg === tm.pkg && vm.typ === tm.typ) { + found = true; + break; + } + } + if (!found) { + ok = false; + type.missingMethodFor[valueTypeString] = tm.name; + break; + } + } + type.implementedBy[valueTypeString] = ok; + } + if (!ok) { + missingMethod = type.missingMethodFor[valueTypeString]; + } + } + + if (!ok) { + if (returnTuple) { + return [type.zero(), false]; + } + $panic(new $packages["runtime"].TypeAssertionError.ptr("", (value === $ifaceNil ? "" : value.constructor.string), type.string, missingMethod)); + } + + if (!isInterface) { + value = value.$val; + } + if (type === $js.Object) { + value = value.Object; + } + return returnTuple ? [value, true] : value; +}; + +var $coerceFloat32 = function(f) { + var math = $packages["math"]; + if (math === undefined) { + return f; + } + return math.Float32frombits(math.Float32bits(f)); +}; + +var $floatKey = function(f) { + if (f !== f) { + $idCounter++; + return "NaN$" + $idCounter; + } + return String(f); +}; + +var $flatten64 = function(x) { + return x.$high * 4294967296 + x.$low; +}; + +var $shiftLeft64 = function(x, y) { + if (y === 0) { + return x; + } + if (y < 32) { + return new x.constructor(x.$high << y | x.$low >>> (32 - y), (x.$low << y) >>> 0); + } + if (y < 64) { + return new x.constructor(x.$low << (y - 32), 0); + } + return new x.constructor(0, 0); +}; + +var $shiftRightInt64 = function(x, y) { + if (y === 0) { + return x; + } + if (y < 32) { + return new x.constructor(x.$high >> y, (x.$low >>> y | x.$high << (32 - y)) >>> 0); + } + if (y < 64) { + return new x.constructor(x.$high >> 31, (x.$high >> (y - 32)) >>> 0); + } + if (x.$high < 0) { + return new x.constructor(-1, 4294967295); + } + return new x.constructor(0, 0); +}; + +var $shiftRightUint64 = function(x, y) { + if (y === 0) { + return x; + } + if (y < 32) { + return new x.constructor(x.$high >>> y, (x.$low >>> y | x.$high << (32 - y)) >>> 0); + } + if (y < 64) { + return new x.constructor(0, x.$high >>> (y - 32)); + } + return new x.constructor(0, 0); +}; + +var $mul64 = function(x, y) { + var high = 0, low = 0; + if ((y.$low & 1) !== 0) { + high = x.$high; + low = x.$low; + } + for (var i = 1; i < 32; i++) { + if ((y.$low & 1<>> (32 - i); + low += (x.$low << i) >>> 0; + } + } + for (var i = 0; i < 32; i++) { + if ((y.$high & 1< yHigh) || (xHigh === yHigh && xLow > yLow))) { + yHigh = (yHigh << 1 | yLow >>> 31) >>> 0; + yLow = (yLow << 1) >>> 0; + n++; + } + for (var i = 0; i <= n; i++) { + high = high << 1 | low >>> 31; + low = (low << 1) >>> 0; + if ((xHigh > yHigh) || (xHigh === yHigh && xLow >= yLow)) { + xHigh = xHigh - yHigh; + xLow = xLow - yLow; + if (xLow < 0) { + xHigh--; + xLow += 4294967296; + } + low++; + if (low === 4294967296) { + high++; + low = 0; + } + } + yLow = (yLow >>> 1 | yHigh << (32 - 1)) >>> 0; + yHigh = yHigh >>> 1; + } + + if (returnRemainder) { + return new x.constructor(xHigh * rs, xLow * rs); + } + return new x.constructor(high * s, low * s); +}; + +var $divComplex = function(n, d) { + var ninf = n.$real === 1/0 || n.$real === -1/0 || n.$imag === 1/0 || n.$imag === -1/0; + var dinf = d.$real === 1/0 || d.$real === -1/0 || d.$imag === 1/0 || d.$imag === -1/0; + var nnan = !ninf && (n.$real !== n.$real || n.$imag !== n.$imag); + var dnan = !dinf && (d.$real !== d.$real || d.$imag !== d.$imag); + if(nnan || dnan) { + return new n.constructor(0/0, 0/0); + } + if (ninf && !dinf) { + return new n.constructor(1/0, 1/0); + } + if (!ninf && dinf) { + return new n.constructor(0, 0); + } + if (d.$real === 0 && d.$imag === 0) { + if (n.$real === 0 && n.$imag === 0) { + return new n.constructor(0/0, 0/0); + } + return new n.constructor(1/0, 1/0); + } + var a = Math.abs(d.$real); + var b = Math.abs(d.$imag); + if (a <= b) { + var ratio = d.$real / d.$imag; + var denom = d.$real * ratio + d.$imag; + return new n.constructor((n.$real * ratio + n.$imag) / denom, (n.$imag * ratio - n.$real) / denom); + } + var ratio = d.$imag / d.$real; + var denom = d.$imag * ratio + d.$real; + return new n.constructor((n.$imag * ratio + n.$real) / denom, (n.$imag - n.$real * ratio) / denom); +}; + +var $stackDepthOffset = 0; +var $getStackDepth = function() { + var err = new Error(); + if (err.stack === undefined) { + return undefined; + } + return $stackDepthOffset + err.stack.split("\n").length; +}; + +var $deferFrames = [], $skippedDeferFrames = 0, $jumpToDefer = false, $panicStackDepth = null, $panicValue; +var $callDeferred = function(deferred, jsErr) { + if ($skippedDeferFrames !== 0) { + $skippedDeferFrames--; + throw jsErr; + } + if ($jumpToDefer) { + $jumpToDefer = false; + throw jsErr; + } + if (jsErr) { + var newErr = null; + try { + $deferFrames.push(deferred); + $panic(new $js.Error.ptr(jsErr)); + } catch (err) { + newErr = err; + } + $deferFrames.pop(); + $callDeferred(deferred, newErr); + return; + } + + $stackDepthOffset--; + var outerPanicStackDepth = $panicStackDepth; + var outerPanicValue = $panicValue; + + var localPanicValue = $curGoroutine.panicStack.pop(); + if (localPanicValue !== undefined) { + $panicStackDepth = $getStackDepth(); + $panicValue = localPanicValue; + } + + var call, localSkippedDeferFrames = 0; + try { + while (true) { + if (deferred === null) { + deferred = $deferFrames[$deferFrames.length - 1 - localSkippedDeferFrames]; + if (deferred === undefined) { + if (localPanicValue.Object instanceof Error) { + throw localPanicValue.Object; + } + var msg; + if (localPanicValue.constructor === $String) { + msg = localPanicValue.$val; + } else if (localPanicValue.Error !== undefined) { + msg = localPanicValue.Error(); + } else if (localPanicValue.String !== undefined) { + msg = localPanicValue.String(); + } else { + msg = localPanicValue; + } + throw new Error(msg); + } + } + var call = deferred.pop(); + if (call === undefined) { + if (localPanicValue !== undefined) { + localSkippedDeferFrames++; + deferred = null; + continue; + } + return; + } + var r = call[0].apply(undefined, call[1]); + if (r && r.$blocking) { + deferred.push([r, []]); + } + + if (localPanicValue !== undefined && $panicStackDepth === null) { + throw null; /* error was recovered */ + } + } + } finally { + $skippedDeferFrames += localSkippedDeferFrames; + if ($curGoroutine.asleep) { + deferred.push(call); + $jumpToDefer = true; + } + if (localPanicValue !== undefined) { + if ($panicStackDepth !== null) { + $curGoroutine.panicStack.push(localPanicValue); + } + $panicStackDepth = outerPanicStackDepth; + $panicValue = outerPanicValue; + } + $stackDepthOffset++; + } +}; + +var $panic = function(value) { + $curGoroutine.panicStack.push(value); + $callDeferred(null, null); +}; +var $recover = function() { + if ($panicStackDepth === null || ($panicStackDepth !== undefined && $panicStackDepth !== $getStackDepth() - 2)) { + return $ifaceNil; + } + $panicStackDepth = null; + return $panicValue; +}; +var $throw = function(err) { throw err; }; + +var $BLOCKING = new Object(); +var $nonblockingCall = function() { + $panic(new $packages["runtime"].NotSupportedError.ptr("non-blocking call to blocking function, see https://github.com/gopherjs/gopherjs#goroutines")); +}; + +var $dummyGoroutine = { asleep: false, exit: false, panicStack: [] }; +var $curGoroutine = $dummyGoroutine, $totalGoroutines = 0, $awakeGoroutines = 0, $checkForDeadlock = true; +var $go = function(fun, args, direct) { + $totalGoroutines++; + $awakeGoroutines++; + args.push($BLOCKING); + var goroutine = function() { + var rescheduled = false; + try { + $curGoroutine = goroutine; + $skippedDeferFrames = 0; + $jumpToDefer = false; + var r = fun.apply(undefined, args); + if (r && r.$blocking) { + fun = r; + args = []; + $schedule(goroutine, direct); + rescheduled = true; + return; + } + goroutine.exit = true; + } catch (err) { + if (!$curGoroutine.asleep) { + goroutine.exit = true; + throw err; + } + } finally { + $curGoroutine = $dummyGoroutine; + if (goroutine.exit && !rescheduled) { /* also set by runtime.Goexit() */ + $totalGoroutines--; + goroutine.asleep = true; + } + if (goroutine.asleep && !rescheduled) { + $awakeGoroutines--; + if ($awakeGoroutines === 0 && $totalGoroutines !== 0 && $checkForDeadlock) { + console.error("fatal error: all goroutines are asleep - deadlock!"); + } + } + } + }; + goroutine.asleep = false; + goroutine.exit = false; + goroutine.panicStack = []; + $schedule(goroutine, direct); +}; + +var $scheduled = [], $schedulerLoopActive = false; +var $schedule = function(goroutine, direct) { + if (goroutine.asleep) { + goroutine.asleep = false; + $awakeGoroutines++; + } + + if (direct) { + goroutine(); + return; + } + + $scheduled.push(goroutine); + if (!$schedulerLoopActive) { + $schedulerLoopActive = true; + setTimeout(function() { + while (true) { + var r = $scheduled.shift(); + if (r === undefined) { + $schedulerLoopActive = false; + break; + } + r(); + }; + }, 0); + } +}; + +var $send = function(chan, value) { + if (chan.$closed) { + $throwRuntimeError("send on closed channel"); + } + var queuedRecv = chan.$recvQueue.shift(); + if (queuedRecv !== undefined) { + queuedRecv([value, true]); + return; + } + if (chan.$buffer.length < chan.$capacity) { + chan.$buffer.push(value); + return; + } + + var thisGoroutine = $curGoroutine; + chan.$sendQueue.push(function() { + $schedule(thisGoroutine); + return value; + }); + var blocked = false; + var f = function() { + if (blocked) { + if (chan.$closed) { + $throwRuntimeError("send on closed channel"); + } + return; + }; + blocked = true; + $curGoroutine.asleep = true; + throw null; + }; + f.$blocking = true; + return f; +}; +var $recv = function(chan) { + var queuedSend = chan.$sendQueue.shift(); + if (queuedSend !== undefined) { + chan.$buffer.push(queuedSend()); + } + var bufferedValue = chan.$buffer.shift(); + if (bufferedValue !== undefined) { + return [bufferedValue, true]; + } + if (chan.$closed) { + return [chan.constructor.elem.zero(), false]; + } + + var thisGoroutine = $curGoroutine, value; + var queueEntry = function(v) { + value = v; + $schedule(thisGoroutine); + }; + chan.$recvQueue.push(queueEntry); + var blocked = false; + var f = function() { + if (blocked) { + return value; + }; + blocked = true; + $curGoroutine.asleep = true; + throw null; + }; + f.$blocking = true; + return f; +}; +var $close = function(chan) { + if (chan.$closed) { + $throwRuntimeError("close of closed channel"); + } + chan.$closed = true; + while (true) { + var queuedSend = chan.$sendQueue.shift(); + if (queuedSend === undefined) { + break; + } + queuedSend(); /* will panic because of closed channel */ + } + while (true) { + var queuedRecv = chan.$recvQueue.shift(); + if (queuedRecv === undefined) { + break; + } + queuedRecv([chan.constructor.elem.zero(), false]); + } +}; +var $select = function(comms) { + var ready = []; + var selection = -1; + for (var i = 0; i < comms.length; i++) { + var comm = comms[i]; + var chan = comm[0]; + switch (comm.length) { + case 0: /* default */ + selection = i; + break; + case 1: /* recv */ + if (chan.$sendQueue.length !== 0 || chan.$buffer.length !== 0 || chan.$closed) { + ready.push(i); + } + break; + case 2: /* send */ + if (chan.$closed) { + $throwRuntimeError("send on closed channel"); + } + if (chan.$recvQueue.length !== 0 || chan.$buffer.length < chan.$capacity) { + ready.push(i); + } + break; + } + } + + if (ready.length !== 0) { + selection = ready[Math.floor(Math.random() * ready.length)]; + } + if (selection !== -1) { + var comm = comms[selection]; + switch (comm.length) { + case 0: /* default */ + return [selection]; + case 1: /* recv */ + return [selection, $recv(comm[0])]; + case 2: /* send */ + $send(comm[0], comm[1]); + return [selection]; + } + } + + var entries = []; + var thisGoroutine = $curGoroutine; + var removeFromQueues = function() { + for (var i = 0; i < entries.length; i++) { + var entry = entries[i]; + var queue = entry[0]; + var index = queue.indexOf(entry[1]); + if (index !== -1) { + queue.splice(index, 1); + } + } + }; + for (var i = 0; i < comms.length; i++) { + (function(i) { + var comm = comms[i]; + switch (comm.length) { + case 1: /* recv */ + var queueEntry = function(value) { + selection = [i, value]; + removeFromQueues(); + $schedule(thisGoroutine); + }; + entries.push([comm[0].$recvQueue, queueEntry]); + comm[0].$recvQueue.push(queueEntry); + break; + case 2: /* send */ + var queueEntry = function() { + if (comm[0].$closed) { + $throwRuntimeError("send on closed channel"); + } + selection = [i]; + removeFromQueues(); + $schedule(thisGoroutine); + return comm[1]; + }; + entries.push([comm[0].$sendQueue, queueEntry]); + comm[0].$sendQueue.push(queueEntry); + break; + } + })(i); + } + var blocked = false; + var f = function() { + if (blocked) { + return selection; + }; + blocked = true; + $curGoroutine.asleep = true; + throw null; + }; + f.$blocking = true; + return f; +}; + +var $js; + +var $needsExternalization = function(t) { + switch (t.kind) { + case $kindBool: + case $kindInt: + case $kindInt8: + case $kindInt16: + case $kindInt32: + case $kindUint: + case $kindUint8: + case $kindUint16: + case $kindUint32: + case $kindUintptr: + case $kindFloat32: + case $kindFloat64: + return false; + case $kindInterface: + return t !== $js.Object; + default: + return true; + } +}; + +var $externalize = function(v, t) { + if ($js !== undefined && t === $js.Object) { + return v; + } + switch (t.kind) { + case $kindBool: + case $kindInt: + case $kindInt8: + case $kindInt16: + case $kindInt32: + case $kindUint: + case $kindUint8: + case $kindUint16: + case $kindUint32: + case $kindUintptr: + case $kindFloat32: + case $kindFloat64: + return v; + case $kindInt64: + case $kindUint64: + return $flatten64(v); + case $kindArray: + if ($needsExternalization(t.elem)) { + return $mapArray(v, function(e) { return $externalize(e, t.elem); }); + } + return v; + case $kindFunc: + if (v === $throwNilPointerError) { + return null; + } + if (v.$externalizeWrapper === undefined) { + $checkForDeadlock = false; + var convert = false; + for (var i = 0; i < t.params.length; i++) { + convert = convert || (t.params[i] !== $js.Object); + } + for (var i = 0; i < t.results.length; i++) { + convert = convert || $needsExternalization(t.results[i]); + } + v.$externalizeWrapper = v; + if (convert) { + v.$externalizeWrapper = function() { + var args = []; + for (var i = 0; i < t.params.length; i++) { + if (t.variadic && i === t.params.length - 1) { + var vt = t.params[i].elem, varargs = []; + for (var j = i; j < arguments.length; j++) { + varargs.push($internalize(arguments[j], vt)); + } + args.push(new (t.params[i])(varargs)); + break; + } + args.push($internalize(arguments[i], t.params[i])); + } + var result = v.apply(this, args); + switch (t.results.length) { + case 0: + return; + case 1: + return $externalize(result, t.results[0]); + default: + for (var i = 0; i < t.results.length; i++) { + result[i] = $externalize(result[i], t.results[i]); + } + return result; + } + }; + } + } + return v.$externalizeWrapper; + case $kindInterface: + if (v === $ifaceNil) { + return null; + } + return $externalize(v.$val, v.constructor); + case $kindMap: + var m = {}; + var keys = $keys(v); + for (var i = 0; i < keys.length; i++) { + var entry = v[keys[i]]; + m[$externalize(entry.k, t.key)] = $externalize(entry.v, t.elem); + } + return m; + case $kindPtr: + if (v === t.nil) { + return null; + } + return $externalize(v.$get(), t.elem); + case $kindSlice: + if ($needsExternalization(t.elem)) { + return $mapArray($sliceToArray(v), function(e) { return $externalize(e, t.elem); }); + } + return $sliceToArray(v); + case $kindString: + if (v.search(/^[\x00-\x7F]*$/) !== -1) { + return v; + } + var s = "", r; + for (var i = 0; i < v.length; i += r[1]) { + r = $decodeRune(v, i); + s += String.fromCharCode(r[0]); + } + return s; + case $kindStruct: + var timePkg = $packages["time"]; + if (timePkg && v.constructor === timePkg.Time.ptr) { + var milli = $div64(v.UnixNano(), new $Int64(0, 1000000)); + return new Date($flatten64(milli)); + } + + var searchJsObject = function(v, t) { + if (t === $js.Object) { + return v; + } + if (t.kind === $kindPtr && v !== t.nil) { + var o = searchJsObject(v.$get(), t.elem); + if (o !== undefined) { + return o; + } + } + if (t.kind === $kindStruct) { + for (var i = 0; i < t.fields.length; i++) { + var f = t.fields[i]; + var o = searchJsObject(v[f.prop], f.typ); + if (o !== undefined) { + return o; + } + } + } + return undefined; + }; + var o = searchJsObject(v, t); + if (o !== undefined) { + return o; + } + + o = {}; + for (var i = 0; i < t.fields.length; i++) { + var f = t.fields[i]; + if (f.pkg !== "") { /* not exported */ + continue; + } + o[f.name] = $externalize(v[f.prop], f.typ); + } + return o; + } + $panic(new $String("cannot externalize " + t.string)); +}; + +var $internalize = function(v, t, recv) { + if (t === $js.Object) { + return v; + } + switch (t.kind) { + case $kindBool: + return !!v; + case $kindInt: + return parseInt(v); + case $kindInt8: + return parseInt(v) << 24 >> 24; + case $kindInt16: + return parseInt(v) << 16 >> 16; + case $kindInt32: + return parseInt(v) >> 0; + case $kindUint: + return parseInt(v); + case $kindUint8: + return parseInt(v) << 24 >>> 24; + case $kindUint16: + return parseInt(v) << 16 >>> 16; + case $kindUint32: + case $kindUintptr: + return parseInt(v) >>> 0; + case $kindInt64: + case $kindUint64: + return new t(0, v); + case $kindFloat32: + case $kindFloat64: + return parseFloat(v); + case $kindArray: + if (v.length !== t.len) { + $throwRuntimeError("got array with wrong size from JavaScript native"); + } + return $mapArray(v, function(e) { return $internalize(e, t.elem); }); + case $kindFunc: + return function() { + var args = []; + for (var i = 0; i < t.params.length; i++) { + if (t.variadic && i === t.params.length - 1) { + var vt = t.params[i].elem, varargs = arguments[i]; + for (var j = 0; j < varargs.$length; j++) { + args.push($externalize(varargs.$array[varargs.$offset + j], vt)); + } + break; + } + args.push($externalize(arguments[i], t.params[i])); + } + var result = v.apply(recv, args); + switch (t.results.length) { + case 0: + return; + case 1: + return $internalize(result, t.results[0]); + default: + for (var i = 0; i < t.results.length; i++) { + result[i] = $internalize(result[i], t.results[i]); + } + return result; + } + }; + case $kindInterface: + if (t.methods.length !== 0) { + $panic(new $String("cannot internalize " + t.string)); + } + if (v === null) { + return $ifaceNil; + } + switch (v.constructor) { + case Int8Array: + return new ($sliceType($Int8))(v); + case Int16Array: + return new ($sliceType($Int16))(v); + case Int32Array: + return new ($sliceType($Int))(v); + case Uint8Array: + return new ($sliceType($Uint8))(v); + case Uint16Array: + return new ($sliceType($Uint16))(v); + case Uint32Array: + return new ($sliceType($Uint))(v); + case Float32Array: + return new ($sliceType($Float32))(v); + case Float64Array: + return new ($sliceType($Float64))(v); + case Array: + return $internalize(v, $sliceType($emptyInterface)); + case Boolean: + return new $Bool(!!v); + case Date: + var timePkg = $packages["time"]; + if (timePkg) { + return new timePkg.Time(timePkg.Unix(new $Int64(0, 0), new $Int64(0, v.getTime() * 1000000))); + } + case Function: + var funcType = $funcType([$sliceType($emptyInterface)], [$js.Object], true); + return new funcType($internalize(v, funcType)); + case Number: + return new $Float64(parseFloat(v)); + case String: + return new $String($internalize(v, $String)); + default: + if ($global.Node && v instanceof $global.Node) { + return new $js.container.ptr(v); + } + var mapType = $mapType($String, $emptyInterface); + return new mapType($internalize(v, mapType)); + } + case $kindMap: + var m = new $Map(); + var keys = $keys(v); + for (var i = 0; i < keys.length; i++) { + var key = $internalize(keys[i], t.key); + m[key.$key ? key.$key() : key] = { k: key, v: $internalize(v[keys[i]], t.elem) }; + } + return m; + case $kindPtr: + if (t.elem.kind === $kindStruct) { + return $internalize(v, t.elem); + } + case $kindSlice: + return new t($mapArray(v, function(e) { return $internalize(e, t.elem); })); + case $kindString: + v = String(v); + if (v.search(/^[\x00-\x7F]*$/) !== -1) { + return v; + } + var s = ""; + for (var i = 0; i < v.length; i++) { + s += $encodeRune(v.charCodeAt(i)); + } + return s; + case $kindStruct: + var searchJsObject = function(v, t) { + if (t === $js.Object) { + return v; + } + if (t.kind === $kindPtr && t.elem.kind === $kindStruct) { + var o = searchJsObject(v, t.elem); + if (o !== undefined) { + return o; + } + } + if (t.kind === $kindStruct) { + for (var i = 0; i < t.fields.length; i++) { + var f = t.fields[i]; + var o = searchJsObject(v, f.typ); + if (o !== undefined) { + var n = new t.ptr(); + n[f.prop] = o; + return n; + } + } + } + return undefined; + }; + var o = searchJsObject(v, t); + if (o !== undefined) { + return o; + } + } + $panic(new $String("cannot internalize " + t.string)); +}; + +$packages["github.com/gopherjs/gopherjs/js"] = (function() { + var $pkg = {}, Object, container, Error, sliceType$1, ptrType, ptrType$1, init; + Object = $pkg.Object = $newType(8, $kindInterface, "js.Object", "Object", "github.com/gopherjs/gopherjs/js", null); + container = $pkg.container = $newType(0, $kindStruct, "js.container", "container", "github.com/gopherjs/gopherjs/js", function(Object_) { + this.$val = this; + this.Object = Object_ !== undefined ? Object_ : null; + }); + Error = $pkg.Error = $newType(0, $kindStruct, "js.Error", "Error", "github.com/gopherjs/gopherjs/js", function(Object_) { + this.$val = this; + this.Object = Object_ !== undefined ? Object_ : null; + }); + sliceType$1 = $sliceType($emptyInterface); + ptrType = $ptrType(container); + ptrType$1 = $ptrType(Error); + container.ptr.prototype.Get = function(key) { + var c, key; + c = this; + return c.Object[$externalize(key, $String)]; + }; + container.prototype.Get = function(key) { return this.$val.Get(key); }; + container.ptr.prototype.Set = function(key, value) { + var c, key, value; + c = this; + c.Object[$externalize(key, $String)] = $externalize(value, $emptyInterface); + }; + container.prototype.Set = function(key, value) { return this.$val.Set(key, value); }; + container.ptr.prototype.Delete = function(key) { + var c, key; + c = this; + delete c.Object[$externalize(key, $String)]; + }; + container.prototype.Delete = function(key) { return this.$val.Delete(key); }; + container.ptr.prototype.Length = function() { + var c; + c = this; + return $parseInt(c.Object.length); + }; + container.prototype.Length = function() { return this.$val.Length(); }; + container.ptr.prototype.Index = function(i) { + var c, i; + c = this; + return c.Object[i]; + }; + container.prototype.Index = function(i) { return this.$val.Index(i); }; + container.ptr.prototype.SetIndex = function(i, value) { + var c, i, value; + c = this; + c.Object[i] = $externalize(value, $emptyInterface); + }; + container.prototype.SetIndex = function(i, value) { return this.$val.SetIndex(i, value); }; + container.ptr.prototype.Call = function(name, args) { + var args, c, name, obj; + c = this; + return (obj = c.Object, obj[$externalize(name, $String)].apply(obj, $externalize(args, sliceType$1))); + }; + container.prototype.Call = function(name, args) { return this.$val.Call(name, args); }; + container.ptr.prototype.Invoke = function(args) { + var args, c; + c = this; + return c.Object.apply(undefined, $externalize(args, sliceType$1)); + }; + container.prototype.Invoke = function(args) { return this.$val.Invoke(args); }; + container.ptr.prototype.New = function(args) { + var args, c; + c = this; + return new ($global.Function.prototype.bind.apply(c.Object, [undefined].concat($externalize(args, sliceType$1)))); + }; + container.prototype.New = function(args) { return this.$val.New(args); }; + container.ptr.prototype.Bool = function() { + var c; + c = this; + return !!(c.Object); + }; + container.prototype.Bool = function() { return this.$val.Bool(); }; + container.ptr.prototype.String = function() { + var c; + c = this; + return $internalize(c.Object, $String); + }; + container.prototype.String = function() { return this.$val.String(); }; + container.ptr.prototype.Int = function() { + var c; + c = this; + return $parseInt(c.Object) >> 0; + }; + container.prototype.Int = function() { return this.$val.Int(); }; + container.ptr.prototype.Int64 = function() { + var c; + c = this; + return $internalize(c.Object, $Int64); + }; + container.prototype.Int64 = function() { return this.$val.Int64(); }; + container.ptr.prototype.Uint64 = function() { + var c; + c = this; + return $internalize(c.Object, $Uint64); + }; + container.prototype.Uint64 = function() { return this.$val.Uint64(); }; + container.ptr.prototype.Float = function() { + var c; + c = this; + return $parseFloat(c.Object); + }; + container.prototype.Float = function() { return this.$val.Float(); }; + container.ptr.prototype.Interface = function() { + var c; + c = this; + return $internalize(c.Object, $emptyInterface); + }; + container.prototype.Interface = function() { return this.$val.Interface(); }; + container.ptr.prototype.Unsafe = function() { + var c; + c = this; + return c.Object; + }; + container.prototype.Unsafe = function() { return this.$val.Unsafe(); }; + Error.ptr.prototype.Error = function() { + var err; + err = this; + return "JavaScript error: " + $internalize(err.Object.message, $String); + }; + Error.prototype.Error = function() { return this.$val.Error(); }; + Error.ptr.prototype.Stack = function() { + var err; + err = this; + return $internalize(err.Object.stack, $String); + }; + Error.prototype.Stack = function() { return this.$val.Stack(); }; + init = function() { + var _tmp, _tmp$1, c, e; + c = new container.ptr(null); + e = new Error.ptr(null); + + }; + ptrType.methods = [{prop: "Get", name: "Get", pkg: "", typ: $funcType([$String], [Object], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$String, $emptyInterface], [], false)}, {prop: "Delete", name: "Delete", pkg: "", typ: $funcType([$String], [], false)}, {prop: "Length", name: "Length", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([$Int], [Object], false)}, {prop: "SetIndex", name: "SetIndex", pkg: "", typ: $funcType([$Int, $emptyInterface], [], false)}, {prop: "Call", name: "Call", pkg: "", typ: $funcType([$String, sliceType$1], [Object], true)}, {prop: "Invoke", name: "Invoke", pkg: "", typ: $funcType([sliceType$1], [Object], true)}, {prop: "New", name: "New", pkg: "", typ: $funcType([sliceType$1], [Object], true)}, {prop: "Bool", name: "Bool", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Int", name: "Int", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Int64", name: "Int64", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Uint64", name: "Uint64", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "Float", name: "Float", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Interface", name: "Interface", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Unsafe", name: "Unsafe", pkg: "", typ: $funcType([], [$Uintptr], false)}]; + ptrType$1.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Stack", name: "Stack", pkg: "", typ: $funcType([], [$String], false)}]; + Object.init([{prop: "Bool", name: "Bool", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Call", name: "Call", pkg: "", typ: $funcType([$String, sliceType$1], [Object], true)}, {prop: "Delete", name: "Delete", pkg: "", typ: $funcType([$String], [], false)}, {prop: "Float", name: "Float", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$String], [Object], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([$Int], [Object], false)}, {prop: "Int", name: "Int", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Int64", name: "Int64", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Interface", name: "Interface", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Invoke", name: "Invoke", pkg: "", typ: $funcType([sliceType$1], [Object], true)}, {prop: "Length", name: "Length", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([sliceType$1], [Object], true)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$String, $emptyInterface], [], false)}, {prop: "SetIndex", name: "SetIndex", pkg: "", typ: $funcType([$Int, $emptyInterface], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Uint64", name: "Uint64", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "Unsafe", name: "Unsafe", pkg: "", typ: $funcType([], [$Uintptr], false)}]); + container.init([{prop: "Object", name: "", pkg: "", typ: Object, tag: ""}]); + Error.init([{prop: "Object", name: "", pkg: "", typ: Object, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_js = function() { while (true) { switch ($s) { case 0: + init(); + /* */ } return; } }; $init_js.$blocking = true; return $init_js; + }; + return $pkg; +})(); +$packages["runtime"] = (function() { + var $pkg = {}, js, NotSupportedError, TypeAssertionError, errorString, ptrType$5, ptrType$6, init, GOROOT, GOMAXPROCS, SetFinalizer; + js = $packages["github.com/gopherjs/gopherjs/js"]; + NotSupportedError = $pkg.NotSupportedError = $newType(0, $kindStruct, "runtime.NotSupportedError", "NotSupportedError", "runtime", function(Feature_) { + this.$val = this; + this.Feature = Feature_ !== undefined ? Feature_ : ""; + }); + TypeAssertionError = $pkg.TypeAssertionError = $newType(0, $kindStruct, "runtime.TypeAssertionError", "TypeAssertionError", "runtime", function(interfaceString_, concreteString_, assertedString_, missingMethod_) { + this.$val = this; + this.interfaceString = interfaceString_ !== undefined ? interfaceString_ : ""; + this.concreteString = concreteString_ !== undefined ? concreteString_ : ""; + this.assertedString = assertedString_ !== undefined ? assertedString_ : ""; + this.missingMethod = missingMethod_ !== undefined ? missingMethod_ : ""; + }); + errorString = $pkg.errorString = $newType(8, $kindString, "runtime.errorString", "errorString", "runtime", null); + ptrType$5 = $ptrType(NotSupportedError); + ptrType$6 = $ptrType(TypeAssertionError); + NotSupportedError.ptr.prototype.Error = function() { + var err; + err = this; + return "not supported by GopherJS: " + err.Feature; + }; + NotSupportedError.prototype.Error = function() { return this.$val.Error(); }; + init = function() { + var e; + $js = $packages[$externalize("github.com/gopherjs/gopherjs/js", $String)]; + $throwRuntimeError = (function(msg) { + var msg; + $panic(new errorString(msg)); + }); + e = $ifaceNil; + e = new TypeAssertionError.ptr("", "", "", ""); + e = new NotSupportedError.ptr(""); + }; + GOROOT = $pkg.GOROOT = function() { + var goroot, process; + process = $global.process; + if (process === undefined) { + return "/"; + } + goroot = process.env.GOROOT; + if (!(goroot === undefined)) { + return $internalize(goroot, $String); + } + return "/usr/local/go"; + }; + GOMAXPROCS = $pkg.GOMAXPROCS = function(n) { + var n; + if (n > 1) { + $panic(new NotSupportedError.ptr("GOMAXPROCS > 1")); + } + return 1; + }; + SetFinalizer = $pkg.SetFinalizer = function(x, f) { + var f, x; + }; + TypeAssertionError.ptr.prototype.RuntimeError = function() { + }; + TypeAssertionError.prototype.RuntimeError = function() { return this.$val.RuntimeError(); }; + TypeAssertionError.ptr.prototype.Error = function() { + var e, inter; + e = this; + inter = e.interfaceString; + if (inter === "") { + inter = "interface"; + } + if (e.concreteString === "") { + return "interface conversion: " + inter + " is nil, not " + e.assertedString; + } + if (e.missingMethod === "") { + return "interface conversion: " + inter + " is " + e.concreteString + ", not " + e.assertedString; + } + return "interface conversion: " + e.concreteString + " is not " + e.assertedString + ": missing method " + e.missingMethod; + }; + TypeAssertionError.prototype.Error = function() { return this.$val.Error(); }; + errorString.prototype.RuntimeError = function() { + var e; + e = this.$val; + }; + $ptrType(errorString).prototype.RuntimeError = function() { return new errorString(this.$get()).RuntimeError(); }; + errorString.prototype.Error = function() { + var e; + e = this.$val; + return "runtime error: " + e; + }; + $ptrType(errorString).prototype.Error = function() { return new errorString(this.$get()).Error(); }; + ptrType$5.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$6.methods = [{prop: "RuntimeError", name: "RuntimeError", pkg: "", typ: $funcType([], [], false)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + errorString.methods = [{prop: "RuntimeError", name: "RuntimeError", pkg: "", typ: $funcType([], [], false)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + NotSupportedError.init([{prop: "Feature", name: "Feature", pkg: "", typ: $String, tag: ""}]); + TypeAssertionError.init([{prop: "interfaceString", name: "interfaceString", pkg: "runtime", typ: $String, tag: ""}, {prop: "concreteString", name: "concreteString", pkg: "runtime", typ: $String, tag: ""}, {prop: "assertedString", name: "assertedString", pkg: "runtime", typ: $String, tag: ""}, {prop: "missingMethod", name: "missingMethod", pkg: "runtime", typ: $String, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_runtime = function() { while (true) { switch ($s) { case 0: + $r = js.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + init(); + /* */ } return; } }; $init_runtime.$blocking = true; return $init_runtime; + }; + return $pkg; +})(); +$packages["errors"] = (function() { + var $pkg = {}, errorString, ptrType, New; + errorString = $pkg.errorString = $newType(0, $kindStruct, "errors.errorString", "errorString", "errors", function(s_) { + this.$val = this; + this.s = s_ !== undefined ? s_ : ""; + }); + ptrType = $ptrType(errorString); + New = $pkg.New = function(text) { + var text; + return new errorString.ptr(text); + }; + errorString.ptr.prototype.Error = function() { + var e; + e = this; + return e.s; + }; + errorString.prototype.Error = function() { return this.$val.Error(); }; + ptrType.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + errorString.init([{prop: "s", name: "s", pkg: "errors", typ: $String, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_errors = function() { while (true) { switch ($s) { case 0: + /* */ } return; } }; $init_errors.$blocking = true; return $init_errors; + }; + return $pkg; +})(); +$packages["sync/atomic"] = (function() { + var $pkg = {}, js, CompareAndSwapInt32, AddInt32, LoadUint32, StoreInt32, StoreUint32; + js = $packages["github.com/gopherjs/gopherjs/js"]; + CompareAndSwapInt32 = $pkg.CompareAndSwapInt32 = function(addr, old, new$1) { + var addr, new$1, old; + if (addr.$get() === old) { + addr.$set(new$1); + return true; + } + return false; + }; + AddInt32 = $pkg.AddInt32 = function(addr, delta) { + var addr, delta, new$1; + new$1 = addr.$get() + delta >> 0; + addr.$set(new$1); + return new$1; + }; + LoadUint32 = $pkg.LoadUint32 = function(addr) { + var addr; + return addr.$get(); + }; + StoreInt32 = $pkg.StoreInt32 = function(addr, val) { + var addr, val; + addr.$set(val); + }; + StoreUint32 = $pkg.StoreUint32 = function(addr, val) { + var addr, val; + addr.$set(val); + }; + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_atomic = function() { while (true) { switch ($s) { case 0: + $r = js.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + /* */ } return; } }; $init_atomic.$blocking = true; return $init_atomic; + }; + return $pkg; +})(); +$packages["sync"] = (function() { + var $pkg = {}, runtime, atomic, Pool, Mutex, Locker, Once, poolLocal, syncSema, RWMutex, rlocker, ptrType, sliceType, structType, chanType, sliceType$1, ptrType$2, ptrType$3, ptrType$5, sliceType$3, ptrType$7, ptrType$8, funcType, ptrType$10, funcType$1, ptrType$11, arrayType, semWaiters, allPools, runtime_registerPoolCleanup, runtime_Semacquire, runtime_Semrelease, runtime_Syncsemcheck, poolCleanup, init, indexLocal, raceEnable, init$1; + runtime = $packages["runtime"]; + atomic = $packages["sync/atomic"]; + Pool = $pkg.Pool = $newType(0, $kindStruct, "sync.Pool", "Pool", "sync", function(local_, localSize_, store_, New_) { + this.$val = this; + this.local = local_ !== undefined ? local_ : 0; + this.localSize = localSize_ !== undefined ? localSize_ : 0; + this.store = store_ !== undefined ? store_ : sliceType$3.nil; + this.New = New_ !== undefined ? New_ : $throwNilPointerError; + }); + Mutex = $pkg.Mutex = $newType(0, $kindStruct, "sync.Mutex", "Mutex", "sync", function(state_, sema_) { + this.$val = this; + this.state = state_ !== undefined ? state_ : 0; + this.sema = sema_ !== undefined ? sema_ : 0; + }); + Locker = $pkg.Locker = $newType(8, $kindInterface, "sync.Locker", "Locker", "sync", null); + Once = $pkg.Once = $newType(0, $kindStruct, "sync.Once", "Once", "sync", function(m_, done_) { + this.$val = this; + this.m = m_ !== undefined ? m_ : new Mutex.ptr(); + this.done = done_ !== undefined ? done_ : 0; + }); + poolLocal = $pkg.poolLocal = $newType(0, $kindStruct, "sync.poolLocal", "poolLocal", "sync", function(private$0_, shared_, Mutex_, pad_) { + this.$val = this; + this.private$0 = private$0_ !== undefined ? private$0_ : $ifaceNil; + this.shared = shared_ !== undefined ? shared_ : sliceType$3.nil; + this.Mutex = Mutex_ !== undefined ? Mutex_ : new Mutex.ptr(); + this.pad = pad_ !== undefined ? pad_ : arrayType.zero(); + }); + syncSema = $pkg.syncSema = $newType(0, $kindStruct, "sync.syncSema", "syncSema", "sync", function(lock_, head_, tail_) { + this.$val = this; + this.lock = lock_ !== undefined ? lock_ : 0; + this.head = head_ !== undefined ? head_ : 0; + this.tail = tail_ !== undefined ? tail_ : 0; + }); + RWMutex = $pkg.RWMutex = $newType(0, $kindStruct, "sync.RWMutex", "RWMutex", "sync", function(w_, writerSem_, readerSem_, readerCount_, readerWait_) { + this.$val = this; + this.w = w_ !== undefined ? w_ : new Mutex.ptr(); + this.writerSem = writerSem_ !== undefined ? writerSem_ : 0; + this.readerSem = readerSem_ !== undefined ? readerSem_ : 0; + this.readerCount = readerCount_ !== undefined ? readerCount_ : 0; + this.readerWait = readerWait_ !== undefined ? readerWait_ : 0; + }); + rlocker = $pkg.rlocker = $newType(0, $kindStruct, "sync.rlocker", "rlocker", "sync", function(w_, writerSem_, readerSem_, readerCount_, readerWait_) { + this.$val = this; + this.w = w_ !== undefined ? w_ : new Mutex.ptr(); + this.writerSem = writerSem_ !== undefined ? writerSem_ : 0; + this.readerSem = readerSem_ !== undefined ? readerSem_ : 0; + this.readerCount = readerCount_ !== undefined ? readerCount_ : 0; + this.readerWait = readerWait_ !== undefined ? readerWait_ : 0; + }); + ptrType = $ptrType(Pool); + sliceType = $sliceType(ptrType); + structType = $structType([]); + chanType = $chanType(structType, false, false); + sliceType$1 = $sliceType(chanType); + ptrType$2 = $ptrType($Uint32); + ptrType$3 = $ptrType($Int32); + ptrType$5 = $ptrType(poolLocal); + sliceType$3 = $sliceType($emptyInterface); + ptrType$7 = $ptrType(rlocker); + ptrType$8 = $ptrType(RWMutex); + funcType = $funcType([], [$emptyInterface], false); + ptrType$10 = $ptrType(Mutex); + funcType$1 = $funcType([], [], false); + ptrType$11 = $ptrType(Once); + arrayType = $arrayType($Uint8, 128); + Pool.ptr.prototype.Get = function() { + var p, x, x$1, x$2; + p = this; + if (p.store.$length === 0) { + if (!(p.New === $throwNilPointerError)) { + return p.New(); + } + return $ifaceNil; + } + x$2 = (x = p.store, x$1 = p.store.$length - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])); + p.store = $subslice(p.store, 0, (p.store.$length - 1 >> 0)); + return x$2; + }; + Pool.prototype.Get = function() { return this.$val.Get(); }; + Pool.ptr.prototype.Put = function(x) { + var p, x; + p = this; + if ($interfaceIsEqual(x, $ifaceNil)) { + return; + } + p.store = $append(p.store, x); + }; + Pool.prototype.Put = function(x) { return this.$val.Put(x); }; + runtime_registerPoolCleanup = function(cleanup) { + var cleanup; + }; + runtime_Semacquire = function(s, $b) { + var $args = arguments, $r, $s = 0, $this = this, _entry, _key, _r, ch; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_runtime_Semacquire = function() { s: while (true) { switch ($s) { case 0: + /* if (s.$get() === 0) { */ if (s.$get() === 0) {} else { $s = 1; continue; } + ch = new chanType(0); + _key = s; (semWaiters || $throwRuntimeError("assignment to entry in nil map"))[_key.$key()] = { k: _key, v: $append((_entry = semWaiters[s.$key()], _entry !== undefined ? _entry.v : sliceType$1.nil), ch) }; + _r = $recv(ch, $BLOCKING); /* */ $s = 2; case 2: if (_r && _r.$blocking) { _r = _r(); } + _r[0]; + /* } */ case 1: + s.$set(s.$get() - (1) >>> 0); + /* */ case -1: } return; } }; $blocking_runtime_Semacquire.$blocking = true; return $blocking_runtime_Semacquire; + }; + runtime_Semrelease = function(s, $b) { + var $args = arguments, $r, $s = 0, $this = this, _entry, _key, ch, w; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_runtime_Semrelease = function() { s: while (true) { switch ($s) { case 0: + s.$set(s.$get() + (1) >>> 0); + w = (_entry = semWaiters[s.$key()], _entry !== undefined ? _entry.v : sliceType$1.nil); + if (w.$length === 0) { + return; + } + ch = ((0 < 0 || 0 >= w.$length) ? $throwRuntimeError("index out of range") : w.$array[w.$offset + 0]); + w = $subslice(w, 1); + _key = s; (semWaiters || $throwRuntimeError("assignment to entry in nil map"))[_key.$key()] = { k: _key, v: w }; + if (w.$length === 0) { + delete semWaiters[s.$key()]; + } + $r = $send(ch, new structType.ptr(), $BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + /* */ case -1: } return; } }; $blocking_runtime_Semrelease.$blocking = true; return $blocking_runtime_Semrelease; + }; + runtime_Syncsemcheck = function(size) { + var size; + }; + Mutex.ptr.prototype.Lock = function($b) { + var $args = arguments, $r, $s = 0, $this = this, awoke, m, new$1, old; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Lock = function() { s: while (true) { switch ($s) { case 0: + m = $this; + if (atomic.CompareAndSwapInt32(new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m), 0, 1)) { + return; + } + awoke = false; + /* while (true) { */ case 1: + /* if (!(true)) { break; } */ if(!(true)) { $s = 2; continue; } + old = m.state; + new$1 = old | 1; + if (!(((old & 1) === 0))) { + new$1 = old + 4 >> 0; + } + if (awoke) { + new$1 = new$1 & ~(2); + } + /* if (atomic.CompareAndSwapInt32(new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m), old, new$1)) { */ if (atomic.CompareAndSwapInt32(new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m), old, new$1)) {} else { $s = 3; continue; } + if ((old & 1) === 0) { + /* break; */ $s = 2; continue; + } + $r = runtime_Semacquire(new ptrType$2(function() { return this.$target.sema; }, function($v) { this.$target.sema = $v; }, m), $BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + awoke = true; + /* } */ case 3: + /* } */ $s = 1; continue; case 2: + /* */ case -1: } return; } }; $blocking_Lock.$blocking = true; return $blocking_Lock; + }; + Mutex.prototype.Lock = function($b) { return this.$val.Lock($b); }; + Mutex.ptr.prototype.Unlock = function($b) { + var $args = arguments, $r, $s = 0, $this = this, m, new$1, old; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Unlock = function() { s: while (true) { switch ($s) { case 0: + m = $this; + new$1 = atomic.AddInt32(new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m), -1); + if ((((new$1 + 1 >> 0)) & 1) === 0) { + $panic(new $String("sync: unlock of unlocked mutex")); + } + old = new$1; + /* while (true) { */ case 1: + /* if (!(true)) { break; } */ if(!(true)) { $s = 2; continue; } + if (((old >> 2 >> 0) === 0) || !(((old & 3) === 0))) { + return; + } + new$1 = ((old - 4 >> 0)) | 2; + /* if (atomic.CompareAndSwapInt32(new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m), old, new$1)) { */ if (atomic.CompareAndSwapInt32(new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m), old, new$1)) {} else { $s = 3; continue; } + $r = runtime_Semrelease(new ptrType$2(function() { return this.$target.sema; }, function($v) { this.$target.sema = $v; }, m), $BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + return; + /* } */ case 3: + old = m.state; + /* } */ $s = 1; continue; case 2: + /* */ case -1: } return; } }; $blocking_Unlock.$blocking = true; return $blocking_Unlock; + }; + Mutex.prototype.Unlock = function($b) { return this.$val.Unlock($b); }; + Once.ptr.prototype.Do = function(f, $b) { + var $args = arguments, $deferred = [], $err = null, $r, $s = 0, $this = this, o; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Do = function() { try { $deferFrames.push($deferred); s: while (true) { switch ($s) { case 0: + o = $this; + if (atomic.LoadUint32(new ptrType$2(function() { return this.$target.done; }, function($v) { this.$target.done = $v; }, o)) === 1) { + return; + } + $r = o.m.Lock($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $deferred.push([$methodVal(o.m, "Unlock"), [$BLOCKING]]); + if (o.done === 0) { + $deferred.push([atomic.StoreUint32, [new ptrType$2(function() { return this.$target.done; }, function($v) { this.$target.done = $v; }, o), 1, $BLOCKING]]); + f(); + } + /* */ case -1: } return; } } catch(err) { $err = err; } finally { $deferFrames.pop(); if ($curGoroutine.asleep && !$jumpToDefer) { throw null; } $s = -1; $callDeferred($deferred, $err); } }; $blocking_Do.$blocking = true; return $blocking_Do; + }; + Once.prototype.Do = function(f, $b) { return this.$val.Do(f, $b); }; + poolCleanup = function() { + var _i, _i$1, _ref, _ref$1, i, i$1, j, l, p, x; + _ref = allPools; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + p = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + (i < 0 || i >= allPools.$length) ? $throwRuntimeError("index out of range") : allPools.$array[allPools.$offset + i] = ptrType.nil; + i$1 = 0; + while (true) { + if (!(i$1 < (p.localSize >> 0))) { break; } + l = indexLocal(p.local, i$1); + l.private$0 = $ifaceNil; + _ref$1 = l.shared; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + j = _i$1; + (x = l.shared, (j < 0 || j >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + j] = $ifaceNil); + _i$1++; + } + l.shared = sliceType$3.nil; + i$1 = i$1 + (1) >> 0; + } + p.local = 0; + p.localSize = 0; + _i++; + } + allPools = new sliceType([]); + }; + init = function() { + runtime_registerPoolCleanup(poolCleanup); + }; + indexLocal = function(l, i) { + var i, l, x; + return (x = l, (x.nilCheck, ((i < 0 || i >= x.length) ? $throwRuntimeError("index out of range") : x[i]))); + }; + raceEnable = function() { + }; + init$1 = function() { + var s; + s = $clone(new syncSema.ptr(), syncSema); + runtime_Syncsemcheck(12); + }; + RWMutex.ptr.prototype.RLock = function($b) { + var $args = arguments, $r, $s = 0, $this = this, rw; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_RLock = function() { s: while (true) { switch ($s) { case 0: + rw = $this; + /* if (atomic.AddInt32(new ptrType$3(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw), 1) < 0) { */ if (atomic.AddInt32(new ptrType$3(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw), 1) < 0) {} else { $s = 1; continue; } + $r = runtime_Semacquire(new ptrType$2(function() { return this.$target.readerSem; }, function($v) { this.$target.readerSem = $v; }, rw), $BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + /* } */ case 1: + /* */ case -1: } return; } }; $blocking_RLock.$blocking = true; return $blocking_RLock; + }; + RWMutex.prototype.RLock = function($b) { return this.$val.RLock($b); }; + RWMutex.ptr.prototype.RUnlock = function($b) { + var $args = arguments, $r, $s = 0, $this = this, r, rw; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_RUnlock = function() { s: while (true) { switch ($s) { case 0: + rw = $this; + r = atomic.AddInt32(new ptrType$3(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw), -1); + /* if (r < 0) { */ if (r < 0) {} else { $s = 1; continue; } + if (((r + 1 >> 0) === 0) || ((r + 1 >> 0) === -1073741824)) { + raceEnable(); + $panic(new $String("sync: RUnlock of unlocked RWMutex")); + } + /* if (atomic.AddInt32(new ptrType$3(function() { return this.$target.readerWait; }, function($v) { this.$target.readerWait = $v; }, rw), -1) === 0) { */ if (atomic.AddInt32(new ptrType$3(function() { return this.$target.readerWait; }, function($v) { this.$target.readerWait = $v; }, rw), -1) === 0) {} else { $s = 2; continue; } + $r = runtime_Semrelease(new ptrType$2(function() { return this.$target.writerSem; }, function($v) { this.$target.writerSem = $v; }, rw), $BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + /* } */ case 2: + /* } */ case 1: + /* */ case -1: } return; } }; $blocking_RUnlock.$blocking = true; return $blocking_RUnlock; + }; + RWMutex.prototype.RUnlock = function($b) { return this.$val.RUnlock($b); }; + RWMutex.ptr.prototype.Lock = function($b) { + var $args = arguments, $r, $s = 0, $this = this, r, rw; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Lock = function() { s: while (true) { switch ($s) { case 0: + rw = $this; + $r = rw.w.Lock($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + r = atomic.AddInt32(new ptrType$3(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw), -1073741824) + 1073741824 >> 0; + /* if (!((r === 0)) && !((atomic.AddInt32(new ptrType$3(function() { return this.$target.readerWait; }, function($v) { this.$target.readerWait = $v; }, rw), r) === 0))) { */ if (!((r === 0)) && !((atomic.AddInt32(new ptrType$3(function() { return this.$target.readerWait; }, function($v) { this.$target.readerWait = $v; }, rw), r) === 0))) {} else { $s = 2; continue; } + $r = runtime_Semacquire(new ptrType$2(function() { return this.$target.writerSem; }, function($v) { this.$target.writerSem = $v; }, rw), $BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + /* } */ case 2: + /* */ case -1: } return; } }; $blocking_Lock.$blocking = true; return $blocking_Lock; + }; + RWMutex.prototype.Lock = function($b) { return this.$val.Lock($b); }; + RWMutex.ptr.prototype.Unlock = function($b) { + var $args = arguments, $r, $s = 0, $this = this, i, r, rw; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Unlock = function() { s: while (true) { switch ($s) { case 0: + rw = $this; + r = atomic.AddInt32(new ptrType$3(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw), 1073741824); + if (r >= 1073741824) { + raceEnable(); + $panic(new $String("sync: Unlock of unlocked RWMutex")); + } + i = 0; + /* while (true) { */ case 1: + /* if (!(i < (r >> 0))) { break; } */ if(!(i < (r >> 0))) { $s = 2; continue; } + $r = runtime_Semrelease(new ptrType$2(function() { return this.$target.readerSem; }, function($v) { this.$target.readerSem = $v; }, rw), $BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + i = i + (1) >> 0; + /* } */ $s = 1; continue; case 2: + $r = rw.w.Unlock($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + /* */ case -1: } return; } }; $blocking_Unlock.$blocking = true; return $blocking_Unlock; + }; + RWMutex.prototype.Unlock = function($b) { return this.$val.Unlock($b); }; + RWMutex.ptr.prototype.RLocker = function() { + var rw; + rw = this; + return $pointerOfStructConversion(rw, ptrType$7); + }; + RWMutex.prototype.RLocker = function() { return this.$val.RLocker(); }; + rlocker.ptr.prototype.Lock = function($b) { + var $args = arguments, $r, $s = 0, $this = this, r; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Lock = function() { s: while (true) { switch ($s) { case 0: + r = $this; + $r = $pointerOfStructConversion(r, ptrType$8).RLock($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + /* */ case -1: } return; } }; $blocking_Lock.$blocking = true; return $blocking_Lock; + }; + rlocker.prototype.Lock = function($b) { return this.$val.Lock($b); }; + rlocker.ptr.prototype.Unlock = function($b) { + var $args = arguments, $r, $s = 0, $this = this, r; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Unlock = function() { s: while (true) { switch ($s) { case 0: + r = $this; + $r = $pointerOfStructConversion(r, ptrType$8).RUnlock($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + /* */ case -1: } return; } }; $blocking_Unlock.$blocking = true; return $blocking_Unlock; + }; + rlocker.prototype.Unlock = function($b) { return this.$val.Unlock($b); }; + ptrType.methods = [{prop: "Get", name: "Get", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Put", name: "Put", pkg: "", typ: $funcType([$emptyInterface], [], false)}, {prop: "getSlow", name: "getSlow", pkg: "sync", typ: $funcType([], [$emptyInterface], false)}, {prop: "pin", name: "pin", pkg: "sync", typ: $funcType([], [ptrType$5], false)}, {prop: "pinSlow", name: "pinSlow", pkg: "sync", typ: $funcType([], [ptrType$5], false)}]; + ptrType$10.methods = [{prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}]; + ptrType$11.methods = [{prop: "Do", name: "Do", pkg: "", typ: $funcType([funcType$1], [], false)}]; + ptrType$8.methods = [{prop: "RLock", name: "RLock", pkg: "", typ: $funcType([], [], false)}, {prop: "RUnlock", name: "RUnlock", pkg: "", typ: $funcType([], [], false)}, {prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}, {prop: "RLocker", name: "RLocker", pkg: "", typ: $funcType([], [Locker], false)}]; + ptrType$7.methods = [{prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}]; + Pool.init([{prop: "local", name: "local", pkg: "sync", typ: $UnsafePointer, tag: ""}, {prop: "localSize", name: "localSize", pkg: "sync", typ: $Uintptr, tag: ""}, {prop: "store", name: "store", pkg: "sync", typ: sliceType$3, tag: ""}, {prop: "New", name: "New", pkg: "", typ: funcType, tag: ""}]); + Mutex.init([{prop: "state", name: "state", pkg: "sync", typ: $Int32, tag: ""}, {prop: "sema", name: "sema", pkg: "sync", typ: $Uint32, tag: ""}]); + Locker.init([{prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}]); + Once.init([{prop: "m", name: "m", pkg: "sync", typ: Mutex, tag: ""}, {prop: "done", name: "done", pkg: "sync", typ: $Uint32, tag: ""}]); + poolLocal.init([{prop: "private$0", name: "private", pkg: "sync", typ: $emptyInterface, tag: ""}, {prop: "shared", name: "shared", pkg: "sync", typ: sliceType$3, tag: ""}, {prop: "Mutex", name: "", pkg: "", typ: Mutex, tag: ""}, {prop: "pad", name: "pad", pkg: "sync", typ: arrayType, tag: ""}]); + syncSema.init([{prop: "lock", name: "lock", pkg: "sync", typ: $Uintptr, tag: ""}, {prop: "head", name: "head", pkg: "sync", typ: $UnsafePointer, tag: ""}, {prop: "tail", name: "tail", pkg: "sync", typ: $UnsafePointer, tag: ""}]); + RWMutex.init([{prop: "w", name: "w", pkg: "sync", typ: Mutex, tag: ""}, {prop: "writerSem", name: "writerSem", pkg: "sync", typ: $Uint32, tag: ""}, {prop: "readerSem", name: "readerSem", pkg: "sync", typ: $Uint32, tag: ""}, {prop: "readerCount", name: "readerCount", pkg: "sync", typ: $Int32, tag: ""}, {prop: "readerWait", name: "readerWait", pkg: "sync", typ: $Int32, tag: ""}]); + rlocker.init([{prop: "w", name: "w", pkg: "sync", typ: Mutex, tag: ""}, {prop: "writerSem", name: "writerSem", pkg: "sync", typ: $Uint32, tag: ""}, {prop: "readerSem", name: "readerSem", pkg: "sync", typ: $Uint32, tag: ""}, {prop: "readerCount", name: "readerCount", pkg: "sync", typ: $Int32, tag: ""}, {prop: "readerWait", name: "readerWait", pkg: "sync", typ: $Int32, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_sync = function() { while (true) { switch ($s) { case 0: + $r = runtime.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = atomic.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + allPools = sliceType.nil; + semWaiters = new $Map(); + init(); + init$1(); + /* */ } return; } }; $init_sync.$blocking = true; return $init_sync; + }; + return $pkg; +})(); +$packages["io"] = (function() { + var $pkg = {}, errors, runtime, sync, Reader, Writer, ReaderFrom, WriterTo, RuneReader, sliceType, errWhence, errOffset, Copy; + errors = $packages["errors"]; + runtime = $packages["runtime"]; + sync = $packages["sync"]; + Reader = $pkg.Reader = $newType(8, $kindInterface, "io.Reader", "Reader", "io", null); + Writer = $pkg.Writer = $newType(8, $kindInterface, "io.Writer", "Writer", "io", null); + ReaderFrom = $pkg.ReaderFrom = $newType(8, $kindInterface, "io.ReaderFrom", "ReaderFrom", "io", null); + WriterTo = $pkg.WriterTo = $newType(8, $kindInterface, "io.WriterTo", "WriterTo", "io", null); + RuneReader = $pkg.RuneReader = $newType(8, $kindInterface, "io.RuneReader", "RuneReader", "io", null); + sliceType = $sliceType($Uint8); + Copy = $pkg.Copy = function(dst, src) { + var _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, buf, dst, er, err = $ifaceNil, ew, nr, nw, ok, ok$1, rt, src, written = new $Int64(0, 0), wt, x; + _tuple = $assertType(src, WriterTo, true); wt = _tuple[0]; ok = _tuple[1]; + if (ok) { + _tuple$1 = wt.WriteTo(dst); written = _tuple$1[0]; err = _tuple$1[1]; + return [written, err]; + } + _tuple$2 = $assertType(dst, ReaderFrom, true); rt = _tuple$2[0]; ok$1 = _tuple$2[1]; + if (ok$1) { + _tuple$3 = rt.ReadFrom(src); written = _tuple$3[0]; err = _tuple$3[1]; + return [written, err]; + } + buf = $makeSlice(sliceType, 32768); + while (true) { + if (!(true)) { break; } + _tuple$4 = src.Read(buf); nr = _tuple$4[0]; er = _tuple$4[1]; + if (nr > 0) { + _tuple$5 = dst.Write($subslice(buf, 0, nr)); nw = _tuple$5[0]; ew = _tuple$5[1]; + if (nw > 0) { + written = (x = new $Int64(0, nw), new $Int64(written.$high + x.$high, written.$low + x.$low)); + } + if (!($interfaceIsEqual(ew, $ifaceNil))) { + err = ew; + break; + } + if (!((nr === nw))) { + err = $pkg.ErrShortWrite; + break; + } + } + if ($interfaceIsEqual(er, $pkg.EOF)) { + break; + } + if (!($interfaceIsEqual(er, $ifaceNil))) { + err = er; + break; + } + } + _tmp = written; _tmp$1 = err; written = _tmp; err = _tmp$1; + return [written, err]; + }; + Reader.init([{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}]); + Writer.init([{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}]); + ReaderFrom.init([{prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([Reader], [$Int64, $error], false)}]); + WriterTo.init([{prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([Writer], [$Int64, $error], false)}]); + RuneReader.init([{prop: "ReadRune", name: "ReadRune", pkg: "", typ: $funcType([], [$Int32, $Int, $error], false)}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_io = function() { while (true) { switch ($s) { case 0: + $r = errors.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = runtime.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = sync.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $pkg.ErrShortWrite = errors.New("short write"); + $pkg.ErrShortBuffer = errors.New("short buffer"); + $pkg.EOF = errors.New("EOF"); + $pkg.ErrUnexpectedEOF = errors.New("unexpected EOF"); + $pkg.ErrNoProgress = errors.New("multiple Read calls return no data or error"); + errWhence = errors.New("Seek: invalid whence"); + errOffset = errors.New("Seek: invalid offset"); + $pkg.ErrClosedPipe = errors.New("io: read/write on closed pipe"); + /* */ } return; } }; $init_io.$blocking = true; return $init_io; + }; + return $pkg; +})(); +$packages["math"] = (function() { + var $pkg = {}, js, arrayType, math, zero, posInf, negInf, nan, pow10tab, init, Inf, IsInf, Ldexp, NaN, Float32bits, Float32frombits, Float64bits, Float64frombits, init$1; + js = $packages["github.com/gopherjs/gopherjs/js"]; + arrayType = $arrayType($Float64, 70); + init = function() { + Float32bits(0); + Float32frombits(0); + }; + Inf = $pkg.Inf = function(sign) { + var sign; + if (sign >= 0) { + return posInf; + } else { + return negInf; + } + }; + IsInf = $pkg.IsInf = function(f, sign) { + var f, sign; + if (f === posInf) { + return sign >= 0; + } + if (f === negInf) { + return sign <= 0; + } + return false; + }; + Ldexp = $pkg.Ldexp = function(frac, exp$1) { + var exp$1, frac; + if (frac === 0) { + return frac; + } + if (exp$1 >= 1024) { + return frac * $parseFloat(math.pow(2, 1023)) * $parseFloat(math.pow(2, exp$1 - 1023 >> 0)); + } + if (exp$1 <= -1024) { + return frac * $parseFloat(math.pow(2, -1023)) * $parseFloat(math.pow(2, exp$1 + 1023 >> 0)); + } + return frac * $parseFloat(math.pow(2, exp$1)); + }; + NaN = $pkg.NaN = function() { + return nan; + }; + Float32bits = $pkg.Float32bits = function(f) { + var e, f, r, s; + if (f === 0) { + if (1 / f === negInf) { + return 2147483648; + } + return 0; + } + if (!(f === f)) { + return 2143289344; + } + s = 0; + if (f < 0) { + s = 2147483648; + f = -f; + } + e = 150; + while (true) { + if (!(f >= 1.6777216e+07)) { break; } + f = f / (2); + e = e + (1) >>> 0; + if (e === 255) { + if (f >= 8.388608e+06) { + f = posInf; + } + break; + } + } + while (true) { + if (!(f < 8.388608e+06)) { break; } + e = e - (1) >>> 0; + if (e === 0) { + break; + } + f = f * (2); + } + r = $parseFloat($mod(f, 2)); + if ((r > 0.5 && r < 1) || r >= 1.5) { + f = f + (1); + } + return (((s | (e << 23 >>> 0)) >>> 0) | (((f >> 0) & ~8388608))) >>> 0; + }; + Float32frombits = $pkg.Float32frombits = function(b) { + var b, e, m, s; + s = 1; + if (!((((b & 2147483648) >>> 0) === 0))) { + s = -1; + } + e = (((b >>> 23 >>> 0)) & 255) >>> 0; + m = (b & 8388607) >>> 0; + if (e === 255) { + if (m === 0) { + return s / 0; + } + return nan; + } + if (!((e === 0))) { + m = m + (8388608) >>> 0; + } + if (e === 0) { + e = 1; + } + return Ldexp(m, ((e >> 0) - 127 >> 0) - 23 >> 0) * s; + }; + Float64bits = $pkg.Float64bits = function(f) { + var e, f, s, x, x$1, x$2, x$3; + if (f === 0) { + if (1 / f === negInf) { + return new $Uint64(2147483648, 0); + } + return new $Uint64(0, 0); + } + if (!((f === f))) { + return new $Uint64(2146959360, 1); + } + s = new $Uint64(0, 0); + if (f < 0) { + s = new $Uint64(2147483648, 0); + f = -f; + } + e = 1075; + while (true) { + if (!(f >= 9.007199254740992e+15)) { break; } + f = f / (2); + e = e + (1) >>> 0; + if (e === 2047) { + break; + } + } + while (true) { + if (!(f < 4.503599627370496e+15)) { break; } + e = e - (1) >>> 0; + if (e === 0) { + break; + } + f = f * (2); + } + return (x = (x$1 = $shiftLeft64(new $Uint64(0, e), 52), new $Uint64(s.$high | x$1.$high, (s.$low | x$1.$low) >>> 0)), x$2 = (x$3 = new $Uint64(0, f), new $Uint64(x$3.$high &~ 1048576, (x$3.$low &~ 0) >>> 0)), new $Uint64(x.$high | x$2.$high, (x.$low | x$2.$low) >>> 0)); + }; + Float64frombits = $pkg.Float64frombits = function(b) { + var b, e, m, s, x, x$1, x$2; + s = 1; + if (!((x = new $Uint64(b.$high & 2147483648, (b.$low & 0) >>> 0), (x.$high === 0 && x.$low === 0)))) { + s = -1; + } + e = (x$1 = $shiftRightUint64(b, 52), new $Uint64(x$1.$high & 0, (x$1.$low & 2047) >>> 0)); + m = new $Uint64(b.$high & 1048575, (b.$low & 4294967295) >>> 0); + if ((e.$high === 0 && e.$low === 2047)) { + if ((m.$high === 0 && m.$low === 0)) { + return s / 0; + } + return nan; + } + if (!((e.$high === 0 && e.$low === 0))) { + m = (x$2 = new $Uint64(1048576, 0), new $Uint64(m.$high + x$2.$high, m.$low + x$2.$low)); + } + if ((e.$high === 0 && e.$low === 0)) { + e = new $Uint64(0, 1); + } + return Ldexp($flatten64(m), ((e.$low >> 0) - 1023 >> 0) - 52 >> 0) * s; + }; + init$1 = function() { + var _q, i, m, x; + pow10tab[0] = 1; + pow10tab[1] = 10; + i = 2; + while (true) { + if (!(i < 70)) { break; } + m = (_q = i / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + (i < 0 || i >= pow10tab.length) ? $throwRuntimeError("index out of range") : pow10tab[i] = ((m < 0 || m >= pow10tab.length) ? $throwRuntimeError("index out of range") : pow10tab[m]) * (x = i - m >> 0, ((x < 0 || x >= pow10tab.length) ? $throwRuntimeError("index out of range") : pow10tab[x])); + i = i + (1) >> 0; + } + }; + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_math = function() { while (true) { switch ($s) { case 0: + $r = js.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + pow10tab = arrayType.zero(); + math = $global.Math; + zero = 0; + posInf = 1 / zero; + negInf = -1 / zero; + nan = 0 / zero; + init(); + init$1(); + /* */ } return; } }; $init_math.$blocking = true; return $init_math; + }; + return $pkg; +})(); +$packages["unicode"] = (function() { + var $pkg = {}, RangeTable, Range16, Range32, CaseRange, d, foldPair, sliceType, sliceType$1, ptrType, sliceType$2, sliceType$3, sliceType$4, _C, _Cc, _Cf, _Co, _Cs, _L, _Ll, _Lm, _Lo, _Lt, _Lu, _M, _Mc, _Me, _Mn, _N, _Nd, _Nl, _No, _P, _Pc, _Pd, _Pe, _Pf, _Pi, _Po, _Ps, _S, _Sc, _Sk, _Sm, _So, _Z, _Zl, _Zp, _Zs, _Arabic, _Armenian, _Avestan, _Balinese, _Bamum, _Bassa_Vah, _Batak, _Bengali, _Bopomofo, _Brahmi, _Braille, _Buginese, _Buhid, _Canadian_Aboriginal, _Carian, _Caucasian_Albanian, _Chakma, _Cham, _Cherokee, _Common, _Coptic, _Cuneiform, _Cypriot, _Cyrillic, _Deseret, _Devanagari, _Duployan, _Egyptian_Hieroglyphs, _Elbasan, _Ethiopic, _Georgian, _Glagolitic, _Gothic, _Grantha, _Greek, _Gujarati, _Gurmukhi, _Han, _Hangul, _Hanunoo, _Hebrew, _Hiragana, _Imperial_Aramaic, _Inherited, _Inscriptional_Pahlavi, _Inscriptional_Parthian, _Javanese, _Kaithi, _Kannada, _Katakana, _Kayah_Li, _Kharoshthi, _Khmer, _Khojki, _Khudawadi, _Lao, _Latin, _Lepcha, _Limbu, _Linear_A, _Linear_B, _Lisu, _Lycian, _Lydian, _Mahajani, _Malayalam, _Mandaic, _Manichaean, _Meetei_Mayek, _Mende_Kikakui, _Meroitic_Cursive, _Meroitic_Hieroglyphs, _Miao, _Modi, _Mongolian, _Mro, _Myanmar, _Nabataean, _New_Tai_Lue, _Nko, _Ogham, _Ol_Chiki, _Old_Italic, _Old_North_Arabian, _Old_Permic, _Old_Persian, _Old_South_Arabian, _Old_Turkic, _Oriya, _Osmanya, _Pahawh_Hmong, _Palmyrene, _Pau_Cin_Hau, _Phags_Pa, _Phoenician, _Psalter_Pahlavi, _Rejang, _Runic, _Samaritan, _Saurashtra, _Sharada, _Shavian, _Siddham, _Sinhala, _Sora_Sompeng, _Sundanese, _Syloti_Nagri, _Syriac, _Tagalog, _Tagbanwa, _Tai_Le, _Tai_Tham, _Tai_Viet, _Takri, _Tamil, _Telugu, _Thaana, _Thai, _Tibetan, _Tifinagh, _Tirhuta, _Ugaritic, _Vai, _Warang_Citi, _Yi, _White_Space, _CaseRanges, properties, caseOrbit, foldCommon, foldGreek, foldInherited, foldL, foldLl, foldLt, foldLu, foldM, foldMn, _map, _key, _map$1, _key$1, _map$3, _key$3, _map$4, _key$4, to, IsDigit, IsGraphic, IsPrint, In, IsLetter, IsNumber, IsSpace, is16, is32, Is, isExcludingLatin, IsUpper, To, ToUpper, ToLower, SimpleFold; + RangeTable = $pkg.RangeTable = $newType(0, $kindStruct, "unicode.RangeTable", "RangeTable", "unicode", function(R16_, R32_, LatinOffset_) { + this.$val = this; + this.R16 = R16_ !== undefined ? R16_ : sliceType.nil; + this.R32 = R32_ !== undefined ? R32_ : sliceType$1.nil; + this.LatinOffset = LatinOffset_ !== undefined ? LatinOffset_ : 0; + }); + Range16 = $pkg.Range16 = $newType(0, $kindStruct, "unicode.Range16", "Range16", "unicode", function(Lo_, Hi_, Stride_) { + this.$val = this; + this.Lo = Lo_ !== undefined ? Lo_ : 0; + this.Hi = Hi_ !== undefined ? Hi_ : 0; + this.Stride = Stride_ !== undefined ? Stride_ : 0; + }); + Range32 = $pkg.Range32 = $newType(0, $kindStruct, "unicode.Range32", "Range32", "unicode", function(Lo_, Hi_, Stride_) { + this.$val = this; + this.Lo = Lo_ !== undefined ? Lo_ : 0; + this.Hi = Hi_ !== undefined ? Hi_ : 0; + this.Stride = Stride_ !== undefined ? Stride_ : 0; + }); + CaseRange = $pkg.CaseRange = $newType(0, $kindStruct, "unicode.CaseRange", "CaseRange", "unicode", function(Lo_, Hi_, Delta_) { + this.$val = this; + this.Lo = Lo_ !== undefined ? Lo_ : 0; + this.Hi = Hi_ !== undefined ? Hi_ : 0; + this.Delta = Delta_ !== undefined ? Delta_ : d.zero(); + }); + d = $pkg.d = $newType(12, $kindArray, "unicode.d", "d", "unicode", null); + foldPair = $pkg.foldPair = $newType(0, $kindStruct, "unicode.foldPair", "foldPair", "unicode", function(From_, To_) { + this.$val = this; + this.From = From_ !== undefined ? From_ : 0; + this.To = To_ !== undefined ? To_ : 0; + }); + sliceType = $sliceType(Range16); + sliceType$1 = $sliceType(Range32); + ptrType = $ptrType(RangeTable); + sliceType$2 = $sliceType(ptrType); + sliceType$3 = $sliceType(CaseRange); + sliceType$4 = $sliceType(foldPair); + to = function(_case, r, caseRange) { + var _case, _q, caseRange, cr, delta, hi, lo, m, r, x; + if (_case < 0 || 3 <= _case) { + return 65533; + } + lo = 0; + hi = caseRange.$length; + while (true) { + if (!(lo < hi)) { break; } + m = lo + (_q = ((hi - lo >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0; + cr = ((m < 0 || m >= caseRange.$length) ? $throwRuntimeError("index out of range") : caseRange.$array[caseRange.$offset + m]); + if ((cr.Lo >> 0) <= r && r <= (cr.Hi >> 0)) { + delta = (x = cr.Delta, ((_case < 0 || _case >= x.length) ? $throwRuntimeError("index out of range") : x[_case])); + if (delta > 1114111) { + return (cr.Lo >> 0) + (((((r - (cr.Lo >> 0) >> 0)) & ~1) | ((_case & 1) >> 0))) >> 0; + } + return r + delta >> 0; + } + if (r < (cr.Lo >> 0)) { + hi = m; + } else { + lo = m + 1 >> 0; + } + } + return r; + }; + IsDigit = $pkg.IsDigit = function(r) { + var r; + if (r <= 255) { + return 48 <= r && r <= 57; + } + return isExcludingLatin($pkg.Digit, r); + }; + IsGraphic = $pkg.IsGraphic = function(r) { + var r, x; + if ((r >>> 0) <= 255) { + return !(((((x = (r << 24 >>> 24), ((x < 0 || x >= properties.length) ? $throwRuntimeError("index out of range") : properties[x])) & 144) >>> 0) === 0)); + } + return In(r, $pkg.GraphicRanges); + }; + IsPrint = $pkg.IsPrint = function(r) { + var r, x; + if ((r >>> 0) <= 255) { + return !(((((x = (r << 24 >>> 24), ((x < 0 || x >= properties.length) ? $throwRuntimeError("index out of range") : properties[x])) & 128) >>> 0) === 0)); + } + return In(r, $pkg.PrintRanges); + }; + In = $pkg.In = function(r, ranges) { + var _i, _ref, inside, r, ranges; + _ref = ranges; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + inside = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (Is(inside, r)) { + return true; + } + _i++; + } + return false; + }; + IsLetter = $pkg.IsLetter = function(r) { + var r, x; + if ((r >>> 0) <= 255) { + return !(((((x = (r << 24 >>> 24), ((x < 0 || x >= properties.length) ? $throwRuntimeError("index out of range") : properties[x])) & 96) >>> 0) === 0)); + } + return isExcludingLatin($pkg.Letter, r); + }; + IsNumber = $pkg.IsNumber = function(r) { + var r, x; + if ((r >>> 0) <= 255) { + return !(((((x = (r << 24 >>> 24), ((x < 0 || x >= properties.length) ? $throwRuntimeError("index out of range") : properties[x])) & 4) >>> 0) === 0)); + } + return isExcludingLatin($pkg.Number, r); + }; + IsSpace = $pkg.IsSpace = function(r) { + var _ref, r; + if ((r >>> 0) <= 255) { + _ref = r; + if (_ref === 9 || _ref === 10 || _ref === 11 || _ref === 12 || _ref === 13 || _ref === 32 || _ref === 133 || _ref === 160) { + return true; + } + return false; + } + return isExcludingLatin($pkg.White_Space, r); + }; + is16 = function(ranges, r) { + var _i, _q, _r, _r$1, _ref, hi, i, lo, m, r, range_, range_$1, ranges; + if (ranges.$length <= 18 || r <= 255) { + _ref = ranges; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + range_ = ((i < 0 || i >= ranges.$length) ? $throwRuntimeError("index out of range") : ranges.$array[ranges.$offset + i]); + if (r < range_.Lo) { + return false; + } + if (r <= range_.Hi) { + return (_r = ((r - range_.Lo << 16 >>> 16)) % range_.Stride, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) === 0; + } + _i++; + } + return false; + } + lo = 0; + hi = ranges.$length; + while (true) { + if (!(lo < hi)) { break; } + m = lo + (_q = ((hi - lo >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0; + range_$1 = ((m < 0 || m >= ranges.$length) ? $throwRuntimeError("index out of range") : ranges.$array[ranges.$offset + m]); + if (range_$1.Lo <= r && r <= range_$1.Hi) { + return (_r$1 = ((r - range_$1.Lo << 16 >>> 16)) % range_$1.Stride, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) === 0; + } + if (r < range_$1.Lo) { + hi = m; + } else { + lo = m + 1 >> 0; + } + } + return false; + }; + is32 = function(ranges, r) { + var _i, _q, _r, _r$1, _ref, hi, i, lo, m, r, range_, range_$1, ranges; + if (ranges.$length <= 18) { + _ref = ranges; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + range_ = ((i < 0 || i >= ranges.$length) ? $throwRuntimeError("index out of range") : ranges.$array[ranges.$offset + i]); + if (r < range_.Lo) { + return false; + } + if (r <= range_.Hi) { + return (_r = ((r - range_.Lo >>> 0)) % range_.Stride, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) === 0; + } + _i++; + } + return false; + } + lo = 0; + hi = ranges.$length; + while (true) { + if (!(lo < hi)) { break; } + m = lo + (_q = ((hi - lo >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0; + range_$1 = $clone(((m < 0 || m >= ranges.$length) ? $throwRuntimeError("index out of range") : ranges.$array[ranges.$offset + m]), Range32); + if (range_$1.Lo <= r && r <= range_$1.Hi) { + return (_r$1 = ((r - range_$1.Lo >>> 0)) % range_$1.Stride, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) === 0; + } + if (r < range_$1.Lo) { + hi = m; + } else { + lo = m + 1 >> 0; + } + } + return false; + }; + Is = $pkg.Is = function(rangeTab, r) { + var r, r16, r32, rangeTab, x; + r16 = rangeTab.R16; + if (r16.$length > 0 && r <= ((x = r16.$length - 1 >> 0, ((x < 0 || x >= r16.$length) ? $throwRuntimeError("index out of range") : r16.$array[r16.$offset + x])).Hi >> 0)) { + return is16(r16, (r << 16 >>> 16)); + } + r32 = rangeTab.R32; + if (r32.$length > 0 && r >= (((0 < 0 || 0 >= r32.$length) ? $throwRuntimeError("index out of range") : r32.$array[r32.$offset + 0]).Lo >> 0)) { + return is32(r32, (r >>> 0)); + } + return false; + }; + isExcludingLatin = function(rangeTab, r) { + var off, r, r16, r32, rangeTab, x; + r16 = rangeTab.R16; + off = rangeTab.LatinOffset; + if (r16.$length > off && r <= ((x = r16.$length - 1 >> 0, ((x < 0 || x >= r16.$length) ? $throwRuntimeError("index out of range") : r16.$array[r16.$offset + x])).Hi >> 0)) { + return is16($subslice(r16, off), (r << 16 >>> 16)); + } + r32 = rangeTab.R32; + if (r32.$length > 0 && r >= (((0 < 0 || 0 >= r32.$length) ? $throwRuntimeError("index out of range") : r32.$array[r32.$offset + 0]).Lo >> 0)) { + return is32(r32, (r >>> 0)); + } + return false; + }; + IsUpper = $pkg.IsUpper = function(r) { + var r, x; + if ((r >>> 0) <= 255) { + return (((x = (r << 24 >>> 24), ((x < 0 || x >= properties.length) ? $throwRuntimeError("index out of range") : properties[x])) & 96) >>> 0) === 32; + } + return isExcludingLatin($pkg.Upper, r); + }; + To = $pkg.To = function(_case, r) { + var _case, r; + return to(_case, r, $pkg.CaseRanges); + }; + ToUpper = $pkg.ToUpper = function(r) { + var r; + if (r <= 127) { + if (97 <= r && r <= 122) { + r = r - (32) >> 0; + } + return r; + } + return To(0, r); + }; + ToLower = $pkg.ToLower = function(r) { + var r; + if (r <= 127) { + if (65 <= r && r <= 90) { + r = r + (32) >> 0; + } + return r; + } + return To(1, r); + }; + SimpleFold = $pkg.SimpleFold = function(r) { + var _q, hi, l, lo, m, r; + lo = 0; + hi = caseOrbit.$length; + while (true) { + if (!(lo < hi)) { break; } + m = lo + (_q = ((hi - lo >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0; + if ((((m < 0 || m >= caseOrbit.$length) ? $throwRuntimeError("index out of range") : caseOrbit.$array[caseOrbit.$offset + m]).From >> 0) < r) { + lo = m + 1 >> 0; + } else { + hi = m; + } + } + if (lo < caseOrbit.$length && ((((lo < 0 || lo >= caseOrbit.$length) ? $throwRuntimeError("index out of range") : caseOrbit.$array[caseOrbit.$offset + lo]).From >> 0) === r)) { + return (((lo < 0 || lo >= caseOrbit.$length) ? $throwRuntimeError("index out of range") : caseOrbit.$array[caseOrbit.$offset + lo]).To >> 0); + } + l = ToLower(r); + if (!((l === r))) { + return l; + } + return ToUpper(r); + }; + RangeTable.init([{prop: "R16", name: "R16", pkg: "", typ: sliceType, tag: ""}, {prop: "R32", name: "R32", pkg: "", typ: sliceType$1, tag: ""}, {prop: "LatinOffset", name: "LatinOffset", pkg: "", typ: $Int, tag: ""}]); + Range16.init([{prop: "Lo", name: "Lo", pkg: "", typ: $Uint16, tag: ""}, {prop: "Hi", name: "Hi", pkg: "", typ: $Uint16, tag: ""}, {prop: "Stride", name: "Stride", pkg: "", typ: $Uint16, tag: ""}]); + Range32.init([{prop: "Lo", name: "Lo", pkg: "", typ: $Uint32, tag: ""}, {prop: "Hi", name: "Hi", pkg: "", typ: $Uint32, tag: ""}, {prop: "Stride", name: "Stride", pkg: "", typ: $Uint32, tag: ""}]); + CaseRange.init([{prop: "Lo", name: "Lo", pkg: "", typ: $Uint32, tag: ""}, {prop: "Hi", name: "Hi", pkg: "", typ: $Uint32, tag: ""}, {prop: "Delta", name: "Delta", pkg: "", typ: d, tag: ""}]); + d.init($Int32, 3); + foldPair.init([{prop: "From", name: "From", pkg: "", typ: $Uint16, tag: ""}, {prop: "To", name: "To", pkg: "", typ: $Uint16, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_unicode = function() { while (true) { switch ($s) { case 0: + _C = new RangeTable.ptr(new sliceType([new Range16.ptr(1, 31, 1), new Range16.ptr(127, 159, 1), new Range16.ptr(173, 1536, 1363), new Range16.ptr(1537, 1541, 1), new Range16.ptr(1564, 1757, 193), new Range16.ptr(1807, 6158, 4351), new Range16.ptr(8203, 8207, 1), new Range16.ptr(8234, 8238, 1), new Range16.ptr(8288, 8292, 1), new Range16.ptr(8294, 8303, 1), new Range16.ptr(55296, 63743, 1), new Range16.ptr(65279, 65529, 250), new Range16.ptr(65530, 65531, 1)]), new sliceType$1([new Range32.ptr(69821, 113824, 44003), new Range32.ptr(113825, 113827, 1), new Range32.ptr(119155, 119162, 1), new Range32.ptr(917505, 917536, 31), new Range32.ptr(917537, 917631, 1), new Range32.ptr(983040, 1048573, 1), new Range32.ptr(1048576, 1114109, 1)]), 2); + _Cc = new RangeTable.ptr(new sliceType([new Range16.ptr(1, 31, 1), new Range16.ptr(127, 159, 1)]), sliceType$1.nil, 2); + _Cf = new RangeTable.ptr(new sliceType([new Range16.ptr(173, 1536, 1363), new Range16.ptr(1537, 1541, 1), new Range16.ptr(1564, 1757, 193), new Range16.ptr(1807, 6158, 4351), new Range16.ptr(8203, 8207, 1), new Range16.ptr(8234, 8238, 1), new Range16.ptr(8288, 8292, 1), new Range16.ptr(8294, 8303, 1), new Range16.ptr(65279, 65529, 250), new Range16.ptr(65530, 65531, 1)]), new sliceType$1([new Range32.ptr(69821, 113824, 44003), new Range32.ptr(113825, 113827, 1), new Range32.ptr(119155, 119162, 1), new Range32.ptr(917505, 917536, 31), new Range32.ptr(917537, 917631, 1)]), 0); + _Co = new RangeTable.ptr(new sliceType([new Range16.ptr(57344, 63743, 1)]), new sliceType$1([new Range32.ptr(983040, 1048573, 1), new Range32.ptr(1048576, 1114109, 1)]), 0); + _Cs = new RangeTable.ptr(new sliceType([new Range16.ptr(55296, 57343, 1)]), sliceType$1.nil, 0); + _L = new RangeTable.ptr(new sliceType([new Range16.ptr(65, 90, 1), new Range16.ptr(97, 122, 1), new Range16.ptr(170, 181, 11), new Range16.ptr(186, 192, 6), new Range16.ptr(193, 214, 1), new Range16.ptr(216, 246, 1), new Range16.ptr(248, 705, 1), new Range16.ptr(710, 721, 1), new Range16.ptr(736, 740, 1), new Range16.ptr(748, 750, 2), new Range16.ptr(880, 884, 1), new Range16.ptr(886, 887, 1), new Range16.ptr(890, 893, 1), new Range16.ptr(895, 902, 7), new Range16.ptr(904, 906, 1), new Range16.ptr(908, 910, 2), new Range16.ptr(911, 929, 1), new Range16.ptr(931, 1013, 1), new Range16.ptr(1015, 1153, 1), new Range16.ptr(1162, 1327, 1), new Range16.ptr(1329, 1366, 1), new Range16.ptr(1369, 1377, 8), new Range16.ptr(1378, 1415, 1), new Range16.ptr(1488, 1514, 1), new Range16.ptr(1520, 1522, 1), new Range16.ptr(1568, 1610, 1), new Range16.ptr(1646, 1647, 1), new Range16.ptr(1649, 1747, 1), new Range16.ptr(1749, 1765, 16), new Range16.ptr(1766, 1774, 8), new Range16.ptr(1775, 1786, 11), new Range16.ptr(1787, 1788, 1), new Range16.ptr(1791, 1808, 17), new Range16.ptr(1810, 1839, 1), new Range16.ptr(1869, 1957, 1), new Range16.ptr(1969, 1994, 25), new Range16.ptr(1995, 2026, 1), new Range16.ptr(2036, 2037, 1), new Range16.ptr(2042, 2048, 6), new Range16.ptr(2049, 2069, 1), new Range16.ptr(2074, 2084, 10), new Range16.ptr(2088, 2112, 24), new Range16.ptr(2113, 2136, 1), new Range16.ptr(2208, 2226, 1), new Range16.ptr(2308, 2361, 1), new Range16.ptr(2365, 2384, 19), new Range16.ptr(2392, 2401, 1), new Range16.ptr(2417, 2432, 1), new Range16.ptr(2437, 2444, 1), new Range16.ptr(2447, 2448, 1), new Range16.ptr(2451, 2472, 1), new Range16.ptr(2474, 2480, 1), new Range16.ptr(2482, 2486, 4), new Range16.ptr(2487, 2489, 1), new Range16.ptr(2493, 2510, 17), new Range16.ptr(2524, 2525, 1), new Range16.ptr(2527, 2529, 1), new Range16.ptr(2544, 2545, 1), new Range16.ptr(2565, 2570, 1), new Range16.ptr(2575, 2576, 1), new Range16.ptr(2579, 2600, 1), new Range16.ptr(2602, 2608, 1), new Range16.ptr(2610, 2611, 1), new Range16.ptr(2613, 2614, 1), new Range16.ptr(2616, 2617, 1), new Range16.ptr(2649, 2652, 1), new Range16.ptr(2654, 2674, 20), new Range16.ptr(2675, 2676, 1), new Range16.ptr(2693, 2701, 1), new Range16.ptr(2703, 2705, 1), new Range16.ptr(2707, 2728, 1), new Range16.ptr(2730, 2736, 1), new Range16.ptr(2738, 2739, 1), new Range16.ptr(2741, 2745, 1), new Range16.ptr(2749, 2768, 19), new Range16.ptr(2784, 2785, 1), new Range16.ptr(2821, 2828, 1), new Range16.ptr(2831, 2832, 1), new Range16.ptr(2835, 2856, 1), new Range16.ptr(2858, 2864, 1), new Range16.ptr(2866, 2867, 1), new Range16.ptr(2869, 2873, 1), new Range16.ptr(2877, 2908, 31), new Range16.ptr(2909, 2911, 2), new Range16.ptr(2912, 2913, 1), new Range16.ptr(2929, 2947, 18), new Range16.ptr(2949, 2954, 1), new Range16.ptr(2958, 2960, 1), new Range16.ptr(2962, 2965, 1), new Range16.ptr(2969, 2970, 1), new Range16.ptr(2972, 2974, 2), new Range16.ptr(2975, 2979, 4), new Range16.ptr(2980, 2984, 4), new Range16.ptr(2985, 2986, 1), new Range16.ptr(2990, 3001, 1), new Range16.ptr(3024, 3077, 53), new Range16.ptr(3078, 3084, 1), new Range16.ptr(3086, 3088, 1), new Range16.ptr(3090, 3112, 1), new Range16.ptr(3114, 3129, 1), new Range16.ptr(3133, 3160, 27), new Range16.ptr(3161, 3168, 7), new Range16.ptr(3169, 3205, 36), new Range16.ptr(3206, 3212, 1), new Range16.ptr(3214, 3216, 1), new Range16.ptr(3218, 3240, 1), new Range16.ptr(3242, 3251, 1), new Range16.ptr(3253, 3257, 1), new Range16.ptr(3261, 3294, 33), new Range16.ptr(3296, 3297, 1), new Range16.ptr(3313, 3314, 1), new Range16.ptr(3333, 3340, 1), new Range16.ptr(3342, 3344, 1), new Range16.ptr(3346, 3386, 1), new Range16.ptr(3389, 3406, 17), new Range16.ptr(3424, 3425, 1), new Range16.ptr(3450, 3455, 1), new Range16.ptr(3461, 3478, 1), new Range16.ptr(3482, 3505, 1), new Range16.ptr(3507, 3515, 1), new Range16.ptr(3517, 3520, 3), new Range16.ptr(3521, 3526, 1), new Range16.ptr(3585, 3632, 1), new Range16.ptr(3634, 3635, 1), new Range16.ptr(3648, 3654, 1), new Range16.ptr(3713, 3714, 1), new Range16.ptr(3716, 3719, 3), new Range16.ptr(3720, 3722, 2), new Range16.ptr(3725, 3732, 7), new Range16.ptr(3733, 3735, 1), new Range16.ptr(3737, 3743, 1), new Range16.ptr(3745, 3747, 1), new Range16.ptr(3749, 3751, 2), new Range16.ptr(3754, 3755, 1), new Range16.ptr(3757, 3760, 1), new Range16.ptr(3762, 3763, 1), new Range16.ptr(3773, 3776, 3), new Range16.ptr(3777, 3780, 1), new Range16.ptr(3782, 3804, 22), new Range16.ptr(3805, 3807, 1), new Range16.ptr(3840, 3904, 64), new Range16.ptr(3905, 3911, 1), new Range16.ptr(3913, 3948, 1), new Range16.ptr(3976, 3980, 1), new Range16.ptr(4096, 4138, 1), new Range16.ptr(4159, 4176, 17), new Range16.ptr(4177, 4181, 1), new Range16.ptr(4186, 4189, 1), new Range16.ptr(4193, 4197, 4), new Range16.ptr(4198, 4206, 8), new Range16.ptr(4207, 4208, 1), new Range16.ptr(4213, 4225, 1), new Range16.ptr(4238, 4256, 18), new Range16.ptr(4257, 4293, 1), new Range16.ptr(4295, 4301, 6), new Range16.ptr(4304, 4346, 1), new Range16.ptr(4348, 4680, 1), new Range16.ptr(4682, 4685, 1), new Range16.ptr(4688, 4694, 1), new Range16.ptr(4696, 4698, 2), new Range16.ptr(4699, 4701, 1), new Range16.ptr(4704, 4744, 1), new Range16.ptr(4746, 4749, 1), new Range16.ptr(4752, 4784, 1), new Range16.ptr(4786, 4789, 1), new Range16.ptr(4792, 4798, 1), new Range16.ptr(4800, 4802, 2), new Range16.ptr(4803, 4805, 1), new Range16.ptr(4808, 4822, 1), new Range16.ptr(4824, 4880, 1), new Range16.ptr(4882, 4885, 1), new Range16.ptr(4888, 4954, 1), new Range16.ptr(4992, 5007, 1), new Range16.ptr(5024, 5108, 1), new Range16.ptr(5121, 5740, 1), new Range16.ptr(5743, 5759, 1), new Range16.ptr(5761, 5786, 1), new Range16.ptr(5792, 5866, 1), new Range16.ptr(5873, 5880, 1), new Range16.ptr(5888, 5900, 1), new Range16.ptr(5902, 5905, 1), new Range16.ptr(5920, 5937, 1), new Range16.ptr(5952, 5969, 1), new Range16.ptr(5984, 5996, 1), new Range16.ptr(5998, 6000, 1), new Range16.ptr(6016, 6067, 1), new Range16.ptr(6103, 6108, 5), new Range16.ptr(6176, 6263, 1), new Range16.ptr(6272, 6312, 1), new Range16.ptr(6314, 6320, 6), new Range16.ptr(6321, 6389, 1), new Range16.ptr(6400, 6430, 1), new Range16.ptr(6480, 6509, 1), new Range16.ptr(6512, 6516, 1), new Range16.ptr(6528, 6571, 1), new Range16.ptr(6593, 6599, 1), new Range16.ptr(6656, 6678, 1), new Range16.ptr(6688, 6740, 1), new Range16.ptr(6823, 6917, 94), new Range16.ptr(6918, 6963, 1), new Range16.ptr(6981, 6987, 1), new Range16.ptr(7043, 7072, 1), new Range16.ptr(7086, 7087, 1), new Range16.ptr(7098, 7141, 1), new Range16.ptr(7168, 7203, 1), new Range16.ptr(7245, 7247, 1), new Range16.ptr(7258, 7293, 1), new Range16.ptr(7401, 7404, 1), new Range16.ptr(7406, 7409, 1), new Range16.ptr(7413, 7414, 1), new Range16.ptr(7424, 7615, 1), new Range16.ptr(7680, 7957, 1), new Range16.ptr(7960, 7965, 1), new Range16.ptr(7968, 8005, 1), new Range16.ptr(8008, 8013, 1), new Range16.ptr(8016, 8023, 1), new Range16.ptr(8025, 8031, 2), new Range16.ptr(8032, 8061, 1), new Range16.ptr(8064, 8116, 1), new Range16.ptr(8118, 8124, 1), new Range16.ptr(8126, 8130, 4), new Range16.ptr(8131, 8132, 1), new Range16.ptr(8134, 8140, 1), new Range16.ptr(8144, 8147, 1), new Range16.ptr(8150, 8155, 1), new Range16.ptr(8160, 8172, 1), new Range16.ptr(8178, 8180, 1), new Range16.ptr(8182, 8188, 1), new Range16.ptr(8305, 8319, 14), new Range16.ptr(8336, 8348, 1), new Range16.ptr(8450, 8455, 5), new Range16.ptr(8458, 8467, 1), new Range16.ptr(8469, 8473, 4), new Range16.ptr(8474, 8477, 1), new Range16.ptr(8484, 8490, 2), new Range16.ptr(8491, 8493, 1), new Range16.ptr(8495, 8505, 1), new Range16.ptr(8508, 8511, 1), new Range16.ptr(8517, 8521, 1), new Range16.ptr(8526, 8579, 53), new Range16.ptr(8580, 11264, 2684), new Range16.ptr(11265, 11310, 1), new Range16.ptr(11312, 11358, 1), new Range16.ptr(11360, 11492, 1), new Range16.ptr(11499, 11502, 1), new Range16.ptr(11506, 11507, 1), new Range16.ptr(11520, 11557, 1), new Range16.ptr(11559, 11565, 6), new Range16.ptr(11568, 11623, 1), new Range16.ptr(11631, 11648, 17), new Range16.ptr(11649, 11670, 1), new Range16.ptr(11680, 11686, 1), new Range16.ptr(11688, 11694, 1), new Range16.ptr(11696, 11702, 1), new Range16.ptr(11704, 11710, 1), new Range16.ptr(11712, 11718, 1), new Range16.ptr(11720, 11726, 1), new Range16.ptr(11728, 11734, 1), new Range16.ptr(11736, 11742, 1), new Range16.ptr(11823, 12293, 470), new Range16.ptr(12294, 12337, 43), new Range16.ptr(12338, 12341, 1), new Range16.ptr(12347, 12348, 1), new Range16.ptr(12353, 12438, 1), new Range16.ptr(12445, 12447, 1), new Range16.ptr(12449, 12538, 1), new Range16.ptr(12540, 12543, 1), new Range16.ptr(12549, 12589, 1), new Range16.ptr(12593, 12686, 1), new Range16.ptr(12704, 12730, 1), new Range16.ptr(12784, 12799, 1), new Range16.ptr(13312, 19893, 1), new Range16.ptr(19968, 40908, 1), new Range16.ptr(40960, 42124, 1), new Range16.ptr(42192, 42237, 1), new Range16.ptr(42240, 42508, 1), new Range16.ptr(42512, 42527, 1), new Range16.ptr(42538, 42539, 1), new Range16.ptr(42560, 42606, 1), new Range16.ptr(42623, 42653, 1), new Range16.ptr(42656, 42725, 1), new Range16.ptr(42775, 42783, 1), new Range16.ptr(42786, 42888, 1), new Range16.ptr(42891, 42894, 1), new Range16.ptr(42896, 42925, 1), new Range16.ptr(42928, 42929, 1), new Range16.ptr(42999, 43009, 1), new Range16.ptr(43011, 43013, 1), new Range16.ptr(43015, 43018, 1), new Range16.ptr(43020, 43042, 1), new Range16.ptr(43072, 43123, 1), new Range16.ptr(43138, 43187, 1), new Range16.ptr(43250, 43255, 1), new Range16.ptr(43259, 43274, 15), new Range16.ptr(43275, 43301, 1), new Range16.ptr(43312, 43334, 1), new Range16.ptr(43360, 43388, 1), new Range16.ptr(43396, 43442, 1), new Range16.ptr(43471, 43488, 17), new Range16.ptr(43489, 43492, 1), new Range16.ptr(43494, 43503, 1), new Range16.ptr(43514, 43518, 1), new Range16.ptr(43520, 43560, 1), new Range16.ptr(43584, 43586, 1), new Range16.ptr(43588, 43595, 1), new Range16.ptr(43616, 43638, 1), new Range16.ptr(43642, 43646, 4), new Range16.ptr(43647, 43695, 1), new Range16.ptr(43697, 43701, 4), new Range16.ptr(43702, 43705, 3), new Range16.ptr(43706, 43709, 1), new Range16.ptr(43712, 43714, 2), new Range16.ptr(43739, 43741, 1), new Range16.ptr(43744, 43754, 1), new Range16.ptr(43762, 43764, 1), new Range16.ptr(43777, 43782, 1), new Range16.ptr(43785, 43790, 1), new Range16.ptr(43793, 43798, 1), new Range16.ptr(43808, 43814, 1), new Range16.ptr(43816, 43822, 1), new Range16.ptr(43824, 43866, 1), new Range16.ptr(43868, 43871, 1), new Range16.ptr(43876, 43877, 1), new Range16.ptr(43968, 44002, 1), new Range16.ptr(44032, 55203, 1), new Range16.ptr(55216, 55238, 1), new Range16.ptr(55243, 55291, 1), new Range16.ptr(63744, 64109, 1), new Range16.ptr(64112, 64217, 1), new Range16.ptr(64256, 64262, 1), new Range16.ptr(64275, 64279, 1), new Range16.ptr(64285, 64287, 2), new Range16.ptr(64288, 64296, 1), new Range16.ptr(64298, 64310, 1), new Range16.ptr(64312, 64316, 1), new Range16.ptr(64318, 64320, 2), new Range16.ptr(64321, 64323, 2), new Range16.ptr(64324, 64326, 2), new Range16.ptr(64327, 64433, 1), new Range16.ptr(64467, 64829, 1), new Range16.ptr(64848, 64911, 1), new Range16.ptr(64914, 64967, 1), new Range16.ptr(65008, 65019, 1), new Range16.ptr(65136, 65140, 1), new Range16.ptr(65142, 65276, 1), new Range16.ptr(65313, 65338, 1), new Range16.ptr(65345, 65370, 1), new Range16.ptr(65382, 65470, 1), new Range16.ptr(65474, 65479, 1), new Range16.ptr(65482, 65487, 1), new Range16.ptr(65490, 65495, 1), new Range16.ptr(65498, 65500, 1)]), new sliceType$1([new Range32.ptr(65536, 65547, 1), new Range32.ptr(65549, 65574, 1), new Range32.ptr(65576, 65594, 1), new Range32.ptr(65596, 65597, 1), new Range32.ptr(65599, 65613, 1), new Range32.ptr(65616, 65629, 1), new Range32.ptr(65664, 65786, 1), new Range32.ptr(66176, 66204, 1), new Range32.ptr(66208, 66256, 1), new Range32.ptr(66304, 66335, 1), new Range32.ptr(66352, 66368, 1), new Range32.ptr(66370, 66377, 1), new Range32.ptr(66384, 66421, 1), new Range32.ptr(66432, 66461, 1), new Range32.ptr(66464, 66499, 1), new Range32.ptr(66504, 66511, 1), new Range32.ptr(66560, 66717, 1), new Range32.ptr(66816, 66855, 1), new Range32.ptr(66864, 66915, 1), new Range32.ptr(67072, 67382, 1), new Range32.ptr(67392, 67413, 1), new Range32.ptr(67424, 67431, 1), new Range32.ptr(67584, 67589, 1), new Range32.ptr(67592, 67594, 2), new Range32.ptr(67595, 67637, 1), new Range32.ptr(67639, 67640, 1), new Range32.ptr(67644, 67647, 3), new Range32.ptr(67648, 67669, 1), new Range32.ptr(67680, 67702, 1), new Range32.ptr(67712, 67742, 1), new Range32.ptr(67840, 67861, 1), new Range32.ptr(67872, 67897, 1), new Range32.ptr(67968, 68023, 1), new Range32.ptr(68030, 68031, 1), new Range32.ptr(68096, 68112, 16), new Range32.ptr(68113, 68115, 1), new Range32.ptr(68117, 68119, 1), new Range32.ptr(68121, 68147, 1), new Range32.ptr(68192, 68220, 1), new Range32.ptr(68224, 68252, 1), new Range32.ptr(68288, 68295, 1), new Range32.ptr(68297, 68324, 1), new Range32.ptr(68352, 68405, 1), new Range32.ptr(68416, 68437, 1), new Range32.ptr(68448, 68466, 1), new Range32.ptr(68480, 68497, 1), new Range32.ptr(68608, 68680, 1), new Range32.ptr(69635, 69687, 1), new Range32.ptr(69763, 69807, 1), new Range32.ptr(69840, 69864, 1), new Range32.ptr(69891, 69926, 1), new Range32.ptr(69968, 70002, 1), new Range32.ptr(70006, 70019, 13), new Range32.ptr(70020, 70066, 1), new Range32.ptr(70081, 70084, 1), new Range32.ptr(70106, 70144, 38), new Range32.ptr(70145, 70161, 1), new Range32.ptr(70163, 70187, 1), new Range32.ptr(70320, 70366, 1), new Range32.ptr(70405, 70412, 1), new Range32.ptr(70415, 70416, 1), new Range32.ptr(70419, 70440, 1), new Range32.ptr(70442, 70448, 1), new Range32.ptr(70450, 70451, 1), new Range32.ptr(70453, 70457, 1), new Range32.ptr(70461, 70493, 32), new Range32.ptr(70494, 70497, 1), new Range32.ptr(70784, 70831, 1), new Range32.ptr(70852, 70853, 1), new Range32.ptr(70855, 71040, 185), new Range32.ptr(71041, 71086, 1), new Range32.ptr(71168, 71215, 1), new Range32.ptr(71236, 71296, 60), new Range32.ptr(71297, 71338, 1), new Range32.ptr(71840, 71903, 1), new Range32.ptr(71935, 72384, 449), new Range32.ptr(72385, 72440, 1), new Range32.ptr(73728, 74648, 1), new Range32.ptr(77824, 78894, 1), new Range32.ptr(92160, 92728, 1), new Range32.ptr(92736, 92766, 1), new Range32.ptr(92880, 92909, 1), new Range32.ptr(92928, 92975, 1), new Range32.ptr(92992, 92995, 1), new Range32.ptr(93027, 93047, 1), new Range32.ptr(93053, 93071, 1), new Range32.ptr(93952, 94020, 1), new Range32.ptr(94032, 94099, 67), new Range32.ptr(94100, 94111, 1), new Range32.ptr(110592, 110593, 1), new Range32.ptr(113664, 113770, 1), new Range32.ptr(113776, 113788, 1), new Range32.ptr(113792, 113800, 1), new Range32.ptr(113808, 113817, 1), new Range32.ptr(119808, 119892, 1), new Range32.ptr(119894, 119964, 1), new Range32.ptr(119966, 119967, 1), new Range32.ptr(119970, 119973, 3), new Range32.ptr(119974, 119977, 3), new Range32.ptr(119978, 119980, 1), new Range32.ptr(119982, 119993, 1), new Range32.ptr(119995, 119997, 2), new Range32.ptr(119998, 120003, 1), new Range32.ptr(120005, 120069, 1), new Range32.ptr(120071, 120074, 1), new Range32.ptr(120077, 120084, 1), new Range32.ptr(120086, 120092, 1), new Range32.ptr(120094, 120121, 1), new Range32.ptr(120123, 120126, 1), new Range32.ptr(120128, 120132, 1), new Range32.ptr(120134, 120138, 4), new Range32.ptr(120139, 120144, 1), new Range32.ptr(120146, 120485, 1), new Range32.ptr(120488, 120512, 1), new Range32.ptr(120514, 120538, 1), new Range32.ptr(120540, 120570, 1), new Range32.ptr(120572, 120596, 1), new Range32.ptr(120598, 120628, 1), new Range32.ptr(120630, 120654, 1), new Range32.ptr(120656, 120686, 1), new Range32.ptr(120688, 120712, 1), new Range32.ptr(120714, 120744, 1), new Range32.ptr(120746, 120770, 1), new Range32.ptr(120772, 120779, 1), new Range32.ptr(124928, 125124, 1), new Range32.ptr(126464, 126467, 1), new Range32.ptr(126469, 126495, 1), new Range32.ptr(126497, 126498, 1), new Range32.ptr(126500, 126503, 3), new Range32.ptr(126505, 126514, 1), new Range32.ptr(126516, 126519, 1), new Range32.ptr(126521, 126523, 2), new Range32.ptr(126530, 126535, 5), new Range32.ptr(126537, 126541, 2), new Range32.ptr(126542, 126543, 1), new Range32.ptr(126545, 126546, 1), new Range32.ptr(126548, 126551, 3), new Range32.ptr(126553, 126561, 2), new Range32.ptr(126562, 126564, 2), new Range32.ptr(126567, 126570, 1), new Range32.ptr(126572, 126578, 1), new Range32.ptr(126580, 126583, 1), new Range32.ptr(126585, 126588, 1), new Range32.ptr(126590, 126592, 2), new Range32.ptr(126593, 126601, 1), new Range32.ptr(126603, 126619, 1), new Range32.ptr(126625, 126627, 1), new Range32.ptr(126629, 126633, 1), new Range32.ptr(126635, 126651, 1), new Range32.ptr(131072, 173782, 1), new Range32.ptr(173824, 177972, 1), new Range32.ptr(177984, 178205, 1), new Range32.ptr(194560, 195101, 1)]), 6); + _Ll = new RangeTable.ptr(new sliceType([new Range16.ptr(97, 122, 1), new Range16.ptr(181, 223, 42), new Range16.ptr(224, 246, 1), new Range16.ptr(248, 255, 1), new Range16.ptr(257, 311, 2), new Range16.ptr(312, 328, 2), new Range16.ptr(329, 375, 2), new Range16.ptr(378, 382, 2), new Range16.ptr(383, 384, 1), new Range16.ptr(387, 389, 2), new Range16.ptr(392, 396, 4), new Range16.ptr(397, 402, 5), new Range16.ptr(405, 409, 4), new Range16.ptr(410, 411, 1), new Range16.ptr(414, 417, 3), new Range16.ptr(419, 421, 2), new Range16.ptr(424, 426, 2), new Range16.ptr(427, 429, 2), new Range16.ptr(432, 436, 4), new Range16.ptr(438, 441, 3), new Range16.ptr(442, 445, 3), new Range16.ptr(446, 447, 1), new Range16.ptr(454, 460, 3), new Range16.ptr(462, 476, 2), new Range16.ptr(477, 495, 2), new Range16.ptr(496, 499, 3), new Range16.ptr(501, 505, 4), new Range16.ptr(507, 563, 2), new Range16.ptr(564, 569, 1), new Range16.ptr(572, 575, 3), new Range16.ptr(576, 578, 2), new Range16.ptr(583, 591, 2), new Range16.ptr(592, 659, 1), new Range16.ptr(661, 687, 1), new Range16.ptr(881, 883, 2), new Range16.ptr(887, 891, 4), new Range16.ptr(892, 893, 1), new Range16.ptr(912, 940, 28), new Range16.ptr(941, 974, 1), new Range16.ptr(976, 977, 1), new Range16.ptr(981, 983, 1), new Range16.ptr(985, 1007, 2), new Range16.ptr(1008, 1011, 1), new Range16.ptr(1013, 1019, 3), new Range16.ptr(1020, 1072, 52), new Range16.ptr(1073, 1119, 1), new Range16.ptr(1121, 1153, 2), new Range16.ptr(1163, 1215, 2), new Range16.ptr(1218, 1230, 2), new Range16.ptr(1231, 1327, 2), new Range16.ptr(1377, 1415, 1), new Range16.ptr(7424, 7467, 1), new Range16.ptr(7531, 7543, 1), new Range16.ptr(7545, 7578, 1), new Range16.ptr(7681, 7829, 2), new Range16.ptr(7830, 7837, 1), new Range16.ptr(7839, 7935, 2), new Range16.ptr(7936, 7943, 1), new Range16.ptr(7952, 7957, 1), new Range16.ptr(7968, 7975, 1), new Range16.ptr(7984, 7991, 1), new Range16.ptr(8000, 8005, 1), new Range16.ptr(8016, 8023, 1), new Range16.ptr(8032, 8039, 1), new Range16.ptr(8048, 8061, 1), new Range16.ptr(8064, 8071, 1), new Range16.ptr(8080, 8087, 1), new Range16.ptr(8096, 8103, 1), new Range16.ptr(8112, 8116, 1), new Range16.ptr(8118, 8119, 1), new Range16.ptr(8126, 8130, 4), new Range16.ptr(8131, 8132, 1), new Range16.ptr(8134, 8135, 1), new Range16.ptr(8144, 8147, 1), new Range16.ptr(8150, 8151, 1), new Range16.ptr(8160, 8167, 1), new Range16.ptr(8178, 8180, 1), new Range16.ptr(8182, 8183, 1), new Range16.ptr(8458, 8462, 4), new Range16.ptr(8463, 8467, 4), new Range16.ptr(8495, 8505, 5), new Range16.ptr(8508, 8509, 1), new Range16.ptr(8518, 8521, 1), new Range16.ptr(8526, 8580, 54), new Range16.ptr(11312, 11358, 1), new Range16.ptr(11361, 11365, 4), new Range16.ptr(11366, 11372, 2), new Range16.ptr(11377, 11379, 2), new Range16.ptr(11380, 11382, 2), new Range16.ptr(11383, 11387, 1), new Range16.ptr(11393, 11491, 2), new Range16.ptr(11492, 11500, 8), new Range16.ptr(11502, 11507, 5), new Range16.ptr(11520, 11557, 1), new Range16.ptr(11559, 11565, 6), new Range16.ptr(42561, 42605, 2), new Range16.ptr(42625, 42651, 2), new Range16.ptr(42787, 42799, 2), new Range16.ptr(42800, 42801, 1), new Range16.ptr(42803, 42865, 2), new Range16.ptr(42866, 42872, 1), new Range16.ptr(42874, 42876, 2), new Range16.ptr(42879, 42887, 2), new Range16.ptr(42892, 42894, 2), new Range16.ptr(42897, 42899, 2), new Range16.ptr(42900, 42901, 1), new Range16.ptr(42903, 42921, 2), new Range16.ptr(43002, 43824, 822), new Range16.ptr(43825, 43866, 1), new Range16.ptr(43876, 43877, 1), new Range16.ptr(64256, 64262, 1), new Range16.ptr(64275, 64279, 1), new Range16.ptr(65345, 65370, 1)]), new sliceType$1([new Range32.ptr(66600, 66639, 1), new Range32.ptr(71872, 71903, 1), new Range32.ptr(119834, 119859, 1), new Range32.ptr(119886, 119892, 1), new Range32.ptr(119894, 119911, 1), new Range32.ptr(119938, 119963, 1), new Range32.ptr(119990, 119993, 1), new Range32.ptr(119995, 119997, 2), new Range32.ptr(119998, 120003, 1), new Range32.ptr(120005, 120015, 1), new Range32.ptr(120042, 120067, 1), new Range32.ptr(120094, 120119, 1), new Range32.ptr(120146, 120171, 1), new Range32.ptr(120198, 120223, 1), new Range32.ptr(120250, 120275, 1), new Range32.ptr(120302, 120327, 1), new Range32.ptr(120354, 120379, 1), new Range32.ptr(120406, 120431, 1), new Range32.ptr(120458, 120485, 1), new Range32.ptr(120514, 120538, 1), new Range32.ptr(120540, 120545, 1), new Range32.ptr(120572, 120596, 1), new Range32.ptr(120598, 120603, 1), new Range32.ptr(120630, 120654, 1), new Range32.ptr(120656, 120661, 1), new Range32.ptr(120688, 120712, 1), new Range32.ptr(120714, 120719, 1), new Range32.ptr(120746, 120770, 1), new Range32.ptr(120772, 120777, 1), new Range32.ptr(120779, 120779, 1)]), 4); + _Lm = new RangeTable.ptr(new sliceType([new Range16.ptr(688, 705, 1), new Range16.ptr(710, 721, 1), new Range16.ptr(736, 740, 1), new Range16.ptr(748, 750, 2), new Range16.ptr(884, 890, 6), new Range16.ptr(1369, 1600, 231), new Range16.ptr(1765, 1766, 1), new Range16.ptr(2036, 2037, 1), new Range16.ptr(2042, 2074, 32), new Range16.ptr(2084, 2088, 4), new Range16.ptr(2417, 3654, 1237), new Range16.ptr(3782, 4348, 566), new Range16.ptr(6103, 6211, 108), new Range16.ptr(6823, 7288, 465), new Range16.ptr(7289, 7293, 1), new Range16.ptr(7468, 7530, 1), new Range16.ptr(7544, 7579, 35), new Range16.ptr(7580, 7615, 1), new Range16.ptr(8305, 8319, 14), new Range16.ptr(8336, 8348, 1), new Range16.ptr(11388, 11389, 1), new Range16.ptr(11631, 11823, 192), new Range16.ptr(12293, 12337, 44), new Range16.ptr(12338, 12341, 1), new Range16.ptr(12347, 12445, 98), new Range16.ptr(12446, 12540, 94), new Range16.ptr(12541, 12542, 1), new Range16.ptr(40981, 42232, 1251), new Range16.ptr(42233, 42237, 1), new Range16.ptr(42508, 42623, 115), new Range16.ptr(42652, 42653, 1), new Range16.ptr(42775, 42783, 1), new Range16.ptr(42864, 42888, 24), new Range16.ptr(43000, 43001, 1), new Range16.ptr(43471, 43494, 23), new Range16.ptr(43632, 43741, 109), new Range16.ptr(43763, 43764, 1), new Range16.ptr(43868, 43871, 1), new Range16.ptr(65392, 65438, 46), new Range16.ptr(65439, 65439, 1)]), new sliceType$1([new Range32.ptr(92992, 92992, 1), new Range32.ptr(92993, 92995, 1), new Range32.ptr(94099, 94111, 1)]), 0); + _Lo = new RangeTable.ptr(new sliceType([new Range16.ptr(170, 186, 16), new Range16.ptr(443, 448, 5), new Range16.ptr(449, 451, 1), new Range16.ptr(660, 1488, 828), new Range16.ptr(1489, 1514, 1), new Range16.ptr(1520, 1522, 1), new Range16.ptr(1568, 1599, 1), new Range16.ptr(1601, 1610, 1), new Range16.ptr(1646, 1647, 1), new Range16.ptr(1649, 1747, 1), new Range16.ptr(1749, 1774, 25), new Range16.ptr(1775, 1786, 11), new Range16.ptr(1787, 1788, 1), new Range16.ptr(1791, 1808, 17), new Range16.ptr(1810, 1839, 1), new Range16.ptr(1869, 1957, 1), new Range16.ptr(1969, 1994, 25), new Range16.ptr(1995, 2026, 1), new Range16.ptr(2048, 2069, 1), new Range16.ptr(2112, 2136, 1), new Range16.ptr(2208, 2226, 1), new Range16.ptr(2308, 2361, 1), new Range16.ptr(2365, 2384, 19), new Range16.ptr(2392, 2401, 1), new Range16.ptr(2418, 2432, 1), new Range16.ptr(2437, 2444, 1), new Range16.ptr(2447, 2448, 1), new Range16.ptr(2451, 2472, 1), new Range16.ptr(2474, 2480, 1), new Range16.ptr(2482, 2486, 4), new Range16.ptr(2487, 2489, 1), new Range16.ptr(2493, 2510, 17), new Range16.ptr(2524, 2525, 1), new Range16.ptr(2527, 2529, 1), new Range16.ptr(2544, 2545, 1), new Range16.ptr(2565, 2570, 1), new Range16.ptr(2575, 2576, 1), new Range16.ptr(2579, 2600, 1), new Range16.ptr(2602, 2608, 1), new Range16.ptr(2610, 2611, 1), new Range16.ptr(2613, 2614, 1), new Range16.ptr(2616, 2617, 1), new Range16.ptr(2649, 2652, 1), new Range16.ptr(2654, 2674, 20), new Range16.ptr(2675, 2676, 1), new Range16.ptr(2693, 2701, 1), new Range16.ptr(2703, 2705, 1), new Range16.ptr(2707, 2728, 1), new Range16.ptr(2730, 2736, 1), new Range16.ptr(2738, 2739, 1), new Range16.ptr(2741, 2745, 1), new Range16.ptr(2749, 2768, 19), new Range16.ptr(2784, 2785, 1), new Range16.ptr(2821, 2828, 1), new Range16.ptr(2831, 2832, 1), new Range16.ptr(2835, 2856, 1), new Range16.ptr(2858, 2864, 1), new Range16.ptr(2866, 2867, 1), new Range16.ptr(2869, 2873, 1), new Range16.ptr(2877, 2908, 31), new Range16.ptr(2909, 2911, 2), new Range16.ptr(2912, 2913, 1), new Range16.ptr(2929, 2947, 18), new Range16.ptr(2949, 2954, 1), new Range16.ptr(2958, 2960, 1), new Range16.ptr(2962, 2965, 1), new Range16.ptr(2969, 2970, 1), new Range16.ptr(2972, 2974, 2), new Range16.ptr(2975, 2979, 4), new Range16.ptr(2980, 2984, 4), new Range16.ptr(2985, 2986, 1), new Range16.ptr(2990, 3001, 1), new Range16.ptr(3024, 3077, 53), new Range16.ptr(3078, 3084, 1), new Range16.ptr(3086, 3088, 1), new Range16.ptr(3090, 3112, 1), new Range16.ptr(3114, 3129, 1), new Range16.ptr(3133, 3160, 27), new Range16.ptr(3161, 3168, 7), new Range16.ptr(3169, 3205, 36), new Range16.ptr(3206, 3212, 1), new Range16.ptr(3214, 3216, 1), new Range16.ptr(3218, 3240, 1), new Range16.ptr(3242, 3251, 1), new Range16.ptr(3253, 3257, 1), new Range16.ptr(3261, 3294, 33), new Range16.ptr(3296, 3297, 1), new Range16.ptr(3313, 3314, 1), new Range16.ptr(3333, 3340, 1), new Range16.ptr(3342, 3344, 1), new Range16.ptr(3346, 3386, 1), new Range16.ptr(3389, 3406, 17), new Range16.ptr(3424, 3425, 1), new Range16.ptr(3450, 3455, 1), new Range16.ptr(3461, 3478, 1), new Range16.ptr(3482, 3505, 1), new Range16.ptr(3507, 3515, 1), new Range16.ptr(3517, 3520, 3), new Range16.ptr(3521, 3526, 1), new Range16.ptr(3585, 3632, 1), new Range16.ptr(3634, 3635, 1), new Range16.ptr(3648, 3653, 1), new Range16.ptr(3713, 3714, 1), new Range16.ptr(3716, 3719, 3), new Range16.ptr(3720, 3722, 2), new Range16.ptr(3725, 3732, 7), new Range16.ptr(3733, 3735, 1), new Range16.ptr(3737, 3743, 1), new Range16.ptr(3745, 3747, 1), new Range16.ptr(3749, 3751, 2), new Range16.ptr(3754, 3755, 1), new Range16.ptr(3757, 3760, 1), new Range16.ptr(3762, 3763, 1), new Range16.ptr(3773, 3776, 3), new Range16.ptr(3777, 3780, 1), new Range16.ptr(3804, 3807, 1), new Range16.ptr(3840, 3904, 64), new Range16.ptr(3905, 3911, 1), new Range16.ptr(3913, 3948, 1), new Range16.ptr(3976, 3980, 1), new Range16.ptr(4096, 4138, 1), new Range16.ptr(4159, 4176, 17), new Range16.ptr(4177, 4181, 1), new Range16.ptr(4186, 4189, 1), new Range16.ptr(4193, 4197, 4), new Range16.ptr(4198, 4206, 8), new Range16.ptr(4207, 4208, 1), new Range16.ptr(4213, 4225, 1), new Range16.ptr(4238, 4304, 66), new Range16.ptr(4305, 4346, 1), new Range16.ptr(4349, 4680, 1), new Range16.ptr(4682, 4685, 1), new Range16.ptr(4688, 4694, 1), new Range16.ptr(4696, 4698, 2), new Range16.ptr(4699, 4701, 1), new Range16.ptr(4704, 4744, 1), new Range16.ptr(4746, 4749, 1), new Range16.ptr(4752, 4784, 1), new Range16.ptr(4786, 4789, 1), new Range16.ptr(4792, 4798, 1), new Range16.ptr(4800, 4802, 2), new Range16.ptr(4803, 4805, 1), new Range16.ptr(4808, 4822, 1), new Range16.ptr(4824, 4880, 1), new Range16.ptr(4882, 4885, 1), new Range16.ptr(4888, 4954, 1), new Range16.ptr(4992, 5007, 1), new Range16.ptr(5024, 5108, 1), new Range16.ptr(5121, 5740, 1), new Range16.ptr(5743, 5759, 1), new Range16.ptr(5761, 5786, 1), new Range16.ptr(5792, 5866, 1), new Range16.ptr(5873, 5880, 1), new Range16.ptr(5888, 5900, 1), new Range16.ptr(5902, 5905, 1), new Range16.ptr(5920, 5937, 1), new Range16.ptr(5952, 5969, 1), new Range16.ptr(5984, 5996, 1), new Range16.ptr(5998, 6000, 1), new Range16.ptr(6016, 6067, 1), new Range16.ptr(6108, 6176, 68), new Range16.ptr(6177, 6210, 1), new Range16.ptr(6212, 6263, 1), new Range16.ptr(6272, 6312, 1), new Range16.ptr(6314, 6320, 6), new Range16.ptr(6321, 6389, 1), new Range16.ptr(6400, 6430, 1), new Range16.ptr(6480, 6509, 1), new Range16.ptr(6512, 6516, 1), new Range16.ptr(6528, 6571, 1), new Range16.ptr(6593, 6599, 1), new Range16.ptr(6656, 6678, 1), new Range16.ptr(6688, 6740, 1), new Range16.ptr(6917, 6963, 1), new Range16.ptr(6981, 6987, 1), new Range16.ptr(7043, 7072, 1), new Range16.ptr(7086, 7087, 1), new Range16.ptr(7098, 7141, 1), new Range16.ptr(7168, 7203, 1), new Range16.ptr(7245, 7247, 1), new Range16.ptr(7258, 7287, 1), new Range16.ptr(7401, 7404, 1), new Range16.ptr(7406, 7409, 1), new Range16.ptr(7413, 7414, 1), new Range16.ptr(8501, 8504, 1), new Range16.ptr(11568, 11623, 1), new Range16.ptr(11648, 11670, 1), new Range16.ptr(11680, 11686, 1), new Range16.ptr(11688, 11694, 1), new Range16.ptr(11696, 11702, 1), new Range16.ptr(11704, 11710, 1), new Range16.ptr(11712, 11718, 1), new Range16.ptr(11720, 11726, 1), new Range16.ptr(11728, 11734, 1), new Range16.ptr(11736, 11742, 1), new Range16.ptr(12294, 12348, 54), new Range16.ptr(12353, 12438, 1), new Range16.ptr(12447, 12449, 2), new Range16.ptr(12450, 12538, 1), new Range16.ptr(12543, 12549, 6), new Range16.ptr(12550, 12589, 1), new Range16.ptr(12593, 12686, 1), new Range16.ptr(12704, 12730, 1), new Range16.ptr(12784, 12799, 1), new Range16.ptr(13312, 19893, 1), new Range16.ptr(19968, 40908, 1), new Range16.ptr(40960, 40980, 1), new Range16.ptr(40982, 42124, 1), new Range16.ptr(42192, 42231, 1), new Range16.ptr(42240, 42507, 1), new Range16.ptr(42512, 42527, 1), new Range16.ptr(42538, 42539, 1), new Range16.ptr(42606, 42656, 50), new Range16.ptr(42657, 42725, 1), new Range16.ptr(42999, 43003, 4), new Range16.ptr(43004, 43009, 1), new Range16.ptr(43011, 43013, 1), new Range16.ptr(43015, 43018, 1), new Range16.ptr(43020, 43042, 1), new Range16.ptr(43072, 43123, 1), new Range16.ptr(43138, 43187, 1), new Range16.ptr(43250, 43255, 1), new Range16.ptr(43259, 43274, 15), new Range16.ptr(43275, 43301, 1), new Range16.ptr(43312, 43334, 1), new Range16.ptr(43360, 43388, 1), new Range16.ptr(43396, 43442, 1), new Range16.ptr(43488, 43492, 1), new Range16.ptr(43495, 43503, 1), new Range16.ptr(43514, 43518, 1), new Range16.ptr(43520, 43560, 1), new Range16.ptr(43584, 43586, 1), new Range16.ptr(43588, 43595, 1), new Range16.ptr(43616, 43631, 1), new Range16.ptr(43633, 43638, 1), new Range16.ptr(43642, 43646, 4), new Range16.ptr(43647, 43695, 1), new Range16.ptr(43697, 43701, 4), new Range16.ptr(43702, 43705, 3), new Range16.ptr(43706, 43709, 1), new Range16.ptr(43712, 43714, 2), new Range16.ptr(43739, 43740, 1), new Range16.ptr(43744, 43754, 1), new Range16.ptr(43762, 43777, 15), new Range16.ptr(43778, 43782, 1), new Range16.ptr(43785, 43790, 1), new Range16.ptr(43793, 43798, 1), new Range16.ptr(43808, 43814, 1), new Range16.ptr(43816, 43822, 1), new Range16.ptr(43968, 44002, 1), new Range16.ptr(44032, 55203, 1), new Range16.ptr(55216, 55238, 1), new Range16.ptr(55243, 55291, 1), new Range16.ptr(63744, 64109, 1), new Range16.ptr(64112, 64217, 1), new Range16.ptr(64285, 64287, 2), new Range16.ptr(64288, 64296, 1), new Range16.ptr(64298, 64310, 1), new Range16.ptr(64312, 64316, 1), new Range16.ptr(64318, 64320, 2), new Range16.ptr(64321, 64323, 2), new Range16.ptr(64324, 64326, 2), new Range16.ptr(64327, 64433, 1), new Range16.ptr(64467, 64829, 1), new Range16.ptr(64848, 64911, 1), new Range16.ptr(64914, 64967, 1), new Range16.ptr(65008, 65019, 1), new Range16.ptr(65136, 65140, 1), new Range16.ptr(65142, 65276, 1), new Range16.ptr(65382, 65391, 1), new Range16.ptr(65393, 65437, 1), new Range16.ptr(65440, 65470, 1), new Range16.ptr(65474, 65479, 1), new Range16.ptr(65482, 65487, 1), new Range16.ptr(65490, 65495, 1), new Range16.ptr(65498, 65500, 1)]), new sliceType$1([new Range32.ptr(65536, 65547, 1), new Range32.ptr(65549, 65574, 1), new Range32.ptr(65576, 65594, 1), new Range32.ptr(65596, 65597, 1), new Range32.ptr(65599, 65613, 1), new Range32.ptr(65616, 65629, 1), new Range32.ptr(65664, 65786, 1), new Range32.ptr(66176, 66204, 1), new Range32.ptr(66208, 66256, 1), new Range32.ptr(66304, 66335, 1), new Range32.ptr(66352, 66368, 1), new Range32.ptr(66370, 66377, 1), new Range32.ptr(66384, 66421, 1), new Range32.ptr(66432, 66461, 1), new Range32.ptr(66464, 66499, 1), new Range32.ptr(66504, 66511, 1), new Range32.ptr(66640, 66717, 1), new Range32.ptr(66816, 66855, 1), new Range32.ptr(66864, 66915, 1), new Range32.ptr(67072, 67382, 1), new Range32.ptr(67392, 67413, 1), new Range32.ptr(67424, 67431, 1), new Range32.ptr(67584, 67589, 1), new Range32.ptr(67592, 67594, 2), new Range32.ptr(67595, 67637, 1), new Range32.ptr(67639, 67640, 1), new Range32.ptr(67644, 67647, 3), new Range32.ptr(67648, 67669, 1), new Range32.ptr(67680, 67702, 1), new Range32.ptr(67712, 67742, 1), new Range32.ptr(67840, 67861, 1), new Range32.ptr(67872, 67897, 1), new Range32.ptr(67968, 68023, 1), new Range32.ptr(68030, 68031, 1), new Range32.ptr(68096, 68112, 16), new Range32.ptr(68113, 68115, 1), new Range32.ptr(68117, 68119, 1), new Range32.ptr(68121, 68147, 1), new Range32.ptr(68192, 68220, 1), new Range32.ptr(68224, 68252, 1), new Range32.ptr(68288, 68295, 1), new Range32.ptr(68297, 68324, 1), new Range32.ptr(68352, 68405, 1), new Range32.ptr(68416, 68437, 1), new Range32.ptr(68448, 68466, 1), new Range32.ptr(68480, 68497, 1), new Range32.ptr(68608, 68680, 1), new Range32.ptr(69635, 69687, 1), new Range32.ptr(69763, 69807, 1), new Range32.ptr(69840, 69864, 1), new Range32.ptr(69891, 69926, 1), new Range32.ptr(69968, 70002, 1), new Range32.ptr(70006, 70019, 13), new Range32.ptr(70020, 70066, 1), new Range32.ptr(70081, 70084, 1), new Range32.ptr(70106, 70144, 38), new Range32.ptr(70145, 70161, 1), new Range32.ptr(70163, 70187, 1), new Range32.ptr(70320, 70366, 1), new Range32.ptr(70405, 70412, 1), new Range32.ptr(70415, 70416, 1), new Range32.ptr(70419, 70440, 1), new Range32.ptr(70442, 70448, 1), new Range32.ptr(70450, 70451, 1), new Range32.ptr(70453, 70457, 1), new Range32.ptr(70461, 70493, 32), new Range32.ptr(70494, 70497, 1), new Range32.ptr(70784, 70831, 1), new Range32.ptr(70852, 70853, 1), new Range32.ptr(70855, 71040, 185), new Range32.ptr(71041, 71086, 1), new Range32.ptr(71168, 71215, 1), new Range32.ptr(71236, 71296, 60), new Range32.ptr(71297, 71338, 1), new Range32.ptr(71935, 72384, 449), new Range32.ptr(72385, 72440, 1), new Range32.ptr(73728, 74648, 1), new Range32.ptr(77824, 78894, 1), new Range32.ptr(92160, 92728, 1), new Range32.ptr(92736, 92766, 1), new Range32.ptr(92880, 92909, 1), new Range32.ptr(92928, 92975, 1), new Range32.ptr(93027, 93047, 1), new Range32.ptr(93053, 93071, 1), new Range32.ptr(93952, 94020, 1), new Range32.ptr(94032, 110592, 16560), new Range32.ptr(110593, 113664, 3071), new Range32.ptr(113665, 113770, 1), new Range32.ptr(113776, 113788, 1), new Range32.ptr(113792, 113800, 1), new Range32.ptr(113808, 113817, 1), new Range32.ptr(124928, 125124, 1), new Range32.ptr(126464, 126467, 1), new Range32.ptr(126469, 126495, 1), new Range32.ptr(126497, 126498, 1), new Range32.ptr(126500, 126503, 3), new Range32.ptr(126505, 126514, 1), new Range32.ptr(126516, 126519, 1), new Range32.ptr(126521, 126523, 2), new Range32.ptr(126530, 126535, 5), new Range32.ptr(126537, 126541, 2), new Range32.ptr(126542, 126543, 1), new Range32.ptr(126545, 126546, 1), new Range32.ptr(126548, 126551, 3), new Range32.ptr(126553, 126561, 2), new Range32.ptr(126562, 126564, 2), new Range32.ptr(126567, 126570, 1), new Range32.ptr(126572, 126578, 1), new Range32.ptr(126580, 126583, 1), new Range32.ptr(126585, 126588, 1), new Range32.ptr(126590, 126592, 2), new Range32.ptr(126593, 126601, 1), new Range32.ptr(126603, 126619, 1), new Range32.ptr(126625, 126627, 1), new Range32.ptr(126629, 126633, 1), new Range32.ptr(126635, 126651, 1), new Range32.ptr(131072, 173782, 1), new Range32.ptr(173824, 177972, 1), new Range32.ptr(177984, 178205, 1), new Range32.ptr(194560, 195101, 1)]), 1); + _Lt = new RangeTable.ptr(new sliceType([new Range16.ptr(453, 459, 3), new Range16.ptr(498, 8072, 7574), new Range16.ptr(8073, 8079, 1), new Range16.ptr(8088, 8095, 1), new Range16.ptr(8104, 8111, 1), new Range16.ptr(8124, 8140, 16), new Range16.ptr(8188, 8188, 1)]), sliceType$1.nil, 0); + _Lu = new RangeTable.ptr(new sliceType([new Range16.ptr(65, 90, 1), new Range16.ptr(192, 214, 1), new Range16.ptr(216, 222, 1), new Range16.ptr(256, 310, 2), new Range16.ptr(313, 327, 2), new Range16.ptr(330, 376, 2), new Range16.ptr(377, 381, 2), new Range16.ptr(385, 386, 1), new Range16.ptr(388, 390, 2), new Range16.ptr(391, 393, 2), new Range16.ptr(394, 395, 1), new Range16.ptr(398, 401, 1), new Range16.ptr(403, 404, 1), new Range16.ptr(406, 408, 1), new Range16.ptr(412, 413, 1), new Range16.ptr(415, 416, 1), new Range16.ptr(418, 422, 2), new Range16.ptr(423, 425, 2), new Range16.ptr(428, 430, 2), new Range16.ptr(431, 433, 2), new Range16.ptr(434, 435, 1), new Range16.ptr(437, 439, 2), new Range16.ptr(440, 444, 4), new Range16.ptr(452, 461, 3), new Range16.ptr(463, 475, 2), new Range16.ptr(478, 494, 2), new Range16.ptr(497, 500, 3), new Range16.ptr(502, 504, 1), new Range16.ptr(506, 562, 2), new Range16.ptr(570, 571, 1), new Range16.ptr(573, 574, 1), new Range16.ptr(577, 579, 2), new Range16.ptr(580, 582, 1), new Range16.ptr(584, 590, 2), new Range16.ptr(880, 882, 2), new Range16.ptr(886, 895, 9), new Range16.ptr(902, 904, 2), new Range16.ptr(905, 906, 1), new Range16.ptr(908, 910, 2), new Range16.ptr(911, 913, 2), new Range16.ptr(914, 929, 1), new Range16.ptr(931, 939, 1), new Range16.ptr(975, 978, 3), new Range16.ptr(979, 980, 1), new Range16.ptr(984, 1006, 2), new Range16.ptr(1012, 1015, 3), new Range16.ptr(1017, 1018, 1), new Range16.ptr(1021, 1071, 1), new Range16.ptr(1120, 1152, 2), new Range16.ptr(1162, 1216, 2), new Range16.ptr(1217, 1229, 2), new Range16.ptr(1232, 1326, 2), new Range16.ptr(1329, 1366, 1), new Range16.ptr(4256, 4293, 1), new Range16.ptr(4295, 4301, 6), new Range16.ptr(7680, 7828, 2), new Range16.ptr(7838, 7934, 2), new Range16.ptr(7944, 7951, 1), new Range16.ptr(7960, 7965, 1), new Range16.ptr(7976, 7983, 1), new Range16.ptr(7992, 7999, 1), new Range16.ptr(8008, 8013, 1), new Range16.ptr(8025, 8031, 2), new Range16.ptr(8040, 8047, 1), new Range16.ptr(8120, 8123, 1), new Range16.ptr(8136, 8139, 1), new Range16.ptr(8152, 8155, 1), new Range16.ptr(8168, 8172, 1), new Range16.ptr(8184, 8187, 1), new Range16.ptr(8450, 8455, 5), new Range16.ptr(8459, 8461, 1), new Range16.ptr(8464, 8466, 1), new Range16.ptr(8469, 8473, 4), new Range16.ptr(8474, 8477, 1), new Range16.ptr(8484, 8490, 2), new Range16.ptr(8491, 8493, 1), new Range16.ptr(8496, 8499, 1), new Range16.ptr(8510, 8511, 1), new Range16.ptr(8517, 8579, 62), new Range16.ptr(11264, 11310, 1), new Range16.ptr(11360, 11362, 2), new Range16.ptr(11363, 11364, 1), new Range16.ptr(11367, 11373, 2), new Range16.ptr(11374, 11376, 1), new Range16.ptr(11378, 11381, 3), new Range16.ptr(11390, 11392, 1), new Range16.ptr(11394, 11490, 2), new Range16.ptr(11499, 11501, 2), new Range16.ptr(11506, 42560, 31054), new Range16.ptr(42562, 42604, 2), new Range16.ptr(42624, 42650, 2), new Range16.ptr(42786, 42798, 2), new Range16.ptr(42802, 42862, 2), new Range16.ptr(42873, 42877, 2), new Range16.ptr(42878, 42886, 2), new Range16.ptr(42891, 42893, 2), new Range16.ptr(42896, 42898, 2), new Range16.ptr(42902, 42922, 2), new Range16.ptr(42923, 42925, 1), new Range16.ptr(42928, 42929, 1), new Range16.ptr(65313, 65338, 1)]), new sliceType$1([new Range32.ptr(66560, 66599, 1), new Range32.ptr(71840, 71871, 1), new Range32.ptr(119808, 119833, 1), new Range32.ptr(119860, 119885, 1), new Range32.ptr(119912, 119937, 1), new Range32.ptr(119964, 119966, 2), new Range32.ptr(119967, 119973, 3), new Range32.ptr(119974, 119977, 3), new Range32.ptr(119978, 119980, 1), new Range32.ptr(119982, 119989, 1), new Range32.ptr(120016, 120041, 1), new Range32.ptr(120068, 120069, 1), new Range32.ptr(120071, 120074, 1), new Range32.ptr(120077, 120084, 1), new Range32.ptr(120086, 120092, 1), new Range32.ptr(120120, 120121, 1), new Range32.ptr(120123, 120126, 1), new Range32.ptr(120128, 120132, 1), new Range32.ptr(120134, 120138, 4), new Range32.ptr(120139, 120144, 1), new Range32.ptr(120172, 120197, 1), new Range32.ptr(120224, 120249, 1), new Range32.ptr(120276, 120301, 1), new Range32.ptr(120328, 120353, 1), new Range32.ptr(120380, 120405, 1), new Range32.ptr(120432, 120457, 1), new Range32.ptr(120488, 120512, 1), new Range32.ptr(120546, 120570, 1), new Range32.ptr(120604, 120628, 1), new Range32.ptr(120662, 120686, 1), new Range32.ptr(120720, 120744, 1), new Range32.ptr(120778, 120778, 1)]), 3); + _M = new RangeTable.ptr(new sliceType([new Range16.ptr(768, 879, 1), new Range16.ptr(1155, 1161, 1), new Range16.ptr(1425, 1469, 1), new Range16.ptr(1471, 1473, 2), new Range16.ptr(1474, 1476, 2), new Range16.ptr(1477, 1479, 2), new Range16.ptr(1552, 1562, 1), new Range16.ptr(1611, 1631, 1), new Range16.ptr(1648, 1750, 102), new Range16.ptr(1751, 1756, 1), new Range16.ptr(1759, 1764, 1), new Range16.ptr(1767, 1768, 1), new Range16.ptr(1770, 1773, 1), new Range16.ptr(1809, 1840, 31), new Range16.ptr(1841, 1866, 1), new Range16.ptr(1958, 1968, 1), new Range16.ptr(2027, 2035, 1), new Range16.ptr(2070, 2073, 1), new Range16.ptr(2075, 2083, 1), new Range16.ptr(2085, 2087, 1), new Range16.ptr(2089, 2093, 1), new Range16.ptr(2137, 2139, 1), new Range16.ptr(2276, 2307, 1), new Range16.ptr(2362, 2364, 1), new Range16.ptr(2366, 2383, 1), new Range16.ptr(2385, 2391, 1), new Range16.ptr(2402, 2403, 1), new Range16.ptr(2433, 2435, 1), new Range16.ptr(2492, 2494, 2), new Range16.ptr(2495, 2500, 1), new Range16.ptr(2503, 2504, 1), new Range16.ptr(2507, 2509, 1), new Range16.ptr(2519, 2530, 11), new Range16.ptr(2531, 2561, 30), new Range16.ptr(2562, 2563, 1), new Range16.ptr(2620, 2622, 2), new Range16.ptr(2623, 2626, 1), new Range16.ptr(2631, 2632, 1), new Range16.ptr(2635, 2637, 1), new Range16.ptr(2641, 2672, 31), new Range16.ptr(2673, 2677, 4), new Range16.ptr(2689, 2691, 1), new Range16.ptr(2748, 2750, 2), new Range16.ptr(2751, 2757, 1), new Range16.ptr(2759, 2761, 1), new Range16.ptr(2763, 2765, 1), new Range16.ptr(2786, 2787, 1), new Range16.ptr(2817, 2819, 1), new Range16.ptr(2876, 2878, 2), new Range16.ptr(2879, 2884, 1), new Range16.ptr(2887, 2888, 1), new Range16.ptr(2891, 2893, 1), new Range16.ptr(2902, 2903, 1), new Range16.ptr(2914, 2915, 1), new Range16.ptr(2946, 3006, 60), new Range16.ptr(3007, 3010, 1), new Range16.ptr(3014, 3016, 1), new Range16.ptr(3018, 3021, 1), new Range16.ptr(3031, 3072, 41), new Range16.ptr(3073, 3075, 1), new Range16.ptr(3134, 3140, 1), new Range16.ptr(3142, 3144, 1), new Range16.ptr(3146, 3149, 1), new Range16.ptr(3157, 3158, 1), new Range16.ptr(3170, 3171, 1), new Range16.ptr(3201, 3203, 1), new Range16.ptr(3260, 3262, 2), new Range16.ptr(3263, 3268, 1), new Range16.ptr(3270, 3272, 1), new Range16.ptr(3274, 3277, 1), new Range16.ptr(3285, 3286, 1), new Range16.ptr(3298, 3299, 1), new Range16.ptr(3329, 3331, 1), new Range16.ptr(3390, 3396, 1), new Range16.ptr(3398, 3400, 1), new Range16.ptr(3402, 3405, 1), new Range16.ptr(3415, 3426, 11), new Range16.ptr(3427, 3458, 31), new Range16.ptr(3459, 3530, 71), new Range16.ptr(3535, 3540, 1), new Range16.ptr(3542, 3544, 2), new Range16.ptr(3545, 3551, 1), new Range16.ptr(3570, 3571, 1), new Range16.ptr(3633, 3636, 3), new Range16.ptr(3637, 3642, 1), new Range16.ptr(3655, 3662, 1), new Range16.ptr(3761, 3764, 3), new Range16.ptr(3765, 3769, 1), new Range16.ptr(3771, 3772, 1), new Range16.ptr(3784, 3789, 1), new Range16.ptr(3864, 3865, 1), new Range16.ptr(3893, 3897, 2), new Range16.ptr(3902, 3903, 1), new Range16.ptr(3953, 3972, 1), new Range16.ptr(3974, 3975, 1), new Range16.ptr(3981, 3991, 1), new Range16.ptr(3993, 4028, 1), new Range16.ptr(4038, 4139, 101), new Range16.ptr(4140, 4158, 1), new Range16.ptr(4182, 4185, 1), new Range16.ptr(4190, 4192, 1), new Range16.ptr(4194, 4196, 1), new Range16.ptr(4199, 4205, 1), new Range16.ptr(4209, 4212, 1), new Range16.ptr(4226, 4237, 1), new Range16.ptr(4239, 4250, 11), new Range16.ptr(4251, 4253, 1), new Range16.ptr(4957, 4959, 1), new Range16.ptr(5906, 5908, 1), new Range16.ptr(5938, 5940, 1), new Range16.ptr(5970, 5971, 1), new Range16.ptr(6002, 6003, 1), new Range16.ptr(6068, 6099, 1), new Range16.ptr(6109, 6155, 46), new Range16.ptr(6156, 6157, 1), new Range16.ptr(6313, 6432, 119), new Range16.ptr(6433, 6443, 1), new Range16.ptr(6448, 6459, 1), new Range16.ptr(6576, 6592, 1), new Range16.ptr(6600, 6601, 1), new Range16.ptr(6679, 6683, 1), new Range16.ptr(6741, 6750, 1), new Range16.ptr(6752, 6780, 1), new Range16.ptr(6783, 6832, 49), new Range16.ptr(6833, 6846, 1), new Range16.ptr(6912, 6916, 1), new Range16.ptr(6964, 6980, 1), new Range16.ptr(7019, 7027, 1), new Range16.ptr(7040, 7042, 1), new Range16.ptr(7073, 7085, 1), new Range16.ptr(7142, 7155, 1), new Range16.ptr(7204, 7223, 1), new Range16.ptr(7376, 7378, 1), new Range16.ptr(7380, 7400, 1), new Range16.ptr(7405, 7410, 5), new Range16.ptr(7411, 7412, 1), new Range16.ptr(7416, 7417, 1), new Range16.ptr(7616, 7669, 1), new Range16.ptr(7676, 7679, 1), new Range16.ptr(8400, 8432, 1), new Range16.ptr(11503, 11505, 1), new Range16.ptr(11647, 11744, 97), new Range16.ptr(11745, 11775, 1), new Range16.ptr(12330, 12335, 1), new Range16.ptr(12441, 12442, 1), new Range16.ptr(42607, 42610, 1), new Range16.ptr(42612, 42621, 1), new Range16.ptr(42655, 42736, 81), new Range16.ptr(42737, 43010, 273), new Range16.ptr(43014, 43019, 5), new Range16.ptr(43043, 43047, 1), new Range16.ptr(43136, 43137, 1), new Range16.ptr(43188, 43204, 1), new Range16.ptr(43232, 43249, 1), new Range16.ptr(43302, 43309, 1), new Range16.ptr(43335, 43347, 1), new Range16.ptr(43392, 43395, 1), new Range16.ptr(43443, 43456, 1), new Range16.ptr(43493, 43561, 68), new Range16.ptr(43562, 43574, 1), new Range16.ptr(43587, 43596, 9), new Range16.ptr(43597, 43643, 46), new Range16.ptr(43644, 43645, 1), new Range16.ptr(43696, 43698, 2), new Range16.ptr(43699, 43700, 1), new Range16.ptr(43703, 43704, 1), new Range16.ptr(43710, 43711, 1), new Range16.ptr(43713, 43755, 42), new Range16.ptr(43756, 43759, 1), new Range16.ptr(43765, 43766, 1), new Range16.ptr(44003, 44010, 1), new Range16.ptr(44012, 44013, 1), new Range16.ptr(64286, 65024, 738), new Range16.ptr(65025, 65039, 1), new Range16.ptr(65056, 65069, 1)]), new sliceType$1([new Range32.ptr(66045, 66272, 227), new Range32.ptr(66422, 66426, 1), new Range32.ptr(68097, 68099, 1), new Range32.ptr(68101, 68102, 1), new Range32.ptr(68108, 68111, 1), new Range32.ptr(68152, 68154, 1), new Range32.ptr(68159, 68325, 166), new Range32.ptr(68326, 69632, 1306), new Range32.ptr(69633, 69634, 1), new Range32.ptr(69688, 69702, 1), new Range32.ptr(69759, 69762, 1), new Range32.ptr(69808, 69818, 1), new Range32.ptr(69888, 69890, 1), new Range32.ptr(69927, 69940, 1), new Range32.ptr(70003, 70016, 13), new Range32.ptr(70017, 70018, 1), new Range32.ptr(70067, 70080, 1), new Range32.ptr(70188, 70199, 1), new Range32.ptr(70367, 70378, 1), new Range32.ptr(70401, 70403, 1), new Range32.ptr(70460, 70462, 2), new Range32.ptr(70463, 70468, 1), new Range32.ptr(70471, 70472, 1), new Range32.ptr(70475, 70477, 1), new Range32.ptr(70487, 70498, 11), new Range32.ptr(70499, 70502, 3), new Range32.ptr(70503, 70508, 1), new Range32.ptr(70512, 70516, 1), new Range32.ptr(70832, 70851, 1), new Range32.ptr(71087, 71093, 1), new Range32.ptr(71096, 71104, 1), new Range32.ptr(71216, 71232, 1), new Range32.ptr(71339, 71351, 1), new Range32.ptr(92912, 92916, 1), new Range32.ptr(92976, 92982, 1), new Range32.ptr(94033, 94078, 1), new Range32.ptr(94095, 94098, 1), new Range32.ptr(113821, 113822, 1), new Range32.ptr(119141, 119145, 1), new Range32.ptr(119149, 119154, 1), new Range32.ptr(119163, 119170, 1), new Range32.ptr(119173, 119179, 1), new Range32.ptr(119210, 119213, 1), new Range32.ptr(119362, 119364, 1), new Range32.ptr(125136, 125142, 1), new Range32.ptr(917760, 917999, 1)]), 0); + _Mc = new RangeTable.ptr(new sliceType([new Range16.ptr(2307, 2363, 56), new Range16.ptr(2366, 2368, 1), new Range16.ptr(2377, 2380, 1), new Range16.ptr(2382, 2383, 1), new Range16.ptr(2434, 2435, 1), new Range16.ptr(2494, 2496, 1), new Range16.ptr(2503, 2504, 1), new Range16.ptr(2507, 2508, 1), new Range16.ptr(2519, 2563, 44), new Range16.ptr(2622, 2624, 1), new Range16.ptr(2691, 2750, 59), new Range16.ptr(2751, 2752, 1), new Range16.ptr(2761, 2763, 2), new Range16.ptr(2764, 2818, 54), new Range16.ptr(2819, 2878, 59), new Range16.ptr(2880, 2887, 7), new Range16.ptr(2888, 2891, 3), new Range16.ptr(2892, 2903, 11), new Range16.ptr(3006, 3007, 1), new Range16.ptr(3009, 3010, 1), new Range16.ptr(3014, 3016, 1), new Range16.ptr(3018, 3020, 1), new Range16.ptr(3031, 3073, 42), new Range16.ptr(3074, 3075, 1), new Range16.ptr(3137, 3140, 1), new Range16.ptr(3202, 3203, 1), new Range16.ptr(3262, 3264, 2), new Range16.ptr(3265, 3268, 1), new Range16.ptr(3271, 3272, 1), new Range16.ptr(3274, 3275, 1), new Range16.ptr(3285, 3286, 1), new Range16.ptr(3330, 3331, 1), new Range16.ptr(3390, 3392, 1), new Range16.ptr(3398, 3400, 1), new Range16.ptr(3402, 3404, 1), new Range16.ptr(3415, 3458, 43), new Range16.ptr(3459, 3535, 76), new Range16.ptr(3536, 3537, 1), new Range16.ptr(3544, 3551, 1), new Range16.ptr(3570, 3571, 1), new Range16.ptr(3902, 3903, 1), new Range16.ptr(3967, 4139, 172), new Range16.ptr(4140, 4145, 5), new Range16.ptr(4152, 4155, 3), new Range16.ptr(4156, 4182, 26), new Range16.ptr(4183, 4194, 11), new Range16.ptr(4195, 4196, 1), new Range16.ptr(4199, 4205, 1), new Range16.ptr(4227, 4228, 1), new Range16.ptr(4231, 4236, 1), new Range16.ptr(4239, 4250, 11), new Range16.ptr(4251, 4252, 1), new Range16.ptr(6070, 6078, 8), new Range16.ptr(6079, 6085, 1), new Range16.ptr(6087, 6088, 1), new Range16.ptr(6435, 6438, 1), new Range16.ptr(6441, 6443, 1), new Range16.ptr(6448, 6449, 1), new Range16.ptr(6451, 6456, 1), new Range16.ptr(6576, 6592, 1), new Range16.ptr(6600, 6601, 1), new Range16.ptr(6681, 6682, 1), new Range16.ptr(6741, 6743, 2), new Range16.ptr(6753, 6755, 2), new Range16.ptr(6756, 6765, 9), new Range16.ptr(6766, 6770, 1), new Range16.ptr(6916, 6965, 49), new Range16.ptr(6971, 6973, 2), new Range16.ptr(6974, 6977, 1), new Range16.ptr(6979, 6980, 1), new Range16.ptr(7042, 7073, 31), new Range16.ptr(7078, 7079, 1), new Range16.ptr(7082, 7143, 61), new Range16.ptr(7146, 7148, 1), new Range16.ptr(7150, 7154, 4), new Range16.ptr(7155, 7204, 49), new Range16.ptr(7205, 7211, 1), new Range16.ptr(7220, 7221, 1), new Range16.ptr(7393, 7410, 17), new Range16.ptr(7411, 12334, 4923), new Range16.ptr(12335, 43043, 30708), new Range16.ptr(43044, 43047, 3), new Range16.ptr(43136, 43137, 1), new Range16.ptr(43188, 43203, 1), new Range16.ptr(43346, 43347, 1), new Range16.ptr(43395, 43444, 49), new Range16.ptr(43445, 43450, 5), new Range16.ptr(43451, 43453, 2), new Range16.ptr(43454, 43456, 1), new Range16.ptr(43567, 43568, 1), new Range16.ptr(43571, 43572, 1), new Range16.ptr(43597, 43643, 46), new Range16.ptr(43645, 43755, 110), new Range16.ptr(43758, 43759, 1), new Range16.ptr(43765, 44003, 238), new Range16.ptr(44004, 44006, 2), new Range16.ptr(44007, 44009, 2), new Range16.ptr(44010, 44012, 2)]), new sliceType$1([new Range32.ptr(69632, 69634, 2), new Range32.ptr(69762, 69808, 46), new Range32.ptr(69809, 69810, 1), new Range32.ptr(69815, 69816, 1), new Range32.ptr(69932, 70018, 86), new Range32.ptr(70067, 70069, 1), new Range32.ptr(70079, 70080, 1), new Range32.ptr(70188, 70190, 1), new Range32.ptr(70194, 70195, 1), new Range32.ptr(70197, 70368, 171), new Range32.ptr(70369, 70370, 1), new Range32.ptr(70402, 70403, 1), new Range32.ptr(70462, 70463, 1), new Range32.ptr(70465, 70468, 1), new Range32.ptr(70471, 70472, 1), new Range32.ptr(70475, 70477, 1), new Range32.ptr(70487, 70498, 11), new Range32.ptr(70499, 70832, 333), new Range32.ptr(70833, 70834, 1), new Range32.ptr(70841, 70843, 2), new Range32.ptr(70844, 70846, 1), new Range32.ptr(70849, 71087, 238), new Range32.ptr(71088, 71089, 1), new Range32.ptr(71096, 71099, 1), new Range32.ptr(71102, 71216, 114), new Range32.ptr(71217, 71218, 1), new Range32.ptr(71227, 71228, 1), new Range32.ptr(71230, 71340, 110), new Range32.ptr(71342, 71343, 1), new Range32.ptr(71350, 94033, 22683), new Range32.ptr(94034, 94078, 1), new Range32.ptr(119141, 119142, 1), new Range32.ptr(119149, 119154, 1)]), 0); + _Me = new RangeTable.ptr(new sliceType([new Range16.ptr(1160, 1161, 1), new Range16.ptr(6846, 8413, 1567), new Range16.ptr(8414, 8416, 1), new Range16.ptr(8418, 8420, 1), new Range16.ptr(42608, 42610, 1)]), sliceType$1.nil, 0); + _Mn = new RangeTable.ptr(new sliceType([new Range16.ptr(768, 879, 1), new Range16.ptr(1155, 1159, 1), new Range16.ptr(1425, 1469, 1), new Range16.ptr(1471, 1473, 2), new Range16.ptr(1474, 1476, 2), new Range16.ptr(1477, 1479, 2), new Range16.ptr(1552, 1562, 1), new Range16.ptr(1611, 1631, 1), new Range16.ptr(1648, 1750, 102), new Range16.ptr(1751, 1756, 1), new Range16.ptr(1759, 1764, 1), new Range16.ptr(1767, 1768, 1), new Range16.ptr(1770, 1773, 1), new Range16.ptr(1809, 1840, 31), new Range16.ptr(1841, 1866, 1), new Range16.ptr(1958, 1968, 1), new Range16.ptr(2027, 2035, 1), new Range16.ptr(2070, 2073, 1), new Range16.ptr(2075, 2083, 1), new Range16.ptr(2085, 2087, 1), new Range16.ptr(2089, 2093, 1), new Range16.ptr(2137, 2139, 1), new Range16.ptr(2276, 2306, 1), new Range16.ptr(2362, 2364, 2), new Range16.ptr(2369, 2376, 1), new Range16.ptr(2381, 2385, 4), new Range16.ptr(2386, 2391, 1), new Range16.ptr(2402, 2403, 1), new Range16.ptr(2433, 2492, 59), new Range16.ptr(2497, 2500, 1), new Range16.ptr(2509, 2530, 21), new Range16.ptr(2531, 2561, 30), new Range16.ptr(2562, 2620, 58), new Range16.ptr(2625, 2626, 1), new Range16.ptr(2631, 2632, 1), new Range16.ptr(2635, 2637, 1), new Range16.ptr(2641, 2672, 31), new Range16.ptr(2673, 2677, 4), new Range16.ptr(2689, 2690, 1), new Range16.ptr(2748, 2753, 5), new Range16.ptr(2754, 2757, 1), new Range16.ptr(2759, 2760, 1), new Range16.ptr(2765, 2786, 21), new Range16.ptr(2787, 2817, 30), new Range16.ptr(2876, 2879, 3), new Range16.ptr(2881, 2884, 1), new Range16.ptr(2893, 2902, 9), new Range16.ptr(2914, 2915, 1), new Range16.ptr(2946, 3008, 62), new Range16.ptr(3021, 3072, 51), new Range16.ptr(3134, 3136, 1), new Range16.ptr(3142, 3144, 1), new Range16.ptr(3146, 3149, 1), new Range16.ptr(3157, 3158, 1), new Range16.ptr(3170, 3171, 1), new Range16.ptr(3201, 3260, 59), new Range16.ptr(3263, 3270, 7), new Range16.ptr(3276, 3277, 1), new Range16.ptr(3298, 3299, 1), new Range16.ptr(3329, 3393, 64), new Range16.ptr(3394, 3396, 1), new Range16.ptr(3405, 3426, 21), new Range16.ptr(3427, 3530, 103), new Range16.ptr(3538, 3540, 1), new Range16.ptr(3542, 3633, 91), new Range16.ptr(3636, 3642, 1), new Range16.ptr(3655, 3662, 1), new Range16.ptr(3761, 3764, 3), new Range16.ptr(3765, 3769, 1), new Range16.ptr(3771, 3772, 1), new Range16.ptr(3784, 3789, 1), new Range16.ptr(3864, 3865, 1), new Range16.ptr(3893, 3897, 2), new Range16.ptr(3953, 3966, 1), new Range16.ptr(3968, 3972, 1), new Range16.ptr(3974, 3975, 1), new Range16.ptr(3981, 3991, 1), new Range16.ptr(3993, 4028, 1), new Range16.ptr(4038, 4141, 103), new Range16.ptr(4142, 4144, 1), new Range16.ptr(4146, 4151, 1), new Range16.ptr(4153, 4154, 1), new Range16.ptr(4157, 4158, 1), new Range16.ptr(4184, 4185, 1), new Range16.ptr(4190, 4192, 1), new Range16.ptr(4209, 4212, 1), new Range16.ptr(4226, 4229, 3), new Range16.ptr(4230, 4237, 7), new Range16.ptr(4253, 4957, 704), new Range16.ptr(4958, 4959, 1), new Range16.ptr(5906, 5908, 1), new Range16.ptr(5938, 5940, 1), new Range16.ptr(5970, 5971, 1), new Range16.ptr(6002, 6003, 1), new Range16.ptr(6068, 6069, 1), new Range16.ptr(6071, 6077, 1), new Range16.ptr(6086, 6089, 3), new Range16.ptr(6090, 6099, 1), new Range16.ptr(6109, 6155, 46), new Range16.ptr(6156, 6157, 1), new Range16.ptr(6313, 6432, 119), new Range16.ptr(6433, 6434, 1), new Range16.ptr(6439, 6440, 1), new Range16.ptr(6450, 6457, 7), new Range16.ptr(6458, 6459, 1), new Range16.ptr(6679, 6680, 1), new Range16.ptr(6683, 6742, 59), new Range16.ptr(6744, 6750, 1), new Range16.ptr(6752, 6754, 2), new Range16.ptr(6757, 6764, 1), new Range16.ptr(6771, 6780, 1), new Range16.ptr(6783, 6832, 49), new Range16.ptr(6833, 6845, 1), new Range16.ptr(6912, 6915, 1), new Range16.ptr(6964, 6966, 2), new Range16.ptr(6967, 6970, 1), new Range16.ptr(6972, 6978, 6), new Range16.ptr(7019, 7027, 1), new Range16.ptr(7040, 7041, 1), new Range16.ptr(7074, 7077, 1), new Range16.ptr(7080, 7081, 1), new Range16.ptr(7083, 7085, 1), new Range16.ptr(7142, 7144, 2), new Range16.ptr(7145, 7149, 4), new Range16.ptr(7151, 7153, 1), new Range16.ptr(7212, 7219, 1), new Range16.ptr(7222, 7223, 1), new Range16.ptr(7376, 7378, 1), new Range16.ptr(7380, 7392, 1), new Range16.ptr(7394, 7400, 1), new Range16.ptr(7405, 7412, 7), new Range16.ptr(7416, 7417, 1), new Range16.ptr(7616, 7669, 1), new Range16.ptr(7676, 7679, 1), new Range16.ptr(8400, 8412, 1), new Range16.ptr(8417, 8421, 4), new Range16.ptr(8422, 8432, 1), new Range16.ptr(11503, 11505, 1), new Range16.ptr(11647, 11744, 97), new Range16.ptr(11745, 11775, 1), new Range16.ptr(12330, 12333, 1), new Range16.ptr(12441, 12442, 1), new Range16.ptr(42607, 42612, 5), new Range16.ptr(42613, 42621, 1), new Range16.ptr(42655, 42736, 81), new Range16.ptr(42737, 43010, 273), new Range16.ptr(43014, 43019, 5), new Range16.ptr(43045, 43046, 1), new Range16.ptr(43204, 43232, 28), new Range16.ptr(43233, 43249, 1), new Range16.ptr(43302, 43309, 1), new Range16.ptr(43335, 43345, 1), new Range16.ptr(43392, 43394, 1), new Range16.ptr(43443, 43446, 3), new Range16.ptr(43447, 43449, 1), new Range16.ptr(43452, 43493, 41), new Range16.ptr(43561, 43566, 1), new Range16.ptr(43569, 43570, 1), new Range16.ptr(43573, 43574, 1), new Range16.ptr(43587, 43596, 9), new Range16.ptr(43644, 43696, 52), new Range16.ptr(43698, 43700, 1), new Range16.ptr(43703, 43704, 1), new Range16.ptr(43710, 43711, 1), new Range16.ptr(43713, 43756, 43), new Range16.ptr(43757, 43766, 9), new Range16.ptr(44005, 44008, 3), new Range16.ptr(44013, 64286, 20273), new Range16.ptr(65024, 65039, 1), new Range16.ptr(65056, 65069, 1)]), new sliceType$1([new Range32.ptr(66045, 66272, 227), new Range32.ptr(66422, 66426, 1), new Range32.ptr(68097, 68099, 1), new Range32.ptr(68101, 68102, 1), new Range32.ptr(68108, 68111, 1), new Range32.ptr(68152, 68154, 1), new Range32.ptr(68159, 68325, 166), new Range32.ptr(68326, 69633, 1307), new Range32.ptr(69688, 69702, 1), new Range32.ptr(69759, 69761, 1), new Range32.ptr(69811, 69814, 1), new Range32.ptr(69817, 69818, 1), new Range32.ptr(69888, 69890, 1), new Range32.ptr(69927, 69931, 1), new Range32.ptr(69933, 69940, 1), new Range32.ptr(70003, 70016, 13), new Range32.ptr(70017, 70070, 53), new Range32.ptr(70071, 70078, 1), new Range32.ptr(70191, 70193, 1), new Range32.ptr(70196, 70198, 2), new Range32.ptr(70199, 70367, 168), new Range32.ptr(70371, 70378, 1), new Range32.ptr(70401, 70460, 59), new Range32.ptr(70464, 70502, 38), new Range32.ptr(70503, 70508, 1), new Range32.ptr(70512, 70516, 1), new Range32.ptr(70835, 70840, 1), new Range32.ptr(70842, 70847, 5), new Range32.ptr(70848, 70850, 2), new Range32.ptr(70851, 71090, 239), new Range32.ptr(71091, 71093, 1), new Range32.ptr(71100, 71101, 1), new Range32.ptr(71103, 71104, 1), new Range32.ptr(71219, 71226, 1), new Range32.ptr(71229, 71231, 2), new Range32.ptr(71232, 71339, 107), new Range32.ptr(71341, 71344, 3), new Range32.ptr(71345, 71349, 1), new Range32.ptr(71351, 92912, 21561), new Range32.ptr(92913, 92916, 1), new Range32.ptr(92976, 92982, 1), new Range32.ptr(94095, 94098, 1), new Range32.ptr(113821, 113822, 1), new Range32.ptr(119143, 119145, 1), new Range32.ptr(119163, 119170, 1), new Range32.ptr(119173, 119179, 1), new Range32.ptr(119210, 119213, 1), new Range32.ptr(119362, 119364, 1), new Range32.ptr(125136, 125142, 1), new Range32.ptr(917760, 917999, 1)]), 0); + _N = new RangeTable.ptr(new sliceType([new Range16.ptr(48, 57, 1), new Range16.ptr(178, 179, 1), new Range16.ptr(185, 188, 3), new Range16.ptr(189, 190, 1), new Range16.ptr(1632, 1641, 1), new Range16.ptr(1776, 1785, 1), new Range16.ptr(1984, 1993, 1), new Range16.ptr(2406, 2415, 1), new Range16.ptr(2534, 2543, 1), new Range16.ptr(2548, 2553, 1), new Range16.ptr(2662, 2671, 1), new Range16.ptr(2790, 2799, 1), new Range16.ptr(2918, 2927, 1), new Range16.ptr(2930, 2935, 1), new Range16.ptr(3046, 3058, 1), new Range16.ptr(3174, 3183, 1), new Range16.ptr(3192, 3198, 1), new Range16.ptr(3302, 3311, 1), new Range16.ptr(3430, 3445, 1), new Range16.ptr(3558, 3567, 1), new Range16.ptr(3664, 3673, 1), new Range16.ptr(3792, 3801, 1), new Range16.ptr(3872, 3891, 1), new Range16.ptr(4160, 4169, 1), new Range16.ptr(4240, 4249, 1), new Range16.ptr(4969, 4988, 1), new Range16.ptr(5870, 5872, 1), new Range16.ptr(6112, 6121, 1), new Range16.ptr(6128, 6137, 1), new Range16.ptr(6160, 6169, 1), new Range16.ptr(6470, 6479, 1), new Range16.ptr(6608, 6618, 1), new Range16.ptr(6784, 6793, 1), new Range16.ptr(6800, 6809, 1), new Range16.ptr(6992, 7001, 1), new Range16.ptr(7088, 7097, 1), new Range16.ptr(7232, 7241, 1), new Range16.ptr(7248, 7257, 1), new Range16.ptr(8304, 8308, 4), new Range16.ptr(8309, 8313, 1), new Range16.ptr(8320, 8329, 1), new Range16.ptr(8528, 8578, 1), new Range16.ptr(8581, 8585, 1), new Range16.ptr(9312, 9371, 1), new Range16.ptr(9450, 9471, 1), new Range16.ptr(10102, 10131, 1), new Range16.ptr(11517, 12295, 778), new Range16.ptr(12321, 12329, 1), new Range16.ptr(12344, 12346, 1), new Range16.ptr(12690, 12693, 1), new Range16.ptr(12832, 12841, 1), new Range16.ptr(12872, 12879, 1), new Range16.ptr(12881, 12895, 1), new Range16.ptr(12928, 12937, 1), new Range16.ptr(12977, 12991, 1), new Range16.ptr(42528, 42537, 1), new Range16.ptr(42726, 42735, 1), new Range16.ptr(43056, 43061, 1), new Range16.ptr(43216, 43225, 1), new Range16.ptr(43264, 43273, 1), new Range16.ptr(43472, 43481, 1), new Range16.ptr(43504, 43513, 1), new Range16.ptr(43600, 43609, 1), new Range16.ptr(44016, 44025, 1), new Range16.ptr(65296, 65305, 1)]), new sliceType$1([new Range32.ptr(65799, 65843, 1), new Range32.ptr(65856, 65912, 1), new Range32.ptr(65930, 65931, 1), new Range32.ptr(66273, 66299, 1), new Range32.ptr(66336, 66339, 1), new Range32.ptr(66369, 66378, 9), new Range32.ptr(66513, 66517, 1), new Range32.ptr(66720, 66729, 1), new Range32.ptr(67672, 67679, 1), new Range32.ptr(67705, 67711, 1), new Range32.ptr(67751, 67759, 1), new Range32.ptr(67862, 67867, 1), new Range32.ptr(68160, 68167, 1), new Range32.ptr(68221, 68222, 1), new Range32.ptr(68253, 68255, 1), new Range32.ptr(68331, 68335, 1), new Range32.ptr(68440, 68447, 1), new Range32.ptr(68472, 68479, 1), new Range32.ptr(68521, 68527, 1), new Range32.ptr(69216, 69246, 1), new Range32.ptr(69714, 69743, 1), new Range32.ptr(69872, 69881, 1), new Range32.ptr(69942, 69951, 1), new Range32.ptr(70096, 70105, 1), new Range32.ptr(70113, 70132, 1), new Range32.ptr(70384, 70393, 1), new Range32.ptr(70864, 70873, 1), new Range32.ptr(71248, 71257, 1), new Range32.ptr(71360, 71369, 1), new Range32.ptr(71904, 71922, 1), new Range32.ptr(74752, 74862, 1), new Range32.ptr(92768, 92777, 1), new Range32.ptr(93008, 93017, 1), new Range32.ptr(93019, 93025, 1), new Range32.ptr(119648, 119665, 1), new Range32.ptr(120782, 120831, 1), new Range32.ptr(125127, 125135, 1), new Range32.ptr(127232, 127244, 1)]), 4); + _Nd = new RangeTable.ptr(new sliceType([new Range16.ptr(48, 57, 1), new Range16.ptr(1632, 1641, 1), new Range16.ptr(1776, 1785, 1), new Range16.ptr(1984, 1993, 1), new Range16.ptr(2406, 2415, 1), new Range16.ptr(2534, 2543, 1), new Range16.ptr(2662, 2671, 1), new Range16.ptr(2790, 2799, 1), new Range16.ptr(2918, 2927, 1), new Range16.ptr(3046, 3055, 1), new Range16.ptr(3174, 3183, 1), new Range16.ptr(3302, 3311, 1), new Range16.ptr(3430, 3439, 1), new Range16.ptr(3558, 3567, 1), new Range16.ptr(3664, 3673, 1), new Range16.ptr(3792, 3801, 1), new Range16.ptr(3872, 3881, 1), new Range16.ptr(4160, 4169, 1), new Range16.ptr(4240, 4249, 1), new Range16.ptr(6112, 6121, 1), new Range16.ptr(6160, 6169, 1), new Range16.ptr(6470, 6479, 1), new Range16.ptr(6608, 6617, 1), new Range16.ptr(6784, 6793, 1), new Range16.ptr(6800, 6809, 1), new Range16.ptr(6992, 7001, 1), new Range16.ptr(7088, 7097, 1), new Range16.ptr(7232, 7241, 1), new Range16.ptr(7248, 7257, 1), new Range16.ptr(42528, 42537, 1), new Range16.ptr(43216, 43225, 1), new Range16.ptr(43264, 43273, 1), new Range16.ptr(43472, 43481, 1), new Range16.ptr(43504, 43513, 1), new Range16.ptr(43600, 43609, 1), new Range16.ptr(44016, 44025, 1), new Range16.ptr(65296, 65305, 1)]), new sliceType$1([new Range32.ptr(66720, 66729, 1), new Range32.ptr(69734, 69743, 1), new Range32.ptr(69872, 69881, 1), new Range32.ptr(69942, 69951, 1), new Range32.ptr(70096, 70105, 1), new Range32.ptr(70384, 70393, 1), new Range32.ptr(70864, 70873, 1), new Range32.ptr(71248, 71257, 1), new Range32.ptr(71360, 71369, 1), new Range32.ptr(71904, 71913, 1), new Range32.ptr(92768, 92777, 1), new Range32.ptr(93008, 93017, 1), new Range32.ptr(120782, 120831, 1)]), 1); + _Nl = new RangeTable.ptr(new sliceType([new Range16.ptr(5870, 5872, 1), new Range16.ptr(8544, 8578, 1), new Range16.ptr(8581, 8584, 1), new Range16.ptr(12295, 12321, 26), new Range16.ptr(12322, 12329, 1), new Range16.ptr(12344, 12346, 1), new Range16.ptr(42726, 42735, 1)]), new sliceType$1([new Range32.ptr(65856, 65908, 1), new Range32.ptr(66369, 66378, 9), new Range32.ptr(66513, 66517, 1), new Range32.ptr(74752, 74862, 1)]), 0); + _No = new RangeTable.ptr(new sliceType([new Range16.ptr(178, 179, 1), new Range16.ptr(185, 188, 3), new Range16.ptr(189, 190, 1), new Range16.ptr(2548, 2553, 1), new Range16.ptr(2930, 2935, 1), new Range16.ptr(3056, 3058, 1), new Range16.ptr(3192, 3198, 1), new Range16.ptr(3440, 3445, 1), new Range16.ptr(3882, 3891, 1), new Range16.ptr(4969, 4988, 1), new Range16.ptr(6128, 6137, 1), new Range16.ptr(6618, 8304, 1686), new Range16.ptr(8308, 8313, 1), new Range16.ptr(8320, 8329, 1), new Range16.ptr(8528, 8543, 1), new Range16.ptr(8585, 9312, 727), new Range16.ptr(9313, 9371, 1), new Range16.ptr(9450, 9471, 1), new Range16.ptr(10102, 10131, 1), new Range16.ptr(11517, 12690, 1173), new Range16.ptr(12691, 12693, 1), new Range16.ptr(12832, 12841, 1), new Range16.ptr(12872, 12879, 1), new Range16.ptr(12881, 12895, 1), new Range16.ptr(12928, 12937, 1), new Range16.ptr(12977, 12991, 1), new Range16.ptr(43056, 43061, 1)]), new sliceType$1([new Range32.ptr(65799, 65843, 1), new Range32.ptr(65909, 65912, 1), new Range32.ptr(65930, 65931, 1), new Range32.ptr(66273, 66299, 1), new Range32.ptr(66336, 66339, 1), new Range32.ptr(67672, 67679, 1), new Range32.ptr(67705, 67711, 1), new Range32.ptr(67751, 67759, 1), new Range32.ptr(67862, 67867, 1), new Range32.ptr(68160, 68167, 1), new Range32.ptr(68221, 68222, 1), new Range32.ptr(68253, 68255, 1), new Range32.ptr(68331, 68335, 1), new Range32.ptr(68440, 68447, 1), new Range32.ptr(68472, 68479, 1), new Range32.ptr(68521, 68527, 1), new Range32.ptr(69216, 69246, 1), new Range32.ptr(69714, 69733, 1), new Range32.ptr(70113, 70132, 1), new Range32.ptr(71914, 71922, 1), new Range32.ptr(93019, 93025, 1), new Range32.ptr(119648, 119665, 1), new Range32.ptr(125127, 125135, 1), new Range32.ptr(127232, 127244, 1)]), 3); + _P = new RangeTable.ptr(new sliceType([new Range16.ptr(33, 35, 1), new Range16.ptr(37, 42, 1), new Range16.ptr(44, 47, 1), new Range16.ptr(58, 59, 1), new Range16.ptr(63, 64, 1), new Range16.ptr(91, 93, 1), new Range16.ptr(95, 123, 28), new Range16.ptr(125, 161, 36), new Range16.ptr(167, 171, 4), new Range16.ptr(182, 183, 1), new Range16.ptr(187, 191, 4), new Range16.ptr(894, 903, 9), new Range16.ptr(1370, 1375, 1), new Range16.ptr(1417, 1418, 1), new Range16.ptr(1470, 1472, 2), new Range16.ptr(1475, 1478, 3), new Range16.ptr(1523, 1524, 1), new Range16.ptr(1545, 1546, 1), new Range16.ptr(1548, 1549, 1), new Range16.ptr(1563, 1566, 3), new Range16.ptr(1567, 1642, 75), new Range16.ptr(1643, 1645, 1), new Range16.ptr(1748, 1792, 44), new Range16.ptr(1793, 1805, 1), new Range16.ptr(2039, 2041, 1), new Range16.ptr(2096, 2110, 1), new Range16.ptr(2142, 2404, 262), new Range16.ptr(2405, 2416, 11), new Range16.ptr(2800, 3572, 772), new Range16.ptr(3663, 3674, 11), new Range16.ptr(3675, 3844, 169), new Range16.ptr(3845, 3858, 1), new Range16.ptr(3860, 3898, 38), new Range16.ptr(3899, 3901, 1), new Range16.ptr(3973, 4048, 75), new Range16.ptr(4049, 4052, 1), new Range16.ptr(4057, 4058, 1), new Range16.ptr(4170, 4175, 1), new Range16.ptr(4347, 4960, 613), new Range16.ptr(4961, 4968, 1), new Range16.ptr(5120, 5741, 621), new Range16.ptr(5742, 5787, 45), new Range16.ptr(5788, 5867, 79), new Range16.ptr(5868, 5869, 1), new Range16.ptr(5941, 5942, 1), new Range16.ptr(6100, 6102, 1), new Range16.ptr(6104, 6106, 1), new Range16.ptr(6144, 6154, 1), new Range16.ptr(6468, 6469, 1), new Range16.ptr(6686, 6687, 1), new Range16.ptr(6816, 6822, 1), new Range16.ptr(6824, 6829, 1), new Range16.ptr(7002, 7008, 1), new Range16.ptr(7164, 7167, 1), new Range16.ptr(7227, 7231, 1), new Range16.ptr(7294, 7295, 1), new Range16.ptr(7360, 7367, 1), new Range16.ptr(7379, 8208, 829), new Range16.ptr(8209, 8231, 1), new Range16.ptr(8240, 8259, 1), new Range16.ptr(8261, 8273, 1), new Range16.ptr(8275, 8286, 1), new Range16.ptr(8317, 8318, 1), new Range16.ptr(8333, 8334, 1), new Range16.ptr(8968, 8971, 1), new Range16.ptr(9001, 9002, 1), new Range16.ptr(10088, 10101, 1), new Range16.ptr(10181, 10182, 1), new Range16.ptr(10214, 10223, 1), new Range16.ptr(10627, 10648, 1), new Range16.ptr(10712, 10715, 1), new Range16.ptr(10748, 10749, 1), new Range16.ptr(11513, 11516, 1), new Range16.ptr(11518, 11519, 1), new Range16.ptr(11632, 11776, 144), new Range16.ptr(11777, 11822, 1), new Range16.ptr(11824, 11842, 1), new Range16.ptr(12289, 12291, 1), new Range16.ptr(12296, 12305, 1), new Range16.ptr(12308, 12319, 1), new Range16.ptr(12336, 12349, 13), new Range16.ptr(12448, 12539, 91), new Range16.ptr(42238, 42239, 1), new Range16.ptr(42509, 42511, 1), new Range16.ptr(42611, 42622, 11), new Range16.ptr(42738, 42743, 1), new Range16.ptr(43124, 43127, 1), new Range16.ptr(43214, 43215, 1), new Range16.ptr(43256, 43258, 1), new Range16.ptr(43310, 43311, 1), new Range16.ptr(43359, 43457, 98), new Range16.ptr(43458, 43469, 1), new Range16.ptr(43486, 43487, 1), new Range16.ptr(43612, 43615, 1), new Range16.ptr(43742, 43743, 1), new Range16.ptr(43760, 43761, 1), new Range16.ptr(44011, 64830, 20819), new Range16.ptr(64831, 65040, 209), new Range16.ptr(65041, 65049, 1), new Range16.ptr(65072, 65106, 1), new Range16.ptr(65108, 65121, 1), new Range16.ptr(65123, 65128, 5), new Range16.ptr(65130, 65131, 1), new Range16.ptr(65281, 65283, 1), new Range16.ptr(65285, 65290, 1), new Range16.ptr(65292, 65295, 1), new Range16.ptr(65306, 65307, 1), new Range16.ptr(65311, 65312, 1), new Range16.ptr(65339, 65341, 1), new Range16.ptr(65343, 65371, 28), new Range16.ptr(65373, 65375, 2), new Range16.ptr(65376, 65381, 1)]), new sliceType$1([new Range32.ptr(65792, 65794, 1), new Range32.ptr(66463, 66512, 49), new Range32.ptr(66927, 67671, 744), new Range32.ptr(67871, 67903, 32), new Range32.ptr(68176, 68184, 1), new Range32.ptr(68223, 68336, 113), new Range32.ptr(68337, 68342, 1), new Range32.ptr(68409, 68415, 1), new Range32.ptr(68505, 68508, 1), new Range32.ptr(69703, 69709, 1), new Range32.ptr(69819, 69820, 1), new Range32.ptr(69822, 69825, 1), new Range32.ptr(69952, 69955, 1), new Range32.ptr(70004, 70005, 1), new Range32.ptr(70085, 70088, 1), new Range32.ptr(70093, 70200, 107), new Range32.ptr(70201, 70205, 1), new Range32.ptr(70854, 71105, 251), new Range32.ptr(71106, 71113, 1), new Range32.ptr(71233, 71235, 1), new Range32.ptr(74864, 74868, 1), new Range32.ptr(92782, 92783, 1), new Range32.ptr(92917, 92983, 66), new Range32.ptr(92984, 92987, 1), new Range32.ptr(92996, 113823, 20827)]), 11); + _Pc = new RangeTable.ptr(new sliceType([new Range16.ptr(95, 8255, 8160), new Range16.ptr(8256, 8276, 20), new Range16.ptr(65075, 65076, 1), new Range16.ptr(65101, 65103, 1), new Range16.ptr(65343, 65343, 1)]), sliceType$1.nil, 0); + _Pd = new RangeTable.ptr(new sliceType([new Range16.ptr(45, 1418, 1373), new Range16.ptr(1470, 5120, 3650), new Range16.ptr(6150, 8208, 2058), new Range16.ptr(8209, 8213, 1), new Range16.ptr(11799, 11802, 3), new Range16.ptr(11834, 11835, 1), new Range16.ptr(11840, 12316, 476), new Range16.ptr(12336, 12448, 112), new Range16.ptr(65073, 65074, 1), new Range16.ptr(65112, 65123, 11), new Range16.ptr(65293, 65293, 1)]), sliceType$1.nil, 0); + _Pe = new RangeTable.ptr(new sliceType([new Range16.ptr(41, 93, 52), new Range16.ptr(125, 3899, 3774), new Range16.ptr(3901, 5788, 1887), new Range16.ptr(8262, 8318, 56), new Range16.ptr(8334, 8969, 635), new Range16.ptr(8971, 9002, 31), new Range16.ptr(10089, 10101, 2), new Range16.ptr(10182, 10215, 33), new Range16.ptr(10217, 10223, 2), new Range16.ptr(10628, 10648, 2), new Range16.ptr(10713, 10715, 2), new Range16.ptr(10749, 11811, 1062), new Range16.ptr(11813, 11817, 2), new Range16.ptr(12297, 12305, 2), new Range16.ptr(12309, 12315, 2), new Range16.ptr(12318, 12319, 1), new Range16.ptr(64830, 65048, 218), new Range16.ptr(65078, 65092, 2), new Range16.ptr(65096, 65114, 18), new Range16.ptr(65116, 65118, 2), new Range16.ptr(65289, 65341, 52), new Range16.ptr(65373, 65379, 3)]), sliceType$1.nil, 1); + _Pf = new RangeTable.ptr(new sliceType([new Range16.ptr(187, 8217, 8030), new Range16.ptr(8221, 8250, 29), new Range16.ptr(11779, 11781, 2), new Range16.ptr(11786, 11789, 3), new Range16.ptr(11805, 11809, 4)]), sliceType$1.nil, 0); + _Pi = new RangeTable.ptr(new sliceType([new Range16.ptr(171, 8216, 8045), new Range16.ptr(8219, 8220, 1), new Range16.ptr(8223, 8249, 26), new Range16.ptr(11778, 11780, 2), new Range16.ptr(11785, 11788, 3), new Range16.ptr(11804, 11808, 4)]), sliceType$1.nil, 0); + _Po = new RangeTable.ptr(new sliceType([new Range16.ptr(33, 35, 1), new Range16.ptr(37, 39, 1), new Range16.ptr(42, 46, 2), new Range16.ptr(47, 58, 11), new Range16.ptr(59, 63, 4), new Range16.ptr(64, 92, 28), new Range16.ptr(161, 167, 6), new Range16.ptr(182, 183, 1), new Range16.ptr(191, 894, 703), new Range16.ptr(903, 1370, 467), new Range16.ptr(1371, 1375, 1), new Range16.ptr(1417, 1472, 55), new Range16.ptr(1475, 1478, 3), new Range16.ptr(1523, 1524, 1), new Range16.ptr(1545, 1546, 1), new Range16.ptr(1548, 1549, 1), new Range16.ptr(1563, 1566, 3), new Range16.ptr(1567, 1642, 75), new Range16.ptr(1643, 1645, 1), new Range16.ptr(1748, 1792, 44), new Range16.ptr(1793, 1805, 1), new Range16.ptr(2039, 2041, 1), new Range16.ptr(2096, 2110, 1), new Range16.ptr(2142, 2404, 262), new Range16.ptr(2405, 2416, 11), new Range16.ptr(2800, 3572, 772), new Range16.ptr(3663, 3674, 11), new Range16.ptr(3675, 3844, 169), new Range16.ptr(3845, 3858, 1), new Range16.ptr(3860, 3973, 113), new Range16.ptr(4048, 4052, 1), new Range16.ptr(4057, 4058, 1), new Range16.ptr(4170, 4175, 1), new Range16.ptr(4347, 4960, 613), new Range16.ptr(4961, 4968, 1), new Range16.ptr(5741, 5742, 1), new Range16.ptr(5867, 5869, 1), new Range16.ptr(5941, 5942, 1), new Range16.ptr(6100, 6102, 1), new Range16.ptr(6104, 6106, 1), new Range16.ptr(6144, 6149, 1), new Range16.ptr(6151, 6154, 1), new Range16.ptr(6468, 6469, 1), new Range16.ptr(6686, 6687, 1), new Range16.ptr(6816, 6822, 1), new Range16.ptr(6824, 6829, 1), new Range16.ptr(7002, 7008, 1), new Range16.ptr(7164, 7167, 1), new Range16.ptr(7227, 7231, 1), new Range16.ptr(7294, 7295, 1), new Range16.ptr(7360, 7367, 1), new Range16.ptr(7379, 8214, 835), new Range16.ptr(8215, 8224, 9), new Range16.ptr(8225, 8231, 1), new Range16.ptr(8240, 8248, 1), new Range16.ptr(8251, 8254, 1), new Range16.ptr(8257, 8259, 1), new Range16.ptr(8263, 8273, 1), new Range16.ptr(8275, 8277, 2), new Range16.ptr(8278, 8286, 1), new Range16.ptr(11513, 11516, 1), new Range16.ptr(11518, 11519, 1), new Range16.ptr(11632, 11776, 144), new Range16.ptr(11777, 11782, 5), new Range16.ptr(11783, 11784, 1), new Range16.ptr(11787, 11790, 3), new Range16.ptr(11791, 11798, 1), new Range16.ptr(11800, 11801, 1), new Range16.ptr(11803, 11806, 3), new Range16.ptr(11807, 11818, 11), new Range16.ptr(11819, 11822, 1), new Range16.ptr(11824, 11833, 1), new Range16.ptr(11836, 11839, 1), new Range16.ptr(11841, 12289, 448), new Range16.ptr(12290, 12291, 1), new Range16.ptr(12349, 12539, 190), new Range16.ptr(42238, 42239, 1), new Range16.ptr(42509, 42511, 1), new Range16.ptr(42611, 42622, 11), new Range16.ptr(42738, 42743, 1), new Range16.ptr(43124, 43127, 1), new Range16.ptr(43214, 43215, 1), new Range16.ptr(43256, 43258, 1), new Range16.ptr(43310, 43311, 1), new Range16.ptr(43359, 43457, 98), new Range16.ptr(43458, 43469, 1), new Range16.ptr(43486, 43487, 1), new Range16.ptr(43612, 43615, 1), new Range16.ptr(43742, 43743, 1), new Range16.ptr(43760, 43761, 1), new Range16.ptr(44011, 65040, 21029), new Range16.ptr(65041, 65046, 1), new Range16.ptr(65049, 65072, 23), new Range16.ptr(65093, 65094, 1), new Range16.ptr(65097, 65100, 1), new Range16.ptr(65104, 65106, 1), new Range16.ptr(65108, 65111, 1), new Range16.ptr(65119, 65121, 1), new Range16.ptr(65128, 65130, 2), new Range16.ptr(65131, 65281, 150), new Range16.ptr(65282, 65283, 1), new Range16.ptr(65285, 65287, 1), new Range16.ptr(65290, 65294, 2), new Range16.ptr(65295, 65306, 11), new Range16.ptr(65307, 65311, 4), new Range16.ptr(65312, 65340, 28), new Range16.ptr(65377, 65380, 3), new Range16.ptr(65381, 65381, 1)]), new sliceType$1([new Range32.ptr(65792, 65792, 1), new Range32.ptr(65793, 65794, 1), new Range32.ptr(66463, 66512, 49), new Range32.ptr(66927, 67671, 744), new Range32.ptr(67871, 67903, 32), new Range32.ptr(68176, 68184, 1), new Range32.ptr(68223, 68336, 113), new Range32.ptr(68337, 68342, 1), new Range32.ptr(68409, 68415, 1), new Range32.ptr(68505, 68508, 1), new Range32.ptr(69703, 69709, 1), new Range32.ptr(69819, 69820, 1), new Range32.ptr(69822, 69825, 1), new Range32.ptr(69952, 69955, 1), new Range32.ptr(70004, 70005, 1), new Range32.ptr(70085, 70088, 1), new Range32.ptr(70093, 70200, 107), new Range32.ptr(70201, 70205, 1), new Range32.ptr(70854, 71105, 251), new Range32.ptr(71106, 71113, 1), new Range32.ptr(71233, 71235, 1), new Range32.ptr(74864, 74868, 1), new Range32.ptr(92782, 92783, 1), new Range32.ptr(92917, 92983, 66), new Range32.ptr(92984, 92987, 1), new Range32.ptr(92996, 113823, 20827)]), 8); + _Ps = new RangeTable.ptr(new sliceType([new Range16.ptr(40, 91, 51), new Range16.ptr(123, 3898, 3775), new Range16.ptr(3900, 5787, 1887), new Range16.ptr(8218, 8222, 4), new Range16.ptr(8261, 8317, 56), new Range16.ptr(8333, 8968, 635), new Range16.ptr(8970, 9001, 31), new Range16.ptr(10088, 10100, 2), new Range16.ptr(10181, 10214, 33), new Range16.ptr(10216, 10222, 2), new Range16.ptr(10627, 10647, 2), new Range16.ptr(10712, 10714, 2), new Range16.ptr(10748, 11810, 1062), new Range16.ptr(11812, 11816, 2), new Range16.ptr(11842, 12296, 454), new Range16.ptr(12298, 12304, 2), new Range16.ptr(12308, 12314, 2), new Range16.ptr(12317, 64831, 52514), new Range16.ptr(65047, 65077, 30), new Range16.ptr(65079, 65091, 2), new Range16.ptr(65095, 65113, 18), new Range16.ptr(65115, 65117, 2), new Range16.ptr(65288, 65339, 51), new Range16.ptr(65371, 65375, 4), new Range16.ptr(65378, 65378, 1)]), sliceType$1.nil, 1); + _S = new RangeTable.ptr(new sliceType([new Range16.ptr(36, 43, 7), new Range16.ptr(60, 62, 1), new Range16.ptr(94, 96, 2), new Range16.ptr(124, 126, 2), new Range16.ptr(162, 166, 1), new Range16.ptr(168, 169, 1), new Range16.ptr(172, 174, 2), new Range16.ptr(175, 177, 1), new Range16.ptr(180, 184, 4), new Range16.ptr(215, 247, 32), new Range16.ptr(706, 709, 1), new Range16.ptr(722, 735, 1), new Range16.ptr(741, 747, 1), new Range16.ptr(749, 751, 2), new Range16.ptr(752, 767, 1), new Range16.ptr(885, 900, 15), new Range16.ptr(901, 1014, 113), new Range16.ptr(1154, 1421, 267), new Range16.ptr(1422, 1423, 1), new Range16.ptr(1542, 1544, 1), new Range16.ptr(1547, 1550, 3), new Range16.ptr(1551, 1758, 207), new Range16.ptr(1769, 1789, 20), new Range16.ptr(1790, 2038, 248), new Range16.ptr(2546, 2547, 1), new Range16.ptr(2554, 2555, 1), new Range16.ptr(2801, 2928, 127), new Range16.ptr(3059, 3066, 1), new Range16.ptr(3199, 3449, 250), new Range16.ptr(3647, 3841, 194), new Range16.ptr(3842, 3843, 1), new Range16.ptr(3859, 3861, 2), new Range16.ptr(3862, 3863, 1), new Range16.ptr(3866, 3871, 1), new Range16.ptr(3892, 3896, 2), new Range16.ptr(4030, 4037, 1), new Range16.ptr(4039, 4044, 1), new Range16.ptr(4046, 4047, 1), new Range16.ptr(4053, 4056, 1), new Range16.ptr(4254, 4255, 1), new Range16.ptr(5008, 5017, 1), new Range16.ptr(6107, 6464, 357), new Range16.ptr(6622, 6655, 1), new Range16.ptr(7009, 7018, 1), new Range16.ptr(7028, 7036, 1), new Range16.ptr(8125, 8127, 2), new Range16.ptr(8128, 8129, 1), new Range16.ptr(8141, 8143, 1), new Range16.ptr(8157, 8159, 1), new Range16.ptr(8173, 8175, 1), new Range16.ptr(8189, 8190, 1), new Range16.ptr(8260, 8274, 14), new Range16.ptr(8314, 8316, 1), new Range16.ptr(8330, 8332, 1), new Range16.ptr(8352, 8381, 1), new Range16.ptr(8448, 8449, 1), new Range16.ptr(8451, 8454, 1), new Range16.ptr(8456, 8457, 1), new Range16.ptr(8468, 8470, 2), new Range16.ptr(8471, 8472, 1), new Range16.ptr(8478, 8483, 1), new Range16.ptr(8485, 8489, 2), new Range16.ptr(8494, 8506, 12), new Range16.ptr(8507, 8512, 5), new Range16.ptr(8513, 8516, 1), new Range16.ptr(8522, 8525, 1), new Range16.ptr(8527, 8592, 65), new Range16.ptr(8593, 8967, 1), new Range16.ptr(8972, 9000, 1), new Range16.ptr(9003, 9210, 1), new Range16.ptr(9216, 9254, 1), new Range16.ptr(9280, 9290, 1), new Range16.ptr(9372, 9449, 1), new Range16.ptr(9472, 10087, 1), new Range16.ptr(10132, 10180, 1), new Range16.ptr(10183, 10213, 1), new Range16.ptr(10224, 10626, 1), new Range16.ptr(10649, 10711, 1), new Range16.ptr(10716, 10747, 1), new Range16.ptr(10750, 11123, 1), new Range16.ptr(11126, 11157, 1), new Range16.ptr(11160, 11193, 1), new Range16.ptr(11197, 11208, 1), new Range16.ptr(11210, 11217, 1), new Range16.ptr(11493, 11498, 1), new Range16.ptr(11904, 11929, 1), new Range16.ptr(11931, 12019, 1), new Range16.ptr(12032, 12245, 1), new Range16.ptr(12272, 12283, 1), new Range16.ptr(12292, 12306, 14), new Range16.ptr(12307, 12320, 13), new Range16.ptr(12342, 12343, 1), new Range16.ptr(12350, 12351, 1), new Range16.ptr(12443, 12444, 1), new Range16.ptr(12688, 12689, 1), new Range16.ptr(12694, 12703, 1), new Range16.ptr(12736, 12771, 1), new Range16.ptr(12800, 12830, 1), new Range16.ptr(12842, 12871, 1), new Range16.ptr(12880, 12896, 16), new Range16.ptr(12897, 12927, 1), new Range16.ptr(12938, 12976, 1), new Range16.ptr(12992, 13054, 1), new Range16.ptr(13056, 13311, 1), new Range16.ptr(19904, 19967, 1), new Range16.ptr(42128, 42182, 1), new Range16.ptr(42752, 42774, 1), new Range16.ptr(42784, 42785, 1), new Range16.ptr(42889, 42890, 1), new Range16.ptr(43048, 43051, 1), new Range16.ptr(43062, 43065, 1), new Range16.ptr(43639, 43641, 1), new Range16.ptr(43867, 64297, 20430), new Range16.ptr(64434, 64449, 1), new Range16.ptr(65020, 65021, 1), new Range16.ptr(65122, 65124, 2), new Range16.ptr(65125, 65126, 1), new Range16.ptr(65129, 65284, 155), new Range16.ptr(65291, 65308, 17), new Range16.ptr(65309, 65310, 1), new Range16.ptr(65342, 65344, 2), new Range16.ptr(65372, 65374, 2), new Range16.ptr(65504, 65510, 1), new Range16.ptr(65512, 65518, 1), new Range16.ptr(65532, 65533, 1)]), new sliceType$1([new Range32.ptr(65847, 65855, 1), new Range32.ptr(65913, 65929, 1), new Range32.ptr(65932, 65936, 4), new Range32.ptr(65937, 65947, 1), new Range32.ptr(65952, 66000, 48), new Range32.ptr(66001, 66044, 1), new Range32.ptr(67703, 67704, 1), new Range32.ptr(68296, 92988, 24692), new Range32.ptr(92989, 92991, 1), new Range32.ptr(92997, 113820, 20823), new Range32.ptr(118784, 119029, 1), new Range32.ptr(119040, 119078, 1), new Range32.ptr(119081, 119140, 1), new Range32.ptr(119146, 119148, 1), new Range32.ptr(119171, 119172, 1), new Range32.ptr(119180, 119209, 1), new Range32.ptr(119214, 119261, 1), new Range32.ptr(119296, 119361, 1), new Range32.ptr(119365, 119552, 187), new Range32.ptr(119553, 119638, 1), new Range32.ptr(120513, 120539, 26), new Range32.ptr(120571, 120597, 26), new Range32.ptr(120629, 120655, 26), new Range32.ptr(120687, 120713, 26), new Range32.ptr(120745, 120771, 26), new Range32.ptr(126704, 126705, 1), new Range32.ptr(126976, 127019, 1), new Range32.ptr(127024, 127123, 1), new Range32.ptr(127136, 127150, 1), new Range32.ptr(127153, 127167, 1), new Range32.ptr(127169, 127183, 1), new Range32.ptr(127185, 127221, 1), new Range32.ptr(127248, 127278, 1), new Range32.ptr(127280, 127339, 1), new Range32.ptr(127344, 127386, 1), new Range32.ptr(127462, 127490, 1), new Range32.ptr(127504, 127546, 1), new Range32.ptr(127552, 127560, 1), new Range32.ptr(127568, 127569, 1), new Range32.ptr(127744, 127788, 1), new Range32.ptr(127792, 127869, 1), new Range32.ptr(127872, 127950, 1), new Range32.ptr(127956, 127991, 1), new Range32.ptr(128000, 128254, 1), new Range32.ptr(128256, 128330, 1), new Range32.ptr(128336, 128377, 1), new Range32.ptr(128379, 128419, 1), new Range32.ptr(128421, 128578, 1), new Range32.ptr(128581, 128719, 1), new Range32.ptr(128736, 128748, 1), new Range32.ptr(128752, 128755, 1), new Range32.ptr(128768, 128883, 1), new Range32.ptr(128896, 128980, 1), new Range32.ptr(129024, 129035, 1), new Range32.ptr(129040, 129095, 1), new Range32.ptr(129104, 129113, 1), new Range32.ptr(129120, 129159, 1), new Range32.ptr(129168, 129197, 1)]), 10); + _Sc = new RangeTable.ptr(new sliceType([new Range16.ptr(36, 162, 126), new Range16.ptr(163, 165, 1), new Range16.ptr(1423, 1547, 124), new Range16.ptr(2546, 2547, 1), new Range16.ptr(2555, 2801, 246), new Range16.ptr(3065, 3647, 582), new Range16.ptr(6107, 8352, 2245), new Range16.ptr(8353, 8381, 1), new Range16.ptr(43064, 65020, 21956), new Range16.ptr(65129, 65284, 155), new Range16.ptr(65504, 65505, 1), new Range16.ptr(65509, 65510, 1)]), sliceType$1.nil, 2); + _Sk = new RangeTable.ptr(new sliceType([new Range16.ptr(94, 96, 2), new Range16.ptr(168, 175, 7), new Range16.ptr(180, 184, 4), new Range16.ptr(706, 709, 1), new Range16.ptr(722, 735, 1), new Range16.ptr(741, 747, 1), new Range16.ptr(749, 751, 2), new Range16.ptr(752, 767, 1), new Range16.ptr(885, 900, 15), new Range16.ptr(901, 8125, 7224), new Range16.ptr(8127, 8129, 1), new Range16.ptr(8141, 8143, 1), new Range16.ptr(8157, 8159, 1), new Range16.ptr(8173, 8175, 1), new Range16.ptr(8189, 8190, 1), new Range16.ptr(12443, 12444, 1), new Range16.ptr(42752, 42774, 1), new Range16.ptr(42784, 42785, 1), new Range16.ptr(42889, 42890, 1), new Range16.ptr(43867, 64434, 20567), new Range16.ptr(64435, 64449, 1), new Range16.ptr(65342, 65344, 2), new Range16.ptr(65507, 65507, 1)]), sliceType$1.nil, 3); + _Sm = new RangeTable.ptr(new sliceType([new Range16.ptr(43, 60, 17), new Range16.ptr(61, 62, 1), new Range16.ptr(124, 126, 2), new Range16.ptr(172, 177, 5), new Range16.ptr(215, 247, 32), new Range16.ptr(1014, 1542, 528), new Range16.ptr(1543, 1544, 1), new Range16.ptr(8260, 8274, 14), new Range16.ptr(8314, 8316, 1), new Range16.ptr(8330, 8332, 1), new Range16.ptr(8472, 8512, 40), new Range16.ptr(8513, 8516, 1), new Range16.ptr(8523, 8592, 69), new Range16.ptr(8593, 8596, 1), new Range16.ptr(8602, 8603, 1), new Range16.ptr(8608, 8614, 3), new Range16.ptr(8622, 8654, 32), new Range16.ptr(8655, 8658, 3), new Range16.ptr(8660, 8692, 32), new Range16.ptr(8693, 8959, 1), new Range16.ptr(8992, 8993, 1), new Range16.ptr(9084, 9115, 31), new Range16.ptr(9116, 9139, 1), new Range16.ptr(9180, 9185, 1), new Range16.ptr(9655, 9665, 10), new Range16.ptr(9720, 9727, 1), new Range16.ptr(9839, 10176, 337), new Range16.ptr(10177, 10180, 1), new Range16.ptr(10183, 10213, 1), new Range16.ptr(10224, 10239, 1), new Range16.ptr(10496, 10626, 1), new Range16.ptr(10649, 10711, 1), new Range16.ptr(10716, 10747, 1), new Range16.ptr(10750, 11007, 1), new Range16.ptr(11056, 11076, 1), new Range16.ptr(11079, 11084, 1), new Range16.ptr(64297, 65122, 825), new Range16.ptr(65124, 65126, 1), new Range16.ptr(65291, 65308, 17), new Range16.ptr(65309, 65310, 1), new Range16.ptr(65372, 65374, 2), new Range16.ptr(65506, 65513, 7), new Range16.ptr(65514, 65516, 1)]), new sliceType$1([new Range32.ptr(120513, 120539, 26), new Range32.ptr(120571, 120597, 26), new Range32.ptr(120629, 120655, 26), new Range32.ptr(120687, 120713, 26), new Range32.ptr(120745, 120771, 26), new Range32.ptr(126704, 126705, 1)]), 5); + _So = new RangeTable.ptr(new sliceType([new Range16.ptr(166, 169, 3), new Range16.ptr(174, 176, 2), new Range16.ptr(1154, 1421, 267), new Range16.ptr(1422, 1550, 128), new Range16.ptr(1551, 1758, 207), new Range16.ptr(1769, 1789, 20), new Range16.ptr(1790, 2038, 248), new Range16.ptr(2554, 2928, 374), new Range16.ptr(3059, 3064, 1), new Range16.ptr(3066, 3199, 133), new Range16.ptr(3449, 3841, 392), new Range16.ptr(3842, 3843, 1), new Range16.ptr(3859, 3861, 2), new Range16.ptr(3862, 3863, 1), new Range16.ptr(3866, 3871, 1), new Range16.ptr(3892, 3896, 2), new Range16.ptr(4030, 4037, 1), new Range16.ptr(4039, 4044, 1), new Range16.ptr(4046, 4047, 1), new Range16.ptr(4053, 4056, 1), new Range16.ptr(4254, 4255, 1), new Range16.ptr(5008, 5017, 1), new Range16.ptr(6464, 6622, 158), new Range16.ptr(6623, 6655, 1), new Range16.ptr(7009, 7018, 1), new Range16.ptr(7028, 7036, 1), new Range16.ptr(8448, 8449, 1), new Range16.ptr(8451, 8454, 1), new Range16.ptr(8456, 8457, 1), new Range16.ptr(8468, 8470, 2), new Range16.ptr(8471, 8478, 7), new Range16.ptr(8479, 8483, 1), new Range16.ptr(8485, 8489, 2), new Range16.ptr(8494, 8506, 12), new Range16.ptr(8507, 8522, 15), new Range16.ptr(8524, 8525, 1), new Range16.ptr(8527, 8597, 70), new Range16.ptr(8598, 8601, 1), new Range16.ptr(8604, 8607, 1), new Range16.ptr(8609, 8610, 1), new Range16.ptr(8612, 8613, 1), new Range16.ptr(8615, 8621, 1), new Range16.ptr(8623, 8653, 1), new Range16.ptr(8656, 8657, 1), new Range16.ptr(8659, 8661, 2), new Range16.ptr(8662, 8691, 1), new Range16.ptr(8960, 8967, 1), new Range16.ptr(8972, 8991, 1), new Range16.ptr(8994, 9000, 1), new Range16.ptr(9003, 9083, 1), new Range16.ptr(9085, 9114, 1), new Range16.ptr(9140, 9179, 1), new Range16.ptr(9186, 9210, 1), new Range16.ptr(9216, 9254, 1), new Range16.ptr(9280, 9290, 1), new Range16.ptr(9372, 9449, 1), new Range16.ptr(9472, 9654, 1), new Range16.ptr(9656, 9664, 1), new Range16.ptr(9666, 9719, 1), new Range16.ptr(9728, 9838, 1), new Range16.ptr(9840, 10087, 1), new Range16.ptr(10132, 10175, 1), new Range16.ptr(10240, 10495, 1), new Range16.ptr(11008, 11055, 1), new Range16.ptr(11077, 11078, 1), new Range16.ptr(11085, 11123, 1), new Range16.ptr(11126, 11157, 1), new Range16.ptr(11160, 11193, 1), new Range16.ptr(11197, 11208, 1), new Range16.ptr(11210, 11217, 1), new Range16.ptr(11493, 11498, 1), new Range16.ptr(11904, 11929, 1), new Range16.ptr(11931, 12019, 1), new Range16.ptr(12032, 12245, 1), new Range16.ptr(12272, 12283, 1), new Range16.ptr(12292, 12306, 14), new Range16.ptr(12307, 12320, 13), new Range16.ptr(12342, 12343, 1), new Range16.ptr(12350, 12351, 1), new Range16.ptr(12688, 12689, 1), new Range16.ptr(12694, 12703, 1), new Range16.ptr(12736, 12771, 1), new Range16.ptr(12800, 12830, 1), new Range16.ptr(12842, 12871, 1), new Range16.ptr(12880, 12896, 16), new Range16.ptr(12897, 12927, 1), new Range16.ptr(12938, 12976, 1), new Range16.ptr(12992, 13054, 1), new Range16.ptr(13056, 13311, 1), new Range16.ptr(19904, 19967, 1), new Range16.ptr(42128, 42182, 1), new Range16.ptr(43048, 43051, 1), new Range16.ptr(43062, 43063, 1), new Range16.ptr(43065, 43639, 574), new Range16.ptr(43640, 43641, 1), new Range16.ptr(65021, 65508, 487), new Range16.ptr(65512, 65517, 5), new Range16.ptr(65518, 65532, 14), new Range16.ptr(65533, 65533, 1)]), new sliceType$1([new Range32.ptr(65847, 65847, 1), new Range32.ptr(65848, 65855, 1), new Range32.ptr(65913, 65929, 1), new Range32.ptr(65932, 65936, 4), new Range32.ptr(65937, 65947, 1), new Range32.ptr(65952, 66000, 48), new Range32.ptr(66001, 66044, 1), new Range32.ptr(67703, 67704, 1), new Range32.ptr(68296, 92988, 24692), new Range32.ptr(92989, 92991, 1), new Range32.ptr(92997, 113820, 20823), new Range32.ptr(118784, 119029, 1), new Range32.ptr(119040, 119078, 1), new Range32.ptr(119081, 119140, 1), new Range32.ptr(119146, 119148, 1), new Range32.ptr(119171, 119172, 1), new Range32.ptr(119180, 119209, 1), new Range32.ptr(119214, 119261, 1), new Range32.ptr(119296, 119361, 1), new Range32.ptr(119365, 119552, 187), new Range32.ptr(119553, 119638, 1), new Range32.ptr(126976, 127019, 1), new Range32.ptr(127024, 127123, 1), new Range32.ptr(127136, 127150, 1), new Range32.ptr(127153, 127167, 1), new Range32.ptr(127169, 127183, 1), new Range32.ptr(127185, 127221, 1), new Range32.ptr(127248, 127278, 1), new Range32.ptr(127280, 127339, 1), new Range32.ptr(127344, 127386, 1), new Range32.ptr(127462, 127490, 1), new Range32.ptr(127504, 127546, 1), new Range32.ptr(127552, 127560, 1), new Range32.ptr(127568, 127569, 1), new Range32.ptr(127744, 127788, 1), new Range32.ptr(127792, 127869, 1), new Range32.ptr(127872, 127950, 1), new Range32.ptr(127956, 127991, 1), new Range32.ptr(128000, 128254, 1), new Range32.ptr(128256, 128330, 1), new Range32.ptr(128336, 128377, 1), new Range32.ptr(128379, 128419, 1), new Range32.ptr(128421, 128578, 1), new Range32.ptr(128581, 128719, 1), new Range32.ptr(128736, 128748, 1), new Range32.ptr(128752, 128755, 1), new Range32.ptr(128768, 128883, 1), new Range32.ptr(128896, 128980, 1), new Range32.ptr(129024, 129035, 1), new Range32.ptr(129040, 129095, 1), new Range32.ptr(129104, 129113, 1), new Range32.ptr(129120, 129159, 1), new Range32.ptr(129168, 129197, 1)]), 2); + _Z = new RangeTable.ptr(new sliceType([new Range16.ptr(32, 160, 128), new Range16.ptr(5760, 8192, 2432), new Range16.ptr(8193, 8202, 1), new Range16.ptr(8232, 8233, 1), new Range16.ptr(8239, 8287, 48), new Range16.ptr(12288, 12288, 1)]), sliceType$1.nil, 1); + _Zl = new RangeTable.ptr(new sliceType([new Range16.ptr(8232, 8232, 1)]), sliceType$1.nil, 0); + _Zp = new RangeTable.ptr(new sliceType([new Range16.ptr(8233, 8233, 1)]), sliceType$1.nil, 0); + _Zs = new RangeTable.ptr(new sliceType([new Range16.ptr(32, 160, 128), new Range16.ptr(5760, 8192, 2432), new Range16.ptr(8193, 8202, 1), new Range16.ptr(8239, 8287, 48), new Range16.ptr(12288, 12288, 1)]), sliceType$1.nil, 1); + $pkg.Cc = _Cc; + $pkg.Cf = _Cf; + $pkg.Co = _Co; + $pkg.Cs = _Cs; + $pkg.Digit = _Nd; + $pkg.Nd = _Nd; + $pkg.Letter = _L; + $pkg.L = _L; + $pkg.Lm = _Lm; + $pkg.Lo = _Lo; + $pkg.Ll = _Ll; + $pkg.M = _M; + $pkg.Mc = _Mc; + $pkg.Me = _Me; + $pkg.Mn = _Mn; + $pkg.Nl = _Nl; + $pkg.No = _No; + $pkg.Number = _N; + $pkg.N = _N; + $pkg.C = _C; + $pkg.Pc = _Pc; + $pkg.Pd = _Pd; + $pkg.Pe = _Pe; + $pkg.Pf = _Pf; + $pkg.Pi = _Pi; + $pkg.Po = _Po; + $pkg.Ps = _Ps; + $pkg.P = _P; + $pkg.Sc = _Sc; + $pkg.Sk = _Sk; + $pkg.Sm = _Sm; + $pkg.So = _So; + $pkg.Z = _Z; + $pkg.S = _S; + $pkg.PrintRanges = new sliceType$2([$pkg.L, $pkg.M, $pkg.N, $pkg.P, $pkg.S]); + $pkg.Lt = _Lt; + $pkg.Upper = _Lu; + $pkg.Lu = _Lu; + $pkg.Zl = _Zl; + $pkg.Zp = _Zp; + $pkg.Zs = _Zs; + $pkg.GraphicRanges = new sliceType$2([$pkg.L, $pkg.M, $pkg.N, $pkg.P, $pkg.S, $pkg.Zs]); + $pkg.Categories = (_map = new $Map(), _key = "C", _map[_key] = { k: _key, v: $pkg.C }, _key = "Cc", _map[_key] = { k: _key, v: $pkg.Cc }, _key = "Cf", _map[_key] = { k: _key, v: $pkg.Cf }, _key = "Co", _map[_key] = { k: _key, v: $pkg.Co }, _key = "Cs", _map[_key] = { k: _key, v: $pkg.Cs }, _key = "L", _map[_key] = { k: _key, v: $pkg.L }, _key = "Ll", _map[_key] = { k: _key, v: $pkg.Ll }, _key = "Lm", _map[_key] = { k: _key, v: $pkg.Lm }, _key = "Lo", _map[_key] = { k: _key, v: $pkg.Lo }, _key = "Lt", _map[_key] = { k: _key, v: $pkg.Lt }, _key = "Lu", _map[_key] = { k: _key, v: $pkg.Lu }, _key = "M", _map[_key] = { k: _key, v: $pkg.M }, _key = "Mc", _map[_key] = { k: _key, v: $pkg.Mc }, _key = "Me", _map[_key] = { k: _key, v: $pkg.Me }, _key = "Mn", _map[_key] = { k: _key, v: $pkg.Mn }, _key = "N", _map[_key] = { k: _key, v: $pkg.N }, _key = "Nd", _map[_key] = { k: _key, v: $pkg.Nd }, _key = "Nl", _map[_key] = { k: _key, v: $pkg.Nl }, _key = "No", _map[_key] = { k: _key, v: $pkg.No }, _key = "P", _map[_key] = { k: _key, v: $pkg.P }, _key = "Pc", _map[_key] = { k: _key, v: $pkg.Pc }, _key = "Pd", _map[_key] = { k: _key, v: $pkg.Pd }, _key = "Pe", _map[_key] = { k: _key, v: $pkg.Pe }, _key = "Pf", _map[_key] = { k: _key, v: $pkg.Pf }, _key = "Pi", _map[_key] = { k: _key, v: $pkg.Pi }, _key = "Po", _map[_key] = { k: _key, v: $pkg.Po }, _key = "Ps", _map[_key] = { k: _key, v: $pkg.Ps }, _key = "S", _map[_key] = { k: _key, v: $pkg.S }, _key = "Sc", _map[_key] = { k: _key, v: $pkg.Sc }, _key = "Sk", _map[_key] = { k: _key, v: $pkg.Sk }, _key = "Sm", _map[_key] = { k: _key, v: $pkg.Sm }, _key = "So", _map[_key] = { k: _key, v: $pkg.So }, _key = "Z", _map[_key] = { k: _key, v: $pkg.Z }, _key = "Zl", _map[_key] = { k: _key, v: $pkg.Zl }, _key = "Zp", _map[_key] = { k: _key, v: $pkg.Zp }, _key = "Zs", _map[_key] = { k: _key, v: $pkg.Zs }, _map); + _Arabic = new RangeTable.ptr(new sliceType([new Range16.ptr(1536, 1540, 1), new Range16.ptr(1542, 1547, 1), new Range16.ptr(1549, 1562, 1), new Range16.ptr(1566, 1566, 1), new Range16.ptr(1568, 1599, 1), new Range16.ptr(1601, 1610, 1), new Range16.ptr(1622, 1631, 1), new Range16.ptr(1642, 1647, 1), new Range16.ptr(1649, 1756, 1), new Range16.ptr(1758, 1791, 1), new Range16.ptr(1872, 1919, 1), new Range16.ptr(2208, 2226, 1), new Range16.ptr(2276, 2303, 1), new Range16.ptr(64336, 64449, 1), new Range16.ptr(64467, 64829, 1), new Range16.ptr(64848, 64911, 1), new Range16.ptr(64914, 64967, 1), new Range16.ptr(65008, 65021, 1), new Range16.ptr(65136, 65140, 1), new Range16.ptr(65142, 65276, 1)]), new sliceType$1([new Range32.ptr(69216, 69246, 1), new Range32.ptr(126464, 126467, 1), new Range32.ptr(126469, 126495, 1), new Range32.ptr(126497, 126498, 1), new Range32.ptr(126500, 126500, 1), new Range32.ptr(126503, 126503, 1), new Range32.ptr(126505, 126514, 1), new Range32.ptr(126516, 126519, 1), new Range32.ptr(126521, 126521, 1), new Range32.ptr(126523, 126523, 1), new Range32.ptr(126530, 126530, 1), new Range32.ptr(126535, 126535, 1), new Range32.ptr(126537, 126537, 1), new Range32.ptr(126539, 126539, 1), new Range32.ptr(126541, 126543, 1), new Range32.ptr(126545, 126546, 1), new Range32.ptr(126548, 126548, 1), new Range32.ptr(126551, 126551, 1), new Range32.ptr(126553, 126553, 1), new Range32.ptr(126555, 126555, 1), new Range32.ptr(126557, 126557, 1), new Range32.ptr(126559, 126559, 1), new Range32.ptr(126561, 126562, 1), new Range32.ptr(126564, 126564, 1), new Range32.ptr(126567, 126570, 1), new Range32.ptr(126572, 126578, 1), new Range32.ptr(126580, 126583, 1), new Range32.ptr(126585, 126588, 1), new Range32.ptr(126590, 126590, 1), new Range32.ptr(126592, 126601, 1), new Range32.ptr(126603, 126619, 1), new Range32.ptr(126625, 126627, 1), new Range32.ptr(126629, 126633, 1), new Range32.ptr(126635, 126651, 1), new Range32.ptr(126704, 126705, 1)]), 0); + _Armenian = new RangeTable.ptr(new sliceType([new Range16.ptr(1329, 1366, 1), new Range16.ptr(1369, 1375, 1), new Range16.ptr(1377, 1415, 1), new Range16.ptr(1418, 1418, 1), new Range16.ptr(1421, 1423, 1), new Range16.ptr(64275, 64279, 1)]), sliceType$1.nil, 0); + _Avestan = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(68352, 68405, 1), new Range32.ptr(68409, 68415, 1)]), 0); + _Balinese = new RangeTable.ptr(new sliceType([new Range16.ptr(6912, 6987, 1), new Range16.ptr(6992, 7036, 1)]), sliceType$1.nil, 0); + _Bamum = new RangeTable.ptr(new sliceType([new Range16.ptr(42656, 42743, 1)]), new sliceType$1([new Range32.ptr(92160, 92728, 1)]), 0); + _Bassa_Vah = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(92880, 92909, 1), new Range32.ptr(92912, 92917, 1)]), 0); + _Batak = new RangeTable.ptr(new sliceType([new Range16.ptr(7104, 7155, 1), new Range16.ptr(7164, 7167, 1)]), sliceType$1.nil, 0); + _Bengali = new RangeTable.ptr(new sliceType([new Range16.ptr(2432, 2435, 1), new Range16.ptr(2437, 2444, 1), new Range16.ptr(2447, 2448, 1), new Range16.ptr(2451, 2472, 1), new Range16.ptr(2474, 2480, 1), new Range16.ptr(2482, 2482, 1), new Range16.ptr(2486, 2489, 1), new Range16.ptr(2492, 2500, 1), new Range16.ptr(2503, 2504, 1), new Range16.ptr(2507, 2510, 1), new Range16.ptr(2519, 2519, 1), new Range16.ptr(2524, 2525, 1), new Range16.ptr(2527, 2531, 1), new Range16.ptr(2534, 2555, 1)]), sliceType$1.nil, 0); + _Bopomofo = new RangeTable.ptr(new sliceType([new Range16.ptr(746, 747, 1), new Range16.ptr(12549, 12589, 1), new Range16.ptr(12704, 12730, 1)]), sliceType$1.nil, 0); + _Brahmi = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(69632, 69709, 1), new Range32.ptr(69714, 69743, 1), new Range32.ptr(69759, 69759, 1)]), 0); + _Braille = new RangeTable.ptr(new sliceType([new Range16.ptr(10240, 10495, 1)]), sliceType$1.nil, 0); + _Buginese = new RangeTable.ptr(new sliceType([new Range16.ptr(6656, 6683, 1), new Range16.ptr(6686, 6687, 1)]), sliceType$1.nil, 0); + _Buhid = new RangeTable.ptr(new sliceType([new Range16.ptr(5952, 5971, 1)]), sliceType$1.nil, 0); + _Canadian_Aboriginal = new RangeTable.ptr(new sliceType([new Range16.ptr(5120, 5759, 1), new Range16.ptr(6320, 6389, 1)]), sliceType$1.nil, 0); + _Carian = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(66208, 66256, 1)]), 0); + _Caucasian_Albanian = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(66864, 66915, 1), new Range32.ptr(66927, 66927, 1)]), 0); + _Chakma = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(69888, 69940, 1), new Range32.ptr(69942, 69955, 1)]), 0); + _Cham = new RangeTable.ptr(new sliceType([new Range16.ptr(43520, 43574, 1), new Range16.ptr(43584, 43597, 1), new Range16.ptr(43600, 43609, 1), new Range16.ptr(43612, 43615, 1)]), sliceType$1.nil, 0); + _Cherokee = new RangeTable.ptr(new sliceType([new Range16.ptr(5024, 5108, 1)]), sliceType$1.nil, 0); + _Common = new RangeTable.ptr(new sliceType([new Range16.ptr(0, 64, 1), new Range16.ptr(91, 96, 1), new Range16.ptr(123, 169, 1), new Range16.ptr(171, 185, 1), new Range16.ptr(187, 191, 1), new Range16.ptr(215, 215, 1), new Range16.ptr(247, 247, 1), new Range16.ptr(697, 735, 1), new Range16.ptr(741, 745, 1), new Range16.ptr(748, 767, 1), new Range16.ptr(884, 884, 1), new Range16.ptr(894, 894, 1), new Range16.ptr(901, 901, 1), new Range16.ptr(903, 903, 1), new Range16.ptr(1417, 1417, 1), new Range16.ptr(1541, 1541, 1), new Range16.ptr(1548, 1548, 1), new Range16.ptr(1563, 1564, 1), new Range16.ptr(1567, 1567, 1), new Range16.ptr(1600, 1600, 1), new Range16.ptr(1632, 1641, 1), new Range16.ptr(1757, 1757, 1), new Range16.ptr(2404, 2405, 1), new Range16.ptr(3647, 3647, 1), new Range16.ptr(4053, 4056, 1), new Range16.ptr(4347, 4347, 1), new Range16.ptr(5867, 5869, 1), new Range16.ptr(5941, 5942, 1), new Range16.ptr(6146, 6147, 1), new Range16.ptr(6149, 6149, 1), new Range16.ptr(7379, 7379, 1), new Range16.ptr(7393, 7393, 1), new Range16.ptr(7401, 7404, 1), new Range16.ptr(7406, 7411, 1), new Range16.ptr(7413, 7414, 1), new Range16.ptr(8192, 8203, 1), new Range16.ptr(8206, 8292, 1), new Range16.ptr(8294, 8304, 1), new Range16.ptr(8308, 8318, 1), new Range16.ptr(8320, 8334, 1), new Range16.ptr(8352, 8381, 1), new Range16.ptr(8448, 8485, 1), new Range16.ptr(8487, 8489, 1), new Range16.ptr(8492, 8497, 1), new Range16.ptr(8499, 8525, 1), new Range16.ptr(8527, 8543, 1), new Range16.ptr(8585, 8585, 1), new Range16.ptr(8592, 9210, 1), new Range16.ptr(9216, 9254, 1), new Range16.ptr(9280, 9290, 1), new Range16.ptr(9312, 10239, 1), new Range16.ptr(10496, 11123, 1), new Range16.ptr(11126, 11157, 1), new Range16.ptr(11160, 11193, 1), new Range16.ptr(11197, 11208, 1), new Range16.ptr(11210, 11217, 1), new Range16.ptr(11776, 11842, 1), new Range16.ptr(12272, 12283, 1), new Range16.ptr(12288, 12292, 1), new Range16.ptr(12294, 12294, 1), new Range16.ptr(12296, 12320, 1), new Range16.ptr(12336, 12343, 1), new Range16.ptr(12348, 12351, 1), new Range16.ptr(12443, 12444, 1), new Range16.ptr(12448, 12448, 1), new Range16.ptr(12539, 12540, 1), new Range16.ptr(12688, 12703, 1), new Range16.ptr(12736, 12771, 1), new Range16.ptr(12832, 12895, 1), new Range16.ptr(12927, 13007, 1), new Range16.ptr(13144, 13311, 1), new Range16.ptr(19904, 19967, 1), new Range16.ptr(42752, 42785, 1), new Range16.ptr(42888, 42890, 1), new Range16.ptr(43056, 43065, 1), new Range16.ptr(43310, 43310, 1), new Range16.ptr(43471, 43471, 1), new Range16.ptr(43867, 43867, 1), new Range16.ptr(64830, 64831, 1), new Range16.ptr(65040, 65049, 1), new Range16.ptr(65072, 65106, 1), new Range16.ptr(65108, 65126, 1), new Range16.ptr(65128, 65131, 1), new Range16.ptr(65279, 65279, 1), new Range16.ptr(65281, 65312, 1), new Range16.ptr(65339, 65344, 1), new Range16.ptr(65371, 65381, 1), new Range16.ptr(65392, 65392, 1), new Range16.ptr(65438, 65439, 1), new Range16.ptr(65504, 65510, 1), new Range16.ptr(65512, 65518, 1), new Range16.ptr(65529, 65533, 1)]), new sliceType$1([new Range32.ptr(65792, 65794, 1), new Range32.ptr(65799, 65843, 1), new Range32.ptr(65847, 65855, 1), new Range32.ptr(65936, 65947, 1), new Range32.ptr(66000, 66044, 1), new Range32.ptr(66273, 66299, 1), new Range32.ptr(113824, 113827, 1), new Range32.ptr(118784, 119029, 1), new Range32.ptr(119040, 119078, 1), new Range32.ptr(119081, 119142, 1), new Range32.ptr(119146, 119162, 1), new Range32.ptr(119171, 119172, 1), new Range32.ptr(119180, 119209, 1), new Range32.ptr(119214, 119261, 1), new Range32.ptr(119552, 119638, 1), new Range32.ptr(119648, 119665, 1), new Range32.ptr(119808, 119892, 1), new Range32.ptr(119894, 119964, 1), new Range32.ptr(119966, 119967, 1), new Range32.ptr(119970, 119970, 1), new Range32.ptr(119973, 119974, 1), new Range32.ptr(119977, 119980, 1), new Range32.ptr(119982, 119993, 1), new Range32.ptr(119995, 119995, 1), new Range32.ptr(119997, 120003, 1), new Range32.ptr(120005, 120069, 1), new Range32.ptr(120071, 120074, 1), new Range32.ptr(120077, 120084, 1), new Range32.ptr(120086, 120092, 1), new Range32.ptr(120094, 120121, 1), new Range32.ptr(120123, 120126, 1), new Range32.ptr(120128, 120132, 1), new Range32.ptr(120134, 120134, 1), new Range32.ptr(120138, 120144, 1), new Range32.ptr(120146, 120485, 1), new Range32.ptr(120488, 120779, 1), new Range32.ptr(120782, 120831, 1), new Range32.ptr(126976, 127019, 1), new Range32.ptr(127024, 127123, 1), new Range32.ptr(127136, 127150, 1), new Range32.ptr(127153, 127167, 1), new Range32.ptr(127169, 127183, 1), new Range32.ptr(127185, 127221, 1), new Range32.ptr(127232, 127244, 1), new Range32.ptr(127248, 127278, 1), new Range32.ptr(127280, 127339, 1), new Range32.ptr(127344, 127386, 1), new Range32.ptr(127462, 127487, 1), new Range32.ptr(127489, 127490, 1), new Range32.ptr(127504, 127546, 1), new Range32.ptr(127552, 127560, 1), new Range32.ptr(127568, 127569, 1), new Range32.ptr(127744, 127788, 1), new Range32.ptr(127792, 127869, 1), new Range32.ptr(127872, 127950, 1), new Range32.ptr(127956, 127991, 1), new Range32.ptr(128000, 128254, 1), new Range32.ptr(128256, 128330, 1), new Range32.ptr(128336, 128377, 1), new Range32.ptr(128379, 128419, 1), new Range32.ptr(128421, 128578, 1), new Range32.ptr(128581, 128719, 1), new Range32.ptr(128736, 128748, 1), new Range32.ptr(128752, 128755, 1), new Range32.ptr(128768, 128883, 1), new Range32.ptr(128896, 128980, 1), new Range32.ptr(129024, 129035, 1), new Range32.ptr(129040, 129095, 1), new Range32.ptr(129104, 129113, 1), new Range32.ptr(129120, 129159, 1), new Range32.ptr(129168, 129197, 1), new Range32.ptr(917505, 917505, 1), new Range32.ptr(917536, 917631, 1)]), 7); + _Coptic = new RangeTable.ptr(new sliceType([new Range16.ptr(994, 1007, 1), new Range16.ptr(11392, 11507, 1), new Range16.ptr(11513, 11519, 1)]), sliceType$1.nil, 0); + _Cuneiform = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(73728, 74648, 1), new Range32.ptr(74752, 74862, 1), new Range32.ptr(74864, 74868, 1)]), 0); + _Cypriot = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(67584, 67589, 1), new Range32.ptr(67592, 67592, 1), new Range32.ptr(67594, 67637, 1), new Range32.ptr(67639, 67640, 1), new Range32.ptr(67644, 67644, 1), new Range32.ptr(67647, 67647, 1)]), 0); + _Cyrillic = new RangeTable.ptr(new sliceType([new Range16.ptr(1024, 1156, 1), new Range16.ptr(1159, 1327, 1), new Range16.ptr(7467, 7467, 1), new Range16.ptr(7544, 7544, 1), new Range16.ptr(11744, 11775, 1), new Range16.ptr(42560, 42653, 1), new Range16.ptr(42655, 42655, 1)]), sliceType$1.nil, 0); + _Deseret = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(66560, 66639, 1)]), 0); + _Devanagari = new RangeTable.ptr(new sliceType([new Range16.ptr(2304, 2384, 1), new Range16.ptr(2387, 2403, 1), new Range16.ptr(2406, 2431, 1), new Range16.ptr(43232, 43259, 1)]), sliceType$1.nil, 0); + _Duployan = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(113664, 113770, 1), new Range32.ptr(113776, 113788, 1), new Range32.ptr(113792, 113800, 1), new Range32.ptr(113808, 113817, 1), new Range32.ptr(113820, 113823, 1)]), 0); + _Egyptian_Hieroglyphs = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(77824, 78894, 1)]), 0); + _Elbasan = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(66816, 66855, 1)]), 0); + _Ethiopic = new RangeTable.ptr(new sliceType([new Range16.ptr(4608, 4680, 1), new Range16.ptr(4682, 4685, 1), new Range16.ptr(4688, 4694, 1), new Range16.ptr(4696, 4696, 1), new Range16.ptr(4698, 4701, 1), new Range16.ptr(4704, 4744, 1), new Range16.ptr(4746, 4749, 1), new Range16.ptr(4752, 4784, 1), new Range16.ptr(4786, 4789, 1), new Range16.ptr(4792, 4798, 1), new Range16.ptr(4800, 4800, 1), new Range16.ptr(4802, 4805, 1), new Range16.ptr(4808, 4822, 1), new Range16.ptr(4824, 4880, 1), new Range16.ptr(4882, 4885, 1), new Range16.ptr(4888, 4954, 1), new Range16.ptr(4957, 4988, 1), new Range16.ptr(4992, 5017, 1), new Range16.ptr(11648, 11670, 1), new Range16.ptr(11680, 11686, 1), new Range16.ptr(11688, 11694, 1), new Range16.ptr(11696, 11702, 1), new Range16.ptr(11704, 11710, 1), new Range16.ptr(11712, 11718, 1), new Range16.ptr(11720, 11726, 1), new Range16.ptr(11728, 11734, 1), new Range16.ptr(11736, 11742, 1), new Range16.ptr(43777, 43782, 1), new Range16.ptr(43785, 43790, 1), new Range16.ptr(43793, 43798, 1), new Range16.ptr(43808, 43814, 1), new Range16.ptr(43816, 43822, 1)]), sliceType$1.nil, 0); + _Georgian = new RangeTable.ptr(new sliceType([new Range16.ptr(4256, 4293, 1), new Range16.ptr(4295, 4295, 1), new Range16.ptr(4301, 4301, 1), new Range16.ptr(4304, 4346, 1), new Range16.ptr(4348, 4351, 1), new Range16.ptr(11520, 11557, 1), new Range16.ptr(11559, 11559, 1), new Range16.ptr(11565, 11565, 1)]), sliceType$1.nil, 0); + _Glagolitic = new RangeTable.ptr(new sliceType([new Range16.ptr(11264, 11310, 1), new Range16.ptr(11312, 11358, 1)]), sliceType$1.nil, 0); + _Gothic = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(66352, 66378, 1)]), 0); + _Grantha = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(70401, 70403, 1), new Range32.ptr(70405, 70412, 1), new Range32.ptr(70415, 70416, 1), new Range32.ptr(70419, 70440, 1), new Range32.ptr(70442, 70448, 1), new Range32.ptr(70450, 70451, 1), new Range32.ptr(70453, 70457, 1), new Range32.ptr(70460, 70468, 1), new Range32.ptr(70471, 70472, 1), new Range32.ptr(70475, 70477, 1), new Range32.ptr(70487, 70487, 1), new Range32.ptr(70493, 70499, 1), new Range32.ptr(70502, 70508, 1), new Range32.ptr(70512, 70516, 1)]), 0); + _Greek = new RangeTable.ptr(new sliceType([new Range16.ptr(880, 883, 1), new Range16.ptr(885, 887, 1), new Range16.ptr(890, 893, 1), new Range16.ptr(895, 895, 1), new Range16.ptr(900, 900, 1), new Range16.ptr(902, 902, 1), new Range16.ptr(904, 906, 1), new Range16.ptr(908, 908, 1), new Range16.ptr(910, 929, 1), new Range16.ptr(931, 993, 1), new Range16.ptr(1008, 1023, 1), new Range16.ptr(7462, 7466, 1), new Range16.ptr(7517, 7521, 1), new Range16.ptr(7526, 7530, 1), new Range16.ptr(7615, 7615, 1), new Range16.ptr(7936, 7957, 1), new Range16.ptr(7960, 7965, 1), new Range16.ptr(7968, 8005, 1), new Range16.ptr(8008, 8013, 1), new Range16.ptr(8016, 8023, 1), new Range16.ptr(8025, 8025, 1), new Range16.ptr(8027, 8027, 1), new Range16.ptr(8029, 8029, 1), new Range16.ptr(8031, 8061, 1), new Range16.ptr(8064, 8116, 1), new Range16.ptr(8118, 8132, 1), new Range16.ptr(8134, 8147, 1), new Range16.ptr(8150, 8155, 1), new Range16.ptr(8157, 8175, 1), new Range16.ptr(8178, 8180, 1), new Range16.ptr(8182, 8190, 1), new Range16.ptr(8486, 8486, 1), new Range16.ptr(43877, 43877, 1)]), new sliceType$1([new Range32.ptr(65856, 65932, 1), new Range32.ptr(65952, 65952, 1), new Range32.ptr(119296, 119365, 1)]), 0); + _Gujarati = new RangeTable.ptr(new sliceType([new Range16.ptr(2689, 2691, 1), new Range16.ptr(2693, 2701, 1), new Range16.ptr(2703, 2705, 1), new Range16.ptr(2707, 2728, 1), new Range16.ptr(2730, 2736, 1), new Range16.ptr(2738, 2739, 1), new Range16.ptr(2741, 2745, 1), new Range16.ptr(2748, 2757, 1), new Range16.ptr(2759, 2761, 1), new Range16.ptr(2763, 2765, 1), new Range16.ptr(2768, 2768, 1), new Range16.ptr(2784, 2787, 1), new Range16.ptr(2790, 2801, 1)]), sliceType$1.nil, 0); + _Gurmukhi = new RangeTable.ptr(new sliceType([new Range16.ptr(2561, 2563, 1), new Range16.ptr(2565, 2570, 1), new Range16.ptr(2575, 2576, 1), new Range16.ptr(2579, 2600, 1), new Range16.ptr(2602, 2608, 1), new Range16.ptr(2610, 2611, 1), new Range16.ptr(2613, 2614, 1), new Range16.ptr(2616, 2617, 1), new Range16.ptr(2620, 2620, 1), new Range16.ptr(2622, 2626, 1), new Range16.ptr(2631, 2632, 1), new Range16.ptr(2635, 2637, 1), new Range16.ptr(2641, 2641, 1), new Range16.ptr(2649, 2652, 1), new Range16.ptr(2654, 2654, 1), new Range16.ptr(2662, 2677, 1)]), sliceType$1.nil, 0); + _Han = new RangeTable.ptr(new sliceType([new Range16.ptr(11904, 11929, 1), new Range16.ptr(11931, 12019, 1), new Range16.ptr(12032, 12245, 1), new Range16.ptr(12293, 12293, 1), new Range16.ptr(12295, 12295, 1), new Range16.ptr(12321, 12329, 1), new Range16.ptr(12344, 12347, 1), new Range16.ptr(13312, 19893, 1), new Range16.ptr(19968, 40908, 1), new Range16.ptr(63744, 64109, 1), new Range16.ptr(64112, 64217, 1)]), new sliceType$1([new Range32.ptr(131072, 173782, 1), new Range32.ptr(173824, 177972, 1), new Range32.ptr(177984, 178205, 1), new Range32.ptr(194560, 195101, 1)]), 0); + _Hangul = new RangeTable.ptr(new sliceType([new Range16.ptr(4352, 4607, 1), new Range16.ptr(12334, 12335, 1), new Range16.ptr(12593, 12686, 1), new Range16.ptr(12800, 12830, 1), new Range16.ptr(12896, 12926, 1), new Range16.ptr(43360, 43388, 1), new Range16.ptr(44032, 55203, 1), new Range16.ptr(55216, 55238, 1), new Range16.ptr(55243, 55291, 1), new Range16.ptr(65440, 65470, 1), new Range16.ptr(65474, 65479, 1), new Range16.ptr(65482, 65487, 1), new Range16.ptr(65490, 65495, 1), new Range16.ptr(65498, 65500, 1)]), sliceType$1.nil, 0); + _Hanunoo = new RangeTable.ptr(new sliceType([new Range16.ptr(5920, 5940, 1)]), sliceType$1.nil, 0); + _Hebrew = new RangeTable.ptr(new sliceType([new Range16.ptr(1425, 1479, 1), new Range16.ptr(1488, 1514, 1), new Range16.ptr(1520, 1524, 1), new Range16.ptr(64285, 64310, 1), new Range16.ptr(64312, 64316, 1), new Range16.ptr(64318, 64318, 1), new Range16.ptr(64320, 64321, 1), new Range16.ptr(64323, 64324, 1), new Range16.ptr(64326, 64335, 1)]), sliceType$1.nil, 0); + _Hiragana = new RangeTable.ptr(new sliceType([new Range16.ptr(12353, 12438, 1), new Range16.ptr(12445, 12447, 1)]), new sliceType$1([new Range32.ptr(110593, 110593, 1), new Range32.ptr(127488, 127488, 1)]), 0); + _Imperial_Aramaic = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(67648, 67669, 1), new Range32.ptr(67671, 67679, 1)]), 0); + _Inherited = new RangeTable.ptr(new sliceType([new Range16.ptr(768, 879, 1), new Range16.ptr(1157, 1158, 1), new Range16.ptr(1611, 1621, 1), new Range16.ptr(1648, 1648, 1), new Range16.ptr(2385, 2386, 1), new Range16.ptr(6832, 6846, 1), new Range16.ptr(7376, 7378, 1), new Range16.ptr(7380, 7392, 1), new Range16.ptr(7394, 7400, 1), new Range16.ptr(7405, 7405, 1), new Range16.ptr(7412, 7412, 1), new Range16.ptr(7416, 7417, 1), new Range16.ptr(7616, 7669, 1), new Range16.ptr(7676, 7679, 1), new Range16.ptr(8204, 8205, 1), new Range16.ptr(8400, 8432, 1), new Range16.ptr(12330, 12333, 1), new Range16.ptr(12441, 12442, 1), new Range16.ptr(65024, 65039, 1), new Range16.ptr(65056, 65069, 1)]), new sliceType$1([new Range32.ptr(66045, 66045, 1), new Range32.ptr(66272, 66272, 1), new Range32.ptr(119143, 119145, 1), new Range32.ptr(119163, 119170, 1), new Range32.ptr(119173, 119179, 1), new Range32.ptr(119210, 119213, 1), new Range32.ptr(917760, 917999, 1)]), 0); + _Inscriptional_Pahlavi = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(68448, 68466, 1), new Range32.ptr(68472, 68479, 1)]), 0); + _Inscriptional_Parthian = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(68416, 68437, 1), new Range32.ptr(68440, 68447, 1)]), 0); + _Javanese = new RangeTable.ptr(new sliceType([new Range16.ptr(43392, 43469, 1), new Range16.ptr(43472, 43481, 1), new Range16.ptr(43486, 43487, 1)]), sliceType$1.nil, 0); + _Kaithi = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(69760, 69825, 1)]), 0); + _Kannada = new RangeTable.ptr(new sliceType([new Range16.ptr(3201, 3203, 1), new Range16.ptr(3205, 3212, 1), new Range16.ptr(3214, 3216, 1), new Range16.ptr(3218, 3240, 1), new Range16.ptr(3242, 3251, 1), new Range16.ptr(3253, 3257, 1), new Range16.ptr(3260, 3268, 1), new Range16.ptr(3270, 3272, 1), new Range16.ptr(3274, 3277, 1), new Range16.ptr(3285, 3286, 1), new Range16.ptr(3294, 3294, 1), new Range16.ptr(3296, 3299, 1), new Range16.ptr(3302, 3311, 1), new Range16.ptr(3313, 3314, 1)]), sliceType$1.nil, 0); + _Katakana = new RangeTable.ptr(new sliceType([new Range16.ptr(12449, 12538, 1), new Range16.ptr(12541, 12543, 1), new Range16.ptr(12784, 12799, 1), new Range16.ptr(13008, 13054, 1), new Range16.ptr(13056, 13143, 1), new Range16.ptr(65382, 65391, 1), new Range16.ptr(65393, 65437, 1)]), new sliceType$1([new Range32.ptr(110592, 110592, 1)]), 0); + _Kayah_Li = new RangeTable.ptr(new sliceType([new Range16.ptr(43264, 43309, 1), new Range16.ptr(43311, 43311, 1)]), sliceType$1.nil, 0); + _Kharoshthi = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(68096, 68099, 1), new Range32.ptr(68101, 68102, 1), new Range32.ptr(68108, 68115, 1), new Range32.ptr(68117, 68119, 1), new Range32.ptr(68121, 68147, 1), new Range32.ptr(68152, 68154, 1), new Range32.ptr(68159, 68167, 1), new Range32.ptr(68176, 68184, 1)]), 0); + _Khmer = new RangeTable.ptr(new sliceType([new Range16.ptr(6016, 6109, 1), new Range16.ptr(6112, 6121, 1), new Range16.ptr(6128, 6137, 1), new Range16.ptr(6624, 6655, 1)]), sliceType$1.nil, 0); + _Khojki = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(70144, 70161, 1), new Range32.ptr(70163, 70205, 1)]), 0); + _Khudawadi = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(70320, 70378, 1), new Range32.ptr(70384, 70393, 1)]), 0); + _Lao = new RangeTable.ptr(new sliceType([new Range16.ptr(3713, 3714, 1), new Range16.ptr(3716, 3716, 1), new Range16.ptr(3719, 3720, 1), new Range16.ptr(3722, 3722, 1), new Range16.ptr(3725, 3725, 1), new Range16.ptr(3732, 3735, 1), new Range16.ptr(3737, 3743, 1), new Range16.ptr(3745, 3747, 1), new Range16.ptr(3749, 3749, 1), new Range16.ptr(3751, 3751, 1), new Range16.ptr(3754, 3755, 1), new Range16.ptr(3757, 3769, 1), new Range16.ptr(3771, 3773, 1), new Range16.ptr(3776, 3780, 1), new Range16.ptr(3782, 3782, 1), new Range16.ptr(3784, 3789, 1), new Range16.ptr(3792, 3801, 1), new Range16.ptr(3804, 3807, 1)]), sliceType$1.nil, 0); + _Latin = new RangeTable.ptr(new sliceType([new Range16.ptr(65, 90, 1), new Range16.ptr(97, 122, 1), new Range16.ptr(170, 170, 1), new Range16.ptr(186, 186, 1), new Range16.ptr(192, 214, 1), new Range16.ptr(216, 246, 1), new Range16.ptr(248, 696, 1), new Range16.ptr(736, 740, 1), new Range16.ptr(7424, 7461, 1), new Range16.ptr(7468, 7516, 1), new Range16.ptr(7522, 7525, 1), new Range16.ptr(7531, 7543, 1), new Range16.ptr(7545, 7614, 1), new Range16.ptr(7680, 7935, 1), new Range16.ptr(8305, 8305, 1), new Range16.ptr(8319, 8319, 1), new Range16.ptr(8336, 8348, 1), new Range16.ptr(8490, 8491, 1), new Range16.ptr(8498, 8498, 1), new Range16.ptr(8526, 8526, 1), new Range16.ptr(8544, 8584, 1), new Range16.ptr(11360, 11391, 1), new Range16.ptr(42786, 42887, 1), new Range16.ptr(42891, 42894, 1), new Range16.ptr(42896, 42925, 1), new Range16.ptr(42928, 42929, 1), new Range16.ptr(42999, 43007, 1), new Range16.ptr(43824, 43866, 1), new Range16.ptr(43868, 43871, 1), new Range16.ptr(43876, 43876, 1), new Range16.ptr(64256, 64262, 1), new Range16.ptr(65313, 65338, 1), new Range16.ptr(65345, 65370, 1)]), sliceType$1.nil, 6); + _Lepcha = new RangeTable.ptr(new sliceType([new Range16.ptr(7168, 7223, 1), new Range16.ptr(7227, 7241, 1), new Range16.ptr(7245, 7247, 1)]), sliceType$1.nil, 0); + _Limbu = new RangeTable.ptr(new sliceType([new Range16.ptr(6400, 6430, 1), new Range16.ptr(6432, 6443, 1), new Range16.ptr(6448, 6459, 1), new Range16.ptr(6464, 6464, 1), new Range16.ptr(6468, 6479, 1)]), sliceType$1.nil, 0); + _Linear_A = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(67072, 67382, 1), new Range32.ptr(67392, 67413, 1), new Range32.ptr(67424, 67431, 1)]), 0); + _Linear_B = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(65536, 65547, 1), new Range32.ptr(65549, 65574, 1), new Range32.ptr(65576, 65594, 1), new Range32.ptr(65596, 65597, 1), new Range32.ptr(65599, 65613, 1), new Range32.ptr(65616, 65629, 1), new Range32.ptr(65664, 65786, 1)]), 0); + _Lisu = new RangeTable.ptr(new sliceType([new Range16.ptr(42192, 42239, 1)]), sliceType$1.nil, 0); + _Lycian = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(66176, 66204, 1)]), 0); + _Lydian = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(67872, 67897, 1), new Range32.ptr(67903, 67903, 1)]), 0); + _Mahajani = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(69968, 70006, 1)]), 0); + _Malayalam = new RangeTable.ptr(new sliceType([new Range16.ptr(3329, 3331, 1), new Range16.ptr(3333, 3340, 1), new Range16.ptr(3342, 3344, 1), new Range16.ptr(3346, 3386, 1), new Range16.ptr(3389, 3396, 1), new Range16.ptr(3398, 3400, 1), new Range16.ptr(3402, 3406, 1), new Range16.ptr(3415, 3415, 1), new Range16.ptr(3424, 3427, 1), new Range16.ptr(3430, 3445, 1), new Range16.ptr(3449, 3455, 1)]), sliceType$1.nil, 0); + _Mandaic = new RangeTable.ptr(new sliceType([new Range16.ptr(2112, 2139, 1), new Range16.ptr(2142, 2142, 1)]), sliceType$1.nil, 0); + _Manichaean = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(68288, 68326, 1), new Range32.ptr(68331, 68342, 1)]), 0); + _Meetei_Mayek = new RangeTable.ptr(new sliceType([new Range16.ptr(43744, 43766, 1), new Range16.ptr(43968, 44013, 1), new Range16.ptr(44016, 44025, 1)]), sliceType$1.nil, 0); + _Mende_Kikakui = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(124928, 125124, 1), new Range32.ptr(125127, 125142, 1)]), 0); + _Meroitic_Cursive = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(68000, 68023, 1), new Range32.ptr(68030, 68031, 1)]), 0); + _Meroitic_Hieroglyphs = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(67968, 67999, 1)]), 0); + _Miao = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(93952, 94020, 1), new Range32.ptr(94032, 94078, 1), new Range32.ptr(94095, 94111, 1)]), 0); + _Modi = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(71168, 71236, 1), new Range32.ptr(71248, 71257, 1)]), 0); + _Mongolian = new RangeTable.ptr(new sliceType([new Range16.ptr(6144, 6145, 1), new Range16.ptr(6148, 6148, 1), new Range16.ptr(6150, 6158, 1), new Range16.ptr(6160, 6169, 1), new Range16.ptr(6176, 6263, 1), new Range16.ptr(6272, 6314, 1)]), sliceType$1.nil, 0); + _Mro = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(92736, 92766, 1), new Range32.ptr(92768, 92777, 1), new Range32.ptr(92782, 92783, 1)]), 0); + _Myanmar = new RangeTable.ptr(new sliceType([new Range16.ptr(4096, 4255, 1), new Range16.ptr(43488, 43518, 1), new Range16.ptr(43616, 43647, 1)]), sliceType$1.nil, 0); + _Nabataean = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(67712, 67742, 1), new Range32.ptr(67751, 67759, 1)]), 0); + _New_Tai_Lue = new RangeTable.ptr(new sliceType([new Range16.ptr(6528, 6571, 1), new Range16.ptr(6576, 6601, 1), new Range16.ptr(6608, 6618, 1), new Range16.ptr(6622, 6623, 1)]), sliceType$1.nil, 0); + _Nko = new RangeTable.ptr(new sliceType([new Range16.ptr(1984, 2042, 1)]), sliceType$1.nil, 0); + _Ogham = new RangeTable.ptr(new sliceType([new Range16.ptr(5760, 5788, 1)]), sliceType$1.nil, 0); + _Ol_Chiki = new RangeTable.ptr(new sliceType([new Range16.ptr(7248, 7295, 1)]), sliceType$1.nil, 0); + _Old_Italic = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(66304, 66339, 1)]), 0); + _Old_North_Arabian = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(68224, 68255, 1)]), 0); + _Old_Permic = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(66384, 66426, 1)]), 0); + _Old_Persian = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(66464, 66499, 1), new Range32.ptr(66504, 66517, 1)]), 0); + _Old_South_Arabian = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(68192, 68223, 1)]), 0); + _Old_Turkic = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(68608, 68680, 1)]), 0); + _Oriya = new RangeTable.ptr(new sliceType([new Range16.ptr(2817, 2819, 1), new Range16.ptr(2821, 2828, 1), new Range16.ptr(2831, 2832, 1), new Range16.ptr(2835, 2856, 1), new Range16.ptr(2858, 2864, 1), new Range16.ptr(2866, 2867, 1), new Range16.ptr(2869, 2873, 1), new Range16.ptr(2876, 2884, 1), new Range16.ptr(2887, 2888, 1), new Range16.ptr(2891, 2893, 1), new Range16.ptr(2902, 2903, 1), new Range16.ptr(2908, 2909, 1), new Range16.ptr(2911, 2915, 1), new Range16.ptr(2918, 2935, 1)]), sliceType$1.nil, 0); + _Osmanya = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(66688, 66717, 1), new Range32.ptr(66720, 66729, 1)]), 0); + _Pahawh_Hmong = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(92928, 92997, 1), new Range32.ptr(93008, 93017, 1), new Range32.ptr(93019, 93025, 1), new Range32.ptr(93027, 93047, 1), new Range32.ptr(93053, 93071, 1)]), 0); + _Palmyrene = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(67680, 67711, 1)]), 0); + _Pau_Cin_Hau = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(72384, 72440, 1)]), 0); + _Phags_Pa = new RangeTable.ptr(new sliceType([new Range16.ptr(43072, 43127, 1)]), sliceType$1.nil, 0); + _Phoenician = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(67840, 67867, 1), new Range32.ptr(67871, 67871, 1)]), 0); + _Psalter_Pahlavi = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(68480, 68497, 1), new Range32.ptr(68505, 68508, 1), new Range32.ptr(68521, 68527, 1)]), 0); + _Rejang = new RangeTable.ptr(new sliceType([new Range16.ptr(43312, 43347, 1), new Range16.ptr(43359, 43359, 1)]), sliceType$1.nil, 0); + _Runic = new RangeTable.ptr(new sliceType([new Range16.ptr(5792, 5866, 1), new Range16.ptr(5870, 5880, 1)]), sliceType$1.nil, 0); + _Samaritan = new RangeTable.ptr(new sliceType([new Range16.ptr(2048, 2093, 1), new Range16.ptr(2096, 2110, 1)]), sliceType$1.nil, 0); + _Saurashtra = new RangeTable.ptr(new sliceType([new Range16.ptr(43136, 43204, 1), new Range16.ptr(43214, 43225, 1)]), sliceType$1.nil, 0); + _Sharada = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(70016, 70088, 1), new Range32.ptr(70093, 70093, 1), new Range32.ptr(70096, 70106, 1)]), 0); + _Shavian = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(66640, 66687, 1)]), 0); + _Siddham = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(71040, 71093, 1), new Range32.ptr(71096, 71113, 1)]), 0); + _Sinhala = new RangeTable.ptr(new sliceType([new Range16.ptr(3458, 3459, 1), new Range16.ptr(3461, 3478, 1), new Range16.ptr(3482, 3505, 1), new Range16.ptr(3507, 3515, 1), new Range16.ptr(3517, 3517, 1), new Range16.ptr(3520, 3526, 1), new Range16.ptr(3530, 3530, 1), new Range16.ptr(3535, 3540, 1), new Range16.ptr(3542, 3542, 1), new Range16.ptr(3544, 3551, 1), new Range16.ptr(3558, 3567, 1), new Range16.ptr(3570, 3572, 1)]), new sliceType$1([new Range32.ptr(70113, 70132, 1)]), 0); + _Sora_Sompeng = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(69840, 69864, 1), new Range32.ptr(69872, 69881, 1)]), 0); + _Sundanese = new RangeTable.ptr(new sliceType([new Range16.ptr(7040, 7103, 1), new Range16.ptr(7360, 7367, 1)]), sliceType$1.nil, 0); + _Syloti_Nagri = new RangeTable.ptr(new sliceType([new Range16.ptr(43008, 43051, 1)]), sliceType$1.nil, 0); + _Syriac = new RangeTable.ptr(new sliceType([new Range16.ptr(1792, 1805, 1), new Range16.ptr(1807, 1866, 1), new Range16.ptr(1869, 1871, 1)]), sliceType$1.nil, 0); + _Tagalog = new RangeTable.ptr(new sliceType([new Range16.ptr(5888, 5900, 1), new Range16.ptr(5902, 5908, 1)]), sliceType$1.nil, 0); + _Tagbanwa = new RangeTable.ptr(new sliceType([new Range16.ptr(5984, 5996, 1), new Range16.ptr(5998, 6000, 1), new Range16.ptr(6002, 6003, 1)]), sliceType$1.nil, 0); + _Tai_Le = new RangeTable.ptr(new sliceType([new Range16.ptr(6480, 6509, 1), new Range16.ptr(6512, 6516, 1)]), sliceType$1.nil, 0); + _Tai_Tham = new RangeTable.ptr(new sliceType([new Range16.ptr(6688, 6750, 1), new Range16.ptr(6752, 6780, 1), new Range16.ptr(6783, 6793, 1), new Range16.ptr(6800, 6809, 1), new Range16.ptr(6816, 6829, 1)]), sliceType$1.nil, 0); + _Tai_Viet = new RangeTable.ptr(new sliceType([new Range16.ptr(43648, 43714, 1), new Range16.ptr(43739, 43743, 1)]), sliceType$1.nil, 0); + _Takri = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(71296, 71351, 1), new Range32.ptr(71360, 71369, 1)]), 0); + _Tamil = new RangeTable.ptr(new sliceType([new Range16.ptr(2946, 2947, 1), new Range16.ptr(2949, 2954, 1), new Range16.ptr(2958, 2960, 1), new Range16.ptr(2962, 2965, 1), new Range16.ptr(2969, 2970, 1), new Range16.ptr(2972, 2972, 1), new Range16.ptr(2974, 2975, 1), new Range16.ptr(2979, 2980, 1), new Range16.ptr(2984, 2986, 1), new Range16.ptr(2990, 3001, 1), new Range16.ptr(3006, 3010, 1), new Range16.ptr(3014, 3016, 1), new Range16.ptr(3018, 3021, 1), new Range16.ptr(3024, 3024, 1), new Range16.ptr(3031, 3031, 1), new Range16.ptr(3046, 3066, 1)]), sliceType$1.nil, 0); + _Telugu = new RangeTable.ptr(new sliceType([new Range16.ptr(3072, 3075, 1), new Range16.ptr(3077, 3084, 1), new Range16.ptr(3086, 3088, 1), new Range16.ptr(3090, 3112, 1), new Range16.ptr(3114, 3129, 1), new Range16.ptr(3133, 3140, 1), new Range16.ptr(3142, 3144, 1), new Range16.ptr(3146, 3149, 1), new Range16.ptr(3157, 3158, 1), new Range16.ptr(3160, 3161, 1), new Range16.ptr(3168, 3171, 1), new Range16.ptr(3174, 3183, 1), new Range16.ptr(3192, 3199, 1)]), sliceType$1.nil, 0); + _Thaana = new RangeTable.ptr(new sliceType([new Range16.ptr(1920, 1969, 1)]), sliceType$1.nil, 0); + _Thai = new RangeTable.ptr(new sliceType([new Range16.ptr(3585, 3642, 1), new Range16.ptr(3648, 3675, 1)]), sliceType$1.nil, 0); + _Tibetan = new RangeTable.ptr(new sliceType([new Range16.ptr(3840, 3911, 1), new Range16.ptr(3913, 3948, 1), new Range16.ptr(3953, 3991, 1), new Range16.ptr(3993, 4028, 1), new Range16.ptr(4030, 4044, 1), new Range16.ptr(4046, 4052, 1), new Range16.ptr(4057, 4058, 1)]), sliceType$1.nil, 0); + _Tifinagh = new RangeTable.ptr(new sliceType([new Range16.ptr(11568, 11623, 1), new Range16.ptr(11631, 11632, 1), new Range16.ptr(11647, 11647, 1)]), sliceType$1.nil, 0); + _Tirhuta = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(70784, 70855, 1), new Range32.ptr(70864, 70873, 1)]), 0); + _Ugaritic = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(66432, 66461, 1), new Range32.ptr(66463, 66463, 1)]), 0); + _Vai = new RangeTable.ptr(new sliceType([new Range16.ptr(42240, 42539, 1)]), sliceType$1.nil, 0); + _Warang_Citi = new RangeTable.ptr(new sliceType([]), new sliceType$1([new Range32.ptr(71840, 71922, 1), new Range32.ptr(71935, 71935, 1)]), 0); + _Yi = new RangeTable.ptr(new sliceType([new Range16.ptr(40960, 42124, 1), new Range16.ptr(42128, 42182, 1)]), sliceType$1.nil, 0); + $pkg.Arabic = _Arabic; + $pkg.Armenian = _Armenian; + $pkg.Avestan = _Avestan; + $pkg.Balinese = _Balinese; + $pkg.Bamum = _Bamum; + $pkg.Bassa_Vah = _Bassa_Vah; + $pkg.Batak = _Batak; + $pkg.Bengali = _Bengali; + $pkg.Bopomofo = _Bopomofo; + $pkg.Brahmi = _Brahmi; + $pkg.Braille = _Braille; + $pkg.Buginese = _Buginese; + $pkg.Buhid = _Buhid; + $pkg.Canadian_Aboriginal = _Canadian_Aboriginal; + $pkg.Carian = _Carian; + $pkg.Caucasian_Albanian = _Caucasian_Albanian; + $pkg.Chakma = _Chakma; + $pkg.Cham = _Cham; + $pkg.Cherokee = _Cherokee; + $pkg.Common = _Common; + $pkg.Coptic = _Coptic; + $pkg.Cuneiform = _Cuneiform; + $pkg.Cypriot = _Cypriot; + $pkg.Cyrillic = _Cyrillic; + $pkg.Deseret = _Deseret; + $pkg.Devanagari = _Devanagari; + $pkg.Duployan = _Duployan; + $pkg.Egyptian_Hieroglyphs = _Egyptian_Hieroglyphs; + $pkg.Elbasan = _Elbasan; + $pkg.Ethiopic = _Ethiopic; + $pkg.Georgian = _Georgian; + $pkg.Glagolitic = _Glagolitic; + $pkg.Gothic = _Gothic; + $pkg.Grantha = _Grantha; + $pkg.Greek = _Greek; + $pkg.Gujarati = _Gujarati; + $pkg.Gurmukhi = _Gurmukhi; + $pkg.Han = _Han; + $pkg.Hangul = _Hangul; + $pkg.Hanunoo = _Hanunoo; + $pkg.Hebrew = _Hebrew; + $pkg.Hiragana = _Hiragana; + $pkg.Imperial_Aramaic = _Imperial_Aramaic; + $pkg.Inherited = _Inherited; + $pkg.Inscriptional_Pahlavi = _Inscriptional_Pahlavi; + $pkg.Inscriptional_Parthian = _Inscriptional_Parthian; + $pkg.Javanese = _Javanese; + $pkg.Kaithi = _Kaithi; + $pkg.Kannada = _Kannada; + $pkg.Katakana = _Katakana; + $pkg.Kayah_Li = _Kayah_Li; + $pkg.Kharoshthi = _Kharoshthi; + $pkg.Khmer = _Khmer; + $pkg.Khojki = _Khojki; + $pkg.Khudawadi = _Khudawadi; + $pkg.Lao = _Lao; + $pkg.Latin = _Latin; + $pkg.Lepcha = _Lepcha; + $pkg.Limbu = _Limbu; + $pkg.Linear_A = _Linear_A; + $pkg.Linear_B = _Linear_B; + $pkg.Lisu = _Lisu; + $pkg.Lycian = _Lycian; + $pkg.Lydian = _Lydian; + $pkg.Mahajani = _Mahajani; + $pkg.Malayalam = _Malayalam; + $pkg.Mandaic = _Mandaic; + $pkg.Manichaean = _Manichaean; + $pkg.Meetei_Mayek = _Meetei_Mayek; + $pkg.Mende_Kikakui = _Mende_Kikakui; + $pkg.Meroitic_Cursive = _Meroitic_Cursive; + $pkg.Meroitic_Hieroglyphs = _Meroitic_Hieroglyphs; + $pkg.Miao = _Miao; + $pkg.Modi = _Modi; + $pkg.Mongolian = _Mongolian; + $pkg.Mro = _Mro; + $pkg.Myanmar = _Myanmar; + $pkg.Nabataean = _Nabataean; + $pkg.New_Tai_Lue = _New_Tai_Lue; + $pkg.Nko = _Nko; + $pkg.Ogham = _Ogham; + $pkg.Ol_Chiki = _Ol_Chiki; + $pkg.Old_Italic = _Old_Italic; + $pkg.Old_North_Arabian = _Old_North_Arabian; + $pkg.Old_Permic = _Old_Permic; + $pkg.Old_Persian = _Old_Persian; + $pkg.Old_South_Arabian = _Old_South_Arabian; + $pkg.Old_Turkic = _Old_Turkic; + $pkg.Oriya = _Oriya; + $pkg.Osmanya = _Osmanya; + $pkg.Pahawh_Hmong = _Pahawh_Hmong; + $pkg.Palmyrene = _Palmyrene; + $pkg.Pau_Cin_Hau = _Pau_Cin_Hau; + $pkg.Phags_Pa = _Phags_Pa; + $pkg.Phoenician = _Phoenician; + $pkg.Psalter_Pahlavi = _Psalter_Pahlavi; + $pkg.Rejang = _Rejang; + $pkg.Runic = _Runic; + $pkg.Samaritan = _Samaritan; + $pkg.Saurashtra = _Saurashtra; + $pkg.Sharada = _Sharada; + $pkg.Shavian = _Shavian; + $pkg.Siddham = _Siddham; + $pkg.Sinhala = _Sinhala; + $pkg.Sora_Sompeng = _Sora_Sompeng; + $pkg.Sundanese = _Sundanese; + $pkg.Syloti_Nagri = _Syloti_Nagri; + $pkg.Syriac = _Syriac; + $pkg.Tagalog = _Tagalog; + $pkg.Tagbanwa = _Tagbanwa; + $pkg.Tai_Le = _Tai_Le; + $pkg.Tai_Tham = _Tai_Tham; + $pkg.Tai_Viet = _Tai_Viet; + $pkg.Takri = _Takri; + $pkg.Tamil = _Tamil; + $pkg.Telugu = _Telugu; + $pkg.Thaana = _Thaana; + $pkg.Thai = _Thai; + $pkg.Tibetan = _Tibetan; + $pkg.Tifinagh = _Tifinagh; + $pkg.Tirhuta = _Tirhuta; + $pkg.Ugaritic = _Ugaritic; + $pkg.Vai = _Vai; + $pkg.Warang_Citi = _Warang_Citi; + $pkg.Yi = _Yi; + $pkg.Scripts = (_map$1 = new $Map(), _key$1 = "Arabic", _map$1[_key$1] = { k: _key$1, v: $pkg.Arabic }, _key$1 = "Armenian", _map$1[_key$1] = { k: _key$1, v: $pkg.Armenian }, _key$1 = "Avestan", _map$1[_key$1] = { k: _key$1, v: $pkg.Avestan }, _key$1 = "Balinese", _map$1[_key$1] = { k: _key$1, v: $pkg.Balinese }, _key$1 = "Bamum", _map$1[_key$1] = { k: _key$1, v: $pkg.Bamum }, _key$1 = "Bassa_Vah", _map$1[_key$1] = { k: _key$1, v: $pkg.Bassa_Vah }, _key$1 = "Batak", _map$1[_key$1] = { k: _key$1, v: $pkg.Batak }, _key$1 = "Bengali", _map$1[_key$1] = { k: _key$1, v: $pkg.Bengali }, _key$1 = "Bopomofo", _map$1[_key$1] = { k: _key$1, v: $pkg.Bopomofo }, _key$1 = "Brahmi", _map$1[_key$1] = { k: _key$1, v: $pkg.Brahmi }, _key$1 = "Braille", _map$1[_key$1] = { k: _key$1, v: $pkg.Braille }, _key$1 = "Buginese", _map$1[_key$1] = { k: _key$1, v: $pkg.Buginese }, _key$1 = "Buhid", _map$1[_key$1] = { k: _key$1, v: $pkg.Buhid }, _key$1 = "Canadian_Aboriginal", _map$1[_key$1] = { k: _key$1, v: $pkg.Canadian_Aboriginal }, _key$1 = "Carian", _map$1[_key$1] = { k: _key$1, v: $pkg.Carian }, _key$1 = "Caucasian_Albanian", _map$1[_key$1] = { k: _key$1, v: $pkg.Caucasian_Albanian }, _key$1 = "Chakma", _map$1[_key$1] = { k: _key$1, v: $pkg.Chakma }, _key$1 = "Cham", _map$1[_key$1] = { k: _key$1, v: $pkg.Cham }, _key$1 = "Cherokee", _map$1[_key$1] = { k: _key$1, v: $pkg.Cherokee }, _key$1 = "Common", _map$1[_key$1] = { k: _key$1, v: $pkg.Common }, _key$1 = "Coptic", _map$1[_key$1] = { k: _key$1, v: $pkg.Coptic }, _key$1 = "Cuneiform", _map$1[_key$1] = { k: _key$1, v: $pkg.Cuneiform }, _key$1 = "Cypriot", _map$1[_key$1] = { k: _key$1, v: $pkg.Cypriot }, _key$1 = "Cyrillic", _map$1[_key$1] = { k: _key$1, v: $pkg.Cyrillic }, _key$1 = "Deseret", _map$1[_key$1] = { k: _key$1, v: $pkg.Deseret }, _key$1 = "Devanagari", _map$1[_key$1] = { k: _key$1, v: $pkg.Devanagari }, _key$1 = "Duployan", _map$1[_key$1] = { k: _key$1, v: $pkg.Duployan }, _key$1 = "Egyptian_Hieroglyphs", _map$1[_key$1] = { k: _key$1, v: $pkg.Egyptian_Hieroglyphs }, _key$1 = "Elbasan", _map$1[_key$1] = { k: _key$1, v: $pkg.Elbasan }, _key$1 = "Ethiopic", _map$1[_key$1] = { k: _key$1, v: $pkg.Ethiopic }, _key$1 = "Georgian", _map$1[_key$1] = { k: _key$1, v: $pkg.Georgian }, _key$1 = "Glagolitic", _map$1[_key$1] = { k: _key$1, v: $pkg.Glagolitic }, _key$1 = "Gothic", _map$1[_key$1] = { k: _key$1, v: $pkg.Gothic }, _key$1 = "Grantha", _map$1[_key$1] = { k: _key$1, v: $pkg.Grantha }, _key$1 = "Greek", _map$1[_key$1] = { k: _key$1, v: $pkg.Greek }, _key$1 = "Gujarati", _map$1[_key$1] = { k: _key$1, v: $pkg.Gujarati }, _key$1 = "Gurmukhi", _map$1[_key$1] = { k: _key$1, v: $pkg.Gurmukhi }, _key$1 = "Han", _map$1[_key$1] = { k: _key$1, v: $pkg.Han }, _key$1 = "Hangul", _map$1[_key$1] = { k: _key$1, v: $pkg.Hangul }, _key$1 = "Hanunoo", _map$1[_key$1] = { k: _key$1, v: $pkg.Hanunoo }, _key$1 = "Hebrew", _map$1[_key$1] = { k: _key$1, v: $pkg.Hebrew }, _key$1 = "Hiragana", _map$1[_key$1] = { k: _key$1, v: $pkg.Hiragana }, _key$1 = "Imperial_Aramaic", _map$1[_key$1] = { k: _key$1, v: $pkg.Imperial_Aramaic }, _key$1 = "Inherited", _map$1[_key$1] = { k: _key$1, v: $pkg.Inherited }, _key$1 = "Inscriptional_Pahlavi", _map$1[_key$1] = { k: _key$1, v: $pkg.Inscriptional_Pahlavi }, _key$1 = "Inscriptional_Parthian", _map$1[_key$1] = { k: _key$1, v: $pkg.Inscriptional_Parthian }, _key$1 = "Javanese", _map$1[_key$1] = { k: _key$1, v: $pkg.Javanese }, _key$1 = "Kaithi", _map$1[_key$1] = { k: _key$1, v: $pkg.Kaithi }, _key$1 = "Kannada", _map$1[_key$1] = { k: _key$1, v: $pkg.Kannada }, _key$1 = "Katakana", _map$1[_key$1] = { k: _key$1, v: $pkg.Katakana }, _key$1 = "Kayah_Li", _map$1[_key$1] = { k: _key$1, v: $pkg.Kayah_Li }, _key$1 = "Kharoshthi", _map$1[_key$1] = { k: _key$1, v: $pkg.Kharoshthi }, _key$1 = "Khmer", _map$1[_key$1] = { k: _key$1, v: $pkg.Khmer }, _key$1 = "Khojki", _map$1[_key$1] = { k: _key$1, v: $pkg.Khojki }, _key$1 = "Khudawadi", _map$1[_key$1] = { k: _key$1, v: $pkg.Khudawadi }, _key$1 = "Lao", _map$1[_key$1] = { k: _key$1, v: $pkg.Lao }, _key$1 = "Latin", _map$1[_key$1] = { k: _key$1, v: $pkg.Latin }, _key$1 = "Lepcha", _map$1[_key$1] = { k: _key$1, v: $pkg.Lepcha }, _key$1 = "Limbu", _map$1[_key$1] = { k: _key$1, v: $pkg.Limbu }, _key$1 = "Linear_A", _map$1[_key$1] = { k: _key$1, v: $pkg.Linear_A }, _key$1 = "Linear_B", _map$1[_key$1] = { k: _key$1, v: $pkg.Linear_B }, _key$1 = "Lisu", _map$1[_key$1] = { k: _key$1, v: $pkg.Lisu }, _key$1 = "Lycian", _map$1[_key$1] = { k: _key$1, v: $pkg.Lycian }, _key$1 = "Lydian", _map$1[_key$1] = { k: _key$1, v: $pkg.Lydian }, _key$1 = "Mahajani", _map$1[_key$1] = { k: _key$1, v: $pkg.Mahajani }, _key$1 = "Malayalam", _map$1[_key$1] = { k: _key$1, v: $pkg.Malayalam }, _key$1 = "Mandaic", _map$1[_key$1] = { k: _key$1, v: $pkg.Mandaic }, _key$1 = "Manichaean", _map$1[_key$1] = { k: _key$1, v: $pkg.Manichaean }, _key$1 = "Meetei_Mayek", _map$1[_key$1] = { k: _key$1, v: $pkg.Meetei_Mayek }, _key$1 = "Mende_Kikakui", _map$1[_key$1] = { k: _key$1, v: $pkg.Mende_Kikakui }, _key$1 = "Meroitic_Cursive", _map$1[_key$1] = { k: _key$1, v: $pkg.Meroitic_Cursive }, _key$1 = "Meroitic_Hieroglyphs", _map$1[_key$1] = { k: _key$1, v: $pkg.Meroitic_Hieroglyphs }, _key$1 = "Miao", _map$1[_key$1] = { k: _key$1, v: $pkg.Miao }, _key$1 = "Modi", _map$1[_key$1] = { k: _key$1, v: $pkg.Modi }, _key$1 = "Mongolian", _map$1[_key$1] = { k: _key$1, v: $pkg.Mongolian }, _key$1 = "Mro", _map$1[_key$1] = { k: _key$1, v: $pkg.Mro }, _key$1 = "Myanmar", _map$1[_key$1] = { k: _key$1, v: $pkg.Myanmar }, _key$1 = "Nabataean", _map$1[_key$1] = { k: _key$1, v: $pkg.Nabataean }, _key$1 = "New_Tai_Lue", _map$1[_key$1] = { k: _key$1, v: $pkg.New_Tai_Lue }, _key$1 = "Nko", _map$1[_key$1] = { k: _key$1, v: $pkg.Nko }, _key$1 = "Ogham", _map$1[_key$1] = { k: _key$1, v: $pkg.Ogham }, _key$1 = "Ol_Chiki", _map$1[_key$1] = { k: _key$1, v: $pkg.Ol_Chiki }, _key$1 = "Old_Italic", _map$1[_key$1] = { k: _key$1, v: $pkg.Old_Italic }, _key$1 = "Old_North_Arabian", _map$1[_key$1] = { k: _key$1, v: $pkg.Old_North_Arabian }, _key$1 = "Old_Permic", _map$1[_key$1] = { k: _key$1, v: $pkg.Old_Permic }, _key$1 = "Old_Persian", _map$1[_key$1] = { k: _key$1, v: $pkg.Old_Persian }, _key$1 = "Old_South_Arabian", _map$1[_key$1] = { k: _key$1, v: $pkg.Old_South_Arabian }, _key$1 = "Old_Turkic", _map$1[_key$1] = { k: _key$1, v: $pkg.Old_Turkic }, _key$1 = "Oriya", _map$1[_key$1] = { k: _key$1, v: $pkg.Oriya }, _key$1 = "Osmanya", _map$1[_key$1] = { k: _key$1, v: $pkg.Osmanya }, _key$1 = "Pahawh_Hmong", _map$1[_key$1] = { k: _key$1, v: $pkg.Pahawh_Hmong }, _key$1 = "Palmyrene", _map$1[_key$1] = { k: _key$1, v: $pkg.Palmyrene }, _key$1 = "Pau_Cin_Hau", _map$1[_key$1] = { k: _key$1, v: $pkg.Pau_Cin_Hau }, _key$1 = "Phags_Pa", _map$1[_key$1] = { k: _key$1, v: $pkg.Phags_Pa }, _key$1 = "Phoenician", _map$1[_key$1] = { k: _key$1, v: $pkg.Phoenician }, _key$1 = "Psalter_Pahlavi", _map$1[_key$1] = { k: _key$1, v: $pkg.Psalter_Pahlavi }, _key$1 = "Rejang", _map$1[_key$1] = { k: _key$1, v: $pkg.Rejang }, _key$1 = "Runic", _map$1[_key$1] = { k: _key$1, v: $pkg.Runic }, _key$1 = "Samaritan", _map$1[_key$1] = { k: _key$1, v: $pkg.Samaritan }, _key$1 = "Saurashtra", _map$1[_key$1] = { k: _key$1, v: $pkg.Saurashtra }, _key$1 = "Sharada", _map$1[_key$1] = { k: _key$1, v: $pkg.Sharada }, _key$1 = "Shavian", _map$1[_key$1] = { k: _key$1, v: $pkg.Shavian }, _key$1 = "Siddham", _map$1[_key$1] = { k: _key$1, v: $pkg.Siddham }, _key$1 = "Sinhala", _map$1[_key$1] = { k: _key$1, v: $pkg.Sinhala }, _key$1 = "Sora_Sompeng", _map$1[_key$1] = { k: _key$1, v: $pkg.Sora_Sompeng }, _key$1 = "Sundanese", _map$1[_key$1] = { k: _key$1, v: $pkg.Sundanese }, _key$1 = "Syloti_Nagri", _map$1[_key$1] = { k: _key$1, v: $pkg.Syloti_Nagri }, _key$1 = "Syriac", _map$1[_key$1] = { k: _key$1, v: $pkg.Syriac }, _key$1 = "Tagalog", _map$1[_key$1] = { k: _key$1, v: $pkg.Tagalog }, _key$1 = "Tagbanwa", _map$1[_key$1] = { k: _key$1, v: $pkg.Tagbanwa }, _key$1 = "Tai_Le", _map$1[_key$1] = { k: _key$1, v: $pkg.Tai_Le }, _key$1 = "Tai_Tham", _map$1[_key$1] = { k: _key$1, v: $pkg.Tai_Tham }, _key$1 = "Tai_Viet", _map$1[_key$1] = { k: _key$1, v: $pkg.Tai_Viet }, _key$1 = "Takri", _map$1[_key$1] = { k: _key$1, v: $pkg.Takri }, _key$1 = "Tamil", _map$1[_key$1] = { k: _key$1, v: $pkg.Tamil }, _key$1 = "Telugu", _map$1[_key$1] = { k: _key$1, v: $pkg.Telugu }, _key$1 = "Thaana", _map$1[_key$1] = { k: _key$1, v: $pkg.Thaana }, _key$1 = "Thai", _map$1[_key$1] = { k: _key$1, v: $pkg.Thai }, _key$1 = "Tibetan", _map$1[_key$1] = { k: _key$1, v: $pkg.Tibetan }, _key$1 = "Tifinagh", _map$1[_key$1] = { k: _key$1, v: $pkg.Tifinagh }, _key$1 = "Tirhuta", _map$1[_key$1] = { k: _key$1, v: $pkg.Tirhuta }, _key$1 = "Ugaritic", _map$1[_key$1] = { k: _key$1, v: $pkg.Ugaritic }, _key$1 = "Vai", _map$1[_key$1] = { k: _key$1, v: $pkg.Vai }, _key$1 = "Warang_Citi", _map$1[_key$1] = { k: _key$1, v: $pkg.Warang_Citi }, _key$1 = "Yi", _map$1[_key$1] = { k: _key$1, v: $pkg.Yi }, _map$1); + _White_Space = new RangeTable.ptr(new sliceType([new Range16.ptr(9, 13, 1), new Range16.ptr(32, 32, 1), new Range16.ptr(133, 133, 1), new Range16.ptr(160, 160, 1), new Range16.ptr(5760, 5760, 1), new Range16.ptr(8192, 8202, 1), new Range16.ptr(8232, 8233, 1), new Range16.ptr(8239, 8239, 1), new Range16.ptr(8287, 8287, 1), new Range16.ptr(12288, 12288, 1)]), sliceType$1.nil, 4); + $pkg.White_Space = _White_Space; + _CaseRanges = new sliceType$3([new CaseRange.ptr(65, 90, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(97, 122, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(181, 181, $toNativeArray($kindInt32, [743, 0, 743])), new CaseRange.ptr(192, 214, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(216, 222, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(224, 246, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(248, 254, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(255, 255, $toNativeArray($kindInt32, [121, 0, 121])), new CaseRange.ptr(256, 303, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(304, 304, $toNativeArray($kindInt32, [0, -199, 0])), new CaseRange.ptr(305, 305, $toNativeArray($kindInt32, [-232, 0, -232])), new CaseRange.ptr(306, 311, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(313, 328, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(330, 375, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(376, 376, $toNativeArray($kindInt32, [0, -121, 0])), new CaseRange.ptr(377, 382, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(383, 383, $toNativeArray($kindInt32, [-300, 0, -300])), new CaseRange.ptr(384, 384, $toNativeArray($kindInt32, [195, 0, 195])), new CaseRange.ptr(385, 385, $toNativeArray($kindInt32, [0, 210, 0])), new CaseRange.ptr(386, 389, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(390, 390, $toNativeArray($kindInt32, [0, 206, 0])), new CaseRange.ptr(391, 392, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(393, 394, $toNativeArray($kindInt32, [0, 205, 0])), new CaseRange.ptr(395, 396, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(398, 398, $toNativeArray($kindInt32, [0, 79, 0])), new CaseRange.ptr(399, 399, $toNativeArray($kindInt32, [0, 202, 0])), new CaseRange.ptr(400, 400, $toNativeArray($kindInt32, [0, 203, 0])), new CaseRange.ptr(401, 402, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(403, 403, $toNativeArray($kindInt32, [0, 205, 0])), new CaseRange.ptr(404, 404, $toNativeArray($kindInt32, [0, 207, 0])), new CaseRange.ptr(405, 405, $toNativeArray($kindInt32, [97, 0, 97])), new CaseRange.ptr(406, 406, $toNativeArray($kindInt32, [0, 211, 0])), new CaseRange.ptr(407, 407, $toNativeArray($kindInt32, [0, 209, 0])), new CaseRange.ptr(408, 409, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(410, 410, $toNativeArray($kindInt32, [163, 0, 163])), new CaseRange.ptr(412, 412, $toNativeArray($kindInt32, [0, 211, 0])), new CaseRange.ptr(413, 413, $toNativeArray($kindInt32, [0, 213, 0])), new CaseRange.ptr(414, 414, $toNativeArray($kindInt32, [130, 0, 130])), new CaseRange.ptr(415, 415, $toNativeArray($kindInt32, [0, 214, 0])), new CaseRange.ptr(416, 421, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(422, 422, $toNativeArray($kindInt32, [0, 218, 0])), new CaseRange.ptr(423, 424, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(425, 425, $toNativeArray($kindInt32, [0, 218, 0])), new CaseRange.ptr(428, 429, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(430, 430, $toNativeArray($kindInt32, [0, 218, 0])), new CaseRange.ptr(431, 432, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(433, 434, $toNativeArray($kindInt32, [0, 217, 0])), new CaseRange.ptr(435, 438, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(439, 439, $toNativeArray($kindInt32, [0, 219, 0])), new CaseRange.ptr(440, 441, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(444, 445, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(447, 447, $toNativeArray($kindInt32, [56, 0, 56])), new CaseRange.ptr(452, 452, $toNativeArray($kindInt32, [0, 2, 1])), new CaseRange.ptr(453, 453, $toNativeArray($kindInt32, [-1, 1, 0])), new CaseRange.ptr(454, 454, $toNativeArray($kindInt32, [-2, 0, -1])), new CaseRange.ptr(455, 455, $toNativeArray($kindInt32, [0, 2, 1])), new CaseRange.ptr(456, 456, $toNativeArray($kindInt32, [-1, 1, 0])), new CaseRange.ptr(457, 457, $toNativeArray($kindInt32, [-2, 0, -1])), new CaseRange.ptr(458, 458, $toNativeArray($kindInt32, [0, 2, 1])), new CaseRange.ptr(459, 459, $toNativeArray($kindInt32, [-1, 1, 0])), new CaseRange.ptr(460, 460, $toNativeArray($kindInt32, [-2, 0, -1])), new CaseRange.ptr(461, 476, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(477, 477, $toNativeArray($kindInt32, [-79, 0, -79])), new CaseRange.ptr(478, 495, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(497, 497, $toNativeArray($kindInt32, [0, 2, 1])), new CaseRange.ptr(498, 498, $toNativeArray($kindInt32, [-1, 1, 0])), new CaseRange.ptr(499, 499, $toNativeArray($kindInt32, [-2, 0, -1])), new CaseRange.ptr(500, 501, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(502, 502, $toNativeArray($kindInt32, [0, -97, 0])), new CaseRange.ptr(503, 503, $toNativeArray($kindInt32, [0, -56, 0])), new CaseRange.ptr(504, 543, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(544, 544, $toNativeArray($kindInt32, [0, -130, 0])), new CaseRange.ptr(546, 563, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(570, 570, $toNativeArray($kindInt32, [0, 10795, 0])), new CaseRange.ptr(571, 572, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(573, 573, $toNativeArray($kindInt32, [0, -163, 0])), new CaseRange.ptr(574, 574, $toNativeArray($kindInt32, [0, 10792, 0])), new CaseRange.ptr(575, 576, $toNativeArray($kindInt32, [10815, 0, 10815])), new CaseRange.ptr(577, 578, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(579, 579, $toNativeArray($kindInt32, [0, -195, 0])), new CaseRange.ptr(580, 580, $toNativeArray($kindInt32, [0, 69, 0])), new CaseRange.ptr(581, 581, $toNativeArray($kindInt32, [0, 71, 0])), new CaseRange.ptr(582, 591, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(592, 592, $toNativeArray($kindInt32, [10783, 0, 10783])), new CaseRange.ptr(593, 593, $toNativeArray($kindInt32, [10780, 0, 10780])), new CaseRange.ptr(594, 594, $toNativeArray($kindInt32, [10782, 0, 10782])), new CaseRange.ptr(595, 595, $toNativeArray($kindInt32, [-210, 0, -210])), new CaseRange.ptr(596, 596, $toNativeArray($kindInt32, [-206, 0, -206])), new CaseRange.ptr(598, 599, $toNativeArray($kindInt32, [-205, 0, -205])), new CaseRange.ptr(601, 601, $toNativeArray($kindInt32, [-202, 0, -202])), new CaseRange.ptr(603, 603, $toNativeArray($kindInt32, [-203, 0, -203])), new CaseRange.ptr(604, 604, $toNativeArray($kindInt32, [42319, 0, 42319])), new CaseRange.ptr(608, 608, $toNativeArray($kindInt32, [-205, 0, -205])), new CaseRange.ptr(609, 609, $toNativeArray($kindInt32, [42315, 0, 42315])), new CaseRange.ptr(611, 611, $toNativeArray($kindInt32, [-207, 0, -207])), new CaseRange.ptr(613, 613, $toNativeArray($kindInt32, [42280, 0, 42280])), new CaseRange.ptr(614, 614, $toNativeArray($kindInt32, [42308, 0, 42308])), new CaseRange.ptr(616, 616, $toNativeArray($kindInt32, [-209, 0, -209])), new CaseRange.ptr(617, 617, $toNativeArray($kindInt32, [-211, 0, -211])), new CaseRange.ptr(619, 619, $toNativeArray($kindInt32, [10743, 0, 10743])), new CaseRange.ptr(620, 620, $toNativeArray($kindInt32, [42305, 0, 42305])), new CaseRange.ptr(623, 623, $toNativeArray($kindInt32, [-211, 0, -211])), new CaseRange.ptr(625, 625, $toNativeArray($kindInt32, [10749, 0, 10749])), new CaseRange.ptr(626, 626, $toNativeArray($kindInt32, [-213, 0, -213])), new CaseRange.ptr(629, 629, $toNativeArray($kindInt32, [-214, 0, -214])), new CaseRange.ptr(637, 637, $toNativeArray($kindInt32, [10727, 0, 10727])), new CaseRange.ptr(640, 640, $toNativeArray($kindInt32, [-218, 0, -218])), new CaseRange.ptr(643, 643, $toNativeArray($kindInt32, [-218, 0, -218])), new CaseRange.ptr(647, 647, $toNativeArray($kindInt32, [42282, 0, 42282])), new CaseRange.ptr(648, 648, $toNativeArray($kindInt32, [-218, 0, -218])), new CaseRange.ptr(649, 649, $toNativeArray($kindInt32, [-69, 0, -69])), new CaseRange.ptr(650, 651, $toNativeArray($kindInt32, [-217, 0, -217])), new CaseRange.ptr(652, 652, $toNativeArray($kindInt32, [-71, 0, -71])), new CaseRange.ptr(658, 658, $toNativeArray($kindInt32, [-219, 0, -219])), new CaseRange.ptr(670, 670, $toNativeArray($kindInt32, [42258, 0, 42258])), new CaseRange.ptr(837, 837, $toNativeArray($kindInt32, [84, 0, 84])), new CaseRange.ptr(880, 883, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(886, 887, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(891, 893, $toNativeArray($kindInt32, [130, 0, 130])), new CaseRange.ptr(895, 895, $toNativeArray($kindInt32, [0, 116, 0])), new CaseRange.ptr(902, 902, $toNativeArray($kindInt32, [0, 38, 0])), new CaseRange.ptr(904, 906, $toNativeArray($kindInt32, [0, 37, 0])), new CaseRange.ptr(908, 908, $toNativeArray($kindInt32, [0, 64, 0])), new CaseRange.ptr(910, 911, $toNativeArray($kindInt32, [0, 63, 0])), new CaseRange.ptr(913, 929, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(931, 939, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(940, 940, $toNativeArray($kindInt32, [-38, 0, -38])), new CaseRange.ptr(941, 943, $toNativeArray($kindInt32, [-37, 0, -37])), new CaseRange.ptr(945, 961, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(962, 962, $toNativeArray($kindInt32, [-31, 0, -31])), new CaseRange.ptr(963, 971, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(972, 972, $toNativeArray($kindInt32, [-64, 0, -64])), new CaseRange.ptr(973, 974, $toNativeArray($kindInt32, [-63, 0, -63])), new CaseRange.ptr(975, 975, $toNativeArray($kindInt32, [0, 8, 0])), new CaseRange.ptr(976, 976, $toNativeArray($kindInt32, [-62, 0, -62])), new CaseRange.ptr(977, 977, $toNativeArray($kindInt32, [-57, 0, -57])), new CaseRange.ptr(981, 981, $toNativeArray($kindInt32, [-47, 0, -47])), new CaseRange.ptr(982, 982, $toNativeArray($kindInt32, [-54, 0, -54])), new CaseRange.ptr(983, 983, $toNativeArray($kindInt32, [-8, 0, -8])), new CaseRange.ptr(984, 1007, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(1008, 1008, $toNativeArray($kindInt32, [-86, 0, -86])), new CaseRange.ptr(1009, 1009, $toNativeArray($kindInt32, [-80, 0, -80])), new CaseRange.ptr(1010, 1010, $toNativeArray($kindInt32, [7, 0, 7])), new CaseRange.ptr(1011, 1011, $toNativeArray($kindInt32, [-116, 0, -116])), new CaseRange.ptr(1012, 1012, $toNativeArray($kindInt32, [0, -60, 0])), new CaseRange.ptr(1013, 1013, $toNativeArray($kindInt32, [-96, 0, -96])), new CaseRange.ptr(1015, 1016, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(1017, 1017, $toNativeArray($kindInt32, [0, -7, 0])), new CaseRange.ptr(1018, 1019, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(1021, 1023, $toNativeArray($kindInt32, [0, -130, 0])), new CaseRange.ptr(1024, 1039, $toNativeArray($kindInt32, [0, 80, 0])), new CaseRange.ptr(1040, 1071, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(1072, 1103, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(1104, 1119, $toNativeArray($kindInt32, [-80, 0, -80])), new CaseRange.ptr(1120, 1153, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(1162, 1215, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(1216, 1216, $toNativeArray($kindInt32, [0, 15, 0])), new CaseRange.ptr(1217, 1230, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(1231, 1231, $toNativeArray($kindInt32, [-15, 0, -15])), new CaseRange.ptr(1232, 1327, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(1329, 1366, $toNativeArray($kindInt32, [0, 48, 0])), new CaseRange.ptr(1377, 1414, $toNativeArray($kindInt32, [-48, 0, -48])), new CaseRange.ptr(4256, 4293, $toNativeArray($kindInt32, [0, 7264, 0])), new CaseRange.ptr(4295, 4295, $toNativeArray($kindInt32, [0, 7264, 0])), new CaseRange.ptr(4301, 4301, $toNativeArray($kindInt32, [0, 7264, 0])), new CaseRange.ptr(7545, 7545, $toNativeArray($kindInt32, [35332, 0, 35332])), new CaseRange.ptr(7549, 7549, $toNativeArray($kindInt32, [3814, 0, 3814])), new CaseRange.ptr(7680, 7829, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(7835, 7835, $toNativeArray($kindInt32, [-59, 0, -59])), new CaseRange.ptr(7838, 7838, $toNativeArray($kindInt32, [0, -7615, 0])), new CaseRange.ptr(7840, 7935, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(7936, 7943, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(7944, 7951, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(7952, 7957, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(7960, 7965, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(7968, 7975, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(7976, 7983, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(7984, 7991, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(7992, 7999, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8000, 8005, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8008, 8013, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8017, 8017, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8019, 8019, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8021, 8021, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8023, 8023, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8025, 8025, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8027, 8027, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8029, 8029, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8031, 8031, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8032, 8039, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8040, 8047, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8048, 8049, $toNativeArray($kindInt32, [74, 0, 74])), new CaseRange.ptr(8050, 8053, $toNativeArray($kindInt32, [86, 0, 86])), new CaseRange.ptr(8054, 8055, $toNativeArray($kindInt32, [100, 0, 100])), new CaseRange.ptr(8056, 8057, $toNativeArray($kindInt32, [128, 0, 128])), new CaseRange.ptr(8058, 8059, $toNativeArray($kindInt32, [112, 0, 112])), new CaseRange.ptr(8060, 8061, $toNativeArray($kindInt32, [126, 0, 126])), new CaseRange.ptr(8064, 8071, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8072, 8079, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8080, 8087, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8088, 8095, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8096, 8103, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8104, 8111, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8112, 8113, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8115, 8115, $toNativeArray($kindInt32, [9, 0, 9])), new CaseRange.ptr(8120, 8121, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8122, 8123, $toNativeArray($kindInt32, [0, -74, 0])), new CaseRange.ptr(8124, 8124, $toNativeArray($kindInt32, [0, -9, 0])), new CaseRange.ptr(8126, 8126, $toNativeArray($kindInt32, [-7205, 0, -7205])), new CaseRange.ptr(8131, 8131, $toNativeArray($kindInt32, [9, 0, 9])), new CaseRange.ptr(8136, 8139, $toNativeArray($kindInt32, [0, -86, 0])), new CaseRange.ptr(8140, 8140, $toNativeArray($kindInt32, [0, -9, 0])), new CaseRange.ptr(8144, 8145, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8152, 8153, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8154, 8155, $toNativeArray($kindInt32, [0, -100, 0])), new CaseRange.ptr(8160, 8161, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8165, 8165, $toNativeArray($kindInt32, [7, 0, 7])), new CaseRange.ptr(8168, 8169, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8170, 8171, $toNativeArray($kindInt32, [0, -112, 0])), new CaseRange.ptr(8172, 8172, $toNativeArray($kindInt32, [0, -7, 0])), new CaseRange.ptr(8179, 8179, $toNativeArray($kindInt32, [9, 0, 9])), new CaseRange.ptr(8184, 8185, $toNativeArray($kindInt32, [0, -128, 0])), new CaseRange.ptr(8186, 8187, $toNativeArray($kindInt32, [0, -126, 0])), new CaseRange.ptr(8188, 8188, $toNativeArray($kindInt32, [0, -9, 0])), new CaseRange.ptr(8486, 8486, $toNativeArray($kindInt32, [0, -7517, 0])), new CaseRange.ptr(8490, 8490, $toNativeArray($kindInt32, [0, -8383, 0])), new CaseRange.ptr(8491, 8491, $toNativeArray($kindInt32, [0, -8262, 0])), new CaseRange.ptr(8498, 8498, $toNativeArray($kindInt32, [0, 28, 0])), new CaseRange.ptr(8526, 8526, $toNativeArray($kindInt32, [-28, 0, -28])), new CaseRange.ptr(8544, 8559, $toNativeArray($kindInt32, [0, 16, 0])), new CaseRange.ptr(8560, 8575, $toNativeArray($kindInt32, [-16, 0, -16])), new CaseRange.ptr(8579, 8580, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(9398, 9423, $toNativeArray($kindInt32, [0, 26, 0])), new CaseRange.ptr(9424, 9449, $toNativeArray($kindInt32, [-26, 0, -26])), new CaseRange.ptr(11264, 11310, $toNativeArray($kindInt32, [0, 48, 0])), new CaseRange.ptr(11312, 11358, $toNativeArray($kindInt32, [-48, 0, -48])), new CaseRange.ptr(11360, 11361, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(11362, 11362, $toNativeArray($kindInt32, [0, -10743, 0])), new CaseRange.ptr(11363, 11363, $toNativeArray($kindInt32, [0, -3814, 0])), new CaseRange.ptr(11364, 11364, $toNativeArray($kindInt32, [0, -10727, 0])), new CaseRange.ptr(11365, 11365, $toNativeArray($kindInt32, [-10795, 0, -10795])), new CaseRange.ptr(11366, 11366, $toNativeArray($kindInt32, [-10792, 0, -10792])), new CaseRange.ptr(11367, 11372, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(11373, 11373, $toNativeArray($kindInt32, [0, -10780, 0])), new CaseRange.ptr(11374, 11374, $toNativeArray($kindInt32, [0, -10749, 0])), new CaseRange.ptr(11375, 11375, $toNativeArray($kindInt32, [0, -10783, 0])), new CaseRange.ptr(11376, 11376, $toNativeArray($kindInt32, [0, -10782, 0])), new CaseRange.ptr(11378, 11379, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(11381, 11382, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(11390, 11391, $toNativeArray($kindInt32, [0, -10815, 0])), new CaseRange.ptr(11392, 11491, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(11499, 11502, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(11506, 11507, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(11520, 11557, $toNativeArray($kindInt32, [-7264, 0, -7264])), new CaseRange.ptr(11559, 11559, $toNativeArray($kindInt32, [-7264, 0, -7264])), new CaseRange.ptr(11565, 11565, $toNativeArray($kindInt32, [-7264, 0, -7264])), new CaseRange.ptr(42560, 42605, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42624, 42651, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42786, 42799, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42802, 42863, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42873, 42876, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42877, 42877, $toNativeArray($kindInt32, [0, -35332, 0])), new CaseRange.ptr(42878, 42887, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42891, 42892, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42893, 42893, $toNativeArray($kindInt32, [0, -42280, 0])), new CaseRange.ptr(42896, 42899, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42902, 42921, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42922, 42922, $toNativeArray($kindInt32, [0, -42308, 0])), new CaseRange.ptr(42923, 42923, $toNativeArray($kindInt32, [0, -42319, 0])), new CaseRange.ptr(42924, 42924, $toNativeArray($kindInt32, [0, -42315, 0])), new CaseRange.ptr(42925, 42925, $toNativeArray($kindInt32, [0, -42305, 0])), new CaseRange.ptr(42928, 42928, $toNativeArray($kindInt32, [0, -42258, 0])), new CaseRange.ptr(42929, 42929, $toNativeArray($kindInt32, [0, -42282, 0])), new CaseRange.ptr(65313, 65338, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(65345, 65370, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(66560, 66599, $toNativeArray($kindInt32, [0, 40, 0])), new CaseRange.ptr(66600, 66639, $toNativeArray($kindInt32, [-40, 0, -40])), new CaseRange.ptr(71840, 71871, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(71872, 71903, $toNativeArray($kindInt32, [-32, 0, -32]))]); + $pkg.CaseRanges = _CaseRanges; + properties = $toNativeArray($kindUint8, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 144, 130, 130, 130, 136, 130, 130, 130, 130, 130, 130, 136, 130, 130, 130, 130, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 130, 130, 136, 136, 136, 130, 130, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 130, 130, 130, 136, 130, 136, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 130, 136, 130, 136, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 130, 136, 136, 136, 136, 136, 130, 136, 136, 224, 130, 136, 0, 136, 136, 136, 136, 132, 132, 136, 192, 130, 130, 136, 132, 224, 130, 132, 132, 132, 130, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 136, 160, 160, 160, 160, 160, 160, 160, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 136, 192, 192, 192, 192, 192, 192, 192, 192]); + caseOrbit = new sliceType$4([new foldPair.ptr(75, 107), new foldPair.ptr(83, 115), new foldPair.ptr(107, 8490), new foldPair.ptr(115, 383), new foldPair.ptr(181, 924), new foldPair.ptr(197, 229), new foldPair.ptr(223, 7838), new foldPair.ptr(229, 8491), new foldPair.ptr(304, 304), new foldPair.ptr(305, 305), new foldPair.ptr(383, 83), new foldPair.ptr(452, 453), new foldPair.ptr(453, 454), new foldPair.ptr(454, 452), new foldPair.ptr(455, 456), new foldPair.ptr(456, 457), new foldPair.ptr(457, 455), new foldPair.ptr(458, 459), new foldPair.ptr(459, 460), new foldPair.ptr(460, 458), new foldPair.ptr(497, 498), new foldPair.ptr(498, 499), new foldPair.ptr(499, 497), new foldPair.ptr(837, 921), new foldPair.ptr(914, 946), new foldPair.ptr(917, 949), new foldPair.ptr(920, 952), new foldPair.ptr(921, 953), new foldPair.ptr(922, 954), new foldPair.ptr(924, 956), new foldPair.ptr(928, 960), new foldPair.ptr(929, 961), new foldPair.ptr(931, 962), new foldPair.ptr(934, 966), new foldPair.ptr(937, 969), new foldPair.ptr(946, 976), new foldPair.ptr(949, 1013), new foldPair.ptr(952, 977), new foldPair.ptr(953, 8126), new foldPair.ptr(954, 1008), new foldPair.ptr(956, 181), new foldPair.ptr(960, 982), new foldPair.ptr(961, 1009), new foldPair.ptr(962, 963), new foldPair.ptr(963, 931), new foldPair.ptr(966, 981), new foldPair.ptr(969, 8486), new foldPair.ptr(976, 914), new foldPair.ptr(977, 1012), new foldPair.ptr(981, 934), new foldPair.ptr(982, 928), new foldPair.ptr(1008, 922), new foldPair.ptr(1009, 929), new foldPair.ptr(1012, 920), new foldPair.ptr(1013, 917), new foldPair.ptr(7776, 7777), new foldPair.ptr(7777, 7835), new foldPair.ptr(7835, 7776), new foldPair.ptr(7838, 223), new foldPair.ptr(8126, 837), new foldPair.ptr(8486, 937), new foldPair.ptr(8490, 75), new foldPair.ptr(8491, 197)]); + foldCommon = new RangeTable.ptr(new sliceType([new Range16.ptr(924, 956, 32)]), sliceType$1.nil, 0); + foldGreek = new RangeTable.ptr(new sliceType([new Range16.ptr(181, 837, 656)]), sliceType$1.nil, 0); + foldInherited = new RangeTable.ptr(new sliceType([new Range16.ptr(921, 953, 32), new Range16.ptr(8126, 8126, 1)]), sliceType$1.nil, 0); + foldL = new RangeTable.ptr(new sliceType([new Range16.ptr(837, 837, 1)]), sliceType$1.nil, 0); + foldLl = new RangeTable.ptr(new sliceType([new Range16.ptr(65, 90, 1), new Range16.ptr(192, 214, 1), new Range16.ptr(216, 222, 1), new Range16.ptr(256, 302, 2), new Range16.ptr(306, 310, 2), new Range16.ptr(313, 327, 2), new Range16.ptr(330, 376, 2), new Range16.ptr(377, 381, 2), new Range16.ptr(385, 386, 1), new Range16.ptr(388, 390, 2), new Range16.ptr(391, 393, 2), new Range16.ptr(394, 395, 1), new Range16.ptr(398, 401, 1), new Range16.ptr(403, 404, 1), new Range16.ptr(406, 408, 1), new Range16.ptr(412, 413, 1), new Range16.ptr(415, 416, 1), new Range16.ptr(418, 422, 2), new Range16.ptr(423, 425, 2), new Range16.ptr(428, 430, 2), new Range16.ptr(431, 433, 2), new Range16.ptr(434, 435, 1), new Range16.ptr(437, 439, 2), new Range16.ptr(440, 444, 4), new Range16.ptr(452, 453, 1), new Range16.ptr(455, 456, 1), new Range16.ptr(458, 459, 1), new Range16.ptr(461, 475, 2), new Range16.ptr(478, 494, 2), new Range16.ptr(497, 498, 1), new Range16.ptr(500, 502, 2), new Range16.ptr(503, 504, 1), new Range16.ptr(506, 562, 2), new Range16.ptr(570, 571, 1), new Range16.ptr(573, 574, 1), new Range16.ptr(577, 579, 2), new Range16.ptr(580, 582, 1), new Range16.ptr(584, 590, 2), new Range16.ptr(837, 880, 43), new Range16.ptr(882, 886, 4), new Range16.ptr(895, 902, 7), new Range16.ptr(904, 906, 1), new Range16.ptr(908, 910, 2), new Range16.ptr(911, 913, 2), new Range16.ptr(914, 929, 1), new Range16.ptr(931, 939, 1), new Range16.ptr(975, 984, 9), new Range16.ptr(986, 1006, 2), new Range16.ptr(1012, 1015, 3), new Range16.ptr(1017, 1018, 1), new Range16.ptr(1021, 1071, 1), new Range16.ptr(1120, 1152, 2), new Range16.ptr(1162, 1216, 2), new Range16.ptr(1217, 1229, 2), new Range16.ptr(1232, 1326, 2), new Range16.ptr(1329, 1366, 1), new Range16.ptr(4256, 4293, 1), new Range16.ptr(4295, 4301, 6), new Range16.ptr(7680, 7828, 2), new Range16.ptr(7838, 7934, 2), new Range16.ptr(7944, 7951, 1), new Range16.ptr(7960, 7965, 1), new Range16.ptr(7976, 7983, 1), new Range16.ptr(7992, 7999, 1), new Range16.ptr(8008, 8013, 1), new Range16.ptr(8025, 8031, 2), new Range16.ptr(8040, 8047, 1), new Range16.ptr(8072, 8079, 1), new Range16.ptr(8088, 8095, 1), new Range16.ptr(8104, 8111, 1), new Range16.ptr(8120, 8124, 1), new Range16.ptr(8136, 8140, 1), new Range16.ptr(8152, 8155, 1), new Range16.ptr(8168, 8172, 1), new Range16.ptr(8184, 8188, 1), new Range16.ptr(8486, 8490, 4), new Range16.ptr(8491, 8498, 7), new Range16.ptr(8579, 11264, 2685), new Range16.ptr(11265, 11310, 1), new Range16.ptr(11360, 11362, 2), new Range16.ptr(11363, 11364, 1), new Range16.ptr(11367, 11373, 2), new Range16.ptr(11374, 11376, 1), new Range16.ptr(11378, 11381, 3), new Range16.ptr(11390, 11392, 1), new Range16.ptr(11394, 11490, 2), new Range16.ptr(11499, 11501, 2), new Range16.ptr(11506, 42560, 31054), new Range16.ptr(42562, 42604, 2), new Range16.ptr(42624, 42650, 2), new Range16.ptr(42786, 42798, 2), new Range16.ptr(42802, 42862, 2), new Range16.ptr(42873, 42877, 2), new Range16.ptr(42878, 42886, 2), new Range16.ptr(42891, 42893, 2), new Range16.ptr(42896, 42898, 2), new Range16.ptr(42902, 42922, 2), new Range16.ptr(42923, 42925, 1), new Range16.ptr(42928, 42929, 1), new Range16.ptr(65313, 65338, 1)]), new sliceType$1([new Range32.ptr(66560, 66599, 1), new Range32.ptr(71840, 71871, 1)]), 3); + foldLt = new RangeTable.ptr(new sliceType([new Range16.ptr(452, 454, 2), new Range16.ptr(455, 457, 2), new Range16.ptr(458, 460, 2), new Range16.ptr(497, 499, 2), new Range16.ptr(8064, 8071, 1), new Range16.ptr(8080, 8087, 1), new Range16.ptr(8096, 8103, 1), new Range16.ptr(8115, 8131, 16), new Range16.ptr(8179, 8179, 1)]), sliceType$1.nil, 0); + foldLu = new RangeTable.ptr(new sliceType([new Range16.ptr(97, 122, 1), new Range16.ptr(181, 223, 42), new Range16.ptr(224, 246, 1), new Range16.ptr(248, 255, 1), new Range16.ptr(257, 303, 2), new Range16.ptr(307, 311, 2), new Range16.ptr(314, 328, 2), new Range16.ptr(331, 375, 2), new Range16.ptr(378, 382, 2), new Range16.ptr(383, 384, 1), new Range16.ptr(387, 389, 2), new Range16.ptr(392, 396, 4), new Range16.ptr(402, 405, 3), new Range16.ptr(409, 410, 1), new Range16.ptr(414, 417, 3), new Range16.ptr(419, 421, 2), new Range16.ptr(424, 429, 5), new Range16.ptr(432, 436, 4), new Range16.ptr(438, 441, 3), new Range16.ptr(445, 447, 2), new Range16.ptr(453, 454, 1), new Range16.ptr(456, 457, 1), new Range16.ptr(459, 460, 1), new Range16.ptr(462, 476, 2), new Range16.ptr(477, 495, 2), new Range16.ptr(498, 499, 1), new Range16.ptr(501, 505, 4), new Range16.ptr(507, 543, 2), new Range16.ptr(547, 563, 2), new Range16.ptr(572, 575, 3), new Range16.ptr(576, 578, 2), new Range16.ptr(583, 591, 2), new Range16.ptr(592, 596, 1), new Range16.ptr(598, 599, 1), new Range16.ptr(601, 603, 2), new Range16.ptr(604, 608, 4), new Range16.ptr(609, 613, 2), new Range16.ptr(614, 616, 2), new Range16.ptr(617, 619, 2), new Range16.ptr(620, 623, 3), new Range16.ptr(625, 626, 1), new Range16.ptr(629, 637, 8), new Range16.ptr(640, 643, 3), new Range16.ptr(647, 652, 1), new Range16.ptr(658, 670, 12), new Range16.ptr(837, 881, 44), new Range16.ptr(883, 891, 4), new Range16.ptr(892, 893, 1), new Range16.ptr(940, 943, 1), new Range16.ptr(945, 974, 1), new Range16.ptr(976, 977, 1), new Range16.ptr(981, 983, 1), new Range16.ptr(985, 1007, 2), new Range16.ptr(1008, 1011, 1), new Range16.ptr(1013, 1019, 3), new Range16.ptr(1072, 1119, 1), new Range16.ptr(1121, 1153, 2), new Range16.ptr(1163, 1215, 2), new Range16.ptr(1218, 1230, 2), new Range16.ptr(1231, 1327, 2), new Range16.ptr(1377, 1414, 1), new Range16.ptr(7545, 7549, 4), new Range16.ptr(7681, 7829, 2), new Range16.ptr(7835, 7841, 6), new Range16.ptr(7843, 7935, 2), new Range16.ptr(7936, 7943, 1), new Range16.ptr(7952, 7957, 1), new Range16.ptr(7968, 7975, 1), new Range16.ptr(7984, 7991, 1), new Range16.ptr(8000, 8005, 1), new Range16.ptr(8017, 8023, 2), new Range16.ptr(8032, 8039, 1), new Range16.ptr(8048, 8061, 1), new Range16.ptr(8112, 8113, 1), new Range16.ptr(8126, 8144, 18), new Range16.ptr(8145, 8160, 15), new Range16.ptr(8161, 8165, 4), new Range16.ptr(8526, 8580, 54), new Range16.ptr(11312, 11358, 1), new Range16.ptr(11361, 11365, 4), new Range16.ptr(11366, 11372, 2), new Range16.ptr(11379, 11382, 3), new Range16.ptr(11393, 11491, 2), new Range16.ptr(11500, 11502, 2), new Range16.ptr(11507, 11520, 13), new Range16.ptr(11521, 11557, 1), new Range16.ptr(11559, 11565, 6), new Range16.ptr(42561, 42605, 2), new Range16.ptr(42625, 42651, 2), new Range16.ptr(42787, 42799, 2), new Range16.ptr(42803, 42863, 2), new Range16.ptr(42874, 42876, 2), new Range16.ptr(42879, 42887, 2), new Range16.ptr(42892, 42897, 5), new Range16.ptr(42899, 42903, 4), new Range16.ptr(42905, 42921, 2), new Range16.ptr(65345, 65370, 1)]), new sliceType$1([new Range32.ptr(66600, 66639, 1), new Range32.ptr(71872, 71903, 1)]), 4); + foldM = new RangeTable.ptr(new sliceType([new Range16.ptr(921, 953, 32), new Range16.ptr(8126, 8126, 1)]), sliceType$1.nil, 0); + foldMn = new RangeTable.ptr(new sliceType([new Range16.ptr(921, 953, 32), new Range16.ptr(8126, 8126, 1)]), sliceType$1.nil, 0); + $pkg.FoldCategory = (_map$3 = new $Map(), _key$3 = "Common", _map$3[_key$3] = { k: _key$3, v: foldCommon }, _key$3 = "Greek", _map$3[_key$3] = { k: _key$3, v: foldGreek }, _key$3 = "Inherited", _map$3[_key$3] = { k: _key$3, v: foldInherited }, _key$3 = "L", _map$3[_key$3] = { k: _key$3, v: foldL }, _key$3 = "Ll", _map$3[_key$3] = { k: _key$3, v: foldLl }, _key$3 = "Lt", _map$3[_key$3] = { k: _key$3, v: foldLt }, _key$3 = "Lu", _map$3[_key$3] = { k: _key$3, v: foldLu }, _key$3 = "M", _map$3[_key$3] = { k: _key$3, v: foldM }, _key$3 = "Mn", _map$3[_key$3] = { k: _key$3, v: foldMn }, _map$3); + $pkg.FoldScript = (_map$4 = new $Map(), _map$4); + /* */ } return; } }; $init_unicode.$blocking = true; return $init_unicode; + }; + return $pkg; +})(); +$packages["unicode/utf8"] = (function() { + var $pkg = {}, decodeRuneInternal, decodeRuneInStringInternal, DecodeRune, DecodeRuneInString, DecodeLastRune, DecodeLastRuneInString, RuneLen, EncodeRune, RuneCount, RuneCountInString, RuneStart; + decodeRuneInternal = function(p) { + var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$44, _tmp$45, _tmp$46, _tmp$47, _tmp$48, _tmp$49, _tmp$5, _tmp$50, _tmp$6, _tmp$7, _tmp$8, _tmp$9, c0, c1, c2, c3, n, p, r = 0, short$1 = false, size = 0; + n = p.$length; + if (n < 1) { + _tmp = 65533; _tmp$1 = 0; _tmp$2 = true; r = _tmp; size = _tmp$1; short$1 = _tmp$2; + return [r, size, short$1]; + } + c0 = ((0 < 0 || 0 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 0]); + if (c0 < 128) { + _tmp$3 = (c0 >> 0); _tmp$4 = 1; _tmp$5 = false; r = _tmp$3; size = _tmp$4; short$1 = _tmp$5; + return [r, size, short$1]; + } + if (c0 < 192) { + _tmp$6 = 65533; _tmp$7 = 1; _tmp$8 = false; r = _tmp$6; size = _tmp$7; short$1 = _tmp$8; + return [r, size, short$1]; + } + if (n < 2) { + _tmp$9 = 65533; _tmp$10 = 1; _tmp$11 = true; r = _tmp$9; size = _tmp$10; short$1 = _tmp$11; + return [r, size, short$1]; + } + c1 = ((1 < 0 || 1 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 1]); + if (c1 < 128 || 192 <= c1) { + _tmp$12 = 65533; _tmp$13 = 1; _tmp$14 = false; r = _tmp$12; size = _tmp$13; short$1 = _tmp$14; + return [r, size, short$1]; + } + if (c0 < 224) { + r = ((((c0 & 31) >>> 0) >> 0) << 6 >> 0) | (((c1 & 63) >>> 0) >> 0); + if (r <= 127) { + _tmp$15 = 65533; _tmp$16 = 1; _tmp$17 = false; r = _tmp$15; size = _tmp$16; short$1 = _tmp$17; + return [r, size, short$1]; + } + _tmp$18 = r; _tmp$19 = 2; _tmp$20 = false; r = _tmp$18; size = _tmp$19; short$1 = _tmp$20; + return [r, size, short$1]; + } + if (n < 3) { + _tmp$21 = 65533; _tmp$22 = 1; _tmp$23 = true; r = _tmp$21; size = _tmp$22; short$1 = _tmp$23; + return [r, size, short$1]; + } + c2 = ((2 < 0 || 2 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 2]); + if (c2 < 128 || 192 <= c2) { + _tmp$24 = 65533; _tmp$25 = 1; _tmp$26 = false; r = _tmp$24; size = _tmp$25; short$1 = _tmp$26; + return [r, size, short$1]; + } + if (c0 < 240) { + r = (((((c0 & 15) >>> 0) >> 0) << 12 >> 0) | ((((c1 & 63) >>> 0) >> 0) << 6 >> 0)) | (((c2 & 63) >>> 0) >> 0); + if (r <= 2047) { + _tmp$27 = 65533; _tmp$28 = 1; _tmp$29 = false; r = _tmp$27; size = _tmp$28; short$1 = _tmp$29; + return [r, size, short$1]; + } + if (55296 <= r && r <= 57343) { + _tmp$30 = 65533; _tmp$31 = 1; _tmp$32 = false; r = _tmp$30; size = _tmp$31; short$1 = _tmp$32; + return [r, size, short$1]; + } + _tmp$33 = r; _tmp$34 = 3; _tmp$35 = false; r = _tmp$33; size = _tmp$34; short$1 = _tmp$35; + return [r, size, short$1]; + } + if (n < 4) { + _tmp$36 = 65533; _tmp$37 = 1; _tmp$38 = true; r = _tmp$36; size = _tmp$37; short$1 = _tmp$38; + return [r, size, short$1]; + } + c3 = ((3 < 0 || 3 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 3]); + if (c3 < 128 || 192 <= c3) { + _tmp$39 = 65533; _tmp$40 = 1; _tmp$41 = false; r = _tmp$39; size = _tmp$40; short$1 = _tmp$41; + return [r, size, short$1]; + } + if (c0 < 248) { + r = ((((((c0 & 7) >>> 0) >> 0) << 18 >> 0) | ((((c1 & 63) >>> 0) >> 0) << 12 >> 0)) | ((((c2 & 63) >>> 0) >> 0) << 6 >> 0)) | (((c3 & 63) >>> 0) >> 0); + if (r <= 65535 || 1114111 < r) { + _tmp$42 = 65533; _tmp$43 = 1; _tmp$44 = false; r = _tmp$42; size = _tmp$43; short$1 = _tmp$44; + return [r, size, short$1]; + } + _tmp$45 = r; _tmp$46 = 4; _tmp$47 = false; r = _tmp$45; size = _tmp$46; short$1 = _tmp$47; + return [r, size, short$1]; + } + _tmp$48 = 65533; _tmp$49 = 1; _tmp$50 = false; r = _tmp$48; size = _tmp$49; short$1 = _tmp$50; + return [r, size, short$1]; + }; + decodeRuneInStringInternal = function(s) { + var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$44, _tmp$45, _tmp$46, _tmp$47, _tmp$48, _tmp$49, _tmp$5, _tmp$50, _tmp$6, _tmp$7, _tmp$8, _tmp$9, c0, c1, c2, c3, n, r = 0, s, short$1 = false, size = 0; + n = s.length; + if (n < 1) { + _tmp = 65533; _tmp$1 = 0; _tmp$2 = true; r = _tmp; size = _tmp$1; short$1 = _tmp$2; + return [r, size, short$1]; + } + c0 = s.charCodeAt(0); + if (c0 < 128) { + _tmp$3 = (c0 >> 0); _tmp$4 = 1; _tmp$5 = false; r = _tmp$3; size = _tmp$4; short$1 = _tmp$5; + return [r, size, short$1]; + } + if (c0 < 192) { + _tmp$6 = 65533; _tmp$7 = 1; _tmp$8 = false; r = _tmp$6; size = _tmp$7; short$1 = _tmp$8; + return [r, size, short$1]; + } + if (n < 2) { + _tmp$9 = 65533; _tmp$10 = 1; _tmp$11 = true; r = _tmp$9; size = _tmp$10; short$1 = _tmp$11; + return [r, size, short$1]; + } + c1 = s.charCodeAt(1); + if (c1 < 128 || 192 <= c1) { + _tmp$12 = 65533; _tmp$13 = 1; _tmp$14 = false; r = _tmp$12; size = _tmp$13; short$1 = _tmp$14; + return [r, size, short$1]; + } + if (c0 < 224) { + r = ((((c0 & 31) >>> 0) >> 0) << 6 >> 0) | (((c1 & 63) >>> 0) >> 0); + if (r <= 127) { + _tmp$15 = 65533; _tmp$16 = 1; _tmp$17 = false; r = _tmp$15; size = _tmp$16; short$1 = _tmp$17; + return [r, size, short$1]; + } + _tmp$18 = r; _tmp$19 = 2; _tmp$20 = false; r = _tmp$18; size = _tmp$19; short$1 = _tmp$20; + return [r, size, short$1]; + } + if (n < 3) { + _tmp$21 = 65533; _tmp$22 = 1; _tmp$23 = true; r = _tmp$21; size = _tmp$22; short$1 = _tmp$23; + return [r, size, short$1]; + } + c2 = s.charCodeAt(2); + if (c2 < 128 || 192 <= c2) { + _tmp$24 = 65533; _tmp$25 = 1; _tmp$26 = false; r = _tmp$24; size = _tmp$25; short$1 = _tmp$26; + return [r, size, short$1]; + } + if (c0 < 240) { + r = (((((c0 & 15) >>> 0) >> 0) << 12 >> 0) | ((((c1 & 63) >>> 0) >> 0) << 6 >> 0)) | (((c2 & 63) >>> 0) >> 0); + if (r <= 2047) { + _tmp$27 = 65533; _tmp$28 = 1; _tmp$29 = false; r = _tmp$27; size = _tmp$28; short$1 = _tmp$29; + return [r, size, short$1]; + } + if (55296 <= r && r <= 57343) { + _tmp$30 = 65533; _tmp$31 = 1; _tmp$32 = false; r = _tmp$30; size = _tmp$31; short$1 = _tmp$32; + return [r, size, short$1]; + } + _tmp$33 = r; _tmp$34 = 3; _tmp$35 = false; r = _tmp$33; size = _tmp$34; short$1 = _tmp$35; + return [r, size, short$1]; + } + if (n < 4) { + _tmp$36 = 65533; _tmp$37 = 1; _tmp$38 = true; r = _tmp$36; size = _tmp$37; short$1 = _tmp$38; + return [r, size, short$1]; + } + c3 = s.charCodeAt(3); + if (c3 < 128 || 192 <= c3) { + _tmp$39 = 65533; _tmp$40 = 1; _tmp$41 = false; r = _tmp$39; size = _tmp$40; short$1 = _tmp$41; + return [r, size, short$1]; + } + if (c0 < 248) { + r = ((((((c0 & 7) >>> 0) >> 0) << 18 >> 0) | ((((c1 & 63) >>> 0) >> 0) << 12 >> 0)) | ((((c2 & 63) >>> 0) >> 0) << 6 >> 0)) | (((c3 & 63) >>> 0) >> 0); + if (r <= 65535 || 1114111 < r) { + _tmp$42 = 65533; _tmp$43 = 1; _tmp$44 = false; r = _tmp$42; size = _tmp$43; short$1 = _tmp$44; + return [r, size, short$1]; + } + _tmp$45 = r; _tmp$46 = 4; _tmp$47 = false; r = _tmp$45; size = _tmp$46; short$1 = _tmp$47; + return [r, size, short$1]; + } + _tmp$48 = 65533; _tmp$49 = 1; _tmp$50 = false; r = _tmp$48; size = _tmp$49; short$1 = _tmp$50; + return [r, size, short$1]; + }; + DecodeRune = $pkg.DecodeRune = function(p) { + var _tuple, p, r = 0, size = 0; + _tuple = decodeRuneInternal(p); r = _tuple[0]; size = _tuple[1]; + return [r, size]; + }; + DecodeRuneInString = $pkg.DecodeRuneInString = function(s) { + var _tuple, r = 0, s, size = 0; + _tuple = decodeRuneInStringInternal(s); r = _tuple[0]; size = _tuple[1]; + return [r, size]; + }; + DecodeLastRune = $pkg.DecodeLastRune = function(p) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, end, lim, p, r = 0, size = 0, start; + end = p.$length; + if (end === 0) { + _tmp = 65533; _tmp$1 = 0; r = _tmp; size = _tmp$1; + return [r, size]; + } + start = end - 1 >> 0; + r = (((start < 0 || start >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + start]) >> 0); + if (r < 128) { + _tmp$2 = r; _tmp$3 = 1; r = _tmp$2; size = _tmp$3; + return [r, size]; + } + lim = end - 4 >> 0; + if (lim < 0) { + lim = 0; + } + start = start - (1) >> 0; + while (true) { + if (!(start >= lim)) { break; } + if (RuneStart(((start < 0 || start >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + start]))) { + break; + } + start = start - (1) >> 0; + } + if (start < 0) { + start = 0; + } + _tuple = DecodeRune($subslice(p, start, end)); r = _tuple[0]; size = _tuple[1]; + if (!(((start + size >> 0) === end))) { + _tmp$4 = 65533; _tmp$5 = 1; r = _tmp$4; size = _tmp$5; + return [r, size]; + } + _tmp$6 = r; _tmp$7 = size; r = _tmp$6; size = _tmp$7; + return [r, size]; + }; + DecodeLastRuneInString = $pkg.DecodeLastRuneInString = function(s) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, end, lim, r = 0, s, size = 0, start; + end = s.length; + if (end === 0) { + _tmp = 65533; _tmp$1 = 0; r = _tmp; size = _tmp$1; + return [r, size]; + } + start = end - 1 >> 0; + r = (s.charCodeAt(start) >> 0); + if (r < 128) { + _tmp$2 = r; _tmp$3 = 1; r = _tmp$2; size = _tmp$3; + return [r, size]; + } + lim = end - 4 >> 0; + if (lim < 0) { + lim = 0; + } + start = start - (1) >> 0; + while (true) { + if (!(start >= lim)) { break; } + if (RuneStart(s.charCodeAt(start))) { + break; + } + start = start - (1) >> 0; + } + if (start < 0) { + start = 0; + } + _tuple = DecodeRuneInString(s.substring(start, end)); r = _tuple[0]; size = _tuple[1]; + if (!(((start + size >> 0) === end))) { + _tmp$4 = 65533; _tmp$5 = 1; r = _tmp$4; size = _tmp$5; + return [r, size]; + } + _tmp$6 = r; _tmp$7 = size; r = _tmp$6; size = _tmp$7; + return [r, size]; + }; + RuneLen = $pkg.RuneLen = function(r) { + var r; + if (r < 0) { + return -1; + } else if (r <= 127) { + return 1; + } else if (r <= 2047) { + return 2; + } else if (55296 <= r && r <= 57343) { + return -1; + } else if (r <= 65535) { + return 3; + } else if (r <= 1114111) { + return 4; + } + return -1; + }; + EncodeRune = $pkg.EncodeRune = function(p, r) { + var i, p, r; + i = (r >>> 0); + if (i <= 127) { + (0 < 0 || 0 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 0] = (r << 24 >>> 24); + return 1; + } else if (i <= 2047) { + (0 < 0 || 0 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 0] = (192 | ((r >> 6 >> 0) << 24 >>> 24)) >>> 0; + (1 < 0 || 1 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 1] = (128 | (((r << 24 >>> 24) & 63) >>> 0)) >>> 0; + return 2; + } else if (i > 1114111 || 55296 <= i && i <= 57343) { + r = 65533; + (0 < 0 || 0 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 0] = (224 | ((r >> 12 >> 0) << 24 >>> 24)) >>> 0; + (1 < 0 || 1 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 1] = (128 | ((((r >> 6 >> 0) << 24 >>> 24) & 63) >>> 0)) >>> 0; + (2 < 0 || 2 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 2] = (128 | (((r << 24 >>> 24) & 63) >>> 0)) >>> 0; + return 3; + } else if (i <= 65535) { + (0 < 0 || 0 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 0] = (224 | ((r >> 12 >> 0) << 24 >>> 24)) >>> 0; + (1 < 0 || 1 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 1] = (128 | ((((r >> 6 >> 0) << 24 >>> 24) & 63) >>> 0)) >>> 0; + (2 < 0 || 2 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 2] = (128 | (((r << 24 >>> 24) & 63) >>> 0)) >>> 0; + return 3; + } else { + (0 < 0 || 0 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 0] = (240 | ((r >> 18 >> 0) << 24 >>> 24)) >>> 0; + (1 < 0 || 1 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 1] = (128 | ((((r >> 12 >> 0) << 24 >>> 24) & 63) >>> 0)) >>> 0; + (2 < 0 || 2 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 2] = (128 | ((((r >> 6 >> 0) << 24 >>> 24) & 63) >>> 0)) >>> 0; + (3 < 0 || 3 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 3] = (128 | (((r << 24 >>> 24) & 63) >>> 0)) >>> 0; + return 4; + } + }; + RuneCount = $pkg.RuneCount = function(p) { + var _tuple, i, n, p, size; + i = 0; + n = 0; + n = 0; + while (true) { + if (!(i < p.$length)) { break; } + if (((i < 0 || i >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + i]) < 128) { + i = i + (1) >> 0; + } else { + _tuple = DecodeRune($subslice(p, i)); size = _tuple[1]; + i = i + (size) >> 0; + } + n = n + (1) >> 0; + } + return n; + }; + RuneCountInString = $pkg.RuneCountInString = function(s) { + var _i, _ref, _rune, n = 0, s; + _ref = s; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + n = n + (1) >> 0; + _i += _rune[1]; + } + return n; + }; + RuneStart = $pkg.RuneStart = function(b) { + var b; + return !((((b & 192) >>> 0) === 128)); + }; + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_utf8 = function() { while (true) { switch ($s) { case 0: + /* */ } return; } }; $init_utf8.$blocking = true; return $init_utf8; + }; + return $pkg; +})(); +$packages["bytes"] = (function() { + var $pkg = {}, errors, io, unicode, utf8, Buffer, readOp, ptrType, sliceType, arrayType, arrayType$1, sliceType$1, IndexByte, Equal, makeSlice, NewBuffer, explode, Count, Index, LastIndex, genSplit, Split, Join, HasPrefix, Map, ToLower, TrimLeftFunc, TrimRightFunc, TrimFunc, indexFunc, lastIndexFunc, TrimSpace; + errors = $packages["errors"]; + io = $packages["io"]; + unicode = $packages["unicode"]; + utf8 = $packages["unicode/utf8"]; + Buffer = $pkg.Buffer = $newType(0, $kindStruct, "bytes.Buffer", "Buffer", "bytes", function(buf_, off_, runeBytes_, bootstrap_, lastRead_) { + this.$val = this; + this.buf = buf_ !== undefined ? buf_ : sliceType.nil; + this.off = off_ !== undefined ? off_ : 0; + this.runeBytes = runeBytes_ !== undefined ? runeBytes_ : arrayType.zero(); + this.bootstrap = bootstrap_ !== undefined ? bootstrap_ : arrayType$1.zero(); + this.lastRead = lastRead_ !== undefined ? lastRead_ : 0; + }); + readOp = $pkg.readOp = $newType(4, $kindInt, "bytes.readOp", "readOp", "bytes", null); + ptrType = $ptrType(Buffer); + sliceType = $sliceType($Uint8); + arrayType = $arrayType($Uint8, 4); + arrayType$1 = $arrayType($Uint8, 64); + sliceType$1 = $sliceType(sliceType); + IndexByte = $pkg.IndexByte = function(s, c) { + var _i, _ref, b, c, i, s; + _ref = s; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + b = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (b === c) { + return i; + } + _i++; + } + return -1; + }; + Equal = $pkg.Equal = function(a, b) { + var _i, _ref, a, b, c, i; + if (!((a.$length === b.$length))) { + return false; + } + _ref = a; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + c = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (!((c === ((i < 0 || i >= b.$length) ? $throwRuntimeError("index out of range") : b.$array[b.$offset + i])))) { + return false; + } + _i++; + } + return true; + }; + Buffer.ptr.prototype.Bytes = function() { + var b; + b = this; + return $subslice(b.buf, b.off); + }; + Buffer.prototype.Bytes = function() { return this.$val.Bytes(); }; + Buffer.ptr.prototype.String = function() { + var b; + b = this; + if (b === ptrType.nil) { + return ""; + } + return $bytesToString($subslice(b.buf, b.off)); + }; + Buffer.prototype.String = function() { return this.$val.String(); }; + Buffer.ptr.prototype.Len = function() { + var b; + b = this; + return b.buf.$length - b.off >> 0; + }; + Buffer.prototype.Len = function() { return this.$val.Len(); }; + Buffer.ptr.prototype.Truncate = function(n) { + var b, n; + b = this; + b.lastRead = 0; + if (n < 0 || n > b.Len()) { + $panic(new $String("bytes.Buffer: truncation out of range")); + } else if (n === 0) { + b.off = 0; + } + b.buf = $subslice(b.buf, 0, (b.off + n >> 0)); + }; + Buffer.prototype.Truncate = function(n) { return this.$val.Truncate(n); }; + Buffer.ptr.prototype.Reset = function() { + var b; + b = this; + b.Truncate(0); + }; + Buffer.prototype.Reset = function() { return this.$val.Reset(); }; + Buffer.ptr.prototype.grow = function(n) { + var _q, b, buf, m, n; + b = this; + m = b.Len(); + if ((m === 0) && !((b.off === 0))) { + b.Truncate(0); + } + if ((b.buf.$length + n >> 0) > b.buf.$capacity) { + buf = sliceType.nil; + if (b.buf === sliceType.nil && n <= 64) { + buf = $subslice(new sliceType(b.bootstrap), 0); + } else if ((m + n >> 0) <= (_q = b.buf.$capacity / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))) { + $copySlice(b.buf, $subslice(b.buf, b.off)); + buf = $subslice(b.buf, 0, m); + } else { + buf = makeSlice((2 * b.buf.$capacity >> 0) + n >> 0); + $copySlice(buf, $subslice(b.buf, b.off)); + } + b.buf = buf; + b.off = 0; + } + b.buf = $subslice(b.buf, 0, ((b.off + m >> 0) + n >> 0)); + return b.off + m >> 0; + }; + Buffer.prototype.grow = function(n) { return this.$val.grow(n); }; + Buffer.ptr.prototype.Grow = function(n) { + var b, m, n; + b = this; + if (n < 0) { + $panic(new $String("bytes.Buffer.Grow: negative count")); + } + m = b.grow(n); + b.buf = $subslice(b.buf, 0, m); + }; + Buffer.prototype.Grow = function(n) { return this.$val.Grow(n); }; + Buffer.ptr.prototype.Write = function(p) { + var _tmp, _tmp$1, b, err = $ifaceNil, m, n = 0, p; + b = this; + b.lastRead = 0; + m = b.grow(p.$length); + _tmp = $copySlice($subslice(b.buf, m), p); _tmp$1 = $ifaceNil; n = _tmp; err = _tmp$1; + return [n, err]; + }; + Buffer.prototype.Write = function(p) { return this.$val.Write(p); }; + Buffer.ptr.prototype.WriteString = function(s) { + var _tmp, _tmp$1, b, err = $ifaceNil, m, n = 0, s; + b = this; + b.lastRead = 0; + m = b.grow(s.length); + _tmp = $copyString($subslice(b.buf, m), s); _tmp$1 = $ifaceNil; n = _tmp; err = _tmp$1; + return [n, err]; + }; + Buffer.prototype.WriteString = function(s) { return this.$val.WriteString(s); }; + Buffer.ptr.prototype.ReadFrom = function(r) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, e, err = $ifaceNil, free, m, n = new $Int64(0, 0), newBuf, r, x; + b = this; + b.lastRead = 0; + if (b.off >= b.buf.$length) { + b.Truncate(0); + } + while (true) { + if (!(true)) { break; } + free = b.buf.$capacity - b.buf.$length >> 0; + if (free < 512) { + newBuf = b.buf; + if ((b.off + free >> 0) < 512) { + newBuf = makeSlice((2 * b.buf.$capacity >> 0) + 512 >> 0); + } + $copySlice(newBuf, $subslice(b.buf, b.off)); + b.buf = $subslice(newBuf, 0, (b.buf.$length - b.off >> 0)); + b.off = 0; + } + _tuple = r.Read($subslice(b.buf, b.buf.$length, b.buf.$capacity)); m = _tuple[0]; e = _tuple[1]; + b.buf = $subslice(b.buf, 0, (b.buf.$length + m >> 0)); + n = (x = new $Int64(0, m), new $Int64(n.$high + x.$high, n.$low + x.$low)); + if ($interfaceIsEqual(e, io.EOF)) { + break; + } + if (!($interfaceIsEqual(e, $ifaceNil))) { + _tmp = n; _tmp$1 = e; n = _tmp; err = _tmp$1; + return [n, err]; + } + } + _tmp$2 = n; _tmp$3 = $ifaceNil; n = _tmp$2; err = _tmp$3; + return [n, err]; + }; + Buffer.prototype.ReadFrom = function(r) { return this.$val.ReadFrom(r); }; + makeSlice = function(n) { + var $deferred = [], $err = null, n; + /* */ try { $deferFrames.push($deferred); + $deferred.push([(function() { + if (!($interfaceIsEqual($recover(), $ifaceNil))) { + $panic($pkg.ErrTooLarge); + } + }), []]); + return $makeSlice(sliceType, n); + /* */ } catch(err) { $err = err; return sliceType.nil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + Buffer.ptr.prototype.WriteTo = function(w) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, e, err = $ifaceNil, m, n = new $Int64(0, 0), nBytes, w; + b = this; + b.lastRead = 0; + if (b.off < b.buf.$length) { + nBytes = b.Len(); + _tuple = w.Write($subslice(b.buf, b.off)); m = _tuple[0]; e = _tuple[1]; + if (m > nBytes) { + $panic(new $String("bytes.Buffer.WriteTo: invalid Write count")); + } + b.off = b.off + (m) >> 0; + n = new $Int64(0, m); + if (!($interfaceIsEqual(e, $ifaceNil))) { + _tmp = n; _tmp$1 = e; n = _tmp; err = _tmp$1; + return [n, err]; + } + if (!((m === nBytes))) { + _tmp$2 = n; _tmp$3 = io.ErrShortWrite; n = _tmp$2; err = _tmp$3; + return [n, err]; + } + } + b.Truncate(0); + return [n, err]; + }; + Buffer.prototype.WriteTo = function(w) { return this.$val.WriteTo(w); }; + Buffer.ptr.prototype.WriteByte = function(c) { + var b, c, m, x; + b = this; + b.lastRead = 0; + m = b.grow(1); + (x = b.buf, (m < 0 || m >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + m] = c); + return $ifaceNil; + }; + Buffer.prototype.WriteByte = function(c) { return this.$val.WriteByte(c); }; + Buffer.ptr.prototype.WriteRune = function(r) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, b, err = $ifaceNil, n = 0, r; + b = this; + if (r < 128) { + b.WriteByte((r << 24 >>> 24)); + _tmp = 1; _tmp$1 = $ifaceNil; n = _tmp; err = _tmp$1; + return [n, err]; + } + n = utf8.EncodeRune($subslice(new sliceType(b.runeBytes), 0), r); + b.Write($subslice(new sliceType(b.runeBytes), 0, n)); + _tmp$2 = n; _tmp$3 = $ifaceNil; n = _tmp$2; err = _tmp$3; + return [n, err]; + }; + Buffer.prototype.WriteRune = function(r) { return this.$val.WriteRune(r); }; + Buffer.ptr.prototype.Read = function(p) { + var _tmp, _tmp$1, b, err = $ifaceNil, n = 0, p; + b = this; + b.lastRead = 0; + if (b.off >= b.buf.$length) { + b.Truncate(0); + if (p.$length === 0) { + return [n, err]; + } + _tmp = 0; _tmp$1 = io.EOF; n = _tmp; err = _tmp$1; + return [n, err]; + } + n = $copySlice(p, $subslice(b.buf, b.off)); + b.off = b.off + (n) >> 0; + if (n > 0) { + b.lastRead = 2; + } + return [n, err]; + }; + Buffer.prototype.Read = function(p) { return this.$val.Read(p); }; + Buffer.ptr.prototype.Next = function(n) { + var b, data, m, n; + b = this; + b.lastRead = 0; + m = b.Len(); + if (n > m) { + n = m; + } + data = $subslice(b.buf, b.off, (b.off + n >> 0)); + b.off = b.off + (n) >> 0; + if (n > 0) { + b.lastRead = 2; + } + return data; + }; + Buffer.prototype.Next = function(n) { return this.$val.Next(n); }; + Buffer.ptr.prototype.ReadByte = function() { + var _tmp, _tmp$1, _tmp$2, _tmp$3, b, c = 0, err = $ifaceNil, x, x$1; + b = this; + b.lastRead = 0; + if (b.off >= b.buf.$length) { + b.Truncate(0); + _tmp = 0; _tmp$1 = io.EOF; c = _tmp; err = _tmp$1; + return [c, err]; + } + c = (x = b.buf, x$1 = b.off, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])); + b.off = b.off + (1) >> 0; + b.lastRead = 2; + _tmp$2 = c; _tmp$3 = $ifaceNil; c = _tmp$2; err = _tmp$3; + return [c, err]; + }; + Buffer.prototype.ReadByte = function() { return this.$val.ReadByte(); }; + Buffer.ptr.prototype.ReadRune = function() { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, b, c, err = $ifaceNil, n, r = 0, size = 0, x, x$1; + b = this; + b.lastRead = 0; + if (b.off >= b.buf.$length) { + b.Truncate(0); + _tmp = 0; _tmp$1 = 0; _tmp$2 = io.EOF; r = _tmp; size = _tmp$1; err = _tmp$2; + return [r, size, err]; + } + b.lastRead = 1; + c = (x = b.buf, x$1 = b.off, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])); + if (c < 128) { + b.off = b.off + (1) >> 0; + _tmp$3 = (c >> 0); _tmp$4 = 1; _tmp$5 = $ifaceNil; r = _tmp$3; size = _tmp$4; err = _tmp$5; + return [r, size, err]; + } + _tuple = utf8.DecodeRune($subslice(b.buf, b.off)); r = _tuple[0]; n = _tuple[1]; + b.off = b.off + (n) >> 0; + _tmp$6 = r; _tmp$7 = n; _tmp$8 = $ifaceNil; r = _tmp$6; size = _tmp$7; err = _tmp$8; + return [r, size, err]; + }; + Buffer.prototype.ReadRune = function() { return this.$val.ReadRune(); }; + Buffer.ptr.prototype.UnreadRune = function() { + var _tuple, b, n; + b = this; + if (!((b.lastRead === 1))) { + return errors.New("bytes.Buffer: UnreadRune: previous operation was not ReadRune"); + } + b.lastRead = 0; + if (b.off > 0) { + _tuple = utf8.DecodeLastRune($subslice(b.buf, 0, b.off)); n = _tuple[1]; + b.off = b.off - (n) >> 0; + } + return $ifaceNil; + }; + Buffer.prototype.UnreadRune = function() { return this.$val.UnreadRune(); }; + Buffer.ptr.prototype.UnreadByte = function() { + var b; + b = this; + if (!((b.lastRead === 1)) && !((b.lastRead === 2))) { + return errors.New("bytes.Buffer: UnreadByte: previous operation was not a read"); + } + b.lastRead = 0; + if (b.off > 0) { + b.off = b.off - (1) >> 0; + } + return $ifaceNil; + }; + Buffer.prototype.UnreadByte = function() { return this.$val.UnreadByte(); }; + Buffer.ptr.prototype.ReadBytes = function(delim) { + var _tuple, b, delim, err = $ifaceNil, line = sliceType.nil, slice; + b = this; + _tuple = b.readSlice(delim); slice = _tuple[0]; err = _tuple[1]; + line = $appendSlice(line, slice); + return [line, err]; + }; + Buffer.prototype.ReadBytes = function(delim) { return this.$val.ReadBytes(delim); }; + Buffer.ptr.prototype.readSlice = function(delim) { + var _tmp, _tmp$1, b, delim, end, err = $ifaceNil, i, line = sliceType.nil; + b = this; + i = IndexByte($subslice(b.buf, b.off), delim); + end = (b.off + i >> 0) + 1 >> 0; + if (i < 0) { + end = b.buf.$length; + err = io.EOF; + } + line = $subslice(b.buf, b.off, end); + b.off = end; + b.lastRead = 2; + _tmp = line; _tmp$1 = err; line = _tmp; err = _tmp$1; + return [line, err]; + }; + Buffer.prototype.readSlice = function(delim) { return this.$val.readSlice(delim); }; + Buffer.ptr.prototype.ReadString = function(delim) { + var _tmp, _tmp$1, _tuple, b, delim, err = $ifaceNil, line = "", slice; + b = this; + _tuple = b.readSlice(delim); slice = _tuple[0]; err = _tuple[1]; + _tmp = $bytesToString(slice); _tmp$1 = err; line = _tmp; err = _tmp$1; + return [line, err]; + }; + Buffer.prototype.ReadString = function(delim) { return this.$val.ReadString(delim); }; + NewBuffer = $pkg.NewBuffer = function(buf) { + var buf; + return new Buffer.ptr(buf, 0, arrayType.zero(), arrayType$1.zero(), 0); + }; + explode = function(s, n) { + var _tuple, a, n, na, s, size; + if (n <= 0) { + n = s.$length; + } + a = $makeSlice(sliceType$1, n); + size = 0; + na = 0; + while (true) { + if (!(s.$length > 0)) { break; } + if ((na + 1 >> 0) >= n) { + (na < 0 || na >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + na] = s; + na = na + (1) >> 0; + break; + } + _tuple = utf8.DecodeRune(s); size = _tuple[1]; + (na < 0 || na >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + na] = $subslice(s, 0, size); + s = $subslice(s, size); + na = na + (1) >> 0; + } + return $subslice(a, 0, na); + }; + Count = $pkg.Count = function(s, sep) { + var c, count, i, n, o, s, sep, t; + n = sep.$length; + if (n === 0) { + return utf8.RuneCount(s) + 1 >> 0; + } + if (n > s.$length) { + return 0; + } + count = 0; + c = ((0 < 0 || 0 >= sep.$length) ? $throwRuntimeError("index out of range") : sep.$array[sep.$offset + 0]); + i = 0; + t = $subslice(s, 0, ((s.$length - n >> 0) + 1 >> 0)); + while (true) { + if (!(i < t.$length)) { break; } + if (!((((i < 0 || i >= t.$length) ? $throwRuntimeError("index out of range") : t.$array[t.$offset + i]) === c))) { + o = IndexByte($subslice(t, i), c); + if (o < 0) { + break; + } + i = i + (o) >> 0; + } + if ((n === 1) || Equal($subslice(s, i, (i + n >> 0)), sep)) { + count = count + (1) >> 0; + i = i + (n) >> 0; + continue; + } + i = i + (1) >> 0; + } + return count; + }; + Index = $pkg.Index = function(s, sep) { + var c, i, n, o, s, sep, t; + n = sep.$length; + if (n === 0) { + return 0; + } + if (n > s.$length) { + return -1; + } + c = ((0 < 0 || 0 >= sep.$length) ? $throwRuntimeError("index out of range") : sep.$array[sep.$offset + 0]); + if (n === 1) { + return IndexByte(s, c); + } + i = 0; + t = $subslice(s, 0, ((s.$length - n >> 0) + 1 >> 0)); + while (true) { + if (!(i < t.$length)) { break; } + if (!((((i < 0 || i >= t.$length) ? $throwRuntimeError("index out of range") : t.$array[t.$offset + i]) === c))) { + o = IndexByte($subslice(t, i), c); + if (o < 0) { + break; + } + i = i + (o) >> 0; + } + if (Equal($subslice(s, i, (i + n >> 0)), sep)) { + return i; + } + i = i + (1) >> 0; + } + return -1; + }; + LastIndex = $pkg.LastIndex = function(s, sep) { + var c, i, n, s, sep; + n = sep.$length; + if (n === 0) { + return s.$length; + } + c = ((0 < 0 || 0 >= sep.$length) ? $throwRuntimeError("index out of range") : sep.$array[sep.$offset + 0]); + i = s.$length - n >> 0; + while (true) { + if (!(i >= 0)) { break; } + if ((((i < 0 || i >= s.$length) ? $throwRuntimeError("index out of range") : s.$array[s.$offset + i]) === c) && ((n === 1) || Equal($subslice(s, i, (i + n >> 0)), sep))) { + return i; + } + i = i - (1) >> 0; + } + return -1; + }; + genSplit = function(s, sep, sepSave, n) { + var a, c, i, n, na, s, sep, sepSave, start; + if (n === 0) { + return sliceType$1.nil; + } + if (sep.$length === 0) { + return explode(s, n); + } + if (n < 0) { + n = Count(s, sep) + 1 >> 0; + } + c = ((0 < 0 || 0 >= sep.$length) ? $throwRuntimeError("index out of range") : sep.$array[sep.$offset + 0]); + start = 0; + a = $makeSlice(sliceType$1, n); + na = 0; + i = 0; + while (true) { + if (!((i + sep.$length >> 0) <= s.$length && (na + 1 >> 0) < n)) { break; } + if ((((i < 0 || i >= s.$length) ? $throwRuntimeError("index out of range") : s.$array[s.$offset + i]) === c) && ((sep.$length === 1) || Equal($subslice(s, i, (i + sep.$length >> 0)), sep))) { + (na < 0 || na >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + na] = $subslice(s, start, (i + sepSave >> 0)); + na = na + (1) >> 0; + start = i + sep.$length >> 0; + i = i + ((sep.$length - 1 >> 0)) >> 0; + } + i = i + (1) >> 0; + } + (na < 0 || na >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + na] = $subslice(s, start); + return $subslice(a, 0, (na + 1 >> 0)); + }; + Split = $pkg.Split = function(s, sep) { + var s, sep; + return genSplit(s, sep, 0, -1); + }; + Join = $pkg.Join = function(s, sep) { + var _i, _i$1, _ref, _ref$1, b, bp, n, s, sep, v, v$1; + if (s.$length === 0) { + return new sliceType([]); + } + if (s.$length === 1) { + return $appendSlice(sliceType.nil, ((0 < 0 || 0 >= s.$length) ? $throwRuntimeError("index out of range") : s.$array[s.$offset + 0])); + } + n = sep.$length * ((s.$length - 1 >> 0)) >> 0; + _ref = s; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + v = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + n = n + (v.$length) >> 0; + _i++; + } + b = $makeSlice(sliceType, n); + bp = $copySlice(b, ((0 < 0 || 0 >= s.$length) ? $throwRuntimeError("index out of range") : s.$array[s.$offset + 0])); + _ref$1 = $subslice(s, 1); + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + v$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i$1]); + bp = bp + ($copySlice($subslice(b, bp), sep)) >> 0; + bp = bp + ($copySlice($subslice(b, bp), v$1)) >> 0; + _i$1++; + } + return b; + }; + HasPrefix = $pkg.HasPrefix = function(s, prefix) { + var prefix, s; + return s.$length >= prefix.$length && Equal($subslice(s, 0, prefix.$length), prefix); + }; + Map = $pkg.Map = function(mapping, s) { + var _tuple, b, i, mapping, maxbytes, nb, nbytes, r, rl, s, wid; + maxbytes = s.$length; + nbytes = 0; + b = $makeSlice(sliceType, maxbytes); + i = 0; + while (true) { + if (!(i < s.$length)) { break; } + wid = 1; + r = (((i < 0 || i >= s.$length) ? $throwRuntimeError("index out of range") : s.$array[s.$offset + i]) >> 0); + if (r >= 128) { + _tuple = utf8.DecodeRune($subslice(s, i)); r = _tuple[0]; wid = _tuple[1]; + } + r = mapping(r); + if (r >= 0) { + rl = utf8.RuneLen(r); + if (rl < 0) { + rl = 3; + } + if ((nbytes + rl >> 0) > maxbytes) { + maxbytes = (maxbytes * 2 >> 0) + 4 >> 0; + nb = $makeSlice(sliceType, maxbytes); + $copySlice(nb, $subslice(b, 0, nbytes)); + b = nb; + } + nbytes = nbytes + (utf8.EncodeRune($subslice(b, nbytes, maxbytes), r)) >> 0; + } + i = i + (wid) >> 0; + } + return $subslice(b, 0, nbytes); + }; + ToLower = $pkg.ToLower = function(s) { + var s; + return Map(unicode.ToLower, s); + }; + TrimLeftFunc = $pkg.TrimLeftFunc = function(s, f) { + var f, i, s; + i = indexFunc(s, f, false); + if (i === -1) { + return sliceType.nil; + } + return $subslice(s, i); + }; + TrimRightFunc = $pkg.TrimRightFunc = function(s, f) { + var _tuple, f, i, s, wid; + i = lastIndexFunc(s, f, false); + if (i >= 0 && ((i < 0 || i >= s.$length) ? $throwRuntimeError("index out of range") : s.$array[s.$offset + i]) >= 128) { + _tuple = utf8.DecodeRune($subslice(s, i)); wid = _tuple[1]; + i = i + (wid) >> 0; + } else { + i = i + (1) >> 0; + } + return $subslice(s, 0, i); + }; + TrimFunc = $pkg.TrimFunc = function(s, f) { + var f, s; + return TrimRightFunc(TrimLeftFunc(s, f), f); + }; + indexFunc = function(s, f, truth) { + var _tuple, f, r, s, start, truth, wid; + start = 0; + while (true) { + if (!(start < s.$length)) { break; } + wid = 1; + r = (((start < 0 || start >= s.$length) ? $throwRuntimeError("index out of range") : s.$array[s.$offset + start]) >> 0); + if (r >= 128) { + _tuple = utf8.DecodeRune($subslice(s, start)); r = _tuple[0]; wid = _tuple[1]; + } + if (f(r) === truth) { + return start; + } + start = start + (wid) >> 0; + } + return -1; + }; + lastIndexFunc = function(s, f, truth) { + var _tmp, _tmp$1, _tuple, f, i, r, s, size, truth, x; + i = s.$length; + while (true) { + if (!(i > 0)) { break; } + _tmp = ((x = i - 1 >> 0, ((x < 0 || x >= s.$length) ? $throwRuntimeError("index out of range") : s.$array[s.$offset + x])) >> 0); _tmp$1 = 1; r = _tmp; size = _tmp$1; + if (r >= 128) { + _tuple = utf8.DecodeLastRune($subslice(s, 0, i)); r = _tuple[0]; size = _tuple[1]; + } + i = i - (size) >> 0; + if (f(r) === truth) { + return i; + } + } + return -1; + }; + TrimSpace = $pkg.TrimSpace = function(s) { + var s; + return TrimFunc(s, unicode.IsSpace); + }; + ptrType.methods = [{prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([], [sliceType], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Truncate", name: "Truncate", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "grow", name: "grow", pkg: "bytes", typ: $funcType([$Int], [$Int], false)}, {prop: "Grow", name: "Grow", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}, {prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([io.Reader], [$Int64, $error], false)}, {prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([io.Writer], [$Int64, $error], false)}, {prop: "WriteByte", name: "WriteByte", pkg: "", typ: $funcType([$Uint8], [$error], false)}, {prop: "WriteRune", name: "WriteRune", pkg: "", typ: $funcType([$Int32], [$Int, $error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "Next", name: "Next", pkg: "", typ: $funcType([$Int], [sliceType], false)}, {prop: "ReadByte", name: "ReadByte", pkg: "", typ: $funcType([], [$Uint8, $error], false)}, {prop: "ReadRune", name: "ReadRune", pkg: "", typ: $funcType([], [$Int32, $Int, $error], false)}, {prop: "UnreadRune", name: "UnreadRune", pkg: "", typ: $funcType([], [$error], false)}, {prop: "UnreadByte", name: "UnreadByte", pkg: "", typ: $funcType([], [$error], false)}, {prop: "ReadBytes", name: "ReadBytes", pkg: "", typ: $funcType([$Uint8], [sliceType, $error], false)}, {prop: "readSlice", name: "readSlice", pkg: "bytes", typ: $funcType([$Uint8], [sliceType, $error], false)}, {prop: "ReadString", name: "ReadString", pkg: "", typ: $funcType([$Uint8], [$String, $error], false)}]; + Buffer.init([{prop: "buf", name: "buf", pkg: "bytes", typ: sliceType, tag: ""}, {prop: "off", name: "off", pkg: "bytes", typ: $Int, tag: ""}, {prop: "runeBytes", name: "runeBytes", pkg: "bytes", typ: arrayType, tag: ""}, {prop: "bootstrap", name: "bootstrap", pkg: "bytes", typ: arrayType$1, tag: ""}, {prop: "lastRead", name: "lastRead", pkg: "bytes", typ: readOp, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_bytes = function() { while (true) { switch ($s) { case 0: + $r = errors.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = io.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = unicode.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = utf8.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $pkg.ErrTooLarge = errors.New("bytes.Buffer: too large"); + /* */ } return; } }; $init_bytes.$blocking = true; return $init_bytes; + }; + return $pkg; +})(); +$packages["syscall"] = (function() { + var $pkg = {}, bytes, errors, js, runtime, sync, mmapper, Errno, _C_int, Timespec, Stat_t, Dirent, sliceType, sliceType$1, ptrType, sliceType$4, ptrType$10, arrayType$2, sliceType$9, arrayType$3, arrayType$4, structType, ptrType$24, mapType, funcType, funcType$1, ptrType$28, arrayType$8, arrayType$10, arrayType$12, warningPrinted, lineBuffer, syscallModule, alreadyTriedToLoad, minusOne, envOnce, envLock, env, envs, mapper, errors$1, init, printWarning, printToConsole, use, runtime_envs, syscall, Syscall, Syscall6, BytePtrFromString, copyenv, Getenv, CloseOnExec, itoa, uitoa, ByteSliceFromString, ReadDirent, Sysctl, nametomib, ParseDirent, Read, Write, sysctl, fcntl, Close, Exit, Fchdir, Fchmod, Fchown, Fstat, Fsync, Ftruncate, Getdirentries, Lstat, Open, Pread, Pwrite, read, Seek, write, mmap, munmap; + bytes = $packages["bytes"]; + errors = $packages["errors"]; + js = $packages["github.com/gopherjs/gopherjs/js"]; + runtime = $packages["runtime"]; + sync = $packages["sync"]; + mmapper = $pkg.mmapper = $newType(0, $kindStruct, "syscall.mmapper", "mmapper", "syscall", function(Mutex_, active_, mmap_, munmap_) { + this.$val = this; + this.Mutex = Mutex_ !== undefined ? Mutex_ : new sync.Mutex.ptr(); + this.active = active_ !== undefined ? active_ : false; + this.mmap = mmap_ !== undefined ? mmap_ : $throwNilPointerError; + this.munmap = munmap_ !== undefined ? munmap_ : $throwNilPointerError; + }); + Errno = $pkg.Errno = $newType(4, $kindUintptr, "syscall.Errno", "Errno", "syscall", null); + _C_int = $pkg._C_int = $newType(4, $kindInt32, "syscall._C_int", "_C_int", "syscall", null); + Timespec = $pkg.Timespec = $newType(0, $kindStruct, "syscall.Timespec", "Timespec", "syscall", function(Sec_, Nsec_) { + this.$val = this; + this.Sec = Sec_ !== undefined ? Sec_ : new $Int64(0, 0); + this.Nsec = Nsec_ !== undefined ? Nsec_ : new $Int64(0, 0); + }); + Stat_t = $pkg.Stat_t = $newType(0, $kindStruct, "syscall.Stat_t", "Stat_t", "syscall", function(Dev_, Mode_, Nlink_, Ino_, Uid_, Gid_, Rdev_, Pad_cgo_0_, Atimespec_, Mtimespec_, Ctimespec_, Birthtimespec_, Size_, Blocks_, Blksize_, Flags_, Gen_, Lspare_, Qspare_) { + this.$val = this; + this.Dev = Dev_ !== undefined ? Dev_ : 0; + this.Mode = Mode_ !== undefined ? Mode_ : 0; + this.Nlink = Nlink_ !== undefined ? Nlink_ : 0; + this.Ino = Ino_ !== undefined ? Ino_ : new $Uint64(0, 0); + this.Uid = Uid_ !== undefined ? Uid_ : 0; + this.Gid = Gid_ !== undefined ? Gid_ : 0; + this.Rdev = Rdev_ !== undefined ? Rdev_ : 0; + this.Pad_cgo_0 = Pad_cgo_0_ !== undefined ? Pad_cgo_0_ : arrayType$3.zero(); + this.Atimespec = Atimespec_ !== undefined ? Atimespec_ : new Timespec.ptr(); + this.Mtimespec = Mtimespec_ !== undefined ? Mtimespec_ : new Timespec.ptr(); + this.Ctimespec = Ctimespec_ !== undefined ? Ctimespec_ : new Timespec.ptr(); + this.Birthtimespec = Birthtimespec_ !== undefined ? Birthtimespec_ : new Timespec.ptr(); + this.Size = Size_ !== undefined ? Size_ : new $Int64(0, 0); + this.Blocks = Blocks_ !== undefined ? Blocks_ : new $Int64(0, 0); + this.Blksize = Blksize_ !== undefined ? Blksize_ : 0; + this.Flags = Flags_ !== undefined ? Flags_ : 0; + this.Gen = Gen_ !== undefined ? Gen_ : 0; + this.Lspare = Lspare_ !== undefined ? Lspare_ : 0; + this.Qspare = Qspare_ !== undefined ? Qspare_ : arrayType$8.zero(); + }); + Dirent = $pkg.Dirent = $newType(0, $kindStruct, "syscall.Dirent", "Dirent", "syscall", function(Ino_, Seekoff_, Reclen_, Namlen_, Type_, Name_, Pad_cgo_0_) { + this.$val = this; + this.Ino = Ino_ !== undefined ? Ino_ : new $Uint64(0, 0); + this.Seekoff = Seekoff_ !== undefined ? Seekoff_ : new $Uint64(0, 0); + this.Reclen = Reclen_ !== undefined ? Reclen_ : 0; + this.Namlen = Namlen_ !== undefined ? Namlen_ : 0; + this.Type = Type_ !== undefined ? Type_ : 0; + this.Name = Name_ !== undefined ? Name_ : arrayType$10.zero(); + this.Pad_cgo_0 = Pad_cgo_0_ !== undefined ? Pad_cgo_0_ : arrayType$12.zero(); + }); + sliceType = $sliceType($Uint8); + sliceType$1 = $sliceType($String); + ptrType = $ptrType($Uint8); + sliceType$4 = $sliceType(_C_int); + ptrType$10 = $ptrType($Uintptr); + arrayType$2 = $arrayType($Uint8, 32); + sliceType$9 = $sliceType($Uint8); + arrayType$3 = $arrayType($Uint8, 4); + arrayType$4 = $arrayType(_C_int, 14); + structType = $structType([{prop: "addr", name: "addr", pkg: "syscall", typ: $Uintptr, tag: ""}, {prop: "len", name: "len", pkg: "syscall", typ: $Int, tag: ""}, {prop: "cap", name: "cap", pkg: "syscall", typ: $Int, tag: ""}]); + ptrType$24 = $ptrType(mmapper); + mapType = $mapType(ptrType, sliceType); + funcType = $funcType([$Uintptr, $Uintptr, $Int, $Int, $Int, $Int64], [$Uintptr, $error], false); + funcType$1 = $funcType([$Uintptr, $Uintptr], [$error], false); + ptrType$28 = $ptrType(Timespec); + arrayType$8 = $arrayType($Int64, 2); + arrayType$10 = $arrayType($Int8, 1024); + arrayType$12 = $arrayType($Uint8, 3); + init = function() { + $flushConsole = (function() { + if (!((lineBuffer.$length === 0))) { + $global.console.log($externalize($bytesToString(lineBuffer), $String)); + lineBuffer = sliceType.nil; + } + }); + }; + printWarning = function() { + if (!warningPrinted) { + console.log("warning: system calls not available, see https://github.com/gopherjs/gopherjs/blob/master/doc/syscalls.md"); + } + warningPrinted = true; + }; + printToConsole = function(b) { + var b, goPrintToConsole, i; + goPrintToConsole = $global.goPrintToConsole; + if (!(goPrintToConsole === undefined)) { + goPrintToConsole(b); + return; + } + lineBuffer = $appendSlice(lineBuffer, b); + while (true) { + if (!(true)) { break; } + i = bytes.IndexByte(lineBuffer, 10); + if (i === -1) { + break; + } + $global.console.log($externalize($bytesToString($subslice(lineBuffer, 0, i)), $String)); + lineBuffer = $subslice(lineBuffer, (i + 1 >> 0)); + } + }; + use = function(p) { + var p; + }; + runtime_envs = function() { + var envkeys, envs$1, i, jsEnv, key, process; + process = $global.process; + if (process === undefined) { + return sliceType$1.nil; + } + jsEnv = process.env; + envkeys = $global.Object.keys(jsEnv); + envs$1 = $makeSlice(sliceType$1, $parseInt(envkeys.length)); + i = 0; + while (true) { + if (!(i < $parseInt(envkeys.length))) { break; } + key = $internalize(envkeys[i], $String); + (i < 0 || i >= envs$1.$length) ? $throwRuntimeError("index out of range") : envs$1.$array[envs$1.$offset + i] = key + "=" + $internalize(jsEnv[$externalize(key, $String)], $String); + i = i + (1) >> 0; + } + return envs$1; + }; + syscall = function(name) { + var $deferred = [], $err = null, name, require; + /* */ try { $deferFrames.push($deferred); + $deferred.push([(function() { + $recover(); + }), []]); + if (syscallModule === null) { + if (alreadyTriedToLoad) { + return null; + } + alreadyTriedToLoad = true; + require = $global.require; + if (require === undefined) { + $panic(new $String("")); + } + syscallModule = require($externalize("syscall", $String)); + } + return syscallModule[$externalize(name, $String)]; + /* */ } catch(err) { $err = err; return null; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + Syscall = $pkg.Syscall = function(trap, a1, a2, a3) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, a1, a2, a3, array, err = 0, f, r, r1 = 0, r2 = 0, slice, trap; + f = syscall("Syscall"); + if (!(f === null)) { + r = f(trap, a1, a2, a3); + _tmp = (($parseInt(r[0]) >> 0) >>> 0); _tmp$1 = (($parseInt(r[1]) >> 0) >>> 0); _tmp$2 = (($parseInt(r[2]) >> 0) >>> 0); r1 = _tmp; r2 = _tmp$1; err = _tmp$2; + return [r1, r2, err]; + } + if ((trap === 4) && ((a1 === 1) || (a1 === 2))) { + array = a2; + slice = $makeSlice(sliceType, $parseInt(array.length)); + slice.$array = array; + printToConsole(slice); + _tmp$3 = ($parseInt(array.length) >>> 0); _tmp$4 = 0; _tmp$5 = 0; r1 = _tmp$3; r2 = _tmp$4; err = _tmp$5; + return [r1, r2, err]; + } + printWarning(); + _tmp$6 = (minusOne >>> 0); _tmp$7 = 0; _tmp$8 = 13; r1 = _tmp$6; r2 = _tmp$7; err = _tmp$8; + return [r1, r2, err]; + }; + Syscall6 = $pkg.Syscall6 = function(trap, a1, a2, a3, a4, a5, a6) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, a1, a2, a3, a4, a5, a6, err = 0, f, r, r1 = 0, r2 = 0, trap; + f = syscall("Syscall6"); + if (!(f === null)) { + r = f(trap, a1, a2, a3, a4, a5, a6); + _tmp = (($parseInt(r[0]) >> 0) >>> 0); _tmp$1 = (($parseInt(r[1]) >> 0) >>> 0); _tmp$2 = (($parseInt(r[2]) >> 0) >>> 0); r1 = _tmp; r2 = _tmp$1; err = _tmp$2; + return [r1, r2, err]; + } + if (!((trap === 202))) { + printWarning(); + } + _tmp$3 = (minusOne >>> 0); _tmp$4 = 0; _tmp$5 = 13; r1 = _tmp$3; r2 = _tmp$4; err = _tmp$5; + return [r1, r2, err]; + }; + BytePtrFromString = $pkg.BytePtrFromString = function(s) { + var _i, _ref, array, b, i, s; + array = new ($global.Uint8Array)(s.length + 1 >> 0); + _ref = new sliceType($stringToBytes(s)); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + b = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (b === 0) { + return [ptrType.nil, new Errno(22)]; + } + array[i] = b; + _i++; + } + array[s.length] = 0; + return [array, $ifaceNil]; + }; + copyenv = function() { + var _entry, _i, _key, _ref, _tuple, i, j, key, ok, s; + env = new $Map(); + _ref = envs; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + s = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + j = 0; + while (true) { + if (!(j < s.length)) { break; } + if (s.charCodeAt(j) === 61) { + key = s.substring(0, j); + _tuple = (_entry = env[key], _entry !== undefined ? [_entry.v, true] : [0, false]); ok = _tuple[1]; + if (!ok) { + _key = key; (env || $throwRuntimeError("assignment to entry in nil map"))[_key] = { k: _key, v: i }; + } else { + (i < 0 || i >= envs.$length) ? $throwRuntimeError("index out of range") : envs.$array[envs.$offset + i] = ""; + } + break; + } + j = j + (1) >> 0; + } + _i++; + } + }; + Getenv = $pkg.Getenv = function(key, $b) { + var $args = arguments, $deferred = [], $err = null, $r, $s = 0, $this = this, _entry, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, found = false, i, i$1, ok, s, value = ""; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Getenv = function() { try { $deferFrames.push($deferred); s: while (true) { switch ($s) { case 0: + $r = envOnce.Do(copyenv, $BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + if (key.length === 0) { + _tmp = ""; _tmp$1 = false; value = _tmp; found = _tmp$1; + return [value, found]; + } + $r = envLock.RLock($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $deferred.push([$methodVal(envLock, "RUnlock"), [$BLOCKING]]); + _tuple = (_entry = env[key], _entry !== undefined ? [_entry.v, true] : [0, false]); i = _tuple[0]; ok = _tuple[1]; + if (!ok) { + _tmp$2 = ""; _tmp$3 = false; value = _tmp$2; found = _tmp$3; + return [value, found]; + } + s = ((i < 0 || i >= envs.$length) ? $throwRuntimeError("index out of range") : envs.$array[envs.$offset + i]); + i$1 = 0; + while (true) { + if (!(i$1 < s.length)) { break; } + if (s.charCodeAt(i$1) === 61) { + _tmp$4 = s.substring((i$1 + 1 >> 0)); _tmp$5 = true; value = _tmp$4; found = _tmp$5; + return [value, found]; + } + i$1 = i$1 + (1) >> 0; + } + _tmp$6 = ""; _tmp$7 = false; value = _tmp$6; found = _tmp$7; + return [value, found]; + /* */ case -1: } return; } } catch(err) { $err = err; } finally { $deferFrames.pop(); if ($curGoroutine.asleep && !$jumpToDefer) { throw null; } $s = -1; $callDeferred($deferred, $err); return [value, found]; } }; $blocking_Getenv.$blocking = true; return $blocking_Getenv; + }; + CloseOnExec = $pkg.CloseOnExec = function(fd) { + var fd; + fcntl(fd, 2, 1); + }; + itoa = function(val) { + var val; + if (val < 0) { + return "-" + uitoa((-val >>> 0)); + } + return uitoa((val >>> 0)); + }; + uitoa = function(val) { + var _q, _r, buf, i, val; + buf = $clone(arrayType$2.zero(), arrayType$2); + i = 31; + while (true) { + if (!(val >= 10)) { break; } + (i < 0 || i >= buf.length) ? $throwRuntimeError("index out of range") : buf[i] = (((_r = val % 10, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) + 48 >>> 0) << 24 >>> 24); + i = i - (1) >> 0; + val = (_q = val / (10), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); + } + (i < 0 || i >= buf.length) ? $throwRuntimeError("index out of range") : buf[i] = ((val + 48 >>> 0) << 24 >>> 24); + return $bytesToString($subslice(new sliceType(buf), i)); + }; + ByteSliceFromString = $pkg.ByteSliceFromString = function(s) { + var a, i, s; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + if (s.charCodeAt(i) === 0) { + return [sliceType.nil, new Errno(22)]; + } + i = i + (1) >> 0; + } + a = $makeSlice(sliceType, (s.length + 1 >> 0)); + $copyString(a, s); + return [a, $ifaceNil]; + }; + Timespec.ptr.prototype.Unix = function() { + var _tmp, _tmp$1, nsec = new $Int64(0, 0), sec = new $Int64(0, 0), ts; + ts = this; + _tmp = ts.Sec; _tmp$1 = ts.Nsec; sec = _tmp; nsec = _tmp$1; + return [sec, nsec]; + }; + Timespec.prototype.Unix = function() { return this.$val.Unix(); }; + Timespec.ptr.prototype.Nano = function() { + var ts, x, x$1; + ts = this; + return (x = $mul64(ts.Sec, new $Int64(0, 1000000000)), x$1 = ts.Nsec, new $Int64(x.$high + x$1.$high, x.$low + x$1.$low)); + }; + Timespec.prototype.Nano = function() { return this.$val.Nano(); }; + ReadDirent = $pkg.ReadDirent = function(fd, buf) { + var _tuple, base, buf, err = $ifaceNil, fd, n = 0; + base = new Uint8Array(8); + _tuple = Getdirentries(fd, buf, base); n = _tuple[0]; err = _tuple[1]; + if (true && ($interfaceIsEqual(err, new Errno(22)) || $interfaceIsEqual(err, new Errno(2)))) { + err = $ifaceNil; + } + return [n, err]; + }; + Sysctl = $pkg.Sysctl = function(name) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, buf, err = $ifaceNil, mib, n, name, value = "", x; + _tuple = nametomib(name); mib = _tuple[0]; err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = ""; _tmp$1 = err; value = _tmp; err = _tmp$1; + return [value, err]; + } + n = 0; + err = sysctl(mib, ptrType.nil, new ptrType$10(function() { return n; }, function($v) { n = $v; }), ptrType.nil, 0); + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$2 = ""; _tmp$3 = err; value = _tmp$2; err = _tmp$3; + return [value, err]; + } + if (n === 0) { + _tmp$4 = ""; _tmp$5 = $ifaceNil; value = _tmp$4; err = _tmp$5; + return [value, err]; + } + buf = $makeSlice(sliceType, n); + err = sysctl(mib, new ptrType(function() { return ((0 < 0 || 0 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + 0]); }, function($v) { (0 < 0 || 0 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + 0] = $v; }, buf), new ptrType$10(function() { return n; }, function($v) { n = $v; }), ptrType.nil, 0); + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$6 = ""; _tmp$7 = err; value = _tmp$6; err = _tmp$7; + return [value, err]; + } + if (n > 0 && ((x = n - 1 >>> 0, ((x < 0 || x >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + x])) === 0)) { + n = n - (1) >>> 0; + } + _tmp$8 = $bytesToString($subslice(buf, 0, n)); _tmp$9 = $ifaceNil; value = _tmp$8; err = _tmp$9; + return [value, err]; + }; + nametomib = function(name) { + var _q, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, buf, bytes$1, err = $ifaceNil, mib = sliceType$4.nil, n, name, p; + buf = $clone(arrayType$4.zero(), arrayType$4); + n = 48; + p = $sliceToArray(new sliceType$9(buf)); + _tuple = ByteSliceFromString(name); bytes$1 = _tuple[0]; err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = sliceType$4.nil; _tmp$1 = err; mib = _tmp; err = _tmp$1; + return [mib, err]; + } + err = sysctl(new sliceType$4([0, 3]), p, new ptrType$10(function() { return n; }, function($v) { n = $v; }), new ptrType(function() { return ((0 < 0 || 0 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + 0]); }, function($v) { (0 < 0 || 0 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + 0] = $v; }, bytes$1), (name.length >>> 0)); + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$2 = sliceType$4.nil; _tmp$3 = err; mib = _tmp$2; err = _tmp$3; + return [mib, err]; + } + _tmp$4 = $subslice(new sliceType$4(buf), 0, (_q = n / 4, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero"))); _tmp$5 = $ifaceNil; mib = _tmp$4; err = _tmp$5; + return [mib, err]; + }; + ParseDirent = $pkg.ParseDirent = function(buf, max, names) { + var _array, _struct, _tmp, _tmp$1, _tmp$2, _view, buf, bytes$1, consumed = 0, count = 0, dirent, max, name, names, newnames = sliceType$1.nil, origlen, x; + origlen = buf.$length; + while (true) { + if (!(!((max === 0)) && buf.$length > 0)) { break; } + dirent = [undefined]; + dirent[0] = (_array = $sliceToArray(buf), _struct = new Dirent.ptr(), _view = new DataView(_array.buffer, _array.byteOffset), _struct.Ino = new $Uint64(_view.getUint32(4, true), _view.getUint32(0, true)), _struct.Seekoff = new $Uint64(_view.getUint32(12, true), _view.getUint32(8, true)), _struct.Reclen = _view.getUint16(16, true), _struct.Namlen = _view.getUint16(18, true), _struct.Type = _view.getUint8(20, true), _struct.Name = new ($nativeArray($kindInt8))(_array.buffer, $min(_array.byteOffset + 21, _array.buffer.byteLength)), _struct.Pad_cgo_0 = new ($nativeArray($kindUint8))(_array.buffer, $min(_array.byteOffset + 1045, _array.buffer.byteLength)), _struct); + if (dirent[0].Reclen === 0) { + buf = sliceType.nil; + break; + } + buf = $subslice(buf, dirent[0].Reclen); + if ((x = dirent[0].Ino, (x.$high === 0 && x.$low === 0))) { + continue; + } + bytes$1 = $sliceToArray(new sliceType$9(dirent[0].Name)); + name = $bytesToString($subslice(new sliceType(bytes$1), 0, dirent[0].Namlen)); + if (name === "." || name === "..") { + continue; + } + max = max - (1) >> 0; + count = count + (1) >> 0; + names = $append(names, name); + } + _tmp = origlen - buf.$length >> 0; _tmp$1 = count; _tmp$2 = names; consumed = _tmp; count = _tmp$1; newnames = _tmp$2; + return [consumed, count, newnames]; + }; + mmapper.ptr.prototype.Mmap = function(fd, offset, length, prot, flags, $b) { + var $args = arguments, $deferred = [], $err = null, $r, $s = 0, $this = this, _key, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, addr, b, data = sliceType.nil, err = $ifaceNil, errno, m, p, sl, x, x$1; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Mmap = function() { try { $deferFrames.push($deferred); s: while (true) { switch ($s) { case 0: + m = $this; + if (length <= 0) { + _tmp = sliceType.nil; _tmp$1 = new Errno(22); data = _tmp; err = _tmp$1; + return [data, err]; + } + _tuple = m.mmap(0, (length >>> 0), prot, flags, fd, offset); addr = _tuple[0]; errno = _tuple[1]; + if (!($interfaceIsEqual(errno, $ifaceNil))) { + _tmp$2 = sliceType.nil; _tmp$3 = errno; data = _tmp$2; err = _tmp$3; + return [data, err]; + } + sl = new structType.ptr(addr, length, length); + b = sl; + p = new ptrType(function() { return (x$1 = b.$capacity - 1 >> 0, ((x$1 < 0 || x$1 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + x$1])); }, function($v) { (x = b.$capacity - 1 >> 0, (x < 0 || x >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + x] = $v); }, b); + $r = m.Mutex.Lock($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $deferred.push([$methodVal(m.Mutex, "Unlock"), [$BLOCKING]]); + _key = p; (m.active || $throwRuntimeError("assignment to entry in nil map"))[_key.$key()] = { k: _key, v: b }; + _tmp$4 = b; _tmp$5 = $ifaceNil; data = _tmp$4; err = _tmp$5; + return [data, err]; + /* */ case -1: } return; } } catch(err) { $err = err; } finally { $deferFrames.pop(); if ($curGoroutine.asleep && !$jumpToDefer) { throw null; } $s = -1; $callDeferred($deferred, $err); return [data, err]; } }; $blocking_Mmap.$blocking = true; return $blocking_Mmap; + }; + mmapper.prototype.Mmap = function(fd, offset, length, prot, flags, $b) { return this.$val.Mmap(fd, offset, length, prot, flags, $b); }; + mmapper.ptr.prototype.Munmap = function(data, $b) { + var $args = arguments, $deferred = [], $err = null, $r, $s = 0, $this = this, _entry, b, err = $ifaceNil, errno, m, p, x, x$1; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Munmap = function() { try { $deferFrames.push($deferred); s: while (true) { switch ($s) { case 0: + m = $this; + if ((data.$length === 0) || !((data.$length === data.$capacity))) { + err = new Errno(22); + return err; + } + p = new ptrType(function() { return (x$1 = data.$capacity - 1 >> 0, ((x$1 < 0 || x$1 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + x$1])); }, function($v) { (x = data.$capacity - 1 >> 0, (x < 0 || x >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + x] = $v); }, data); + $r = m.Mutex.Lock($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $deferred.push([$methodVal(m.Mutex, "Unlock"), [$BLOCKING]]); + b = (_entry = m.active[p.$key()], _entry !== undefined ? _entry.v : sliceType.nil); + if (b === sliceType.nil || !($pointerIsEqual(new ptrType(function() { return ((0 < 0 || 0 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + 0]); }, function($v) { (0 < 0 || 0 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + 0] = $v; }, b), new ptrType(function() { return ((0 < 0 || 0 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + 0]); }, function($v) { (0 < 0 || 0 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + 0] = $v; }, data)))) { + err = new Errno(22); + return err; + } + errno = m.munmap($sliceToArray(b), (b.$length >>> 0)); + if (!($interfaceIsEqual(errno, $ifaceNil))) { + err = errno; + return err; + } + delete m.active[p.$key()]; + err = $ifaceNil; + return err; + /* */ case -1: } return; } } catch(err) { $err = err; } finally { $deferFrames.pop(); if ($curGoroutine.asleep && !$jumpToDefer) { throw null; } $s = -1; $callDeferred($deferred, $err); return err; } }; $blocking_Munmap.$blocking = true; return $blocking_Munmap; + }; + mmapper.prototype.Munmap = function(data, $b) { return this.$val.Munmap(data, $b); }; + Errno.prototype.Error = function() { + var e, s; + e = this.$val; + if (0 <= (e >> 0) && (e >> 0) < 106) { + s = ((e < 0 || e >= errors$1.length) ? $throwRuntimeError("index out of range") : errors$1[e]); + if (!(s === "")) { + return s; + } + } + return "errno " + itoa((e >> 0)); + }; + $ptrType(Errno).prototype.Error = function() { return new Errno(this.$get()).Error(); }; + Errno.prototype.Temporary = function() { + var e; + e = this.$val; + return (e === 4) || (e === 24) || (e === 54) || (e === 53) || new Errno(e).Timeout(); + }; + $ptrType(Errno).prototype.Temporary = function() { return new Errno(this.$get()).Temporary(); }; + Errno.prototype.Timeout = function() { + var e; + e = this.$val; + return (e === 35) || (e === 35) || (e === 60); + }; + $ptrType(Errno).prototype.Timeout = function() { return new Errno(this.$get()).Timeout(); }; + Read = $pkg.Read = function(fd, p) { + var _tuple, err = $ifaceNil, fd, n = 0, p; + _tuple = read(fd, p); n = _tuple[0]; err = _tuple[1]; + return [n, err]; + }; + Write = $pkg.Write = function(fd, p) { + var _tuple, err = $ifaceNil, fd, n = 0, p; + _tuple = write(fd, p); n = _tuple[0]; err = _tuple[1]; + return [n, err]; + }; + sysctl = function(mib, old, oldlen, new$1, newlen) { + var _p0, _tuple, e1, err = $ifaceNil, mib, new$1, newlen, old, oldlen; + _p0 = 0; + if (mib.$length > 0) { + _p0 = $sliceToArray(mib); + } else { + _p0 = new Uint8Array(0); + } + _tuple = Syscall6(202, _p0, (mib.$length >>> 0), old, oldlen, new$1, newlen); e1 = _tuple[2]; + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + fcntl = function(fd, cmd, arg) { + var _tuple, arg, cmd, e1, err = $ifaceNil, fd, r0, val = 0; + _tuple = Syscall(92, (fd >>> 0), (cmd >>> 0), (arg >>> 0)); r0 = _tuple[0]; e1 = _tuple[2]; + val = (r0 >> 0); + if (!((e1 === 0))) { + err = new Errno(e1); + } + return [val, err]; + }; + Close = $pkg.Close = function(fd) { + var _tuple, e1, err = $ifaceNil, fd; + _tuple = Syscall(6, (fd >>> 0), 0, 0); e1 = _tuple[2]; + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + Exit = $pkg.Exit = function(code) { + var code; + Syscall(1, (code >>> 0), 0, 0); + return; + }; + Fchdir = $pkg.Fchdir = function(fd) { + var _tuple, e1, err = $ifaceNil, fd; + _tuple = Syscall(13, (fd >>> 0), 0, 0); e1 = _tuple[2]; + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + Fchmod = $pkg.Fchmod = function(fd, mode) { + var _tuple, e1, err = $ifaceNil, fd, mode; + _tuple = Syscall(124, (fd >>> 0), (mode >>> 0), 0); e1 = _tuple[2]; + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + Fchown = $pkg.Fchown = function(fd, uid, gid) { + var _tuple, e1, err = $ifaceNil, fd, gid, uid; + _tuple = Syscall(123, (fd >>> 0), (uid >>> 0), (gid >>> 0)); e1 = _tuple[2]; + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + Fstat = $pkg.Fstat = function(fd, stat) { + var _array, _struct, _tuple, _view, e1, err = $ifaceNil, fd, stat; + _array = new Uint8Array(144); + _tuple = Syscall(339, (fd >>> 0), _array, 0); e1 = _tuple[2]; + _struct = stat, _view = new DataView(_array.buffer, _array.byteOffset), _struct.Dev = _view.getInt32(0, true), _struct.Mode = _view.getUint16(4, true), _struct.Nlink = _view.getUint16(6, true), _struct.Ino = new $Uint64(_view.getUint32(12, true), _view.getUint32(8, true)), _struct.Uid = _view.getUint32(16, true), _struct.Gid = _view.getUint32(20, true), _struct.Rdev = _view.getInt32(24, true), _struct.Pad_cgo_0 = new ($nativeArray($kindUint8))(_array.buffer, $min(_array.byteOffset + 28, _array.buffer.byteLength)), _struct.Atimespec.Sec = new $Int64(_view.getUint32(36, true), _view.getUint32(32, true)), _struct.Atimespec.Nsec = new $Int64(_view.getUint32(44, true), _view.getUint32(40, true)), _struct.Mtimespec.Sec = new $Int64(_view.getUint32(52, true), _view.getUint32(48, true)), _struct.Mtimespec.Nsec = new $Int64(_view.getUint32(60, true), _view.getUint32(56, true)), _struct.Ctimespec.Sec = new $Int64(_view.getUint32(68, true), _view.getUint32(64, true)), _struct.Ctimespec.Nsec = new $Int64(_view.getUint32(76, true), _view.getUint32(72, true)), _struct.Birthtimespec.Sec = new $Int64(_view.getUint32(84, true), _view.getUint32(80, true)), _struct.Birthtimespec.Nsec = new $Int64(_view.getUint32(92, true), _view.getUint32(88, true)), _struct.Size = new $Int64(_view.getUint32(100, true), _view.getUint32(96, true)), _struct.Blocks = new $Int64(_view.getUint32(108, true), _view.getUint32(104, true)), _struct.Blksize = _view.getInt32(112, true), _struct.Flags = _view.getUint32(116, true), _struct.Gen = _view.getUint32(120, true), _struct.Lspare = _view.getInt32(124, true), _struct.Qspare = new ($nativeArray($kindInt64))(_array.buffer, $min(_array.byteOffset + 128, _array.buffer.byteLength)); + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + Fsync = $pkg.Fsync = function(fd) { + var _tuple, e1, err = $ifaceNil, fd; + _tuple = Syscall(95, (fd >>> 0), 0, 0); e1 = _tuple[2]; + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + Ftruncate = $pkg.Ftruncate = function(fd, length) { + var _tuple, e1, err = $ifaceNil, fd, length; + _tuple = Syscall(201, (fd >>> 0), (length.$low >>> 0), 0); e1 = _tuple[2]; + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + Getdirentries = $pkg.Getdirentries = function(fd, buf, basep) { + var _p0, _tuple, basep, buf, e1, err = $ifaceNil, fd, n = 0, r0; + _p0 = 0; + if (buf.$length > 0) { + _p0 = $sliceToArray(buf); + } else { + _p0 = new Uint8Array(0); + } + _tuple = Syscall6(344, (fd >>> 0), _p0, (buf.$length >>> 0), basep, 0, 0); r0 = _tuple[0]; e1 = _tuple[2]; + n = (r0 >> 0); + if (!((e1 === 0))) { + err = new Errno(e1); + } + return [n, err]; + }; + Lstat = $pkg.Lstat = function(path, stat) { + var _array, _p0, _struct, _tuple, _tuple$1, _view, e1, err = $ifaceNil, path, stat; + _p0 = ptrType.nil; + _tuple = BytePtrFromString(path); _p0 = _tuple[0]; err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + _array = new Uint8Array(144); + _tuple$1 = Syscall(340, _p0, _array, 0); e1 = _tuple$1[2]; + _struct = stat, _view = new DataView(_array.buffer, _array.byteOffset), _struct.Dev = _view.getInt32(0, true), _struct.Mode = _view.getUint16(4, true), _struct.Nlink = _view.getUint16(6, true), _struct.Ino = new $Uint64(_view.getUint32(12, true), _view.getUint32(8, true)), _struct.Uid = _view.getUint32(16, true), _struct.Gid = _view.getUint32(20, true), _struct.Rdev = _view.getInt32(24, true), _struct.Pad_cgo_0 = new ($nativeArray($kindUint8))(_array.buffer, $min(_array.byteOffset + 28, _array.buffer.byteLength)), _struct.Atimespec.Sec = new $Int64(_view.getUint32(36, true), _view.getUint32(32, true)), _struct.Atimespec.Nsec = new $Int64(_view.getUint32(44, true), _view.getUint32(40, true)), _struct.Mtimespec.Sec = new $Int64(_view.getUint32(52, true), _view.getUint32(48, true)), _struct.Mtimespec.Nsec = new $Int64(_view.getUint32(60, true), _view.getUint32(56, true)), _struct.Ctimespec.Sec = new $Int64(_view.getUint32(68, true), _view.getUint32(64, true)), _struct.Ctimespec.Nsec = new $Int64(_view.getUint32(76, true), _view.getUint32(72, true)), _struct.Birthtimespec.Sec = new $Int64(_view.getUint32(84, true), _view.getUint32(80, true)), _struct.Birthtimespec.Nsec = new $Int64(_view.getUint32(92, true), _view.getUint32(88, true)), _struct.Size = new $Int64(_view.getUint32(100, true), _view.getUint32(96, true)), _struct.Blocks = new $Int64(_view.getUint32(108, true), _view.getUint32(104, true)), _struct.Blksize = _view.getInt32(112, true), _struct.Flags = _view.getUint32(116, true), _struct.Gen = _view.getUint32(120, true), _struct.Lspare = _view.getInt32(124, true), _struct.Qspare = new ($nativeArray($kindInt64))(_array.buffer, $min(_array.byteOffset + 128, _array.buffer.byteLength)); + use(_p0); + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + Open = $pkg.Open = function(path, mode, perm) { + var _p0, _tuple, _tuple$1, e1, err = $ifaceNil, fd = 0, mode, path, perm, r0; + _p0 = ptrType.nil; + _tuple = BytePtrFromString(path); _p0 = _tuple[0]; err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [fd, err]; + } + _tuple$1 = Syscall(5, _p0, (mode >>> 0), (perm >>> 0)); r0 = _tuple$1[0]; e1 = _tuple$1[2]; + use(_p0); + fd = (r0 >> 0); + if (!((e1 === 0))) { + err = new Errno(e1); + } + return [fd, err]; + }; + Pread = $pkg.Pread = function(fd, p, offset) { + var _p0, _tuple, e1, err = $ifaceNil, fd, n = 0, offset, p, r0; + _p0 = 0; + if (p.$length > 0) { + _p0 = $sliceToArray(p); + } else { + _p0 = new Uint8Array(0); + } + _tuple = Syscall6(153, (fd >>> 0), _p0, (p.$length >>> 0), (offset.$low >>> 0), 0, 0); r0 = _tuple[0]; e1 = _tuple[2]; + n = (r0 >> 0); + if (!((e1 === 0))) { + err = new Errno(e1); + } + return [n, err]; + }; + Pwrite = $pkg.Pwrite = function(fd, p, offset) { + var _p0, _tuple, e1, err = $ifaceNil, fd, n = 0, offset, p, r0; + _p0 = 0; + if (p.$length > 0) { + _p0 = $sliceToArray(p); + } else { + _p0 = new Uint8Array(0); + } + _tuple = Syscall6(154, (fd >>> 0), _p0, (p.$length >>> 0), (offset.$low >>> 0), 0, 0); r0 = _tuple[0]; e1 = _tuple[2]; + n = (r0 >> 0); + if (!((e1 === 0))) { + err = new Errno(e1); + } + return [n, err]; + }; + read = function(fd, p) { + var _p0, _tuple, e1, err = $ifaceNil, fd, n = 0, p, r0; + _p0 = 0; + if (p.$length > 0) { + _p0 = $sliceToArray(p); + } else { + _p0 = new Uint8Array(0); + } + _tuple = Syscall(3, (fd >>> 0), _p0, (p.$length >>> 0)); r0 = _tuple[0]; e1 = _tuple[2]; + n = (r0 >> 0); + if (!((e1 === 0))) { + err = new Errno(e1); + } + return [n, err]; + }; + Seek = $pkg.Seek = function(fd, offset, whence) { + var _tuple, e1, err = $ifaceNil, fd, newoffset = new $Int64(0, 0), offset, r0, whence; + _tuple = Syscall(199, (fd >>> 0), (offset.$low >>> 0), (whence >>> 0)); r0 = _tuple[0]; e1 = _tuple[2]; + newoffset = new $Int64(0, r0.constructor === Number ? r0 : 1); + if (!((e1 === 0))) { + err = new Errno(e1); + } + return [newoffset, err]; + }; + write = function(fd, p) { + var _p0, _tuple, e1, err = $ifaceNil, fd, n = 0, p, r0; + _p0 = 0; + if (p.$length > 0) { + _p0 = $sliceToArray(p); + } else { + _p0 = new Uint8Array(0); + } + _tuple = Syscall(4, (fd >>> 0), _p0, (p.$length >>> 0)); r0 = _tuple[0]; e1 = _tuple[2]; + n = (r0 >> 0); + if (!((e1 === 0))) { + err = new Errno(e1); + } + return [n, err]; + }; + mmap = function(addr, length, prot, flag, fd, pos) { + var _tuple, addr, e1, err = $ifaceNil, fd, flag, length, pos, prot, r0, ret = 0; + _tuple = Syscall6(197, addr, length, (prot >>> 0), (flag >>> 0), (fd >>> 0), (pos.$low >>> 0)); r0 = _tuple[0]; e1 = _tuple[2]; + ret = r0; + if (!((e1 === 0))) { + err = new Errno(e1); + } + return [ret, err]; + }; + munmap = function(addr, length) { + var _tuple, addr, e1, err = $ifaceNil, length; + _tuple = Syscall(73, addr, length, 0); e1 = _tuple[2]; + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + ptrType$24.methods = [{prop: "Mmap", name: "Mmap", pkg: "", typ: $funcType([$Int, $Int64, $Int, $Int, $Int], [sliceType, $error], false)}, {prop: "Munmap", name: "Munmap", pkg: "", typ: $funcType([sliceType], [$error], false)}]; + Errno.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}]; + ptrType$28.methods = [{prop: "Unix", name: "Unix", pkg: "", typ: $funcType([], [$Int64, $Int64], false)}, {prop: "Nano", name: "Nano", pkg: "", typ: $funcType([], [$Int64], false)}]; + mmapper.init([{prop: "Mutex", name: "", pkg: "", typ: sync.Mutex, tag: ""}, {prop: "active", name: "active", pkg: "syscall", typ: mapType, tag: ""}, {prop: "mmap", name: "mmap", pkg: "syscall", typ: funcType, tag: ""}, {prop: "munmap", name: "munmap", pkg: "syscall", typ: funcType$1, tag: ""}]); + Timespec.init([{prop: "Sec", name: "Sec", pkg: "", typ: $Int64, tag: ""}, {prop: "Nsec", name: "Nsec", pkg: "", typ: $Int64, tag: ""}]); + Stat_t.init([{prop: "Dev", name: "Dev", pkg: "", typ: $Int32, tag: ""}, {prop: "Mode", name: "Mode", pkg: "", typ: $Uint16, tag: ""}, {prop: "Nlink", name: "Nlink", pkg: "", typ: $Uint16, tag: ""}, {prop: "Ino", name: "Ino", pkg: "", typ: $Uint64, tag: ""}, {prop: "Uid", name: "Uid", pkg: "", typ: $Uint32, tag: ""}, {prop: "Gid", name: "Gid", pkg: "", typ: $Uint32, tag: ""}, {prop: "Rdev", name: "Rdev", pkg: "", typ: $Int32, tag: ""}, {prop: "Pad_cgo_0", name: "Pad_cgo_0", pkg: "", typ: arrayType$3, tag: ""}, {prop: "Atimespec", name: "Atimespec", pkg: "", typ: Timespec, tag: ""}, {prop: "Mtimespec", name: "Mtimespec", pkg: "", typ: Timespec, tag: ""}, {prop: "Ctimespec", name: "Ctimespec", pkg: "", typ: Timespec, tag: ""}, {prop: "Birthtimespec", name: "Birthtimespec", pkg: "", typ: Timespec, tag: ""}, {prop: "Size", name: "Size", pkg: "", typ: $Int64, tag: ""}, {prop: "Blocks", name: "Blocks", pkg: "", typ: $Int64, tag: ""}, {prop: "Blksize", name: "Blksize", pkg: "", typ: $Int32, tag: ""}, {prop: "Flags", name: "Flags", pkg: "", typ: $Uint32, tag: ""}, {prop: "Gen", name: "Gen", pkg: "", typ: $Uint32, tag: ""}, {prop: "Lspare", name: "Lspare", pkg: "", typ: $Int32, tag: ""}, {prop: "Qspare", name: "Qspare", pkg: "", typ: arrayType$8, tag: ""}]); + Dirent.init([{prop: "Ino", name: "Ino", pkg: "", typ: $Uint64, tag: ""}, {prop: "Seekoff", name: "Seekoff", pkg: "", typ: $Uint64, tag: ""}, {prop: "Reclen", name: "Reclen", pkg: "", typ: $Uint16, tag: ""}, {prop: "Namlen", name: "Namlen", pkg: "", typ: $Uint16, tag: ""}, {prop: "Type", name: "Type", pkg: "", typ: $Uint8, tag: ""}, {prop: "Name", name: "Name", pkg: "", typ: arrayType$10, tag: ""}, {prop: "Pad_cgo_0", name: "Pad_cgo_0", pkg: "", typ: arrayType$12, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_syscall = function() { while (true) { switch ($s) { case 0: + $r = bytes.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = errors.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = js.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = runtime.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = sync.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + lineBuffer = sliceType.nil; + envOnce = new sync.Once.ptr(); + envLock = new sync.RWMutex.ptr(); + env = false; + warningPrinted = false; + syscallModule = null; + alreadyTriedToLoad = false; + minusOne = -1; + envs = runtime_envs(); + $pkg.Stdin = 0; + $pkg.Stdout = 1; + $pkg.Stderr = 2; + errors$1 = $toNativeArray($kindString, ["", "operation not permitted", "no such file or directory", "no such process", "interrupted system call", "input/output error", "device not configured", "argument list too long", "exec format error", "bad file descriptor", "no child processes", "resource deadlock avoided", "cannot allocate memory", "permission denied", "bad address", "block device required", "resource busy", "file exists", "cross-device link", "operation not supported by device", "not a directory", "is a directory", "invalid argument", "too many open files in system", "too many open files", "inappropriate ioctl for device", "text file busy", "file too large", "no space left on device", "illegal seek", "read-only file system", "too many links", "broken pipe", "numerical argument out of domain", "result too large", "resource temporarily unavailable", "operation now in progress", "operation already in progress", "socket operation on non-socket", "destination address required", "message too long", "protocol wrong type for socket", "protocol not available", "protocol not supported", "socket type not supported", "operation not supported", "protocol family not supported", "address family not supported by protocol family", "address already in use", "can't assign requested address", "network is down", "network is unreachable", "network dropped connection on reset", "software caused connection abort", "connection reset by peer", "no buffer space available", "socket is already connected", "socket is not connected", "can't send after socket shutdown", "too many references: can't splice", "operation timed out", "connection refused", "too many levels of symbolic links", "file name too long", "host is down", "no route to host", "directory not empty", "too many processes", "too many users", "disc quota exceeded", "stale NFS file handle", "too many levels of remote in path", "RPC struct is bad", "RPC version wrong", "RPC prog. not avail", "program version wrong", "bad procedure for program", "no locks available", "function not implemented", "inappropriate file type or format", "authentication error", "need authenticator", "device power is off", "device error", "value too large to be stored in data type", "bad executable (or shared library)", "bad CPU type in executable", "shared library version mismatch", "malformed Mach-o file", "operation canceled", "identifier removed", "no message of desired type", "illegal byte sequence", "attribute not found", "bad message", "EMULTIHOP (Reserved)", "no message available on STREAM", "ENOLINK (Reserved)", "no STREAM resources", "not a STREAM", "protocol error", "STREAM ioctl timeout", "operation not supported on socket", "policy not found", "state not recoverable", "previous owner died"]); + mapper = new mmapper.ptr(new sync.Mutex.ptr(), new $Map(), mmap, munmap); + init(); + /* */ } return; } }; $init_syscall.$blocking = true; return $init_syscall; + }; + return $pkg; +})(); +$packages["github.com/gopherjs/gopherjs/nosync"] = (function() { + var $pkg = {}, Mutex, RWMutex, Once, ptrType, ptrType$1, funcType, ptrType$3; + Mutex = $pkg.Mutex = $newType(0, $kindStruct, "nosync.Mutex", "Mutex", "github.com/gopherjs/gopherjs/nosync", function(locked_) { + this.$val = this; + this.locked = locked_ !== undefined ? locked_ : false; + }); + RWMutex = $pkg.RWMutex = $newType(0, $kindStruct, "nosync.RWMutex", "RWMutex", "github.com/gopherjs/gopherjs/nosync", function(writeLocked_, readLockCounter_) { + this.$val = this; + this.writeLocked = writeLocked_ !== undefined ? writeLocked_ : false; + this.readLockCounter = readLockCounter_ !== undefined ? readLockCounter_ : 0; + }); + Once = $pkg.Once = $newType(0, $kindStruct, "nosync.Once", "Once", "github.com/gopherjs/gopherjs/nosync", function(doing_, done_) { + this.$val = this; + this.doing = doing_ !== undefined ? doing_ : false; + this.done = done_ !== undefined ? done_ : false; + }); + ptrType = $ptrType(Mutex); + ptrType$1 = $ptrType(RWMutex); + funcType = $funcType([], [], false); + ptrType$3 = $ptrType(Once); + Mutex.ptr.prototype.Lock = function() { + var m; + m = this; + if (m.locked) { + $panic(new $String("nosync: mutex is already locked")); + } + m.locked = true; + }; + Mutex.prototype.Lock = function() { return this.$val.Lock(); }; + Mutex.ptr.prototype.Unlock = function() { + var m; + m = this; + if (!m.locked) { + $panic(new $String("nosync: unlock of unlocked mutex")); + } + m.locked = false; + }; + Mutex.prototype.Unlock = function() { return this.$val.Unlock(); }; + RWMutex.ptr.prototype.Lock = function() { + var rw; + rw = this; + if (!((rw.readLockCounter === 0)) || rw.writeLocked) { + $panic(new $String("nosync: mutex is already locked")); + } + rw.writeLocked = true; + }; + RWMutex.prototype.Lock = function() { return this.$val.Lock(); }; + RWMutex.ptr.prototype.Unlock = function() { + var rw; + rw = this; + if (!rw.writeLocked) { + $panic(new $String("nosync: unlock of unlocked mutex")); + } + rw.writeLocked = false; + }; + RWMutex.prototype.Unlock = function() { return this.$val.Unlock(); }; + RWMutex.ptr.prototype.RLock = function() { + var rw; + rw = this; + if (rw.writeLocked) { + $panic(new $String("nosync: mutex is already locked")); + } + rw.readLockCounter = rw.readLockCounter + (1) >> 0; + }; + RWMutex.prototype.RLock = function() { return this.$val.RLock(); }; + RWMutex.ptr.prototype.RUnlock = function() { + var rw; + rw = this; + if (rw.readLockCounter === 0) { + $panic(new $String("nosync: unlock of unlocked mutex")); + } + rw.readLockCounter = rw.readLockCounter - (1) >> 0; + }; + RWMutex.prototype.RUnlock = function() { return this.$val.RUnlock(); }; + Once.ptr.prototype.Do = function(f) { + var $deferred = [], $err = null, f, o; + /* */ try { $deferFrames.push($deferred); + o = this; + if (o.done) { + return; + } + if (o.doing) { + $panic(new $String("nosync: Do called within f")); + } + o.doing = true; + $deferred.push([(function() { + o.doing = false; + o.done = true; + }), []]); + f(); + /* */ } catch(err) { $err = err; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + Once.prototype.Do = function(f) { return this.$val.Do(f); }; + ptrType.methods = [{prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}]; + ptrType$1.methods = [{prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}, {prop: "RLock", name: "RLock", pkg: "", typ: $funcType([], [], false)}, {prop: "RUnlock", name: "RUnlock", pkg: "", typ: $funcType([], [], false)}]; + ptrType$3.methods = [{prop: "Do", name: "Do", pkg: "", typ: $funcType([funcType], [], false)}]; + Mutex.init([{prop: "locked", name: "locked", pkg: "github.com/gopherjs/gopherjs/nosync", typ: $Bool, tag: ""}]); + RWMutex.init([{prop: "writeLocked", name: "writeLocked", pkg: "github.com/gopherjs/gopherjs/nosync", typ: $Bool, tag: ""}, {prop: "readLockCounter", name: "readLockCounter", pkg: "github.com/gopherjs/gopherjs/nosync", typ: $Int, tag: ""}]); + Once.init([{prop: "doing", name: "doing", pkg: "github.com/gopherjs/gopherjs/nosync", typ: $Bool, tag: ""}, {prop: "done", name: "done", pkg: "github.com/gopherjs/gopherjs/nosync", typ: $Bool, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_nosync = function() { while (true) { switch ($s) { case 0: + /* */ } return; } }; $init_nosync.$blocking = true; return $init_nosync; + }; + return $pkg; +})(); +$packages["strings"] = (function() { + var $pkg = {}, errors, js, io, unicode, utf8, sliceType, sliceType$3, IndexByte, explode, hashStr, hashStrRev, Count, Contains, ContainsRune, Index, LastIndex, IndexRune, genSplit, Split, Fields, FieldsFunc, Join, HasPrefix, HasSuffix, Map, Repeat, ToLower, TrimLeftFunc, TrimRightFunc, TrimFunc, indexFunc, lastIndexFunc, TrimSpace, TrimSuffix, Replace; + errors = $packages["errors"]; + js = $packages["github.com/gopherjs/gopherjs/js"]; + io = $packages["io"]; + unicode = $packages["unicode"]; + utf8 = $packages["unicode/utf8"]; + sliceType = $sliceType($Uint8); + sliceType$3 = $sliceType($String); + IndexByte = $pkg.IndexByte = function(s, c) { + var c, s; + return $parseInt(s.indexOf($global.String.fromCharCode(c))) >> 0; + }; + explode = function(s, n) { + var _tmp, _tmp$1, _tuple, a, ch, cur, i, l, n, s, size; + if (n === 0) { + return sliceType$3.nil; + } + l = utf8.RuneCountInString(s); + if (n <= 0 || n > l) { + n = l; + } + a = $makeSlice(sliceType$3, n); + size = 0; + ch = 0; + _tmp = 0; _tmp$1 = 0; i = _tmp; cur = _tmp$1; + while (true) { + if (!((i + 1 >> 0) < n)) { break; } + _tuple = utf8.DecodeRuneInString(s.substring(cur)); ch = _tuple[0]; size = _tuple[1]; + if (ch === 65533) { + (i < 0 || i >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + i] = "\xEF\xBF\xBD"; + } else { + (i < 0 || i >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + i] = s.substring(cur, (cur + size >> 0)); + } + cur = cur + (size) >> 0; + i = i + (1) >> 0; + } + if (cur < s.length) { + (i < 0 || i >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + i] = s.substring(cur); + } + return a; + }; + hashStr = function(sep) { + var _tmp, _tmp$1, hash, i, i$1, pow, sep, sq, x, x$1; + hash = 0; + i = 0; + while (true) { + if (!(i < sep.length)) { break; } + hash = ((((hash >>> 16 << 16) * 16777619 >>> 0) + (hash << 16 >>> 16) * 16777619) >>> 0) + (sep.charCodeAt(i) >>> 0) >>> 0; + i = i + (1) >> 0; + } + _tmp = 1; _tmp$1 = 16777619; pow = _tmp; sq = _tmp$1; + i$1 = sep.length; + while (true) { + if (!(i$1 > 0)) { break; } + if (!(((i$1 & 1) === 0))) { + pow = (x = sq, (((pow >>> 16 << 16) * x >>> 0) + (pow << 16 >>> 16) * x) >>> 0); + } + sq = (x$1 = sq, (((sq >>> 16 << 16) * x$1 >>> 0) + (sq << 16 >>> 16) * x$1) >>> 0); + i$1 = (i$1 >> $min((1), 31)) >> 0; + } + return [hash, pow]; + }; + hashStrRev = function(sep) { + var _tmp, _tmp$1, hash, i, i$1, pow, sep, sq, x, x$1; + hash = 0; + i = sep.length - 1 >> 0; + while (true) { + if (!(i >= 0)) { break; } + hash = ((((hash >>> 16 << 16) * 16777619 >>> 0) + (hash << 16 >>> 16) * 16777619) >>> 0) + (sep.charCodeAt(i) >>> 0) >>> 0; + i = i - (1) >> 0; + } + _tmp = 1; _tmp$1 = 16777619; pow = _tmp; sq = _tmp$1; + i$1 = sep.length; + while (true) { + if (!(i$1 > 0)) { break; } + if (!(((i$1 & 1) === 0))) { + pow = (x = sq, (((pow >>> 16 << 16) * x >>> 0) + (pow << 16 >>> 16) * x) >>> 0); + } + sq = (x$1 = sq, (((sq >>> 16 << 16) * x$1 >>> 0) + (sq << 16 >>> 16) * x$1) >>> 0); + i$1 = (i$1 >> $min((1), 31)) >> 0; + } + return [hash, pow]; + }; + Count = $pkg.Count = function(s, sep) { + var _tuple, c, h, hashsep, i, i$1, i$2, lastmatch, n, pow, s, sep, x, x$1; + n = 0; + if (sep.length === 0) { + return utf8.RuneCountInString(s) + 1 >> 0; + } else if (sep.length === 1) { + c = sep.charCodeAt(0); + i = 0; + while (true) { + if (!(i < s.length)) { break; } + if (s.charCodeAt(i) === c) { + n = n + (1) >> 0; + } + i = i + (1) >> 0; + } + return n; + } else if (sep.length > s.length) { + return 0; + } else if (sep.length === s.length) { + if (sep === s) { + return 1; + } + return 0; + } + _tuple = hashStr(sep); hashsep = _tuple[0]; pow = _tuple[1]; + h = 0; + i$1 = 0; + while (true) { + if (!(i$1 < sep.length)) { break; } + h = ((((h >>> 16 << 16) * 16777619 >>> 0) + (h << 16 >>> 16) * 16777619) >>> 0) + (s.charCodeAt(i$1) >>> 0) >>> 0; + i$1 = i$1 + (1) >> 0; + } + lastmatch = 0; + if ((h === hashsep) && s.substring(0, sep.length) === sep) { + n = n + (1) >> 0; + lastmatch = sep.length; + } + i$2 = sep.length; + while (true) { + if (!(i$2 < s.length)) { break; } + h = (x = 16777619, (((h >>> 16 << 16) * x >>> 0) + (h << 16 >>> 16) * x) >>> 0); + h = h + ((s.charCodeAt(i$2) >>> 0)) >>> 0; + h = h - ((x$1 = (s.charCodeAt((i$2 - sep.length >> 0)) >>> 0), (((pow >>> 16 << 16) * x$1 >>> 0) + (pow << 16 >>> 16) * x$1) >>> 0)) >>> 0; + i$2 = i$2 + (1) >> 0; + if ((h === hashsep) && lastmatch <= (i$2 - sep.length >> 0) && s.substring((i$2 - sep.length >> 0), i$2) === sep) { + n = n + (1) >> 0; + lastmatch = i$2; + } + } + return n; + }; + Contains = $pkg.Contains = function(s, substr) { + var s, substr; + return Index(s, substr) >= 0; + }; + ContainsRune = $pkg.ContainsRune = function(s, r) { + var r, s; + return IndexRune(s, r) >= 0; + }; + Index = $pkg.Index = function(s, sep) { + var _tuple, h, hashsep, i, i$1, n, pow, s, sep, x, x$1; + n = sep.length; + if (n === 0) { + return 0; + } else if (n === 1) { + return IndexByte(s, sep.charCodeAt(0)); + } else if (n === s.length) { + if (sep === s) { + return 0; + } + return -1; + } else if (n > s.length) { + return -1; + } + _tuple = hashStr(sep); hashsep = _tuple[0]; pow = _tuple[1]; + h = 0; + i = 0; + while (true) { + if (!(i < n)) { break; } + h = ((((h >>> 16 << 16) * 16777619 >>> 0) + (h << 16 >>> 16) * 16777619) >>> 0) + (s.charCodeAt(i) >>> 0) >>> 0; + i = i + (1) >> 0; + } + if ((h === hashsep) && s.substring(0, n) === sep) { + return 0; + } + i$1 = n; + while (true) { + if (!(i$1 < s.length)) { break; } + h = (x = 16777619, (((h >>> 16 << 16) * x >>> 0) + (h << 16 >>> 16) * x) >>> 0); + h = h + ((s.charCodeAt(i$1) >>> 0)) >>> 0; + h = h - ((x$1 = (s.charCodeAt((i$1 - n >> 0)) >>> 0), (((pow >>> 16 << 16) * x$1 >>> 0) + (pow << 16 >>> 16) * x$1) >>> 0)) >>> 0; + i$1 = i$1 + (1) >> 0; + if ((h === hashsep) && s.substring((i$1 - n >> 0), i$1) === sep) { + return i$1 - n >> 0; + } + } + return -1; + }; + LastIndex = $pkg.LastIndex = function(s, sep) { + var _tuple, c, h, hashsep, i, i$1, i$2, last, n, pow, s, sep, x, x$1; + n = sep.length; + if (n === 0) { + return s.length; + } else if (n === 1) { + c = sep.charCodeAt(0); + i = s.length - 1 >> 0; + while (true) { + if (!(i >= 0)) { break; } + if (s.charCodeAt(i) === c) { + return i; + } + i = i - (1) >> 0; + } + return -1; + } else if (n === s.length) { + if (sep === s) { + return 0; + } + return -1; + } else if (n > s.length) { + return -1; + } + _tuple = hashStrRev(sep); hashsep = _tuple[0]; pow = _tuple[1]; + last = s.length - n >> 0; + h = 0; + i$1 = s.length - 1 >> 0; + while (true) { + if (!(i$1 >= last)) { break; } + h = ((((h >>> 16 << 16) * 16777619 >>> 0) + (h << 16 >>> 16) * 16777619) >>> 0) + (s.charCodeAt(i$1) >>> 0) >>> 0; + i$1 = i$1 - (1) >> 0; + } + if ((h === hashsep) && s.substring(last) === sep) { + return last; + } + i$2 = last - 1 >> 0; + while (true) { + if (!(i$2 >= 0)) { break; } + h = (x = 16777619, (((h >>> 16 << 16) * x >>> 0) + (h << 16 >>> 16) * x) >>> 0); + h = h + ((s.charCodeAt(i$2) >>> 0)) >>> 0; + h = h - ((x$1 = (s.charCodeAt((i$2 + n >> 0)) >>> 0), (((pow >>> 16 << 16) * x$1 >>> 0) + (pow << 16 >>> 16) * x$1) >>> 0)) >>> 0; + if ((h === hashsep) && s.substring(i$2, (i$2 + n >> 0)) === sep) { + return i$2; + } + i$2 = i$2 - (1) >> 0; + } + return -1; + }; + IndexRune = $pkg.IndexRune = function(s, r) { + var _i, _ref, _rune, c, i, r, s; + if (r < 128) { + return IndexByte(s, (r << 24 >>> 24)); + } else { + _ref = s; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + i = _i; + c = _rune[0]; + if (c === r) { + return i; + } + _i += _rune[1]; + } + } + return -1; + }; + genSplit = function(s, sep, sepSave, n) { + var a, c, i, n, na, s, sep, sepSave, start; + if (n === 0) { + return sliceType$3.nil; + } + if (sep === "") { + return explode(s, n); + } + if (n < 0) { + n = Count(s, sep) + 1 >> 0; + } + c = sep.charCodeAt(0); + start = 0; + a = $makeSlice(sliceType$3, n); + na = 0; + i = 0; + while (true) { + if (!((i + sep.length >> 0) <= s.length && (na + 1 >> 0) < n)) { break; } + if ((s.charCodeAt(i) === c) && ((sep.length === 1) || s.substring(i, (i + sep.length >> 0)) === sep)) { + (na < 0 || na >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + na] = s.substring(start, (i + sepSave >> 0)); + na = na + (1) >> 0; + start = i + sep.length >> 0; + i = i + ((sep.length - 1 >> 0)) >> 0; + } + i = i + (1) >> 0; + } + (na < 0 || na >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + na] = s.substring(start); + return $subslice(a, 0, (na + 1 >> 0)); + }; + Split = $pkg.Split = function(s, sep) { + var s, sep; + return genSplit(s, sep, 0, -1); + }; + Fields = $pkg.Fields = function(s) { + var s; + return FieldsFunc(s, unicode.IsSpace); + }; + FieldsFunc = $pkg.FieldsFunc = function(s, f) { + var _i, _i$1, _ref, _ref$1, _rune, _rune$1, a, f, fieldStart, i, inField, n, na, rune, rune$1, s, wasInField; + n = 0; + inField = false; + _ref = s; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + rune = _rune[0]; + wasInField = inField; + inField = !f(rune); + if (inField && !wasInField) { + n = n + (1) >> 0; + } + _i += _rune[1]; + } + a = $makeSlice(sliceType$3, n); + na = 0; + fieldStart = -1; + _ref$1 = s; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.length)) { break; } + _rune$1 = $decodeRune(_ref$1, _i$1); + i = _i$1; + rune$1 = _rune$1[0]; + if (f(rune$1)) { + if (fieldStart >= 0) { + (na < 0 || na >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + na] = s.substring(fieldStart, i); + na = na + (1) >> 0; + fieldStart = -1; + } + } else if (fieldStart === -1) { + fieldStart = i; + } + _i$1 += _rune$1[1]; + } + if (fieldStart >= 0) { + (na < 0 || na >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + na] = s.substring(fieldStart); + } + return a; + }; + Join = $pkg.Join = function(a, sep) { + var _i, _ref, a, b, bp, i, n, s, sep; + if (a.$length === 0) { + return ""; + } + if (a.$length === 1) { + return ((0 < 0 || 0 >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + 0]); + } + n = sep.length * ((a.$length - 1 >> 0)) >> 0; + i = 0; + while (true) { + if (!(i < a.$length)) { break; } + n = n + (((i < 0 || i >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + i]).length) >> 0; + i = i + (1) >> 0; + } + b = $makeSlice(sliceType, n); + bp = $copyString(b, ((0 < 0 || 0 >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + 0])); + _ref = $subslice(a, 1); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + s = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + bp = bp + ($copyString($subslice(b, bp), sep)) >> 0; + bp = bp + ($copyString($subslice(b, bp), s)) >> 0; + _i++; + } + return $bytesToString(b); + }; + HasPrefix = $pkg.HasPrefix = function(s, prefix) { + var prefix, s; + return s.length >= prefix.length && s.substring(0, prefix.length) === prefix; + }; + HasSuffix = $pkg.HasSuffix = function(s, suffix) { + var s, suffix; + return s.length >= suffix.length && s.substring((s.length - suffix.length >> 0)) === suffix; + }; + Map = $pkg.Map = function(mapping, s) { + var _i, _ref, _rune, b, c, i, mapping, maxbytes, nb, nbytes, r, s, wid; + maxbytes = s.length; + nbytes = 0; + b = sliceType.nil; + _ref = s; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + i = _i; + c = _rune[0]; + r = mapping(c); + if (b === sliceType.nil) { + if (r === c) { + _i += _rune[1]; + continue; + } + b = $makeSlice(sliceType, maxbytes); + nbytes = $copyString(b, s.substring(0, i)); + } + if (r >= 0) { + wid = 1; + if (r >= 128) { + wid = utf8.RuneLen(r); + } + if ((nbytes + wid >> 0) > maxbytes) { + maxbytes = (maxbytes * 2 >> 0) + 4 >> 0; + nb = $makeSlice(sliceType, maxbytes); + $copySlice(nb, $subslice(b, 0, nbytes)); + b = nb; + } + nbytes = nbytes + (utf8.EncodeRune($subslice(b, nbytes, maxbytes), r)) >> 0; + } + _i += _rune[1]; + } + if (b === sliceType.nil) { + return s; + } + return $bytesToString($subslice(b, 0, nbytes)); + }; + Repeat = $pkg.Repeat = function(s, count) { + var b, bp, count, s; + b = $makeSlice(sliceType, (s.length * count >> 0)); + bp = $copyString(b, s); + while (true) { + if (!(bp < b.$length)) { break; } + $copySlice($subslice(b, bp), $subslice(b, 0, bp)); + bp = bp * (2) >> 0; + } + return $bytesToString(b); + }; + ToLower = $pkg.ToLower = function(s) { + var s; + return Map(unicode.ToLower, s); + }; + TrimLeftFunc = $pkg.TrimLeftFunc = function(s, f) { + var f, i, s; + i = indexFunc(s, f, false); + if (i === -1) { + return ""; + } + return s.substring(i); + }; + TrimRightFunc = $pkg.TrimRightFunc = function(s, f) { + var _tuple, f, i, s, wid; + i = lastIndexFunc(s, f, false); + if (i >= 0 && s.charCodeAt(i) >= 128) { + _tuple = utf8.DecodeRuneInString(s.substring(i)); wid = _tuple[1]; + i = i + (wid) >> 0; + } else { + i = i + (1) >> 0; + } + return s.substring(0, i); + }; + TrimFunc = $pkg.TrimFunc = function(s, f) { + var f, s; + return TrimRightFunc(TrimLeftFunc(s, f), f); + }; + indexFunc = function(s, f, truth) { + var _tuple, f, r, s, start, truth, wid; + start = 0; + while (true) { + if (!(start < s.length)) { break; } + wid = 1; + r = (s.charCodeAt(start) >> 0); + if (r >= 128) { + _tuple = utf8.DecodeRuneInString(s.substring(start)); r = _tuple[0]; wid = _tuple[1]; + } + if (f(r) === truth) { + return start; + } + start = start + (wid) >> 0; + } + return -1; + }; + lastIndexFunc = function(s, f, truth) { + var _tuple, f, i, r, s, size, truth; + i = s.length; + while (true) { + if (!(i > 0)) { break; } + _tuple = utf8.DecodeLastRuneInString(s.substring(0, i)); r = _tuple[0]; size = _tuple[1]; + i = i - (size) >> 0; + if (f(r) === truth) { + return i; + } + } + return -1; + }; + TrimSpace = $pkg.TrimSpace = function(s) { + var s; + return TrimFunc(s, unicode.IsSpace); + }; + TrimSuffix = $pkg.TrimSuffix = function(s, suffix) { + var s, suffix; + if (HasSuffix(s, suffix)) { + return s.substring(0, (s.length - suffix.length >> 0)); + } + return s; + }; + Replace = $pkg.Replace = function(s, old, new$1, n) { + var _tuple, i, j, m, n, new$1, old, s, start, t, w, wid; + if (old === new$1 || (n === 0)) { + return s; + } + m = Count(s, old); + if (m === 0) { + return s; + } else if (n < 0 || m < n) { + n = m; + } + t = $makeSlice(sliceType, (s.length + (n * ((new$1.length - old.length >> 0)) >> 0) >> 0)); + w = 0; + start = 0; + i = 0; + while (true) { + if (!(i < n)) { break; } + j = start; + if (old.length === 0) { + if (i > 0) { + _tuple = utf8.DecodeRuneInString(s.substring(start)); wid = _tuple[1]; + j = j + (wid) >> 0; + } + } else { + j = j + (Index(s.substring(start), old)) >> 0; + } + w = w + ($copyString($subslice(t, w), s.substring(start, j))) >> 0; + w = w + ($copyString($subslice(t, w), new$1)) >> 0; + start = j + old.length >> 0; + i = i + (1) >> 0; + } + w = w + ($copyString($subslice(t, w), s.substring(start))) >> 0; + return $bytesToString($subslice(t, 0, w)); + }; + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_strings = function() { while (true) { switch ($s) { case 0: + $r = errors.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = js.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = io.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = unicode.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = utf8.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + /* */ } return; } }; $init_strings.$blocking = true; return $init_strings; + }; + return $pkg; +})(); +$packages["time"] = (function() { + var $pkg = {}, errors, js, nosync, runtime, strings, syscall, ParseError, Time, Month, Weekday, Duration, Location, zone, zoneTrans, sliceType, sliceType$1, sliceType$2, ptrType, arrayType, sliceType$3, arrayType$1, arrayType$2, ptrType$1, ptrType$2, ptrType$5, std0x, longDayNames, shortDayNames, shortMonthNames, longMonthNames, atoiError, errBad, errLeadingInt, unitMap, months, days, daysBefore, utcLoc, localLoc, localOnce, zoneinfo, badData, zoneDirs, _map, _key, _tuple, _r, initLocal, startsWithLowerCase, nextStdChunk, match, lookup, appendUint, atoi, formatNano, quote, isDigit, getnum, cutspace, skip, Parse, parse, parseTimeZone, parseGMT, parseNanoseconds, leadingInt, ParseDuration, absWeekday, absClock, fmtFrac, fmtInt, absDate, Unix, isLeap, norm, Date, div, FixedZone; + errors = $packages["errors"]; + js = $packages["github.com/gopherjs/gopherjs/js"]; + nosync = $packages["github.com/gopherjs/gopherjs/nosync"]; + runtime = $packages["runtime"]; + strings = $packages["strings"]; + syscall = $packages["syscall"]; + ParseError = $pkg.ParseError = $newType(0, $kindStruct, "time.ParseError", "ParseError", "time", function(Layout_, Value_, LayoutElem_, ValueElem_, Message_) { + this.$val = this; + this.Layout = Layout_ !== undefined ? Layout_ : ""; + this.Value = Value_ !== undefined ? Value_ : ""; + this.LayoutElem = LayoutElem_ !== undefined ? LayoutElem_ : ""; + this.ValueElem = ValueElem_ !== undefined ? ValueElem_ : ""; + this.Message = Message_ !== undefined ? Message_ : ""; + }); + Time = $pkg.Time = $newType(0, $kindStruct, "time.Time", "Time", "time", function(sec_, nsec_, loc_) { + this.$val = this; + this.sec = sec_ !== undefined ? sec_ : new $Int64(0, 0); + this.nsec = nsec_ !== undefined ? nsec_ : 0; + this.loc = loc_ !== undefined ? loc_ : ptrType$1.nil; + }); + Month = $pkg.Month = $newType(4, $kindInt, "time.Month", "Month", "time", null); + Weekday = $pkg.Weekday = $newType(4, $kindInt, "time.Weekday", "Weekday", "time", null); + Duration = $pkg.Duration = $newType(8, $kindInt64, "time.Duration", "Duration", "time", null); + Location = $pkg.Location = $newType(0, $kindStruct, "time.Location", "Location", "time", function(name_, zone_, tx_, cacheStart_, cacheEnd_, cacheZone_) { + this.$val = this; + this.name = name_ !== undefined ? name_ : ""; + this.zone = zone_ !== undefined ? zone_ : sliceType$1.nil; + this.tx = tx_ !== undefined ? tx_ : sliceType$2.nil; + this.cacheStart = cacheStart_ !== undefined ? cacheStart_ : new $Int64(0, 0); + this.cacheEnd = cacheEnd_ !== undefined ? cacheEnd_ : new $Int64(0, 0); + this.cacheZone = cacheZone_ !== undefined ? cacheZone_ : ptrType.nil; + }); + zone = $pkg.zone = $newType(0, $kindStruct, "time.zone", "zone", "time", function(name_, offset_, isDST_) { + this.$val = this; + this.name = name_ !== undefined ? name_ : ""; + this.offset = offset_ !== undefined ? offset_ : 0; + this.isDST = isDST_ !== undefined ? isDST_ : false; + }); + zoneTrans = $pkg.zoneTrans = $newType(0, $kindStruct, "time.zoneTrans", "zoneTrans", "time", function(when_, index_, isstd_, isutc_) { + this.$val = this; + this.when = when_ !== undefined ? when_ : new $Int64(0, 0); + this.index = index_ !== undefined ? index_ : 0; + this.isstd = isstd_ !== undefined ? isstd_ : false; + this.isutc = isutc_ !== undefined ? isutc_ : false; + }); + sliceType = $sliceType($String); + sliceType$1 = $sliceType(zone); + sliceType$2 = $sliceType(zoneTrans); + ptrType = $ptrType(zone); + arrayType = $arrayType($Uint8, 32); + sliceType$3 = $sliceType($Uint8); + arrayType$1 = $arrayType($Uint8, 9); + arrayType$2 = $arrayType($Uint8, 64); + ptrType$1 = $ptrType(Location); + ptrType$2 = $ptrType(ParseError); + ptrType$5 = $ptrType(Time); + initLocal = function() { + var d, i, j, s; + d = new ($global.Date)(); + s = $internalize(d, $String); + i = strings.IndexByte(s, 40); + j = strings.IndexByte(s, 41); + if ((i === -1) || (j === -1)) { + localLoc.name = "UTC"; + return; + } + localLoc.name = s.substring((i + 1 >> 0), j); + localLoc.zone = new sliceType$1([new zone.ptr(localLoc.name, ($parseInt(d.getTimezoneOffset()) >> 0) * -60 >> 0, false)]); + }; + startsWithLowerCase = function(str) { + var c, str; + if (str.length === 0) { + return false; + } + c = str.charCodeAt(0); + return 97 <= c && c <= 122; + }; + nextStdChunk = function(layout) { + var _ref, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$44, _tmp$45, _tmp$46, _tmp$47, _tmp$48, _tmp$49, _tmp$5, _tmp$50, _tmp$51, _tmp$52, _tmp$53, _tmp$54, _tmp$55, _tmp$56, _tmp$57, _tmp$58, _tmp$59, _tmp$6, _tmp$60, _tmp$61, _tmp$62, _tmp$63, _tmp$64, _tmp$65, _tmp$66, _tmp$67, _tmp$68, _tmp$69, _tmp$7, _tmp$70, _tmp$71, _tmp$72, _tmp$73, _tmp$74, _tmp$75, _tmp$76, _tmp$77, _tmp$78, _tmp$79, _tmp$8, _tmp$80, _tmp$9, c, ch, i, j, layout, prefix = "", std = 0, std$1, suffix = "", x; + i = 0; + while (true) { + if (!(i < layout.length)) { break; } + c = (layout.charCodeAt(i) >> 0); + _ref = c; + if (_ref === 74) { + if (layout.length >= (i + 3 >> 0) && layout.substring(i, (i + 3 >> 0)) === "Jan") { + if (layout.length >= (i + 7 >> 0) && layout.substring(i, (i + 7 >> 0)) === "January") { + _tmp = layout.substring(0, i); _tmp$1 = 257; _tmp$2 = layout.substring((i + 7 >> 0)); prefix = _tmp; std = _tmp$1; suffix = _tmp$2; + return [prefix, std, suffix]; + } + if (!startsWithLowerCase(layout.substring((i + 3 >> 0)))) { + _tmp$3 = layout.substring(0, i); _tmp$4 = 258; _tmp$5 = layout.substring((i + 3 >> 0)); prefix = _tmp$3; std = _tmp$4; suffix = _tmp$5; + return [prefix, std, suffix]; + } + } + } else if (_ref === 77) { + if (layout.length >= (i + 3 >> 0)) { + if (layout.substring(i, (i + 3 >> 0)) === "Mon") { + if (layout.length >= (i + 6 >> 0) && layout.substring(i, (i + 6 >> 0)) === "Monday") { + _tmp$6 = layout.substring(0, i); _tmp$7 = 261; _tmp$8 = layout.substring((i + 6 >> 0)); prefix = _tmp$6; std = _tmp$7; suffix = _tmp$8; + return [prefix, std, suffix]; + } + if (!startsWithLowerCase(layout.substring((i + 3 >> 0)))) { + _tmp$9 = layout.substring(0, i); _tmp$10 = 262; _tmp$11 = layout.substring((i + 3 >> 0)); prefix = _tmp$9; std = _tmp$10; suffix = _tmp$11; + return [prefix, std, suffix]; + } + } + if (layout.substring(i, (i + 3 >> 0)) === "MST") { + _tmp$12 = layout.substring(0, i); _tmp$13 = 21; _tmp$14 = layout.substring((i + 3 >> 0)); prefix = _tmp$12; std = _tmp$13; suffix = _tmp$14; + return [prefix, std, suffix]; + } + } + } else if (_ref === 48) { + if (layout.length >= (i + 2 >> 0) && 49 <= layout.charCodeAt((i + 1 >> 0)) && layout.charCodeAt((i + 1 >> 0)) <= 54) { + _tmp$15 = layout.substring(0, i); _tmp$16 = (x = layout.charCodeAt((i + 1 >> 0)) - 49 << 24 >>> 24, ((x < 0 || x >= std0x.length) ? $throwRuntimeError("index out of range") : std0x[x])); _tmp$17 = layout.substring((i + 2 >> 0)); prefix = _tmp$15; std = _tmp$16; suffix = _tmp$17; + return [prefix, std, suffix]; + } + } else if (_ref === 49) { + if (layout.length >= (i + 2 >> 0) && (layout.charCodeAt((i + 1 >> 0)) === 53)) { + _tmp$18 = layout.substring(0, i); _tmp$19 = 522; _tmp$20 = layout.substring((i + 2 >> 0)); prefix = _tmp$18; std = _tmp$19; suffix = _tmp$20; + return [prefix, std, suffix]; + } + _tmp$21 = layout.substring(0, i); _tmp$22 = 259; _tmp$23 = layout.substring((i + 1 >> 0)); prefix = _tmp$21; std = _tmp$22; suffix = _tmp$23; + return [prefix, std, suffix]; + } else if (_ref === 50) { + if (layout.length >= (i + 4 >> 0) && layout.substring(i, (i + 4 >> 0)) === "2006") { + _tmp$24 = layout.substring(0, i); _tmp$25 = 273; _tmp$26 = layout.substring((i + 4 >> 0)); prefix = _tmp$24; std = _tmp$25; suffix = _tmp$26; + return [prefix, std, suffix]; + } + _tmp$27 = layout.substring(0, i); _tmp$28 = 263; _tmp$29 = layout.substring((i + 1 >> 0)); prefix = _tmp$27; std = _tmp$28; suffix = _tmp$29; + return [prefix, std, suffix]; + } else if (_ref === 95) { + if (layout.length >= (i + 2 >> 0) && (layout.charCodeAt((i + 1 >> 0)) === 50)) { + _tmp$30 = layout.substring(0, i); _tmp$31 = 264; _tmp$32 = layout.substring((i + 2 >> 0)); prefix = _tmp$30; std = _tmp$31; suffix = _tmp$32; + return [prefix, std, suffix]; + } + } else if (_ref === 51) { + _tmp$33 = layout.substring(0, i); _tmp$34 = 523; _tmp$35 = layout.substring((i + 1 >> 0)); prefix = _tmp$33; std = _tmp$34; suffix = _tmp$35; + return [prefix, std, suffix]; + } else if (_ref === 52) { + _tmp$36 = layout.substring(0, i); _tmp$37 = 525; _tmp$38 = layout.substring((i + 1 >> 0)); prefix = _tmp$36; std = _tmp$37; suffix = _tmp$38; + return [prefix, std, suffix]; + } else if (_ref === 53) { + _tmp$39 = layout.substring(0, i); _tmp$40 = 527; _tmp$41 = layout.substring((i + 1 >> 0)); prefix = _tmp$39; std = _tmp$40; suffix = _tmp$41; + return [prefix, std, suffix]; + } else if (_ref === 80) { + if (layout.length >= (i + 2 >> 0) && (layout.charCodeAt((i + 1 >> 0)) === 77)) { + _tmp$42 = layout.substring(0, i); _tmp$43 = 531; _tmp$44 = layout.substring((i + 2 >> 0)); prefix = _tmp$42; std = _tmp$43; suffix = _tmp$44; + return [prefix, std, suffix]; + } + } else if (_ref === 112) { + if (layout.length >= (i + 2 >> 0) && (layout.charCodeAt((i + 1 >> 0)) === 109)) { + _tmp$45 = layout.substring(0, i); _tmp$46 = 532; _tmp$47 = layout.substring((i + 2 >> 0)); prefix = _tmp$45; std = _tmp$46; suffix = _tmp$47; + return [prefix, std, suffix]; + } + } else if (_ref === 45) { + if (layout.length >= (i + 7 >> 0) && layout.substring(i, (i + 7 >> 0)) === "-070000") { + _tmp$48 = layout.substring(0, i); _tmp$49 = 27; _tmp$50 = layout.substring((i + 7 >> 0)); prefix = _tmp$48; std = _tmp$49; suffix = _tmp$50; + return [prefix, std, suffix]; + } + if (layout.length >= (i + 9 >> 0) && layout.substring(i, (i + 9 >> 0)) === "-07:00:00") { + _tmp$51 = layout.substring(0, i); _tmp$52 = 30; _tmp$53 = layout.substring((i + 9 >> 0)); prefix = _tmp$51; std = _tmp$52; suffix = _tmp$53; + return [prefix, std, suffix]; + } + if (layout.length >= (i + 5 >> 0) && layout.substring(i, (i + 5 >> 0)) === "-0700") { + _tmp$54 = layout.substring(0, i); _tmp$55 = 26; _tmp$56 = layout.substring((i + 5 >> 0)); prefix = _tmp$54; std = _tmp$55; suffix = _tmp$56; + return [prefix, std, suffix]; + } + if (layout.length >= (i + 6 >> 0) && layout.substring(i, (i + 6 >> 0)) === "-07:00") { + _tmp$57 = layout.substring(0, i); _tmp$58 = 29; _tmp$59 = layout.substring((i + 6 >> 0)); prefix = _tmp$57; std = _tmp$58; suffix = _tmp$59; + return [prefix, std, suffix]; + } + if (layout.length >= (i + 3 >> 0) && layout.substring(i, (i + 3 >> 0)) === "-07") { + _tmp$60 = layout.substring(0, i); _tmp$61 = 28; _tmp$62 = layout.substring((i + 3 >> 0)); prefix = _tmp$60; std = _tmp$61; suffix = _tmp$62; + return [prefix, std, suffix]; + } + } else if (_ref === 90) { + if (layout.length >= (i + 7 >> 0) && layout.substring(i, (i + 7 >> 0)) === "Z070000") { + _tmp$63 = layout.substring(0, i); _tmp$64 = 23; _tmp$65 = layout.substring((i + 7 >> 0)); prefix = _tmp$63; std = _tmp$64; suffix = _tmp$65; + return [prefix, std, suffix]; + } + if (layout.length >= (i + 9 >> 0) && layout.substring(i, (i + 9 >> 0)) === "Z07:00:00") { + _tmp$66 = layout.substring(0, i); _tmp$67 = 25; _tmp$68 = layout.substring((i + 9 >> 0)); prefix = _tmp$66; std = _tmp$67; suffix = _tmp$68; + return [prefix, std, suffix]; + } + if (layout.length >= (i + 5 >> 0) && layout.substring(i, (i + 5 >> 0)) === "Z0700") { + _tmp$69 = layout.substring(0, i); _tmp$70 = 22; _tmp$71 = layout.substring((i + 5 >> 0)); prefix = _tmp$69; std = _tmp$70; suffix = _tmp$71; + return [prefix, std, suffix]; + } + if (layout.length >= (i + 6 >> 0) && layout.substring(i, (i + 6 >> 0)) === "Z07:00") { + _tmp$72 = layout.substring(0, i); _tmp$73 = 24; _tmp$74 = layout.substring((i + 6 >> 0)); prefix = _tmp$72; std = _tmp$73; suffix = _tmp$74; + return [prefix, std, suffix]; + } + } else if (_ref === 46) { + if ((i + 1 >> 0) < layout.length && ((layout.charCodeAt((i + 1 >> 0)) === 48) || (layout.charCodeAt((i + 1 >> 0)) === 57))) { + ch = layout.charCodeAt((i + 1 >> 0)); + j = i + 1 >> 0; + while (true) { + if (!(j < layout.length && (layout.charCodeAt(j) === ch))) { break; } + j = j + (1) >> 0; + } + if (!isDigit(layout, j)) { + std$1 = 31; + if (layout.charCodeAt((i + 1 >> 0)) === 57) { + std$1 = 32; + } + std$1 = std$1 | ((((j - ((i + 1 >> 0)) >> 0)) << 16 >> 0)); + _tmp$75 = layout.substring(0, i); _tmp$76 = std$1; _tmp$77 = layout.substring(j); prefix = _tmp$75; std = _tmp$76; suffix = _tmp$77; + return [prefix, std, suffix]; + } + } + } + i = i + (1) >> 0; + } + _tmp$78 = layout; _tmp$79 = 0; _tmp$80 = ""; prefix = _tmp$78; std = _tmp$79; suffix = _tmp$80; + return [prefix, std, suffix]; + }; + match = function(s1, s2) { + var c1, c2, i, s1, s2; + i = 0; + while (true) { + if (!(i < s1.length)) { break; } + c1 = s1.charCodeAt(i); + c2 = s2.charCodeAt(i); + if (!((c1 === c2))) { + c1 = (c1 | (32)) >>> 0; + c2 = (c2 | (32)) >>> 0; + if (!((c1 === c2)) || c1 < 97 || c1 > 122) { + return false; + } + } + i = i + (1) >> 0; + } + return true; + }; + lookup = function(tab, val) { + var _i, _ref, i, tab, v, val; + _ref = tab; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + v = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (val.length >= v.length && match(val.substring(0, v.length), v)) { + return [i, val.substring(v.length), $ifaceNil]; + } + _i++; + } + return [-1, val, errBad]; + }; + appendUint = function(b, x, pad) { + var _q, _q$1, _r$1, _r$2, b, buf, n, pad, x; + if (x < 10) { + if (!((pad === 0))) { + b = $append(b, pad); + } + return $append(b, ((48 + x >>> 0) << 24 >>> 24)); + } + if (x < 100) { + b = $append(b, ((48 + (_q = x / 10, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")) >>> 0) << 24 >>> 24)); + b = $append(b, ((48 + (_r$1 = x % 10, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) >>> 0) << 24 >>> 24)); + return b; + } + buf = $clone(arrayType.zero(), arrayType); + n = 32; + if (x === 0) { + return $append(b, 48); + } + while (true) { + if (!(x >= 10)) { break; } + n = n - (1) >> 0; + (n < 0 || n >= buf.length) ? $throwRuntimeError("index out of range") : buf[n] = (((_r$2 = x % 10, _r$2 === _r$2 ? _r$2 : $throwRuntimeError("integer divide by zero")) + 48 >>> 0) << 24 >>> 24); + x = (_q$1 = x / (10), (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >>> 0 : $throwRuntimeError("integer divide by zero")); + } + n = n - (1) >> 0; + (n < 0 || n >= buf.length) ? $throwRuntimeError("index out of range") : buf[n] = ((x + 48 >>> 0) << 24 >>> 24); + return $appendSlice(b, $subslice(new sliceType$3(buf), n)); + }; + atoi = function(s) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple$1, err = $ifaceNil, neg, q, rem, s, x = 0; + neg = false; + if (!(s === "") && ((s.charCodeAt(0) === 45) || (s.charCodeAt(0) === 43))) { + neg = s.charCodeAt(0) === 45; + s = s.substring(1); + } + _tuple$1 = leadingInt(s); q = _tuple$1[0]; rem = _tuple$1[1]; err = _tuple$1[2]; + x = ((q.$low + ((q.$high >> 31) * 4294967296)) >> 0); + if (!($interfaceIsEqual(err, $ifaceNil)) || !(rem === "")) { + _tmp = 0; _tmp$1 = atoiError; x = _tmp; err = _tmp$1; + return [x, err]; + } + if (neg) { + x = -x; + } + _tmp$2 = x; _tmp$3 = $ifaceNil; x = _tmp$2; err = _tmp$3; + return [x, err]; + }; + formatNano = function(b, nanosec, n, trim) { + var _q, _r$1, b, buf, n, nanosec, start, trim, u, x; + u = nanosec; + buf = $clone(arrayType$1.zero(), arrayType$1); + start = 9; + while (true) { + if (!(start > 0)) { break; } + start = start - (1) >> 0; + (start < 0 || start >= buf.length) ? $throwRuntimeError("index out of range") : buf[start] = (((_r$1 = u % 10, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) + 48 >>> 0) << 24 >>> 24); + u = (_q = u / (10), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); + } + if (n > 9) { + n = 9; + } + if (trim) { + while (true) { + if (!(n > 0 && ((x = n - 1 >> 0, ((x < 0 || x >= buf.length) ? $throwRuntimeError("index out of range") : buf[x])) === 48))) { break; } + n = n - (1) >> 0; + } + if (n === 0) { + return b; + } + } + b = $append(b, 46); + return $appendSlice(b, $subslice(new sliceType$3(buf), 0, n)); + }; + Time.ptr.prototype.String = function() { + var t; + t = $clone(this, Time); + return t.Format("2006-01-02 15:04:05.999999999 -0700 MST"); + }; + Time.prototype.String = function() { return this.$val.String(); }; + Time.ptr.prototype.Format = function(layout) { + var _q, _q$1, _q$2, _q$3, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _ref, _tuple$1, _tuple$2, _tuple$3, _tuple$4, abs, absoffset, b, buf, day, hour, hr, hr$1, layout, m, max, min, month, name, offset, prefix, s, sec, std, suffix, t, y, y$1, year, zone$1, zone$2; + t = $clone(this, Time); + _tuple$1 = t.locabs(); name = _tuple$1[0]; offset = _tuple$1[1]; abs = _tuple$1[2]; + year = -1; + month = 0; + day = 0; + hour = -1; + min = 0; + sec = 0; + b = sliceType$3.nil; + buf = $clone(arrayType$2.zero(), arrayType$2); + max = layout.length + 10 >> 0; + if (max <= 64) { + b = $subslice(new sliceType$3(buf), 0, 0); + } else { + b = $makeSlice(sliceType$3, 0, max); + } + while (true) { + if (!(!(layout === ""))) { break; } + _tuple$2 = nextStdChunk(layout); prefix = _tuple$2[0]; std = _tuple$2[1]; suffix = _tuple$2[2]; + if (!(prefix === "")) { + b = $appendSlice(b, new sliceType$3($stringToBytes(prefix))); + } + if (std === 0) { + break; + } + layout = suffix; + if (year < 0 && !(((std & 256) === 0))) { + _tuple$3 = absDate(abs, true); year = _tuple$3[0]; month = _tuple$3[1]; day = _tuple$3[2]; + } + if (hour < 0 && !(((std & 512) === 0))) { + _tuple$4 = absClock(abs); hour = _tuple$4[0]; min = _tuple$4[1]; sec = _tuple$4[2]; + } + _ref = std & 65535; + switch (0) { default: if (_ref === 274) { + y = year; + if (y < 0) { + y = -y; + } + b = appendUint(b, ((_r$1 = y % 100, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) >>> 0), 48); + } else if (_ref === 273) { + y$1 = year; + if (year <= -1000) { + b = $append(b, 45); + y$1 = -y$1; + } else if (year <= -100) { + b = $appendSlice(b, new sliceType$3($stringToBytes("-0"))); + y$1 = -y$1; + } else if (year <= -10) { + b = $appendSlice(b, new sliceType$3($stringToBytes("-00"))); + y$1 = -y$1; + } else if (year < 0) { + b = $appendSlice(b, new sliceType$3($stringToBytes("-000"))); + y$1 = -y$1; + } else if (year < 10) { + b = $appendSlice(b, new sliceType$3($stringToBytes("000"))); + } else if (year < 100) { + b = $appendSlice(b, new sliceType$3($stringToBytes("00"))); + } else if (year < 1000) { + b = $append(b, 48); + } + b = appendUint(b, (y$1 >>> 0), 0); + } else if (_ref === 258) { + b = $appendSlice(b, new sliceType$3($stringToBytes(new Month(month).String().substring(0, 3)))); + } else if (_ref === 257) { + m = new Month(month).String(); + b = $appendSlice(b, new sliceType$3($stringToBytes(m))); + } else if (_ref === 259) { + b = appendUint(b, (month >>> 0), 0); + } else if (_ref === 260) { + b = appendUint(b, (month >>> 0), 48); + } else if (_ref === 262) { + b = $appendSlice(b, new sliceType$3($stringToBytes(new Weekday(absWeekday(abs)).String().substring(0, 3)))); + } else if (_ref === 261) { + s = new Weekday(absWeekday(abs)).String(); + b = $appendSlice(b, new sliceType$3($stringToBytes(s))); + } else if (_ref === 263) { + b = appendUint(b, (day >>> 0), 0); + } else if (_ref === 264) { + b = appendUint(b, (day >>> 0), 32); + } else if (_ref === 265) { + b = appendUint(b, (day >>> 0), 48); + } else if (_ref === 522) { + b = appendUint(b, (hour >>> 0), 48); + } else if (_ref === 523) { + hr = (_r$2 = hour % 12, _r$2 === _r$2 ? _r$2 : $throwRuntimeError("integer divide by zero")); + if (hr === 0) { + hr = 12; + } + b = appendUint(b, (hr >>> 0), 0); + } else if (_ref === 524) { + hr$1 = (_r$3 = hour % 12, _r$3 === _r$3 ? _r$3 : $throwRuntimeError("integer divide by zero")); + if (hr$1 === 0) { + hr$1 = 12; + } + b = appendUint(b, (hr$1 >>> 0), 48); + } else if (_ref === 525) { + b = appendUint(b, (min >>> 0), 0); + } else if (_ref === 526) { + b = appendUint(b, (min >>> 0), 48); + } else if (_ref === 527) { + b = appendUint(b, (sec >>> 0), 0); + } else if (_ref === 528) { + b = appendUint(b, (sec >>> 0), 48); + } else if (_ref === 531) { + if (hour >= 12) { + b = $appendSlice(b, new sliceType$3($stringToBytes("PM"))); + } else { + b = $appendSlice(b, new sliceType$3($stringToBytes("AM"))); + } + } else if (_ref === 532) { + if (hour >= 12) { + b = $appendSlice(b, new sliceType$3($stringToBytes("pm"))); + } else { + b = $appendSlice(b, new sliceType$3($stringToBytes("am"))); + } + } else if (_ref === 22 || _ref === 24 || _ref === 23 || _ref === 25 || _ref === 26 || _ref === 29 || _ref === 27 || _ref === 30) { + if ((offset === 0) && ((std === 22) || (std === 24) || (std === 23) || (std === 25))) { + b = $append(b, 90); + break; + } + zone$1 = (_q = offset / 60, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + absoffset = offset; + if (zone$1 < 0) { + b = $append(b, 45); + zone$1 = -zone$1; + absoffset = -absoffset; + } else { + b = $append(b, 43); + } + b = appendUint(b, ((_q$1 = zone$1 / 60, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")) >>> 0), 48); + if ((std === 24) || (std === 29) || (std === 25) || (std === 30)) { + b = $append(b, 58); + } + b = appendUint(b, ((_r$4 = zone$1 % 60, _r$4 === _r$4 ? _r$4 : $throwRuntimeError("integer divide by zero")) >>> 0), 48); + if ((std === 23) || (std === 27) || (std === 30) || (std === 25)) { + if ((std === 30) || (std === 25)) { + b = $append(b, 58); + } + b = appendUint(b, ((_r$5 = absoffset % 60, _r$5 === _r$5 ? _r$5 : $throwRuntimeError("integer divide by zero")) >>> 0), 48); + } + } else if (_ref === 21) { + if (!(name === "")) { + b = $appendSlice(b, new sliceType$3($stringToBytes(name))); + break; + } + zone$2 = (_q$2 = offset / 60, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero")); + if (zone$2 < 0) { + b = $append(b, 45); + zone$2 = -zone$2; + } else { + b = $append(b, 43); + } + b = appendUint(b, ((_q$3 = zone$2 / 60, (_q$3 === _q$3 && _q$3 !== 1/0 && _q$3 !== -1/0) ? _q$3 >> 0 : $throwRuntimeError("integer divide by zero")) >>> 0), 48); + b = appendUint(b, ((_r$6 = zone$2 % 60, _r$6 === _r$6 ? _r$6 : $throwRuntimeError("integer divide by zero")) >>> 0), 48); + } else if (_ref === 31 || _ref === 32) { + b = formatNano(b, (t.Nanosecond() >>> 0), std >> 16 >> 0, (std & 65535) === 32); + } } + } + return $bytesToString(b); + }; + Time.prototype.Format = function(layout) { return this.$val.Format(layout); }; + quote = function(s) { + var s; + return "\"" + s + "\""; + }; + ParseError.ptr.prototype.Error = function() { + var e; + e = this; + if (e.Message === "") { + return "parsing time " + quote(e.Value) + " as " + quote(e.Layout) + ": cannot parse " + quote(e.ValueElem) + " as " + quote(e.LayoutElem); + } + return "parsing time " + quote(e.Value) + e.Message; + }; + ParseError.prototype.Error = function() { return this.$val.Error(); }; + isDigit = function(s, i) { + var c, i, s; + if (s.length <= i) { + return false; + } + c = s.charCodeAt(i); + return 48 <= c && c <= 57; + }; + getnum = function(s, fixed) { + var fixed, s; + if (!isDigit(s, 0)) { + return [0, s, errBad]; + } + if (!isDigit(s, 1)) { + if (fixed) { + return [0, s, errBad]; + } + return [((s.charCodeAt(0) - 48 << 24 >>> 24) >> 0), s.substring(1), $ifaceNil]; + } + return [(((s.charCodeAt(0) - 48 << 24 >>> 24) >> 0) * 10 >> 0) + ((s.charCodeAt(1) - 48 << 24 >>> 24) >> 0) >> 0, s.substring(2), $ifaceNil]; + }; + cutspace = function(s) { + var s; + while (true) { + if (!(s.length > 0 && (s.charCodeAt(0) === 32))) { break; } + s = s.substring(1); + } + return s; + }; + skip = function(value, prefix) { + var prefix, value; + while (true) { + if (!(prefix.length > 0)) { break; } + if (prefix.charCodeAt(0) === 32) { + if (value.length > 0 && !((value.charCodeAt(0) === 32))) { + return [value, errBad]; + } + prefix = cutspace(prefix); + value = cutspace(value); + continue; + } + if ((value.length === 0) || !((value.charCodeAt(0) === prefix.charCodeAt(0)))) { + return [value, errBad]; + } + prefix = prefix.substring(1); + value = value.substring(1); + } + return [value, $ifaceNil]; + }; + Parse = $pkg.Parse = function(layout, value) { + var layout, value; + return parse(layout, value, $pkg.UTC, $pkg.Local); + }; + parse = function(layout, value, defaultLocation, local) { + var _ref, _ref$1, _ref$2, _ref$3, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$13, _tuple$14, _tuple$15, _tuple$16, _tuple$17, _tuple$18, _tuple$19, _tuple$2, _tuple$20, _tuple$21, _tuple$22, _tuple$23, _tuple$24, _tuple$25, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, alayout, amSet, avalue, day, defaultLocation, err, hour, hour$1, hr, i, layout, local, min, min$1, mm, month, n, n$1, name, ndigit, nsec, offset, offset$1, ok, ok$1, p, pmSet, prefix, rangeErrString, sec, seconds, sign, ss, std, stdstr, suffix, t, t$1, value, x, x$1, x$2, x$3, x$4, x$5, year, z, zoneName, zoneOffset; + _tmp = layout; _tmp$1 = value; alayout = _tmp; avalue = _tmp$1; + rangeErrString = ""; + amSet = false; + pmSet = false; + year = 0; + month = 1; + day = 1; + hour = 0; + min = 0; + sec = 0; + nsec = 0; + z = ptrType$1.nil; + zoneOffset = -1; + zoneName = ""; + while (true) { + if (!(true)) { break; } + err = $ifaceNil; + _tuple$1 = nextStdChunk(layout); prefix = _tuple$1[0]; std = _tuple$1[1]; suffix = _tuple$1[2]; + stdstr = layout.substring(prefix.length, (layout.length - suffix.length >> 0)); + _tuple$2 = skip(value, prefix); value = _tuple$2[0]; err = _tuple$2[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new Time.ptr(new $Int64(0, 0), 0, ptrType$1.nil), new ParseError.ptr(alayout, avalue, prefix, value, "")]; + } + if (std === 0) { + if (!((value.length === 0))) { + return [new Time.ptr(new $Int64(0, 0), 0, ptrType$1.nil), new ParseError.ptr(alayout, avalue, "", value, ": extra text: " + value)]; + } + break; + } + layout = suffix; + p = ""; + _ref = std & 65535; + switch (0) { default: if (_ref === 274) { + if (value.length < 2) { + err = errBad; + break; + } + _tmp$2 = value.substring(0, 2); _tmp$3 = value.substring(2); p = _tmp$2; value = _tmp$3; + _tuple$3 = atoi(p); year = _tuple$3[0]; err = _tuple$3[1]; + if (year >= 69) { + year = year + (1900) >> 0; + } else { + year = year + (2000) >> 0; + } + } else if (_ref === 273) { + if (value.length < 4 || !isDigit(value, 0)) { + err = errBad; + break; + } + _tmp$4 = value.substring(0, 4); _tmp$5 = value.substring(4); p = _tmp$4; value = _tmp$5; + _tuple$4 = atoi(p); year = _tuple$4[0]; err = _tuple$4[1]; + } else if (_ref === 258) { + _tuple$5 = lookup(shortMonthNames, value); month = _tuple$5[0]; value = _tuple$5[1]; err = _tuple$5[2]; + } else if (_ref === 257) { + _tuple$6 = lookup(longMonthNames, value); month = _tuple$6[0]; value = _tuple$6[1]; err = _tuple$6[2]; + } else if (_ref === 259 || _ref === 260) { + _tuple$7 = getnum(value, std === 260); month = _tuple$7[0]; value = _tuple$7[1]; err = _tuple$7[2]; + if (month <= 0 || 12 < month) { + rangeErrString = "month"; + } + } else if (_ref === 262) { + _tuple$8 = lookup(shortDayNames, value); value = _tuple$8[1]; err = _tuple$8[2]; + } else if (_ref === 261) { + _tuple$9 = lookup(longDayNames, value); value = _tuple$9[1]; err = _tuple$9[2]; + } else if (_ref === 263 || _ref === 264 || _ref === 265) { + if ((std === 264) && value.length > 0 && (value.charCodeAt(0) === 32)) { + value = value.substring(1); + } + _tuple$10 = getnum(value, std === 265); day = _tuple$10[0]; value = _tuple$10[1]; err = _tuple$10[2]; + if (day < 0 || 31 < day) { + rangeErrString = "day"; + } + } else if (_ref === 522) { + _tuple$11 = getnum(value, false); hour = _tuple$11[0]; value = _tuple$11[1]; err = _tuple$11[2]; + if (hour < 0 || 24 <= hour) { + rangeErrString = "hour"; + } + } else if (_ref === 523 || _ref === 524) { + _tuple$12 = getnum(value, std === 524); hour = _tuple$12[0]; value = _tuple$12[1]; err = _tuple$12[2]; + if (hour < 0 || 12 < hour) { + rangeErrString = "hour"; + } + } else if (_ref === 525 || _ref === 526) { + _tuple$13 = getnum(value, std === 526); min = _tuple$13[0]; value = _tuple$13[1]; err = _tuple$13[2]; + if (min < 0 || 60 <= min) { + rangeErrString = "minute"; + } + } else if (_ref === 527 || _ref === 528) { + _tuple$14 = getnum(value, std === 528); sec = _tuple$14[0]; value = _tuple$14[1]; err = _tuple$14[2]; + if (sec < 0 || 60 <= sec) { + rangeErrString = "second"; + } + if (value.length >= 2 && (value.charCodeAt(0) === 46) && isDigit(value, 1)) { + _tuple$15 = nextStdChunk(layout); std = _tuple$15[1]; + std = std & (65535); + if ((std === 31) || (std === 32)) { + break; + } + n = 2; + while (true) { + if (!(n < value.length && isDigit(value, n))) { break; } + n = n + (1) >> 0; + } + _tuple$16 = parseNanoseconds(value, n); nsec = _tuple$16[0]; rangeErrString = _tuple$16[1]; err = _tuple$16[2]; + value = value.substring(n); + } + } else if (_ref === 531) { + if (value.length < 2) { + err = errBad; + break; + } + _tmp$6 = value.substring(0, 2); _tmp$7 = value.substring(2); p = _tmp$6; value = _tmp$7; + _ref$1 = p; + if (_ref$1 === "PM") { + pmSet = true; + } else if (_ref$1 === "AM") { + amSet = true; + } else { + err = errBad; + } + } else if (_ref === 532) { + if (value.length < 2) { + err = errBad; + break; + } + _tmp$8 = value.substring(0, 2); _tmp$9 = value.substring(2); p = _tmp$8; value = _tmp$9; + _ref$2 = p; + if (_ref$2 === "pm") { + pmSet = true; + } else if (_ref$2 === "am") { + amSet = true; + } else { + err = errBad; + } + } else if (_ref === 22 || _ref === 24 || _ref === 23 || _ref === 25 || _ref === 26 || _ref === 28 || _ref === 29 || _ref === 27 || _ref === 30) { + if (((std === 22) || (std === 24)) && value.length >= 1 && (value.charCodeAt(0) === 90)) { + value = value.substring(1); + z = $pkg.UTC; + break; + } + _tmp$10 = ""; _tmp$11 = ""; _tmp$12 = ""; _tmp$13 = ""; sign = _tmp$10; hour$1 = _tmp$11; min$1 = _tmp$12; seconds = _tmp$13; + if ((std === 24) || (std === 29)) { + if (value.length < 6) { + err = errBad; + break; + } + if (!((value.charCodeAt(3) === 58))) { + err = errBad; + break; + } + _tmp$14 = value.substring(0, 1); _tmp$15 = value.substring(1, 3); _tmp$16 = value.substring(4, 6); _tmp$17 = "00"; _tmp$18 = value.substring(6); sign = _tmp$14; hour$1 = _tmp$15; min$1 = _tmp$16; seconds = _tmp$17; value = _tmp$18; + } else if (std === 28) { + if (value.length < 3) { + err = errBad; + break; + } + _tmp$19 = value.substring(0, 1); _tmp$20 = value.substring(1, 3); _tmp$21 = "00"; _tmp$22 = "00"; _tmp$23 = value.substring(3); sign = _tmp$19; hour$1 = _tmp$20; min$1 = _tmp$21; seconds = _tmp$22; value = _tmp$23; + } else if ((std === 25) || (std === 30)) { + if (value.length < 9) { + err = errBad; + break; + } + if (!((value.charCodeAt(3) === 58)) || !((value.charCodeAt(6) === 58))) { + err = errBad; + break; + } + _tmp$24 = value.substring(0, 1); _tmp$25 = value.substring(1, 3); _tmp$26 = value.substring(4, 6); _tmp$27 = value.substring(7, 9); _tmp$28 = value.substring(9); sign = _tmp$24; hour$1 = _tmp$25; min$1 = _tmp$26; seconds = _tmp$27; value = _tmp$28; + } else if ((std === 23) || (std === 27)) { + if (value.length < 7) { + err = errBad; + break; + } + _tmp$29 = value.substring(0, 1); _tmp$30 = value.substring(1, 3); _tmp$31 = value.substring(3, 5); _tmp$32 = value.substring(5, 7); _tmp$33 = value.substring(7); sign = _tmp$29; hour$1 = _tmp$30; min$1 = _tmp$31; seconds = _tmp$32; value = _tmp$33; + } else { + if (value.length < 5) { + err = errBad; + break; + } + _tmp$34 = value.substring(0, 1); _tmp$35 = value.substring(1, 3); _tmp$36 = value.substring(3, 5); _tmp$37 = "00"; _tmp$38 = value.substring(5); sign = _tmp$34; hour$1 = _tmp$35; min$1 = _tmp$36; seconds = _tmp$37; value = _tmp$38; + } + _tmp$39 = 0; _tmp$40 = 0; _tmp$41 = 0; hr = _tmp$39; mm = _tmp$40; ss = _tmp$41; + _tuple$17 = atoi(hour$1); hr = _tuple$17[0]; err = _tuple$17[1]; + if ($interfaceIsEqual(err, $ifaceNil)) { + _tuple$18 = atoi(min$1); mm = _tuple$18[0]; err = _tuple$18[1]; + } + if ($interfaceIsEqual(err, $ifaceNil)) { + _tuple$19 = atoi(seconds); ss = _tuple$19[0]; err = _tuple$19[1]; + } + zoneOffset = ((((hr * 60 >> 0) + mm >> 0)) * 60 >> 0) + ss >> 0; + _ref$3 = sign.charCodeAt(0); + if (_ref$3 === 43) { + } else if (_ref$3 === 45) { + zoneOffset = -zoneOffset; + } else { + err = errBad; + } + } else if (_ref === 21) { + if (value.length >= 3 && value.substring(0, 3) === "UTC") { + z = $pkg.UTC; + value = value.substring(3); + break; + } + _tuple$20 = parseTimeZone(value); n$1 = _tuple$20[0]; ok = _tuple$20[1]; + if (!ok) { + err = errBad; + break; + } + _tmp$42 = value.substring(0, n$1); _tmp$43 = value.substring(n$1); zoneName = _tmp$42; value = _tmp$43; + } else if (_ref === 31) { + ndigit = 1 + ((std >> 16 >> 0)) >> 0; + if (value.length < ndigit) { + err = errBad; + break; + } + _tuple$21 = parseNanoseconds(value, ndigit); nsec = _tuple$21[0]; rangeErrString = _tuple$21[1]; err = _tuple$21[2]; + value = value.substring(ndigit); + } else if (_ref === 32) { + if (value.length < 2 || !((value.charCodeAt(0) === 46)) || value.charCodeAt(1) < 48 || 57 < value.charCodeAt(1)) { + break; + } + i = 0; + while (true) { + if (!(i < 9 && (i + 1 >> 0) < value.length && 48 <= value.charCodeAt((i + 1 >> 0)) && value.charCodeAt((i + 1 >> 0)) <= 57)) { break; } + i = i + (1) >> 0; + } + _tuple$22 = parseNanoseconds(value, 1 + i >> 0); nsec = _tuple$22[0]; rangeErrString = _tuple$22[1]; err = _tuple$22[2]; + value = value.substring((1 + i >> 0)); + } } + if (!(rangeErrString === "")) { + return [new Time.ptr(new $Int64(0, 0), 0, ptrType$1.nil), new ParseError.ptr(alayout, avalue, stdstr, value, ": " + rangeErrString + " out of range")]; + } + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new Time.ptr(new $Int64(0, 0), 0, ptrType$1.nil), new ParseError.ptr(alayout, avalue, stdstr, value, "")]; + } + } + if (pmSet && hour < 12) { + hour = hour + (12) >> 0; + } else if (amSet && (hour === 12)) { + hour = 0; + } + if (!(z === ptrType$1.nil)) { + return [Date(year, (month >> 0), day, hour, min, sec, nsec, z), $ifaceNil]; + } + if (!((zoneOffset === -1))) { + t = $clone(Date(year, (month >> 0), day, hour, min, sec, nsec, $pkg.UTC), Time); + t.sec = (x = t.sec, x$1 = new $Int64(0, zoneOffset), new $Int64(x.$high - x$1.$high, x.$low - x$1.$low)); + _tuple$23 = local.lookup((x$2 = t.sec, new $Int64(x$2.$high + -15, x$2.$low + 2288912640))); name = _tuple$23[0]; offset = _tuple$23[1]; + if ((offset === zoneOffset) && (zoneName === "" || name === zoneName)) { + t.loc = local; + return [t, $ifaceNil]; + } + t.loc = FixedZone(zoneName, zoneOffset); + return [t, $ifaceNil]; + } + if (!(zoneName === "")) { + t$1 = $clone(Date(year, (month >> 0), day, hour, min, sec, nsec, $pkg.UTC), Time); + _tuple$24 = local.lookupName(zoneName, (x$3 = t$1.sec, new $Int64(x$3.$high + -15, x$3.$low + 2288912640))); offset$1 = _tuple$24[0]; ok$1 = _tuple$24[2]; + if (ok$1) { + t$1.sec = (x$4 = t$1.sec, x$5 = new $Int64(0, offset$1), new $Int64(x$4.$high - x$5.$high, x$4.$low - x$5.$low)); + t$1.loc = local; + return [t$1, $ifaceNil]; + } + if (zoneName.length > 3 && zoneName.substring(0, 3) === "GMT") { + _tuple$25 = atoi(zoneName.substring(3)); offset$1 = _tuple$25[0]; + offset$1 = offset$1 * (3600) >> 0; + } + t$1.loc = FixedZone(zoneName, offset$1); + return [t$1, $ifaceNil]; + } + return [Date(year, (month >> 0), day, hour, min, sec, nsec, defaultLocation), $ifaceNil]; + }; + parseTimeZone = function(value) { + var _ref, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, c, length = 0, nUpper, ok = false, value; + if (value.length < 3) { + _tmp = 0; _tmp$1 = false; length = _tmp; ok = _tmp$1; + return [length, ok]; + } + if (value.length >= 4 && (value.substring(0, 4) === "ChST" || value.substring(0, 4) === "MeST")) { + _tmp$2 = 4; _tmp$3 = true; length = _tmp$2; ok = _tmp$3; + return [length, ok]; + } + if (value.substring(0, 3) === "GMT") { + length = parseGMT(value); + _tmp$4 = length; _tmp$5 = true; length = _tmp$4; ok = _tmp$5; + return [length, ok]; + } + nUpper = 0; + nUpper = 0; + while (true) { + if (!(nUpper < 6)) { break; } + if (nUpper >= value.length) { + break; + } + c = value.charCodeAt(nUpper); + if (c < 65 || 90 < c) { + break; + } + nUpper = nUpper + (1) >> 0; + } + _ref = nUpper; + if (_ref === 0 || _ref === 1 || _ref === 2 || _ref === 6) { + _tmp$6 = 0; _tmp$7 = false; length = _tmp$6; ok = _tmp$7; + return [length, ok]; + } else if (_ref === 5) { + if (value.charCodeAt(4) === 84) { + _tmp$8 = 5; _tmp$9 = true; length = _tmp$8; ok = _tmp$9; + return [length, ok]; + } + } else if (_ref === 4) { + if (value.charCodeAt(3) === 84) { + _tmp$10 = 4; _tmp$11 = true; length = _tmp$10; ok = _tmp$11; + return [length, ok]; + } + } else if (_ref === 3) { + _tmp$12 = 3; _tmp$13 = true; length = _tmp$12; ok = _tmp$13; + return [length, ok]; + } + _tmp$14 = 0; _tmp$15 = false; length = _tmp$14; ok = _tmp$15; + return [length, ok]; + }; + parseGMT = function(value) { + var _tuple$1, err, rem, sign, value, x; + value = value.substring(3); + if (value.length === 0) { + return 3; + } + sign = value.charCodeAt(0); + if (!((sign === 45)) && !((sign === 43))) { + return 3; + } + _tuple$1 = leadingInt(value.substring(1)); x = _tuple$1[0]; rem = _tuple$1[1]; err = _tuple$1[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return 3; + } + if (sign === 45) { + x = new $Int64(-x.$high, -x.$low); + } + if ((x.$high === 0 && x.$low === 0) || (x.$high < -1 || (x.$high === -1 && x.$low < 4294967282)) || (0 < x.$high || (0 === x.$high && 12 < x.$low))) { + return 3; + } + return (3 + value.length >> 0) - rem.length >> 0; + }; + parseNanoseconds = function(value, nbytes) { + var _tuple$1, err = $ifaceNil, i, nbytes, ns = 0, rangeErrString = "", scaleDigits, value; + if (!((value.charCodeAt(0) === 46))) { + err = errBad; + return [ns, rangeErrString, err]; + } + _tuple$1 = atoi(value.substring(1, nbytes)); ns = _tuple$1[0]; err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [ns, rangeErrString, err]; + } + if (ns < 0 || 1000000000 <= ns) { + rangeErrString = "fractional second"; + return [ns, rangeErrString, err]; + } + scaleDigits = 10 - nbytes >> 0; + i = 0; + while (true) { + if (!(i < scaleDigits)) { break; } + ns = ns * (10) >> 0; + i = i + (1) >> 0; + } + return [ns, rangeErrString, err]; + }; + leadingInt = function(s) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, c, err = $ifaceNil, i, rem = "", s, x = new $Int64(0, 0), x$1, x$2, x$3; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + c = s.charCodeAt(i); + if (c < 48 || c > 57) { + break; + } + if ((x.$high > 214748364 || (x.$high === 214748364 && x.$low >= 3435973835))) { + _tmp = new $Int64(0, 0); _tmp$1 = ""; _tmp$2 = errLeadingInt; x = _tmp; rem = _tmp$1; err = _tmp$2; + return [x, rem, err]; + } + x = (x$1 = (x$2 = $mul64(x, new $Int64(0, 10)), x$3 = new $Int64(0, c), new $Int64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)), new $Int64(x$1.$high - 0, x$1.$low - 48)); + i = i + (1) >> 0; + } + _tmp$3 = x; _tmp$4 = s.substring(i); _tmp$5 = $ifaceNil; x = _tmp$3; rem = _tmp$4; err = _tmp$5; + return [x, rem, err]; + }; + ParseDuration = $pkg.ParseDuration = function(s) { + var _entry, _tuple$1, _tuple$2, _tuple$3, c, c$1, err, f, g, i, n, neg, ok, orig, pl, pl$1, post, pre, s, scale, u, unit, x; + orig = s; + f = 0; + neg = false; + if (!(s === "")) { + c = s.charCodeAt(0); + if ((c === 45) || (c === 43)) { + neg = c === 45; + s = s.substring(1); + } + } + if (s === "0") { + return [new Duration(0, 0), $ifaceNil]; + } + if (s === "") { + return [new Duration(0, 0), errors.New("time: invalid duration " + orig)]; + } + while (true) { + if (!(!(s === ""))) { break; } + g = 0; + x = new $Int64(0, 0); + err = $ifaceNil; + if (!((s.charCodeAt(0) === 46) || (48 <= s.charCodeAt(0) && s.charCodeAt(0) <= 57))) { + return [new Duration(0, 0), errors.New("time: invalid duration " + orig)]; + } + pl = s.length; + _tuple$1 = leadingInt(s); x = _tuple$1[0]; s = _tuple$1[1]; err = _tuple$1[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new Duration(0, 0), errors.New("time: invalid duration " + orig)]; + } + g = $flatten64(x); + pre = !((pl === s.length)); + post = false; + if (!(s === "") && (s.charCodeAt(0) === 46)) { + s = s.substring(1); + pl$1 = s.length; + _tuple$2 = leadingInt(s); x = _tuple$2[0]; s = _tuple$2[1]; err = _tuple$2[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new Duration(0, 0), errors.New("time: invalid duration " + orig)]; + } + scale = 1; + n = pl$1 - s.length >> 0; + while (true) { + if (!(n > 0)) { break; } + scale = scale * (10); + n = n - (1) >> 0; + } + g = g + ($flatten64(x) / scale); + post = !((pl$1 === s.length)); + } + if (!pre && !post) { + return [new Duration(0, 0), errors.New("time: invalid duration " + orig)]; + } + i = 0; + while (true) { + if (!(i < s.length)) { break; } + c$1 = s.charCodeAt(i); + if ((c$1 === 46) || (48 <= c$1 && c$1 <= 57)) { + break; + } + i = i + (1) >> 0; + } + if (i === 0) { + return [new Duration(0, 0), errors.New("time: missing unit in duration " + orig)]; + } + u = s.substring(0, i); + s = s.substring(i); + _tuple$3 = (_entry = unitMap[u], _entry !== undefined ? [_entry.v, true] : [0, false]); unit = _tuple$3[0]; ok = _tuple$3[1]; + if (!ok) { + return [new Duration(0, 0), errors.New("time: unknown unit " + u + " in duration " + orig)]; + } + f = f + (g * unit); + } + if (neg) { + f = -f; + } + if (f < -9.223372036854776e+18 || f > 9.223372036854776e+18) { + return [new Duration(0, 0), errors.New("time: overflow parsing duration")]; + } + return [new Duration(0, f), $ifaceNil]; + }; + Time.ptr.prototype.After = function(u) { + var t, u, x, x$1, x$2, x$3; + t = $clone(this, Time); + u = $clone(u, Time); + return (x = t.sec, x$1 = u.sec, (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low > x$1.$low))) || (x$2 = t.sec, x$3 = u.sec, (x$2.$high === x$3.$high && x$2.$low === x$3.$low)) && t.nsec > u.nsec; + }; + Time.prototype.After = function(u) { return this.$val.After(u); }; + Time.ptr.prototype.Before = function(u) { + var t, u, x, x$1, x$2, x$3; + t = $clone(this, Time); + u = $clone(u, Time); + return (x = t.sec, x$1 = u.sec, (x.$high < x$1.$high || (x.$high === x$1.$high && x.$low < x$1.$low))) || (x$2 = t.sec, x$3 = u.sec, (x$2.$high === x$3.$high && x$2.$low === x$3.$low)) && t.nsec < u.nsec; + }; + Time.prototype.Before = function(u) { return this.$val.Before(u); }; + Time.ptr.prototype.Equal = function(u) { + var t, u, x, x$1; + t = $clone(this, Time); + u = $clone(u, Time); + return (x = t.sec, x$1 = u.sec, (x.$high === x$1.$high && x.$low === x$1.$low)) && (t.nsec === u.nsec); + }; + Time.prototype.Equal = function(u) { return this.$val.Equal(u); }; + Month.prototype.String = function() { + var m, x; + m = this.$val; + return (x = m - 1 >> 0, ((x < 0 || x >= months.length) ? $throwRuntimeError("index out of range") : months[x])); + }; + $ptrType(Month).prototype.String = function() { return new Month(this.$get()).String(); }; + Weekday.prototype.String = function() { + var d; + d = this.$val; + return ((d < 0 || d >= days.length) ? $throwRuntimeError("index out of range") : days[d]); + }; + $ptrType(Weekday).prototype.String = function() { return new Weekday(this.$get()).String(); }; + Time.ptr.prototype.IsZero = function() { + var t, x; + t = $clone(this, Time); + return (x = t.sec, (x.$high === 0 && x.$low === 0)) && (t.nsec === 0); + }; + Time.prototype.IsZero = function() { return this.$val.IsZero(); }; + Time.ptr.prototype.abs = function() { + var _tuple$1, l, offset, sec, t, x, x$1, x$2, x$3, x$4, x$5; + t = $clone(this, Time); + l = t.loc; + if (l === ptrType$1.nil || l === localLoc) { + l = l.get(); + } + sec = (x = t.sec, new $Int64(x.$high + -15, x.$low + 2288912640)); + if (!(l === utcLoc)) { + if (!(l.cacheZone === ptrType.nil) && (x$1 = l.cacheStart, (x$1.$high < sec.$high || (x$1.$high === sec.$high && x$1.$low <= sec.$low))) && (x$2 = l.cacheEnd, (sec.$high < x$2.$high || (sec.$high === x$2.$high && sec.$low < x$2.$low)))) { + sec = (x$3 = new $Int64(0, l.cacheZone.offset), new $Int64(sec.$high + x$3.$high, sec.$low + x$3.$low)); + } else { + _tuple$1 = l.lookup(sec); offset = _tuple$1[1]; + sec = (x$4 = new $Int64(0, offset), new $Int64(sec.$high + x$4.$high, sec.$low + x$4.$low)); + } + } + return (x$5 = new $Int64(sec.$high + 2147483646, sec.$low + 450480384), new $Uint64(x$5.$high, x$5.$low)); + }; + Time.prototype.abs = function() { return this.$val.abs(); }; + Time.ptr.prototype.locabs = function() { + var _tuple$1, abs = new $Uint64(0, 0), l, name = "", offset = 0, sec, t, x, x$1, x$2, x$3, x$4; + t = $clone(this, Time); + l = t.loc; + if (l === ptrType$1.nil || l === localLoc) { + l = l.get(); + } + sec = (x = t.sec, new $Int64(x.$high + -15, x.$low + 2288912640)); + if (!(l === utcLoc)) { + if (!(l.cacheZone === ptrType.nil) && (x$1 = l.cacheStart, (x$1.$high < sec.$high || (x$1.$high === sec.$high && x$1.$low <= sec.$low))) && (x$2 = l.cacheEnd, (sec.$high < x$2.$high || (sec.$high === x$2.$high && sec.$low < x$2.$low)))) { + name = l.cacheZone.name; + offset = l.cacheZone.offset; + } else { + _tuple$1 = l.lookup(sec); name = _tuple$1[0]; offset = _tuple$1[1]; + } + sec = (x$3 = new $Int64(0, offset), new $Int64(sec.$high + x$3.$high, sec.$low + x$3.$low)); + } else { + name = "UTC"; + } + abs = (x$4 = new $Int64(sec.$high + 2147483646, sec.$low + 450480384), new $Uint64(x$4.$high, x$4.$low)); + return [name, offset, abs]; + }; + Time.prototype.locabs = function() { return this.$val.locabs(); }; + Time.ptr.prototype.Date = function() { + var _tuple$1, day = 0, month = 0, t, year = 0; + t = $clone(this, Time); + _tuple$1 = t.date(true); year = _tuple$1[0]; month = _tuple$1[1]; day = _tuple$1[2]; + return [year, month, day]; + }; + Time.prototype.Date = function() { return this.$val.Date(); }; + Time.ptr.prototype.Year = function() { + var _tuple$1, t, year; + t = $clone(this, Time); + _tuple$1 = t.date(false); year = _tuple$1[0]; + return year; + }; + Time.prototype.Year = function() { return this.$val.Year(); }; + Time.ptr.prototype.Month = function() { + var _tuple$1, month, t; + t = $clone(this, Time); + _tuple$1 = t.date(true); month = _tuple$1[1]; + return month; + }; + Time.prototype.Month = function() { return this.$val.Month(); }; + Time.ptr.prototype.Day = function() { + var _tuple$1, day, t; + t = $clone(this, Time); + _tuple$1 = t.date(true); day = _tuple$1[2]; + return day; + }; + Time.prototype.Day = function() { return this.$val.Day(); }; + Time.ptr.prototype.Weekday = function() { + var t; + t = $clone(this, Time); + return absWeekday(t.abs()); + }; + Time.prototype.Weekday = function() { return this.$val.Weekday(); }; + absWeekday = function(abs) { + var _q, abs, sec; + sec = $div64((new $Uint64(abs.$high + 0, abs.$low + 86400)), new $Uint64(0, 604800), true); + return ((_q = (sec.$low >> 0) / 86400, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0); + }; + Time.ptr.prototype.ISOWeek = function() { + var _q, _r$1, _r$2, _r$3, _tuple$1, day, dec31wday, jan1wday, month, t, wday, week = 0, yday, year = 0; + t = $clone(this, Time); + _tuple$1 = t.date(true); year = _tuple$1[0]; month = _tuple$1[1]; day = _tuple$1[2]; yday = _tuple$1[3]; + wday = (_r$1 = ((t.Weekday() + 6 >> 0) >> 0) % 7, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")); + week = (_q = (((yday - wday >> 0) + 7 >> 0)) / 7, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + jan1wday = (_r$2 = (((wday - yday >> 0) + 371 >> 0)) % 7, _r$2 === _r$2 ? _r$2 : $throwRuntimeError("integer divide by zero")); + if (1 <= jan1wday && jan1wday <= 3) { + week = week + (1) >> 0; + } + if (week === 0) { + year = year - (1) >> 0; + week = 52; + if ((jan1wday === 4) || ((jan1wday === 5) && isLeap(year))) { + week = week + (1) >> 0; + } + } + if ((month === 12) && day >= 29 && wday < 3) { + dec31wday = (_r$3 = (((wday + 31 >> 0) - day >> 0)) % 7, _r$3 === _r$3 ? _r$3 : $throwRuntimeError("integer divide by zero")); + if (0 <= dec31wday && dec31wday <= 2) { + year = year + (1) >> 0; + week = 1; + } + } + return [year, week]; + }; + Time.prototype.ISOWeek = function() { return this.$val.ISOWeek(); }; + Time.ptr.prototype.Clock = function() { + var _tuple$1, hour = 0, min = 0, sec = 0, t; + t = $clone(this, Time); + _tuple$1 = absClock(t.abs()); hour = _tuple$1[0]; min = _tuple$1[1]; sec = _tuple$1[2]; + return [hour, min, sec]; + }; + Time.prototype.Clock = function() { return this.$val.Clock(); }; + absClock = function(abs) { + var _q, _q$1, abs, hour = 0, min = 0, sec = 0; + sec = ($div64(abs, new $Uint64(0, 86400), true).$low >> 0); + hour = (_q = sec / 3600, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + sec = sec - ((hour * 3600 >> 0)) >> 0; + min = (_q$1 = sec / 60, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")); + sec = sec - ((min * 60 >> 0)) >> 0; + return [hour, min, sec]; + }; + Time.ptr.prototype.Hour = function() { + var _q, t; + t = $clone(this, Time); + return (_q = ($div64(t.abs(), new $Uint64(0, 86400), true).$low >> 0) / 3600, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + }; + Time.prototype.Hour = function() { return this.$val.Hour(); }; + Time.ptr.prototype.Minute = function() { + var _q, t; + t = $clone(this, Time); + return (_q = ($div64(t.abs(), new $Uint64(0, 3600), true).$low >> 0) / 60, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + }; + Time.prototype.Minute = function() { return this.$val.Minute(); }; + Time.ptr.prototype.Second = function() { + var t; + t = $clone(this, Time); + return ($div64(t.abs(), new $Uint64(0, 60), true).$low >> 0); + }; + Time.prototype.Second = function() { return this.$val.Second(); }; + Time.ptr.prototype.Nanosecond = function() { + var t; + t = $clone(this, Time); + return (t.nsec >> 0); + }; + Time.prototype.Nanosecond = function() { return this.$val.Nanosecond(); }; + Time.ptr.prototype.YearDay = function() { + var _tuple$1, t, yday; + t = $clone(this, Time); + _tuple$1 = t.date(false); yday = _tuple$1[3]; + return yday + 1 >> 0; + }; + Time.prototype.YearDay = function() { return this.$val.YearDay(); }; + Duration.prototype.String = function() { + var _tuple$1, _tuple$2, buf, d, neg, prec, u, w; + d = this; + buf = $clone(arrayType.zero(), arrayType); + w = 32; + u = new $Uint64(d.$high, d.$low); + neg = (d.$high < 0 || (d.$high === 0 && d.$low < 0)); + if (neg) { + u = new $Uint64(-u.$high, -u.$low); + } + if ((u.$high < 0 || (u.$high === 0 && u.$low < 1000000000))) { + prec = 0; + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 115; + w = w - (1) >> 0; + if ((u.$high === 0 && u.$low === 0)) { + return "0"; + } else if ((u.$high < 0 || (u.$high === 0 && u.$low < 1000))) { + prec = 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 110; + } else if ((u.$high < 0 || (u.$high === 0 && u.$low < 1000000))) { + prec = 3; + w = w - (1) >> 0; + $copyString($subslice(new sliceType$3(buf), w), "\xC2\xB5"); + } else { + prec = 6; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 109; + } + _tuple$1 = fmtFrac($subslice(new sliceType$3(buf), 0, w), u, prec); w = _tuple$1[0]; u = _tuple$1[1]; + w = fmtInt($subslice(new sliceType$3(buf), 0, w), u); + } else { + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 115; + _tuple$2 = fmtFrac($subslice(new sliceType$3(buf), 0, w), u, 9); w = _tuple$2[0]; u = _tuple$2[1]; + w = fmtInt($subslice(new sliceType$3(buf), 0, w), $div64(u, new $Uint64(0, 60), true)); + u = $div64(u, (new $Uint64(0, 60)), false); + if ((u.$high > 0 || (u.$high === 0 && u.$low > 0))) { + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 109; + w = fmtInt($subslice(new sliceType$3(buf), 0, w), $div64(u, new $Uint64(0, 60), true)); + u = $div64(u, (new $Uint64(0, 60)), false); + if ((u.$high > 0 || (u.$high === 0 && u.$low > 0))) { + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 104; + w = fmtInt($subslice(new sliceType$3(buf), 0, w), u); + } + } + } + if (neg) { + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 45; + } + return $bytesToString($subslice(new sliceType$3(buf), w)); + }; + $ptrType(Duration).prototype.String = function() { return this.$get().String(); }; + fmtFrac = function(buf, v, prec) { + var _tmp, _tmp$1, buf, digit, i, nv = new $Uint64(0, 0), nw = 0, prec, print, v, w; + w = buf.$length; + print = false; + i = 0; + while (true) { + if (!(i < prec)) { break; } + digit = $div64(v, new $Uint64(0, 10), true); + print = print || !((digit.$high === 0 && digit.$low === 0)); + if (print) { + w = w - (1) >> 0; + (w < 0 || w >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + w] = (digit.$low << 24 >>> 24) + 48 << 24 >>> 24; + } + v = $div64(v, (new $Uint64(0, 10)), false); + i = i + (1) >> 0; + } + if (print) { + w = w - (1) >> 0; + (w < 0 || w >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + w] = 46; + } + _tmp = w; _tmp$1 = v; nw = _tmp; nv = _tmp$1; + return [nw, nv]; + }; + fmtInt = function(buf, v) { + var buf, v, w; + w = buf.$length; + if ((v.$high === 0 && v.$low === 0)) { + w = w - (1) >> 0; + (w < 0 || w >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + w] = 48; + } else { + while (true) { + if (!((v.$high > 0 || (v.$high === 0 && v.$low > 0)))) { break; } + w = w - (1) >> 0; + (w < 0 || w >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + w] = ($div64(v, new $Uint64(0, 10), true).$low << 24 >>> 24) + 48 << 24 >>> 24; + v = $div64(v, (new $Uint64(0, 10)), false); + } + } + return w; + }; + Duration.prototype.Nanoseconds = function() { + var d; + d = this; + return new $Int64(d.$high, d.$low); + }; + $ptrType(Duration).prototype.Nanoseconds = function() { return this.$get().Nanoseconds(); }; + Duration.prototype.Seconds = function() { + var d, nsec, sec; + d = this; + sec = $div64(d, new Duration(0, 1000000000), false); + nsec = $div64(d, new Duration(0, 1000000000), true); + return $flatten64(sec) + $flatten64(nsec) * 1e-09; + }; + $ptrType(Duration).prototype.Seconds = function() { return this.$get().Seconds(); }; + Duration.prototype.Minutes = function() { + var d, min, nsec; + d = this; + min = $div64(d, new Duration(13, 4165425152), false); + nsec = $div64(d, new Duration(13, 4165425152), true); + return $flatten64(min) + $flatten64(nsec) * 1.6666666666666667e-11; + }; + $ptrType(Duration).prototype.Minutes = function() { return this.$get().Minutes(); }; + Duration.prototype.Hours = function() { + var d, hour, nsec; + d = this; + hour = $div64(d, new Duration(838, 817405952), false); + nsec = $div64(d, new Duration(838, 817405952), true); + return $flatten64(hour) + $flatten64(nsec) * 2.777777777777778e-13; + }; + $ptrType(Duration).prototype.Hours = function() { return this.$get().Hours(); }; + Time.ptr.prototype.Add = function(d) { + var d, nsec, t, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7; + t = $clone(this, Time); + t.sec = (x = t.sec, x$1 = (x$2 = $div64(d, new Duration(0, 1000000000), false), new $Int64(x$2.$high, x$2.$low)), new $Int64(x.$high + x$1.$high, x.$low + x$1.$low)); + nsec = t.nsec + ((x$3 = $div64(d, new Duration(0, 1000000000), true), x$3.$low + ((x$3.$high >> 31) * 4294967296)) >> 0) >> 0; + if (nsec >= 1000000000) { + t.sec = (x$4 = t.sec, x$5 = new $Int64(0, 1), new $Int64(x$4.$high + x$5.$high, x$4.$low + x$5.$low)); + nsec = nsec - (1000000000) >> 0; + } else if (nsec < 0) { + t.sec = (x$6 = t.sec, x$7 = new $Int64(0, 1), new $Int64(x$6.$high - x$7.$high, x$6.$low - x$7.$low)); + nsec = nsec + (1000000000) >> 0; + } + t.nsec = nsec; + return t; + }; + Time.prototype.Add = function(d) { return this.$val.Add(d); }; + Time.ptr.prototype.Sub = function(u) { + var d, t, u, x, x$1, x$2, x$3, x$4; + t = $clone(this, Time); + u = $clone(u, Time); + d = (x = $mul64((x$1 = (x$2 = t.sec, x$3 = u.sec, new $Int64(x$2.$high - x$3.$high, x$2.$low - x$3.$low)), new Duration(x$1.$high, x$1.$low)), new Duration(0, 1000000000)), x$4 = new Duration(0, (t.nsec - u.nsec >> 0)), new Duration(x.$high + x$4.$high, x.$low + x$4.$low)); + if (u.Add(d).Equal(t)) { + return d; + } else if (t.Before(u)) { + return new Duration(-2147483648, 0); + } else { + return new Duration(2147483647, 4294967295); + } + }; + Time.prototype.Sub = function(u) { return this.$val.Sub(u); }; + Time.ptr.prototype.AddDate = function(years, months$1, days$1) { + var _tuple$1, _tuple$2, day, days$1, hour, min, month, months$1, sec, t, year, years; + t = $clone(this, Time); + _tuple$1 = t.Date(); year = _tuple$1[0]; month = _tuple$1[1]; day = _tuple$1[2]; + _tuple$2 = t.Clock(); hour = _tuple$2[0]; min = _tuple$2[1]; sec = _tuple$2[2]; + return Date(year + years >> 0, month + (months$1 >> 0) >> 0, day + days$1 >> 0, hour, min, sec, (t.nsec >> 0), t.loc); + }; + Time.prototype.AddDate = function(years, months$1, days$1) { return this.$val.AddDate(years, months$1, days$1); }; + Time.ptr.prototype.date = function(full) { + var _tuple$1, day = 0, full, month = 0, t, yday = 0, year = 0; + t = $clone(this, Time); + _tuple$1 = absDate(t.abs(), full); year = _tuple$1[0]; month = _tuple$1[1]; day = _tuple$1[2]; yday = _tuple$1[3]; + return [year, month, day, yday]; + }; + Time.prototype.date = function(full) { return this.$val.date(full); }; + absDate = function(abs, full) { + var _q, abs, begin, d, day = 0, end, full, month = 0, n, x, x$1, x$10, x$11, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, y, yday = 0, year = 0; + d = $div64(abs, new $Uint64(0, 86400), false); + n = $div64(d, new $Uint64(0, 146097), false); + y = $mul64(new $Uint64(0, 400), n); + d = (x = $mul64(new $Uint64(0, 146097), n), new $Uint64(d.$high - x.$high, d.$low - x.$low)); + n = $div64(d, new $Uint64(0, 36524), false); + n = (x$1 = $shiftRightUint64(n, 2), new $Uint64(n.$high - x$1.$high, n.$low - x$1.$low)); + y = (x$2 = $mul64(new $Uint64(0, 100), n), new $Uint64(y.$high + x$2.$high, y.$low + x$2.$low)); + d = (x$3 = $mul64(new $Uint64(0, 36524), n), new $Uint64(d.$high - x$3.$high, d.$low - x$3.$low)); + n = $div64(d, new $Uint64(0, 1461), false); + y = (x$4 = $mul64(new $Uint64(0, 4), n), new $Uint64(y.$high + x$4.$high, y.$low + x$4.$low)); + d = (x$5 = $mul64(new $Uint64(0, 1461), n), new $Uint64(d.$high - x$5.$high, d.$low - x$5.$low)); + n = $div64(d, new $Uint64(0, 365), false); + n = (x$6 = $shiftRightUint64(n, 2), new $Uint64(n.$high - x$6.$high, n.$low - x$6.$low)); + y = (x$7 = n, new $Uint64(y.$high + x$7.$high, y.$low + x$7.$low)); + d = (x$8 = $mul64(new $Uint64(0, 365), n), new $Uint64(d.$high - x$8.$high, d.$low - x$8.$low)); + year = ((x$9 = (x$10 = new $Int64(y.$high, y.$low), new $Int64(x$10.$high + -69, x$10.$low + 4075721025)), x$9.$low + ((x$9.$high >> 31) * 4294967296)) >> 0); + yday = (d.$low >> 0); + if (!full) { + return [year, month, day, yday]; + } + day = yday; + if (isLeap(year)) { + if (day > 59) { + day = day - (1) >> 0; + } else if (day === 59) { + month = 2; + day = 29; + return [year, month, day, yday]; + } + } + month = ((_q = day / 31, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0); + end = ((x$11 = month + 1 >> 0, ((x$11 < 0 || x$11 >= daysBefore.length) ? $throwRuntimeError("index out of range") : daysBefore[x$11])) >> 0); + begin = 0; + if (day >= end) { + month = month + (1) >> 0; + begin = end; + } else { + begin = (((month < 0 || month >= daysBefore.length) ? $throwRuntimeError("index out of range") : daysBefore[month]) >> 0); + } + month = month + (1) >> 0; + day = (day - begin >> 0) + 1 >> 0; + return [year, month, day, yday]; + }; + Time.ptr.prototype.UTC = function() { + var t; + t = $clone(this, Time); + t.loc = $pkg.UTC; + return t; + }; + Time.prototype.UTC = function() { return this.$val.UTC(); }; + Time.ptr.prototype.Local = function() { + var t; + t = $clone(this, Time); + t.loc = $pkg.Local; + return t; + }; + Time.prototype.Local = function() { return this.$val.Local(); }; + Time.ptr.prototype.In = function(loc) { + var loc, t; + t = $clone(this, Time); + if (loc === ptrType$1.nil) { + $panic(new $String("time: missing Location in call to Time.In")); + } + t.loc = loc; + return t; + }; + Time.prototype.In = function(loc) { return this.$val.In(loc); }; + Time.ptr.prototype.Location = function() { + var l, t; + t = $clone(this, Time); + l = t.loc; + if (l === ptrType$1.nil) { + l = $pkg.UTC; + } + return l; + }; + Time.prototype.Location = function() { return this.$val.Location(); }; + Time.ptr.prototype.Zone = function() { + var _tuple$1, name = "", offset = 0, t, x; + t = $clone(this, Time); + _tuple$1 = t.loc.lookup((x = t.sec, new $Int64(x.$high + -15, x.$low + 2288912640))); name = _tuple$1[0]; offset = _tuple$1[1]; + return [name, offset]; + }; + Time.prototype.Zone = function() { return this.$val.Zone(); }; + Time.ptr.prototype.Unix = function() { + var t, x; + t = $clone(this, Time); + return (x = t.sec, new $Int64(x.$high + -15, x.$low + 2288912640)); + }; + Time.prototype.Unix = function() { return this.$val.Unix(); }; + Time.ptr.prototype.UnixNano = function() { + var t, x, x$1, x$2; + t = $clone(this, Time); + return (x = $mul64(((x$1 = t.sec, new $Int64(x$1.$high + -15, x$1.$low + 2288912640))), new $Int64(0, 1000000000)), x$2 = new $Int64(0, t.nsec), new $Int64(x.$high + x$2.$high, x.$low + x$2.$low)); + }; + Time.prototype.UnixNano = function() { return this.$val.UnixNano(); }; + Time.ptr.prototype.MarshalBinary = function() { + var _q, _r$1, _tuple$1, enc, offset, offsetMin, t; + t = $clone(this, Time); + offsetMin = 0; + if (t.Location() === utcLoc) { + offsetMin = -1; + } else { + _tuple$1 = t.Zone(); offset = _tuple$1[1]; + if (!(((_r$1 = offset % 60, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) === 0))) { + return [sliceType$3.nil, errors.New("Time.MarshalBinary: zone offset has fractional minute")]; + } + offset = (_q = offset / (60), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + if (offset < -32768 || (offset === -1) || offset > 32767) { + return [sliceType$3.nil, errors.New("Time.MarshalBinary: unexpected zone offset")]; + } + offsetMin = (offset << 16 >> 16); + } + enc = new sliceType$3([1, ($shiftRightInt64(t.sec, 56).$low << 24 >>> 24), ($shiftRightInt64(t.sec, 48).$low << 24 >>> 24), ($shiftRightInt64(t.sec, 40).$low << 24 >>> 24), ($shiftRightInt64(t.sec, 32).$low << 24 >>> 24), ($shiftRightInt64(t.sec, 24).$low << 24 >>> 24), ($shiftRightInt64(t.sec, 16).$low << 24 >>> 24), ($shiftRightInt64(t.sec, 8).$low << 24 >>> 24), (t.sec.$low << 24 >>> 24), ((t.nsec >> 24 >> 0) << 24 >>> 24), ((t.nsec >> 16 >> 0) << 24 >>> 24), ((t.nsec >> 8 >> 0) << 24 >>> 24), (t.nsec << 24 >>> 24), ((offsetMin >> 8 << 16 >> 16) << 24 >>> 24), (offsetMin << 24 >>> 24)]); + return [enc, $ifaceNil]; + }; + Time.prototype.MarshalBinary = function() { return this.$val.MarshalBinary(); }; + Time.ptr.prototype.UnmarshalBinary = function(data$1) { + var _tuple$1, buf, data$1, localoff, offset, t, x, x$1, x$10, x$11, x$12, x$13, x$14, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + t = this; + buf = data$1; + if (buf.$length === 0) { + return errors.New("Time.UnmarshalBinary: no data"); + } + if (!((((0 < 0 || 0 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 0]) === 1))) { + return errors.New("Time.UnmarshalBinary: unsupported version"); + } + if (!((buf.$length === 15))) { + return errors.New("Time.UnmarshalBinary: invalid length"); + } + buf = $subslice(buf, 1); + t.sec = (x = (x$1 = (x$2 = (x$3 = (x$4 = (x$5 = (x$6 = new $Int64(0, ((7 < 0 || 7 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 7])), x$7 = $shiftLeft64(new $Int64(0, ((6 < 0 || 6 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 6])), 8), new $Int64(x$6.$high | x$7.$high, (x$6.$low | x$7.$low) >>> 0)), x$8 = $shiftLeft64(new $Int64(0, ((5 < 0 || 5 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 5])), 16), new $Int64(x$5.$high | x$8.$high, (x$5.$low | x$8.$low) >>> 0)), x$9 = $shiftLeft64(new $Int64(0, ((4 < 0 || 4 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 4])), 24), new $Int64(x$4.$high | x$9.$high, (x$4.$low | x$9.$low) >>> 0)), x$10 = $shiftLeft64(new $Int64(0, ((3 < 0 || 3 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 3])), 32), new $Int64(x$3.$high | x$10.$high, (x$3.$low | x$10.$low) >>> 0)), x$11 = $shiftLeft64(new $Int64(0, ((2 < 0 || 2 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 2])), 40), new $Int64(x$2.$high | x$11.$high, (x$2.$low | x$11.$low) >>> 0)), x$12 = $shiftLeft64(new $Int64(0, ((1 < 0 || 1 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 1])), 48), new $Int64(x$1.$high | x$12.$high, (x$1.$low | x$12.$low) >>> 0)), x$13 = $shiftLeft64(new $Int64(0, ((0 < 0 || 0 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 0])), 56), new $Int64(x.$high | x$13.$high, (x.$low | x$13.$low) >>> 0)); + buf = $subslice(buf, 8); + t.nsec = (((((3 < 0 || 3 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 3]) >> 0) | ((((2 < 0 || 2 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 2]) >> 0) << 8 >> 0)) | ((((1 < 0 || 1 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 1]) >> 0) << 16 >> 0)) | ((((0 < 0 || 0 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 0]) >> 0) << 24 >> 0); + buf = $subslice(buf, 4); + offset = (((((1 < 0 || 1 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 1]) << 16 >> 16) | ((((0 < 0 || 0 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 0]) << 16 >> 16) << 8 << 16 >> 16)) >> 0) * 60 >> 0; + if (offset === -60) { + t.loc = utcLoc; + } else { + _tuple$1 = $pkg.Local.lookup((x$14 = t.sec, new $Int64(x$14.$high + -15, x$14.$low + 2288912640))); localoff = _tuple$1[1]; + if (offset === localoff) { + t.loc = $pkg.Local; + } else { + t.loc = FixedZone("", offset); + } + } + return $ifaceNil; + }; + Time.prototype.UnmarshalBinary = function(data$1) { return this.$val.UnmarshalBinary(data$1); }; + Time.ptr.prototype.GobEncode = function() { + var t; + t = $clone(this, Time); + return t.MarshalBinary(); + }; + Time.prototype.GobEncode = function() { return this.$val.GobEncode(); }; + Time.ptr.prototype.GobDecode = function(data$1) { + var data$1, t; + t = this; + return t.UnmarshalBinary(data$1); + }; + Time.prototype.GobDecode = function(data$1) { return this.$val.GobDecode(data$1); }; + Time.ptr.prototype.MarshalJSON = function() { + var t, y; + t = $clone(this, Time); + y = t.Year(); + if (y < 0 || y >= 10000) { + return [sliceType$3.nil, errors.New("Time.MarshalJSON: year outside of range [0,9999]")]; + } + return [new sliceType$3($stringToBytes(t.Format("\"2006-01-02T15:04:05.999999999Z07:00\""))), $ifaceNil]; + }; + Time.prototype.MarshalJSON = function() { return this.$val.MarshalJSON(); }; + Time.ptr.prototype.UnmarshalJSON = function(data$1) { + var _tuple$1, data$1, err = $ifaceNil, t; + t = this; + _tuple$1 = Parse("\"2006-01-02T15:04:05Z07:00\"", $bytesToString(data$1)); $copy(t, _tuple$1[0], Time); err = _tuple$1[1]; + return err; + }; + Time.prototype.UnmarshalJSON = function(data$1) { return this.$val.UnmarshalJSON(data$1); }; + Time.ptr.prototype.MarshalText = function() { + var t, y; + t = $clone(this, Time); + y = t.Year(); + if (y < 0 || y >= 10000) { + return [sliceType$3.nil, errors.New("Time.MarshalText: year outside of range [0,9999]")]; + } + return [new sliceType$3($stringToBytes(t.Format("2006-01-02T15:04:05.999999999Z07:00"))), $ifaceNil]; + }; + Time.prototype.MarshalText = function() { return this.$val.MarshalText(); }; + Time.ptr.prototype.UnmarshalText = function(data$1) { + var _tuple$1, data$1, err = $ifaceNil, t; + t = this; + _tuple$1 = Parse("2006-01-02T15:04:05Z07:00", $bytesToString(data$1)); $copy(t, _tuple$1[0], Time); err = _tuple$1[1]; + return err; + }; + Time.prototype.UnmarshalText = function(data$1) { return this.$val.UnmarshalText(data$1); }; + Unix = $pkg.Unix = function(sec, nsec) { + var n, nsec, sec, x, x$1, x$2, x$3; + if ((nsec.$high < 0 || (nsec.$high === 0 && nsec.$low < 0)) || (nsec.$high > 0 || (nsec.$high === 0 && nsec.$low >= 1000000000))) { + n = $div64(nsec, new $Int64(0, 1000000000), false); + sec = (x = n, new $Int64(sec.$high + x.$high, sec.$low + x.$low)); + nsec = (x$1 = $mul64(n, new $Int64(0, 1000000000)), new $Int64(nsec.$high - x$1.$high, nsec.$low - x$1.$low)); + if ((nsec.$high < 0 || (nsec.$high === 0 && nsec.$low < 0))) { + nsec = (x$2 = new $Int64(0, 1000000000), new $Int64(nsec.$high + x$2.$high, nsec.$low + x$2.$low)); + sec = (x$3 = new $Int64(0, 1), new $Int64(sec.$high - x$3.$high, sec.$low - x$3.$low)); + } + } + return new Time.ptr(new $Int64(sec.$high + 14, sec.$low + 2006054656), ((nsec.$low + ((nsec.$high >> 31) * 4294967296)) >> 0), $pkg.Local); + }; + isLeap = function(year) { + var _r$1, _r$2, _r$3, year; + return ((_r$1 = year % 4, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) === 0) && (!(((_r$2 = year % 100, _r$2 === _r$2 ? _r$2 : $throwRuntimeError("integer divide by zero")) === 0)) || ((_r$3 = year % 400, _r$3 === _r$3 ? _r$3 : $throwRuntimeError("integer divide by zero")) === 0)); + }; + norm = function(hi, lo, base) { + var _q, _q$1, _tmp, _tmp$1, base, hi, lo, n, n$1, nhi = 0, nlo = 0; + if (lo < 0) { + n = (_q = ((-lo - 1 >> 0)) / base, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) + 1 >> 0; + hi = hi - (n) >> 0; + lo = lo + ((n * base >> 0)) >> 0; + } + if (lo >= base) { + n$1 = (_q$1 = lo / base, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")); + hi = hi + (n$1) >> 0; + lo = lo - ((n$1 * base >> 0)) >> 0; + } + _tmp = hi; _tmp$1 = lo; nhi = _tmp; nlo = _tmp$1; + return [nhi, nlo]; + }; + Date = $pkg.Date = function(year, month, day, hour, min, sec, nsec, loc) { + var _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, abs, d, day, end, hour, loc, m, min, month, n, nsec, offset, sec, start, unix, utc, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, y, year; + if (loc === ptrType$1.nil) { + $panic(new $String("time: missing Location in call to Date")); + } + m = (month >> 0) - 1 >> 0; + _tuple$1 = norm(year, m, 12); year = _tuple$1[0]; m = _tuple$1[1]; + month = (m >> 0) + 1 >> 0; + _tuple$2 = norm(sec, nsec, 1000000000); sec = _tuple$2[0]; nsec = _tuple$2[1]; + _tuple$3 = norm(min, sec, 60); min = _tuple$3[0]; sec = _tuple$3[1]; + _tuple$4 = norm(hour, min, 60); hour = _tuple$4[0]; min = _tuple$4[1]; + _tuple$5 = norm(day, hour, 24); day = _tuple$5[0]; hour = _tuple$5[1]; + y = (x = (x$1 = new $Int64(0, year), new $Int64(x$1.$high - -69, x$1.$low - 4075721025)), new $Uint64(x.$high, x.$low)); + n = $div64(y, new $Uint64(0, 400), false); + y = (x$2 = $mul64(new $Uint64(0, 400), n), new $Uint64(y.$high - x$2.$high, y.$low - x$2.$low)); + d = $mul64(new $Uint64(0, 146097), n); + n = $div64(y, new $Uint64(0, 100), false); + y = (x$3 = $mul64(new $Uint64(0, 100), n), new $Uint64(y.$high - x$3.$high, y.$low - x$3.$low)); + d = (x$4 = $mul64(new $Uint64(0, 36524), n), new $Uint64(d.$high + x$4.$high, d.$low + x$4.$low)); + n = $div64(y, new $Uint64(0, 4), false); + y = (x$5 = $mul64(new $Uint64(0, 4), n), new $Uint64(y.$high - x$5.$high, y.$low - x$5.$low)); + d = (x$6 = $mul64(new $Uint64(0, 1461), n), new $Uint64(d.$high + x$6.$high, d.$low + x$6.$low)); + n = y; + d = (x$7 = $mul64(new $Uint64(0, 365), n), new $Uint64(d.$high + x$7.$high, d.$low + x$7.$low)); + d = (x$8 = new $Uint64(0, (x$9 = month - 1 >> 0, ((x$9 < 0 || x$9 >= daysBefore.length) ? $throwRuntimeError("index out of range") : daysBefore[x$9]))), new $Uint64(d.$high + x$8.$high, d.$low + x$8.$low)); + if (isLeap(year) && month >= 3) { + d = (x$10 = new $Uint64(0, 1), new $Uint64(d.$high + x$10.$high, d.$low + x$10.$low)); + } + d = (x$11 = new $Uint64(0, (day - 1 >> 0)), new $Uint64(d.$high + x$11.$high, d.$low + x$11.$low)); + abs = $mul64(d, new $Uint64(0, 86400)); + abs = (x$12 = new $Uint64(0, (((hour * 3600 >> 0) + (min * 60 >> 0) >> 0) + sec >> 0)), new $Uint64(abs.$high + x$12.$high, abs.$low + x$12.$low)); + unix = (x$13 = new $Int64(abs.$high, abs.$low), new $Int64(x$13.$high + -2147483647, x$13.$low + 3844486912)); + _tuple$6 = loc.lookup(unix); offset = _tuple$6[1]; start = _tuple$6[3]; end = _tuple$6[4]; + if (!((offset === 0))) { + utc = (x$14 = new $Int64(0, offset), new $Int64(unix.$high - x$14.$high, unix.$low - x$14.$low)); + if ((utc.$high < start.$high || (utc.$high === start.$high && utc.$low < start.$low))) { + _tuple$7 = loc.lookup(new $Int64(start.$high - 0, start.$low - 1)); offset = _tuple$7[1]; + } else if ((utc.$high > end.$high || (utc.$high === end.$high && utc.$low >= end.$low))) { + _tuple$8 = loc.lookup(end); offset = _tuple$8[1]; + } + unix = (x$15 = new $Int64(0, offset), new $Int64(unix.$high - x$15.$high, unix.$low - x$15.$low)); + } + return new Time.ptr(new $Int64(unix.$high + 14, unix.$low + 2006054656), (nsec >> 0), loc); + }; + Time.ptr.prototype.Truncate = function(d) { + var _tuple$1, d, r, t; + t = $clone(this, Time); + if ((d.$high < 0 || (d.$high === 0 && d.$low <= 0))) { + return t; + } + _tuple$1 = div(t, d); r = _tuple$1[1]; + return t.Add(new Duration(-r.$high, -r.$low)); + }; + Time.prototype.Truncate = function(d) { return this.$val.Truncate(d); }; + Time.ptr.prototype.Round = function(d) { + var _tuple$1, d, r, t, x; + t = $clone(this, Time); + if ((d.$high < 0 || (d.$high === 0 && d.$low <= 0))) { + return t; + } + _tuple$1 = div(t, d); r = _tuple$1[1]; + if ((x = new Duration(r.$high + r.$high, r.$low + r.$low), (x.$high < d.$high || (x.$high === d.$high && x.$low < d.$low)))) { + return t.Add(new Duration(-r.$high, -r.$low)); + } + return t.Add(new Duration(d.$high - r.$high, d.$low - r.$low)); + }; + Time.prototype.Round = function(d) { return this.$val.Round(d); }; + div = function(t, d) { + var _q, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, d, d0, d1, d1$1, neg, nsec, qmod2 = 0, r = new Duration(0, 0), sec, t, tmp, u0, u0x, u1, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + t = $clone(t, Time); + neg = false; + nsec = t.nsec; + if ((x = t.sec, (x.$high < 0 || (x.$high === 0 && x.$low < 0)))) { + neg = true; + t.sec = (x$1 = t.sec, new $Int64(-x$1.$high, -x$1.$low)); + nsec = -nsec; + if (nsec < 0) { + nsec = nsec + (1000000000) >> 0; + t.sec = (x$2 = t.sec, x$3 = new $Int64(0, 1), new $Int64(x$2.$high - x$3.$high, x$2.$low - x$3.$low)); + } + } + if ((d.$high < 0 || (d.$high === 0 && d.$low < 1000000000)) && (x$4 = $div64(new Duration(0, 1000000000), (new Duration(d.$high + d.$high, d.$low + d.$low)), true), (x$4.$high === 0 && x$4.$low === 0))) { + qmod2 = ((_q = nsec / ((d.$low + ((d.$high >> 31) * 4294967296)) >> 0), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0) & 1; + r = new Duration(0, (_r$1 = nsec % ((d.$low + ((d.$high >> 31) * 4294967296)) >> 0), _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero"))); + } else if ((x$5 = $div64(d, new Duration(0, 1000000000), true), (x$5.$high === 0 && x$5.$low === 0))) { + d1 = (x$6 = $div64(d, new Duration(0, 1000000000), false), new $Int64(x$6.$high, x$6.$low)); + qmod2 = ((x$7 = $div64(t.sec, d1, false), x$7.$low + ((x$7.$high >> 31) * 4294967296)) >> 0) & 1; + r = (x$8 = $mul64((x$9 = $div64(t.sec, d1, true), new Duration(x$9.$high, x$9.$low)), new Duration(0, 1000000000)), x$10 = new Duration(0, nsec), new Duration(x$8.$high + x$10.$high, x$8.$low + x$10.$low)); + } else { + sec = (x$11 = t.sec, new $Uint64(x$11.$high, x$11.$low)); + tmp = $mul64(($shiftRightUint64(sec, 32)), new $Uint64(0, 1000000000)); + u1 = $shiftRightUint64(tmp, 32); + u0 = $shiftLeft64(tmp, 32); + tmp = $mul64(new $Uint64(sec.$high & 0, (sec.$low & 4294967295) >>> 0), new $Uint64(0, 1000000000)); + _tmp = u0; _tmp$1 = new $Uint64(u0.$high + tmp.$high, u0.$low + tmp.$low); u0x = _tmp; u0 = _tmp$1; + if ((u0.$high < u0x.$high || (u0.$high === u0x.$high && u0.$low < u0x.$low))) { + u1 = (x$12 = new $Uint64(0, 1), new $Uint64(u1.$high + x$12.$high, u1.$low + x$12.$low)); + } + _tmp$2 = u0; _tmp$3 = (x$13 = new $Uint64(0, nsec), new $Uint64(u0.$high + x$13.$high, u0.$low + x$13.$low)); u0x = _tmp$2; u0 = _tmp$3; + if ((u0.$high < u0x.$high || (u0.$high === u0x.$high && u0.$low < u0x.$low))) { + u1 = (x$14 = new $Uint64(0, 1), new $Uint64(u1.$high + x$14.$high, u1.$low + x$14.$low)); + } + d1$1 = new $Uint64(d.$high, d.$low); + while (true) { + if (!(!((x$15 = $shiftRightUint64(d1$1, 63), (x$15.$high === 0 && x$15.$low === 1))))) { break; } + d1$1 = $shiftLeft64(d1$1, (1)); + } + d0 = new $Uint64(0, 0); + while (true) { + if (!(true)) { break; } + qmod2 = 0; + if ((u1.$high > d1$1.$high || (u1.$high === d1$1.$high && u1.$low > d1$1.$low)) || (u1.$high === d1$1.$high && u1.$low === d1$1.$low) && (u0.$high > d0.$high || (u0.$high === d0.$high && u0.$low >= d0.$low))) { + qmod2 = 1; + _tmp$4 = u0; _tmp$5 = new $Uint64(u0.$high - d0.$high, u0.$low - d0.$low); u0x = _tmp$4; u0 = _tmp$5; + if ((u0.$high > u0x.$high || (u0.$high === u0x.$high && u0.$low > u0x.$low))) { + u1 = (x$16 = new $Uint64(0, 1), new $Uint64(u1.$high - x$16.$high, u1.$low - x$16.$low)); + } + u1 = (x$17 = d1$1, new $Uint64(u1.$high - x$17.$high, u1.$low - x$17.$low)); + } + if ((d1$1.$high === 0 && d1$1.$low === 0) && (x$18 = new $Uint64(d.$high, d.$low), (d0.$high === x$18.$high && d0.$low === x$18.$low))) { + break; + } + d0 = $shiftRightUint64(d0, (1)); + d0 = (x$19 = $shiftLeft64((new $Uint64(d1$1.$high & 0, (d1$1.$low & 1) >>> 0)), 63), new $Uint64(d0.$high | x$19.$high, (d0.$low | x$19.$low) >>> 0)); + d1$1 = $shiftRightUint64(d1$1, (1)); + } + r = new Duration(u0.$high, u0.$low); + } + if (neg && !((r.$high === 0 && r.$low === 0))) { + qmod2 = (qmod2 ^ (1)) >> 0; + r = new Duration(d.$high - r.$high, d.$low - r.$low); + } + return [qmod2, r]; + }; + Location.ptr.prototype.get = function() { + var l; + l = this; + if (l === ptrType$1.nil) { + return utcLoc; + } + if (l === localLoc) { + localOnce.Do(initLocal); + } + return l; + }; + Location.prototype.get = function() { return this.$val.get(); }; + Location.ptr.prototype.String = function() { + var l; + l = this; + return l.get().name; + }; + Location.prototype.String = function() { return this.$val.String(); }; + FixedZone = $pkg.FixedZone = function(name, offset) { + var l, name, offset, x; + l = new Location.ptr(name, new sliceType$1([new zone.ptr(name, offset, false)]), new sliceType$2([new zoneTrans.ptr(new $Int64(-2147483648, 0), 0, false, false)]), new $Int64(-2147483648, 0), new $Int64(2147483647, 4294967295), ptrType.nil); + l.cacheZone = (x = l.zone, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])); + return l; + }; + Location.ptr.prototype.lookup = function(sec) { + var _q, end = new $Int64(0, 0), hi, isDST = false, l, lim, lo, m, name = "", offset = 0, sec, start = new $Int64(0, 0), tx, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, zone$1, zone$2, zone$3; + l = this; + l = l.get(); + if (l.zone.$length === 0) { + name = "UTC"; + offset = 0; + isDST = false; + start = new $Int64(-2147483648, 0); + end = new $Int64(2147483647, 4294967295); + return [name, offset, isDST, start, end]; + } + zone$1 = l.cacheZone; + if (!(zone$1 === ptrType.nil) && (x = l.cacheStart, (x.$high < sec.$high || (x.$high === sec.$high && x.$low <= sec.$low))) && (x$1 = l.cacheEnd, (sec.$high < x$1.$high || (sec.$high === x$1.$high && sec.$low < x$1.$low)))) { + name = zone$1.name; + offset = zone$1.offset; + isDST = zone$1.isDST; + start = l.cacheStart; + end = l.cacheEnd; + return [name, offset, isDST, start, end]; + } + if ((l.tx.$length === 0) || (x$2 = (x$3 = l.tx, ((0 < 0 || 0 >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + 0])).when, (sec.$high < x$2.$high || (sec.$high === x$2.$high && sec.$low < x$2.$low)))) { + zone$2 = (x$4 = l.zone, x$5 = l.lookupFirstZone(), ((x$5 < 0 || x$5 >= x$4.$length) ? $throwRuntimeError("index out of range") : x$4.$array[x$4.$offset + x$5])); + name = zone$2.name; + offset = zone$2.offset; + isDST = zone$2.isDST; + start = new $Int64(-2147483648, 0); + if (l.tx.$length > 0) { + end = (x$6 = l.tx, ((0 < 0 || 0 >= x$6.$length) ? $throwRuntimeError("index out of range") : x$6.$array[x$6.$offset + 0])).when; + } else { + end = new $Int64(2147483647, 4294967295); + } + return [name, offset, isDST, start, end]; + } + tx = l.tx; + end = new $Int64(2147483647, 4294967295); + lo = 0; + hi = tx.$length; + while (true) { + if (!((hi - lo >> 0) > 1)) { break; } + m = lo + (_q = ((hi - lo >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0; + lim = ((m < 0 || m >= tx.$length) ? $throwRuntimeError("index out of range") : tx.$array[tx.$offset + m]).when; + if ((sec.$high < lim.$high || (sec.$high === lim.$high && sec.$low < lim.$low))) { + end = lim; + hi = m; + } else { + lo = m; + } + } + zone$3 = (x$7 = l.zone, x$8 = ((lo < 0 || lo >= tx.$length) ? $throwRuntimeError("index out of range") : tx.$array[tx.$offset + lo]).index, ((x$8 < 0 || x$8 >= x$7.$length) ? $throwRuntimeError("index out of range") : x$7.$array[x$7.$offset + x$8])); + name = zone$3.name; + offset = zone$3.offset; + isDST = zone$3.isDST; + start = ((lo < 0 || lo >= tx.$length) ? $throwRuntimeError("index out of range") : tx.$array[tx.$offset + lo]).when; + return [name, offset, isDST, start, end]; + }; + Location.prototype.lookup = function(sec) { return this.$val.lookup(sec); }; + Location.ptr.prototype.lookupFirstZone = function() { + var _i, _ref, l, x, x$1, x$2, x$3, x$4, x$5, zi, zi$1; + l = this; + if (!l.firstZoneUsed()) { + return 0; + } + if (l.tx.$length > 0 && (x = l.zone, x$1 = (x$2 = l.tx, ((0 < 0 || 0 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + 0])).index, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])).isDST) { + zi = ((x$3 = l.tx, ((0 < 0 || 0 >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + 0])).index >> 0) - 1 >> 0; + while (true) { + if (!(zi >= 0)) { break; } + if (!(x$4 = l.zone, ((zi < 0 || zi >= x$4.$length) ? $throwRuntimeError("index out of range") : x$4.$array[x$4.$offset + zi])).isDST) { + return zi; + } + zi = zi - (1) >> 0; + } + } + _ref = l.zone; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + zi$1 = _i; + if (!(x$5 = l.zone, ((zi$1 < 0 || zi$1 >= x$5.$length) ? $throwRuntimeError("index out of range") : x$5.$array[x$5.$offset + zi$1])).isDST) { + return zi$1; + } + _i++; + } + return 0; + }; + Location.prototype.lookupFirstZone = function() { return this.$val.lookupFirstZone(); }; + Location.ptr.prototype.firstZoneUsed = function() { + var _i, _ref, l, tx; + l = this; + _ref = l.tx; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + tx = $clone(((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]), zoneTrans); + if (tx.index === 0) { + return true; + } + _i++; + } + return false; + }; + Location.prototype.firstZoneUsed = function() { return this.$val.firstZoneUsed(); }; + Location.ptr.prototype.lookupName = function(name, unix) { + var _i, _i$1, _ref, _ref$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple$1, i, i$1, isDST = false, isDST$1, l, nam, name, offset = 0, offset$1, ok = false, unix, x, x$1, x$2, zone$1, zone$2; + l = this; + l = l.get(); + _ref = l.zone; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + zone$1 = (x = l.zone, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + if (zone$1.name === name) { + _tuple$1 = l.lookup((x$1 = new $Int64(0, zone$1.offset), new $Int64(unix.$high - x$1.$high, unix.$low - x$1.$low))); nam = _tuple$1[0]; offset$1 = _tuple$1[1]; isDST$1 = _tuple$1[2]; + if (nam === zone$1.name) { + _tmp = offset$1; _tmp$1 = isDST$1; _tmp$2 = true; offset = _tmp; isDST = _tmp$1; ok = _tmp$2; + return [offset, isDST, ok]; + } + } + _i++; + } + _ref$1 = l.zone; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i$1 = _i$1; + zone$2 = (x$2 = l.zone, ((i$1 < 0 || i$1 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + i$1])); + if (zone$2.name === name) { + _tmp$3 = zone$2.offset; _tmp$4 = zone$2.isDST; _tmp$5 = true; offset = _tmp$3; isDST = _tmp$4; ok = _tmp$5; + return [offset, isDST, ok]; + } + _i$1++; + } + return [offset, isDST, ok]; + }; + Location.prototype.lookupName = function(name, unix) { return this.$val.lookupName(name, unix); }; + ptrType$2.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + Time.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "After", name: "After", pkg: "", typ: $funcType([Time], [$Bool], false)}, {prop: "Before", name: "Before", pkg: "", typ: $funcType([Time], [$Bool], false)}, {prop: "Equal", name: "Equal", pkg: "", typ: $funcType([Time], [$Bool], false)}, {prop: "IsZero", name: "IsZero", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "abs", name: "abs", pkg: "time", typ: $funcType([], [$Uint64], false)}, {prop: "locabs", name: "locabs", pkg: "time", typ: $funcType([], [$String, $Int, $Uint64], false)}, {prop: "Date", name: "Date", pkg: "", typ: $funcType([], [$Int, Month, $Int], false)}, {prop: "Year", name: "Year", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Month", name: "Month", pkg: "", typ: $funcType([], [Month], false)}, {prop: "Day", name: "Day", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Weekday", name: "Weekday", pkg: "", typ: $funcType([], [Weekday], false)}, {prop: "ISOWeek", name: "ISOWeek", pkg: "", typ: $funcType([], [$Int, $Int], false)}, {prop: "Clock", name: "Clock", pkg: "", typ: $funcType([], [$Int, $Int, $Int], false)}, {prop: "Hour", name: "Hour", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Minute", name: "Minute", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Second", name: "Second", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Nanosecond", name: "Nanosecond", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "YearDay", name: "YearDay", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([Duration], [Time], false)}, {prop: "Sub", name: "Sub", pkg: "", typ: $funcType([Time], [Duration], false)}, {prop: "AddDate", name: "AddDate", pkg: "", typ: $funcType([$Int, $Int, $Int], [Time], false)}, {prop: "date", name: "date", pkg: "time", typ: $funcType([$Bool], [$Int, Month, $Int, $Int], false)}, {prop: "UTC", name: "UTC", pkg: "", typ: $funcType([], [Time], false)}, {prop: "Local", name: "Local", pkg: "", typ: $funcType([], [Time], false)}, {prop: "In", name: "In", pkg: "", typ: $funcType([ptrType$1], [Time], false)}, {prop: "Location", name: "Location", pkg: "", typ: $funcType([], [ptrType$1], false)}, {prop: "Zone", name: "Zone", pkg: "", typ: $funcType([], [$String, $Int], false)}, {prop: "Unix", name: "Unix", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "UnixNano", name: "UnixNano", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "MarshalBinary", name: "MarshalBinary", pkg: "", typ: $funcType([], [sliceType$3, $error], false)}, {prop: "GobEncode", name: "GobEncode", pkg: "", typ: $funcType([], [sliceType$3, $error], false)}, {prop: "MarshalJSON", name: "MarshalJSON", pkg: "", typ: $funcType([], [sliceType$3, $error], false)}, {prop: "MarshalText", name: "MarshalText", pkg: "", typ: $funcType([], [sliceType$3, $error], false)}, {prop: "Truncate", name: "Truncate", pkg: "", typ: $funcType([Duration], [Time], false)}, {prop: "Round", name: "Round", pkg: "", typ: $funcType([Duration], [Time], false)}]; + ptrType$5.methods = [{prop: "UnmarshalBinary", name: "UnmarshalBinary", pkg: "", typ: $funcType([sliceType$3], [$error], false)}, {prop: "GobDecode", name: "GobDecode", pkg: "", typ: $funcType([sliceType$3], [$error], false)}, {prop: "UnmarshalJSON", name: "UnmarshalJSON", pkg: "", typ: $funcType([sliceType$3], [$error], false)}, {prop: "UnmarshalText", name: "UnmarshalText", pkg: "", typ: $funcType([sliceType$3], [$error], false)}]; + Month.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + Weekday.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + Duration.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Nanoseconds", name: "Nanoseconds", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Seconds", name: "Seconds", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Minutes", name: "Minutes", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Hours", name: "Hours", pkg: "", typ: $funcType([], [$Float64], false)}]; + ptrType$1.methods = [{prop: "get", name: "get", pkg: "time", typ: $funcType([], [ptrType$1], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "lookup", name: "lookup", pkg: "time", typ: $funcType([$Int64], [$String, $Int, $Bool, $Int64, $Int64], false)}, {prop: "lookupFirstZone", name: "lookupFirstZone", pkg: "time", typ: $funcType([], [$Int], false)}, {prop: "firstZoneUsed", name: "firstZoneUsed", pkg: "time", typ: $funcType([], [$Bool], false)}, {prop: "lookupName", name: "lookupName", pkg: "time", typ: $funcType([$String, $Int64], [$Int, $Bool, $Bool], false)}]; + ParseError.init([{prop: "Layout", name: "Layout", pkg: "", typ: $String, tag: ""}, {prop: "Value", name: "Value", pkg: "", typ: $String, tag: ""}, {prop: "LayoutElem", name: "LayoutElem", pkg: "", typ: $String, tag: ""}, {prop: "ValueElem", name: "ValueElem", pkg: "", typ: $String, tag: ""}, {prop: "Message", name: "Message", pkg: "", typ: $String, tag: ""}]); + Time.init([{prop: "sec", name: "sec", pkg: "time", typ: $Int64, tag: ""}, {prop: "nsec", name: "nsec", pkg: "time", typ: $Int32, tag: ""}, {prop: "loc", name: "loc", pkg: "time", typ: ptrType$1, tag: ""}]); + Location.init([{prop: "name", name: "name", pkg: "time", typ: $String, tag: ""}, {prop: "zone", name: "zone", pkg: "time", typ: sliceType$1, tag: ""}, {prop: "tx", name: "tx", pkg: "time", typ: sliceType$2, tag: ""}, {prop: "cacheStart", name: "cacheStart", pkg: "time", typ: $Int64, tag: ""}, {prop: "cacheEnd", name: "cacheEnd", pkg: "time", typ: $Int64, tag: ""}, {prop: "cacheZone", name: "cacheZone", pkg: "time", typ: ptrType, tag: ""}]); + zone.init([{prop: "name", name: "name", pkg: "time", typ: $String, tag: ""}, {prop: "offset", name: "offset", pkg: "time", typ: $Int, tag: ""}, {prop: "isDST", name: "isDST", pkg: "time", typ: $Bool, tag: ""}]); + zoneTrans.init([{prop: "when", name: "when", pkg: "time", typ: $Int64, tag: ""}, {prop: "index", name: "index", pkg: "time", typ: $Uint8, tag: ""}, {prop: "isstd", name: "isstd", pkg: "time", typ: $Bool, tag: ""}, {prop: "isutc", name: "isutc", pkg: "time", typ: $Bool, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_time = function() { while (true) { switch ($s) { case 0: + $r = errors.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = js.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = nosync.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = runtime.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = strings.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + $r = syscall.$init($BLOCKING); /* */ $s = 6; case 6: if ($r && $r.$blocking) { $r = $r(); } + localLoc = new Location.ptr(); + localOnce = new nosync.Once.ptr(); + std0x = $toNativeArray($kindInt, [260, 265, 524, 526, 528, 274]); + longDayNames = new sliceType(["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]); + shortDayNames = new sliceType(["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]); + shortMonthNames = new sliceType(["---", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]); + longMonthNames = new sliceType(["---", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]); + atoiError = errors.New("time: invalid number"); + errBad = errors.New("bad value for field"); + errLeadingInt = errors.New("time: bad [0-9]*"); + months = $toNativeArray($kindString, ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]); + days = $toNativeArray($kindString, ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]); + unitMap = (_map = new $Map(), _key = "ns", _map[_key] = { k: _key, v: 1 }, _key = "us", _map[_key] = { k: _key, v: 1000 }, _key = "\xC2\xB5s", _map[_key] = { k: _key, v: 1000 }, _key = "\xCE\xBCs", _map[_key] = { k: _key, v: 1000 }, _key = "ms", _map[_key] = { k: _key, v: 1e+06 }, _key = "s", _map[_key] = { k: _key, v: 1e+09 }, _key = "m", _map[_key] = { k: _key, v: 6e+10 }, _key = "h", _map[_key] = { k: _key, v: 3.6e+12 }, _map); + daysBefore = $toNativeArray($kindInt32, [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365]); + utcLoc = new Location.ptr("UTC", sliceType$1.nil, sliceType$2.nil, new $Int64(0, 0), new $Int64(0, 0), ptrType.nil); + $pkg.UTC = utcLoc; + $pkg.Local = localLoc; + _r = syscall.Getenv("ZONEINFO", $BLOCKING); /* */ $s = 7; case 7: if (_r && _r.$blocking) { _r = _r(); } + _tuple = _r; zoneinfo = _tuple[0]; + badData = errors.New("malformed time zone information"); + zoneDirs = new sliceType(["/usr/share/zoneinfo/", "/usr/share/lib/zoneinfo/", "/usr/lib/locale/TZ/", runtime.GOROOT() + "/lib/time/zoneinfo.zip"]); + /* */ } return; } }; $init_time.$blocking = true; return $init_time; + }; + return $pkg; +})(); +$packages["os"] = (function() { + var $pkg = {}, errors, js, io, runtime, sync, atomic, syscall, time, PathError, SyscallError, LinkError, File, file, dirInfo, FileInfo, FileMode, fileStat, sliceType, ptrType, sliceType$1, sliceType$2, ptrType$2, ptrType$3, ptrType$4, arrayType, ptrType$11, funcType$1, ptrType$12, ptrType$14, ptrType$15, errFinished, lstat, useSyscallwd, supportsCloseOnExec, runtime_args, init, Getenv, NewSyscallError, IsNotExist, isNotExist, Open, fixCount, sigpipe, syscallMode, NewFile, epipecheck, OpenFile, Lstat, basename, init$1, useSyscallwdDarwin, IsPathSeparator, init$2, Exit, fileInfoFromStat, timespecToTime, init$3; + errors = $packages["errors"]; + js = $packages["github.com/gopherjs/gopherjs/js"]; + io = $packages["io"]; + runtime = $packages["runtime"]; + sync = $packages["sync"]; + atomic = $packages["sync/atomic"]; + syscall = $packages["syscall"]; + time = $packages["time"]; + PathError = $pkg.PathError = $newType(0, $kindStruct, "os.PathError", "PathError", "os", function(Op_, Path_, Err_) { + this.$val = this; + this.Op = Op_ !== undefined ? Op_ : ""; + this.Path = Path_ !== undefined ? Path_ : ""; + this.Err = Err_ !== undefined ? Err_ : $ifaceNil; + }); + SyscallError = $pkg.SyscallError = $newType(0, $kindStruct, "os.SyscallError", "SyscallError", "os", function(Syscall_, Err_) { + this.$val = this; + this.Syscall = Syscall_ !== undefined ? Syscall_ : ""; + this.Err = Err_ !== undefined ? Err_ : $ifaceNil; + }); + LinkError = $pkg.LinkError = $newType(0, $kindStruct, "os.LinkError", "LinkError", "os", function(Op_, Old_, New_, Err_) { + this.$val = this; + this.Op = Op_ !== undefined ? Op_ : ""; + this.Old = Old_ !== undefined ? Old_ : ""; + this.New = New_ !== undefined ? New_ : ""; + this.Err = Err_ !== undefined ? Err_ : $ifaceNil; + }); + File = $pkg.File = $newType(0, $kindStruct, "os.File", "File", "os", function(file_) { + this.$val = this; + this.file = file_ !== undefined ? file_ : ptrType$11.nil; + }); + file = $pkg.file = $newType(0, $kindStruct, "os.file", "file", "os", function(fd_, name_, dirinfo_, nepipe_) { + this.$val = this; + this.fd = fd_ !== undefined ? fd_ : 0; + this.name = name_ !== undefined ? name_ : ""; + this.dirinfo = dirinfo_ !== undefined ? dirinfo_ : ptrType.nil; + this.nepipe = nepipe_ !== undefined ? nepipe_ : 0; + }); + dirInfo = $pkg.dirInfo = $newType(0, $kindStruct, "os.dirInfo", "dirInfo", "os", function(buf_, nbuf_, bufp_) { + this.$val = this; + this.buf = buf_ !== undefined ? buf_ : sliceType$1.nil; + this.nbuf = nbuf_ !== undefined ? nbuf_ : 0; + this.bufp = bufp_ !== undefined ? bufp_ : 0; + }); + FileInfo = $pkg.FileInfo = $newType(8, $kindInterface, "os.FileInfo", "FileInfo", "os", null); + FileMode = $pkg.FileMode = $newType(4, $kindUint32, "os.FileMode", "FileMode", "os", null); + fileStat = $pkg.fileStat = $newType(0, $kindStruct, "os.fileStat", "fileStat", "os", function(name_, size_, mode_, modTime_, sys_) { + this.$val = this; + this.name = name_ !== undefined ? name_ : ""; + this.size = size_ !== undefined ? size_ : new $Int64(0, 0); + this.mode = mode_ !== undefined ? mode_ : 0; + this.modTime = modTime_ !== undefined ? modTime_ : new time.Time.ptr(); + this.sys = sys_ !== undefined ? sys_ : $ifaceNil; + }); + sliceType = $sliceType($String); + ptrType = $ptrType(dirInfo); + sliceType$1 = $sliceType($Uint8); + sliceType$2 = $sliceType(FileInfo); + ptrType$2 = $ptrType(File); + ptrType$3 = $ptrType(PathError); + ptrType$4 = $ptrType(LinkError); + arrayType = $arrayType($Uint8, 32); + ptrType$11 = $ptrType(file); + funcType$1 = $funcType([ptrType$11], [$error], false); + ptrType$12 = $ptrType($Int32); + ptrType$14 = $ptrType(fileStat); + ptrType$15 = $ptrType(SyscallError); + runtime_args = function() { + return $pkg.Args; + }; + init = function() { + var argv, i, process; + process = $global.process; + if (!(process === undefined)) { + argv = process.argv; + $pkg.Args = $makeSlice(sliceType, ($parseInt(argv.length) - 1 >> 0)); + i = 0; + while (true) { + if (!(i < ($parseInt(argv.length) - 1 >> 0))) { break; } + (i < 0 || i >= $pkg.Args.$length) ? $throwRuntimeError("index out of range") : $pkg.Args.$array[$pkg.Args.$offset + i] = $internalize(argv[(i + 1 >> 0)], $String); + i = i + (1) >> 0; + } + } + if ($pkg.Args.$length === 0) { + $pkg.Args = new sliceType(["?"]); + } + }; + File.ptr.prototype.readdirnames = function(n) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, _tuple$2, d, err = $ifaceNil, errno, f, n, names = sliceType.nil, nb, nc, size; + f = this; + if (f.file.dirinfo === ptrType.nil) { + f.file.dirinfo = new dirInfo.ptr(); + f.file.dirinfo.buf = $makeSlice(sliceType$1, 4096); + } + d = f.file.dirinfo; + size = n; + if (size <= 0) { + size = 100; + n = -1; + } + names = $makeSlice(sliceType, 0, size); + while (true) { + if (!(!((n === 0)))) { break; } + if (d.bufp >= d.nbuf) { + d.bufp = 0; + errno = $ifaceNil; + _tuple$1 = syscall.ReadDirent(f.file.fd, d.buf); + _tuple = fixCount(_tuple$1[0], _tuple$1[1]); d.nbuf = _tuple[0]; errno = _tuple[1]; + if (!($interfaceIsEqual(errno, $ifaceNil))) { + _tmp = names; _tmp$1 = NewSyscallError("readdirent", errno); names = _tmp; err = _tmp$1; + return [names, err]; + } + if (d.nbuf <= 0) { + break; + } + } + _tmp$2 = 0; _tmp$3 = 0; nb = _tmp$2; nc = _tmp$3; + _tuple$2 = syscall.ParseDirent($subslice(d.buf, d.bufp, d.nbuf), n, names); nb = _tuple$2[0]; nc = _tuple$2[1]; names = _tuple$2[2]; + d.bufp = d.bufp + (nb) >> 0; + n = n - (nc) >> 0; + } + if (n >= 0 && (names.$length === 0)) { + _tmp$4 = names; _tmp$5 = io.EOF; names = _tmp$4; err = _tmp$5; + return [names, err]; + } + _tmp$6 = names; _tmp$7 = $ifaceNil; names = _tmp$6; err = _tmp$7; + return [names, err]; + }; + File.prototype.readdirnames = function(n) { return this.$val.readdirnames(n); }; + File.ptr.prototype.Readdir = function(n) { + var _tmp, _tmp$1, _tuple, err = $ifaceNil, f, fi = sliceType$2.nil, n; + f = this; + if (f === ptrType$2.nil) { + _tmp = sliceType$2.nil; _tmp$1 = $pkg.ErrInvalid; fi = _tmp; err = _tmp$1; + return [fi, err]; + } + _tuple = f.readdir(n); fi = _tuple[0]; err = _tuple[1]; + return [fi, err]; + }; + File.prototype.Readdir = function(n) { return this.$val.Readdir(n); }; + File.ptr.prototype.Readdirnames = function(n) { + var _tmp, _tmp$1, _tuple, err = $ifaceNil, f, n, names = sliceType.nil; + f = this; + if (f === ptrType$2.nil) { + _tmp = sliceType.nil; _tmp$1 = $pkg.ErrInvalid; names = _tmp; err = _tmp$1; + return [names, err]; + } + _tuple = f.readdirnames(n); names = _tuple[0]; err = _tuple[1]; + return [names, err]; + }; + File.prototype.Readdirnames = function(n) { return this.$val.Readdirnames(n); }; + Getenv = $pkg.Getenv = function(key, $b) { + var $args = arguments, $r, $s = 0, $this = this, _r, _tuple, v; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Getenv = function() { s: while (true) { switch ($s) { case 0: + _r = syscall.Getenv(key, $BLOCKING); /* */ $s = 1; case 1: if (_r && _r.$blocking) { _r = _r(); } + _tuple = _r; v = _tuple[0]; + return v; + /* */ case -1: } return; } }; $blocking_Getenv.$blocking = true; return $blocking_Getenv; + }; + PathError.ptr.prototype.Error = function() { + var e; + e = this; + return e.Op + " " + e.Path + ": " + e.Err.Error(); + }; + PathError.prototype.Error = function() { return this.$val.Error(); }; + SyscallError.ptr.prototype.Error = function() { + var e; + e = this; + return e.Syscall + ": " + e.Err.Error(); + }; + SyscallError.prototype.Error = function() { return this.$val.Error(); }; + NewSyscallError = $pkg.NewSyscallError = function(syscall$1, err) { + var err, syscall$1; + if ($interfaceIsEqual(err, $ifaceNil)) { + return $ifaceNil; + } + return new SyscallError.ptr(syscall$1, err); + }; + IsNotExist = $pkg.IsNotExist = function(err) { + var err; + return isNotExist(err); + }; + isNotExist = function(err) { + var _ref, err, pe; + _ref = err; + if (_ref === $ifaceNil) { + pe = _ref; + return false; + } else if ($assertType(_ref, ptrType$3, true)[1]) { + pe = _ref.$val; + err = pe.Err; + } else if ($assertType(_ref, ptrType$4, true)[1]) { + pe = _ref.$val; + err = pe.Err; + } + return $interfaceIsEqual(err, new syscall.Errno(2)) || $interfaceIsEqual(err, $pkg.ErrNotExist); + }; + File.ptr.prototype.Name = function() { + var f; + f = this; + return f.file.name; + }; + File.prototype.Name = function() { return this.$val.Name(); }; + LinkError.ptr.prototype.Error = function() { + var e; + e = this; + return e.Op + " " + e.Old + " " + e.New + ": " + e.Err.Error(); + }; + LinkError.prototype.Error = function() { return this.$val.Error(); }; + File.ptr.prototype.Read = function(b) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, e, err = $ifaceNil, f, n = 0; + f = this; + if (f === ptrType$2.nil) { + _tmp = 0; _tmp$1 = $pkg.ErrInvalid; n = _tmp; err = _tmp$1; + return [n, err]; + } + _tuple = f.read(b); n = _tuple[0]; e = _tuple[1]; + if (n < 0) { + n = 0; + } + if ((n === 0) && b.$length > 0 && $interfaceIsEqual(e, $ifaceNil)) { + _tmp$2 = 0; _tmp$3 = io.EOF; n = _tmp$2; err = _tmp$3; + return [n, err]; + } + if (!($interfaceIsEqual(e, $ifaceNil))) { + err = new PathError.ptr("read", f.file.name, e); + } + _tmp$4 = n; _tmp$5 = err; n = _tmp$4; err = _tmp$5; + return [n, err]; + }; + File.prototype.Read = function(b) { return this.$val.Read(b); }; + File.ptr.prototype.ReadAt = function(b, off) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, e, err = $ifaceNil, f, m, n = 0, off, x; + f = this; + if (f === ptrType$2.nil) { + _tmp = 0; _tmp$1 = $pkg.ErrInvalid; n = _tmp; err = _tmp$1; + return [n, err]; + } + while (true) { + if (!(b.$length > 0)) { break; } + _tuple = f.pread(b, off); m = _tuple[0]; e = _tuple[1]; + if ((m === 0) && $interfaceIsEqual(e, $ifaceNil)) { + _tmp$2 = n; _tmp$3 = io.EOF; n = _tmp$2; err = _tmp$3; + return [n, err]; + } + if (!($interfaceIsEqual(e, $ifaceNil))) { + err = new PathError.ptr("read", f.file.name, e); + break; + } + n = n + (m) >> 0; + b = $subslice(b, m); + off = (x = new $Int64(0, m), new $Int64(off.$high + x.$high, off.$low + x.$low)); + } + return [n, err]; + }; + File.prototype.ReadAt = function(b, off) { return this.$val.ReadAt(b, off); }; + File.ptr.prototype.Write = function(b) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, e, err = $ifaceNil, f, n = 0; + f = this; + if (f === ptrType$2.nil) { + _tmp = 0; _tmp$1 = $pkg.ErrInvalid; n = _tmp; err = _tmp$1; + return [n, err]; + } + _tuple = f.write(b); n = _tuple[0]; e = _tuple[1]; + if (n < 0) { + n = 0; + } + if (!((n === b.$length))) { + err = io.ErrShortWrite; + } + epipecheck(f, e); + if (!($interfaceIsEqual(e, $ifaceNil))) { + err = new PathError.ptr("write", f.file.name, e); + } + _tmp$2 = n; _tmp$3 = err; n = _tmp$2; err = _tmp$3; + return [n, err]; + }; + File.prototype.Write = function(b) { return this.$val.Write(b); }; + File.ptr.prototype.WriteAt = function(b, off) { + var _tmp, _tmp$1, _tuple, b, e, err = $ifaceNil, f, m, n = 0, off, x; + f = this; + if (f === ptrType$2.nil) { + _tmp = 0; _tmp$1 = $pkg.ErrInvalid; n = _tmp; err = _tmp$1; + return [n, err]; + } + while (true) { + if (!(b.$length > 0)) { break; } + _tuple = f.pwrite(b, off); m = _tuple[0]; e = _tuple[1]; + if (!($interfaceIsEqual(e, $ifaceNil))) { + err = new PathError.ptr("write", f.file.name, e); + break; + } + n = n + (m) >> 0; + b = $subslice(b, m); + off = (x = new $Int64(0, m), new $Int64(off.$high + x.$high, off.$low + x.$low)); + } + return [n, err]; + }; + File.prototype.WriteAt = function(b, off) { return this.$val.WriteAt(b, off); }; + File.ptr.prototype.Seek = function(offset, whence) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, e, err = $ifaceNil, f, offset, r, ret = new $Int64(0, 0), whence; + f = this; + if (f === ptrType$2.nil) { + _tmp = new $Int64(0, 0); _tmp$1 = $pkg.ErrInvalid; ret = _tmp; err = _tmp$1; + return [ret, err]; + } + _tuple = f.seek(offset, whence); r = _tuple[0]; e = _tuple[1]; + if ($interfaceIsEqual(e, $ifaceNil) && !(f.file.dirinfo === ptrType.nil) && !((r.$high === 0 && r.$low === 0))) { + e = new syscall.Errno(21); + } + if (!($interfaceIsEqual(e, $ifaceNil))) { + _tmp$2 = new $Int64(0, 0); _tmp$3 = new PathError.ptr("seek", f.file.name, e); ret = _tmp$2; err = _tmp$3; + return [ret, err]; + } + _tmp$4 = r; _tmp$5 = $ifaceNil; ret = _tmp$4; err = _tmp$5; + return [ret, err]; + }; + File.prototype.Seek = function(offset, whence) { return this.$val.Seek(offset, whence); }; + File.ptr.prototype.WriteString = function(s) { + var _tmp, _tmp$1, _tuple, err = $ifaceNil, f, ret = 0, s; + f = this; + if (f === ptrType$2.nil) { + _tmp = 0; _tmp$1 = $pkg.ErrInvalid; ret = _tmp; err = _tmp$1; + return [ret, err]; + } + _tuple = f.Write(new sliceType$1($stringToBytes(s))); ret = _tuple[0]; err = _tuple[1]; + return [ret, err]; + }; + File.prototype.WriteString = function(s) { return this.$val.WriteString(s); }; + File.ptr.prototype.Chdir = function() { + var e, f; + f = this; + if (f === ptrType$2.nil) { + return $pkg.ErrInvalid; + } + e = syscall.Fchdir(f.file.fd); + if (!($interfaceIsEqual(e, $ifaceNil))) { + return new PathError.ptr("chdir", f.file.name, e); + } + return $ifaceNil; + }; + File.prototype.Chdir = function() { return this.$val.Chdir(); }; + Open = $pkg.Open = function(name) { + var _tuple, err = $ifaceNil, file$1 = ptrType$2.nil, name; + _tuple = OpenFile(name, 0, 0); file$1 = _tuple[0]; err = _tuple[1]; + return [file$1, err]; + }; + fixCount = function(n, err) { + var err, n; + if (n < 0) { + n = 0; + } + return [n, err]; + }; + sigpipe = function() { + $panic("Native function not implemented: os.sigpipe"); + }; + syscallMode = function(i) { + var i, o = 0; + o = (o | ((new FileMode(i).Perm() >>> 0))) >>> 0; + if (!((((i & 8388608) >>> 0) === 0))) { + o = (o | (2048)) >>> 0; + } + if (!((((i & 4194304) >>> 0) === 0))) { + o = (o | (1024)) >>> 0; + } + if (!((((i & 1048576) >>> 0) === 0))) { + o = (o | (512)) >>> 0; + } + return o; + }; + File.ptr.prototype.Chmod = function(mode) { + var e, f, mode; + f = this; + if (f === ptrType$2.nil) { + return $pkg.ErrInvalid; + } + e = syscall.Fchmod(f.file.fd, syscallMode(mode)); + if (!($interfaceIsEqual(e, $ifaceNil))) { + return new PathError.ptr("chmod", f.file.name, e); + } + return $ifaceNil; + }; + File.prototype.Chmod = function(mode) { return this.$val.Chmod(mode); }; + File.ptr.prototype.Chown = function(uid, gid) { + var e, f, gid, uid; + f = this; + if (f === ptrType$2.nil) { + return $pkg.ErrInvalid; + } + e = syscall.Fchown(f.file.fd, uid, gid); + if (!($interfaceIsEqual(e, $ifaceNil))) { + return new PathError.ptr("chown", f.file.name, e); + } + return $ifaceNil; + }; + File.prototype.Chown = function(uid, gid) { return this.$val.Chown(uid, gid); }; + File.ptr.prototype.Truncate = function(size) { + var e, f, size; + f = this; + if (f === ptrType$2.nil) { + return $pkg.ErrInvalid; + } + e = syscall.Ftruncate(f.file.fd, size); + if (!($interfaceIsEqual(e, $ifaceNil))) { + return new PathError.ptr("truncate", f.file.name, e); + } + return $ifaceNil; + }; + File.prototype.Truncate = function(size) { return this.$val.Truncate(size); }; + File.ptr.prototype.Sync = function() { + var e, err = $ifaceNil, f; + f = this; + if (f === ptrType$2.nil) { + err = $pkg.ErrInvalid; + return err; + } + e = syscall.Fsync(f.file.fd); + if (!($interfaceIsEqual(e, $ifaceNil))) { + err = NewSyscallError("fsync", e); + return err; + } + err = $ifaceNil; + return err; + }; + File.prototype.Sync = function() { return this.$val.Sync(); }; + File.ptr.prototype.Fd = function() { + var f; + f = this; + if (f === ptrType$2.nil) { + return 4294967295; + } + return (f.file.fd >>> 0); + }; + File.prototype.Fd = function() { return this.$val.Fd(); }; + NewFile = $pkg.NewFile = function(fd, name) { + var f, fd, fdi, name; + fdi = (fd >> 0); + if (fdi < 0) { + return ptrType$2.nil; + } + f = new File.ptr(new file.ptr(fdi, name, ptrType.nil, 0)); + runtime.SetFinalizer(f.file, new funcType$1($methodExpr(ptrType$11.prototype.close))); + return f; + }; + epipecheck = function(file$1, e) { + var e, file$1; + if ($interfaceIsEqual(e, new syscall.Errno(32))) { + if (atomic.AddInt32(new ptrType$12(function() { return this.$target.file.nepipe; }, function($v) { this.$target.file.nepipe = $v; }, file$1), 1) >= 10) { + sigpipe(); + } + } else { + atomic.StoreInt32(new ptrType$12(function() { return this.$target.file.nepipe; }, function($v) { this.$target.file.nepipe = $v; }, file$1), 0); + } + }; + OpenFile = $pkg.OpenFile = function(name, flag, perm) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, e, err = $ifaceNil, file$1 = ptrType$2.nil, flag, name, perm, r; + _tuple = syscall.Open(name, flag | 16777216, syscallMode(perm)); r = _tuple[0]; e = _tuple[1]; + if (!($interfaceIsEqual(e, $ifaceNil))) { + _tmp = ptrType$2.nil; _tmp$1 = new PathError.ptr("open", name, e); file$1 = _tmp; err = _tmp$1; + return [file$1, err]; + } + if (!supportsCloseOnExec) { + syscall.CloseOnExec(r); + } + _tmp$2 = NewFile((r >>> 0), name); _tmp$3 = $ifaceNil; file$1 = _tmp$2; err = _tmp$3; + return [file$1, err]; + }; + File.ptr.prototype.Close = function() { + var f; + f = this; + if (f === ptrType$2.nil) { + return $pkg.ErrInvalid; + } + return f.file.close(); + }; + File.prototype.Close = function() { return this.$val.Close(); }; + file.ptr.prototype.close = function() { + var e, err, file$1; + file$1 = this; + if (file$1 === ptrType$11.nil || file$1.fd < 0) { + return new syscall.Errno(22); + } + err = $ifaceNil; + e = syscall.Close(file$1.fd); + if (!($interfaceIsEqual(e, $ifaceNil))) { + err = new PathError.ptr("close", file$1.name, e); + } + file$1.fd = -1; + runtime.SetFinalizer(file$1, $ifaceNil); + return err; + }; + file.prototype.close = function() { return this.$val.close(); }; + File.ptr.prototype.Stat = function() { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, err = $ifaceNil, f, fi = $ifaceNil, stat; + f = this; + if (f === ptrType$2.nil) { + _tmp = $ifaceNil; _tmp$1 = $pkg.ErrInvalid; fi = _tmp; err = _tmp$1; + return [fi, err]; + } + stat = $clone(new syscall.Stat_t.ptr(), syscall.Stat_t); + err = syscall.Fstat(f.file.fd, stat); + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$2 = $ifaceNil; _tmp$3 = new PathError.ptr("stat", f.file.name, err); fi = _tmp$2; err = _tmp$3; + return [fi, err]; + } + _tmp$4 = fileInfoFromStat(stat, f.file.name); _tmp$5 = $ifaceNil; fi = _tmp$4; err = _tmp$5; + return [fi, err]; + }; + File.prototype.Stat = function() { return this.$val.Stat(); }; + Lstat = $pkg.Lstat = function(name) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, err = $ifaceNil, fi = $ifaceNil, name, stat; + stat = $clone(new syscall.Stat_t.ptr(), syscall.Stat_t); + err = syscall.Lstat(name, stat); + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = $ifaceNil; _tmp$1 = new PathError.ptr("lstat", name, err); fi = _tmp; err = _tmp$1; + return [fi, err]; + } + _tmp$2 = fileInfoFromStat(stat, name); _tmp$3 = $ifaceNil; fi = _tmp$2; err = _tmp$3; + return [fi, err]; + }; + File.ptr.prototype.readdir = function(n) { + var _i, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, dirname, err = $ifaceNil, f, fi = sliceType$2.nil, filename, fip, lerr, n, names; + f = this; + dirname = f.file.name; + if (dirname === "") { + dirname = "."; + } + _tuple = f.Readdirnames(n); names = _tuple[0]; err = _tuple[1]; + fi = $makeSlice(sliceType$2, 0, names.$length); + _ref = names; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + filename = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + _tuple$1 = lstat(dirname + "/" + filename); fip = _tuple$1[0]; lerr = _tuple$1[1]; + if (IsNotExist(lerr)) { + _i++; + continue; + } + if (!($interfaceIsEqual(lerr, $ifaceNil))) { + _tmp = fi; _tmp$1 = lerr; fi = _tmp; err = _tmp$1; + return [fi, err]; + } + fi = $append(fi, fip); + _i++; + } + _tmp$2 = fi; _tmp$3 = err; fi = _tmp$2; err = _tmp$3; + return [fi, err]; + }; + File.prototype.readdir = function(n) { return this.$val.readdir(n); }; + File.ptr.prototype.read = function(b) { + var _tuple, _tuple$1, b, err = $ifaceNil, f, n = 0; + f = this; + if (true && b.$length > 1073741824) { + b = $subslice(b, 0, 1073741824); + } + _tuple$1 = syscall.Read(f.file.fd, b); + _tuple = fixCount(_tuple$1[0], _tuple$1[1]); n = _tuple[0]; err = _tuple[1]; + return [n, err]; + }; + File.prototype.read = function(b) { return this.$val.read(b); }; + File.ptr.prototype.pread = function(b, off) { + var _tuple, _tuple$1, b, err = $ifaceNil, f, n = 0, off; + f = this; + if (true && b.$length > 1073741824) { + b = $subslice(b, 0, 1073741824); + } + _tuple$1 = syscall.Pread(f.file.fd, b, off); + _tuple = fixCount(_tuple$1[0], _tuple$1[1]); n = _tuple[0]; err = _tuple[1]; + return [n, err]; + }; + File.prototype.pread = function(b, off) { return this.$val.pread(b, off); }; + File.ptr.prototype.write = function(b) { + var _tmp, _tmp$1, _tuple, _tuple$1, b, bcap, err = $ifaceNil, err$1, f, m, n = 0; + f = this; + while (true) { + if (!(true)) { break; } + bcap = b; + if (true && bcap.$length > 1073741824) { + bcap = $subslice(bcap, 0, 1073741824); + } + _tuple$1 = syscall.Write(f.file.fd, bcap); + _tuple = fixCount(_tuple$1[0], _tuple$1[1]); m = _tuple[0]; err$1 = _tuple[1]; + n = n + (m) >> 0; + if (0 < m && m < bcap.$length || $interfaceIsEqual(err$1, new syscall.Errno(4))) { + b = $subslice(b, m); + continue; + } + if (true && !((bcap.$length === b.$length)) && $interfaceIsEqual(err$1, $ifaceNil)) { + b = $subslice(b, m); + continue; + } + _tmp = n; _tmp$1 = err$1; n = _tmp; err = _tmp$1; + return [n, err]; + } + }; + File.prototype.write = function(b) { return this.$val.write(b); }; + File.ptr.prototype.pwrite = function(b, off) { + var _tuple, _tuple$1, b, err = $ifaceNil, f, n = 0, off; + f = this; + if (true && b.$length > 1073741824) { + b = $subslice(b, 0, 1073741824); + } + _tuple$1 = syscall.Pwrite(f.file.fd, b, off); + _tuple = fixCount(_tuple$1[0], _tuple$1[1]); n = _tuple[0]; err = _tuple[1]; + return [n, err]; + }; + File.prototype.pwrite = function(b, off) { return this.$val.pwrite(b, off); }; + File.ptr.prototype.seek = function(offset, whence) { + var _tuple, err = $ifaceNil, f, offset, ret = new $Int64(0, 0), whence; + f = this; + _tuple = syscall.Seek(f.file.fd, offset, whence); ret = _tuple[0]; err = _tuple[1]; + return [ret, err]; + }; + File.prototype.seek = function(offset, whence) { return this.$val.seek(offset, whence); }; + basename = function(name) { + var i, name; + i = name.length - 1 >> 0; + while (true) { + if (!(i > 0 && (name.charCodeAt(i) === 47))) { break; } + name = name.substring(0, i); + i = i - (1) >> 0; + } + i = i - (1) >> 0; + while (true) { + if (!(i >= 0)) { break; } + if (name.charCodeAt(i) === 47) { + name = name.substring((i + 1 >> 0)); + break; + } + i = i - (1) >> 0; + } + return name; + }; + init$1 = function() { + useSyscallwd = useSyscallwdDarwin; + }; + useSyscallwdDarwin = function(err) { + var err; + return !($interfaceIsEqual(err, new syscall.Errno(45))); + }; + IsPathSeparator = $pkg.IsPathSeparator = function(c) { + var c; + return 47 === c; + }; + init$2 = function() { + $pkg.Args = runtime_args(); + }; + Exit = $pkg.Exit = function(code) { + var code; + syscall.Exit(code); + }; + fileInfoFromStat = function(st, name) { + var _ref, fs, name, st; + fs = new fileStat.ptr(basename(name), st.Size, 0, $clone(timespecToTime(st.Mtimespec), time.Time), st); + fs.mode = (((st.Mode & 511) >>> 0) >>> 0); + _ref = (st.Mode & 61440) >>> 0; + if (_ref === 24576 || _ref === 57344) { + fs.mode = (fs.mode | (67108864)) >>> 0; + } else if (_ref === 8192) { + fs.mode = (fs.mode | (69206016)) >>> 0; + } else if (_ref === 16384) { + fs.mode = (fs.mode | (2147483648)) >>> 0; + } else if (_ref === 4096) { + fs.mode = (fs.mode | (33554432)) >>> 0; + } else if (_ref === 40960) { + fs.mode = (fs.mode | (134217728)) >>> 0; + } else if (_ref === 32768) { + } else if (_ref === 49152) { + fs.mode = (fs.mode | (16777216)) >>> 0; + } + if (!((((st.Mode & 1024) >>> 0) === 0))) { + fs.mode = (fs.mode | (4194304)) >>> 0; + } + if (!((((st.Mode & 2048) >>> 0) === 0))) { + fs.mode = (fs.mode | (8388608)) >>> 0; + } + if (!((((st.Mode & 512) >>> 0) === 0))) { + fs.mode = (fs.mode | (1048576)) >>> 0; + } + return fs; + }; + timespecToTime = function(ts) { + var ts; + ts = $clone(ts, syscall.Timespec); + return time.Unix(ts.Sec, ts.Nsec); + }; + init$3 = function() { + var _i, _ref, _rune, _tuple, err, i, osver; + _tuple = syscall.Sysctl("kern.osrelease"); osver = _tuple[0]; err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return; + } + i = 0; + _ref = osver; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + i = _i; + if (!((osver.charCodeAt(i) === 46))) { + _i += _rune[1]; + continue; + } + _i += _rune[1]; + } + if (i > 2 || (i === 2) && osver.charCodeAt(0) >= 49 && osver.charCodeAt(1) >= 49) { + supportsCloseOnExec = true; + } + }; + FileMode.prototype.String = function() { + var _i, _i$1, _ref, _ref$1, _rune, _rune$1, buf, c, c$1, i, i$1, m, w, y, y$1; + m = this.$val; + buf = $clone(arrayType.zero(), arrayType); + w = 0; + _ref = "dalTLDpSugct"; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + i = _i; + c = _rune[0]; + if (!((((m & (((y = ((31 - i >> 0) >>> 0), y < 32 ? (1 << y) : 0) >>> 0))) >>> 0) === 0))) { + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = (c << 24 >>> 24); + w = w + (1) >> 0; + } + _i += _rune[1]; + } + if (w === 0) { + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 45; + w = w + (1) >> 0; + } + _ref$1 = "rwxrwxrwx"; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.length)) { break; } + _rune$1 = $decodeRune(_ref$1, _i$1); + i$1 = _i$1; + c$1 = _rune$1[0]; + if (!((((m & (((y$1 = ((8 - i$1 >> 0) >>> 0), y$1 < 32 ? (1 << y$1) : 0) >>> 0))) >>> 0) === 0))) { + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = (c$1 << 24 >>> 24); + } else { + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 45; + } + w = w + (1) >> 0; + _i$1 += _rune$1[1]; + } + return $bytesToString($subslice(new sliceType$1(buf), 0, w)); + }; + $ptrType(FileMode).prototype.String = function() { return new FileMode(this.$get()).String(); }; + FileMode.prototype.IsDir = function() { + var m; + m = this.$val; + return !((((m & 2147483648) >>> 0) === 0)); + }; + $ptrType(FileMode).prototype.IsDir = function() { return new FileMode(this.$get()).IsDir(); }; + FileMode.prototype.IsRegular = function() { + var m; + m = this.$val; + return ((m & 2399141888) >>> 0) === 0; + }; + $ptrType(FileMode).prototype.IsRegular = function() { return new FileMode(this.$get()).IsRegular(); }; + FileMode.prototype.Perm = function() { + var m; + m = this.$val; + return (m & 511) >>> 0; + }; + $ptrType(FileMode).prototype.Perm = function() { return new FileMode(this.$get()).Perm(); }; + fileStat.ptr.prototype.Name = function() { + var fs; + fs = this; + return fs.name; + }; + fileStat.prototype.Name = function() { return this.$val.Name(); }; + fileStat.ptr.prototype.IsDir = function() { + var fs; + fs = this; + return new FileMode(fs.Mode()).IsDir(); + }; + fileStat.prototype.IsDir = function() { return this.$val.IsDir(); }; + fileStat.ptr.prototype.Size = function() { + var fs; + fs = this; + return fs.size; + }; + fileStat.prototype.Size = function() { return this.$val.Size(); }; + fileStat.ptr.prototype.Mode = function() { + var fs; + fs = this; + return fs.mode; + }; + fileStat.prototype.Mode = function() { return this.$val.Mode(); }; + fileStat.ptr.prototype.ModTime = function() { + var fs; + fs = this; + return fs.modTime; + }; + fileStat.prototype.ModTime = function() { return this.$val.ModTime(); }; + fileStat.ptr.prototype.Sys = function() { + var fs; + fs = this; + return fs.sys; + }; + fileStat.prototype.Sys = function() { return this.$val.Sys(); }; + ptrType$3.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$15.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$4.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$2.methods = [{prop: "readdirnames", name: "readdirnames", pkg: "os", typ: $funcType([$Int], [sliceType, $error], false)}, {prop: "Readdir", name: "Readdir", pkg: "", typ: $funcType([$Int], [sliceType$2, $error], false)}, {prop: "Readdirnames", name: "Readdirnames", pkg: "", typ: $funcType([$Int], [sliceType, $error], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "ReadAt", name: "ReadAt", pkg: "", typ: $funcType([sliceType$1, $Int64], [$Int, $error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "WriteAt", name: "WriteAt", pkg: "", typ: $funcType([sliceType$1, $Int64], [$Int, $error], false)}, {prop: "Seek", name: "Seek", pkg: "", typ: $funcType([$Int64, $Int], [$Int64, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}, {prop: "Chdir", name: "Chdir", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Chmod", name: "Chmod", pkg: "", typ: $funcType([FileMode], [$error], false)}, {prop: "Chown", name: "Chown", pkg: "", typ: $funcType([$Int, $Int], [$error], false)}, {prop: "Truncate", name: "Truncate", pkg: "", typ: $funcType([$Int64], [$error], false)}, {prop: "Sync", name: "Sync", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Fd", name: "Fd", pkg: "", typ: $funcType([], [$Uintptr], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Stat", name: "Stat", pkg: "", typ: $funcType([], [FileInfo, $error], false)}, {prop: "readdir", name: "readdir", pkg: "os", typ: $funcType([$Int], [sliceType$2, $error], false)}, {prop: "read", name: "read", pkg: "os", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "pread", name: "pread", pkg: "os", typ: $funcType([sliceType$1, $Int64], [$Int, $error], false)}, {prop: "write", name: "write", pkg: "os", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "pwrite", name: "pwrite", pkg: "os", typ: $funcType([sliceType$1, $Int64], [$Int, $error], false)}, {prop: "seek", name: "seek", pkg: "os", typ: $funcType([$Int64, $Int], [$Int64, $error], false)}]; + ptrType$11.methods = [{prop: "close", name: "close", pkg: "os", typ: $funcType([], [$error], false)}]; + FileMode.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "IsDir", name: "IsDir", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsRegular", name: "IsRegular", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Perm", name: "Perm", pkg: "", typ: $funcType([], [FileMode], false)}]; + ptrType$14.methods = [{prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "IsDir", name: "IsDir", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Mode", name: "Mode", pkg: "", typ: $funcType([], [FileMode], false)}, {prop: "ModTime", name: "ModTime", pkg: "", typ: $funcType([], [time.Time], false)}, {prop: "Sys", name: "Sys", pkg: "", typ: $funcType([], [$emptyInterface], false)}]; + PathError.init([{prop: "Op", name: "Op", pkg: "", typ: $String, tag: ""}, {prop: "Path", name: "Path", pkg: "", typ: $String, tag: ""}, {prop: "Err", name: "Err", pkg: "", typ: $error, tag: ""}]); + SyscallError.init([{prop: "Syscall", name: "Syscall", pkg: "", typ: $String, tag: ""}, {prop: "Err", name: "Err", pkg: "", typ: $error, tag: ""}]); + LinkError.init([{prop: "Op", name: "Op", pkg: "", typ: $String, tag: ""}, {prop: "Old", name: "Old", pkg: "", typ: $String, tag: ""}, {prop: "New", name: "New", pkg: "", typ: $String, tag: ""}, {prop: "Err", name: "Err", pkg: "", typ: $error, tag: ""}]); + File.init([{prop: "file", name: "", pkg: "os", typ: ptrType$11, tag: ""}]); + file.init([{prop: "fd", name: "fd", pkg: "os", typ: $Int, tag: ""}, {prop: "name", name: "name", pkg: "os", typ: $String, tag: ""}, {prop: "dirinfo", name: "dirinfo", pkg: "os", typ: ptrType, tag: ""}, {prop: "nepipe", name: "nepipe", pkg: "os", typ: $Int32, tag: ""}]); + dirInfo.init([{prop: "buf", name: "buf", pkg: "os", typ: sliceType$1, tag: ""}, {prop: "nbuf", name: "nbuf", pkg: "os", typ: $Int, tag: ""}, {prop: "bufp", name: "bufp", pkg: "os", typ: $Int, tag: ""}]); + FileInfo.init([{prop: "IsDir", name: "IsDir", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "ModTime", name: "ModTime", pkg: "", typ: $funcType([], [time.Time], false)}, {prop: "Mode", name: "Mode", pkg: "", typ: $funcType([], [FileMode], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Sys", name: "Sys", pkg: "", typ: $funcType([], [$emptyInterface], false)}]); + fileStat.init([{prop: "name", name: "name", pkg: "os", typ: $String, tag: ""}, {prop: "size", name: "size", pkg: "os", typ: $Int64, tag: ""}, {prop: "mode", name: "mode", pkg: "os", typ: FileMode, tag: ""}, {prop: "modTime", name: "modTime", pkg: "os", typ: time.Time, tag: ""}, {prop: "sys", name: "sys", pkg: "os", typ: $emptyInterface, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_os = function() { while (true) { switch ($s) { case 0: + $r = errors.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = js.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = io.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = runtime.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = sync.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + $r = atomic.$init($BLOCKING); /* */ $s = 6; case 6: if ($r && $r.$blocking) { $r = $r(); } + $r = syscall.$init($BLOCKING); /* */ $s = 7; case 7: if ($r && $r.$blocking) { $r = $r(); } + $r = time.$init($BLOCKING); /* */ $s = 8; case 8: if ($r && $r.$blocking) { $r = $r(); } + $pkg.Args = sliceType.nil; + supportsCloseOnExec = false; + $pkg.ErrInvalid = errors.New("invalid argument"); + $pkg.ErrPermission = errors.New("permission denied"); + $pkg.ErrExist = errors.New("file already exists"); + $pkg.ErrNotExist = errors.New("file does not exist"); + errFinished = errors.New("os: process already finished"); + $pkg.Stdin = NewFile((syscall.Stdin >>> 0), "/dev/stdin"); + $pkg.Stdout = NewFile((syscall.Stdout >>> 0), "/dev/stdout"); + $pkg.Stderr = NewFile((syscall.Stderr >>> 0), "/dev/stderr"); + useSyscallwd = (function(param) { + var param; + return true; + }); + lstat = Lstat; + init(); + init$1(); + init$2(); + init$3(); + /* */ } return; } }; $init_os.$blocking = true; return $init_os; + }; + return $pkg; +})(); +$packages["strconv"] = (function() { + var $pkg = {}, errors, math, utf8, NumError, decimal, leftCheat, extFloat, floatInfo, decimalSlice, sliceType, sliceType$1, sliceType$2, sliceType$3, sliceType$4, sliceType$5, sliceType$6, ptrType, arrayType, arrayType$1, ptrType$1, arrayType$2, arrayType$3, arrayType$4, arrayType$5, arrayType$6, ptrType$2, ptrType$3, ptrType$4, optimize, powtab, float64pow10, float32pow10, leftcheats, smallPowersOfTen, powersOfTen, uint64pow10, float32info, float64info, isPrint16, isNotPrint16, isPrint32, isNotPrint32, shifts, ParseBool, equalIgnoreCase, special, readFloat, atof64exact, atof32exact, atof32, atof64, ParseFloat, syntaxError, rangeError, cutoff64, ParseUint, ParseInt, Atoi, digitZero, trim, rightShift, prefixIsLessThan, leftShift, shouldRoundUp, frexp10Many, adjustLastDigitFixed, adjustLastDigit, AppendFloat, genericFtoa, bigFtoa, formatDigits, roundShortest, fmtE, fmtF, fmtB, max, FormatUint, FormatInt, Itoa, formatBits, quoteWith, Quote, QuoteToASCII, QuoteRune, AppendQuoteRune, QuoteRuneToASCII, AppendQuoteRuneToASCII, CanBackquote, unhex, UnquoteChar, Unquote, contains, bsearch16, bsearch32, IsPrint; + errors = $packages["errors"]; + math = $packages["math"]; + utf8 = $packages["unicode/utf8"]; + NumError = $pkg.NumError = $newType(0, $kindStruct, "strconv.NumError", "NumError", "strconv", function(Func_, Num_, Err_) { + this.$val = this; + this.Func = Func_ !== undefined ? Func_ : ""; + this.Num = Num_ !== undefined ? Num_ : ""; + this.Err = Err_ !== undefined ? Err_ : $ifaceNil; + }); + decimal = $pkg.decimal = $newType(0, $kindStruct, "strconv.decimal", "decimal", "strconv", function(d_, nd_, dp_, neg_, trunc_) { + this.$val = this; + this.d = d_ !== undefined ? d_ : arrayType$6.zero(); + this.nd = nd_ !== undefined ? nd_ : 0; + this.dp = dp_ !== undefined ? dp_ : 0; + this.neg = neg_ !== undefined ? neg_ : false; + this.trunc = trunc_ !== undefined ? trunc_ : false; + }); + leftCheat = $pkg.leftCheat = $newType(0, $kindStruct, "strconv.leftCheat", "leftCheat", "strconv", function(delta_, cutoff_) { + this.$val = this; + this.delta = delta_ !== undefined ? delta_ : 0; + this.cutoff = cutoff_ !== undefined ? cutoff_ : ""; + }); + extFloat = $pkg.extFloat = $newType(0, $kindStruct, "strconv.extFloat", "extFloat", "strconv", function(mant_, exp_, neg_) { + this.$val = this; + this.mant = mant_ !== undefined ? mant_ : new $Uint64(0, 0); + this.exp = exp_ !== undefined ? exp_ : 0; + this.neg = neg_ !== undefined ? neg_ : false; + }); + floatInfo = $pkg.floatInfo = $newType(0, $kindStruct, "strconv.floatInfo", "floatInfo", "strconv", function(mantbits_, expbits_, bias_) { + this.$val = this; + this.mantbits = mantbits_ !== undefined ? mantbits_ : 0; + this.expbits = expbits_ !== undefined ? expbits_ : 0; + this.bias = bias_ !== undefined ? bias_ : 0; + }); + decimalSlice = $pkg.decimalSlice = $newType(0, $kindStruct, "strconv.decimalSlice", "decimalSlice", "strconv", function(d_, nd_, dp_, neg_) { + this.$val = this; + this.d = d_ !== undefined ? d_ : sliceType$6.nil; + this.nd = nd_ !== undefined ? nd_ : 0; + this.dp = dp_ !== undefined ? dp_ : 0; + this.neg = neg_ !== undefined ? neg_ : false; + }); + sliceType = $sliceType($Int); + sliceType$1 = $sliceType($Float64); + sliceType$2 = $sliceType($Float32); + sliceType$3 = $sliceType(leftCheat); + sliceType$4 = $sliceType($Uint16); + sliceType$5 = $sliceType($Uint32); + sliceType$6 = $sliceType($Uint8); + ptrType = $ptrType(NumError); + arrayType = $arrayType($Uint8, 24); + arrayType$1 = $arrayType($Uint8, 32); + ptrType$1 = $ptrType(floatInfo); + arrayType$2 = $arrayType($Uint8, 3); + arrayType$3 = $arrayType($Uint8, 50); + arrayType$4 = $arrayType($Uint8, 65); + arrayType$5 = $arrayType($Uint8, 4); + arrayType$6 = $arrayType($Uint8, 800); + ptrType$2 = $ptrType(decimal); + ptrType$3 = $ptrType(decimalSlice); + ptrType$4 = $ptrType(extFloat); + ParseBool = $pkg.ParseBool = function(str) { + var _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, err = $ifaceNil, str, value = false; + _ref = str; + if (_ref === "1" || _ref === "t" || _ref === "T" || _ref === "true" || _ref === "TRUE" || _ref === "True") { + _tmp = true; _tmp$1 = $ifaceNil; value = _tmp; err = _tmp$1; + return [value, err]; + } else if (_ref === "0" || _ref === "f" || _ref === "F" || _ref === "false" || _ref === "FALSE" || _ref === "False") { + _tmp$2 = false; _tmp$3 = $ifaceNil; value = _tmp$2; err = _tmp$3; + return [value, err]; + } + _tmp$4 = false; _tmp$5 = syntaxError("ParseBool", str); value = _tmp$4; err = _tmp$5; + return [value, err]; + }; + equalIgnoreCase = function(s1, s2) { + var c1, c2, i, s1, s2; + if (!((s1.length === s2.length))) { + return false; + } + i = 0; + while (true) { + if (!(i < s1.length)) { break; } + c1 = s1.charCodeAt(i); + if (65 <= c1 && c1 <= 90) { + c1 = c1 + (32) << 24 >>> 24; + } + c2 = s2.charCodeAt(i); + if (65 <= c2 && c2 <= 90) { + c2 = c2 + (32) << 24 >>> 24; + } + if (!((c1 === c2))) { + return false; + } + i = i + (1) >> 0; + } + return true; + }; + special = function(s) { + var _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, f = 0, ok = false, s; + if (s.length === 0) { + return [f, ok]; + } + _ref = s.charCodeAt(0); + if (_ref === 43) { + if (equalIgnoreCase(s, "+inf") || equalIgnoreCase(s, "+infinity")) { + _tmp = math.Inf(1); _tmp$1 = true; f = _tmp; ok = _tmp$1; + return [f, ok]; + } + } else if (_ref === 45) { + if (equalIgnoreCase(s, "-inf") || equalIgnoreCase(s, "-infinity")) { + _tmp$2 = math.Inf(-1); _tmp$3 = true; f = _tmp$2; ok = _tmp$3; + return [f, ok]; + } + } else if (_ref === 110 || _ref === 78) { + if (equalIgnoreCase(s, "nan")) { + _tmp$4 = math.NaN(); _tmp$5 = true; f = _tmp$4; ok = _tmp$5; + return [f, ok]; + } + } else if (_ref === 105 || _ref === 73) { + if (equalIgnoreCase(s, "inf") || equalIgnoreCase(s, "infinity")) { + _tmp$6 = math.Inf(1); _tmp$7 = true; f = _tmp$6; ok = _tmp$7; + return [f, ok]; + } + } else { + return [f, ok]; + } + return [f, ok]; + }; + decimal.ptr.prototype.set = function(s) { + var b, e, esign, i, ok = false, s, sawdigits, sawdot, x, x$1; + b = this; + i = 0; + b.neg = false; + b.trunc = false; + if (i >= s.length) { + return ok; + } + if (s.charCodeAt(i) === 43) { + i = i + (1) >> 0; + } else if (s.charCodeAt(i) === 45) { + b.neg = true; + i = i + (1) >> 0; + } + sawdot = false; + sawdigits = false; + while (true) { + if (!(i < s.length)) { break; } + if (s.charCodeAt(i) === 46) { + if (sawdot) { + return ok; + } + sawdot = true; + b.dp = b.nd; + i = i + (1) >> 0; + continue; + } else if (48 <= s.charCodeAt(i) && s.charCodeAt(i) <= 57) { + sawdigits = true; + if ((s.charCodeAt(i) === 48) && (b.nd === 0)) { + b.dp = b.dp - (1) >> 0; + i = i + (1) >> 0; + continue; + } + if (b.nd < 800) { + (x = b.d, x$1 = b.nd, (x$1 < 0 || x$1 >= x.length) ? $throwRuntimeError("index out of range") : x[x$1] = s.charCodeAt(i)); + b.nd = b.nd + (1) >> 0; + } else if (!((s.charCodeAt(i) === 48))) { + b.trunc = true; + } + i = i + (1) >> 0; + continue; + } + break; + } + if (!sawdigits) { + return ok; + } + if (!sawdot) { + b.dp = b.nd; + } + if (i < s.length && ((s.charCodeAt(i) === 101) || (s.charCodeAt(i) === 69))) { + i = i + (1) >> 0; + if (i >= s.length) { + return ok; + } + esign = 1; + if (s.charCodeAt(i) === 43) { + i = i + (1) >> 0; + } else if (s.charCodeAt(i) === 45) { + i = i + (1) >> 0; + esign = -1; + } + if (i >= s.length || s.charCodeAt(i) < 48 || s.charCodeAt(i) > 57) { + return ok; + } + e = 0; + while (true) { + if (!(i < s.length && 48 <= s.charCodeAt(i) && s.charCodeAt(i) <= 57)) { break; } + if (e < 10000) { + e = ((e * 10 >> 0) + (s.charCodeAt(i) >> 0) >> 0) - 48 >> 0; + } + i = i + (1) >> 0; + } + b.dp = b.dp + ((e * esign >> 0)) >> 0; + } + if (!((i === s.length))) { + return ok; + } + ok = true; + return ok; + }; + decimal.prototype.set = function(s) { return this.$val.set(s); }; + readFloat = function(s) { + var _ref, c, dp, e, esign, exp = 0, i, mantissa = new $Uint64(0, 0), nd, ndMant, neg = false, ok = false, s, sawdigits, sawdot, trunc = false, x; + i = 0; + if (i >= s.length) { + return [mantissa, exp, neg, trunc, ok]; + } + if (s.charCodeAt(i) === 43) { + i = i + (1) >> 0; + } else if (s.charCodeAt(i) === 45) { + neg = true; + i = i + (1) >> 0; + } + sawdot = false; + sawdigits = false; + nd = 0; + ndMant = 0; + dp = 0; + while (true) { + if (!(i < s.length)) { break; } + c = s.charCodeAt(i); + _ref = true; + if (_ref === (c === 46)) { + if (sawdot) { + return [mantissa, exp, neg, trunc, ok]; + } + sawdot = true; + dp = nd; + i = i + (1) >> 0; + continue; + } else if (_ref === 48 <= c && c <= 57) { + sawdigits = true; + if ((c === 48) && (nd === 0)) { + dp = dp - (1) >> 0; + i = i + (1) >> 0; + continue; + } + nd = nd + (1) >> 0; + if (ndMant < 19) { + mantissa = $mul64(mantissa, (new $Uint64(0, 10))); + mantissa = (x = new $Uint64(0, (c - 48 << 24 >>> 24)), new $Uint64(mantissa.$high + x.$high, mantissa.$low + x.$low)); + ndMant = ndMant + (1) >> 0; + } else if (!((s.charCodeAt(i) === 48))) { + trunc = true; + } + i = i + (1) >> 0; + continue; + } + break; + } + if (!sawdigits) { + return [mantissa, exp, neg, trunc, ok]; + } + if (!sawdot) { + dp = nd; + } + if (i < s.length && ((s.charCodeAt(i) === 101) || (s.charCodeAt(i) === 69))) { + i = i + (1) >> 0; + if (i >= s.length) { + return [mantissa, exp, neg, trunc, ok]; + } + esign = 1; + if (s.charCodeAt(i) === 43) { + i = i + (1) >> 0; + } else if (s.charCodeAt(i) === 45) { + i = i + (1) >> 0; + esign = -1; + } + if (i >= s.length || s.charCodeAt(i) < 48 || s.charCodeAt(i) > 57) { + return [mantissa, exp, neg, trunc, ok]; + } + e = 0; + while (true) { + if (!(i < s.length && 48 <= s.charCodeAt(i) && s.charCodeAt(i) <= 57)) { break; } + if (e < 10000) { + e = ((e * 10 >> 0) + (s.charCodeAt(i) >> 0) >> 0) - 48 >> 0; + } + i = i + (1) >> 0; + } + dp = dp + ((e * esign >> 0)) >> 0; + } + if (!((i === s.length))) { + return [mantissa, exp, neg, trunc, ok]; + } + exp = dp - ndMant >> 0; + ok = true; + return [mantissa, exp, neg, trunc, ok]; + }; + decimal.ptr.prototype.floatBits = function(flt) { + var $args = arguments, $s = 0, $this = this, _tmp, _tmp$1, b = new $Uint64(0, 0), bits, d, exp, mant, n, n$1, n$2, overflow = false, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, y, y$1, y$2, y$3; + /* */ s: while (true) { switch ($s) { case 0: + d = $this; + exp = 0; + mant = new $Uint64(0, 0); + /* if (d.nd === 0) { */ if (d.nd === 0) {} else { $s = 1; continue; } + mant = new $Uint64(0, 0); + exp = flt.bias; + /* goto out */ $s = 2; continue; + /* } */ case 1: + /* if (d.dp > 310) { */ if (d.dp > 310) {} else { $s = 3; continue; } + /* goto overflow */ $s = 4; continue; + /* } */ case 3: + /* if (d.dp < -330) { */ if (d.dp < -330) {} else { $s = 5; continue; } + mant = new $Uint64(0, 0); + exp = flt.bias; + /* goto out */ $s = 2; continue; + /* } */ case 5: + exp = 0; + while (true) { + if (!(d.dp > 0)) { break; } + n = 0; + if (d.dp >= powtab.$length) { + n = 27; + } else { + n = (x = d.dp, ((x < 0 || x >= powtab.$length) ? $throwRuntimeError("index out of range") : powtab.$array[powtab.$offset + x])); + } + d.Shift(-n); + exp = exp + (n) >> 0; + } + while (true) { + if (!(d.dp < 0 || (d.dp === 0) && d.d[0] < 53)) { break; } + n$1 = 0; + if (-d.dp >= powtab.$length) { + n$1 = 27; + } else { + n$1 = (x$1 = -d.dp, ((x$1 < 0 || x$1 >= powtab.$length) ? $throwRuntimeError("index out of range") : powtab.$array[powtab.$offset + x$1])); + } + d.Shift(n$1); + exp = exp - (n$1) >> 0; + } + exp = exp - (1) >> 0; + if (exp < (flt.bias + 1 >> 0)) { + n$2 = (flt.bias + 1 >> 0) - exp >> 0; + d.Shift(-n$2); + exp = exp + (n$2) >> 0; + } + /* if ((exp - flt.bias >> 0) >= (((y = flt.expbits, y < 32 ? (1 << y) : 0) >> 0) - 1 >> 0)) { */ if ((exp - flt.bias >> 0) >= (((y = flt.expbits, y < 32 ? (1 << y) : 0) >> 0) - 1 >> 0)) {} else { $s = 6; continue; } + /* goto overflow */ $s = 4; continue; + /* } */ case 6: + d.Shift(((1 + flt.mantbits >>> 0) >> 0)); + mant = d.RoundedInteger(); + /* if ((x$2 = $shiftLeft64(new $Uint64(0, 2), flt.mantbits), (mant.$high === x$2.$high && mant.$low === x$2.$low))) { */ if ((x$2 = $shiftLeft64(new $Uint64(0, 2), flt.mantbits), (mant.$high === x$2.$high && mant.$low === x$2.$low))) {} else { $s = 7; continue; } + mant = $shiftRightUint64(mant, (1)); + exp = exp + (1) >> 0; + /* if ((exp - flt.bias >> 0) >= (((y$1 = flt.expbits, y$1 < 32 ? (1 << y$1) : 0) >> 0) - 1 >> 0)) { */ if ((exp - flt.bias >> 0) >= (((y$1 = flt.expbits, y$1 < 32 ? (1 << y$1) : 0) >> 0) - 1 >> 0)) {} else { $s = 8; continue; } + /* goto overflow */ $s = 4; continue; + /* } */ case 8: + /* } */ case 7: + if ((x$3 = (x$4 = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), new $Uint64(mant.$high & x$4.$high, (mant.$low & x$4.$low) >>> 0)), (x$3.$high === 0 && x$3.$low === 0))) { + exp = flt.bias; + } + /* goto out */ $s = 2; continue; + /* overflow: */ case 4: + mant = new $Uint64(0, 0); + exp = (((y$2 = flt.expbits, y$2 < 32 ? (1 << y$2) : 0) >> 0) - 1 >> 0) + flt.bias >> 0; + overflow = true; + /* out: */ case 2: + bits = (x$5 = (x$6 = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), new $Uint64(x$6.$high - 0, x$6.$low - 1)), new $Uint64(mant.$high & x$5.$high, (mant.$low & x$5.$low) >>> 0)); + bits = (x$7 = $shiftLeft64(new $Uint64(0, (((exp - flt.bias >> 0)) & ((((y$3 = flt.expbits, y$3 < 32 ? (1 << y$3) : 0) >> 0) - 1 >> 0)))), flt.mantbits), new $Uint64(bits.$high | x$7.$high, (bits.$low | x$7.$low) >>> 0)); + if (d.neg) { + bits = (x$8 = $shiftLeft64($shiftLeft64(new $Uint64(0, 1), flt.mantbits), flt.expbits), new $Uint64(bits.$high | x$8.$high, (bits.$low | x$8.$low) >>> 0)); + } + _tmp = bits; _tmp$1 = overflow; b = _tmp; overflow = _tmp$1; + return [b, overflow]; + /* */ case -1: } return; } + }; + decimal.prototype.floatBits = function(flt) { return this.$val.floatBits(flt); }; + atof64exact = function(mantissa, exp, neg) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, exp, f = 0, mantissa, neg, ok = false, x, x$1, x$2; + if (!((x = $shiftRightUint64(mantissa, float64info.mantbits), (x.$high === 0 && x.$low === 0)))) { + return [f, ok]; + } + f = $flatten64(mantissa); + if (neg) { + f = -f; + } + if (exp === 0) { + _tmp = f; _tmp$1 = true; f = _tmp; ok = _tmp$1; + return [f, ok]; + } else if (exp > 0 && exp <= 37) { + if (exp > 22) { + f = f * ((x$1 = exp - 22 >> 0, ((x$1 < 0 || x$1 >= float64pow10.$length) ? $throwRuntimeError("index out of range") : float64pow10.$array[float64pow10.$offset + x$1]))); + exp = 22; + } + if (f > 1e+15 || f < -1e+15) { + return [f, ok]; + } + _tmp$2 = f * ((exp < 0 || exp >= float64pow10.$length) ? $throwRuntimeError("index out of range") : float64pow10.$array[float64pow10.$offset + exp]); _tmp$3 = true; f = _tmp$2; ok = _tmp$3; + return [f, ok]; + } else if (exp < 0 && exp >= -22) { + _tmp$4 = f / (x$2 = -exp, ((x$2 < 0 || x$2 >= float64pow10.$length) ? $throwRuntimeError("index out of range") : float64pow10.$array[float64pow10.$offset + x$2])); _tmp$5 = true; f = _tmp$4; ok = _tmp$5; + return [f, ok]; + } + return [f, ok]; + }; + atof32exact = function(mantissa, exp, neg) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, exp, f = 0, mantissa, neg, ok = false, x, x$1, x$2; + if (!((x = $shiftRightUint64(mantissa, float32info.mantbits), (x.$high === 0 && x.$low === 0)))) { + return [f, ok]; + } + f = $flatten64(mantissa); + if (neg) { + f = -f; + } + if (exp === 0) { + _tmp = f; _tmp$1 = true; f = _tmp; ok = _tmp$1; + return [f, ok]; + } else if (exp > 0 && exp <= 17) { + if (exp > 10) { + f = f * ((x$1 = exp - 10 >> 0, ((x$1 < 0 || x$1 >= float32pow10.$length) ? $throwRuntimeError("index out of range") : float32pow10.$array[float32pow10.$offset + x$1]))); + exp = 10; + } + if (f > 1e+07 || f < -1e+07) { + return [f, ok]; + } + _tmp$2 = f * ((exp < 0 || exp >= float32pow10.$length) ? $throwRuntimeError("index out of range") : float32pow10.$array[float32pow10.$offset + exp]); _tmp$3 = true; f = _tmp$2; ok = _tmp$3; + return [f, ok]; + } else if (exp < 0 && exp >= -10) { + _tmp$4 = f / (x$2 = -exp, ((x$2 < 0 || x$2 >= float32pow10.$length) ? $throwRuntimeError("index out of range") : float32pow10.$array[float32pow10.$offset + x$2])); _tmp$5 = true; f = _tmp$4; ok = _tmp$5; + return [f, ok]; + } + return [f, ok]; + }; + atof32 = function(s) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, b, b$1, d, err = $ifaceNil, exp, ext, f = 0, f$1, mantissa, neg, ok, ok$1, ok$2, ok$3, ovf, ovf$1, s, trunc, val; + _tuple = special(s); val = _tuple[0]; ok = _tuple[1]; + if (ok) { + _tmp = val; _tmp$1 = $ifaceNil; f = _tmp; err = _tmp$1; + return [f, err]; + } + if (optimize) { + _tuple$1 = readFloat(s); mantissa = _tuple$1[0]; exp = _tuple$1[1]; neg = _tuple$1[2]; trunc = _tuple$1[3]; ok$1 = _tuple$1[4]; + if (ok$1) { + if (!trunc) { + _tuple$2 = atof32exact(mantissa, exp, neg); f$1 = _tuple$2[0]; ok$2 = _tuple$2[1]; + if (ok$2) { + _tmp$2 = f$1; _tmp$3 = $ifaceNil; f = _tmp$2; err = _tmp$3; + return [f, err]; + } + } + ext = new extFloat.ptr(); + ok$3 = ext.AssignDecimal(mantissa, exp, neg, trunc, float32info); + if (ok$3) { + _tuple$3 = ext.floatBits(float32info); b = _tuple$3[0]; ovf = _tuple$3[1]; + f = math.Float32frombits((b.$low >>> 0)); + if (ovf) { + err = rangeError("ParseFloat", s); + } + _tmp$4 = f; _tmp$5 = err; f = _tmp$4; err = _tmp$5; + return [f, err]; + } + } + } + d = $clone(new decimal.ptr(), decimal); + if (!d.set(s)) { + _tmp$6 = 0; _tmp$7 = syntaxError("ParseFloat", s); f = _tmp$6; err = _tmp$7; + return [f, err]; + } + _tuple$4 = d.floatBits(float32info); b$1 = _tuple$4[0]; ovf$1 = _tuple$4[1]; + f = math.Float32frombits((b$1.$low >>> 0)); + if (ovf$1) { + err = rangeError("ParseFloat", s); + } + _tmp$8 = f; _tmp$9 = err; f = _tmp$8; err = _tmp$9; + return [f, err]; + }; + atof64 = function(s) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, b, b$1, d, err = $ifaceNil, exp, ext, f = 0, f$1, mantissa, neg, ok, ok$1, ok$2, ok$3, ovf, ovf$1, s, trunc, val; + _tuple = special(s); val = _tuple[0]; ok = _tuple[1]; + if (ok) { + _tmp = val; _tmp$1 = $ifaceNil; f = _tmp; err = _tmp$1; + return [f, err]; + } + if (optimize) { + _tuple$1 = readFloat(s); mantissa = _tuple$1[0]; exp = _tuple$1[1]; neg = _tuple$1[2]; trunc = _tuple$1[3]; ok$1 = _tuple$1[4]; + if (ok$1) { + if (!trunc) { + _tuple$2 = atof64exact(mantissa, exp, neg); f$1 = _tuple$2[0]; ok$2 = _tuple$2[1]; + if (ok$2) { + _tmp$2 = f$1; _tmp$3 = $ifaceNil; f = _tmp$2; err = _tmp$3; + return [f, err]; + } + } + ext = new extFloat.ptr(); + ok$3 = ext.AssignDecimal(mantissa, exp, neg, trunc, float64info); + if (ok$3) { + _tuple$3 = ext.floatBits(float64info); b = _tuple$3[0]; ovf = _tuple$3[1]; + f = math.Float64frombits(b); + if (ovf) { + err = rangeError("ParseFloat", s); + } + _tmp$4 = f; _tmp$5 = err; f = _tmp$4; err = _tmp$5; + return [f, err]; + } + } + } + d = $clone(new decimal.ptr(), decimal); + if (!d.set(s)) { + _tmp$6 = 0; _tmp$7 = syntaxError("ParseFloat", s); f = _tmp$6; err = _tmp$7; + return [f, err]; + } + _tuple$4 = d.floatBits(float64info); b$1 = _tuple$4[0]; ovf$1 = _tuple$4[1]; + f = math.Float64frombits(b$1); + if (ovf$1) { + err = rangeError("ParseFloat", s); + } + _tmp$8 = f; _tmp$9 = err; f = _tmp$8; err = _tmp$9; + return [f, err]; + }; + ParseFloat = $pkg.ParseFloat = function(s, bitSize) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, bitSize, err = $ifaceNil, err1, err1$1, f = 0, f1, f1$1, s; + if (bitSize === 32) { + _tuple = atof32(s); f1 = _tuple[0]; err1 = _tuple[1]; + _tmp = $coerceFloat32(f1); _tmp$1 = err1; f = _tmp; err = _tmp$1; + return [f, err]; + } + _tuple$1 = atof64(s); f1$1 = _tuple$1[0]; err1$1 = _tuple$1[1]; + _tmp$2 = f1$1; _tmp$3 = err1$1; f = _tmp$2; err = _tmp$3; + return [f, err]; + }; + NumError.ptr.prototype.Error = function() { + var e; + e = this; + return "strconv." + e.Func + ": " + "parsing " + Quote(e.Num) + ": " + e.Err.Error(); + }; + NumError.prototype.Error = function() { return this.$val.Error(); }; + syntaxError = function(fn, str) { + var fn, str; + return new NumError.ptr(fn, str, $pkg.ErrSyntax); + }; + rangeError = function(fn, str) { + var fn, str; + return new NumError.ptr(fn, str, $pkg.ErrRange); + }; + cutoff64 = function(base) { + var base, x; + if (base < 2) { + return new $Uint64(0, 0); + } + return (x = $div64(new $Uint64(4294967295, 4294967295), new $Uint64(0, base), false), new $Uint64(x.$high + 0, x.$low + 1)); + }; + ParseUint = $pkg.ParseUint = function(s, base, bitSize) { + var $args = arguments, $s = 0, $this = this, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, cutoff, d, err = $ifaceNil, i, maxVal, n = new $Uint64(0, 0), n1, s0, v, x, x$1; + /* */ s: while (true) { switch ($s) { case 0: + _tmp = new $Uint64(0, 0); _tmp$1 = new $Uint64(0, 0); cutoff = _tmp; maxVal = _tmp$1; + if (bitSize === 0) { + bitSize = 32; + } + s0 = s; + /* if (s.length < 1) { */ if (s.length < 1) {} else if (2 <= base && base <= 36) { $s = 1; continue; } else if (base === 0) { $s = 2; continue; } else { $s = 3; continue; } + err = $pkg.ErrSyntax; + /* goto Error */ $s = 5; continue; + /* } else if (2 <= base && base <= 36) { */ $s = 4; continue; case 1: + /* } else if (base === 0) { */ $s = 4; continue; case 2: + /* if ((s.charCodeAt(0) === 48) && s.length > 1 && ((s.charCodeAt(1) === 120) || (s.charCodeAt(1) === 88))) { */ if ((s.charCodeAt(0) === 48) && s.length > 1 && ((s.charCodeAt(1) === 120) || (s.charCodeAt(1) === 88))) {} else if (s.charCodeAt(0) === 48) { $s = 6; continue; } else { $s = 7; continue; } + base = 16; + s = s.substring(2); + /* if (s.length < 1) { */ if (s.length < 1) {} else { $s = 9; continue; } + err = $pkg.ErrSyntax; + /* goto Error */ $s = 5; continue; + /* } */ case 9: + /* } else if (s.charCodeAt(0) === 48) { */ $s = 8; continue; case 6: + base = 8; + /* } else { */ $s = 8; continue; case 7: + base = 10; + /* } */ case 8: + /* } else { */ $s = 4; continue; case 3: + err = errors.New("invalid base " + Itoa(base)); + /* goto Error */ $s = 5; continue; + /* } */ case 4: + n = new $Uint64(0, 0); + cutoff = cutoff64(base); + maxVal = (x = $shiftLeft64(new $Uint64(0, 1), (bitSize >>> 0)), new $Uint64(x.$high - 0, x.$low - 1)); + i = 0; + /* while (true) { */ case 10: + /* if (!(i < s.length)) { break; } */ if(!(i < s.length)) { $s = 11; continue; } + v = 0; + d = s.charCodeAt(i); + /* if (48 <= d && d <= 57) { */ if (48 <= d && d <= 57) {} else if (97 <= d && d <= 122) { $s = 12; continue; } else if (65 <= d && d <= 90) { $s = 13; continue; } else { $s = 14; continue; } + v = d - 48 << 24 >>> 24; + /* } else if (97 <= d && d <= 122) { */ $s = 15; continue; case 12: + v = (d - 97 << 24 >>> 24) + 10 << 24 >>> 24; + /* } else if (65 <= d && d <= 90) { */ $s = 15; continue; case 13: + v = (d - 65 << 24 >>> 24) + 10 << 24 >>> 24; + /* } else { */ $s = 15; continue; case 14: + n = new $Uint64(0, 0); + err = $pkg.ErrSyntax; + /* goto Error */ $s = 5; continue; + /* } */ case 15: + /* if ((v >> 0) >= base) { */ if ((v >> 0) >= base) {} else { $s = 16; continue; } + n = new $Uint64(0, 0); + err = $pkg.ErrSyntax; + /* goto Error */ $s = 5; continue; + /* } */ case 16: + /* if ((n.$high > cutoff.$high || (n.$high === cutoff.$high && n.$low >= cutoff.$low))) { */ if ((n.$high > cutoff.$high || (n.$high === cutoff.$high && n.$low >= cutoff.$low))) {} else { $s = 17; continue; } + n = new $Uint64(4294967295, 4294967295); + err = $pkg.ErrRange; + /* goto Error */ $s = 5; continue; + /* } */ case 17: + n = $mul64(n, (new $Uint64(0, base))); + n1 = (x$1 = new $Uint64(0, v), new $Uint64(n.$high + x$1.$high, n.$low + x$1.$low)); + /* if ((n1.$high < n.$high || (n1.$high === n.$high && n1.$low < n.$low)) || (n1.$high > maxVal.$high || (n1.$high === maxVal.$high && n1.$low > maxVal.$low))) { */ if ((n1.$high < n.$high || (n1.$high === n.$high && n1.$low < n.$low)) || (n1.$high > maxVal.$high || (n1.$high === maxVal.$high && n1.$low > maxVal.$low))) {} else { $s = 18; continue; } + n = new $Uint64(4294967295, 4294967295); + err = $pkg.ErrRange; + /* goto Error */ $s = 5; continue; + /* } */ case 18: + n = n1; + i = i + (1) >> 0; + /* } */ $s = 10; continue; case 11: + _tmp$2 = n; _tmp$3 = $ifaceNil; n = _tmp$2; err = _tmp$3; + return [n, err]; + /* Error: */ case 5: + _tmp$4 = n; _tmp$5 = new NumError.ptr("ParseUint", s0, err); n = _tmp$4; err = _tmp$5; + return [n, err]; + /* */ case -1: } return; } + }; + ParseInt = $pkg.ParseInt = function(s, base, bitSize) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, base, bitSize, cutoff, err = $ifaceNil, i = new $Int64(0, 0), n, neg, s, s0, un, x, x$1; + if (bitSize === 0) { + bitSize = 32; + } + if (s.length === 0) { + _tmp = new $Int64(0, 0); _tmp$1 = syntaxError("ParseInt", s); i = _tmp; err = _tmp$1; + return [i, err]; + } + s0 = s; + neg = false; + if (s.charCodeAt(0) === 43) { + s = s.substring(1); + } else if (s.charCodeAt(0) === 45) { + neg = true; + s = s.substring(1); + } + un = new $Uint64(0, 0); + _tuple = ParseUint(s, base, bitSize); un = _tuple[0]; err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil)) && !($interfaceIsEqual($assertType(err, ptrType).Err, $pkg.ErrRange))) { + $assertType(err, ptrType).Func = "ParseInt"; + $assertType(err, ptrType).Num = s0; + _tmp$2 = new $Int64(0, 0); _tmp$3 = err; i = _tmp$2; err = _tmp$3; + return [i, err]; + } + cutoff = $shiftLeft64(new $Uint64(0, 1), ((bitSize - 1 >> 0) >>> 0)); + if (!neg && (un.$high > cutoff.$high || (un.$high === cutoff.$high && un.$low >= cutoff.$low))) { + _tmp$4 = (x = new $Uint64(cutoff.$high - 0, cutoff.$low - 1), new $Int64(x.$high, x.$low)); _tmp$5 = rangeError("ParseInt", s0); i = _tmp$4; err = _tmp$5; + return [i, err]; + } + if (neg && (un.$high > cutoff.$high || (un.$high === cutoff.$high && un.$low > cutoff.$low))) { + _tmp$6 = (x$1 = new $Int64(cutoff.$high, cutoff.$low), new $Int64(-x$1.$high, -x$1.$low)); _tmp$7 = rangeError("ParseInt", s0); i = _tmp$6; err = _tmp$7; + return [i, err]; + } + n = new $Int64(un.$high, un.$low); + if (neg) { + n = new $Int64(-n.$high, -n.$low); + } + _tmp$8 = n; _tmp$9 = $ifaceNil; i = _tmp$8; err = _tmp$9; + return [i, err]; + }; + Atoi = $pkg.Atoi = function(s) { + var _tmp, _tmp$1, _tuple, err = $ifaceNil, i = 0, i64, s; + _tuple = ParseInt(s, 10, 0); i64 = _tuple[0]; err = _tuple[1]; + _tmp = ((i64.$low + ((i64.$high >> 31) * 4294967296)) >> 0); _tmp$1 = err; i = _tmp; err = _tmp$1; + return [i, err]; + }; + decimal.ptr.prototype.String = function() { + var a, buf, n, w; + a = this; + n = 10 + a.nd >> 0; + if (a.dp > 0) { + n = n + (a.dp) >> 0; + } + if (a.dp < 0) { + n = n + (-a.dp) >> 0; + } + buf = $makeSlice(sliceType$6, n); + w = 0; + if (a.nd === 0) { + return "0"; + } else if (a.dp <= 0) { + (w < 0 || w >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + w] = 48; + w = w + (1) >> 0; + (w < 0 || w >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + w] = 46; + w = w + (1) >> 0; + w = w + (digitZero($subslice(buf, w, (w + -a.dp >> 0)))) >> 0; + w = w + ($copySlice($subslice(buf, w), $subslice(new sliceType$6(a.d), 0, a.nd))) >> 0; + } else if (a.dp < a.nd) { + w = w + ($copySlice($subslice(buf, w), $subslice(new sliceType$6(a.d), 0, a.dp))) >> 0; + (w < 0 || w >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + w] = 46; + w = w + (1) >> 0; + w = w + ($copySlice($subslice(buf, w), $subslice(new sliceType$6(a.d), a.dp, a.nd))) >> 0; + } else { + w = w + ($copySlice($subslice(buf, w), $subslice(new sliceType$6(a.d), 0, a.nd))) >> 0; + w = w + (digitZero($subslice(buf, w, ((w + a.dp >> 0) - a.nd >> 0)))) >> 0; + } + return $bytesToString($subslice(buf, 0, w)); + }; + decimal.prototype.String = function() { return this.$val.String(); }; + digitZero = function(dst) { + var _i, _ref, dst, i; + _ref = dst; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + (i < 0 || i >= dst.$length) ? $throwRuntimeError("index out of range") : dst.$array[dst.$offset + i] = 48; + _i++; + } + return dst.$length; + }; + trim = function(a) { + var a, x, x$1; + while (true) { + if (!(a.nd > 0 && ((x = a.d, x$1 = a.nd - 1 >> 0, ((x$1 < 0 || x$1 >= x.length) ? $throwRuntimeError("index out of range") : x[x$1])) === 48))) { break; } + a.nd = a.nd - (1) >> 0; + } + if (a.nd === 0) { + a.dp = 0; + } + }; + decimal.ptr.prototype.Assign = function(v) { + var a, buf, n, v, v1, x, x$1, x$2; + a = this; + buf = $clone(arrayType.zero(), arrayType); + n = 0; + while (true) { + if (!((v.$high > 0 || (v.$high === 0 && v.$low > 0)))) { break; } + v1 = $div64(v, new $Uint64(0, 10), false); + v = (x = $mul64(new $Uint64(0, 10), v1), new $Uint64(v.$high - x.$high, v.$low - x.$low)); + (n < 0 || n >= buf.length) ? $throwRuntimeError("index out of range") : buf[n] = (new $Uint64(v.$high + 0, v.$low + 48).$low << 24 >>> 24); + n = n + (1) >> 0; + v = v1; + } + a.nd = 0; + n = n - (1) >> 0; + while (true) { + if (!(n >= 0)) { break; } + (x$1 = a.d, x$2 = a.nd, (x$2 < 0 || x$2 >= x$1.length) ? $throwRuntimeError("index out of range") : x$1[x$2] = ((n < 0 || n >= buf.length) ? $throwRuntimeError("index out of range") : buf[n])); + a.nd = a.nd + (1) >> 0; + n = n - (1) >> 0; + } + a.dp = a.nd; + trim(a); + }; + decimal.prototype.Assign = function(v) { return this.$val.Assign(v); }; + rightShift = function(a, k) { + var a, c, c$1, dig, dig$1, k, n, r, w, x, x$1, x$2, x$3, y, y$1; + r = 0; + w = 0; + n = 0; + while (true) { + if (!(((n >> $min(k, 31)) >> 0) === 0)) { break; } + if (r >= a.nd) { + if (n === 0) { + a.nd = 0; + return; + } + while (true) { + if (!(((n >> $min(k, 31)) >> 0) === 0)) { break; } + n = n * 10 >> 0; + r = r + (1) >> 0; + } + break; + } + c = ((x = a.d, ((r < 0 || r >= x.length) ? $throwRuntimeError("index out of range") : x[r])) >> 0); + n = ((n * 10 >> 0) + c >> 0) - 48 >> 0; + r = r + (1) >> 0; + } + a.dp = a.dp - ((r - 1 >> 0)) >> 0; + while (true) { + if (!(r < a.nd)) { break; } + c$1 = ((x$1 = a.d, ((r < 0 || r >= x$1.length) ? $throwRuntimeError("index out of range") : x$1[r])) >> 0); + dig = (n >> $min(k, 31)) >> 0; + n = n - (((y = k, y < 32 ? (dig << y) : 0) >> 0)) >> 0; + (x$2 = a.d, (w < 0 || w >= x$2.length) ? $throwRuntimeError("index out of range") : x$2[w] = ((dig + 48 >> 0) << 24 >>> 24)); + w = w + (1) >> 0; + n = ((n * 10 >> 0) + c$1 >> 0) - 48 >> 0; + r = r + (1) >> 0; + } + while (true) { + if (!(n > 0)) { break; } + dig$1 = (n >> $min(k, 31)) >> 0; + n = n - (((y$1 = k, y$1 < 32 ? (dig$1 << y$1) : 0) >> 0)) >> 0; + if (w < 800) { + (x$3 = a.d, (w < 0 || w >= x$3.length) ? $throwRuntimeError("index out of range") : x$3[w] = ((dig$1 + 48 >> 0) << 24 >>> 24)); + w = w + (1) >> 0; + } else if (dig$1 > 0) { + a.trunc = true; + } + n = n * 10 >> 0; + } + a.nd = w; + trim(a); + }; + prefixIsLessThan = function(b, s) { + var b, i, s; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + if (i >= b.$length) { + return true; + } + if (!((((i < 0 || i >= b.$length) ? $throwRuntimeError("index out of range") : b.$array[b.$offset + i]) === s.charCodeAt(i)))) { + return ((i < 0 || i >= b.$length) ? $throwRuntimeError("index out of range") : b.$array[b.$offset + i]) < s.charCodeAt(i); + } + i = i + (1) >> 0; + } + return false; + }; + leftShift = function(a, k) { + var _q, _q$1, a, delta, k, n, quo, quo$1, r, rem, rem$1, w, x, x$1, x$2, y; + delta = ((k < 0 || k >= leftcheats.$length) ? $throwRuntimeError("index out of range") : leftcheats.$array[leftcheats.$offset + k]).delta; + if (prefixIsLessThan($subslice(new sliceType$6(a.d), 0, a.nd), ((k < 0 || k >= leftcheats.$length) ? $throwRuntimeError("index out of range") : leftcheats.$array[leftcheats.$offset + k]).cutoff)) { + delta = delta - (1) >> 0; + } + r = a.nd; + w = a.nd + delta >> 0; + n = 0; + r = r - (1) >> 0; + while (true) { + if (!(r >= 0)) { break; } + n = n + (((y = k, y < 32 ? (((((x = a.d, ((r < 0 || r >= x.length) ? $throwRuntimeError("index out of range") : x[r])) >> 0) - 48 >> 0)) << y) : 0) >> 0)) >> 0; + quo = (_q = n / 10, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + rem = n - (10 * quo >> 0) >> 0; + w = w - (1) >> 0; + if (w < 800) { + (x$1 = a.d, (w < 0 || w >= x$1.length) ? $throwRuntimeError("index out of range") : x$1[w] = ((rem + 48 >> 0) << 24 >>> 24)); + } else if (!((rem === 0))) { + a.trunc = true; + } + n = quo; + r = r - (1) >> 0; + } + while (true) { + if (!(n > 0)) { break; } + quo$1 = (_q$1 = n / 10, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")); + rem$1 = n - (10 * quo$1 >> 0) >> 0; + w = w - (1) >> 0; + if (w < 800) { + (x$2 = a.d, (w < 0 || w >= x$2.length) ? $throwRuntimeError("index out of range") : x$2[w] = ((rem$1 + 48 >> 0) << 24 >>> 24)); + } else if (!((rem$1 === 0))) { + a.trunc = true; + } + n = quo$1; + } + a.nd = a.nd + (delta) >> 0; + if (a.nd >= 800) { + a.nd = 800; + } + a.dp = a.dp + (delta) >> 0; + trim(a); + }; + decimal.ptr.prototype.Shift = function(k) { + var a, k; + a = this; + if (a.nd === 0) { + } else if (k > 0) { + while (true) { + if (!(k > 27)) { break; } + leftShift(a, 27); + k = k - (27) >> 0; + } + leftShift(a, (k >>> 0)); + } else if (k < 0) { + while (true) { + if (!(k < -27)) { break; } + rightShift(a, 27); + k = k + (27) >> 0; + } + rightShift(a, (-k >>> 0)); + } + }; + decimal.prototype.Shift = function(k) { return this.$val.Shift(k); }; + shouldRoundUp = function(a, nd) { + var _r, a, nd, x, x$1, x$2, x$3; + if (nd < 0 || nd >= a.nd) { + return false; + } + if (((x = a.d, ((nd < 0 || nd >= x.length) ? $throwRuntimeError("index out of range") : x[nd])) === 53) && ((nd + 1 >> 0) === a.nd)) { + if (a.trunc) { + return true; + } + return nd > 0 && !(((_r = (((x$1 = a.d, x$2 = nd - 1 >> 0, ((x$2 < 0 || x$2 >= x$1.length) ? $throwRuntimeError("index out of range") : x$1[x$2])) - 48 << 24 >>> 24)) % 2, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) === 0)); + } + return (x$3 = a.d, ((nd < 0 || nd >= x$3.length) ? $throwRuntimeError("index out of range") : x$3[nd])) >= 53; + }; + decimal.ptr.prototype.Round = function(nd) { + var a, nd; + a = this; + if (nd < 0 || nd >= a.nd) { + return; + } + if (shouldRoundUp(a, nd)) { + a.RoundUp(nd); + } else { + a.RoundDown(nd); + } + }; + decimal.prototype.Round = function(nd) { return this.$val.Round(nd); }; + decimal.ptr.prototype.RoundDown = function(nd) { + var a, nd; + a = this; + if (nd < 0 || nd >= a.nd) { + return; + } + a.nd = nd; + trim(a); + }; + decimal.prototype.RoundDown = function(nd) { return this.$val.RoundDown(nd); }; + decimal.ptr.prototype.RoundUp = function(nd) { + var a, c, i, nd, x, x$1, x$2; + a = this; + if (nd < 0 || nd >= a.nd) { + return; + } + i = nd - 1 >> 0; + while (true) { + if (!(i >= 0)) { break; } + c = (x = a.d, ((i < 0 || i >= x.length) ? $throwRuntimeError("index out of range") : x[i])); + if (c < 57) { + (x$2 = a.d, (i < 0 || i >= x$2.length) ? $throwRuntimeError("index out of range") : x$2[i] = (x$1 = a.d, ((i < 0 || i >= x$1.length) ? $throwRuntimeError("index out of range") : x$1[i])) + (1) << 24 >>> 24); + a.nd = i + 1 >> 0; + return; + } + i = i - (1) >> 0; + } + a.d[0] = 49; + a.nd = 1; + a.dp = a.dp + (1) >> 0; + }; + decimal.prototype.RoundUp = function(nd) { return this.$val.RoundUp(nd); }; + decimal.ptr.prototype.RoundedInteger = function() { + var a, i, n, x, x$1, x$2, x$3; + a = this; + if (a.dp > 20) { + return new $Uint64(4294967295, 4294967295); + } + i = 0; + n = new $Uint64(0, 0); + i = 0; + while (true) { + if (!(i < a.dp && i < a.nd)) { break; } + n = (x = $mul64(n, new $Uint64(0, 10)), x$1 = new $Uint64(0, ((x$2 = a.d, ((i < 0 || i >= x$2.length) ? $throwRuntimeError("index out of range") : x$2[i])) - 48 << 24 >>> 24)), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); + i = i + (1) >> 0; + } + while (true) { + if (!(i < a.dp)) { break; } + n = $mul64(n, (new $Uint64(0, 10))); + i = i + (1) >> 0; + } + if (shouldRoundUp(a, a.dp)) { + n = (x$3 = new $Uint64(0, 1), new $Uint64(n.$high + x$3.$high, n.$low + x$3.$low)); + } + return n; + }; + decimal.prototype.RoundedInteger = function() { return this.$val.RoundedInteger(); }; + extFloat.ptr.prototype.floatBits = function(flt) { + var bits = new $Uint64(0, 0), exp, f, flt, mant, n, overflow = false, x, x$1, x$10, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, y, y$1, y$2; + f = this; + f.Normalize(); + exp = f.exp + 63 >> 0; + if (exp < (flt.bias + 1 >> 0)) { + n = (flt.bias + 1 >> 0) - exp >> 0; + f.mant = $shiftRightUint64(f.mant, ((n >>> 0))); + exp = exp + (n) >> 0; + } + mant = $shiftRightUint64(f.mant, ((63 - flt.mantbits >>> 0))); + if (!((x = (x$1 = f.mant, x$2 = $shiftLeft64(new $Uint64(0, 1), ((62 - flt.mantbits >>> 0))), new $Uint64(x$1.$high & x$2.$high, (x$1.$low & x$2.$low) >>> 0)), (x.$high === 0 && x.$low === 0)))) { + mant = (x$3 = new $Uint64(0, 1), new $Uint64(mant.$high + x$3.$high, mant.$low + x$3.$low)); + } + if ((x$4 = $shiftLeft64(new $Uint64(0, 2), flt.mantbits), (mant.$high === x$4.$high && mant.$low === x$4.$low))) { + mant = $shiftRightUint64(mant, (1)); + exp = exp + (1) >> 0; + } + if ((exp - flt.bias >> 0) >= (((y = flt.expbits, y < 32 ? (1 << y) : 0) >> 0) - 1 >> 0)) { + mant = new $Uint64(0, 0); + exp = (((y$1 = flt.expbits, y$1 < 32 ? (1 << y$1) : 0) >> 0) - 1 >> 0) + flt.bias >> 0; + overflow = true; + } else if ((x$5 = (x$6 = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), new $Uint64(mant.$high & x$6.$high, (mant.$low & x$6.$low) >>> 0)), (x$5.$high === 0 && x$5.$low === 0))) { + exp = flt.bias; + } + bits = (x$7 = (x$8 = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), new $Uint64(x$8.$high - 0, x$8.$low - 1)), new $Uint64(mant.$high & x$7.$high, (mant.$low & x$7.$low) >>> 0)); + bits = (x$9 = $shiftLeft64(new $Uint64(0, (((exp - flt.bias >> 0)) & ((((y$2 = flt.expbits, y$2 < 32 ? (1 << y$2) : 0) >> 0) - 1 >> 0)))), flt.mantbits), new $Uint64(bits.$high | x$9.$high, (bits.$low | x$9.$low) >>> 0)); + if (f.neg) { + bits = (x$10 = $shiftLeft64(new $Uint64(0, 1), ((flt.mantbits + flt.expbits >>> 0))), new $Uint64(bits.$high | x$10.$high, (bits.$low | x$10.$low) >>> 0)); + } + return [bits, overflow]; + }; + extFloat.prototype.floatBits = function(flt) { return this.$val.floatBits(flt); }; + extFloat.ptr.prototype.AssignComputeBounds = function(mant, exp, neg, flt) { + var _tmp, _tmp$1, exp, expBiased, f, flt, lower = new extFloat.ptr(), mant, neg, upper = new extFloat.ptr(), x, x$1, x$2, x$3, x$4; + f = this; + f.mant = mant; + f.exp = exp - (flt.mantbits >> 0) >> 0; + f.neg = neg; + if (f.exp <= 0 && (x = $shiftLeft64(($shiftRightUint64(mant, (-f.exp >>> 0))), (-f.exp >>> 0)), (mant.$high === x.$high && mant.$low === x.$low))) { + f.mant = $shiftRightUint64(f.mant, ((-f.exp >>> 0))); + f.exp = 0; + _tmp = $clone(f, extFloat); _tmp$1 = $clone(f, extFloat); $copy(lower, _tmp, extFloat); $copy(upper, _tmp$1, extFloat); + return [lower, upper]; + } + expBiased = exp - flt.bias >> 0; + $copy(upper, new extFloat.ptr((x$1 = $mul64(new $Uint64(0, 2), f.mant), new $Uint64(x$1.$high + 0, x$1.$low + 1)), f.exp - 1 >> 0, f.neg), extFloat); + if (!((x$2 = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), (mant.$high === x$2.$high && mant.$low === x$2.$low))) || (expBiased === 1)) { + $copy(lower, new extFloat.ptr((x$3 = $mul64(new $Uint64(0, 2), f.mant), new $Uint64(x$3.$high - 0, x$3.$low - 1)), f.exp - 1 >> 0, f.neg), extFloat); + } else { + $copy(lower, new extFloat.ptr((x$4 = $mul64(new $Uint64(0, 4), f.mant), new $Uint64(x$4.$high - 0, x$4.$low - 1)), f.exp - 2 >> 0, f.neg), extFloat); + } + return [lower, upper]; + }; + extFloat.prototype.AssignComputeBounds = function(mant, exp, neg, flt) { return this.$val.AssignComputeBounds(mant, exp, neg, flt); }; + extFloat.ptr.prototype.Normalize = function() { + var _tmp, _tmp$1, _tmp$2, _tmp$3, exp, f, mant, shift = 0, x, x$1, x$2, x$3, x$4, x$5; + f = this; + _tmp = f.mant; _tmp$1 = f.exp; mant = _tmp; exp = _tmp$1; + if ((mant.$high === 0 && mant.$low === 0)) { + shift = 0; + return shift; + } + if ((x = $shiftRightUint64(mant, 32), (x.$high === 0 && x.$low === 0))) { + mant = $shiftLeft64(mant, (32)); + exp = exp - (32) >> 0; + } + if ((x$1 = $shiftRightUint64(mant, 48), (x$1.$high === 0 && x$1.$low === 0))) { + mant = $shiftLeft64(mant, (16)); + exp = exp - (16) >> 0; + } + if ((x$2 = $shiftRightUint64(mant, 56), (x$2.$high === 0 && x$2.$low === 0))) { + mant = $shiftLeft64(mant, (8)); + exp = exp - (8) >> 0; + } + if ((x$3 = $shiftRightUint64(mant, 60), (x$3.$high === 0 && x$3.$low === 0))) { + mant = $shiftLeft64(mant, (4)); + exp = exp - (4) >> 0; + } + if ((x$4 = $shiftRightUint64(mant, 62), (x$4.$high === 0 && x$4.$low === 0))) { + mant = $shiftLeft64(mant, (2)); + exp = exp - (2) >> 0; + } + if ((x$5 = $shiftRightUint64(mant, 63), (x$5.$high === 0 && x$5.$low === 0))) { + mant = $shiftLeft64(mant, (1)); + exp = exp - (1) >> 0; + } + shift = ((f.exp - exp >> 0) >>> 0); + _tmp$2 = mant; _tmp$3 = exp; f.mant = _tmp$2; f.exp = _tmp$3; + return shift; + }; + extFloat.prototype.Normalize = function() { return this.$val.Normalize(); }; + extFloat.ptr.prototype.Multiply = function(g) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, cross1, cross2, f, fhi, flo, g, ghi, glo, rem, x, x$1, x$10, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + f = this; + g = $clone(g, extFloat); + _tmp = $shiftRightUint64(f.mant, 32); _tmp$1 = new $Uint64(0, (f.mant.$low >>> 0)); fhi = _tmp; flo = _tmp$1; + _tmp$2 = $shiftRightUint64(g.mant, 32); _tmp$3 = new $Uint64(0, (g.mant.$low >>> 0)); ghi = _tmp$2; glo = _tmp$3; + cross1 = $mul64(fhi, glo); + cross2 = $mul64(flo, ghi); + f.mant = (x = (x$1 = $mul64(fhi, ghi), x$2 = $shiftRightUint64(cross1, 32), new $Uint64(x$1.$high + x$2.$high, x$1.$low + x$2.$low)), x$3 = $shiftRightUint64(cross2, 32), new $Uint64(x.$high + x$3.$high, x.$low + x$3.$low)); + rem = (x$4 = (x$5 = new $Uint64(0, (cross1.$low >>> 0)), x$6 = new $Uint64(0, (cross2.$low >>> 0)), new $Uint64(x$5.$high + x$6.$high, x$5.$low + x$6.$low)), x$7 = $shiftRightUint64(($mul64(flo, glo)), 32), new $Uint64(x$4.$high + x$7.$high, x$4.$low + x$7.$low)); + rem = (x$8 = new $Uint64(0, 2147483648), new $Uint64(rem.$high + x$8.$high, rem.$low + x$8.$low)); + f.mant = (x$9 = f.mant, x$10 = ($shiftRightUint64(rem, 32)), new $Uint64(x$9.$high + x$10.$high, x$9.$low + x$10.$low)); + f.exp = (f.exp + g.exp >> 0) + 64 >> 0; + }; + extFloat.prototype.Multiply = function(g) { return this.$val.Multiply(g); }; + extFloat.ptr.prototype.AssignDecimal = function(mantissa, exp10, neg, trunc, flt) { + var _q, _r, adjExp, denormalExp, errors$1, exp10, extrabits, f, flt, halfway, i, mant_extra, mantissa, neg, ok = false, shift, trunc, x, x$1, x$10, x$11, x$12, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, y; + f = this; + errors$1 = 0; + if (trunc) { + errors$1 = errors$1 + (4) >> 0; + } + f.mant = mantissa; + f.exp = 0; + f.neg = neg; + i = (_q = ((exp10 - -348 >> 0)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + if (exp10 < -348 || i >= 87) { + ok = false; + return ok; + } + adjExp = (_r = ((exp10 - -348 >> 0)) % 8, _r === _r ? _r : $throwRuntimeError("integer divide by zero")); + if (adjExp < 19 && (x = (x$1 = 19 - adjExp >> 0, ((x$1 < 0 || x$1 >= uint64pow10.length) ? $throwRuntimeError("index out of range") : uint64pow10[x$1])), (mantissa.$high < x.$high || (mantissa.$high === x.$high && mantissa.$low < x.$low)))) { + f.mant = $mul64(f.mant, (((adjExp < 0 || adjExp >= uint64pow10.length) ? $throwRuntimeError("index out of range") : uint64pow10[adjExp]))); + f.Normalize(); + } else { + f.Normalize(); + f.Multiply(((adjExp < 0 || adjExp >= smallPowersOfTen.length) ? $throwRuntimeError("index out of range") : smallPowersOfTen[adjExp])); + errors$1 = errors$1 + (4) >> 0; + } + f.Multiply(((i < 0 || i >= powersOfTen.length) ? $throwRuntimeError("index out of range") : powersOfTen[i])); + if (errors$1 > 0) { + errors$1 = errors$1 + (1) >> 0; + } + errors$1 = errors$1 + (4) >> 0; + shift = f.Normalize(); + errors$1 = (y = (shift), y < 32 ? (errors$1 << y) : 0) >> 0; + denormalExp = flt.bias - 63 >> 0; + extrabits = 0; + if (f.exp <= denormalExp) { + extrabits = (((63 - flt.mantbits >>> 0) + 1 >>> 0) + ((denormalExp - f.exp >> 0) >>> 0) >>> 0); + } else { + extrabits = (63 - flt.mantbits >>> 0); + } + halfway = $shiftLeft64(new $Uint64(0, 1), ((extrabits - 1 >>> 0))); + mant_extra = (x$2 = f.mant, x$3 = (x$4 = $shiftLeft64(new $Uint64(0, 1), extrabits), new $Uint64(x$4.$high - 0, x$4.$low - 1)), new $Uint64(x$2.$high & x$3.$high, (x$2.$low & x$3.$low) >>> 0)); + if ((x$5 = (x$6 = new $Int64(halfway.$high, halfway.$low), x$7 = new $Int64(0, errors$1), new $Int64(x$6.$high - x$7.$high, x$6.$low - x$7.$low)), x$8 = new $Int64(mant_extra.$high, mant_extra.$low), (x$5.$high < x$8.$high || (x$5.$high === x$8.$high && x$5.$low < x$8.$low))) && (x$9 = new $Int64(mant_extra.$high, mant_extra.$low), x$10 = (x$11 = new $Int64(halfway.$high, halfway.$low), x$12 = new $Int64(0, errors$1), new $Int64(x$11.$high + x$12.$high, x$11.$low + x$12.$low)), (x$9.$high < x$10.$high || (x$9.$high === x$10.$high && x$9.$low < x$10.$low)))) { + ok = false; + return ok; + } + ok = true; + return ok; + }; + extFloat.prototype.AssignDecimal = function(mantissa, exp10, neg, trunc, flt) { return this.$val.AssignDecimal(mantissa, exp10, neg, trunc, flt); }; + extFloat.ptr.prototype.frexp10 = function() { + var _q, _q$1, _tmp, _tmp$1, approxExp10, exp, exp10 = 0, f, i, index = 0; + f = this; + approxExp10 = (_q = (((-46 - f.exp >> 0)) * 28 >> 0) / 93, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + i = (_q$1 = ((approxExp10 - -348 >> 0)) / 8, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")); + Loop: + while (true) { + if (!(true)) { break; } + exp = (f.exp + ((i < 0 || i >= powersOfTen.length) ? $throwRuntimeError("index out of range") : powersOfTen[i]).exp >> 0) + 64 >> 0; + if (exp < -60) { + i = i + (1) >> 0; + } else if (exp > -32) { + i = i - (1) >> 0; + } else { + break Loop; + } + } + f.Multiply(((i < 0 || i >= powersOfTen.length) ? $throwRuntimeError("index out of range") : powersOfTen[i])); + _tmp = -((-348 + (i * 8 >> 0) >> 0)); _tmp$1 = i; exp10 = _tmp; index = _tmp$1; + return [exp10, index]; + }; + extFloat.prototype.frexp10 = function() { return this.$val.frexp10(); }; + frexp10Many = function(a, b, c) { + var _tuple, a, b, c, exp10 = 0, i; + _tuple = c.frexp10(); exp10 = _tuple[0]; i = _tuple[1]; + a.Multiply(((i < 0 || i >= powersOfTen.length) ? $throwRuntimeError("index out of range") : powersOfTen[i])); + b.Multiply(((i < 0 || i >= powersOfTen.length) ? $throwRuntimeError("index out of range") : powersOfTen[i])); + return exp10; + }; + extFloat.ptr.prototype.FixedDecimal = function(d, n) { + var _q, _q$1, _tmp, _tmp$1, _tuple, buf, d, digit, exp10, f, fraction, i, i$1, i$2, integer, integerDigits, n, nd, needed, nonAsciiName, ok, pos, pow, pow10, rest, shift, v, v1, x, x$1, x$10, x$11, x$12, x$13, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + f = this; + if ((x = f.mant, (x.$high === 0 && x.$low === 0))) { + d.nd = 0; + d.dp = 0; + d.neg = f.neg; + return true; + } + if (n === 0) { + $panic(new $String("strconv: internal error: extFloat.FixedDecimal called with n == 0")); + } + f.Normalize(); + _tuple = f.frexp10(); exp10 = _tuple[0]; + shift = (-f.exp >>> 0); + integer = ($shiftRightUint64(f.mant, shift).$low >>> 0); + fraction = (x$1 = f.mant, x$2 = $shiftLeft64(new $Uint64(0, integer), shift), new $Uint64(x$1.$high - x$2.$high, x$1.$low - x$2.$low)); + nonAsciiName = new $Uint64(0, 1); + needed = n; + integerDigits = 0; + pow10 = new $Uint64(0, 1); + _tmp = 0; _tmp$1 = new $Uint64(0, 1); i = _tmp; pow = _tmp$1; + while (true) { + if (!(i < 20)) { break; } + if ((x$3 = new $Uint64(0, integer), (pow.$high > x$3.$high || (pow.$high === x$3.$high && pow.$low > x$3.$low)))) { + integerDigits = i; + break; + } + pow = $mul64(pow, (new $Uint64(0, 10))); + i = i + (1) >> 0; + } + rest = integer; + if (integerDigits > needed) { + pow10 = (x$4 = integerDigits - needed >> 0, ((x$4 < 0 || x$4 >= uint64pow10.length) ? $throwRuntimeError("index out of range") : uint64pow10[x$4])); + integer = (_q = integer / ((pow10.$low >>> 0)), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); + rest = rest - ((x$5 = (pow10.$low >>> 0), (((integer >>> 16 << 16) * x$5 >>> 0) + (integer << 16 >>> 16) * x$5) >>> 0)) >>> 0; + } else { + rest = 0; + } + buf = $clone(arrayType$1.zero(), arrayType$1); + pos = 32; + v = integer; + while (true) { + if (!(v > 0)) { break; } + v1 = (_q$1 = v / 10, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >>> 0 : $throwRuntimeError("integer divide by zero")); + v = v - (((((10 >>> 16 << 16) * v1 >>> 0) + (10 << 16 >>> 16) * v1) >>> 0)) >>> 0; + pos = pos - (1) >> 0; + (pos < 0 || pos >= buf.length) ? $throwRuntimeError("index out of range") : buf[pos] = ((v + 48 >>> 0) << 24 >>> 24); + v = v1; + } + i$1 = pos; + while (true) { + if (!(i$1 < 32)) { break; } + (x$6 = d.d, x$7 = i$1 - pos >> 0, (x$7 < 0 || x$7 >= x$6.$length) ? $throwRuntimeError("index out of range") : x$6.$array[x$6.$offset + x$7] = ((i$1 < 0 || i$1 >= buf.length) ? $throwRuntimeError("index out of range") : buf[i$1])); + i$1 = i$1 + (1) >> 0; + } + nd = 32 - pos >> 0; + d.nd = nd; + d.dp = integerDigits + exp10 >> 0; + needed = needed - (nd) >> 0; + if (needed > 0) { + if (!((rest === 0)) || !((pow10.$high === 0 && pow10.$low === 1))) { + $panic(new $String("strconv: internal error, rest != 0 but needed > 0")); + } + while (true) { + if (!(needed > 0)) { break; } + fraction = $mul64(fraction, (new $Uint64(0, 10))); + nonAsciiName = $mul64(nonAsciiName, (new $Uint64(0, 10))); + if ((x$8 = $mul64(new $Uint64(0, 2), nonAsciiName), x$9 = $shiftLeft64(new $Uint64(0, 1), shift), (x$8.$high > x$9.$high || (x$8.$high === x$9.$high && x$8.$low > x$9.$low)))) { + return false; + } + digit = $shiftRightUint64(fraction, shift); + (x$10 = d.d, (nd < 0 || nd >= x$10.$length) ? $throwRuntimeError("index out of range") : x$10.$array[x$10.$offset + nd] = (new $Uint64(digit.$high + 0, digit.$low + 48).$low << 24 >>> 24)); + fraction = (x$11 = $shiftLeft64(digit, shift), new $Uint64(fraction.$high - x$11.$high, fraction.$low - x$11.$low)); + nd = nd + (1) >> 0; + needed = needed - (1) >> 0; + } + d.nd = nd; + } + ok = adjustLastDigitFixed(d, (x$12 = $shiftLeft64(new $Uint64(0, rest), shift), new $Uint64(x$12.$high | fraction.$high, (x$12.$low | fraction.$low) >>> 0)), pow10, shift, nonAsciiName); + if (!ok) { + return false; + } + i$2 = d.nd - 1 >> 0; + while (true) { + if (!(i$2 >= 0)) { break; } + if (!(((x$13 = d.d, ((i$2 < 0 || i$2 >= x$13.$length) ? $throwRuntimeError("index out of range") : x$13.$array[x$13.$offset + i$2])) === 48))) { + d.nd = i$2 + 1 >> 0; + break; + } + i$2 = i$2 - (1) >> 0; + } + return true; + }; + extFloat.prototype.FixedDecimal = function(d, n) { return this.$val.FixedDecimal(d, n); }; + adjustLastDigitFixed = function(d, num, den, shift, nonAsciiName) { + var d, den, i, nonAsciiName, num, shift, x, x$1, x$10, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + if ((x = $shiftLeft64(den, shift), (num.$high > x.$high || (num.$high === x.$high && num.$low > x.$low)))) { + $panic(new $String("strconv: num > den< x$2.$high || (x$1.$high === x$2.$high && x$1.$low > x$2.$low)))) { + $panic(new $String("strconv: \xCE\xB5 > (den< x$6.$high || (x$5.$high === x$6.$high && x$5.$low > x$6.$low)))) { + i = d.nd - 1 >> 0; + while (true) { + if (!(i >= 0)) { break; } + if ((x$7 = d.d, ((i < 0 || i >= x$7.$length) ? $throwRuntimeError("index out of range") : x$7.$array[x$7.$offset + i])) === 57) { + d.nd = d.nd - (1) >> 0; + } else { + break; + } + i = i - (1) >> 0; + } + if (i < 0) { + (x$8 = d.d, (0 < 0 || 0 >= x$8.$length) ? $throwRuntimeError("index out of range") : x$8.$array[x$8.$offset + 0] = 49); + d.nd = 1; + d.dp = d.dp + (1) >> 0; + } else { + (x$10 = d.d, (i < 0 || i >= x$10.$length) ? $throwRuntimeError("index out of range") : x$10.$array[x$10.$offset + i] = (x$9 = d.d, ((i < 0 || i >= x$9.$length) ? $throwRuntimeError("index out of range") : x$9.$array[x$9.$offset + i])) + (1) << 24 >>> 24); + } + return true; + } + return false; + }; + extFloat.ptr.prototype.ShortestDecimal = function(d, lower, upper) { + var _q, _tmp, _tmp$1, _tmp$2, _tmp$3, allowance, buf, currentDiff, d, digit, digit$1, exp10, f, fraction, i, i$1, i$2, integer, integerDigits, lower, multiplier, n, nd, pow, pow$1, shift, targetDiff, upper, v, v1, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + f = this; + if ((x = f.mant, (x.$high === 0 && x.$low === 0))) { + d.nd = 0; + d.dp = 0; + d.neg = f.neg; + return true; + } + if ((f.exp === 0) && $equal(lower, f, extFloat) && $equal(lower, upper, extFloat)) { + buf = $clone(arrayType.zero(), arrayType); + n = 23; + v = f.mant; + while (true) { + if (!((v.$high > 0 || (v.$high === 0 && v.$low > 0)))) { break; } + v1 = $div64(v, new $Uint64(0, 10), false); + v = (x$1 = $mul64(new $Uint64(0, 10), v1), new $Uint64(v.$high - x$1.$high, v.$low - x$1.$low)); + (n < 0 || n >= buf.length) ? $throwRuntimeError("index out of range") : buf[n] = (new $Uint64(v.$high + 0, v.$low + 48).$low << 24 >>> 24); + n = n - (1) >> 0; + v = v1; + } + nd = (24 - n >> 0) - 1 >> 0; + i = 0; + while (true) { + if (!(i < nd)) { break; } + (x$3 = d.d, (i < 0 || i >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + i] = (x$2 = (n + 1 >> 0) + i >> 0, ((x$2 < 0 || x$2 >= buf.length) ? $throwRuntimeError("index out of range") : buf[x$2]))); + i = i + (1) >> 0; + } + _tmp = nd; _tmp$1 = nd; d.nd = _tmp; d.dp = _tmp$1; + while (true) { + if (!(d.nd > 0 && ((x$4 = d.d, x$5 = d.nd - 1 >> 0, ((x$5 < 0 || x$5 >= x$4.$length) ? $throwRuntimeError("index out of range") : x$4.$array[x$4.$offset + x$5])) === 48))) { break; } + d.nd = d.nd - (1) >> 0; + } + if (d.nd === 0) { + d.dp = 0; + } + d.neg = f.neg; + return true; + } + upper.Normalize(); + if (f.exp > upper.exp) { + f.mant = $shiftLeft64(f.mant, (((f.exp - upper.exp >> 0) >>> 0))); + f.exp = upper.exp; + } + if (lower.exp > upper.exp) { + lower.mant = $shiftLeft64(lower.mant, (((lower.exp - upper.exp >> 0) >>> 0))); + lower.exp = upper.exp; + } + exp10 = frexp10Many(lower, f, upper); + upper.mant = (x$6 = upper.mant, x$7 = new $Uint64(0, 1), new $Uint64(x$6.$high + x$7.$high, x$6.$low + x$7.$low)); + lower.mant = (x$8 = lower.mant, x$9 = new $Uint64(0, 1), new $Uint64(x$8.$high - x$9.$high, x$8.$low - x$9.$low)); + shift = (-upper.exp >>> 0); + integer = ($shiftRightUint64(upper.mant, shift).$low >>> 0); + fraction = (x$10 = upper.mant, x$11 = $shiftLeft64(new $Uint64(0, integer), shift), new $Uint64(x$10.$high - x$11.$high, x$10.$low - x$11.$low)); + allowance = (x$12 = upper.mant, x$13 = lower.mant, new $Uint64(x$12.$high - x$13.$high, x$12.$low - x$13.$low)); + targetDiff = (x$14 = upper.mant, x$15 = f.mant, new $Uint64(x$14.$high - x$15.$high, x$14.$low - x$15.$low)); + integerDigits = 0; + _tmp$2 = 0; _tmp$3 = new $Uint64(0, 1); i$1 = _tmp$2; pow = _tmp$3; + while (true) { + if (!(i$1 < 20)) { break; } + if ((x$16 = new $Uint64(0, integer), (pow.$high > x$16.$high || (pow.$high === x$16.$high && pow.$low > x$16.$low)))) { + integerDigits = i$1; + break; + } + pow = $mul64(pow, (new $Uint64(0, 10))); + i$1 = i$1 + (1) >> 0; + } + i$2 = 0; + while (true) { + if (!(i$2 < integerDigits)) { break; } + pow$1 = (x$17 = (integerDigits - i$2 >> 0) - 1 >> 0, ((x$17 < 0 || x$17 >= uint64pow10.length) ? $throwRuntimeError("index out of range") : uint64pow10[x$17])); + digit = (_q = integer / (pow$1.$low >>> 0), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); + (x$18 = d.d, (i$2 < 0 || i$2 >= x$18.$length) ? $throwRuntimeError("index out of range") : x$18.$array[x$18.$offset + i$2] = ((digit + 48 >>> 0) << 24 >>> 24)); + integer = integer - ((x$19 = (pow$1.$low >>> 0), (((digit >>> 16 << 16) * x$19 >>> 0) + (digit << 16 >>> 16) * x$19) >>> 0)) >>> 0; + currentDiff = (x$20 = $shiftLeft64(new $Uint64(0, integer), shift), new $Uint64(x$20.$high + fraction.$high, x$20.$low + fraction.$low)); + if ((currentDiff.$high < allowance.$high || (currentDiff.$high === allowance.$high && currentDiff.$low < allowance.$low))) { + d.nd = i$2 + 1 >> 0; + d.dp = integerDigits + exp10 >> 0; + d.neg = f.neg; + return adjustLastDigit(d, currentDiff, targetDiff, allowance, $shiftLeft64(pow$1, shift), new $Uint64(0, 2)); + } + i$2 = i$2 + (1) >> 0; + } + d.nd = integerDigits; + d.dp = d.nd + exp10 >> 0; + d.neg = f.neg; + digit$1 = 0; + multiplier = new $Uint64(0, 1); + while (true) { + if (!(true)) { break; } + fraction = $mul64(fraction, (new $Uint64(0, 10))); + multiplier = $mul64(multiplier, (new $Uint64(0, 10))); + digit$1 = ($shiftRightUint64(fraction, shift).$low >> 0); + (x$21 = d.d, x$22 = d.nd, (x$22 < 0 || x$22 >= x$21.$length) ? $throwRuntimeError("index out of range") : x$21.$array[x$21.$offset + x$22] = ((digit$1 + 48 >> 0) << 24 >>> 24)); + d.nd = d.nd + (1) >> 0; + fraction = (x$23 = $shiftLeft64(new $Uint64(0, digit$1), shift), new $Uint64(fraction.$high - x$23.$high, fraction.$low - x$23.$low)); + if ((x$24 = $mul64(allowance, multiplier), (fraction.$high < x$24.$high || (fraction.$high === x$24.$high && fraction.$low < x$24.$low)))) { + return adjustLastDigit(d, fraction, $mul64(targetDiff, multiplier), $mul64(allowance, multiplier), $shiftLeft64(new $Uint64(0, 1), shift), $mul64(multiplier, new $Uint64(0, 2))); + } + } + }; + extFloat.prototype.ShortestDecimal = function(d, lower, upper) { return this.$val.ShortestDecimal(d, lower, upper); }; + adjustLastDigit = function(d, currentDiff, targetDiff, maxDiff, ulpDecimal, ulpBinary) { + var _index, currentDiff, d, maxDiff, targetDiff, ulpBinary, ulpDecimal, x, x$1, x$10, x$11, x$12, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + if ((x = $mul64(new $Uint64(0, 2), ulpBinary), (ulpDecimal.$high < x.$high || (ulpDecimal.$high === x.$high && ulpDecimal.$low < x.$low)))) { + return false; + } + while (true) { + if (!((x$1 = (x$2 = (x$3 = $div64(ulpDecimal, new $Uint64(0, 2), false), new $Uint64(currentDiff.$high + x$3.$high, currentDiff.$low + x$3.$low)), new $Uint64(x$2.$high + ulpBinary.$high, x$2.$low + ulpBinary.$low)), (x$1.$high < targetDiff.$high || (x$1.$high === targetDiff.$high && x$1.$low < targetDiff.$low))))) { break; } + _index = d.nd - 1 >> 0; + (x$5 = d.d, (_index < 0 || _index >= x$5.$length) ? $throwRuntimeError("index out of range") : x$5.$array[x$5.$offset + _index] = (x$4 = d.d, ((_index < 0 || _index >= x$4.$length) ? $throwRuntimeError("index out of range") : x$4.$array[x$4.$offset + _index])) - (1) << 24 >>> 24); + currentDiff = (x$6 = ulpDecimal, new $Uint64(currentDiff.$high + x$6.$high, currentDiff.$low + x$6.$low)); + } + if ((x$7 = new $Uint64(currentDiff.$high + ulpDecimal.$high, currentDiff.$low + ulpDecimal.$low), x$8 = (x$9 = (x$10 = $div64(ulpDecimal, new $Uint64(0, 2), false), new $Uint64(targetDiff.$high + x$10.$high, targetDiff.$low + x$10.$low)), new $Uint64(x$9.$high + ulpBinary.$high, x$9.$low + ulpBinary.$low)), (x$7.$high < x$8.$high || (x$7.$high === x$8.$high && x$7.$low <= x$8.$low)))) { + return false; + } + if ((currentDiff.$high < ulpBinary.$high || (currentDiff.$high === ulpBinary.$high && currentDiff.$low < ulpBinary.$low)) || (x$11 = new $Uint64(maxDiff.$high - ulpBinary.$high, maxDiff.$low - ulpBinary.$low), (currentDiff.$high > x$11.$high || (currentDiff.$high === x$11.$high && currentDiff.$low > x$11.$low)))) { + return false; + } + if ((d.nd === 1) && ((x$12 = d.d, ((0 < 0 || 0 >= x$12.$length) ? $throwRuntimeError("index out of range") : x$12.$array[x$12.$offset + 0])) === 48)) { + d.nd = 0; + d.dp = 0; + } + return true; + }; + AppendFloat = $pkg.AppendFloat = function(dst, f, fmt, prec, bitSize) { + var bitSize, dst, f, fmt, prec; + return genericFtoa(dst, f, fmt, prec, bitSize); + }; + genericFtoa = function(dst, val, fmt, prec, bitSize) { + var _ref, _ref$1, _ref$2, _ref$3, _tuple, bitSize, bits, buf, buf$1, digits, digs, dst, exp, f, f$1, flt, fmt, lower, mant, neg, ok, prec, s, shortest, upper, val, x, x$1, x$2, x$3, y, y$1; + bits = new $Uint64(0, 0); + flt = ptrType$1.nil; + _ref = bitSize; + if (_ref === 32) { + bits = new $Uint64(0, math.Float32bits(val)); + flt = float32info; + } else if (_ref === 64) { + bits = math.Float64bits(val); + flt = float64info; + } else { + $panic(new $String("strconv: illegal AppendFloat/FormatFloat bitSize")); + } + neg = !((x = $shiftRightUint64(bits, ((flt.expbits + flt.mantbits >>> 0))), (x.$high === 0 && x.$low === 0))); + exp = ($shiftRightUint64(bits, flt.mantbits).$low >> 0) & ((((y = flt.expbits, y < 32 ? (1 << y) : 0) >> 0) - 1 >> 0)); + mant = (x$1 = (x$2 = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), new $Uint64(x$2.$high - 0, x$2.$low - 1)), new $Uint64(bits.$high & x$1.$high, (bits.$low & x$1.$low) >>> 0)); + _ref$1 = exp; + if (_ref$1 === (((y$1 = flt.expbits, y$1 < 32 ? (1 << y$1) : 0) >> 0) - 1 >> 0)) { + s = ""; + if (!((mant.$high === 0 && mant.$low === 0))) { + s = "NaN"; + } else if (neg) { + s = "-Inf"; + } else { + s = "+Inf"; + } + return $appendSlice(dst, new sliceType$6($stringToBytes(s))); + } else if (_ref$1 === 0) { + exp = exp + (1) >> 0; + } else { + mant = (x$3 = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), new $Uint64(mant.$high | x$3.$high, (mant.$low | x$3.$low) >>> 0)); + } + exp = exp + (flt.bias) >> 0; + if (fmt === 98) { + return fmtB(dst, neg, mant, exp, flt); + } + if (!optimize) { + return bigFtoa(dst, prec, fmt, neg, mant, exp, flt); + } + digs = $clone(new decimalSlice.ptr(), decimalSlice); + ok = false; + shortest = prec < 0; + if (shortest) { + f = new extFloat.ptr(); + _tuple = f.AssignComputeBounds(mant, exp, neg, flt); lower = $clone(_tuple[0], extFloat); upper = $clone(_tuple[1], extFloat); + buf = $clone(arrayType$1.zero(), arrayType$1); + digs.d = new sliceType$6(buf); + ok = f.ShortestDecimal(digs, lower, upper); + if (!ok) { + return bigFtoa(dst, prec, fmt, neg, mant, exp, flt); + } + _ref$2 = fmt; + if (_ref$2 === 101 || _ref$2 === 69) { + prec = digs.nd - 1 >> 0; + } else if (_ref$2 === 102) { + prec = max(digs.nd - digs.dp >> 0, 0); + } else if (_ref$2 === 103 || _ref$2 === 71) { + prec = digs.nd; + } + } else if (!((fmt === 102))) { + digits = prec; + _ref$3 = fmt; + if (_ref$3 === 101 || _ref$3 === 69) { + digits = digits + (1) >> 0; + } else if (_ref$3 === 103 || _ref$3 === 71) { + if (prec === 0) { + prec = 1; + } + digits = prec; + } + if (digits <= 15) { + buf$1 = $clone(arrayType.zero(), arrayType); + digs.d = new sliceType$6(buf$1); + f$1 = new extFloat.ptr(mant, exp - (flt.mantbits >> 0) >> 0, neg); + ok = f$1.FixedDecimal(digs, digits); + } + } + if (!ok) { + return bigFtoa(dst, prec, fmt, neg, mant, exp, flt); + } + return formatDigits(dst, shortest, neg, digs, prec, fmt); + }; + bigFtoa = function(dst, prec, fmt, neg, mant, exp, flt) { + var _ref, _ref$1, d, digs, dst, exp, flt, fmt, mant, neg, prec, shortest; + d = new decimal.ptr(); + d.Assign(mant); + d.Shift(exp - (flt.mantbits >> 0) >> 0); + digs = $clone(new decimalSlice.ptr(), decimalSlice); + shortest = prec < 0; + if (shortest) { + roundShortest(d, mant, exp, flt); + $copy(digs, new decimalSlice.ptr(new sliceType$6(d.d), d.nd, d.dp, false), decimalSlice); + _ref = fmt; + if (_ref === 101 || _ref === 69) { + prec = digs.nd - 1 >> 0; + } else if (_ref === 102) { + prec = max(digs.nd - digs.dp >> 0, 0); + } else if (_ref === 103 || _ref === 71) { + prec = digs.nd; + } + } else { + _ref$1 = fmt; + if (_ref$1 === 101 || _ref$1 === 69) { + d.Round(prec + 1 >> 0); + } else if (_ref$1 === 102) { + d.Round(d.dp + prec >> 0); + } else if (_ref$1 === 103 || _ref$1 === 71) { + if (prec === 0) { + prec = 1; + } + d.Round(prec); + } + $copy(digs, new decimalSlice.ptr(new sliceType$6(d.d), d.nd, d.dp, false), decimalSlice); + } + return formatDigits(dst, shortest, neg, digs, prec, fmt); + }; + formatDigits = function(dst, shortest, neg, digs, prec, fmt) { + var _ref, digs, dst, eprec, exp, fmt, neg, prec, shortest; + digs = $clone(digs, decimalSlice); + _ref = fmt; + if (_ref === 101 || _ref === 69) { + return fmtE(dst, neg, digs, prec, fmt); + } else if (_ref === 102) { + return fmtF(dst, neg, digs, prec); + } else if (_ref === 103 || _ref === 71) { + eprec = prec; + if (eprec > digs.nd && digs.nd >= digs.dp) { + eprec = digs.nd; + } + if (shortest) { + eprec = 6; + } + exp = digs.dp - 1 >> 0; + if (exp < -4 || exp >= eprec) { + if (prec > digs.nd) { + prec = digs.nd; + } + return fmtE(dst, neg, digs, prec - 1 >> 0, (fmt + 101 << 24 >>> 24) - 103 << 24 >>> 24); + } + if (prec > digs.dp) { + prec = digs.nd; + } + return fmtF(dst, neg, digs, max(prec - digs.dp >> 0, 0)); + } + return $append(dst, 37, fmt); + }; + roundShortest = function(d, mant, exp, flt) { + var _tmp, _tmp$1, _tmp$2, d, exp, explo, flt, i, inclusive, l, lower, m, mant, mantlo, minexp, okdown, okup, u, upper, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7; + if ((mant.$high === 0 && mant.$low === 0)) { + d.nd = 0; + return; + } + minexp = flt.bias + 1 >> 0; + if (exp > minexp && (332 * ((d.dp - d.nd >> 0)) >> 0) >= (100 * ((exp - (flt.mantbits >> 0) >> 0)) >> 0)) { + return; + } + upper = new decimal.ptr(); + upper.Assign((x = $mul64(mant, new $Uint64(0, 2)), new $Uint64(x.$high + 0, x.$low + 1))); + upper.Shift((exp - (flt.mantbits >> 0) >> 0) - 1 >> 0); + mantlo = new $Uint64(0, 0); + explo = 0; + if ((x$1 = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), (mant.$high > x$1.$high || (mant.$high === x$1.$high && mant.$low > x$1.$low))) || (exp === minexp)) { + mantlo = new $Uint64(mant.$high - 0, mant.$low - 1); + explo = exp; + } else { + mantlo = (x$2 = $mul64(mant, new $Uint64(0, 2)), new $Uint64(x$2.$high - 0, x$2.$low - 1)); + explo = exp - 1 >> 0; + } + lower = new decimal.ptr(); + lower.Assign((x$3 = $mul64(mantlo, new $Uint64(0, 2)), new $Uint64(x$3.$high + 0, x$3.$low + 1))); + lower.Shift((explo - (flt.mantbits >> 0) >> 0) - 1 >> 0); + inclusive = (x$4 = $div64(mant, new $Uint64(0, 2), true), (x$4.$high === 0 && x$4.$low === 0)); + i = 0; + while (true) { + if (!(i < d.nd)) { break; } + _tmp = 0; _tmp$1 = 0; _tmp$2 = 0; l = _tmp; m = _tmp$1; u = _tmp$2; + if (i < lower.nd) { + l = (x$5 = lower.d, ((i < 0 || i >= x$5.length) ? $throwRuntimeError("index out of range") : x$5[i])); + } else { + l = 48; + } + m = (x$6 = d.d, ((i < 0 || i >= x$6.length) ? $throwRuntimeError("index out of range") : x$6[i])); + if (i < upper.nd) { + u = (x$7 = upper.d, ((i < 0 || i >= x$7.length) ? $throwRuntimeError("index out of range") : x$7[i])); + } else { + u = 48; + } + okdown = !((l === m)) || (inclusive && (l === m) && ((i + 1 >> 0) === lower.nd)); + okup = !((m === u)) && (inclusive || (m + 1 << 24 >>> 24) < u || (i + 1 >> 0) < upper.nd); + if (okdown && okup) { + d.Round(i + 1 >> 0); + return; + } else if (okdown) { + d.RoundDown(i + 1 >> 0); + return; + } else if (okup) { + d.RoundUp(i + 1 >> 0); + return; + } + i = i + (1) >> 0; + } + }; + fmtE = function(dst, neg, d, prec, fmt) { + var _q, _r, _ref, buf, ch, d, dst, exp, fmt, i, i$1, m, neg, prec, x, x$1; + d = $clone(d, decimalSlice); + if (neg) { + dst = $append(dst, 45); + } + ch = 48; + if (!((d.nd === 0))) { + ch = (x = d.d, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])); + } + dst = $append(dst, ch); + if (prec > 0) { + dst = $append(dst, 46); + i = 1; + m = ((d.nd + prec >> 0) + 1 >> 0) - max(d.nd, prec + 1 >> 0) >> 0; + while (true) { + if (!(i < m)) { break; } + dst = $append(dst, (x$1 = d.d, ((i < 0 || i >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + i]))); + i = i + (1) >> 0; + } + while (true) { + if (!(i <= prec)) { break; } + dst = $append(dst, 48); + i = i + (1) >> 0; + } + } + dst = $append(dst, fmt); + exp = d.dp - 1 >> 0; + if (d.nd === 0) { + exp = 0; + } + if (exp < 0) { + ch = 45; + exp = -exp; + } else { + ch = 43; + } + dst = $append(dst, ch); + buf = $clone(arrayType$2.zero(), arrayType$2); + i$1 = 3; + while (true) { + if (!(exp >= 10)) { break; } + i$1 = i$1 - (1) >> 0; + (i$1 < 0 || i$1 >= buf.length) ? $throwRuntimeError("index out of range") : buf[i$1] = (((_r = exp % 10, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) + 48 >> 0) << 24 >>> 24); + exp = (_q = exp / (10), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + } + i$1 = i$1 - (1) >> 0; + (i$1 < 0 || i$1 >= buf.length) ? $throwRuntimeError("index out of range") : buf[i$1] = ((exp + 48 >> 0) << 24 >>> 24); + _ref = i$1; + if (_ref === 0) { + dst = $append(dst, buf[0], buf[1], buf[2]); + } else if (_ref === 1) { + dst = $append(dst, buf[1], buf[2]); + } else if (_ref === 2) { + dst = $append(dst, 48, buf[2]); + } + return dst; + }; + fmtF = function(dst, neg, d, prec) { + var ch, d, dst, i, i$1, j, neg, prec, x, x$1; + d = $clone(d, decimalSlice); + if (neg) { + dst = $append(dst, 45); + } + if (d.dp > 0) { + i = 0; + i = 0; + while (true) { + if (!(i < d.dp && i < d.nd)) { break; } + dst = $append(dst, (x = d.d, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i]))); + i = i + (1) >> 0; + } + while (true) { + if (!(i < d.dp)) { break; } + dst = $append(dst, 48); + i = i + (1) >> 0; + } + } else { + dst = $append(dst, 48); + } + if (prec > 0) { + dst = $append(dst, 46); + i$1 = 0; + while (true) { + if (!(i$1 < prec)) { break; } + ch = 48; + j = d.dp + i$1 >> 0; + if (0 <= j && j < d.nd) { + ch = (x$1 = d.d, ((j < 0 || j >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + j])); + } + dst = $append(dst, ch); + i$1 = i$1 + (1) >> 0; + } + } + return dst; + }; + fmtB = function(dst, neg, mant, exp, flt) { + var _q, _r, buf, dst, esign, exp, flt, mant, n, neg, w, x; + buf = $clone(arrayType$3.zero(), arrayType$3); + w = 50; + exp = exp - ((flt.mantbits >> 0)) >> 0; + esign = 43; + if (exp < 0) { + esign = 45; + exp = -exp; + } + n = 0; + while (true) { + if (!(exp > 0 || n < 1)) { break; } + n = n + (1) >> 0; + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = (((_r = exp % 10, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) + 48 >> 0) << 24 >>> 24); + exp = (_q = exp / (10), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + } + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = esign; + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 112; + n = 0; + while (true) { + if (!((mant.$high > 0 || (mant.$high === 0 && mant.$low > 0)) || n < 1)) { break; } + n = n + (1) >> 0; + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = ((x = $div64(mant, new $Uint64(0, 10), true), new $Uint64(x.$high + 0, x.$low + 48)).$low << 24 >>> 24); + mant = $div64(mant, (new $Uint64(0, 10)), false); + } + if (neg) { + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 45; + } + return $appendSlice(dst, $subslice(new sliceType$6(buf), w)); + }; + max = function(a, b) { + var a, b; + if (a > b) { + return a; + } + return b; + }; + FormatUint = $pkg.FormatUint = function(i, base) { + var _tuple, base, i, s; + _tuple = formatBits(sliceType$6.nil, i, base, false, false); s = _tuple[1]; + return s; + }; + FormatInt = $pkg.FormatInt = function(i, base) { + var _tuple, base, i, s; + _tuple = formatBits(sliceType$6.nil, new $Uint64(i.$high, i.$low), base, (i.$high < 0 || (i.$high === 0 && i.$low < 0)), false); s = _tuple[1]; + return s; + }; + Itoa = $pkg.Itoa = function(i) { + var i; + return FormatInt(new $Int64(0, i), 10); + }; + formatBits = function(dst, u, base, neg, append_) { + var a, append_, b, b$1, base, d = sliceType$6.nil, dst, i, j, m, neg, q, q$1, s = "", s$1, u, x, x$1, x$2, x$3; + if (base < 2 || base > 36) { + $panic(new $String("strconv: illegal AppendInt/FormatInt base")); + } + a = $clone(arrayType$4.zero(), arrayType$4); + i = 65; + if (neg) { + u = new $Uint64(-u.$high, -u.$low); + } + if (base === 10) { + while (true) { + if (!((u.$high > 0 || (u.$high === 0 && u.$low >= 100)))) { break; } + i = i - (2) >> 0; + q = $div64(u, new $Uint64(0, 100), false); + j = ((x = $mul64(q, new $Uint64(0, 100)), new $Uint64(u.$high - x.$high, u.$low - x.$low)).$low >>> 0); + (x$1 = i + 1 >> 0, (x$1 < 0 || x$1 >= a.length) ? $throwRuntimeError("index out of range") : a[x$1] = "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789".charCodeAt(j)); + (x$2 = i + 0 >> 0, (x$2 < 0 || x$2 >= a.length) ? $throwRuntimeError("index out of range") : a[x$2] = "0000000000111111111122222222223333333333444444444455555555556666666666777777777788888888889999999999".charCodeAt(j)); + u = q; + } + if ((u.$high > 0 || (u.$high === 0 && u.$low >= 10))) { + i = i - (1) >> 0; + q$1 = $div64(u, new $Uint64(0, 10), false); + (i < 0 || i >= a.length) ? $throwRuntimeError("index out of range") : a[i] = "0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt(((x$3 = $mul64(q$1, new $Uint64(0, 10)), new $Uint64(u.$high - x$3.$high, u.$low - x$3.$low)).$low >>> 0)); + u = q$1; + } + } else { + s$1 = ((base < 0 || base >= shifts.length) ? $throwRuntimeError("index out of range") : shifts[base]); + if (s$1 > 0) { + b = new $Uint64(0, base); + m = (b.$low >>> 0) - 1 >>> 0; + while (true) { + if (!((u.$high > b.$high || (u.$high === b.$high && u.$low >= b.$low)))) { break; } + i = i - (1) >> 0; + (i < 0 || i >= a.length) ? $throwRuntimeError("index out of range") : a[i] = "0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt((((u.$low >>> 0) & m) >>> 0)); + u = $shiftRightUint64(u, (s$1)); + } + } else { + b$1 = new $Uint64(0, base); + while (true) { + if (!((u.$high > b$1.$high || (u.$high === b$1.$high && u.$low >= b$1.$low)))) { break; } + i = i - (1) >> 0; + (i < 0 || i >= a.length) ? $throwRuntimeError("index out of range") : a[i] = "0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt(($div64(u, b$1, true).$low >>> 0)); + u = $div64(u, (b$1), false); + } + } + } + i = i - (1) >> 0; + (i < 0 || i >= a.length) ? $throwRuntimeError("index out of range") : a[i] = "0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt((u.$low >>> 0)); + if (neg) { + i = i - (1) >> 0; + (i < 0 || i >= a.length) ? $throwRuntimeError("index out of range") : a[i] = 45; + } + if (append_) { + d = $appendSlice(dst, $subslice(new sliceType$6(a), i)); + return [d, s]; + } + s = $bytesToString($subslice(new sliceType$6(a), i)); + return [d, s]; + }; + quoteWith = function(s, quote, ASCIIonly) { + var ASCIIonly, _q, _ref, _tuple, buf, n, quote, r, runeTmp, s, s$1, s$2, width; + runeTmp = $clone(arrayType$5.zero(), arrayType$5); + buf = $makeSlice(sliceType$6, 0, (_q = (3 * s.length >> 0) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))); + buf = $append(buf, quote); + width = 0; + while (true) { + if (!(s.length > 0)) { break; } + r = (s.charCodeAt(0) >> 0); + width = 1; + if (r >= 128) { + _tuple = utf8.DecodeRuneInString(s); r = _tuple[0]; width = _tuple[1]; + } + if ((width === 1) && (r === 65533)) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\x"))); + buf = $append(buf, "0123456789abcdef".charCodeAt((s.charCodeAt(0) >>> 4 << 24 >>> 24))); + buf = $append(buf, "0123456789abcdef".charCodeAt(((s.charCodeAt(0) & 15) >>> 0))); + s = s.substring(width); + continue; + } + if ((r === (quote >> 0)) || (r === 92)) { + buf = $append(buf, 92); + buf = $append(buf, (r << 24 >>> 24)); + s = s.substring(width); + continue; + } + if (ASCIIonly) { + if (r < 128 && IsPrint(r)) { + buf = $append(buf, (r << 24 >>> 24)); + s = s.substring(width); + continue; + } + } else if (IsPrint(r)) { + n = utf8.EncodeRune(new sliceType$6(runeTmp), r); + buf = $appendSlice(buf, $subslice(new sliceType$6(runeTmp), 0, n)); + s = s.substring(width); + continue; + } + _ref = r; + if (_ref === 7) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\a"))); + } else if (_ref === 8) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\b"))); + } else if (_ref === 12) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\f"))); + } else if (_ref === 10) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\n"))); + } else if (_ref === 13) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\r"))); + } else if (_ref === 9) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\t"))); + } else if (_ref === 11) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\v"))); + } else { + if (r < 32) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\x"))); + buf = $append(buf, "0123456789abcdef".charCodeAt((s.charCodeAt(0) >>> 4 << 24 >>> 24))); + buf = $append(buf, "0123456789abcdef".charCodeAt(((s.charCodeAt(0) & 15) >>> 0))); + } else if (r > 1114111) { + r = 65533; + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\u"))); + s$1 = 12; + while (true) { + if (!(s$1 >= 0)) { break; } + buf = $append(buf, "0123456789abcdef".charCodeAt((((r >> $min((s$1 >>> 0), 31)) >> 0) & 15))); + s$1 = s$1 - (4) >> 0; + } + } else if (r < 65536) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\u"))); + s$1 = 12; + while (true) { + if (!(s$1 >= 0)) { break; } + buf = $append(buf, "0123456789abcdef".charCodeAt((((r >> $min((s$1 >>> 0), 31)) >> 0) & 15))); + s$1 = s$1 - (4) >> 0; + } + } else { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\U"))); + s$2 = 28; + while (true) { + if (!(s$2 >= 0)) { break; } + buf = $append(buf, "0123456789abcdef".charCodeAt((((r >> $min((s$2 >>> 0), 31)) >> 0) & 15))); + s$2 = s$2 - (4) >> 0; + } + } + } + s = s.substring(width); + } + buf = $append(buf, quote); + return $bytesToString(buf); + }; + Quote = $pkg.Quote = function(s) { + var s; + return quoteWith(s, 34, false); + }; + QuoteToASCII = $pkg.QuoteToASCII = function(s) { + var s; + return quoteWith(s, 34, true); + }; + QuoteRune = $pkg.QuoteRune = function(r) { + var r; + return quoteWith($encodeRune(r), 39, false); + }; + AppendQuoteRune = $pkg.AppendQuoteRune = function(dst, r) { + var dst, r; + return $appendSlice(dst, new sliceType$6($stringToBytes(QuoteRune(r)))); + }; + QuoteRuneToASCII = $pkg.QuoteRuneToASCII = function(r) { + var r; + return quoteWith($encodeRune(r), 39, true); + }; + AppendQuoteRuneToASCII = $pkg.AppendQuoteRuneToASCII = function(dst, r) { + var dst, r; + return $appendSlice(dst, new sliceType$6($stringToBytes(QuoteRuneToASCII(r)))); + }; + CanBackquote = $pkg.CanBackquote = function(s) { + var _tuple, r, s, wid; + while (true) { + if (!(s.length > 0)) { break; } + _tuple = utf8.DecodeRuneInString(s); r = _tuple[0]; wid = _tuple[1]; + s = s.substring(wid); + if (wid > 1) { + if (r === 65279) { + return false; + } + continue; + } + if (r === 65533) { + return false; + } + if ((r < 32 && !((r === 9))) || (r === 96) || (r === 127)) { + return false; + } + } + return true; + }; + unhex = function(b) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, b, c, ok = false, v = 0; + c = (b >> 0); + if (48 <= c && c <= 57) { + _tmp = c - 48 >> 0; _tmp$1 = true; v = _tmp; ok = _tmp$1; + return [v, ok]; + } else if (97 <= c && c <= 102) { + _tmp$2 = (c - 97 >> 0) + 10 >> 0; _tmp$3 = true; v = _tmp$2; ok = _tmp$3; + return [v, ok]; + } else if (65 <= c && c <= 70) { + _tmp$4 = (c - 65 >> 0) + 10 >> 0; _tmp$5 = true; v = _tmp$4; ok = _tmp$5; + return [v, ok]; + } + return [v, ok]; + }; + UnquoteChar = $pkg.UnquoteChar = function(s, quote) { + var _ref, _ref$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, c, c$1, err = $ifaceNil, j, j$1, multibyte = false, n, ok, quote, r, s, size, tail = "", v, v$1, value = 0, x, x$1; + c = s.charCodeAt(0); + if ((c === quote) && ((quote === 39) || (quote === 34))) { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } else if (c >= 128) { + _tuple = utf8.DecodeRuneInString(s); r = _tuple[0]; size = _tuple[1]; + _tmp = r; _tmp$1 = true; _tmp$2 = s.substring(size); _tmp$3 = $ifaceNil; value = _tmp; multibyte = _tmp$1; tail = _tmp$2; err = _tmp$3; + return [value, multibyte, tail, err]; + } else if (!((c === 92))) { + _tmp$4 = (s.charCodeAt(0) >> 0); _tmp$5 = false; _tmp$6 = s.substring(1); _tmp$7 = $ifaceNil; value = _tmp$4; multibyte = _tmp$5; tail = _tmp$6; err = _tmp$7; + return [value, multibyte, tail, err]; + } + if (s.length <= 1) { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } + c$1 = s.charCodeAt(1); + s = s.substring(2); + _ref = c$1; + switch (0) { default: if (_ref === 97) { + value = 7; + } else if (_ref === 98) { + value = 8; + } else if (_ref === 102) { + value = 12; + } else if (_ref === 110) { + value = 10; + } else if (_ref === 114) { + value = 13; + } else if (_ref === 116) { + value = 9; + } else if (_ref === 118) { + value = 11; + } else if (_ref === 120 || _ref === 117 || _ref === 85) { + n = 0; + _ref$1 = c$1; + if (_ref$1 === 120) { + n = 2; + } else if (_ref$1 === 117) { + n = 4; + } else if (_ref$1 === 85) { + n = 8; + } + v = 0; + if (s.length < n) { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } + j = 0; + while (true) { + if (!(j < n)) { break; } + _tuple$1 = unhex(s.charCodeAt(j)); x = _tuple$1[0]; ok = _tuple$1[1]; + if (!ok) { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } + v = (v << 4 >> 0) | x; + j = j + (1) >> 0; + } + s = s.substring(n); + if (c$1 === 120) { + value = v; + break; + } + if (v > 1114111) { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } + value = v; + multibyte = true; + } else if (_ref === 48 || _ref === 49 || _ref === 50 || _ref === 51 || _ref === 52 || _ref === 53 || _ref === 54 || _ref === 55) { + v$1 = (c$1 >> 0) - 48 >> 0; + if (s.length < 2) { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } + j$1 = 0; + while (true) { + if (!(j$1 < 2)) { break; } + x$1 = (s.charCodeAt(j$1) >> 0) - 48 >> 0; + if (x$1 < 0 || x$1 > 7) { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } + v$1 = ((v$1 << 3 >> 0)) | x$1; + j$1 = j$1 + (1) >> 0; + } + s = s.substring(2); + if (v$1 > 255) { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } + value = v$1; + } else if (_ref === 92) { + value = 92; + } else if (_ref === 39 || _ref === 34) { + if (!((c$1 === quote))) { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } + value = (c$1 >> 0); + } else { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } } + tail = s; + return [value, multibyte, tail, err]; + }; + Unquote = $pkg.Unquote = function(s) { + var _q, _ref, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, buf, c, err = $ifaceNil, err$1, multibyte, n, n$1, quote, r, runeTmp, s, size, ss, t = ""; + n = s.length; + if (n < 2) { + _tmp = ""; _tmp$1 = $pkg.ErrSyntax; t = _tmp; err = _tmp$1; + return [t, err]; + } + quote = s.charCodeAt(0); + if (!((quote === s.charCodeAt((n - 1 >> 0))))) { + _tmp$2 = ""; _tmp$3 = $pkg.ErrSyntax; t = _tmp$2; err = _tmp$3; + return [t, err]; + } + s = s.substring(1, (n - 1 >> 0)); + if (quote === 96) { + if (contains(s, 96)) { + _tmp$4 = ""; _tmp$5 = $pkg.ErrSyntax; t = _tmp$4; err = _tmp$5; + return [t, err]; + } + _tmp$6 = s; _tmp$7 = $ifaceNil; t = _tmp$6; err = _tmp$7; + return [t, err]; + } + if (!((quote === 34)) && !((quote === 39))) { + _tmp$8 = ""; _tmp$9 = $pkg.ErrSyntax; t = _tmp$8; err = _tmp$9; + return [t, err]; + } + if (contains(s, 10)) { + _tmp$10 = ""; _tmp$11 = $pkg.ErrSyntax; t = _tmp$10; err = _tmp$11; + return [t, err]; + } + if (!contains(s, 92) && !contains(s, quote)) { + _ref = quote; + if (_ref === 34) { + _tmp$12 = s; _tmp$13 = $ifaceNil; t = _tmp$12; err = _tmp$13; + return [t, err]; + } else if (_ref === 39) { + _tuple = utf8.DecodeRuneInString(s); r = _tuple[0]; size = _tuple[1]; + if ((size === s.length) && (!((r === 65533)) || !((size === 1)))) { + _tmp$14 = s; _tmp$15 = $ifaceNil; t = _tmp$14; err = _tmp$15; + return [t, err]; + } + } + } + runeTmp = $clone(arrayType$5.zero(), arrayType$5); + buf = $makeSlice(sliceType$6, 0, (_q = (3 * s.length >> 0) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))); + while (true) { + if (!(s.length > 0)) { break; } + _tuple$1 = UnquoteChar(s, quote); c = _tuple$1[0]; multibyte = _tuple$1[1]; ss = _tuple$1[2]; err$1 = _tuple$1[3]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + _tmp$16 = ""; _tmp$17 = err$1; t = _tmp$16; err = _tmp$17; + return [t, err]; + } + s = ss; + if (c < 128 || !multibyte) { + buf = $append(buf, (c << 24 >>> 24)); + } else { + n$1 = utf8.EncodeRune(new sliceType$6(runeTmp), c); + buf = $appendSlice(buf, $subslice(new sliceType$6(runeTmp), 0, n$1)); + } + if ((quote === 39) && !((s.length === 0))) { + _tmp$18 = ""; _tmp$19 = $pkg.ErrSyntax; t = _tmp$18; err = _tmp$19; + return [t, err]; + } + } + _tmp$20 = $bytesToString(buf); _tmp$21 = $ifaceNil; t = _tmp$20; err = _tmp$21; + return [t, err]; + }; + contains = function(s, c) { + var c, i, s; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + if (s.charCodeAt(i) === c) { + return true; + } + i = i + (1) >> 0; + } + return false; + }; + bsearch16 = function(a, x) { + var _q, _tmp, _tmp$1, a, h, i, j, x; + _tmp = 0; _tmp$1 = a.$length; i = _tmp; j = _tmp$1; + while (true) { + if (!(i < j)) { break; } + h = i + (_q = ((j - i >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0; + if (((h < 0 || h >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + h]) < x) { + i = h + 1 >> 0; + } else { + j = h; + } + } + return i; + }; + bsearch32 = function(a, x) { + var _q, _tmp, _tmp$1, a, h, i, j, x; + _tmp = 0; _tmp$1 = a.$length; i = _tmp; j = _tmp$1; + while (true) { + if (!(i < j)) { break; } + h = i + (_q = ((j - i >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0; + if (((h < 0 || h >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + h]) < x) { + i = h + 1 >> 0; + } else { + j = h; + } + } + return i; + }; + IsPrint = $pkg.IsPrint = function(r) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, i, i$1, isNotPrint, isNotPrint$1, isPrint, isPrint$1, j, j$1, r, rr, rr$1, x, x$1, x$2, x$3; + if (r <= 255) { + if (32 <= r && r <= 126) { + return true; + } + if (161 <= r && r <= 255) { + return !((r === 173)); + } + return false; + } + if (0 <= r && r < 65536) { + _tmp = (r << 16 >>> 16); _tmp$1 = isPrint16; _tmp$2 = isNotPrint16; rr = _tmp; isPrint = _tmp$1; isNotPrint = _tmp$2; + i = bsearch16(isPrint, rr); + if (i >= isPrint.$length || rr < (x = i & ~1, ((x < 0 || x >= isPrint.$length) ? $throwRuntimeError("index out of range") : isPrint.$array[isPrint.$offset + x])) || (x$1 = i | 1, ((x$1 < 0 || x$1 >= isPrint.$length) ? $throwRuntimeError("index out of range") : isPrint.$array[isPrint.$offset + x$1])) < rr) { + return false; + } + j = bsearch16(isNotPrint, rr); + return j >= isNotPrint.$length || !((((j < 0 || j >= isNotPrint.$length) ? $throwRuntimeError("index out of range") : isNotPrint.$array[isNotPrint.$offset + j]) === rr)); + } + _tmp$3 = (r >>> 0); _tmp$4 = isPrint32; _tmp$5 = isNotPrint32; rr$1 = _tmp$3; isPrint$1 = _tmp$4; isNotPrint$1 = _tmp$5; + i$1 = bsearch32(isPrint$1, rr$1); + if (i$1 >= isPrint$1.$length || rr$1 < (x$2 = i$1 & ~1, ((x$2 < 0 || x$2 >= isPrint$1.$length) ? $throwRuntimeError("index out of range") : isPrint$1.$array[isPrint$1.$offset + x$2])) || (x$3 = i$1 | 1, ((x$3 < 0 || x$3 >= isPrint$1.$length) ? $throwRuntimeError("index out of range") : isPrint$1.$array[isPrint$1.$offset + x$3])) < rr$1) { + return false; + } + if (r >= 131072) { + return true; + } + r = r - (65536) >> 0; + j$1 = bsearch16(isNotPrint$1, (r << 16 >>> 16)); + return j$1 >= isNotPrint$1.$length || !((((j$1 < 0 || j$1 >= isNotPrint$1.$length) ? $throwRuntimeError("index out of range") : isNotPrint$1.$array[isNotPrint$1.$offset + j$1]) === (r << 16 >>> 16))); + }; + ptrType.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$2.methods = [{prop: "set", name: "set", pkg: "strconv", typ: $funcType([$String], [$Bool], false)}, {prop: "floatBits", name: "floatBits", pkg: "strconv", typ: $funcType([ptrType$1], [$Uint64, $Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Assign", name: "Assign", pkg: "", typ: $funcType([$Uint64], [], false)}, {prop: "Shift", name: "Shift", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Round", name: "Round", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "RoundDown", name: "RoundDown", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "RoundUp", name: "RoundUp", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "RoundedInteger", name: "RoundedInteger", pkg: "", typ: $funcType([], [$Uint64], false)}]; + ptrType$4.methods = [{prop: "floatBits", name: "floatBits", pkg: "strconv", typ: $funcType([ptrType$1], [$Uint64, $Bool], false)}, {prop: "AssignComputeBounds", name: "AssignComputeBounds", pkg: "", typ: $funcType([$Uint64, $Int, $Bool, ptrType$1], [extFloat, extFloat], false)}, {prop: "Normalize", name: "Normalize", pkg: "", typ: $funcType([], [$Uint], false)}, {prop: "Multiply", name: "Multiply", pkg: "", typ: $funcType([extFloat], [], false)}, {prop: "AssignDecimal", name: "AssignDecimal", pkg: "", typ: $funcType([$Uint64, $Int, $Bool, $Bool, ptrType$1], [$Bool], false)}, {prop: "frexp10", name: "frexp10", pkg: "strconv", typ: $funcType([], [$Int, $Int], false)}, {prop: "FixedDecimal", name: "FixedDecimal", pkg: "", typ: $funcType([ptrType$3, $Int], [$Bool], false)}, {prop: "ShortestDecimal", name: "ShortestDecimal", pkg: "", typ: $funcType([ptrType$3, ptrType$4, ptrType$4], [$Bool], false)}]; + NumError.init([{prop: "Func", name: "Func", pkg: "", typ: $String, tag: ""}, {prop: "Num", name: "Num", pkg: "", typ: $String, tag: ""}, {prop: "Err", name: "Err", pkg: "", typ: $error, tag: ""}]); + decimal.init([{prop: "d", name: "d", pkg: "strconv", typ: arrayType$6, tag: ""}, {prop: "nd", name: "nd", pkg: "strconv", typ: $Int, tag: ""}, {prop: "dp", name: "dp", pkg: "strconv", typ: $Int, tag: ""}, {prop: "neg", name: "neg", pkg: "strconv", typ: $Bool, tag: ""}, {prop: "trunc", name: "trunc", pkg: "strconv", typ: $Bool, tag: ""}]); + leftCheat.init([{prop: "delta", name: "delta", pkg: "strconv", typ: $Int, tag: ""}, {prop: "cutoff", name: "cutoff", pkg: "strconv", typ: $String, tag: ""}]); + extFloat.init([{prop: "mant", name: "mant", pkg: "strconv", typ: $Uint64, tag: ""}, {prop: "exp", name: "exp", pkg: "strconv", typ: $Int, tag: ""}, {prop: "neg", name: "neg", pkg: "strconv", typ: $Bool, tag: ""}]); + floatInfo.init([{prop: "mantbits", name: "mantbits", pkg: "strconv", typ: $Uint, tag: ""}, {prop: "expbits", name: "expbits", pkg: "strconv", typ: $Uint, tag: ""}, {prop: "bias", name: "bias", pkg: "strconv", typ: $Int, tag: ""}]); + decimalSlice.init([{prop: "d", name: "d", pkg: "strconv", typ: sliceType$6, tag: ""}, {prop: "nd", name: "nd", pkg: "strconv", typ: $Int, tag: ""}, {prop: "dp", name: "dp", pkg: "strconv", typ: $Int, tag: ""}, {prop: "neg", name: "neg", pkg: "strconv", typ: $Bool, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_strconv = function() { while (true) { switch ($s) { case 0: + $r = errors.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = math.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = utf8.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + optimize = true; + powtab = new sliceType([1, 3, 6, 9, 13, 16, 19, 23, 26]); + float64pow10 = new sliceType$1([1, 10, 100, 1000, 10000, 100000, 1e+06, 1e+07, 1e+08, 1e+09, 1e+10, 1e+11, 1e+12, 1e+13, 1e+14, 1e+15, 1e+16, 1e+17, 1e+18, 1e+19, 1e+20, 1e+21, 1e+22]); + float32pow10 = new sliceType$2([1, 10, 100, 1000, 10000, 100000, 1e+06, 1e+07, 1e+08, 1e+09, 1e+10]); + $pkg.ErrRange = errors.New("value out of range"); + $pkg.ErrSyntax = errors.New("invalid syntax"); + leftcheats = new sliceType$3([new leftCheat.ptr(0, ""), new leftCheat.ptr(1, "5"), new leftCheat.ptr(1, "25"), new leftCheat.ptr(1, "125"), new leftCheat.ptr(2, "625"), new leftCheat.ptr(2, "3125"), new leftCheat.ptr(2, "15625"), new leftCheat.ptr(3, "78125"), new leftCheat.ptr(3, "390625"), new leftCheat.ptr(3, "1953125"), new leftCheat.ptr(4, "9765625"), new leftCheat.ptr(4, "48828125"), new leftCheat.ptr(4, "244140625"), new leftCheat.ptr(4, "1220703125"), new leftCheat.ptr(5, "6103515625"), new leftCheat.ptr(5, "30517578125"), new leftCheat.ptr(5, "152587890625"), new leftCheat.ptr(6, "762939453125"), new leftCheat.ptr(6, "3814697265625"), new leftCheat.ptr(6, "19073486328125"), new leftCheat.ptr(7, "95367431640625"), new leftCheat.ptr(7, "476837158203125"), new leftCheat.ptr(7, "2384185791015625"), new leftCheat.ptr(7, "11920928955078125"), new leftCheat.ptr(8, "59604644775390625"), new leftCheat.ptr(8, "298023223876953125"), new leftCheat.ptr(8, "1490116119384765625"), new leftCheat.ptr(9, "7450580596923828125")]); + smallPowersOfTen = $toNativeArray($kindStruct, [new extFloat.ptr(new $Uint64(2147483648, 0), -63, false), new extFloat.ptr(new $Uint64(2684354560, 0), -60, false), new extFloat.ptr(new $Uint64(3355443200, 0), -57, false), new extFloat.ptr(new $Uint64(4194304000, 0), -54, false), new extFloat.ptr(new $Uint64(2621440000, 0), -50, false), new extFloat.ptr(new $Uint64(3276800000, 0), -47, false), new extFloat.ptr(new $Uint64(4096000000, 0), -44, false), new extFloat.ptr(new $Uint64(2560000000, 0), -40, false)]); + powersOfTen = $toNativeArray($kindStruct, [new extFloat.ptr(new $Uint64(4203730336, 136053384), -1220, false), new extFloat.ptr(new $Uint64(3132023167, 2722021238), -1193, false), new extFloat.ptr(new $Uint64(2333539104, 810921078), -1166, false), new extFloat.ptr(new $Uint64(3477244234, 1573795306), -1140, false), new extFloat.ptr(new $Uint64(2590748842, 1432697645), -1113, false), new extFloat.ptr(new $Uint64(3860516611, 1025131999), -1087, false), new extFloat.ptr(new $Uint64(2876309015, 3348809418), -1060, false), new extFloat.ptr(new $Uint64(4286034428, 3200048207), -1034, false), new extFloat.ptr(new $Uint64(3193344495, 1097586188), -1007, false), new extFloat.ptr(new $Uint64(2379227053, 2424306748), -980, false), new extFloat.ptr(new $Uint64(3545324584, 827693699), -954, false), new extFloat.ptr(new $Uint64(2641472655, 2913388981), -927, false), new extFloat.ptr(new $Uint64(3936100983, 602835915), -901, false), new extFloat.ptr(new $Uint64(2932623761, 1081627501), -874, false), new extFloat.ptr(new $Uint64(2184974969, 1572261463), -847, false), new extFloat.ptr(new $Uint64(3255866422, 1308317239), -821, false), new extFloat.ptr(new $Uint64(2425809519, 944281679), -794, false), new extFloat.ptr(new $Uint64(3614737867, 629291719), -768, false), new extFloat.ptr(new $Uint64(2693189581, 2545915892), -741, false), new extFloat.ptr(new $Uint64(4013165208, 388672741), -715, false), new extFloat.ptr(new $Uint64(2990041083, 708162190), -688, false), new extFloat.ptr(new $Uint64(2227754207, 3536207675), -661, false), new extFloat.ptr(new $Uint64(3319612455, 450088378), -635, false), new extFloat.ptr(new $Uint64(2473304014, 3139815830), -608, false), new extFloat.ptr(new $Uint64(3685510180, 2103616900), -582, false), new extFloat.ptr(new $Uint64(2745919064, 224385782), -555, false), new extFloat.ptr(new $Uint64(4091738259, 3737383206), -529, false), new extFloat.ptr(new $Uint64(3048582568, 2868871352), -502, false), new extFloat.ptr(new $Uint64(2271371013, 1820084875), -475, false), new extFloat.ptr(new $Uint64(3384606560, 885076051), -449, false), new extFloat.ptr(new $Uint64(2521728396, 2444895829), -422, false), new extFloat.ptr(new $Uint64(3757668132, 1881767613), -396, false), new extFloat.ptr(new $Uint64(2799680927, 3102062735), -369, false), new extFloat.ptr(new $Uint64(4171849679, 2289335700), -343, false), new extFloat.ptr(new $Uint64(3108270227, 2410191823), -316, false), new extFloat.ptr(new $Uint64(2315841784, 3205436779), -289, false), new extFloat.ptr(new $Uint64(3450873173, 1697722806), -263, false), new extFloat.ptr(new $Uint64(2571100870, 3497754540), -236, false), new extFloat.ptr(new $Uint64(3831238852, 707476230), -210, false), new extFloat.ptr(new $Uint64(2854495385, 1769181907), -183, false), new extFloat.ptr(new $Uint64(4253529586, 2197867022), -157, false), new extFloat.ptr(new $Uint64(3169126500, 2450594539), -130, false), new extFloat.ptr(new $Uint64(2361183241, 1867548876), -103, false), new extFloat.ptr(new $Uint64(3518437208, 3793315116), -77, false), new extFloat.ptr(new $Uint64(2621440000, 0), -50, false), new extFloat.ptr(new $Uint64(3906250000, 0), -24, false), new extFloat.ptr(new $Uint64(2910383045, 2892103680), 3, false), new extFloat.ptr(new $Uint64(2168404344, 4170451332), 30, false), new extFloat.ptr(new $Uint64(3231174267, 3372684723), 56, false), new extFloat.ptr(new $Uint64(2407412430, 2078956656), 83, false), new extFloat.ptr(new $Uint64(3587324068, 2884206696), 109, false), new extFloat.ptr(new $Uint64(2672764710, 395977285), 136, false), new extFloat.ptr(new $Uint64(3982729777, 3569679143), 162, false), new extFloat.ptr(new $Uint64(2967364920, 2361961896), 189, false), new extFloat.ptr(new $Uint64(2210859150, 447440347), 216, false), new extFloat.ptr(new $Uint64(3294436857, 1114709402), 242, false), new extFloat.ptr(new $Uint64(2454546732, 2786846552), 269, false), new extFloat.ptr(new $Uint64(3657559652, 443583978), 295, false), new extFloat.ptr(new $Uint64(2725094297, 2599384906), 322, false), new extFloat.ptr(new $Uint64(4060706939, 3028118405), 348, false), new extFloat.ptr(new $Uint64(3025462433, 2044532855), 375, false), new extFloat.ptr(new $Uint64(2254145170, 1536935362), 402, false), new extFloat.ptr(new $Uint64(3358938053, 3365297469), 428, false), new extFloat.ptr(new $Uint64(2502603868, 4204241075), 455, false), new extFloat.ptr(new $Uint64(3729170365, 2577424355), 481, false), new extFloat.ptr(new $Uint64(2778448436, 3677981733), 508, false), new extFloat.ptr(new $Uint64(4140210802, 2744688476), 534, false), new extFloat.ptr(new $Uint64(3084697427, 1424604878), 561, false), new extFloat.ptr(new $Uint64(2298278679, 4062331362), 588, false), new extFloat.ptr(new $Uint64(3424702107, 3546052773), 614, false), new extFloat.ptr(new $Uint64(2551601907, 2065781727), 641, false), new extFloat.ptr(new $Uint64(3802183132, 2535403578), 667, false), new extFloat.ptr(new $Uint64(2832847187, 1558426518), 694, false), new extFloat.ptr(new $Uint64(4221271257, 2762425404), 720, false), new extFloat.ptr(new $Uint64(3145092172, 2812560400), 747, false), new extFloat.ptr(new $Uint64(2343276271, 3057687578), 774, false), new extFloat.ptr(new $Uint64(3491753744, 2790753324), 800, false), new extFloat.ptr(new $Uint64(2601559269, 3918606633), 827, false), new extFloat.ptr(new $Uint64(3876625403, 2711358621), 853, false), new extFloat.ptr(new $Uint64(2888311001, 1648096297), 880, false), new extFloat.ptr(new $Uint64(2151959390, 2057817989), 907, false), new extFloat.ptr(new $Uint64(3206669376, 61660461), 933, false), new extFloat.ptr(new $Uint64(2389154863, 1581580175), 960, false), new extFloat.ptr(new $Uint64(3560118173, 2626467905), 986, false), new extFloat.ptr(new $Uint64(2652494738, 3034782633), 1013, false), new extFloat.ptr(new $Uint64(3952525166, 3135207385), 1039, false), new extFloat.ptr(new $Uint64(2944860731, 2616258155), 1066, false)]); + uint64pow10 = $toNativeArray($kindUint64, [new $Uint64(0, 1), new $Uint64(0, 10), new $Uint64(0, 100), new $Uint64(0, 1000), new $Uint64(0, 10000), new $Uint64(0, 100000), new $Uint64(0, 1000000), new $Uint64(0, 10000000), new $Uint64(0, 100000000), new $Uint64(0, 1000000000), new $Uint64(2, 1410065408), new $Uint64(23, 1215752192), new $Uint64(232, 3567587328), new $Uint64(2328, 1316134912), new $Uint64(23283, 276447232), new $Uint64(232830, 2764472320), new $Uint64(2328306, 1874919424), new $Uint64(23283064, 1569325056), new $Uint64(232830643, 2808348672), new $Uint64(2328306436, 2313682944)]); + float32info = new floatInfo.ptr(23, 8, -127); + float64info = new floatInfo.ptr(52, 11, -1023); + isPrint16 = new sliceType$4([32, 126, 161, 887, 890, 895, 900, 1366, 1369, 1418, 1421, 1479, 1488, 1514, 1520, 1524, 1542, 1563, 1566, 1805, 1808, 1866, 1869, 1969, 1984, 2042, 2048, 2093, 2096, 2139, 2142, 2142, 2208, 2226, 2276, 2444, 2447, 2448, 2451, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2531, 2534, 2555, 2561, 2570, 2575, 2576, 2579, 2617, 2620, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2654, 2662, 2677, 2689, 2745, 2748, 2765, 2768, 2768, 2784, 2787, 2790, 2801, 2817, 2828, 2831, 2832, 2835, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2915, 2918, 2935, 2946, 2954, 2958, 2965, 2969, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3021, 3024, 3024, 3031, 3031, 3046, 3066, 3072, 3129, 3133, 3149, 3157, 3161, 3168, 3171, 3174, 3183, 3192, 3257, 3260, 3277, 3285, 3286, 3294, 3299, 3302, 3314, 3329, 3386, 3389, 3406, 3415, 3415, 3424, 3427, 3430, 3445, 3449, 3455, 3458, 3478, 3482, 3517, 3520, 3526, 3530, 3530, 3535, 3551, 3558, 3567, 3570, 3572, 3585, 3642, 3647, 3675, 3713, 3716, 3719, 3722, 3725, 3725, 3732, 3751, 3754, 3773, 3776, 3789, 3792, 3801, 3804, 3807, 3840, 3948, 3953, 4058, 4096, 4295, 4301, 4301, 4304, 4685, 4688, 4701, 4704, 4749, 4752, 4789, 4792, 4805, 4808, 4885, 4888, 4954, 4957, 4988, 4992, 5017, 5024, 5108, 5120, 5788, 5792, 5880, 5888, 5908, 5920, 5942, 5952, 5971, 5984, 6003, 6016, 6109, 6112, 6121, 6128, 6137, 6144, 6157, 6160, 6169, 6176, 6263, 6272, 6314, 6320, 6389, 6400, 6443, 6448, 6459, 6464, 6464, 6468, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6618, 6622, 6683, 6686, 6780, 6783, 6793, 6800, 6809, 6816, 6829, 6832, 6846, 6912, 6987, 6992, 7036, 7040, 7155, 7164, 7223, 7227, 7241, 7245, 7295, 7360, 7367, 7376, 7417, 7424, 7669, 7676, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8061, 8064, 8147, 8150, 8175, 8178, 8190, 8208, 8231, 8240, 8286, 8304, 8305, 8308, 8348, 8352, 8381, 8400, 8432, 8448, 8585, 8592, 9210, 9216, 9254, 9280, 9290, 9312, 11123, 11126, 11157, 11160, 11193, 11197, 11217, 11264, 11507, 11513, 11559, 11565, 11565, 11568, 11623, 11631, 11632, 11647, 11670, 11680, 11842, 11904, 12019, 12032, 12245, 12272, 12283, 12289, 12438, 12441, 12543, 12549, 12589, 12593, 12730, 12736, 12771, 12784, 19893, 19904, 40908, 40960, 42124, 42128, 42182, 42192, 42539, 42560, 42743, 42752, 42925, 42928, 42929, 42999, 43051, 43056, 43065, 43072, 43127, 43136, 43204, 43214, 43225, 43232, 43259, 43264, 43347, 43359, 43388, 43392, 43481, 43486, 43574, 43584, 43597, 43600, 43609, 43612, 43714, 43739, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43871, 43876, 43877, 43968, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64449, 64467, 64831, 64848, 64911, 64914, 64967, 65008, 65021, 65024, 65049, 65056, 65069, 65072, 65131, 65136, 65276, 65281, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65504, 65518, 65532, 65533]); + isNotPrint16 = new sliceType$4([173, 907, 909, 930, 1328, 1376, 1416, 1424, 1757, 2111, 2436, 2473, 2481, 2526, 2564, 2601, 2609, 2612, 2615, 2621, 2653, 2692, 2702, 2706, 2729, 2737, 2740, 2758, 2762, 2820, 2857, 2865, 2868, 2910, 2948, 2961, 2971, 2973, 3017, 3076, 3085, 3089, 3113, 3141, 3145, 3159, 3200, 3204, 3213, 3217, 3241, 3252, 3269, 3273, 3295, 3312, 3332, 3341, 3345, 3397, 3401, 3460, 3506, 3516, 3541, 3543, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3770, 3781, 3783, 3912, 3992, 4029, 4045, 4294, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823, 4881, 5760, 5901, 5997, 6001, 6431, 6751, 7415, 8024, 8026, 8028, 8030, 8117, 8133, 8156, 8181, 8335, 11209, 11311, 11359, 11558, 11687, 11695, 11703, 11711, 11719, 11727, 11735, 11743, 11930, 12352, 12687, 12831, 13055, 42654, 42895, 43470, 43519, 43815, 43823, 64311, 64317, 64319, 64322, 64325, 65107, 65127, 65141, 65511]); + isPrint32 = new sliceType$5([65536, 65613, 65616, 65629, 65664, 65786, 65792, 65794, 65799, 65843, 65847, 65932, 65936, 65947, 65952, 65952, 66000, 66045, 66176, 66204, 66208, 66256, 66272, 66299, 66304, 66339, 66352, 66378, 66384, 66426, 66432, 66499, 66504, 66517, 66560, 66717, 66720, 66729, 66816, 66855, 66864, 66915, 66927, 66927, 67072, 67382, 67392, 67413, 67424, 67431, 67584, 67589, 67592, 67640, 67644, 67644, 67647, 67742, 67751, 67759, 67840, 67867, 67871, 67897, 67903, 67903, 67968, 68023, 68030, 68031, 68096, 68102, 68108, 68147, 68152, 68154, 68159, 68167, 68176, 68184, 68192, 68255, 68288, 68326, 68331, 68342, 68352, 68405, 68409, 68437, 68440, 68466, 68472, 68497, 68505, 68508, 68521, 68527, 68608, 68680, 69216, 69246, 69632, 69709, 69714, 69743, 69759, 69825, 69840, 69864, 69872, 69881, 69888, 69955, 69968, 70006, 70016, 70088, 70093, 70093, 70096, 70106, 70113, 70132, 70144, 70205, 70320, 70378, 70384, 70393, 70401, 70412, 70415, 70416, 70419, 70457, 70460, 70468, 70471, 70472, 70475, 70477, 70487, 70487, 70493, 70499, 70502, 70508, 70512, 70516, 70784, 70855, 70864, 70873, 71040, 71093, 71096, 71113, 71168, 71236, 71248, 71257, 71296, 71351, 71360, 71369, 71840, 71922, 71935, 71935, 72384, 72440, 73728, 74648, 74752, 74868, 77824, 78894, 92160, 92728, 92736, 92777, 92782, 92783, 92880, 92909, 92912, 92917, 92928, 92997, 93008, 93047, 93053, 93071, 93952, 94020, 94032, 94078, 94095, 94111, 110592, 110593, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 113820, 113823, 118784, 119029, 119040, 119078, 119081, 119154, 119163, 119261, 119296, 119365, 119552, 119638, 119648, 119665, 119808, 119967, 119970, 119970, 119973, 119974, 119977, 120074, 120077, 120134, 120138, 120485, 120488, 120779, 120782, 120831, 124928, 125124, 125127, 125142, 126464, 126500, 126503, 126523, 126530, 126530, 126535, 126548, 126551, 126564, 126567, 126619, 126625, 126651, 126704, 126705, 126976, 127019, 127024, 127123, 127136, 127150, 127153, 127221, 127232, 127244, 127248, 127339, 127344, 127386, 127462, 127490, 127504, 127546, 127552, 127560, 127568, 127569, 127744, 127788, 127792, 127869, 127872, 127950, 127956, 127991, 128000, 128330, 128336, 128578, 128581, 128719, 128736, 128748, 128752, 128755, 128768, 128883, 128896, 128980, 129024, 129035, 129040, 129095, 129104, 129113, 129120, 129159, 129168, 129197, 131072, 173782, 173824, 177972, 177984, 178205, 194560, 195101, 917760, 917999]); + isNotPrint32 = new sliceType$4([12, 39, 59, 62, 926, 2057, 2102, 2134, 2564, 2580, 2584, 4285, 4405, 4626, 4868, 4905, 4913, 4916, 9327, 27231, 27482, 27490, 54357, 54429, 54445, 54458, 54460, 54468, 54534, 54549, 54557, 54586, 54591, 54597, 54609, 60932, 60960, 60963, 60968, 60979, 60984, 60986, 61000, 61002, 61004, 61008, 61011, 61016, 61018, 61020, 61022, 61024, 61027, 61035, 61043, 61048, 61053, 61055, 61066, 61092, 61098, 61632, 61648, 61743, 62719, 62842, 62884]); + shifts = $toNativeArray($kindUint, [0, 0, 1, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0]); + /* */ } return; } }; $init_strconv.$blocking = true; return $init_strconv; + }; + return $pkg; +})(); +$packages["reflect"] = (function() { + var $pkg = {}, js, math, runtime, strconv, sync, mapIter, Type, Kind, rtype, typeAlg, method, uncommonType, ChanDir, arrayType, chanType, funcType, imethod, interfaceType, mapType, ptrType, sliceType, structField, structType, Method, StructField, StructTag, fieldScan, Value, flag, ValueError, nonEmptyInterface, ptrType$1, sliceType$1, ptrType$3, arrayType$1, ptrType$4, ptrType$5, sliceType$2, sliceType$3, sliceType$4, sliceType$5, structType$5, sliceType$6, ptrType$6, arrayType$2, structType$6, ptrType$7, sliceType$7, ptrType$8, ptrType$9, ptrType$10, ptrType$11, sliceType$9, sliceType$10, ptrType$12, ptrType$17, sliceType$12, sliceType$13, funcType$2, funcType$3, funcType$4, arrayType$3, ptrType$20, initialized, stringPtrMap, jsObject, jsContainer, kindNames, uint8Type, init, jsType, reflectType, setKindType, newStringPtr, isWrapped, copyStruct, makeValue, MakeSlice, TypeOf, ValueOf, SliceOf, Zero, unsafe_New, makeInt, memmove, mapaccess, mapassign, mapdelete, mapiterinit, mapiterkey, mapiternext, maplen, cvtDirect, methodReceiver, valueInterface, ifaceE2I, methodName, makeMethodValue, wrapJsObject, unwrapJsObject, PtrTo, implements$1, directlyAssignable, haveIdenticalUnderlyingType, toType, ifaceIndir, overflowFloat32, New, convertOp, makeFloat, makeComplex, makeString, makeBytes, makeRunes, cvtInt, cvtUint, cvtFloatInt, cvtFloatUint, cvtIntFloat, cvtUintFloat, cvtFloat, cvtComplex, cvtIntString, cvtUintString, cvtBytesString, cvtStringBytes, cvtRunesString, cvtStringRunes, cvtT2I, cvtI2I; + js = $packages["github.com/gopherjs/gopherjs/js"]; + math = $packages["math"]; + runtime = $packages["runtime"]; + strconv = $packages["strconv"]; + sync = $packages["sync"]; + mapIter = $pkg.mapIter = $newType(0, $kindStruct, "reflect.mapIter", "mapIter", "reflect", function(t_, m_, keys_, i_) { + this.$val = this; + this.t = t_ !== undefined ? t_ : $ifaceNil; + this.m = m_ !== undefined ? m_ : null; + this.keys = keys_ !== undefined ? keys_ : null; + this.i = i_ !== undefined ? i_ : 0; + }); + Type = $pkg.Type = $newType(8, $kindInterface, "reflect.Type", "Type", "reflect", null); + Kind = $pkg.Kind = $newType(4, $kindUint, "reflect.Kind", "Kind", "reflect", null); + rtype = $pkg.rtype = $newType(0, $kindStruct, "reflect.rtype", "rtype", "reflect", function(size_, hash_, _$2_, align_, fieldAlign_, kind_, alg_, gc_, string_, uncommonType_, ptrToThis_, zero_) { + this.$val = this; + this.size = size_ !== undefined ? size_ : 0; + this.hash = hash_ !== undefined ? hash_ : 0; + this._$2 = _$2_ !== undefined ? _$2_ : 0; + this.align = align_ !== undefined ? align_ : 0; + this.fieldAlign = fieldAlign_ !== undefined ? fieldAlign_ : 0; + this.kind = kind_ !== undefined ? kind_ : 0; + this.alg = alg_ !== undefined ? alg_ : ptrType$3.nil; + this.gc = gc_ !== undefined ? gc_ : arrayType$1.zero(); + this.string = string_ !== undefined ? string_ : ptrType$4.nil; + this.uncommonType = uncommonType_ !== undefined ? uncommonType_ : ptrType$5.nil; + this.ptrToThis = ptrToThis_ !== undefined ? ptrToThis_ : ptrType$1.nil; + this.zero = zero_ !== undefined ? zero_ : 0; + }); + typeAlg = $pkg.typeAlg = $newType(0, $kindStruct, "reflect.typeAlg", "typeAlg", "reflect", function(hash_, equal_) { + this.$val = this; + this.hash = hash_ !== undefined ? hash_ : $throwNilPointerError; + this.equal = equal_ !== undefined ? equal_ : $throwNilPointerError; + }); + method = $pkg.method = $newType(0, $kindStruct, "reflect.method", "method", "reflect", function(name_, pkgPath_, mtyp_, typ_, ifn_, tfn_) { + this.$val = this; + this.name = name_ !== undefined ? name_ : ptrType$4.nil; + this.pkgPath = pkgPath_ !== undefined ? pkgPath_ : ptrType$4.nil; + this.mtyp = mtyp_ !== undefined ? mtyp_ : ptrType$1.nil; + this.typ = typ_ !== undefined ? typ_ : ptrType$1.nil; + this.ifn = ifn_ !== undefined ? ifn_ : 0; + this.tfn = tfn_ !== undefined ? tfn_ : 0; + }); + uncommonType = $pkg.uncommonType = $newType(0, $kindStruct, "reflect.uncommonType", "uncommonType", "reflect", function(name_, pkgPath_, methods_) { + this.$val = this; + this.name = name_ !== undefined ? name_ : ptrType$4.nil; + this.pkgPath = pkgPath_ !== undefined ? pkgPath_ : ptrType$4.nil; + this.methods = methods_ !== undefined ? methods_ : sliceType$2.nil; + }); + ChanDir = $pkg.ChanDir = $newType(4, $kindInt, "reflect.ChanDir", "ChanDir", "reflect", null); + arrayType = $pkg.arrayType = $newType(0, $kindStruct, "reflect.arrayType", "arrayType", "reflect", function(rtype_, elem_, slice_, len_) { + this.$val = this; + this.rtype = rtype_ !== undefined ? rtype_ : new rtype.ptr(); + this.elem = elem_ !== undefined ? elem_ : ptrType$1.nil; + this.slice = slice_ !== undefined ? slice_ : ptrType$1.nil; + this.len = len_ !== undefined ? len_ : 0; + }); + chanType = $pkg.chanType = $newType(0, $kindStruct, "reflect.chanType", "chanType", "reflect", function(rtype_, elem_, dir_) { + this.$val = this; + this.rtype = rtype_ !== undefined ? rtype_ : new rtype.ptr(); + this.elem = elem_ !== undefined ? elem_ : ptrType$1.nil; + this.dir = dir_ !== undefined ? dir_ : 0; + }); + funcType = $pkg.funcType = $newType(0, $kindStruct, "reflect.funcType", "funcType", "reflect", function(rtype_, dotdotdot_, in$2_, out_) { + this.$val = this; + this.rtype = rtype_ !== undefined ? rtype_ : new rtype.ptr(); + this.dotdotdot = dotdotdot_ !== undefined ? dotdotdot_ : false; + this.in$2 = in$2_ !== undefined ? in$2_ : sliceType$3.nil; + this.out = out_ !== undefined ? out_ : sliceType$3.nil; + }); + imethod = $pkg.imethod = $newType(0, $kindStruct, "reflect.imethod", "imethod", "reflect", function(name_, pkgPath_, typ_) { + this.$val = this; + this.name = name_ !== undefined ? name_ : ptrType$4.nil; + this.pkgPath = pkgPath_ !== undefined ? pkgPath_ : ptrType$4.nil; + this.typ = typ_ !== undefined ? typ_ : ptrType$1.nil; + }); + interfaceType = $pkg.interfaceType = $newType(0, $kindStruct, "reflect.interfaceType", "interfaceType", "reflect", function(rtype_, methods_) { + this.$val = this; + this.rtype = rtype_ !== undefined ? rtype_ : new rtype.ptr(); + this.methods = methods_ !== undefined ? methods_ : sliceType$4.nil; + }); + mapType = $pkg.mapType = $newType(0, $kindStruct, "reflect.mapType", "mapType", "reflect", function(rtype_, key_, elem_, bucket_, hmap_, keysize_, indirectkey_, valuesize_, indirectvalue_, bucketsize_) { + this.$val = this; + this.rtype = rtype_ !== undefined ? rtype_ : new rtype.ptr(); + this.key = key_ !== undefined ? key_ : ptrType$1.nil; + this.elem = elem_ !== undefined ? elem_ : ptrType$1.nil; + this.bucket = bucket_ !== undefined ? bucket_ : ptrType$1.nil; + this.hmap = hmap_ !== undefined ? hmap_ : ptrType$1.nil; + this.keysize = keysize_ !== undefined ? keysize_ : 0; + this.indirectkey = indirectkey_ !== undefined ? indirectkey_ : 0; + this.valuesize = valuesize_ !== undefined ? valuesize_ : 0; + this.indirectvalue = indirectvalue_ !== undefined ? indirectvalue_ : 0; + this.bucketsize = bucketsize_ !== undefined ? bucketsize_ : 0; + }); + ptrType = $pkg.ptrType = $newType(0, $kindStruct, "reflect.ptrType", "ptrType", "reflect", function(rtype_, elem_) { + this.$val = this; + this.rtype = rtype_ !== undefined ? rtype_ : new rtype.ptr(); + this.elem = elem_ !== undefined ? elem_ : ptrType$1.nil; + }); + sliceType = $pkg.sliceType = $newType(0, $kindStruct, "reflect.sliceType", "sliceType", "reflect", function(rtype_, elem_) { + this.$val = this; + this.rtype = rtype_ !== undefined ? rtype_ : new rtype.ptr(); + this.elem = elem_ !== undefined ? elem_ : ptrType$1.nil; + }); + structField = $pkg.structField = $newType(0, $kindStruct, "reflect.structField", "structField", "reflect", function(name_, pkgPath_, typ_, tag_, offset_) { + this.$val = this; + this.name = name_ !== undefined ? name_ : ptrType$4.nil; + this.pkgPath = pkgPath_ !== undefined ? pkgPath_ : ptrType$4.nil; + this.typ = typ_ !== undefined ? typ_ : ptrType$1.nil; + this.tag = tag_ !== undefined ? tag_ : ptrType$4.nil; + this.offset = offset_ !== undefined ? offset_ : 0; + }); + structType = $pkg.structType = $newType(0, $kindStruct, "reflect.structType", "structType", "reflect", function(rtype_, fields_) { + this.$val = this; + this.rtype = rtype_ !== undefined ? rtype_ : new rtype.ptr(); + this.fields = fields_ !== undefined ? fields_ : sliceType$5.nil; + }); + Method = $pkg.Method = $newType(0, $kindStruct, "reflect.Method", "Method", "reflect", function(Name_, PkgPath_, Type_, Func_, Index_) { + this.$val = this; + this.Name = Name_ !== undefined ? Name_ : ""; + this.PkgPath = PkgPath_ !== undefined ? PkgPath_ : ""; + this.Type = Type_ !== undefined ? Type_ : $ifaceNil; + this.Func = Func_ !== undefined ? Func_ : new Value.ptr(); + this.Index = Index_ !== undefined ? Index_ : 0; + }); + StructField = $pkg.StructField = $newType(0, $kindStruct, "reflect.StructField", "StructField", "reflect", function(Name_, PkgPath_, Type_, Tag_, Offset_, Index_, Anonymous_) { + this.$val = this; + this.Name = Name_ !== undefined ? Name_ : ""; + this.PkgPath = PkgPath_ !== undefined ? PkgPath_ : ""; + this.Type = Type_ !== undefined ? Type_ : $ifaceNil; + this.Tag = Tag_ !== undefined ? Tag_ : ""; + this.Offset = Offset_ !== undefined ? Offset_ : 0; + this.Index = Index_ !== undefined ? Index_ : sliceType$9.nil; + this.Anonymous = Anonymous_ !== undefined ? Anonymous_ : false; + }); + StructTag = $pkg.StructTag = $newType(8, $kindString, "reflect.StructTag", "StructTag", "reflect", null); + fieldScan = $pkg.fieldScan = $newType(0, $kindStruct, "reflect.fieldScan", "fieldScan", "reflect", function(typ_, index_) { + this.$val = this; + this.typ = typ_ !== undefined ? typ_ : ptrType$12.nil; + this.index = index_ !== undefined ? index_ : sliceType$9.nil; + }); + Value = $pkg.Value = $newType(0, $kindStruct, "reflect.Value", "Value", "reflect", function(typ_, ptr_, flag_) { + this.$val = this; + this.typ = typ_ !== undefined ? typ_ : ptrType$1.nil; + this.ptr = ptr_ !== undefined ? ptr_ : 0; + this.flag = flag_ !== undefined ? flag_ : 0; + }); + flag = $pkg.flag = $newType(4, $kindUintptr, "reflect.flag", "flag", "reflect", null); + ValueError = $pkg.ValueError = $newType(0, $kindStruct, "reflect.ValueError", "ValueError", "reflect", function(Method_, Kind_) { + this.$val = this; + this.Method = Method_ !== undefined ? Method_ : ""; + this.Kind = Kind_ !== undefined ? Kind_ : 0; + }); + nonEmptyInterface = $pkg.nonEmptyInterface = $newType(0, $kindStruct, "reflect.nonEmptyInterface", "nonEmptyInterface", "reflect", function(itab_, word_) { + this.$val = this; + this.itab = itab_ !== undefined ? itab_ : ptrType$7.nil; + this.word = word_ !== undefined ? word_ : 0; + }); + ptrType$1 = $ptrType(rtype); + sliceType$1 = $sliceType($String); + ptrType$3 = $ptrType(typeAlg); + arrayType$1 = $arrayType($UnsafePointer, 2); + ptrType$4 = $ptrType($String); + ptrType$5 = $ptrType(uncommonType); + sliceType$2 = $sliceType(method); + sliceType$3 = $sliceType(ptrType$1); + sliceType$4 = $sliceType(imethod); + sliceType$5 = $sliceType(structField); + structType$5 = $structType([{prop: "str", name: "str", pkg: "reflect", typ: $String, tag: ""}]); + sliceType$6 = $sliceType(Value); + ptrType$6 = $ptrType(nonEmptyInterface); + arrayType$2 = $arrayType($UnsafePointer, 100000); + structType$6 = $structType([{prop: "ityp", name: "ityp", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "typ", name: "typ", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "link", name: "link", pkg: "reflect", typ: $UnsafePointer, tag: ""}, {prop: "bad", name: "bad", pkg: "reflect", typ: $Int32, tag: ""}, {prop: "unused", name: "unused", pkg: "reflect", typ: $Int32, tag: ""}, {prop: "fun", name: "fun", pkg: "reflect", typ: arrayType$2, tag: ""}]); + ptrType$7 = $ptrType(structType$6); + sliceType$7 = $sliceType(js.Object); + ptrType$8 = $ptrType($Uint8); + ptrType$9 = $ptrType(method); + ptrType$10 = $ptrType(interfaceType); + ptrType$11 = $ptrType(imethod); + sliceType$9 = $sliceType($Int); + sliceType$10 = $sliceType(fieldScan); + ptrType$12 = $ptrType(structType); + ptrType$17 = $ptrType($UnsafePointer); + sliceType$12 = $sliceType($Uint8); + sliceType$13 = $sliceType($Int32); + funcType$2 = $funcType([$String], [$Bool], false); + funcType$3 = $funcType([$UnsafePointer, $Uintptr, $Uintptr], [$Uintptr], false); + funcType$4 = $funcType([$UnsafePointer, $UnsafePointer, $Uintptr], [$Bool], false); + arrayType$3 = $arrayType($Uintptr, 2); + ptrType$20 = $ptrType(ValueError); + init = function() { + var used, x, x$1, x$10, x$11, x$12, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + used = (function(i) { + var i; + }); + used((x = new rtype.ptr(0, 0, 0, 0, 0, 0, ptrType$3.nil, arrayType$1.zero(), ptrType$4.nil, ptrType$5.nil, ptrType$1.nil, 0), new x.constructor.elem(x))); + used((x$1 = new uncommonType.ptr(ptrType$4.nil, ptrType$4.nil, sliceType$2.nil), new x$1.constructor.elem(x$1))); + used((x$2 = new method.ptr(ptrType$4.nil, ptrType$4.nil, ptrType$1.nil, ptrType$1.nil, 0, 0), new x$2.constructor.elem(x$2))); + used((x$3 = new arrayType.ptr(new rtype.ptr(), ptrType$1.nil, ptrType$1.nil, 0), new x$3.constructor.elem(x$3))); + used((x$4 = new chanType.ptr(new rtype.ptr(), ptrType$1.nil, 0), new x$4.constructor.elem(x$4))); + used((x$5 = new funcType.ptr(new rtype.ptr(), false, sliceType$3.nil, sliceType$3.nil), new x$5.constructor.elem(x$5))); + used((x$6 = new interfaceType.ptr(new rtype.ptr(), sliceType$4.nil), new x$6.constructor.elem(x$6))); + used((x$7 = new mapType.ptr(new rtype.ptr(), ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, 0, 0, 0, 0, 0), new x$7.constructor.elem(x$7))); + used((x$8 = new ptrType.ptr(new rtype.ptr(), ptrType$1.nil), new x$8.constructor.elem(x$8))); + used((x$9 = new sliceType.ptr(new rtype.ptr(), ptrType$1.nil), new x$9.constructor.elem(x$9))); + used((x$10 = new structType.ptr(new rtype.ptr(), sliceType$5.nil), new x$10.constructor.elem(x$10))); + used((x$11 = new imethod.ptr(ptrType$4.nil, ptrType$4.nil, ptrType$1.nil), new x$11.constructor.elem(x$11))); + used((x$12 = new structField.ptr(ptrType$4.nil, ptrType$4.nil, ptrType$1.nil, ptrType$4.nil, 0), new x$12.constructor.elem(x$12))); + initialized = true; + uint8Type = $assertType(TypeOf(new $Uint8(0)), ptrType$1); + }; + jsType = function(typ) { + var typ; + return typ.jsType; + }; + reflectType = function(typ) { + var _i, _i$1, _i$2, _i$3, _i$4, _ref, _ref$1, _ref$2, _ref$3, _ref$4, _ref$5, dir, f, fields, i, i$1, i$2, i$3, i$4, imethods, in$1, m, m$1, methodSet, methods, out, params, reflectFields, reflectMethods, results, rt, t, typ; + if (typ.reflectType === undefined) { + rt = new rtype.ptr((($parseInt(typ.size) >> 0) >>> 0), 0, 0, 0, 0, (($parseInt(typ.kind) >> 0) << 24 >>> 24), ptrType$3.nil, arrayType$1.zero(), newStringPtr(typ.string), ptrType$5.nil, ptrType$1.nil, 0); + rt.jsType = typ; + typ.reflectType = rt; + methodSet = $methodSet(typ); + if (!($internalize(typ.typeName, $String) === "") || !(($parseInt(methodSet.length) === 0))) { + reflectMethods = $makeSlice(sliceType$2, $parseInt(methodSet.length)); + _ref = reflectMethods; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + m = methodSet[i]; + t = m.typ; + $copy(((i < 0 || i >= reflectMethods.$length) ? $throwRuntimeError("index out of range") : reflectMethods.$array[reflectMethods.$offset + i]), new method.ptr(newStringPtr(m.name), newStringPtr(m.pkg), reflectType(t), reflectType($funcType(new ($global.Array)(typ).concat(t.params), t.results, t.variadic)), 0, 0), method); + _i++; + } + rt.uncommonType = new uncommonType.ptr(newStringPtr(typ.typeName), newStringPtr(typ.pkg), reflectMethods); + rt.uncommonType.jsType = typ; + } + _ref$1 = rt.Kind(); + if (_ref$1 === 17) { + setKindType(rt, new arrayType.ptr(new rtype.ptr(), reflectType(typ.elem), ptrType$1.nil, (($parseInt(typ.len) >> 0) >>> 0))); + } else if (_ref$1 === 18) { + dir = 3; + if (!!(typ.sendOnly)) { + dir = 2; + } + if (!!(typ.recvOnly)) { + dir = 1; + } + setKindType(rt, new chanType.ptr(new rtype.ptr(), reflectType(typ.elem), (dir >>> 0))); + } else if (_ref$1 === 19) { + params = typ.params; + in$1 = $makeSlice(sliceType$3, $parseInt(params.length)); + _ref$2 = in$1; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$2.$length)) { break; } + i$1 = _i$1; + (i$1 < 0 || i$1 >= in$1.$length) ? $throwRuntimeError("index out of range") : in$1.$array[in$1.$offset + i$1] = reflectType(params[i$1]); + _i$1++; + } + results = typ.results; + out = $makeSlice(sliceType$3, $parseInt(results.length)); + _ref$3 = out; + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$3.$length)) { break; } + i$2 = _i$2; + (i$2 < 0 || i$2 >= out.$length) ? $throwRuntimeError("index out of range") : out.$array[out.$offset + i$2] = reflectType(results[i$2]); + _i$2++; + } + setKindType(rt, new funcType.ptr($clone(rt, rtype), !!(typ.variadic), in$1, out)); + } else if (_ref$1 === 20) { + methods = typ.methods; + imethods = $makeSlice(sliceType$4, $parseInt(methods.length)); + _ref$4 = imethods; + _i$3 = 0; + while (true) { + if (!(_i$3 < _ref$4.$length)) { break; } + i$3 = _i$3; + m$1 = methods[i$3]; + $copy(((i$3 < 0 || i$3 >= imethods.$length) ? $throwRuntimeError("index out of range") : imethods.$array[imethods.$offset + i$3]), new imethod.ptr(newStringPtr(m$1.name), newStringPtr(m$1.pkg), reflectType(m$1.typ)), imethod); + _i$3++; + } + setKindType(rt, new interfaceType.ptr($clone(rt, rtype), imethods)); + } else if (_ref$1 === 21) { + setKindType(rt, new mapType.ptr(new rtype.ptr(), reflectType(typ.key), reflectType(typ.elem), ptrType$1.nil, ptrType$1.nil, 0, 0, 0, 0, 0)); + } else if (_ref$1 === 22) { + setKindType(rt, new ptrType.ptr(new rtype.ptr(), reflectType(typ.elem))); + } else if (_ref$1 === 23) { + setKindType(rt, new sliceType.ptr(new rtype.ptr(), reflectType(typ.elem))); + } else if (_ref$1 === 25) { + fields = typ.fields; + reflectFields = $makeSlice(sliceType$5, $parseInt(fields.length)); + _ref$5 = reflectFields; + _i$4 = 0; + while (true) { + if (!(_i$4 < _ref$5.$length)) { break; } + i$4 = _i$4; + f = fields[i$4]; + $copy(((i$4 < 0 || i$4 >= reflectFields.$length) ? $throwRuntimeError("index out of range") : reflectFields.$array[reflectFields.$offset + i$4]), new structField.ptr(newStringPtr(f.name), newStringPtr(f.pkg), reflectType(f.typ), newStringPtr(f.tag), (i$4 >>> 0)), structField); + _i$4++; + } + setKindType(rt, new structType.ptr($clone(rt, rtype), reflectFields)); + } + } + return typ.reflectType; + }; + setKindType = function(rt, kindType) { + var kindType, rt; + rt.kindType = kindType; + kindType.rtype = rt; + }; + newStringPtr = function(strObj) { + var _entry, _key, _tuple, c, ok, ptr, str, strObj; + c = $clone(new structType$5.ptr(), structType$5); + c.str = strObj; + str = c.str; + if (str === "") { + return ptrType$4.nil; + } + _tuple = (_entry = stringPtrMap[str], _entry !== undefined ? [_entry.v, true] : [ptrType$4.nil, false]); ptr = _tuple[0]; ok = _tuple[1]; + if (!ok) { + ptr = new ptrType$4(function() { return str; }, function($v) { str = $v; }); + _key = str; (stringPtrMap || $throwRuntimeError("assignment to entry in nil map"))[_key] = { k: _key, v: ptr }; + } + return ptr; + }; + isWrapped = function(typ) { + var _ref, typ; + _ref = typ.Kind(); + if (_ref === 1 || _ref === 2 || _ref === 3 || _ref === 4 || _ref === 5 || _ref === 7 || _ref === 8 || _ref === 9 || _ref === 10 || _ref === 12 || _ref === 13 || _ref === 14 || _ref === 17 || _ref === 21 || _ref === 19 || _ref === 24 || _ref === 25) { + return true; + } else if (_ref === 22) { + return typ.Elem().Kind() === 17; + } + return false; + }; + copyStruct = function(dst, src, typ) { + var dst, fields, i, prop, src, typ; + fields = jsType(typ).fields; + i = 0; + while (true) { + if (!(i < $parseInt(fields.length))) { break; } + prop = $internalize(fields[i].prop, $String); + dst[$externalize(prop, $String)] = src[$externalize(prop, $String)]; + i = i + (1) >> 0; + } + }; + makeValue = function(t, v, fl) { + var fl, rt, t, v; + rt = t.common(); + if ((t.Kind() === 17) || (t.Kind() === 25) || (t.Kind() === 22)) { + return new Value.ptr(rt, v, (fl | (t.Kind() >>> 0)) >>> 0); + } + return new Value.ptr(rt, $newDataPointer(v, jsType(rt.ptrTo())), (((fl | (t.Kind() >>> 0)) >>> 0) | 64) >>> 0); + }; + MakeSlice = $pkg.MakeSlice = function(typ, len, cap) { + var cap, len, typ; + if (!((typ.Kind() === 23))) { + $panic(new $String("reflect.MakeSlice of non-slice type")); + } + if (len < 0) { + $panic(new $String("reflect.MakeSlice: negative len")); + } + if (cap < 0) { + $panic(new $String("reflect.MakeSlice: negative cap")); + } + if (len > cap) { + $panic(new $String("reflect.MakeSlice: len > cap")); + } + return makeValue(typ, $makeSlice(jsType(typ), len, cap, (function() { + return jsType(typ.Elem()).zero(); + })), 0); + }; + TypeOf = $pkg.TypeOf = function(i) { + var i; + if (!initialized) { + return new rtype.ptr(0, 0, 0, 0, 0, 0, ptrType$3.nil, arrayType$1.zero(), ptrType$4.nil, ptrType$5.nil, ptrType$1.nil, 0); + } + if ($interfaceIsEqual(i, $ifaceNil)) { + return $ifaceNil; + } + return reflectType(i.constructor); + }; + ValueOf = $pkg.ValueOf = function(i) { + var i; + if ($interfaceIsEqual(i, $ifaceNil)) { + return new Value.ptr(ptrType$1.nil, 0, 0); + } + return makeValue(reflectType(i.constructor), i.$val, 0); + }; + rtype.ptr.prototype.ptrTo = function() { + var t; + t = this; + return reflectType($ptrType(jsType(t))); + }; + rtype.prototype.ptrTo = function() { return this.$val.ptrTo(); }; + SliceOf = $pkg.SliceOf = function(t) { + var t; + return reflectType($sliceType(jsType(t))); + }; + Zero = $pkg.Zero = function(typ) { + var typ; + return makeValue(typ, jsType(typ).zero(), 0); + }; + unsafe_New = function(typ) { + var _ref, typ; + _ref = typ.Kind(); + if (_ref === 25) { + return new (jsType(typ).ptr)(); + } else if (_ref === 17) { + return jsType(typ).zero(); + } else { + return $newDataPointer(jsType(typ).zero(), jsType(typ.ptrTo())); + } + }; + makeInt = function(f, bits, t) { + var _ref, bits, f, ptr, t, typ; + typ = t.common(); + ptr = unsafe_New(typ); + _ref = typ.Kind(); + if (_ref === 3) { + ptr.$set((bits.$low << 24 >> 24)); + } else if (_ref === 4) { + ptr.$set((bits.$low << 16 >> 16)); + } else if (_ref === 2 || _ref === 5) { + ptr.$set((bits.$low >> 0)); + } else if (_ref === 6) { + ptr.$set(new $Int64(bits.$high, bits.$low)); + } else if (_ref === 8) { + ptr.$set((bits.$low << 24 >>> 24)); + } else if (_ref === 9) { + ptr.$set((bits.$low << 16 >>> 16)); + } else if (_ref === 7 || _ref === 10 || _ref === 12) { + ptr.$set((bits.$low >>> 0)); + } else if (_ref === 11) { + ptr.$set(bits); + } + return new Value.ptr(typ, ptr, (((f | 64) >>> 0) | (typ.Kind() >>> 0)) >>> 0); + }; + memmove = function(adst, asrc, n) { + var adst, asrc, n; + adst.$set(asrc.$get()); + }; + mapaccess = function(t, m, key) { + var entry, k, key, m, t; + k = key.$get(); + if (!(k.$key === undefined)) { + k = k.$key(); + } + entry = m[$externalize($internalize(k, $String), $String)]; + if (entry === undefined) { + return 0; + } + return $newDataPointer(entry.v, jsType(PtrTo(t.Elem()))); + }; + mapassign = function(t, m, key, val) { + var entry, et, jsVal, k, key, kv, m, newVal, t, val; + kv = key.$get(); + k = kv; + if (!(k.$key === undefined)) { + k = k.$key(); + } + jsVal = val.$get(); + et = t.Elem(); + if (et.Kind() === 25) { + newVal = jsType(et).zero(); + copyStruct(newVal, jsVal, et); + jsVal = newVal; + } + entry = new ($global.Object)(); + entry.k = kv; + entry.v = jsVal; + m[$externalize($internalize(k, $String), $String)] = entry; + }; + mapdelete = function(t, m, key) { + var k, key, m, t; + k = key.$get(); + if (!(k.$key === undefined)) { + k = k.$key(); + } + delete m[$externalize($internalize(k, $String), $String)]; + }; + mapiterinit = function(t, m) { + var m, t; + return new mapIter.ptr(t, m, $keys(m), 0); + }; + mapiterkey = function(it) { + var it, iter, k; + iter = it; + k = iter.keys[iter.i]; + return $newDataPointer(iter.m[$externalize($internalize(k, $String), $String)].k, jsType(PtrTo(iter.t.Key()))); + }; + mapiternext = function(it) { + var it, iter; + iter = it; + iter.i = iter.i + (1) >> 0; + }; + maplen = function(m) { + var m; + return $parseInt($keys(m).length); + }; + cvtDirect = function(v, typ) { + var _ref, k, slice, srcVal, typ, v, val; + v = v; + srcVal = v.object(); + if (srcVal === jsType(v.typ).nil) { + return makeValue(typ, jsType(typ).nil, v.flag); + } + val = null; + k = typ.Kind(); + _ref = k; + switch (0) { default: if (_ref === 18) { + val = new (jsType(typ))(); + } else if (_ref === 23) { + slice = new (jsType(typ))(srcVal.$array); + slice.$offset = srcVal.$offset; + slice.$length = srcVal.$length; + slice.$capacity = srcVal.$capacity; + val = $newDataPointer(slice, jsType(PtrTo(typ))); + } else if (_ref === 22) { + if (typ.Elem().Kind() === 25) { + if ($interfaceIsEqual(typ.Elem(), v.typ.Elem())) { + val = srcVal; + break; + } + val = new (jsType(typ))(); + copyStruct(val, srcVal, typ.Elem()); + break; + } + val = new (jsType(typ))(srcVal.$get, srcVal.$set); + } else if (_ref === 25) { + val = new (jsType(typ).ptr)(); + copyStruct(val, srcVal, typ); + } else if (_ref === 17 || _ref === 19 || _ref === 20 || _ref === 21 || _ref === 24) { + val = v.ptr; + } else { + $panic(new ValueError.ptr("reflect.Convert", k)); + } } + return new Value.ptr(typ.common(), val, (((v.flag & 96) >>> 0) | (typ.Kind() >>> 0)) >>> 0); + }; + methodReceiver = function(op, v, i) { + var fn = 0, i, iface, m, m$1, op, prop, rcvr, rcvrtype = ptrType$1.nil, t = ptrType$1.nil, tt, ut, v, x, x$1; + v = v; + prop = ""; + if (v.typ.Kind() === 20) { + tt = v.typ.kindType; + if (i < 0 || i >= tt.methods.$length) { + $panic(new $String("reflect: internal error: invalid method index")); + } + m = (x = tt.methods, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + if (!($pointerIsEqual(m.pkgPath, ptrType$4.nil))) { + $panic(new $String("reflect: " + op + " of unexported method")); + } + iface = $pointerOfStructConversion(v.ptr, ptrType$6); + if (iface.itab === ptrType$7.nil) { + $panic(new $String("reflect: " + op + " of method on nil interface value")); + } + t = m.typ; + prop = m.name.$get(); + } else { + ut = v.typ.uncommonType.uncommon(); + if (ut === ptrType$5.nil || i < 0 || i >= ut.methods.$length) { + $panic(new $String("reflect: internal error: invalid method index")); + } + m$1 = (x$1 = ut.methods, ((i < 0 || i >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + i])); + if (!($pointerIsEqual(m$1.pkgPath, ptrType$4.nil))) { + $panic(new $String("reflect: " + op + " of unexported method")); + } + t = m$1.mtyp; + prop = $internalize($methodSet(jsType(v.typ))[i].prop, $String); + } + rcvr = v.object(); + if (isWrapped(v.typ)) { + rcvr = new (jsType(v.typ))(rcvr); + } + fn = rcvr[$externalize(prop, $String)]; + return [rcvrtype, t, fn]; + }; + valueInterface = function(v, safe) { + var safe, v; + v = v; + if (v.flag === 0) { + $panic(new ValueError.ptr("reflect.Value.Interface", 0)); + } + if (safe && !((((v.flag & 32) >>> 0) === 0))) { + $panic(new $String("reflect.Value.Interface: cannot return value obtained from unexported field or method")); + } + if (!((((v.flag & 256) >>> 0) === 0))) { + v = makeMethodValue("Interface", v); + } + if (isWrapped(v.typ)) { + return new (jsType(v.typ))(v.object()); + } + return v.object(); + }; + ifaceE2I = function(t, src, dst) { + var dst, src, t; + dst.$set(src); + }; + methodName = function() { + return "?FIXME?"; + }; + makeMethodValue = function(op, v) { + var _tuple, fn, fv, op, rcvr, v; + v = v; + if (((v.flag & 256) >>> 0) === 0) { + $panic(new $String("reflect: internal error: invalid use of makePartialFunc")); + } + _tuple = methodReceiver(op, v, (v.flag >> 0) >> 9 >> 0); fn = _tuple[2]; + rcvr = v.object(); + if (isWrapped(v.typ)) { + rcvr = new (jsType(v.typ))(rcvr); + } + fv = (function() { + return fn.apply(rcvr, $externalize(new ($sliceType(js.Object))($global.Array.prototype.slice.call(arguments, [])), sliceType$7)); + }); + return new Value.ptr(v.Type().common(), fv, (((v.flag & 32) >>> 0) | 19) >>> 0); + }; + rtype.ptr.prototype.pointers = function() { + var _ref, t; + t = this; + _ref = t.Kind(); + if (_ref === 22 || _ref === 21 || _ref === 18 || _ref === 19 || _ref === 25 || _ref === 17) { + return true; + } else { + return false; + } + }; + rtype.prototype.pointers = function() { return this.$val.pointers(); }; + rtype.ptr.prototype.Comparable = function() { + var _ref, i, t; + t = this; + _ref = t.Kind(); + if (_ref === 19 || _ref === 23 || _ref === 21) { + return false; + } else if (_ref === 17) { + return t.Elem().Comparable(); + } else if (_ref === 25) { + i = 0; + while (true) { + if (!(i < t.NumField())) { break; } + if (!t.Field(i).Type.Comparable()) { + return false; + } + i = i + (1) >> 0; + } + } + return true; + }; + rtype.prototype.Comparable = function() { return this.$val.Comparable(); }; + uncommonType.ptr.prototype.Method = function(i) { + var fl, fn, i, m = new Method.ptr(), mt, p, prop, t, x; + t = this; + if (t === ptrType$5.nil || i < 0 || i >= t.methods.$length) { + $panic(new $String("reflect: Method index out of range")); + } + p = (x = t.methods, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + if (!($pointerIsEqual(p.name, ptrType$4.nil))) { + m.Name = p.name.$get(); + } + fl = 19; + if (!($pointerIsEqual(p.pkgPath, ptrType$4.nil))) { + m.PkgPath = p.pkgPath.$get(); + fl = (fl | (32)) >>> 0; + } + mt = p.typ; + m.Type = mt; + prop = $internalize($methodSet(t.jsType)[i].prop, $String); + fn = (function(rcvr) { + var rcvr; + return rcvr[$externalize(prop, $String)].apply(rcvr, $externalize($subslice(new ($sliceType(js.Object))($global.Array.prototype.slice.call(arguments, [])), 1), sliceType$7)); + }); + m.Func = new Value.ptr(mt, fn, fl); + m.Index = i; + return m; + }; + uncommonType.prototype.Method = function(i) { return this.$val.Method(i); }; + Value.ptr.prototype.object = function() { + var _ref, newVal, v, val; + v = this; + if ((v.typ.Kind() === 17) || (v.typ.Kind() === 25)) { + return v.ptr; + } + if (!((((v.flag & 64) >>> 0) === 0))) { + val = v.ptr.$get(); + if (!(val === $ifaceNil) && !(val.constructor === jsType(v.typ))) { + _ref = v.typ.Kind(); + switch (0) { default: if (_ref === 11 || _ref === 6) { + val = new (jsType(v.typ))(val.$high, val.$low); + } else if (_ref === 15 || _ref === 16) { + val = new (jsType(v.typ))(val.$real, val.$imag); + } else if (_ref === 23) { + if (val === val.constructor.nil) { + val = jsType(v.typ).nil; + break; + } + newVal = new (jsType(v.typ))(val.$array); + newVal.$offset = val.$offset; + newVal.$length = val.$length; + newVal.$capacity = val.$capacity; + val = newVal; + } } + } + return val; + } + return v.ptr; + }; + Value.prototype.object = function() { return this.$val.object(); }; + Value.ptr.prototype.call = function(op, in$1) { + var _i, _i$1, _i$2, _ref, _ref$1, _ref$2, _ref$3, _tmp, _tmp$1, _tuple, arg, argsArray, elem, fn, i, i$1, i$2, i$3, in$1, isSlice, m, n, nin, nout, op, origIn, rcvr, results, ret, slice, t, targ, v, x, x$1, x$2, xt, xt$1; + v = this; + t = v.typ; + fn = 0; + rcvr = null; + if (!((((v.flag & 256) >>> 0) === 0))) { + _tuple = methodReceiver(op, v, (v.flag >> 0) >> 9 >> 0); t = _tuple[1]; fn = _tuple[2]; + rcvr = v.object(); + if (isWrapped(v.typ)) { + rcvr = new (jsType(v.typ))(rcvr); + } + } else { + fn = v.object(); + } + if (fn === 0) { + $panic(new $String("reflect.Value.Call: call of nil function")); + } + isSlice = op === "CallSlice"; + n = t.NumIn(); + if (isSlice) { + if (!t.IsVariadic()) { + $panic(new $String("reflect: CallSlice of non-variadic function")); + } + if (in$1.$length < n) { + $panic(new $String("reflect: CallSlice with too few input arguments")); + } + if (in$1.$length > n) { + $panic(new $String("reflect: CallSlice with too many input arguments")); + } + } else { + if (t.IsVariadic()) { + n = n - (1) >> 0; + } + if (in$1.$length < n) { + $panic(new $String("reflect: Call with too few input arguments")); + } + if (!t.IsVariadic() && in$1.$length > n) { + $panic(new $String("reflect: Call with too many input arguments")); + } + } + _ref = in$1; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + x = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (x.Kind() === 0) { + $panic(new $String("reflect: " + op + " using zero Value argument")); + } + _i++; + } + i = 0; + while (true) { + if (!(i < n)) { break; } + _tmp = ((i < 0 || i >= in$1.$length) ? $throwRuntimeError("index out of range") : in$1.$array[in$1.$offset + i]).Type(); _tmp$1 = t.In(i); xt = _tmp; targ = _tmp$1; + if (!xt.AssignableTo(targ)) { + $panic(new $String("reflect: " + op + " using " + xt.String() + " as type " + targ.String())); + } + i = i + (1) >> 0; + } + if (!isSlice && t.IsVariadic()) { + m = in$1.$length - n >> 0; + slice = MakeSlice(t.In(n), m, m); + elem = t.In(n).Elem(); + i$1 = 0; + while (true) { + if (!(i$1 < m)) { break; } + x$2 = (x$1 = n + i$1 >> 0, ((x$1 < 0 || x$1 >= in$1.$length) ? $throwRuntimeError("index out of range") : in$1.$array[in$1.$offset + x$1])); + xt$1 = x$2.Type(); + if (!xt$1.AssignableTo(elem)) { + $panic(new $String("reflect: cannot use " + xt$1.String() + " as type " + elem.String() + " in " + op)); + } + slice.Index(i$1).Set(x$2); + i$1 = i$1 + (1) >> 0; + } + origIn = in$1; + in$1 = $makeSlice(sliceType$6, (n + 1 >> 0)); + $copySlice($subslice(in$1, 0, n), origIn); + (n < 0 || n >= in$1.$length) ? $throwRuntimeError("index out of range") : in$1.$array[in$1.$offset + n] = slice; + } + nin = in$1.$length; + if (!((nin === t.NumIn()))) { + $panic(new $String("reflect.Value.Call: wrong argument count")); + } + nout = t.NumOut(); + argsArray = new ($global.Array)(t.NumIn()); + _ref$1 = in$1; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i$2 = _i$1; + arg = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i$1]); + argsArray[i$2] = unwrapJsObject(t.In(i$2), arg.assignTo("reflect.Value.Call", t.In(i$2).common(), 0).object()); + _i$1++; + } + results = fn.apply(rcvr, argsArray); + _ref$2 = nout; + if (_ref$2 === 0) { + return sliceType$6.nil; + } else if (_ref$2 === 1) { + return new sliceType$6([$clone(makeValue(t.Out(0), wrapJsObject(t.Out(0), results), 0), Value)]); + } else { + ret = $makeSlice(sliceType$6, nout); + _ref$3 = ret; + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$3.$length)) { break; } + i$3 = _i$2; + (i$3 < 0 || i$3 >= ret.$length) ? $throwRuntimeError("index out of range") : ret.$array[ret.$offset + i$3] = makeValue(t.Out(i$3), wrapJsObject(t.Out(i$3), results[i$3]), 0); + _i$2++; + } + return ret; + } + }; + Value.prototype.call = function(op, in$1) { return this.$val.call(op, in$1); }; + Value.ptr.prototype.Cap = function() { + var _ref, k, v; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 17) { + return v.typ.Len(); + } else if (_ref === 18 || _ref === 23) { + return $parseInt(v.object().$capacity) >> 0; + } + $panic(new ValueError.ptr("reflect.Value.Cap", k)); + }; + Value.prototype.Cap = function() { return this.$val.Cap(); }; + wrapJsObject = function(typ, val) { + var typ, val; + if ($interfaceIsEqual(typ, reflectType(jsObject))) { + return new (jsContainer)(val); + } + return val; + }; + unwrapJsObject = function(typ, val) { + var typ, val; + if ($interfaceIsEqual(typ, reflectType(jsObject))) { + return val.Object; + } + return val; + }; + Value.ptr.prototype.Elem = function() { + var _ref, fl, k, tt, typ, v, val, val$1; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 20) { + val = v.object(); + if (val === $ifaceNil) { + return new Value.ptr(ptrType$1.nil, 0, 0); + } + typ = reflectType(val.constructor); + return makeValue(typ, val.$val, (v.flag & 32) >>> 0); + } else if (_ref === 22) { + if (v.IsNil()) { + return new Value.ptr(ptrType$1.nil, 0, 0); + } + val$1 = v.object(); + tt = v.typ.kindType; + fl = (((((v.flag & 32) >>> 0) | 64) >>> 0) | 128) >>> 0; + fl = (fl | ((tt.elem.Kind() >>> 0))) >>> 0; + return new Value.ptr(tt.elem, wrapJsObject(tt.elem, val$1), fl); + } else { + $panic(new ValueError.ptr("reflect.Value.Elem", k)); + } + }; + Value.prototype.Elem = function() { return this.$val.Elem(); }; + Value.ptr.prototype.Field = function(i) { + var field, fl, i, prop, s, tt, typ, v, x; + v = this; + new flag(v.flag).mustBe(25); + tt = v.typ.kindType; + if (i < 0 || i >= tt.fields.$length) { + $panic(new $String("reflect: Field index out of range")); + } + field = (x = tt.fields, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + prop = $internalize(jsType(v.typ).fields[i].prop, $String); + typ = field.typ; + fl = (v.flag & 224) >>> 0; + if (!($pointerIsEqual(field.pkgPath, ptrType$4.nil))) { + fl = (fl | (32)) >>> 0; + } + fl = (fl | ((typ.Kind() >>> 0))) >>> 0; + s = v.ptr; + if (!((((fl & 64) >>> 0) === 0)) && !((typ.Kind() === 17)) && !((typ.Kind() === 25))) { + return new Value.ptr(typ, new (jsType(PtrTo(typ)))((function() { + return wrapJsObject(typ, s[$externalize(prop, $String)]); + }), (function(v$1) { + var v$1; + s[$externalize(prop, $String)] = unwrapJsObject(typ, v$1); + })), fl); + } + return makeValue(typ, wrapJsObject(typ, s[$externalize(prop, $String)]), fl); + }; + Value.prototype.Field = function(i) { return this.$val.Field(i); }; + Value.ptr.prototype.Index = function(i) { + var _ref, a, a$1, c, fl, fl$1, fl$2, i, k, s, str, tt, tt$1, typ, typ$1, v; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 17) { + tt = v.typ.kindType; + if (i < 0 || i > (tt.len >> 0)) { + $panic(new $String("reflect: array index out of range")); + } + typ = tt.elem; + fl = (v.flag & 224) >>> 0; + fl = (fl | ((typ.Kind() >>> 0))) >>> 0; + a = v.ptr; + if (!((((fl & 64) >>> 0) === 0)) && !((typ.Kind() === 17)) && !((typ.Kind() === 25))) { + return new Value.ptr(typ, new (jsType(PtrTo(typ)))((function() { + return wrapJsObject(typ, a[i]); + }), (function(v$1) { + var v$1; + a[i] = unwrapJsObject(typ, v$1); + })), fl); + } + return makeValue(typ, wrapJsObject(typ, a[i]), fl); + } else if (_ref === 23) { + s = v.object(); + if (i < 0 || i >= ($parseInt(s.$length) >> 0)) { + $panic(new $String("reflect: slice index out of range")); + } + tt$1 = v.typ.kindType; + typ$1 = tt$1.elem; + fl$1 = (192 | ((v.flag & 32) >>> 0)) >>> 0; + fl$1 = (fl$1 | ((typ$1.Kind() >>> 0))) >>> 0; + i = i + (($parseInt(s.$offset) >> 0)) >> 0; + a$1 = s.$array; + if (!((((fl$1 & 64) >>> 0) === 0)) && !((typ$1.Kind() === 17)) && !((typ$1.Kind() === 25))) { + return new Value.ptr(typ$1, new (jsType(PtrTo(typ$1)))((function() { + return wrapJsObject(typ$1, a$1[i]); + }), (function(v$1) { + var v$1; + a$1[i] = unwrapJsObject(typ$1, v$1); + })), fl$1); + } + return makeValue(typ$1, wrapJsObject(typ$1, a$1[i]), fl$1); + } else if (_ref === 24) { + str = v.ptr.$get(); + if (i < 0 || i >= str.length) { + $panic(new $String("reflect: string index out of range")); + } + fl$2 = (((v.flag & 32) >>> 0) | 8) >>> 0; + c = str.charCodeAt(i); + return new Value.ptr(uint8Type, new ptrType$8(function() { return c; }, function($v) { c = $v; }), (fl$2 | 64) >>> 0); + } else { + $panic(new ValueError.ptr("reflect.Value.Index", k)); + } + }; + Value.prototype.Index = function(i) { return this.$val.Index(i); }; + Value.ptr.prototype.IsNil = function() { + var _ref, k, v; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 18 || _ref === 22 || _ref === 23) { + return v.object() === jsType(v.typ).nil; + } else if (_ref === 19) { + return v.object() === $throwNilPointerError; + } else if (_ref === 21) { + return v.object() === false; + } else if (_ref === 20) { + return v.object() === $ifaceNil; + } else { + $panic(new ValueError.ptr("reflect.Value.IsNil", k)); + } + }; + Value.prototype.IsNil = function() { return this.$val.IsNil(); }; + Value.ptr.prototype.Len = function() { + var _ref, k, v; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 17 || _ref === 24) { + return $parseInt(v.object().length); + } else if (_ref === 23) { + return $parseInt(v.object().$length) >> 0; + } else if (_ref === 18) { + return $parseInt(v.object().$buffer.length) >> 0; + } else if (_ref === 21) { + return $parseInt($keys(v.object()).length); + } else { + $panic(new ValueError.ptr("reflect.Value.Len", k)); + } + }; + Value.prototype.Len = function() { return this.$val.Len(); }; + Value.ptr.prototype.Pointer = function() { + var _ref, k, v; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 18 || _ref === 21 || _ref === 22 || _ref === 26) { + if (v.IsNil()) { + return 0; + } + return v.object(); + } else if (_ref === 19) { + if (v.IsNil()) { + return 0; + } + return 1; + } else if (_ref === 23) { + if (v.IsNil()) { + return 0; + } + return v.object().$array; + } else { + $panic(new ValueError.ptr("reflect.Value.Pointer", k)); + } + }; + Value.prototype.Pointer = function() { return this.$val.Pointer(); }; + Value.ptr.prototype.Set = function(x) { + var _ref, v, x; + v = this; + x = x; + new flag(v.flag).mustBeAssignable(); + new flag(x.flag).mustBeExported(); + x = x.assignTo("reflect.Set", v.typ, 0); + if (!((((v.flag & 64) >>> 0) === 0))) { + _ref = v.typ.Kind(); + if (_ref === 17) { + $copy(v.ptr, x.ptr, jsType(v.typ)); + } else if (_ref === 20) { + v.ptr.$set(valueInterface(x, false)); + } else if (_ref === 25) { + copyStruct(v.ptr, x.ptr, v.typ); + } else { + v.ptr.$set(x.object()); + } + return; + } + v.ptr = x.ptr; + }; + Value.prototype.Set = function(x) { return this.$val.Set(x); }; + Value.ptr.prototype.SetCap = function(n) { + var n, newSlice, s, v; + v = this; + new flag(v.flag).mustBeAssignable(); + new flag(v.flag).mustBe(23); + s = v.ptr.$get(); + if (n < ($parseInt(s.$length) >> 0) || n > ($parseInt(s.$capacity) >> 0)) { + $panic(new $String("reflect: slice capacity out of range in SetCap")); + } + newSlice = new (jsType(v.typ))(s.$array); + newSlice.$offset = s.$offset; + newSlice.$length = s.$length; + newSlice.$capacity = n; + v.ptr.$set(newSlice); + }; + Value.prototype.SetCap = function(n) { return this.$val.SetCap(n); }; + Value.ptr.prototype.SetLen = function(n) { + var n, newSlice, s, v; + v = this; + new flag(v.flag).mustBeAssignable(); + new flag(v.flag).mustBe(23); + s = v.ptr.$get(); + if (n < 0 || n > ($parseInt(s.$capacity) >> 0)) { + $panic(new $String("reflect: slice length out of range in SetLen")); + } + newSlice = new (jsType(v.typ))(s.$array); + newSlice.$offset = s.$offset; + newSlice.$length = n; + newSlice.$capacity = s.$capacity; + v.ptr.$set(newSlice); + }; + Value.prototype.SetLen = function(n) { return this.$val.SetLen(n); }; + Value.ptr.prototype.Slice = function(i, j) { + var _ref, cap, i, j, kind, s, str, tt, typ, v; + v = this; + cap = 0; + typ = $ifaceNil; + s = null; + kind = new flag(v.flag).kind(); + _ref = kind; + if (_ref === 17) { + if (((v.flag & 128) >>> 0) === 0) { + $panic(new $String("reflect.Value.Slice: slice of unaddressable array")); + } + tt = v.typ.kindType; + cap = (tt.len >> 0); + typ = SliceOf(tt.elem); + s = new (jsType(typ))(v.object()); + } else if (_ref === 23) { + typ = v.typ; + s = v.object(); + cap = $parseInt(s.$capacity) >> 0; + } else if (_ref === 24) { + str = v.ptr.$get(); + if (i < 0 || j < i || j > str.length) { + $panic(new $String("reflect.Value.Slice: string slice index out of bounds")); + } + return ValueOf(new $String(str.substring(i, j))); + } else { + $panic(new ValueError.ptr("reflect.Value.Slice", kind)); + } + if (i < 0 || j < i || j > cap) { + $panic(new $String("reflect.Value.Slice: slice index out of bounds")); + } + return makeValue(typ, $subslice(s, i, j), (v.flag & 32) >>> 0); + }; + Value.prototype.Slice = function(i, j) { return this.$val.Slice(i, j); }; + Value.ptr.prototype.Slice3 = function(i, j, k) { + var _ref, cap, i, j, k, kind, s, tt, typ, v; + v = this; + cap = 0; + typ = $ifaceNil; + s = null; + kind = new flag(v.flag).kind(); + _ref = kind; + if (_ref === 17) { + if (((v.flag & 128) >>> 0) === 0) { + $panic(new $String("reflect.Value.Slice: slice of unaddressable array")); + } + tt = v.typ.kindType; + cap = (tt.len >> 0); + typ = SliceOf(tt.elem); + s = new (jsType(typ))(v.object()); + } else if (_ref === 23) { + typ = v.typ; + s = v.object(); + cap = $parseInt(s.$capacity) >> 0; + } else { + $panic(new ValueError.ptr("reflect.Value.Slice3", kind)); + } + if (i < 0 || j < i || k < j || k > cap) { + $panic(new $String("reflect.Value.Slice3: slice index out of bounds")); + } + return makeValue(typ, $subslice(s, i, j, k), (v.flag & 32) >>> 0); + }; + Value.prototype.Slice3 = function(i, j, k) { return this.$val.Slice3(i, j, k); }; + Value.ptr.prototype.Close = function() { + var v; + v = this; + new flag(v.flag).mustBe(18); + new flag(v.flag).mustBeExported(); + $close(v.object()); + }; + Value.prototype.Close = function() { return this.$val.Close(); }; + Value.ptr.prototype.TrySend = function(x) { + var c, tt, v, x; + v = this; + x = x; + new flag(v.flag).mustBe(18); + new flag(v.flag).mustBeExported(); + tt = v.typ.kindType; + if (((tt.dir >> 0) & 2) === 0) { + $panic(new $String("reflect: send on recv-only channel")); + } + new flag(x.flag).mustBeExported(); + c = v.object(); + if (!!!(c.$closed) && ($parseInt(c.$recvQueue.length) === 0) && ($parseInt(c.$buffer.length) === ($parseInt(c.$capacity) >> 0))) { + return false; + } + x = x.assignTo("reflect.Value.Send", tt.elem, 0); + $send(c, x.object()); + return true; + }; + Value.prototype.TrySend = function(x) { return this.$val.TrySend(x); }; + Value.ptr.prototype.Send = function(x) { + var v, x; + v = this; + x = x; + $panic(new runtime.NotSupportedError.ptr("reflect.Value.Send, use reflect.Value.TrySend if possible")); + }; + Value.prototype.Send = function(x) { return this.$val.Send(x); }; + Value.ptr.prototype.TryRecv = function() { + var _tmp, _tmp$1, _tmp$2, _tmp$3, ok = false, res, tt, v, x = new Value.ptr(); + v = this; + new flag(v.flag).mustBe(18); + new flag(v.flag).mustBeExported(); + tt = v.typ.kindType; + if (((tt.dir >> 0) & 1) === 0) { + $panic(new $String("reflect: recv on send-only channel")); + } + res = $recv(v.object()); + if (res.constructor === $global.Function) { + _tmp = new Value.ptr(ptrType$1.nil, 0, 0); _tmp$1 = false; x = _tmp; ok = _tmp$1; + return [x, ok]; + } + _tmp$2 = makeValue(tt.elem, res[0], 0); _tmp$3 = !!(res[1]); x = _tmp$2; ok = _tmp$3; + return [x, ok]; + }; + Value.prototype.TryRecv = function() { return this.$val.TryRecv(); }; + Value.ptr.prototype.Recv = function() { + var ok = false, v, x = new Value.ptr(); + v = this; + $panic(new runtime.NotSupportedError.ptr("reflect.Value.Recv, use reflect.Value.TryRecv if possible")); + }; + Value.prototype.Recv = function() { return this.$val.Recv(); }; + Kind.prototype.String = function() { + var k; + k = this.$val; + if ((k >> 0) < kindNames.$length) { + return ((k < 0 || k >= kindNames.$length) ? $throwRuntimeError("index out of range") : kindNames.$array[kindNames.$offset + k]); + } + return "kind" + strconv.Itoa((k >> 0)); + }; + $ptrType(Kind).prototype.String = function() { return new Kind(this.$get()).String(); }; + uncommonType.ptr.prototype.uncommon = function() { + var t; + t = this; + return t; + }; + uncommonType.prototype.uncommon = function() { return this.$val.uncommon(); }; + uncommonType.ptr.prototype.PkgPath = function() { + var t; + t = this; + if (t === ptrType$5.nil || $pointerIsEqual(t.pkgPath, ptrType$4.nil)) { + return ""; + } + return t.pkgPath.$get(); + }; + uncommonType.prototype.PkgPath = function() { return this.$val.PkgPath(); }; + uncommonType.ptr.prototype.Name = function() { + var t; + t = this; + if (t === ptrType$5.nil || $pointerIsEqual(t.name, ptrType$4.nil)) { + return ""; + } + return t.name.$get(); + }; + uncommonType.prototype.Name = function() { return this.$val.Name(); }; + rtype.ptr.prototype.String = function() { + var t; + t = this; + return t.string.$get(); + }; + rtype.prototype.String = function() { return this.$val.String(); }; + rtype.ptr.prototype.Size = function() { + var t; + t = this; + return t.size; + }; + rtype.prototype.Size = function() { return this.$val.Size(); }; + rtype.ptr.prototype.Bits = function() { + var k, t; + t = this; + if (t === ptrType$1.nil) { + $panic(new $String("reflect: Bits of nil Type")); + } + k = t.Kind(); + if (k < 2 || k > 16) { + $panic(new $String("reflect: Bits of non-arithmetic Type " + t.String())); + } + return (t.size >> 0) * 8 >> 0; + }; + rtype.prototype.Bits = function() { return this.$val.Bits(); }; + rtype.ptr.prototype.Align = function() { + var t; + t = this; + return (t.align >> 0); + }; + rtype.prototype.Align = function() { return this.$val.Align(); }; + rtype.ptr.prototype.FieldAlign = function() { + var t; + t = this; + return (t.fieldAlign >> 0); + }; + rtype.prototype.FieldAlign = function() { return this.$val.FieldAlign(); }; + rtype.ptr.prototype.Kind = function() { + var t; + t = this; + return (((t.kind & 31) >>> 0) >>> 0); + }; + rtype.prototype.Kind = function() { return this.$val.Kind(); }; + rtype.ptr.prototype.common = function() { + var t; + t = this; + return t; + }; + rtype.prototype.common = function() { return this.$val.common(); }; + uncommonType.ptr.prototype.NumMethod = function() { + var t; + t = this; + if (t === ptrType$5.nil) { + return 0; + } + return t.methods.$length; + }; + uncommonType.prototype.NumMethod = function() { return this.$val.NumMethod(); }; + uncommonType.ptr.prototype.MethodByName = function(name) { + var _i, _ref, _tmp, _tmp$1, i, m = new Method.ptr(), name, ok = false, p, t, x; + t = this; + if (t === ptrType$5.nil) { + return [m, ok]; + } + p = ptrType$9.nil; + _ref = t.methods; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + p = (x = t.methods, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + if (!($pointerIsEqual(p.name, ptrType$4.nil)) && p.name.$get() === name) { + _tmp = $clone(t.Method(i), Method); _tmp$1 = true; $copy(m, _tmp, Method); ok = _tmp$1; + return [m, ok]; + } + _i++; + } + return [m, ok]; + }; + uncommonType.prototype.MethodByName = function(name) { return this.$val.MethodByName(name); }; + rtype.ptr.prototype.NumMethod = function() { + var t, tt; + t = this; + if (t.Kind() === 20) { + tt = t.kindType; + return tt.NumMethod(); + } + return t.uncommonType.NumMethod(); + }; + rtype.prototype.NumMethod = function() { return this.$val.NumMethod(); }; + rtype.ptr.prototype.Method = function(i) { + var i, m = new Method.ptr(), t, tt; + t = this; + if (t.Kind() === 20) { + tt = t.kindType; + $copy(m, tt.Method(i), Method); + return m; + } + $copy(m, t.uncommonType.Method(i), Method); + return m; + }; + rtype.prototype.Method = function(i) { return this.$val.Method(i); }; + rtype.ptr.prototype.MethodByName = function(name) { + var _tuple, _tuple$1, m = new Method.ptr(), name, ok = false, t, tt; + t = this; + if (t.Kind() === 20) { + tt = t.kindType; + _tuple = tt.MethodByName(name); $copy(m, _tuple[0], Method); ok = _tuple[1]; + return [m, ok]; + } + _tuple$1 = t.uncommonType.MethodByName(name); $copy(m, _tuple$1[0], Method); ok = _tuple$1[1]; + return [m, ok]; + }; + rtype.prototype.MethodByName = function(name) { return this.$val.MethodByName(name); }; + rtype.ptr.prototype.PkgPath = function() { + var t; + t = this; + return t.uncommonType.PkgPath(); + }; + rtype.prototype.PkgPath = function() { return this.$val.PkgPath(); }; + rtype.ptr.prototype.Name = function() { + var t; + t = this; + return t.uncommonType.Name(); + }; + rtype.prototype.Name = function() { return this.$val.Name(); }; + rtype.ptr.prototype.ChanDir = function() { + var t, tt; + t = this; + if (!((t.Kind() === 18))) { + $panic(new $String("reflect: ChanDir of non-chan type")); + } + tt = t.kindType; + return (tt.dir >> 0); + }; + rtype.prototype.ChanDir = function() { return this.$val.ChanDir(); }; + rtype.ptr.prototype.IsVariadic = function() { + var t, tt; + t = this; + if (!((t.Kind() === 19))) { + $panic(new $String("reflect: IsVariadic of non-func type")); + } + tt = t.kindType; + return tt.dotdotdot; + }; + rtype.prototype.IsVariadic = function() { return this.$val.IsVariadic(); }; + rtype.ptr.prototype.Elem = function() { + var _ref, t, tt, tt$1, tt$2, tt$3, tt$4; + t = this; + _ref = t.Kind(); + if (_ref === 17) { + tt = t.kindType; + return toType(tt.elem); + } else if (_ref === 18) { + tt$1 = t.kindType; + return toType(tt$1.elem); + } else if (_ref === 21) { + tt$2 = t.kindType; + return toType(tt$2.elem); + } else if (_ref === 22) { + tt$3 = t.kindType; + return toType(tt$3.elem); + } else if (_ref === 23) { + tt$4 = t.kindType; + return toType(tt$4.elem); + } + $panic(new $String("reflect: Elem of invalid type")); + }; + rtype.prototype.Elem = function() { return this.$val.Elem(); }; + rtype.ptr.prototype.Field = function(i) { + var i, t, tt; + t = this; + if (!((t.Kind() === 25))) { + $panic(new $String("reflect: Field of non-struct type")); + } + tt = t.kindType; + return tt.Field(i); + }; + rtype.prototype.Field = function(i) { return this.$val.Field(i); }; + rtype.ptr.prototype.FieldByIndex = function(index) { + var index, t, tt; + t = this; + if (!((t.Kind() === 25))) { + $panic(new $String("reflect: FieldByIndex of non-struct type")); + } + tt = t.kindType; + return tt.FieldByIndex(index); + }; + rtype.prototype.FieldByIndex = function(index) { return this.$val.FieldByIndex(index); }; + rtype.ptr.prototype.FieldByName = function(name) { + var name, t, tt; + t = this; + if (!((t.Kind() === 25))) { + $panic(new $String("reflect: FieldByName of non-struct type")); + } + tt = t.kindType; + return tt.FieldByName(name); + }; + rtype.prototype.FieldByName = function(name) { return this.$val.FieldByName(name); }; + rtype.ptr.prototype.FieldByNameFunc = function(match) { + var match, t, tt; + t = this; + if (!((t.Kind() === 25))) { + $panic(new $String("reflect: FieldByNameFunc of non-struct type")); + } + tt = t.kindType; + return tt.FieldByNameFunc(match); + }; + rtype.prototype.FieldByNameFunc = function(match) { return this.$val.FieldByNameFunc(match); }; + rtype.ptr.prototype.In = function(i) { + var i, t, tt, x; + t = this; + if (!((t.Kind() === 19))) { + $panic(new $String("reflect: In of non-func type")); + } + tt = t.kindType; + return toType((x = tt.in$2, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i]))); + }; + rtype.prototype.In = function(i) { return this.$val.In(i); }; + rtype.ptr.prototype.Key = function() { + var t, tt; + t = this; + if (!((t.Kind() === 21))) { + $panic(new $String("reflect: Key of non-map type")); + } + tt = t.kindType; + return toType(tt.key); + }; + rtype.prototype.Key = function() { return this.$val.Key(); }; + rtype.ptr.prototype.Len = function() { + var t, tt; + t = this; + if (!((t.Kind() === 17))) { + $panic(new $String("reflect: Len of non-array type")); + } + tt = t.kindType; + return (tt.len >> 0); + }; + rtype.prototype.Len = function() { return this.$val.Len(); }; + rtype.ptr.prototype.NumField = function() { + var t, tt; + t = this; + if (!((t.Kind() === 25))) { + $panic(new $String("reflect: NumField of non-struct type")); + } + tt = t.kindType; + return tt.fields.$length; + }; + rtype.prototype.NumField = function() { return this.$val.NumField(); }; + rtype.ptr.prototype.NumIn = function() { + var t, tt; + t = this; + if (!((t.Kind() === 19))) { + $panic(new $String("reflect: NumIn of non-func type")); + } + tt = t.kindType; + return tt.in$2.$length; + }; + rtype.prototype.NumIn = function() { return this.$val.NumIn(); }; + rtype.ptr.prototype.NumOut = function() { + var t, tt; + t = this; + if (!((t.Kind() === 19))) { + $panic(new $String("reflect: NumOut of non-func type")); + } + tt = t.kindType; + return tt.out.$length; + }; + rtype.prototype.NumOut = function() { return this.$val.NumOut(); }; + rtype.ptr.prototype.Out = function(i) { + var i, t, tt, x; + t = this; + if (!((t.Kind() === 19))) { + $panic(new $String("reflect: Out of non-func type")); + } + tt = t.kindType; + return toType((x = tt.out, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i]))); + }; + rtype.prototype.Out = function(i) { return this.$val.Out(i); }; + ChanDir.prototype.String = function() { + var _ref, d; + d = this.$val; + _ref = d; + if (_ref === 2) { + return "chan<-"; + } else if (_ref === 1) { + return "<-chan"; + } else if (_ref === 3) { + return "chan"; + } + return "ChanDir" + strconv.Itoa((d >> 0)); + }; + $ptrType(ChanDir).prototype.String = function() { return new ChanDir(this.$get()).String(); }; + interfaceType.ptr.prototype.Method = function(i) { + var i, m = new Method.ptr(), p, t, x; + t = this; + if (i < 0 || i >= t.methods.$length) { + return m; + } + p = (x = t.methods, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + m.Name = p.name.$get(); + if (!($pointerIsEqual(p.pkgPath, ptrType$4.nil))) { + m.PkgPath = p.pkgPath.$get(); + } + m.Type = toType(p.typ); + m.Index = i; + return m; + }; + interfaceType.prototype.Method = function(i) { return this.$val.Method(i); }; + interfaceType.ptr.prototype.NumMethod = function() { + var t; + t = this; + return t.methods.$length; + }; + interfaceType.prototype.NumMethod = function() { return this.$val.NumMethod(); }; + interfaceType.ptr.prototype.MethodByName = function(name) { + var _i, _ref, _tmp, _tmp$1, i, m = new Method.ptr(), name, ok = false, p, t, x; + t = this; + if (t === ptrType$10.nil) { + return [m, ok]; + } + p = ptrType$11.nil; + _ref = t.methods; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + p = (x = t.methods, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + if (p.name.$get() === name) { + _tmp = $clone(t.Method(i), Method); _tmp$1 = true; $copy(m, _tmp, Method); ok = _tmp$1; + return [m, ok]; + } + _i++; + } + return [m, ok]; + }; + interfaceType.prototype.MethodByName = function(name) { return this.$val.MethodByName(name); }; + StructTag.prototype.Get = function(key) { + var _tuple, i, key, name, qvalue, tag, value; + tag = this.$val; + while (true) { + if (!(!(tag === ""))) { break; } + i = 0; + while (true) { + if (!(i < tag.length && (tag.charCodeAt(i) === 32))) { break; } + i = i + (1) >> 0; + } + tag = tag.substring(i); + if (tag === "") { + break; + } + i = 0; + while (true) { + if (!(i < tag.length && !((tag.charCodeAt(i) === 32)) && !((tag.charCodeAt(i) === 58)) && !((tag.charCodeAt(i) === 34)))) { break; } + i = i + (1) >> 0; + } + if ((i + 1 >> 0) >= tag.length || !((tag.charCodeAt(i) === 58)) || !((tag.charCodeAt((i + 1 >> 0)) === 34))) { + break; + } + name = tag.substring(0, i); + tag = tag.substring((i + 1 >> 0)); + i = 1; + while (true) { + if (!(i < tag.length && !((tag.charCodeAt(i) === 34)))) { break; } + if (tag.charCodeAt(i) === 92) { + i = i + (1) >> 0; + } + i = i + (1) >> 0; + } + if (i >= tag.length) { + break; + } + qvalue = tag.substring(0, (i + 1 >> 0)); + tag = tag.substring((i + 1 >> 0)); + if (key === name) { + _tuple = strconv.Unquote(qvalue); value = _tuple[0]; + return value; + } + } + return ""; + }; + $ptrType(StructTag).prototype.Get = function(key) { return new StructTag(this.$get()).Get(key); }; + structType.ptr.prototype.Field = function(i) { + var f = new StructField.ptr(), i, p, t, t$1, x; + t = this; + if (i < 0 || i >= t.fields.$length) { + return f; + } + p = (x = t.fields, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + f.Type = toType(p.typ); + if (!($pointerIsEqual(p.name, ptrType$4.nil))) { + f.Name = p.name.$get(); + } else { + t$1 = f.Type; + if (t$1.Kind() === 22) { + t$1 = t$1.Elem(); + } + f.Name = t$1.Name(); + f.Anonymous = true; + } + if (!($pointerIsEqual(p.pkgPath, ptrType$4.nil))) { + f.PkgPath = p.pkgPath.$get(); + } + if (!($pointerIsEqual(p.tag, ptrType$4.nil))) { + f.Tag = p.tag.$get(); + } + f.Offset = p.offset; + f.Index = new sliceType$9([i]); + return f; + }; + structType.prototype.Field = function(i) { return this.$val.Field(i); }; + structType.ptr.prototype.FieldByIndex = function(index) { + var _i, _ref, f = new StructField.ptr(), ft, i, index, t, x; + t = this; + f.Type = toType(t.rtype); + _ref = index; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + x = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (i > 0) { + ft = f.Type; + if ((ft.Kind() === 22) && (ft.Elem().Kind() === 25)) { + ft = ft.Elem(); + } + f.Type = ft; + } + $copy(f, f.Type.Field(x), StructField); + _i++; + } + return f; + }; + structType.prototype.FieldByIndex = function(index) { return this.$val.FieldByIndex(index); }; + structType.ptr.prototype.FieldByNameFunc = function(match) { + var _entry, _entry$1, _entry$2, _entry$3, _i, _i$1, _key, _key$1, _key$2, _key$3, _key$4, _key$5, _map, _map$1, _ref, _ref$1, _tmp, _tmp$1, _tmp$2, _tmp$3, count, current, f, fname, i, index, match, next, nextCount, ntyp, ok = false, result = new StructField.ptr(), scan, styp, t, t$1, visited, x; + t = this; + current = new sliceType$10([]); + next = new sliceType$10([new fieldScan.ptr(t, sliceType$9.nil)]); + nextCount = false; + visited = (_map = new $Map(), _map); + while (true) { + if (!(next.$length > 0)) { break; } + _tmp = next; _tmp$1 = $subslice(current, 0, 0); current = _tmp; next = _tmp$1; + count = nextCount; + nextCount = false; + _ref = current; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + scan = $clone(((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]), fieldScan); + t$1 = scan.typ; + if ((_entry = visited[t$1.$key()], _entry !== undefined ? _entry.v : false)) { + _i++; + continue; + } + _key$1 = t$1; (visited || $throwRuntimeError("assignment to entry in nil map"))[_key$1.$key()] = { k: _key$1, v: true }; + _ref$1 = t$1.fields; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i = _i$1; + f = (x = t$1.fields, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + fname = ""; + ntyp = ptrType$1.nil; + if (!($pointerIsEqual(f.name, ptrType$4.nil))) { + fname = f.name.$get(); + } else { + ntyp = f.typ; + if (ntyp.Kind() === 22) { + ntyp = ntyp.Elem().common(); + } + fname = ntyp.Name(); + } + if (match(fname)) { + if ((_entry$1 = count[t$1.$key()], _entry$1 !== undefined ? _entry$1.v : 0) > 1 || ok) { + _tmp$2 = new StructField.ptr("", "", $ifaceNil, "", 0, sliceType$9.nil, false); _tmp$3 = false; $copy(result, _tmp$2, StructField); ok = _tmp$3; + return [result, ok]; + } + $copy(result, t$1.Field(i), StructField); + result.Index = sliceType$9.nil; + result.Index = $appendSlice(result.Index, scan.index); + result.Index = $append(result.Index, i); + ok = true; + _i$1++; + continue; + } + if (ok || ntyp === ptrType$1.nil || !((ntyp.Kind() === 25))) { + _i$1++; + continue; + } + styp = ntyp.kindType; + if ((_entry$2 = nextCount[styp.$key()], _entry$2 !== undefined ? _entry$2.v : 0) > 0) { + _key$2 = styp; (nextCount || $throwRuntimeError("assignment to entry in nil map"))[_key$2.$key()] = { k: _key$2, v: 2 }; + _i$1++; + continue; + } + if (nextCount === false) { + nextCount = (_map$1 = new $Map(), _map$1); + } + _key$4 = styp; (nextCount || $throwRuntimeError("assignment to entry in nil map"))[_key$4.$key()] = { k: _key$4, v: 1 }; + if ((_entry$3 = count[t$1.$key()], _entry$3 !== undefined ? _entry$3.v : 0) > 1) { + _key$5 = styp; (nextCount || $throwRuntimeError("assignment to entry in nil map"))[_key$5.$key()] = { k: _key$5, v: 2 }; + } + index = sliceType$9.nil; + index = $appendSlice(index, scan.index); + index = $append(index, i); + next = $append(next, new fieldScan.ptr(styp, index)); + _i$1++; + } + _i++; + } + if (ok) { + break; + } + } + return [result, ok]; + }; + structType.prototype.FieldByNameFunc = function(match) { return this.$val.FieldByNameFunc(match); }; + structType.ptr.prototype.FieldByName = function(name) { + var _i, _ref, _tmp, _tmp$1, _tuple, f = new StructField.ptr(), hasAnon, i, name, present = false, t, tf, x; + t = this; + hasAnon = false; + if (!(name === "")) { + _ref = t.fields; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + tf = (x = t.fields, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + if ($pointerIsEqual(tf.name, ptrType$4.nil)) { + hasAnon = true; + _i++; + continue; + } + if (tf.name.$get() === name) { + _tmp = $clone(t.Field(i), StructField); _tmp$1 = true; $copy(f, _tmp, StructField); present = _tmp$1; + return [f, present]; + } + _i++; + } + } + if (!hasAnon) { + return [f, present]; + } + _tuple = t.FieldByNameFunc((function(s) { + var s; + return s === name; + })); $copy(f, _tuple[0], StructField); present = _tuple[1]; + return [f, present]; + }; + structType.prototype.FieldByName = function(name) { return this.$val.FieldByName(name); }; + PtrTo = $pkg.PtrTo = function(t) { + var t; + return $assertType(t, ptrType$1).ptrTo(); + }; + rtype.ptr.prototype.Implements = function(u) { + var t, u; + t = this; + if ($interfaceIsEqual(u, $ifaceNil)) { + $panic(new $String("reflect: nil type passed to Type.Implements")); + } + if (!((u.Kind() === 20))) { + $panic(new $String("reflect: non-interface type passed to Type.Implements")); + } + return implements$1($assertType(u, ptrType$1), t); + }; + rtype.prototype.Implements = function(u) { return this.$val.Implements(u); }; + rtype.ptr.prototype.AssignableTo = function(u) { + var t, u, uu; + t = this; + if ($interfaceIsEqual(u, $ifaceNil)) { + $panic(new $String("reflect: nil type passed to Type.AssignableTo")); + } + uu = $assertType(u, ptrType$1); + return directlyAssignable(uu, t) || implements$1(uu, t); + }; + rtype.prototype.AssignableTo = function(u) { return this.$val.AssignableTo(u); }; + rtype.ptr.prototype.ConvertibleTo = function(u) { + var t, u, uu; + t = this; + if ($interfaceIsEqual(u, $ifaceNil)) { + $panic(new $String("reflect: nil type passed to Type.ConvertibleTo")); + } + uu = $assertType(u, ptrType$1); + return !(convertOp(uu, t) === $throwNilPointerError); + }; + rtype.prototype.ConvertibleTo = function(u) { return this.$val.ConvertibleTo(u); }; + implements$1 = function(T, V) { + var T, V, i, i$1, j, j$1, t, tm, tm$1, v, v$1, vm, vm$1, x, x$1, x$2, x$3; + if (!((T.Kind() === 20))) { + return false; + } + t = T.kindType; + if (t.methods.$length === 0) { + return true; + } + if (V.Kind() === 20) { + v = V.kindType; + i = 0; + j = 0; + while (true) { + if (!(j < v.methods.$length)) { break; } + tm = (x = t.methods, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + vm = (x$1 = v.methods, ((j < 0 || j >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + j])); + if ($pointerIsEqual(vm.name, tm.name) && $pointerIsEqual(vm.pkgPath, tm.pkgPath) && vm.typ === tm.typ) { + i = i + (1) >> 0; + if (i >= t.methods.$length) { + return true; + } + } + j = j + (1) >> 0; + } + return false; + } + v$1 = V.uncommonType.uncommon(); + if (v$1 === ptrType$5.nil) { + return false; + } + i$1 = 0; + j$1 = 0; + while (true) { + if (!(j$1 < v$1.methods.$length)) { break; } + tm$1 = (x$2 = t.methods, ((i$1 < 0 || i$1 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + i$1])); + vm$1 = (x$3 = v$1.methods, ((j$1 < 0 || j$1 >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + j$1])); + if ($pointerIsEqual(vm$1.name, tm$1.name) && $pointerIsEqual(vm$1.pkgPath, tm$1.pkgPath) && vm$1.mtyp === tm$1.typ) { + i$1 = i$1 + (1) >> 0; + if (i$1 >= t.methods.$length) { + return true; + } + } + j$1 = j$1 + (1) >> 0; + } + return false; + }; + directlyAssignable = function(T, V) { + var T, V; + if (T === V) { + return true; + } + if (!(T.Name() === "") && !(V.Name() === "") || !((T.Kind() === V.Kind()))) { + return false; + } + return haveIdenticalUnderlyingType(T, V); + }; + haveIdenticalUnderlyingType = function(T, V) { + var T, V, _i, _i$1, _i$2, _ref, _ref$1, _ref$2, _ref$3, i, i$1, i$2, kind, t, t$1, t$2, tf, typ, typ$1, v, v$1, v$2, vf, x, x$1, x$2, x$3; + if (T === V) { + return true; + } + kind = T.Kind(); + if (!((kind === V.Kind()))) { + return false; + } + if (1 <= kind && kind <= 16 || (kind === 24) || (kind === 26)) { + return true; + } + _ref = kind; + if (_ref === 17) { + return $interfaceIsEqual(T.Elem(), V.Elem()) && (T.Len() === V.Len()); + } else if (_ref === 18) { + if ((V.ChanDir() === 3) && $interfaceIsEqual(T.Elem(), V.Elem())) { + return true; + } + return (V.ChanDir() === T.ChanDir()) && $interfaceIsEqual(T.Elem(), V.Elem()); + } else if (_ref === 19) { + t = T.kindType; + v = V.kindType; + if (!(t.dotdotdot === v.dotdotdot) || !((t.in$2.$length === v.in$2.$length)) || !((t.out.$length === v.out.$length))) { + return false; + } + _ref$1 = t.in$2; + _i = 0; + while (true) { + if (!(_i < _ref$1.$length)) { break; } + i = _i; + typ = ((_i < 0 || _i >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i]); + if (!(typ === (x = v.in$2, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])))) { + return false; + } + _i++; + } + _ref$2 = t.out; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$2.$length)) { break; } + i$1 = _i$1; + typ$1 = ((_i$1 < 0 || _i$1 >= _ref$2.$length) ? $throwRuntimeError("index out of range") : _ref$2.$array[_ref$2.$offset + _i$1]); + if (!(typ$1 === (x$1 = v.out, ((i$1 < 0 || i$1 >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + i$1])))) { + return false; + } + _i$1++; + } + return true; + } else if (_ref === 20) { + t$1 = T.kindType; + v$1 = V.kindType; + if ((t$1.methods.$length === 0) && (v$1.methods.$length === 0)) { + return true; + } + return false; + } else if (_ref === 21) { + return $interfaceIsEqual(T.Key(), V.Key()) && $interfaceIsEqual(T.Elem(), V.Elem()); + } else if (_ref === 22 || _ref === 23) { + return $interfaceIsEqual(T.Elem(), V.Elem()); + } else if (_ref === 25) { + t$2 = T.kindType; + v$2 = V.kindType; + if (!((t$2.fields.$length === v$2.fields.$length))) { + return false; + } + _ref$3 = t$2.fields; + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$3.$length)) { break; } + i$2 = _i$2; + tf = (x$2 = t$2.fields, ((i$2 < 0 || i$2 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + i$2])); + vf = (x$3 = v$2.fields, ((i$2 < 0 || i$2 >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + i$2])); + if (!($pointerIsEqual(tf.name, vf.name)) && ($pointerIsEqual(tf.name, ptrType$4.nil) || $pointerIsEqual(vf.name, ptrType$4.nil) || !(tf.name.$get() === vf.name.$get()))) { + return false; + } + if (!($pointerIsEqual(tf.pkgPath, vf.pkgPath)) && ($pointerIsEqual(tf.pkgPath, ptrType$4.nil) || $pointerIsEqual(vf.pkgPath, ptrType$4.nil) || !(tf.pkgPath.$get() === vf.pkgPath.$get()))) { + return false; + } + if (!(tf.typ === vf.typ)) { + return false; + } + if (!($pointerIsEqual(tf.tag, vf.tag)) && ($pointerIsEqual(tf.tag, ptrType$4.nil) || $pointerIsEqual(vf.tag, ptrType$4.nil) || !(tf.tag.$get() === vf.tag.$get()))) { + return false; + } + if (!((tf.offset === vf.offset))) { + return false; + } + _i$2++; + } + return true; + } + return false; + }; + toType = function(t) { + var t; + if (t === ptrType$1.nil) { + return $ifaceNil; + } + return t; + }; + ifaceIndir = function(t) { + var t; + return ((t.kind & 32) >>> 0) === 0; + }; + flag.prototype.kind = function() { + var f; + f = this.$val; + return (((f & 31) >>> 0) >>> 0); + }; + $ptrType(flag).prototype.kind = function() { return new flag(this.$get()).kind(); }; + Value.ptr.prototype.pointer = function() { + var v; + v = this; + if (!((v.typ.size === 4)) || !v.typ.pointers()) { + $panic(new $String("can't call pointer on a non-pointer Value")); + } + if (!((((v.flag & 64) >>> 0) === 0))) { + return v.ptr.$get(); + } + return v.ptr; + }; + Value.prototype.pointer = function() { return this.$val.pointer(); }; + ValueError.ptr.prototype.Error = function() { + var e; + e = this; + if (e.Kind === 0) { + return "reflect: call of " + e.Method + " on zero Value"; + } + return "reflect: call of " + e.Method + " on " + new Kind(e.Kind).String() + " Value"; + }; + ValueError.prototype.Error = function() { return this.$val.Error(); }; + flag.prototype.mustBe = function(expected) { + var expected, f; + f = this.$val; + if (!((new flag(f).kind() === expected))) { + $panic(new ValueError.ptr(methodName(), new flag(f).kind())); + } + }; + $ptrType(flag).prototype.mustBe = function(expected) { return new flag(this.$get()).mustBe(expected); }; + flag.prototype.mustBeExported = function() { + var f; + f = this.$val; + if (f === 0) { + $panic(new ValueError.ptr(methodName(), 0)); + } + if (!((((f & 32) >>> 0) === 0))) { + $panic(new $String("reflect: " + methodName() + " using value obtained using unexported field")); + } + }; + $ptrType(flag).prototype.mustBeExported = function() { return new flag(this.$get()).mustBeExported(); }; + flag.prototype.mustBeAssignable = function() { + var f; + f = this.$val; + if (f === 0) { + $panic(new ValueError.ptr(methodName(), 0)); + } + if (!((((f & 32) >>> 0) === 0))) { + $panic(new $String("reflect: " + methodName() + " using value obtained using unexported field")); + } + if (((f & 128) >>> 0) === 0) { + $panic(new $String("reflect: " + methodName() + " using unaddressable value")); + } + }; + $ptrType(flag).prototype.mustBeAssignable = function() { return new flag(this.$get()).mustBeAssignable(); }; + Value.ptr.prototype.Addr = function() { + var v; + v = this; + if (((v.flag & 128) >>> 0) === 0) { + $panic(new $String("reflect.Value.Addr of unaddressable value")); + } + return new Value.ptr(v.typ.ptrTo(), v.ptr, ((((v.flag & 32) >>> 0)) | 22) >>> 0); + }; + Value.prototype.Addr = function() { return this.$val.Addr(); }; + Value.ptr.prototype.Bool = function() { + var v; + v = this; + new flag(v.flag).mustBe(1); + return v.ptr.$get(); + }; + Value.prototype.Bool = function() { return this.$val.Bool(); }; + Value.ptr.prototype.Bytes = function() { + var v; + v = this; + new flag(v.flag).mustBe(23); + if (!((v.typ.Elem().Kind() === 8))) { + $panic(new $String("reflect.Value.Bytes of non-byte slice")); + } + return v.ptr.$get(); + }; + Value.prototype.Bytes = function() { return this.$val.Bytes(); }; + Value.ptr.prototype.runes = function() { + var v; + v = this; + new flag(v.flag).mustBe(23); + if (!((v.typ.Elem().Kind() === 5))) { + $panic(new $String("reflect.Value.Bytes of non-rune slice")); + } + return v.ptr.$get(); + }; + Value.prototype.runes = function() { return this.$val.runes(); }; + Value.ptr.prototype.CanAddr = function() { + var v; + v = this; + return !((((v.flag & 128) >>> 0) === 0)); + }; + Value.prototype.CanAddr = function() { return this.$val.CanAddr(); }; + Value.ptr.prototype.CanSet = function() { + var v; + v = this; + return ((v.flag & 160) >>> 0) === 128; + }; + Value.prototype.CanSet = function() { return this.$val.CanSet(); }; + Value.ptr.prototype.Call = function(in$1) { + var in$1, v; + v = this; + new flag(v.flag).mustBe(19); + new flag(v.flag).mustBeExported(); + return v.call("Call", in$1); + }; + Value.prototype.Call = function(in$1) { return this.$val.Call(in$1); }; + Value.ptr.prototype.CallSlice = function(in$1) { + var in$1, v; + v = this; + new flag(v.flag).mustBe(19); + new flag(v.flag).mustBeExported(); + return v.call("CallSlice", in$1); + }; + Value.prototype.CallSlice = function(in$1) { return this.$val.CallSlice(in$1); }; + Value.ptr.prototype.Complex = function() { + var _ref, k, v, x; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 15) { + return (x = v.ptr.$get(), new $Complex128(x.$real, x.$imag)); + } else if (_ref === 16) { + return v.ptr.$get(); + } + $panic(new ValueError.ptr("reflect.Value.Complex", new flag(v.flag).kind())); + }; + Value.prototype.Complex = function() { return this.$val.Complex(); }; + Value.ptr.prototype.FieldByIndex = function(index) { + var _i, _ref, i, index, v, x; + v = this; + if (index.$length === 1) { + return v.Field(((0 < 0 || 0 >= index.$length) ? $throwRuntimeError("index out of range") : index.$array[index.$offset + 0])); + } + new flag(v.flag).mustBe(25); + _ref = index; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + x = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (i > 0) { + if ((v.Kind() === 22) && (v.typ.Elem().Kind() === 25)) { + if (v.IsNil()) { + $panic(new $String("reflect: indirection through nil pointer to embedded struct")); + } + v = v.Elem(); + } + } + v = v.Field(x); + _i++; + } + return v; + }; + Value.prototype.FieldByIndex = function(index) { return this.$val.FieldByIndex(index); }; + Value.ptr.prototype.FieldByName = function(name) { + var _tuple, f, name, ok, v; + v = this; + new flag(v.flag).mustBe(25); + _tuple = v.typ.FieldByName(name); f = $clone(_tuple[0], StructField); ok = _tuple[1]; + if (ok) { + return v.FieldByIndex(f.Index); + } + return new Value.ptr(ptrType$1.nil, 0, 0); + }; + Value.prototype.FieldByName = function(name) { return this.$val.FieldByName(name); }; + Value.ptr.prototype.FieldByNameFunc = function(match) { + var _tuple, f, match, ok, v; + v = this; + _tuple = v.typ.FieldByNameFunc(match); f = $clone(_tuple[0], StructField); ok = _tuple[1]; + if (ok) { + return v.FieldByIndex(f.Index); + } + return new Value.ptr(ptrType$1.nil, 0, 0); + }; + Value.prototype.FieldByNameFunc = function(match) { return this.$val.FieldByNameFunc(match); }; + Value.ptr.prototype.Float = function() { + var _ref, k, v; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 13) { + return $coerceFloat32(v.ptr.$get()); + } else if (_ref === 14) { + return v.ptr.$get(); + } + $panic(new ValueError.ptr("reflect.Value.Float", new flag(v.flag).kind())); + }; + Value.prototype.Float = function() { return this.$val.Float(); }; + Value.ptr.prototype.Int = function() { + var _ref, k, p, v; + v = this; + k = new flag(v.flag).kind(); + p = v.ptr; + _ref = k; + if (_ref === 2) { + return new $Int64(0, p.$get()); + } else if (_ref === 3) { + return new $Int64(0, p.$get()); + } else if (_ref === 4) { + return new $Int64(0, p.$get()); + } else if (_ref === 5) { + return new $Int64(0, p.$get()); + } else if (_ref === 6) { + return p.$get(); + } + $panic(new ValueError.ptr("reflect.Value.Int", new flag(v.flag).kind())); + }; + Value.prototype.Int = function() { return this.$val.Int(); }; + Value.ptr.prototype.CanInterface = function() { + var v; + v = this; + if (v.flag === 0) { + $panic(new ValueError.ptr("reflect.Value.CanInterface", 0)); + } + return ((v.flag & 32) >>> 0) === 0; + }; + Value.prototype.CanInterface = function() { return this.$val.CanInterface(); }; + Value.ptr.prototype.Interface = function() { + var i = $ifaceNil, v; + v = this; + i = valueInterface(v, true); + return i; + }; + Value.prototype.Interface = function() { return this.$val.Interface(); }; + Value.ptr.prototype.InterfaceData = function() { + var v; + v = this; + new flag(v.flag).mustBe(20); + return v.ptr; + }; + Value.prototype.InterfaceData = function() { return this.$val.InterfaceData(); }; + Value.ptr.prototype.IsValid = function() { + var v; + v = this; + return !((v.flag === 0)); + }; + Value.prototype.IsValid = function() { return this.$val.IsValid(); }; + Value.ptr.prototype.Kind = function() { + var v; + v = this; + return new flag(v.flag).kind(); + }; + Value.prototype.Kind = function() { return this.$val.Kind(); }; + Value.ptr.prototype.MapIndex = function(key) { + var c, e, fl, k, key, tt, typ, v; + v = this; + key = key; + new flag(v.flag).mustBe(21); + tt = v.typ.kindType; + key = key.assignTo("reflect.Value.MapIndex", tt.key, 0); + k = 0; + if (!((((key.flag & 64) >>> 0) === 0))) { + k = key.ptr; + } else { + k = new ptrType$17(function() { return this.$target.ptr; }, function($v) { this.$target.ptr = $v; }, key); + } + e = mapaccess(v.typ, v.pointer(), k); + if (e === 0) { + return new Value.ptr(ptrType$1.nil, 0, 0); + } + typ = tt.elem; + fl = ((((v.flag | key.flag) >>> 0)) & 32) >>> 0; + fl = (fl | ((typ.Kind() >>> 0))) >>> 0; + if (ifaceIndir(typ)) { + c = unsafe_New(typ); + memmove(c, e, typ.size); + return new Value.ptr(typ, c, (fl | 64) >>> 0); + } else { + return new Value.ptr(typ, e.$get(), fl); + } + }; + Value.prototype.MapIndex = function(key) { return this.$val.MapIndex(key); }; + Value.ptr.prototype.MapKeys = function() { + var a, c, fl, i, it, key, keyType, m, mlen, tt, v; + v = this; + new flag(v.flag).mustBe(21); + tt = v.typ.kindType; + keyType = tt.key; + fl = (((v.flag & 32) >>> 0) | (keyType.Kind() >>> 0)) >>> 0; + m = v.pointer(); + mlen = 0; + if (!(m === 0)) { + mlen = maplen(m); + } + it = mapiterinit(v.typ, m); + a = $makeSlice(sliceType$6, mlen); + i = 0; + i = 0; + while (true) { + if (!(i < a.$length)) { break; } + key = mapiterkey(it); + if (key === 0) { + break; + } + if (ifaceIndir(keyType)) { + c = unsafe_New(keyType); + memmove(c, key, keyType.size); + (i < 0 || i >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + i] = new Value.ptr(keyType, c, (fl | 64) >>> 0); + } else { + (i < 0 || i >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + i] = new Value.ptr(keyType, key.$get(), fl); + } + mapiternext(it); + i = i + (1) >> 0; + } + return $subslice(a, 0, i); + }; + Value.prototype.MapKeys = function() { return this.$val.MapKeys(); }; + Value.ptr.prototype.Method = function(i) { + var fl, i, v; + v = this; + if (v.typ === ptrType$1.nil) { + $panic(new ValueError.ptr("reflect.Value.Method", 0)); + } + if (!((((v.flag & 256) >>> 0) === 0)) || (i >>> 0) >= (v.typ.NumMethod() >>> 0)) { + $panic(new $String("reflect: Method index out of range")); + } + if ((v.typ.Kind() === 20) && v.IsNil()) { + $panic(new $String("reflect: Method on nil interface value")); + } + fl = (v.flag & 96) >>> 0; + fl = (fl | (19)) >>> 0; + fl = (fl | (((((i >>> 0) << 9 >>> 0) | 256) >>> 0))) >>> 0; + return new Value.ptr(v.typ, v.ptr, fl); + }; + Value.prototype.Method = function(i) { return this.$val.Method(i); }; + Value.ptr.prototype.NumMethod = function() { + var v; + v = this; + if (v.typ === ptrType$1.nil) { + $panic(new ValueError.ptr("reflect.Value.NumMethod", 0)); + } + if (!((((v.flag & 256) >>> 0) === 0))) { + return 0; + } + return v.typ.NumMethod(); + }; + Value.prototype.NumMethod = function() { return this.$val.NumMethod(); }; + Value.ptr.prototype.MethodByName = function(name) { + var _tuple, m, name, ok, v; + v = this; + if (v.typ === ptrType$1.nil) { + $panic(new ValueError.ptr("reflect.Value.MethodByName", 0)); + } + if (!((((v.flag & 256) >>> 0) === 0))) { + return new Value.ptr(ptrType$1.nil, 0, 0); + } + _tuple = v.typ.MethodByName(name); m = $clone(_tuple[0], Method); ok = _tuple[1]; + if (!ok) { + return new Value.ptr(ptrType$1.nil, 0, 0); + } + return v.Method(m.Index); + }; + Value.prototype.MethodByName = function(name) { return this.$val.MethodByName(name); }; + Value.ptr.prototype.NumField = function() { + var tt, v; + v = this; + new flag(v.flag).mustBe(25); + tt = v.typ.kindType; + return tt.fields.$length; + }; + Value.prototype.NumField = function() { return this.$val.NumField(); }; + Value.ptr.prototype.OverflowComplex = function(x) { + var _ref, k, v, x; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 15) { + return overflowFloat32(x.$real) || overflowFloat32(x.$imag); + } else if (_ref === 16) { + return false; + } + $panic(new ValueError.ptr("reflect.Value.OverflowComplex", new flag(v.flag).kind())); + }; + Value.prototype.OverflowComplex = function(x) { return this.$val.OverflowComplex(x); }; + Value.ptr.prototype.OverflowFloat = function(x) { + var _ref, k, v, x; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 13) { + return overflowFloat32(x); + } else if (_ref === 14) { + return false; + } + $panic(new ValueError.ptr("reflect.Value.OverflowFloat", new flag(v.flag).kind())); + }; + Value.prototype.OverflowFloat = function(x) { return this.$val.OverflowFloat(x); }; + overflowFloat32 = function(x) { + var x; + if (x < 0) { + x = -x; + } + return 3.4028234663852886e+38 < x && x <= 1.7976931348623157e+308; + }; + Value.ptr.prototype.OverflowInt = function(x) { + var _ref, bitSize, k, trunc, v, x, x$1; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 2 || _ref === 3 || _ref === 4 || _ref === 5 || _ref === 6) { + bitSize = (x$1 = v.typ.size, (((x$1 >>> 16 << 16) * 8 >>> 0) + (x$1 << 16 >>> 16) * 8) >>> 0); + trunc = $shiftRightInt64(($shiftLeft64(x, ((64 - bitSize >>> 0)))), ((64 - bitSize >>> 0))); + return !((x.$high === trunc.$high && x.$low === trunc.$low)); + } + $panic(new ValueError.ptr("reflect.Value.OverflowInt", new flag(v.flag).kind())); + }; + Value.prototype.OverflowInt = function(x) { return this.$val.OverflowInt(x); }; + Value.ptr.prototype.OverflowUint = function(x) { + var _ref, bitSize, k, trunc, v, x, x$1; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 7 || _ref === 12 || _ref === 8 || _ref === 9 || _ref === 10 || _ref === 11) { + bitSize = (x$1 = v.typ.size, (((x$1 >>> 16 << 16) * 8 >>> 0) + (x$1 << 16 >>> 16) * 8) >>> 0); + trunc = $shiftRightUint64(($shiftLeft64(x, ((64 - bitSize >>> 0)))), ((64 - bitSize >>> 0))); + return !((x.$high === trunc.$high && x.$low === trunc.$low)); + } + $panic(new ValueError.ptr("reflect.Value.OverflowUint", new flag(v.flag).kind())); + }; + Value.prototype.OverflowUint = function(x) { return this.$val.OverflowUint(x); }; + Value.ptr.prototype.SetBool = function(x) { + var v, x; + v = this; + new flag(v.flag).mustBeAssignable(); + new flag(v.flag).mustBe(1); + v.ptr.$set(x); + }; + Value.prototype.SetBool = function(x) { return this.$val.SetBool(x); }; + Value.ptr.prototype.SetBytes = function(x) { + var v, x; + v = this; + new flag(v.flag).mustBeAssignable(); + new flag(v.flag).mustBe(23); + if (!((v.typ.Elem().Kind() === 8))) { + $panic(new $String("reflect.Value.SetBytes of non-byte slice")); + } + v.ptr.$set(x); + }; + Value.prototype.SetBytes = function(x) { return this.$val.SetBytes(x); }; + Value.ptr.prototype.setRunes = function(x) { + var v, x; + v = this; + new flag(v.flag).mustBeAssignable(); + new flag(v.flag).mustBe(23); + if (!((v.typ.Elem().Kind() === 5))) { + $panic(new $String("reflect.Value.setRunes of non-rune slice")); + } + v.ptr.$set(x); + }; + Value.prototype.setRunes = function(x) { return this.$val.setRunes(x); }; + Value.ptr.prototype.SetComplex = function(x) { + var _ref, k, v, x; + v = this; + new flag(v.flag).mustBeAssignable(); + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 15) { + v.ptr.$set(new $Complex64(x.$real, x.$imag)); + } else if (_ref === 16) { + v.ptr.$set(x); + } else { + $panic(new ValueError.ptr("reflect.Value.SetComplex", new flag(v.flag).kind())); + } + }; + Value.prototype.SetComplex = function(x) { return this.$val.SetComplex(x); }; + Value.ptr.prototype.SetFloat = function(x) { + var _ref, k, v, x; + v = this; + new flag(v.flag).mustBeAssignable(); + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 13) { + v.ptr.$set(x); + } else if (_ref === 14) { + v.ptr.$set(x); + } else { + $panic(new ValueError.ptr("reflect.Value.SetFloat", new flag(v.flag).kind())); + } + }; + Value.prototype.SetFloat = function(x) { return this.$val.SetFloat(x); }; + Value.ptr.prototype.SetInt = function(x) { + var _ref, k, v, x; + v = this; + new flag(v.flag).mustBeAssignable(); + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 2) { + v.ptr.$set(((x.$low + ((x.$high >> 31) * 4294967296)) >> 0)); + } else if (_ref === 3) { + v.ptr.$set(((x.$low + ((x.$high >> 31) * 4294967296)) << 24 >> 24)); + } else if (_ref === 4) { + v.ptr.$set(((x.$low + ((x.$high >> 31) * 4294967296)) << 16 >> 16)); + } else if (_ref === 5) { + v.ptr.$set(((x.$low + ((x.$high >> 31) * 4294967296)) >> 0)); + } else if (_ref === 6) { + v.ptr.$set(x); + } else { + $panic(new ValueError.ptr("reflect.Value.SetInt", new flag(v.flag).kind())); + } + }; + Value.prototype.SetInt = function(x) { return this.$val.SetInt(x); }; + Value.ptr.prototype.SetMapIndex = function(key, val) { + var e, k, key, tt, v, val; + v = this; + val = val; + key = key; + new flag(v.flag).mustBe(21); + new flag(v.flag).mustBeExported(); + new flag(key.flag).mustBeExported(); + tt = v.typ.kindType; + key = key.assignTo("reflect.Value.SetMapIndex", tt.key, 0); + k = 0; + if (!((((key.flag & 64) >>> 0) === 0))) { + k = key.ptr; + } else { + k = new ptrType$17(function() { return this.$target.ptr; }, function($v) { this.$target.ptr = $v; }, key); + } + if (val.typ === ptrType$1.nil) { + mapdelete(v.typ, v.pointer(), k); + return; + } + new flag(val.flag).mustBeExported(); + val = val.assignTo("reflect.Value.SetMapIndex", tt.elem, 0); + e = 0; + if (!((((val.flag & 64) >>> 0) === 0))) { + e = val.ptr; + } else { + e = new ptrType$17(function() { return this.$target.ptr; }, function($v) { this.$target.ptr = $v; }, val); + } + mapassign(v.typ, v.pointer(), k, e); + }; + Value.prototype.SetMapIndex = function(key, val) { return this.$val.SetMapIndex(key, val); }; + Value.ptr.prototype.SetUint = function(x) { + var _ref, k, v, x; + v = this; + new flag(v.flag).mustBeAssignable(); + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 7) { + v.ptr.$set((x.$low >>> 0)); + } else if (_ref === 8) { + v.ptr.$set((x.$low << 24 >>> 24)); + } else if (_ref === 9) { + v.ptr.$set((x.$low << 16 >>> 16)); + } else if (_ref === 10) { + v.ptr.$set((x.$low >>> 0)); + } else if (_ref === 11) { + v.ptr.$set(x); + } else if (_ref === 12) { + v.ptr.$set((x.$low >>> 0)); + } else { + $panic(new ValueError.ptr("reflect.Value.SetUint", new flag(v.flag).kind())); + } + }; + Value.prototype.SetUint = function(x) { return this.$val.SetUint(x); }; + Value.ptr.prototype.SetPointer = function(x) { + var v, x; + v = this; + new flag(v.flag).mustBeAssignable(); + new flag(v.flag).mustBe(26); + v.ptr.$set(x); + }; + Value.prototype.SetPointer = function(x) { return this.$val.SetPointer(x); }; + Value.ptr.prototype.SetString = function(x) { + var v, x; + v = this; + new flag(v.flag).mustBeAssignable(); + new flag(v.flag).mustBe(24); + v.ptr.$set(x); + }; + Value.prototype.SetString = function(x) { return this.$val.SetString(x); }; + Value.ptr.prototype.String = function() { + var _ref, k, v; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 0) { + return ""; + } else if (_ref === 24) { + return v.ptr.$get(); + } + return "<" + v.Type().String() + " Value>"; + }; + Value.prototype.String = function() { return this.$val.String(); }; + Value.ptr.prototype.Type = function() { + var f, i, m, m$1, tt, ut, v, x, x$1; + v = this; + f = v.flag; + if (f === 0) { + $panic(new ValueError.ptr("reflect.Value.Type", 0)); + } + if (((f & 256) >>> 0) === 0) { + return v.typ; + } + i = (v.flag >> 0) >> 9 >> 0; + if (v.typ.Kind() === 20) { + tt = v.typ.kindType; + if ((i >>> 0) >= (tt.methods.$length >>> 0)) { + $panic(new $String("reflect: internal error: invalid method index")); + } + m = (x = tt.methods, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + return m.typ; + } + ut = v.typ.uncommonType.uncommon(); + if (ut === ptrType$5.nil || (i >>> 0) >= (ut.methods.$length >>> 0)) { + $panic(new $String("reflect: internal error: invalid method index")); + } + m$1 = (x$1 = ut.methods, ((i < 0 || i >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + i])); + return m$1.mtyp; + }; + Value.prototype.Type = function() { return this.$val.Type(); }; + Value.ptr.prototype.Uint = function() { + var _ref, k, p, v, x; + v = this; + k = new flag(v.flag).kind(); + p = v.ptr; + _ref = k; + if (_ref === 7) { + return new $Uint64(0, p.$get()); + } else if (_ref === 8) { + return new $Uint64(0, p.$get()); + } else if (_ref === 9) { + return new $Uint64(0, p.$get()); + } else if (_ref === 10) { + return new $Uint64(0, p.$get()); + } else if (_ref === 11) { + return p.$get(); + } else if (_ref === 12) { + return (x = p.$get(), new $Uint64(0, x.constructor === Number ? x : 1)); + } + $panic(new ValueError.ptr("reflect.Value.Uint", new flag(v.flag).kind())); + }; + Value.prototype.Uint = function() { return this.$val.Uint(); }; + Value.ptr.prototype.UnsafeAddr = function() { + var v; + v = this; + if (v.typ === ptrType$1.nil) { + $panic(new ValueError.ptr("reflect.Value.UnsafeAddr", 0)); + } + if (((v.flag & 128) >>> 0) === 0) { + $panic(new $String("reflect.Value.UnsafeAddr of unaddressable value")); + } + return v.ptr; + }; + Value.prototype.UnsafeAddr = function() { return this.$val.UnsafeAddr(); }; + New = $pkg.New = function(typ) { + var fl, ptr, typ; + if ($interfaceIsEqual(typ, $ifaceNil)) { + $panic(new $String("reflect: New(nil)")); + } + ptr = unsafe_New($assertType(typ, ptrType$1)); + fl = 22; + return new Value.ptr(typ.common().ptrTo(), ptr, fl); + }; + Value.ptr.prototype.assignTo = function(context, dst, target) { + var context, dst, fl, target, v, x; + v = this; + if (!((((v.flag & 256) >>> 0) === 0))) { + v = makeMethodValue(context, v); + } + if (directlyAssignable(dst, v.typ)) { + v.typ = dst; + fl = (v.flag & 224) >>> 0; + fl = (fl | ((dst.Kind() >>> 0))) >>> 0; + return new Value.ptr(dst, v.ptr, fl); + } else if (implements$1(dst, v.typ)) { + if (target === 0) { + target = unsafe_New(dst); + } + x = valueInterface(v, false); + if (dst.NumMethod() === 0) { + target.$set(x); + } else { + ifaceE2I(dst, x, target); + } + return new Value.ptr(dst, target, 84); + } + $panic(new $String(context + ": value of type " + v.typ.String() + " is not assignable to type " + dst.String())); + }; + Value.prototype.assignTo = function(context, dst, target) { return this.$val.assignTo(context, dst, target); }; + Value.ptr.prototype.Convert = function(t) { + var op, t, v; + v = this; + if (!((((v.flag & 256) >>> 0) === 0))) { + v = makeMethodValue("Convert", v); + } + op = convertOp(t.common(), v.typ); + if (op === $throwNilPointerError) { + $panic(new $String("reflect.Value.Convert: value of type " + v.typ.String() + " cannot be converted to type " + t.String())); + } + return op(v, t); + }; + Value.prototype.Convert = function(t) { return this.$val.Convert(t); }; + convertOp = function(dst, src) { + var _ref, _ref$1, _ref$2, _ref$3, _ref$4, _ref$5, _ref$6, dst, src; + _ref = src.Kind(); + if (_ref === 2 || _ref === 3 || _ref === 4 || _ref === 5 || _ref === 6) { + _ref$1 = dst.Kind(); + if (_ref$1 === 2 || _ref$1 === 3 || _ref$1 === 4 || _ref$1 === 5 || _ref$1 === 6 || _ref$1 === 7 || _ref$1 === 8 || _ref$1 === 9 || _ref$1 === 10 || _ref$1 === 11 || _ref$1 === 12) { + return cvtInt; + } else if (_ref$1 === 13 || _ref$1 === 14) { + return cvtIntFloat; + } else if (_ref$1 === 24) { + return cvtIntString; + } + } else if (_ref === 7 || _ref === 8 || _ref === 9 || _ref === 10 || _ref === 11 || _ref === 12) { + _ref$2 = dst.Kind(); + if (_ref$2 === 2 || _ref$2 === 3 || _ref$2 === 4 || _ref$2 === 5 || _ref$2 === 6 || _ref$2 === 7 || _ref$2 === 8 || _ref$2 === 9 || _ref$2 === 10 || _ref$2 === 11 || _ref$2 === 12) { + return cvtUint; + } else if (_ref$2 === 13 || _ref$2 === 14) { + return cvtUintFloat; + } else if (_ref$2 === 24) { + return cvtUintString; + } + } else if (_ref === 13 || _ref === 14) { + _ref$3 = dst.Kind(); + if (_ref$3 === 2 || _ref$3 === 3 || _ref$3 === 4 || _ref$3 === 5 || _ref$3 === 6) { + return cvtFloatInt; + } else if (_ref$3 === 7 || _ref$3 === 8 || _ref$3 === 9 || _ref$3 === 10 || _ref$3 === 11 || _ref$3 === 12) { + return cvtFloatUint; + } else if (_ref$3 === 13 || _ref$3 === 14) { + return cvtFloat; + } + } else if (_ref === 15 || _ref === 16) { + _ref$4 = dst.Kind(); + if (_ref$4 === 15 || _ref$4 === 16) { + return cvtComplex; + } + } else if (_ref === 24) { + if ((dst.Kind() === 23) && dst.Elem().PkgPath() === "") { + _ref$5 = dst.Elem().Kind(); + if (_ref$5 === 8) { + return cvtStringBytes; + } else if (_ref$5 === 5) { + return cvtStringRunes; + } + } + } else if (_ref === 23) { + if ((dst.Kind() === 24) && src.Elem().PkgPath() === "") { + _ref$6 = src.Elem().Kind(); + if (_ref$6 === 8) { + return cvtBytesString; + } else if (_ref$6 === 5) { + return cvtRunesString; + } + } + } + if (haveIdenticalUnderlyingType(dst, src)) { + return cvtDirect; + } + if ((dst.Kind() === 22) && dst.Name() === "" && (src.Kind() === 22) && src.Name() === "" && haveIdenticalUnderlyingType(dst.Elem().common(), src.Elem().common())) { + return cvtDirect; + } + if (implements$1(dst, src)) { + if (src.Kind() === 20) { + return cvtI2I; + } + return cvtT2I; + } + return $throwNilPointerError; + }; + makeFloat = function(f, v, t) { + var _ref, f, ptr, t, typ, v; + typ = t.common(); + ptr = unsafe_New(typ); + _ref = typ.size; + if (_ref === 4) { + ptr.$set(v); + } else if (_ref === 8) { + ptr.$set(v); + } + return new Value.ptr(typ, ptr, (((f | 64) >>> 0) | (typ.Kind() >>> 0)) >>> 0); + }; + makeComplex = function(f, v, t) { + var _ref, f, ptr, t, typ, v; + typ = t.common(); + ptr = unsafe_New(typ); + _ref = typ.size; + if (_ref === 8) { + ptr.$set(new $Complex64(v.$real, v.$imag)); + } else if (_ref === 16) { + ptr.$set(v); + } + return new Value.ptr(typ, ptr, (((f | 64) >>> 0) | (typ.Kind() >>> 0)) >>> 0); + }; + makeString = function(f, v, t) { + var f, ret, t, v; + ret = New(t).Elem(); + ret.SetString(v); + ret.flag = ((ret.flag & ~128) | f) >>> 0; + return ret; + }; + makeBytes = function(f, v, t) { + var f, ret, t, v; + ret = New(t).Elem(); + ret.SetBytes(v); + ret.flag = ((ret.flag & ~128) | f) >>> 0; + return ret; + }; + makeRunes = function(f, v, t) { + var f, ret, t, v; + ret = New(t).Elem(); + ret.setRunes(v); + ret.flag = ((ret.flag & ~128) | f) >>> 0; + return ret; + }; + cvtInt = function(v, t) { + var t, v, x; + v = v; + return makeInt((v.flag & 32) >>> 0, (x = v.Int(), new $Uint64(x.$high, x.$low)), t); + }; + cvtUint = function(v, t) { + var t, v; + v = v; + return makeInt((v.flag & 32) >>> 0, v.Uint(), t); + }; + cvtFloatInt = function(v, t) { + var t, v, x; + v = v; + return makeInt((v.flag & 32) >>> 0, (x = new $Int64(0, v.Float()), new $Uint64(x.$high, x.$low)), t); + }; + cvtFloatUint = function(v, t) { + var t, v; + v = v; + return makeInt((v.flag & 32) >>> 0, new $Uint64(0, v.Float()), t); + }; + cvtIntFloat = function(v, t) { + var t, v; + v = v; + return makeFloat((v.flag & 32) >>> 0, $flatten64(v.Int()), t); + }; + cvtUintFloat = function(v, t) { + var t, v; + v = v; + return makeFloat((v.flag & 32) >>> 0, $flatten64(v.Uint()), t); + }; + cvtFloat = function(v, t) { + var t, v; + v = v; + return makeFloat((v.flag & 32) >>> 0, v.Float(), t); + }; + cvtComplex = function(v, t) { + var t, v; + v = v; + return makeComplex((v.flag & 32) >>> 0, v.Complex(), t); + }; + cvtIntString = function(v, t) { + var t, v; + v = v; + return makeString((v.flag & 32) >>> 0, $encodeRune(v.Int().$low), t); + }; + cvtUintString = function(v, t) { + var t, v; + v = v; + return makeString((v.flag & 32) >>> 0, $encodeRune(v.Uint().$low), t); + }; + cvtBytesString = function(v, t) { + var t, v; + v = v; + return makeString((v.flag & 32) >>> 0, $bytesToString(v.Bytes()), t); + }; + cvtStringBytes = function(v, t) { + var t, v; + v = v; + return makeBytes((v.flag & 32) >>> 0, new sliceType$12($stringToBytes(v.String())), t); + }; + cvtRunesString = function(v, t) { + var t, v; + v = v; + return makeString((v.flag & 32) >>> 0, $runesToString(v.runes()), t); + }; + cvtStringRunes = function(v, t) { + var t, v; + v = v; + return makeRunes((v.flag & 32) >>> 0, new sliceType$13($stringToRunes(v.String())), t); + }; + cvtT2I = function(v, typ) { + var target, typ, v, x; + v = v; + target = unsafe_New(typ.common()); + x = valueInterface(v, false); + if (typ.NumMethod() === 0) { + target.$set(x); + } else { + ifaceE2I($assertType(typ, ptrType$1), x, target); + } + return new Value.ptr(typ.common(), target, (((((v.flag & 32) >>> 0) | 64) >>> 0) | 20) >>> 0); + }; + cvtI2I = function(v, typ) { + var ret, typ, v; + v = v; + if (v.IsNil()) { + ret = Zero(typ); + ret.flag = (ret.flag | (((v.flag & 32) >>> 0))) >>> 0; + return ret; + } + return cvtT2I(v.Elem(), typ); + }; + Kind.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$1.methods = [{prop: "ptrTo", name: "ptrTo", pkg: "reflect", typ: $funcType([], [ptrType$1], false)}, {prop: "pointers", name: "pointers", pkg: "reflect", typ: $funcType([], [$Bool], false)}, {prop: "Comparable", name: "Comparable", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Uintptr], false)}, {prop: "Bits", name: "Bits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Align", name: "Align", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "FieldAlign", name: "FieldAlign", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Kind", name: "Kind", pkg: "", typ: $funcType([], [Kind], false)}, {prop: "common", name: "common", pkg: "reflect", typ: $funcType([], [ptrType$1], false)}, {prop: "NumMethod", name: "NumMethod", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Method", name: "Method", pkg: "", typ: $funcType([$Int], [Method], false)}, {prop: "MethodByName", name: "MethodByName", pkg: "", typ: $funcType([$String], [Method, $Bool], false)}, {prop: "PkgPath", name: "PkgPath", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "ChanDir", name: "ChanDir", pkg: "", typ: $funcType([], [ChanDir], false)}, {prop: "IsVariadic", name: "IsVariadic", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Elem", name: "Elem", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Field", name: "Field", pkg: "", typ: $funcType([$Int], [StructField], false)}, {prop: "FieldByIndex", name: "FieldByIndex", pkg: "", typ: $funcType([sliceType$9], [StructField], false)}, {prop: "FieldByName", name: "FieldByName", pkg: "", typ: $funcType([$String], [StructField, $Bool], false)}, {prop: "FieldByNameFunc", name: "FieldByNameFunc", pkg: "", typ: $funcType([funcType$2], [StructField, $Bool], false)}, {prop: "In", name: "In", pkg: "", typ: $funcType([$Int], [Type], false)}, {prop: "Key", name: "Key", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumField", name: "NumField", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumIn", name: "NumIn", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumOut", name: "NumOut", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Out", name: "Out", pkg: "", typ: $funcType([$Int], [Type], false)}, {prop: "Implements", name: "Implements", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "AssignableTo", name: "AssignableTo", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "ConvertibleTo", name: "ConvertibleTo", pkg: "", typ: $funcType([Type], [$Bool], false)}]; + ptrType$5.methods = [{prop: "Method", name: "Method", pkg: "", typ: $funcType([$Int], [Method], false)}, {prop: "uncommon", name: "uncommon", pkg: "reflect", typ: $funcType([], [ptrType$5], false)}, {prop: "PkgPath", name: "PkgPath", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "NumMethod", name: "NumMethod", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "MethodByName", name: "MethodByName", pkg: "", typ: $funcType([$String], [Method, $Bool], false)}]; + ChanDir.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$10.methods = [{prop: "Method", name: "Method", pkg: "", typ: $funcType([$Int], [Method], false)}, {prop: "NumMethod", name: "NumMethod", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "MethodByName", name: "MethodByName", pkg: "", typ: $funcType([$String], [Method, $Bool], false)}]; + ptrType$12.methods = [{prop: "Field", name: "Field", pkg: "", typ: $funcType([$Int], [StructField], false)}, {prop: "FieldByIndex", name: "FieldByIndex", pkg: "", typ: $funcType([sliceType$9], [StructField], false)}, {prop: "FieldByNameFunc", name: "FieldByNameFunc", pkg: "", typ: $funcType([funcType$2], [StructField, $Bool], false)}, {prop: "FieldByName", name: "FieldByName", pkg: "", typ: $funcType([$String], [StructField, $Bool], false)}]; + StructTag.methods = [{prop: "Get", name: "Get", pkg: "", typ: $funcType([$String], [$String], false)}]; + Value.methods = [{prop: "object", name: "object", pkg: "reflect", typ: $funcType([], [js.Object], false)}, {prop: "call", name: "call", pkg: "reflect", typ: $funcType([$String, sliceType$6], [sliceType$6], false)}, {prop: "Cap", name: "Cap", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Elem", name: "Elem", pkg: "", typ: $funcType([], [Value], false)}, {prop: "Field", name: "Field", pkg: "", typ: $funcType([$Int], [Value], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([$Int], [Value], false)}, {prop: "IsNil", name: "IsNil", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Pointer", name: "Pointer", pkg: "", typ: $funcType([], [$Uintptr], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([Value], [], false)}, {prop: "SetCap", name: "SetCap", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "SetLen", name: "SetLen", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Slice", name: "Slice", pkg: "", typ: $funcType([$Int, $Int], [Value], false)}, {prop: "Slice3", name: "Slice3", pkg: "", typ: $funcType([$Int, $Int, $Int], [Value], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [], false)}, {prop: "TrySend", name: "TrySend", pkg: "", typ: $funcType([Value], [$Bool], false)}, {prop: "Send", name: "Send", pkg: "", typ: $funcType([Value], [], false)}, {prop: "TryRecv", name: "TryRecv", pkg: "", typ: $funcType([], [Value, $Bool], false)}, {prop: "Recv", name: "Recv", pkg: "", typ: $funcType([], [Value, $Bool], false)}, {prop: "pointer", name: "pointer", pkg: "reflect", typ: $funcType([], [$UnsafePointer], false)}, {prop: "Addr", name: "Addr", pkg: "", typ: $funcType([], [Value], false)}, {prop: "Bool", name: "Bool", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([], [sliceType$12], false)}, {prop: "runes", name: "runes", pkg: "reflect", typ: $funcType([], [sliceType$13], false)}, {prop: "CanAddr", name: "CanAddr", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "CanSet", name: "CanSet", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Call", name: "Call", pkg: "", typ: $funcType([sliceType$6], [sliceType$6], false)}, {prop: "CallSlice", name: "CallSlice", pkg: "", typ: $funcType([sliceType$6], [sliceType$6], false)}, {prop: "Complex", name: "Complex", pkg: "", typ: $funcType([], [$Complex128], false)}, {prop: "FieldByIndex", name: "FieldByIndex", pkg: "", typ: $funcType([sliceType$9], [Value], false)}, {prop: "FieldByName", name: "FieldByName", pkg: "", typ: $funcType([$String], [Value], false)}, {prop: "FieldByNameFunc", name: "FieldByNameFunc", pkg: "", typ: $funcType([funcType$2], [Value], false)}, {prop: "Float", name: "Float", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Int", name: "Int", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "CanInterface", name: "CanInterface", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Interface", name: "Interface", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "InterfaceData", name: "InterfaceData", pkg: "", typ: $funcType([], [arrayType$3], false)}, {prop: "IsValid", name: "IsValid", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Kind", name: "Kind", pkg: "", typ: $funcType([], [Kind], false)}, {prop: "MapIndex", name: "MapIndex", pkg: "", typ: $funcType([Value], [Value], false)}, {prop: "MapKeys", name: "MapKeys", pkg: "", typ: $funcType([], [sliceType$6], false)}, {prop: "Method", name: "Method", pkg: "", typ: $funcType([$Int], [Value], false)}, {prop: "NumMethod", name: "NumMethod", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "MethodByName", name: "MethodByName", pkg: "", typ: $funcType([$String], [Value], false)}, {prop: "NumField", name: "NumField", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "OverflowComplex", name: "OverflowComplex", pkg: "", typ: $funcType([$Complex128], [$Bool], false)}, {prop: "OverflowFloat", name: "OverflowFloat", pkg: "", typ: $funcType([$Float64], [$Bool], false)}, {prop: "OverflowInt", name: "OverflowInt", pkg: "", typ: $funcType([$Int64], [$Bool], false)}, {prop: "OverflowUint", name: "OverflowUint", pkg: "", typ: $funcType([$Uint64], [$Bool], false)}, {prop: "recv", name: "recv", pkg: "reflect", typ: $funcType([$Bool], [Value, $Bool], false)}, {prop: "send", name: "send", pkg: "reflect", typ: $funcType([Value, $Bool], [$Bool], false)}, {prop: "SetBool", name: "SetBool", pkg: "", typ: $funcType([$Bool], [], false)}, {prop: "SetBytes", name: "SetBytes", pkg: "", typ: $funcType([sliceType$12], [], false)}, {prop: "setRunes", name: "setRunes", pkg: "reflect", typ: $funcType([sliceType$13], [], false)}, {prop: "SetComplex", name: "SetComplex", pkg: "", typ: $funcType([$Complex128], [], false)}, {prop: "SetFloat", name: "SetFloat", pkg: "", typ: $funcType([$Float64], [], false)}, {prop: "SetInt", name: "SetInt", pkg: "", typ: $funcType([$Int64], [], false)}, {prop: "SetMapIndex", name: "SetMapIndex", pkg: "", typ: $funcType([Value, Value], [], false)}, {prop: "SetUint", name: "SetUint", pkg: "", typ: $funcType([$Uint64], [], false)}, {prop: "SetPointer", name: "SetPointer", pkg: "", typ: $funcType([$UnsafePointer], [], false)}, {prop: "SetString", name: "SetString", pkg: "", typ: $funcType([$String], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Type", name: "Type", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Uint", name: "Uint", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "UnsafeAddr", name: "UnsafeAddr", pkg: "", typ: $funcType([], [$Uintptr], false)}, {prop: "assignTo", name: "assignTo", pkg: "reflect", typ: $funcType([$String, ptrType$1, $UnsafePointer], [Value], false)}, {prop: "Convert", name: "Convert", pkg: "", typ: $funcType([Type], [Value], false)}]; + flag.methods = [{prop: "kind", name: "kind", pkg: "reflect", typ: $funcType([], [Kind], false)}, {prop: "mustBe", name: "mustBe", pkg: "reflect", typ: $funcType([Kind], [], false)}, {prop: "mustBeExported", name: "mustBeExported", pkg: "reflect", typ: $funcType([], [], false)}, {prop: "mustBeAssignable", name: "mustBeAssignable", pkg: "reflect", typ: $funcType([], [], false)}]; + ptrType$20.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + mapIter.init([{prop: "t", name: "t", pkg: "reflect", typ: Type, tag: ""}, {prop: "m", name: "m", pkg: "reflect", typ: js.Object, tag: ""}, {prop: "keys", name: "keys", pkg: "reflect", typ: js.Object, tag: ""}, {prop: "i", name: "i", pkg: "reflect", typ: $Int, tag: ""}]); + Type.init([{prop: "Align", name: "Align", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "AssignableTo", name: "AssignableTo", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "Bits", name: "Bits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "ChanDir", name: "ChanDir", pkg: "", typ: $funcType([], [ChanDir], false)}, {prop: "Comparable", name: "Comparable", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "ConvertibleTo", name: "ConvertibleTo", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "Elem", name: "Elem", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Field", name: "Field", pkg: "", typ: $funcType([$Int], [StructField], false)}, {prop: "FieldAlign", name: "FieldAlign", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "FieldByIndex", name: "FieldByIndex", pkg: "", typ: $funcType([sliceType$9], [StructField], false)}, {prop: "FieldByName", name: "FieldByName", pkg: "", typ: $funcType([$String], [StructField, $Bool], false)}, {prop: "FieldByNameFunc", name: "FieldByNameFunc", pkg: "", typ: $funcType([funcType$2], [StructField, $Bool], false)}, {prop: "Implements", name: "Implements", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "In", name: "In", pkg: "", typ: $funcType([$Int], [Type], false)}, {prop: "IsVariadic", name: "IsVariadic", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Key", name: "Key", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Kind", name: "Kind", pkg: "", typ: $funcType([], [Kind], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Method", name: "Method", pkg: "", typ: $funcType([$Int], [Method], false)}, {prop: "MethodByName", name: "MethodByName", pkg: "", typ: $funcType([$String], [Method, $Bool], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "NumField", name: "NumField", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumIn", name: "NumIn", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumMethod", name: "NumMethod", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumOut", name: "NumOut", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Out", name: "Out", pkg: "", typ: $funcType([$Int], [Type], false)}, {prop: "PkgPath", name: "PkgPath", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Uintptr], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "common", name: "common", pkg: "reflect", typ: $funcType([], [ptrType$1], false)}, {prop: "uncommon", name: "uncommon", pkg: "reflect", typ: $funcType([], [ptrType$5], false)}]); + rtype.init([{prop: "size", name: "size", pkg: "reflect", typ: $Uintptr, tag: ""}, {prop: "hash", name: "hash", pkg: "reflect", typ: $Uint32, tag: ""}, {prop: "_$2", name: "_", pkg: "reflect", typ: $Uint8, tag: ""}, {prop: "align", name: "align", pkg: "reflect", typ: $Uint8, tag: ""}, {prop: "fieldAlign", name: "fieldAlign", pkg: "reflect", typ: $Uint8, tag: ""}, {prop: "kind", name: "kind", pkg: "reflect", typ: $Uint8, tag: ""}, {prop: "alg", name: "alg", pkg: "reflect", typ: ptrType$3, tag: ""}, {prop: "gc", name: "gc", pkg: "reflect", typ: arrayType$1, tag: ""}, {prop: "string", name: "string", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "uncommonType", name: "", pkg: "reflect", typ: ptrType$5, tag: ""}, {prop: "ptrToThis", name: "ptrToThis", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "zero", name: "zero", pkg: "reflect", typ: $UnsafePointer, tag: ""}]); + typeAlg.init([{prop: "hash", name: "hash", pkg: "reflect", typ: funcType$3, tag: ""}, {prop: "equal", name: "equal", pkg: "reflect", typ: funcType$4, tag: ""}]); + method.init([{prop: "name", name: "name", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "pkgPath", name: "pkgPath", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "mtyp", name: "mtyp", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "typ", name: "typ", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "ifn", name: "ifn", pkg: "reflect", typ: $UnsafePointer, tag: ""}, {prop: "tfn", name: "tfn", pkg: "reflect", typ: $UnsafePointer, tag: ""}]); + uncommonType.init([{prop: "name", name: "name", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "pkgPath", name: "pkgPath", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "methods", name: "methods", pkg: "reflect", typ: sliceType$2, tag: ""}]); + arrayType.init([{prop: "rtype", name: "", pkg: "reflect", typ: rtype, tag: "reflect:\"array\""}, {prop: "elem", name: "elem", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "slice", name: "slice", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "len", name: "len", pkg: "reflect", typ: $Uintptr, tag: ""}]); + chanType.init([{prop: "rtype", name: "", pkg: "reflect", typ: rtype, tag: "reflect:\"chan\""}, {prop: "elem", name: "elem", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "dir", name: "dir", pkg: "reflect", typ: $Uintptr, tag: ""}]); + funcType.init([{prop: "rtype", name: "", pkg: "reflect", typ: rtype, tag: "reflect:\"func\""}, {prop: "dotdotdot", name: "dotdotdot", pkg: "reflect", typ: $Bool, tag: ""}, {prop: "in$2", name: "in", pkg: "reflect", typ: sliceType$3, tag: ""}, {prop: "out", name: "out", pkg: "reflect", typ: sliceType$3, tag: ""}]); + imethod.init([{prop: "name", name: "name", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "pkgPath", name: "pkgPath", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "typ", name: "typ", pkg: "reflect", typ: ptrType$1, tag: ""}]); + interfaceType.init([{prop: "rtype", name: "", pkg: "reflect", typ: rtype, tag: "reflect:\"interface\""}, {prop: "methods", name: "methods", pkg: "reflect", typ: sliceType$4, tag: ""}]); + mapType.init([{prop: "rtype", name: "", pkg: "reflect", typ: rtype, tag: "reflect:\"map\""}, {prop: "key", name: "key", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "elem", name: "elem", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "bucket", name: "bucket", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "hmap", name: "hmap", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "keysize", name: "keysize", pkg: "reflect", typ: $Uint8, tag: ""}, {prop: "indirectkey", name: "indirectkey", pkg: "reflect", typ: $Uint8, tag: ""}, {prop: "valuesize", name: "valuesize", pkg: "reflect", typ: $Uint8, tag: ""}, {prop: "indirectvalue", name: "indirectvalue", pkg: "reflect", typ: $Uint8, tag: ""}, {prop: "bucketsize", name: "bucketsize", pkg: "reflect", typ: $Uint16, tag: ""}]); + ptrType.init([{prop: "rtype", name: "", pkg: "reflect", typ: rtype, tag: "reflect:\"ptr\""}, {prop: "elem", name: "elem", pkg: "reflect", typ: ptrType$1, tag: ""}]); + sliceType.init([{prop: "rtype", name: "", pkg: "reflect", typ: rtype, tag: "reflect:\"slice\""}, {prop: "elem", name: "elem", pkg: "reflect", typ: ptrType$1, tag: ""}]); + structField.init([{prop: "name", name: "name", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "pkgPath", name: "pkgPath", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "typ", name: "typ", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "tag", name: "tag", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "offset", name: "offset", pkg: "reflect", typ: $Uintptr, tag: ""}]); + structType.init([{prop: "rtype", name: "", pkg: "reflect", typ: rtype, tag: "reflect:\"struct\""}, {prop: "fields", name: "fields", pkg: "reflect", typ: sliceType$5, tag: ""}]); + Method.init([{prop: "Name", name: "Name", pkg: "", typ: $String, tag: ""}, {prop: "PkgPath", name: "PkgPath", pkg: "", typ: $String, tag: ""}, {prop: "Type", name: "Type", pkg: "", typ: Type, tag: ""}, {prop: "Func", name: "Func", pkg: "", typ: Value, tag: ""}, {prop: "Index", name: "Index", pkg: "", typ: $Int, tag: ""}]); + StructField.init([{prop: "Name", name: "Name", pkg: "", typ: $String, tag: ""}, {prop: "PkgPath", name: "PkgPath", pkg: "", typ: $String, tag: ""}, {prop: "Type", name: "Type", pkg: "", typ: Type, tag: ""}, {prop: "Tag", name: "Tag", pkg: "", typ: StructTag, tag: ""}, {prop: "Offset", name: "Offset", pkg: "", typ: $Uintptr, tag: ""}, {prop: "Index", name: "Index", pkg: "", typ: sliceType$9, tag: ""}, {prop: "Anonymous", name: "Anonymous", pkg: "", typ: $Bool, tag: ""}]); + fieldScan.init([{prop: "typ", name: "typ", pkg: "reflect", typ: ptrType$12, tag: ""}, {prop: "index", name: "index", pkg: "reflect", typ: sliceType$9, tag: ""}]); + Value.init([{prop: "typ", name: "typ", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "ptr", name: "ptr", pkg: "reflect", typ: $UnsafePointer, tag: ""}, {prop: "flag", name: "", pkg: "reflect", typ: flag, tag: ""}]); + ValueError.init([{prop: "Method", name: "Method", pkg: "", typ: $String, tag: ""}, {prop: "Kind", name: "Kind", pkg: "", typ: Kind, tag: ""}]); + nonEmptyInterface.init([{prop: "itab", name: "itab", pkg: "reflect", typ: ptrType$7, tag: ""}, {prop: "word", name: "word", pkg: "reflect", typ: $UnsafePointer, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_reflect = function() { while (true) { switch ($s) { case 0: + $r = js.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = math.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = runtime.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = strconv.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = sync.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + initialized = false; + stringPtrMap = new $Map(); + jsObject = $js.Object; + jsContainer = $js.container.ptr; + kindNames = new sliceType$1(["invalid", "bool", "int", "int8", "int16", "int32", "int64", "uint", "uint8", "uint16", "uint32", "uint64", "uintptr", "float32", "float64", "complex64", "complex128", "array", "chan", "func", "interface", "map", "ptr", "slice", "string", "struct", "unsafe.Pointer"]); + uint8Type = $assertType(TypeOf(new $Uint8(0)), ptrType$1); + init(); + /* */ } return; } }; $init_reflect.$blocking = true; return $init_reflect; + }; + return $pkg; +})(); +$packages["fmt"] = (function() { + var $pkg = {}, errors, io, math, os, reflect, strconv, sync, utf8, fmtFlags, fmt, State, Formatter, Stringer, GoStringer, buffer, pp, runeUnreader, scanError, ss, ssave, sliceType, sliceType$1, arrayType, sliceType$2, ptrType, ptrType$1, ptrType$2, ptrType$5, arrayType$1, arrayType$2, ptrType$25, funcType, padZeroBytes, padSpaceBytes, trueBytes, falseBytes, commaSpaceBytes, nilAngleBytes, nilParenBytes, nilBytes, mapBytes, percentBangBytes, missingBytes, badIndexBytes, panicBytes, extraBytes, irparenBytes, bytesBytes, badWidthBytes, badPrecBytes, noVerbBytes, ppFree, intBits, uintptrBits, byteType, space, ssFree, complexError, boolError, init, doPrec, newPrinter, Fprintf, Printf, Sprintf, Errorf, Fprint, Print, Fprintln, Println, getField, parsenum, intFromArg, parseArgNumber, isSpace, notSpace, indexRune; + errors = $packages["errors"]; + io = $packages["io"]; + math = $packages["math"]; + os = $packages["os"]; + reflect = $packages["reflect"]; + strconv = $packages["strconv"]; + sync = $packages["sync"]; + utf8 = $packages["unicode/utf8"]; + fmtFlags = $pkg.fmtFlags = $newType(0, $kindStruct, "fmt.fmtFlags", "fmtFlags", "fmt", function(widPresent_, precPresent_, minus_, plus_, sharp_, space_, unicode_, uniQuote_, zero_, plusV_, sharpV_) { + this.$val = this; + this.widPresent = widPresent_ !== undefined ? widPresent_ : false; + this.precPresent = precPresent_ !== undefined ? precPresent_ : false; + this.minus = minus_ !== undefined ? minus_ : false; + this.plus = plus_ !== undefined ? plus_ : false; + this.sharp = sharp_ !== undefined ? sharp_ : false; + this.space = space_ !== undefined ? space_ : false; + this.unicode = unicode_ !== undefined ? unicode_ : false; + this.uniQuote = uniQuote_ !== undefined ? uniQuote_ : false; + this.zero = zero_ !== undefined ? zero_ : false; + this.plusV = plusV_ !== undefined ? plusV_ : false; + this.sharpV = sharpV_ !== undefined ? sharpV_ : false; + }); + fmt = $pkg.fmt = $newType(0, $kindStruct, "fmt.fmt", "fmt", "fmt", function(intbuf_, buf_, wid_, prec_, fmtFlags_) { + this.$val = this; + this.intbuf = intbuf_ !== undefined ? intbuf_ : arrayType$2.zero(); + this.buf = buf_ !== undefined ? buf_ : ptrType$1.nil; + this.wid = wid_ !== undefined ? wid_ : 0; + this.prec = prec_ !== undefined ? prec_ : 0; + this.fmtFlags = fmtFlags_ !== undefined ? fmtFlags_ : new fmtFlags.ptr(); + }); + State = $pkg.State = $newType(8, $kindInterface, "fmt.State", "State", "fmt", null); + Formatter = $pkg.Formatter = $newType(8, $kindInterface, "fmt.Formatter", "Formatter", "fmt", null); + Stringer = $pkg.Stringer = $newType(8, $kindInterface, "fmt.Stringer", "Stringer", "fmt", null); + GoStringer = $pkg.GoStringer = $newType(8, $kindInterface, "fmt.GoStringer", "GoStringer", "fmt", null); + buffer = $pkg.buffer = $newType(12, $kindSlice, "fmt.buffer", "buffer", "fmt", null); + pp = $pkg.pp = $newType(0, $kindStruct, "fmt.pp", "pp", "fmt", function(n_, panicking_, erroring_, buf_, arg_, value_, reordered_, goodArgNum_, runeBuf_, fmt_) { + this.$val = this; + this.n = n_ !== undefined ? n_ : 0; + this.panicking = panicking_ !== undefined ? panicking_ : false; + this.erroring = erroring_ !== undefined ? erroring_ : false; + this.buf = buf_ !== undefined ? buf_ : buffer.nil; + this.arg = arg_ !== undefined ? arg_ : $ifaceNil; + this.value = value_ !== undefined ? value_ : new reflect.Value.ptr(); + this.reordered = reordered_ !== undefined ? reordered_ : false; + this.goodArgNum = goodArgNum_ !== undefined ? goodArgNum_ : false; + this.runeBuf = runeBuf_ !== undefined ? runeBuf_ : arrayType$1.zero(); + this.fmt = fmt_ !== undefined ? fmt_ : new fmt.ptr(); + }); + runeUnreader = $pkg.runeUnreader = $newType(8, $kindInterface, "fmt.runeUnreader", "runeUnreader", "fmt", null); + scanError = $pkg.scanError = $newType(0, $kindStruct, "fmt.scanError", "scanError", "fmt", function(err_) { + this.$val = this; + this.err = err_ !== undefined ? err_ : $ifaceNil; + }); + ss = $pkg.ss = $newType(0, $kindStruct, "fmt.ss", "ss", "fmt", function(rr_, buf_, peekRune_, prevRune_, count_, atEOF_, ssave_) { + this.$val = this; + this.rr = rr_ !== undefined ? rr_ : $ifaceNil; + this.buf = buf_ !== undefined ? buf_ : buffer.nil; + this.peekRune = peekRune_ !== undefined ? peekRune_ : 0; + this.prevRune = prevRune_ !== undefined ? prevRune_ : 0; + this.count = count_ !== undefined ? count_ : 0; + this.atEOF = atEOF_ !== undefined ? atEOF_ : false; + this.ssave = ssave_ !== undefined ? ssave_ : new ssave.ptr(); + }); + ssave = $pkg.ssave = $newType(0, $kindStruct, "fmt.ssave", "ssave", "fmt", function(validSave_, nlIsEnd_, nlIsSpace_, argLimit_, limit_, maxWid_) { + this.$val = this; + this.validSave = validSave_ !== undefined ? validSave_ : false; + this.nlIsEnd = nlIsEnd_ !== undefined ? nlIsEnd_ : false; + this.nlIsSpace = nlIsSpace_ !== undefined ? nlIsSpace_ : false; + this.argLimit = argLimit_ !== undefined ? argLimit_ : 0; + this.limit = limit_ !== undefined ? limit_ : 0; + this.maxWid = maxWid_ !== undefined ? maxWid_ : 0; + }); + sliceType = $sliceType($Uint8); + sliceType$1 = $sliceType($emptyInterface); + arrayType = $arrayType($Uint16, 2); + sliceType$2 = $sliceType(arrayType); + ptrType = $ptrType(pp); + ptrType$1 = $ptrType(buffer); + ptrType$2 = $ptrType(reflect.rtype); + ptrType$5 = $ptrType(ss); + arrayType$1 = $arrayType($Uint8, 4); + arrayType$2 = $arrayType($Uint8, 65); + ptrType$25 = $ptrType(fmt); + funcType = $funcType([$Int32], [$Bool], false); + init = function() { + var i; + i = 0; + while (true) { + if (!(i < 65)) { break; } + (i < 0 || i >= padZeroBytes.$length) ? $throwRuntimeError("index out of range") : padZeroBytes.$array[padZeroBytes.$offset + i] = 48; + (i < 0 || i >= padSpaceBytes.$length) ? $throwRuntimeError("index out of range") : padSpaceBytes.$array[padSpaceBytes.$offset + i] = 32; + i = i + (1) >> 0; + } + }; + fmt.ptr.prototype.clearflags = function() { + var f; + f = this; + $copy(f.fmtFlags, new fmtFlags.ptr(false, false, false, false, false, false, false, false, false, false, false), fmtFlags); + }; + fmt.prototype.clearflags = function() { return this.$val.clearflags(); }; + fmt.ptr.prototype.init = function(buf) { + var buf, f; + f = this; + f.buf = buf; + f.clearflags(); + }; + fmt.prototype.init = function(buf) { return this.$val.init(buf); }; + fmt.ptr.prototype.computePadding = function(width) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, f, left, leftWidth = 0, padding = sliceType.nil, rightWidth = 0, w, width; + f = this; + left = !f.fmtFlags.minus; + w = f.wid; + if (w < 0) { + left = false; + w = -w; + } + w = w - (width) >> 0; + if (w > 0) { + if (left && f.fmtFlags.zero) { + _tmp = padZeroBytes; _tmp$1 = w; _tmp$2 = 0; padding = _tmp; leftWidth = _tmp$1; rightWidth = _tmp$2; + return [padding, leftWidth, rightWidth]; + } + if (left) { + _tmp$3 = padSpaceBytes; _tmp$4 = w; _tmp$5 = 0; padding = _tmp$3; leftWidth = _tmp$4; rightWidth = _tmp$5; + return [padding, leftWidth, rightWidth]; + } else { + _tmp$6 = padSpaceBytes; _tmp$7 = 0; _tmp$8 = w; padding = _tmp$6; leftWidth = _tmp$7; rightWidth = _tmp$8; + return [padding, leftWidth, rightWidth]; + } + } + return [padding, leftWidth, rightWidth]; + }; + fmt.prototype.computePadding = function(width) { return this.$val.computePadding(width); }; + fmt.ptr.prototype.writePadding = function(n, padding) { + var f, m, n, padding; + f = this; + while (true) { + if (!(n > 0)) { break; } + m = n; + if (m > 65) { + m = 65; + } + f.buf.Write($subslice(padding, 0, m)); + n = n - (m) >> 0; + } + }; + fmt.prototype.writePadding = function(n, padding) { return this.$val.writePadding(n, padding); }; + fmt.ptr.prototype.pad = function(b) { + var _tuple, b, f, left, padding, right; + f = this; + if (!f.fmtFlags.widPresent || (f.wid === 0)) { + f.buf.Write(b); + return; + } + _tuple = f.computePadding(utf8.RuneCount(b)); padding = _tuple[0]; left = _tuple[1]; right = _tuple[2]; + if (left > 0) { + f.writePadding(left, padding); + } + f.buf.Write(b); + if (right > 0) { + f.writePadding(right, padding); + } + }; + fmt.prototype.pad = function(b) { return this.$val.pad(b); }; + fmt.ptr.prototype.padString = function(s) { + var _tuple, f, left, padding, right, s; + f = this; + if (!f.fmtFlags.widPresent || (f.wid === 0)) { + f.buf.WriteString(s); + return; + } + _tuple = f.computePadding(utf8.RuneCountInString(s)); padding = _tuple[0]; left = _tuple[1]; right = _tuple[2]; + if (left > 0) { + f.writePadding(left, padding); + } + f.buf.WriteString(s); + if (right > 0) { + f.writePadding(right, padding); + } + }; + fmt.prototype.padString = function(s) { return this.$val.padString(s); }; + fmt.ptr.prototype.fmt_boolean = function(v) { + var f, v; + f = this; + if (v) { + f.pad(trueBytes); + } else { + f.pad(falseBytes); + } + }; + fmt.prototype.fmt_boolean = function(v) { return this.$val.fmt_boolean(v); }; + fmt.ptr.prototype.integer = function(a, base, signedness, digits) { + var _ref, _ref$1, a, base, buf, digits, f, i, j, negative, next, prec, runeWidth, signedness, ua, width, width$1, x, x$1, x$2, x$3; + f = this; + if (f.fmtFlags.precPresent && (f.prec === 0) && (a.$high === 0 && a.$low === 0)) { + return; + } + buf = $subslice(new sliceType(f.intbuf), 0); + if (f.fmtFlags.widPresent) { + width = f.wid; + if ((base.$high === 0 && base.$low === 16) && f.fmtFlags.sharp) { + width = width + (2) >> 0; + } + if (width > 65) { + buf = $makeSlice(sliceType, width); + } + } + negative = signedness === true && (a.$high < 0 || (a.$high === 0 && a.$low < 0)); + if (negative) { + a = new $Int64(-a.$high, -a.$low); + } + prec = 0; + if (f.fmtFlags.precPresent) { + prec = f.prec; + f.fmtFlags.zero = false; + } else if (f.fmtFlags.zero && f.fmtFlags.widPresent && !f.fmtFlags.minus && f.wid > 0) { + prec = f.wid; + if (negative || f.fmtFlags.plus || f.fmtFlags.space) { + prec = prec - (1) >> 0; + } + } + i = buf.$length; + ua = new $Uint64(a.$high, a.$low); + _ref = base; + if ((_ref.$high === 0 && _ref.$low === 10)) { + while (true) { + if (!((ua.$high > 0 || (ua.$high === 0 && ua.$low >= 10)))) { break; } + i = i - (1) >> 0; + next = $div64(ua, new $Uint64(0, 10), false); + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = ((x = new $Uint64(0 + ua.$high, 48 + ua.$low), x$1 = $mul64(next, new $Uint64(0, 10)), new $Uint64(x.$high - x$1.$high, x.$low - x$1.$low)).$low << 24 >>> 24); + ua = next; + } + } else if ((_ref.$high === 0 && _ref.$low === 16)) { + while (true) { + if (!((ua.$high > 0 || (ua.$high === 0 && ua.$low >= 16)))) { break; } + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = digits.charCodeAt($flatten64(new $Uint64(ua.$high & 0, (ua.$low & 15) >>> 0))); + ua = $shiftRightUint64(ua, (4)); + } + } else if ((_ref.$high === 0 && _ref.$low === 8)) { + while (true) { + if (!((ua.$high > 0 || (ua.$high === 0 && ua.$low >= 8)))) { break; } + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = ((x$2 = new $Uint64(ua.$high & 0, (ua.$low & 7) >>> 0), new $Uint64(0 + x$2.$high, 48 + x$2.$low)).$low << 24 >>> 24); + ua = $shiftRightUint64(ua, (3)); + } + } else if ((_ref.$high === 0 && _ref.$low === 2)) { + while (true) { + if (!((ua.$high > 0 || (ua.$high === 0 && ua.$low >= 2)))) { break; } + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = ((x$3 = new $Uint64(ua.$high & 0, (ua.$low & 1) >>> 0), new $Uint64(0 + x$3.$high, 48 + x$3.$low)).$low << 24 >>> 24); + ua = $shiftRightUint64(ua, (1)); + } + } else { + $panic(new $String("fmt: unknown base; can't happen")); + } + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = digits.charCodeAt($flatten64(ua)); + while (true) { + if (!(i > 0 && prec > (buf.$length - i >> 0))) { break; } + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = 48; + } + if (f.fmtFlags.sharp) { + _ref$1 = base; + if ((_ref$1.$high === 0 && _ref$1.$low === 8)) { + if (!((((i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i]) === 48))) { + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = 48; + } + } else if ((_ref$1.$high === 0 && _ref$1.$low === 16)) { + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = (120 + digits.charCodeAt(10) << 24 >>> 24) - 97 << 24 >>> 24; + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = 48; + } + } + if (f.fmtFlags.unicode) { + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = 43; + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = 85; + } + if (negative) { + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = 45; + } else if (f.fmtFlags.plus) { + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = 43; + } else if (f.fmtFlags.space) { + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = 32; + } + if (f.fmtFlags.unicode && f.fmtFlags.uniQuote && (a.$high > 0 || (a.$high === 0 && a.$low >= 0)) && (a.$high < 0 || (a.$high === 0 && a.$low <= 1114111)) && strconv.IsPrint(((a.$low + ((a.$high >> 31) * 4294967296)) >> 0))) { + runeWidth = utf8.RuneLen(((a.$low + ((a.$high >> 31) * 4294967296)) >> 0)); + width$1 = (2 + runeWidth >> 0) + 1 >> 0; + $copySlice($subslice(buf, (i - width$1 >> 0)), $subslice(buf, i)); + i = i - (width$1) >> 0; + j = buf.$length - width$1 >> 0; + (j < 0 || j >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + j] = 32; + j = j + (1) >> 0; + (j < 0 || j >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + j] = 39; + j = j + (1) >> 0; + utf8.EncodeRune($subslice(buf, j), ((a.$low + ((a.$high >> 31) * 4294967296)) >> 0)); + j = j + (runeWidth) >> 0; + (j < 0 || j >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + j] = 39; + } + f.pad($subslice(buf, i)); + }; + fmt.prototype.integer = function(a, base, signedness, digits) { return this.$val.integer(a, base, signedness, digits); }; + fmt.ptr.prototype.truncate = function(s) { + var _i, _ref, _rune, f, i, n, s; + f = this; + if (f.fmtFlags.precPresent && f.prec < utf8.RuneCountInString(s)) { + n = f.prec; + _ref = s; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + i = _i; + if (n === 0) { + s = s.substring(0, i); + break; + } + n = n - (1) >> 0; + _i += _rune[1]; + } + } + return s; + }; + fmt.prototype.truncate = function(s) { return this.$val.truncate(s); }; + fmt.ptr.prototype.fmt_s = function(s) { + var f, s; + f = this; + s = f.truncate(s); + f.padString(s); + }; + fmt.prototype.fmt_s = function(s) { return this.$val.fmt_s(s); }; + fmt.ptr.prototype.fmt_sbx = function(s, b, digits) { + var b, buf, c, digits, f, i, n, s, x; + f = this; + n = b.$length; + if (b === sliceType.nil) { + n = s.length; + } + x = (digits.charCodeAt(10) - 97 << 24 >>> 24) + 120 << 24 >>> 24; + buf = sliceType.nil; + i = 0; + while (true) { + if (!(i < n)) { break; } + if (i > 0 && f.fmtFlags.space) { + buf = $append(buf, 32); + } + if (f.fmtFlags.sharp && (f.fmtFlags.space || (i === 0))) { + buf = $append(buf, 48, x); + } + c = 0; + if (b === sliceType.nil) { + c = s.charCodeAt(i); + } else { + c = ((i < 0 || i >= b.$length) ? $throwRuntimeError("index out of range") : b.$array[b.$offset + i]); + } + buf = $append(buf, digits.charCodeAt((c >>> 4 << 24 >>> 24)), digits.charCodeAt(((c & 15) >>> 0))); + i = i + (1) >> 0; + } + f.pad(buf); + }; + fmt.prototype.fmt_sbx = function(s, b, digits) { return this.$val.fmt_sbx(s, b, digits); }; + fmt.ptr.prototype.fmt_sx = function(s, digits) { + var digits, f, s; + f = this; + if (f.fmtFlags.precPresent && f.prec < s.length) { + s = s.substring(0, f.prec); + } + f.fmt_sbx(s, sliceType.nil, digits); + }; + fmt.prototype.fmt_sx = function(s, digits) { return this.$val.fmt_sx(s, digits); }; + fmt.ptr.prototype.fmt_bx = function(b, digits) { + var b, digits, f; + f = this; + if (f.fmtFlags.precPresent && f.prec < b.$length) { + b = $subslice(b, 0, f.prec); + } + f.fmt_sbx("", b, digits); + }; + fmt.prototype.fmt_bx = function(b, digits) { return this.$val.fmt_bx(b, digits); }; + fmt.ptr.prototype.fmt_q = function(s) { + var f, quoted, s; + f = this; + s = f.truncate(s); + quoted = ""; + if (f.fmtFlags.sharp && strconv.CanBackquote(s)) { + quoted = "`" + s + "`"; + } else { + if (f.fmtFlags.plus) { + quoted = strconv.QuoteToASCII(s); + } else { + quoted = strconv.Quote(s); + } + } + f.padString(quoted); + }; + fmt.prototype.fmt_q = function(s) { return this.$val.fmt_q(s); }; + fmt.ptr.prototype.fmt_qc = function(c) { + var c, f, quoted; + f = this; + quoted = sliceType.nil; + if (f.fmtFlags.plus) { + quoted = strconv.AppendQuoteRuneToASCII($subslice(new sliceType(f.intbuf), 0, 0), ((c.$low + ((c.$high >> 31) * 4294967296)) >> 0)); + } else { + quoted = strconv.AppendQuoteRune($subslice(new sliceType(f.intbuf), 0, 0), ((c.$low + ((c.$high >> 31) * 4294967296)) >> 0)); + } + f.pad(quoted); + }; + fmt.prototype.fmt_qc = function(c) { return this.$val.fmt_qc(c); }; + doPrec = function(f, def) { + var def, f; + if (f.fmtFlags.precPresent) { + return f.prec; + } + return def; + }; + fmt.ptr.prototype.formatFloat = function(v, verb, prec, n) { + var $deferred = [], $err = null, f, n, num, prec, v, verb; + /* */ try { $deferFrames.push($deferred); + f = this; + num = strconv.AppendFloat($subslice(new sliceType(f.intbuf), 0, 1), v, verb, prec, n); + if ((((1 < 0 || 1 >= num.$length) ? $throwRuntimeError("index out of range") : num.$array[num.$offset + 1]) === 45) || (((1 < 0 || 1 >= num.$length) ? $throwRuntimeError("index out of range") : num.$array[num.$offset + 1]) === 43)) { + num = $subslice(num, 1); + } else { + (0 < 0 || 0 >= num.$length) ? $throwRuntimeError("index out of range") : num.$array[num.$offset + 0] = 43; + } + if (math.IsInf(v, 0)) { + if (f.fmtFlags.zero) { + $deferred.push([(function() { + f.fmtFlags.zero = true; + }), []]); + f.fmtFlags.zero = false; + } + } + if (f.fmtFlags.zero && f.fmtFlags.widPresent && f.wid > num.$length) { + if (f.fmtFlags.space && v >= 0) { + f.buf.WriteByte(32); + f.wid = f.wid - (1) >> 0; + } else if (f.fmtFlags.plus || v < 0) { + f.buf.WriteByte(((0 < 0 || 0 >= num.$length) ? $throwRuntimeError("index out of range") : num.$array[num.$offset + 0])); + f.wid = f.wid - (1) >> 0; + } + f.pad($subslice(num, 1)); + return; + } + if (f.fmtFlags.space && (((0 < 0 || 0 >= num.$length) ? $throwRuntimeError("index out of range") : num.$array[num.$offset + 0]) === 43)) { + (0 < 0 || 0 >= num.$length) ? $throwRuntimeError("index out of range") : num.$array[num.$offset + 0] = 32; + f.pad(num); + return; + } + if (f.fmtFlags.plus || (((0 < 0 || 0 >= num.$length) ? $throwRuntimeError("index out of range") : num.$array[num.$offset + 0]) === 45) || math.IsInf(v, 0)) { + f.pad(num); + return; + } + f.pad($subslice(num, 1)); + /* */ } catch(err) { $err = err; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + fmt.prototype.formatFloat = function(v, verb, prec, n) { return this.$val.formatFloat(v, verb, prec, n); }; + fmt.ptr.prototype.fmt_e64 = function(v) { + var f, v; + f = this; + f.formatFloat(v, 101, doPrec(f, 6), 64); + }; + fmt.prototype.fmt_e64 = function(v) { return this.$val.fmt_e64(v); }; + fmt.ptr.prototype.fmt_E64 = function(v) { + var f, v; + f = this; + f.formatFloat(v, 69, doPrec(f, 6), 64); + }; + fmt.prototype.fmt_E64 = function(v) { return this.$val.fmt_E64(v); }; + fmt.ptr.prototype.fmt_f64 = function(v) { + var f, v; + f = this; + f.formatFloat(v, 102, doPrec(f, 6), 64); + }; + fmt.prototype.fmt_f64 = function(v) { return this.$val.fmt_f64(v); }; + fmt.ptr.prototype.fmt_g64 = function(v) { + var f, v; + f = this; + f.formatFloat(v, 103, doPrec(f, -1), 64); + }; + fmt.prototype.fmt_g64 = function(v) { return this.$val.fmt_g64(v); }; + fmt.ptr.prototype.fmt_G64 = function(v) { + var f, v; + f = this; + f.formatFloat(v, 71, doPrec(f, -1), 64); + }; + fmt.prototype.fmt_G64 = function(v) { return this.$val.fmt_G64(v); }; + fmt.ptr.prototype.fmt_fb64 = function(v) { + var f, v; + f = this; + f.formatFloat(v, 98, 0, 64); + }; + fmt.prototype.fmt_fb64 = function(v) { return this.$val.fmt_fb64(v); }; + fmt.ptr.prototype.fmt_e32 = function(v) { + var f, v; + f = this; + f.formatFloat($coerceFloat32(v), 101, doPrec(f, 6), 32); + }; + fmt.prototype.fmt_e32 = function(v) { return this.$val.fmt_e32(v); }; + fmt.ptr.prototype.fmt_E32 = function(v) { + var f, v; + f = this; + f.formatFloat($coerceFloat32(v), 69, doPrec(f, 6), 32); + }; + fmt.prototype.fmt_E32 = function(v) { return this.$val.fmt_E32(v); }; + fmt.ptr.prototype.fmt_f32 = function(v) { + var f, v; + f = this; + f.formatFloat($coerceFloat32(v), 102, doPrec(f, 6), 32); + }; + fmt.prototype.fmt_f32 = function(v) { return this.$val.fmt_f32(v); }; + fmt.ptr.prototype.fmt_g32 = function(v) { + var f, v; + f = this; + f.formatFloat($coerceFloat32(v), 103, doPrec(f, -1), 32); + }; + fmt.prototype.fmt_g32 = function(v) { return this.$val.fmt_g32(v); }; + fmt.ptr.prototype.fmt_G32 = function(v) { + var f, v; + f = this; + f.formatFloat($coerceFloat32(v), 71, doPrec(f, -1), 32); + }; + fmt.prototype.fmt_G32 = function(v) { return this.$val.fmt_G32(v); }; + fmt.ptr.prototype.fmt_fb32 = function(v) { + var f, v; + f = this; + f.formatFloat($coerceFloat32(v), 98, 0, 32); + }; + fmt.prototype.fmt_fb32 = function(v) { return this.$val.fmt_fb32(v); }; + fmt.ptr.prototype.fmt_c64 = function(v, verb) { + var f, v, verb; + f = this; + f.fmt_complex($coerceFloat32(v.$real), $coerceFloat32(v.$imag), 32, verb); + }; + fmt.prototype.fmt_c64 = function(v, verb) { return this.$val.fmt_c64(v, verb); }; + fmt.ptr.prototype.fmt_c128 = function(v, verb) { + var f, v, verb; + f = this; + f.fmt_complex(v.$real, v.$imag, 64, verb); + }; + fmt.prototype.fmt_c128 = function(v, verb) { return this.$val.fmt_c128(v, verb); }; + fmt.ptr.prototype.fmt_complex = function(r, j, size, verb) { + var _ref, f, i, j, oldPlus, oldSpace, oldWid, r, size, verb; + f = this; + f.buf.WriteByte(40); + oldPlus = f.fmtFlags.plus; + oldSpace = f.fmtFlags.space; + oldWid = f.wid; + i = 0; + while (true) { + if (!(true)) { break; } + _ref = verb; + if (_ref === 98) { + f.formatFloat(r, 98, 0, size); + } else if (_ref === 101) { + f.formatFloat(r, 101, doPrec(f, 6), size); + } else if (_ref === 69) { + f.formatFloat(r, 69, doPrec(f, 6), size); + } else if (_ref === 102 || _ref === 70) { + f.formatFloat(r, 102, doPrec(f, 6), size); + } else if (_ref === 103) { + f.formatFloat(r, 103, doPrec(f, -1), size); + } else if (_ref === 71) { + f.formatFloat(r, 71, doPrec(f, -1), size); + } + if (!((i === 0))) { + break; + } + f.fmtFlags.plus = true; + f.fmtFlags.space = false; + f.wid = oldWid; + r = j; + i = i + (1) >> 0; + } + f.fmtFlags.space = oldSpace; + f.fmtFlags.plus = oldPlus; + f.wid = oldWid; + f.buf.Write(irparenBytes); + }; + fmt.prototype.fmt_complex = function(r, j, size, verb) { return this.$val.fmt_complex(r, j, size, verb); }; + $ptrType(buffer).prototype.Write = function(p) { + var _tmp, _tmp$1, b, err = $ifaceNil, n = 0, p; + b = this; + b.$set($appendSlice(b.$get(), p)); + _tmp = p.$length; _tmp$1 = $ifaceNil; n = _tmp; err = _tmp$1; + return [n, err]; + }; + $ptrType(buffer).prototype.WriteString = function(s) { + var _tmp, _tmp$1, b, err = $ifaceNil, n = 0, s; + b = this; + b.$set($appendSlice(b.$get(), new buffer($stringToBytes(s)))); + _tmp = s.length; _tmp$1 = $ifaceNil; n = _tmp; err = _tmp$1; + return [n, err]; + }; + $ptrType(buffer).prototype.WriteByte = function(c) { + var b, c; + b = this; + b.$set($append(b.$get(), c)); + return $ifaceNil; + }; + $ptrType(buffer).prototype.WriteRune = function(r) { + var b, bp, n, r, w, x; + bp = this; + if (r < 128) { + bp.$set($append(bp.$get(), (r << 24 >>> 24))); + return $ifaceNil; + } + b = bp.$get(); + n = b.$length; + while (true) { + if (!((n + 4 >> 0) > b.$capacity)) { break; } + b = $append(b, 0); + } + w = utf8.EncodeRune((x = $subslice(b, n, (n + 4 >> 0)), $subslice(new sliceType(x.$array), x.$offset, x.$offset + x.$length)), r); + bp.$set($subslice(b, 0, (n + w >> 0))); + return $ifaceNil; + }; + newPrinter = function() { + var p; + p = $assertType(ppFree.Get(), ptrType); + p.panicking = false; + p.erroring = false; + p.fmt.init(new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p)); + return p; + }; + pp.ptr.prototype.free = function() { + var p; + p = this; + if (p.buf.$capacity > 1024) { + return; + } + p.buf = $subslice(p.buf, 0, 0); + p.arg = $ifaceNil; + p.value = new reflect.Value.ptr(ptrType$2.nil, 0, 0); + ppFree.Put(p); + }; + pp.prototype.free = function() { return this.$val.free(); }; + pp.ptr.prototype.Width = function() { + var _tmp, _tmp$1, ok = false, p, wid = 0; + p = this; + _tmp = p.fmt.wid; _tmp$1 = p.fmt.fmtFlags.widPresent; wid = _tmp; ok = _tmp$1; + return [wid, ok]; + }; + pp.prototype.Width = function() { return this.$val.Width(); }; + pp.ptr.prototype.Precision = function() { + var _tmp, _tmp$1, ok = false, p, prec = 0; + p = this; + _tmp = p.fmt.prec; _tmp$1 = p.fmt.fmtFlags.precPresent; prec = _tmp; ok = _tmp$1; + return [prec, ok]; + }; + pp.prototype.Precision = function() { return this.$val.Precision(); }; + pp.ptr.prototype.Flag = function(b) { + var _ref, b, p; + p = this; + _ref = b; + if (_ref === 45) { + return p.fmt.fmtFlags.minus; + } else if (_ref === 43) { + return p.fmt.fmtFlags.plus; + } else if (_ref === 35) { + return p.fmt.fmtFlags.sharp; + } else if (_ref === 32) { + return p.fmt.fmtFlags.space; + } else if (_ref === 48) { + return p.fmt.fmtFlags.zero; + } + return false; + }; + pp.prototype.Flag = function(b) { return this.$val.Flag(b); }; + pp.ptr.prototype.add = function(c) { + var c, p; + p = this; + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteRune(c); + }; + pp.prototype.add = function(c) { return this.$val.add(c); }; + pp.ptr.prototype.Write = function(b) { + var _tuple, b, err = $ifaceNil, p, ret = 0; + p = this; + _tuple = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(b); ret = _tuple[0]; err = _tuple[1]; + return [ret, err]; + }; + pp.prototype.Write = function(b) { return this.$val.Write(b); }; + Fprintf = $pkg.Fprintf = function(w, format, a) { + var _tuple, a, err = $ifaceNil, format, n = 0, p, w, x; + p = newPrinter(); + p.doPrintf(format, a); + _tuple = w.Write((x = p.buf, $subslice(new sliceType(x.$array), x.$offset, x.$offset + x.$length))); n = _tuple[0]; err = _tuple[1]; + p.free(); + return [n, err]; + }; + Printf = $pkg.Printf = function(format, a) { + var _tuple, a, err = $ifaceNil, format, n = 0; + _tuple = Fprintf(os.Stdout, format, a); n = _tuple[0]; err = _tuple[1]; + return [n, err]; + }; + Sprintf = $pkg.Sprintf = function(format, a) { + var a, format, p, s; + p = newPrinter(); + p.doPrintf(format, a); + s = $bytesToString(p.buf); + p.free(); + return s; + }; + Errorf = $pkg.Errorf = function(format, a) { + var a, format; + return errors.New(Sprintf(format, a)); + }; + Fprint = $pkg.Fprint = function(w, a) { + var _tuple, a, err = $ifaceNil, n = 0, p, w, x; + p = newPrinter(); + p.doPrint(a, false, false); + _tuple = w.Write((x = p.buf, $subslice(new sliceType(x.$array), x.$offset, x.$offset + x.$length))); n = _tuple[0]; err = _tuple[1]; + p.free(); + return [n, err]; + }; + Print = $pkg.Print = function(a) { + var _tuple, a, err = $ifaceNil, n = 0; + _tuple = Fprint(os.Stdout, a); n = _tuple[0]; err = _tuple[1]; + return [n, err]; + }; + Fprintln = $pkg.Fprintln = function(w, a) { + var _tuple, a, err = $ifaceNil, n = 0, p, w, x; + p = newPrinter(); + p.doPrint(a, true, true); + _tuple = w.Write((x = p.buf, $subslice(new sliceType(x.$array), x.$offset, x.$offset + x.$length))); n = _tuple[0]; err = _tuple[1]; + p.free(); + return [n, err]; + }; + Println = $pkg.Println = function(a) { + var _tuple, a, err = $ifaceNil, n = 0; + _tuple = Fprintln(os.Stdout, a); n = _tuple[0]; err = _tuple[1]; + return [n, err]; + }; + getField = function(v, i) { + var i, v, val; + v = v; + val = v.Field(i); + if ((val.Kind() === 20) && !val.IsNil()) { + val = val.Elem(); + } + return val; + }; + parsenum = function(s, start, end) { + var _tmp, _tmp$1, _tmp$2, end, isnum = false, newi = 0, num = 0, s, start; + if (start >= end) { + _tmp = 0; _tmp$1 = false; _tmp$2 = end; num = _tmp; isnum = _tmp$1; newi = _tmp$2; + return [num, isnum, newi]; + } + newi = start; + while (true) { + if (!(newi < end && 48 <= s.charCodeAt(newi) && s.charCodeAt(newi) <= 57)) { break; } + num = (num * 10 >> 0) + ((s.charCodeAt(newi) - 48 << 24 >>> 24) >> 0) >> 0; + isnum = true; + newi = newi + (1) >> 0; + } + return [num, isnum, newi]; + }; + pp.ptr.prototype.unknownType = function(v) { + var p, v; + p = this; + v = v; + if (!v.IsValid()) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(nilAngleBytes); + return; + } + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(63); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(v.Type().String()); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(63); + }; + pp.prototype.unknownType = function(v) { return this.$val.unknownType(v); }; + pp.ptr.prototype.badVerb = function(verb) { + var p, verb; + p = this; + p.erroring = true; + p.add(37); + p.add(33); + p.add(verb); + p.add(40); + if (!($interfaceIsEqual(p.arg, $ifaceNil))) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(reflect.TypeOf(p.arg).String()); + p.add(61); + p.printArg(p.arg, 118, 0); + } else if (p.value.IsValid()) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(p.value.Type().String()); + p.add(61); + p.printValue(p.value, 118, 0); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(nilAngleBytes); + } + p.add(41); + p.erroring = false; + }; + pp.prototype.badVerb = function(verb) { return this.$val.badVerb(verb); }; + pp.ptr.prototype.fmtBool = function(v, verb) { + var _ref, p, v, verb; + p = this; + _ref = verb; + if (_ref === 116 || _ref === 118) { + p.fmt.fmt_boolean(v); + } else { + p.badVerb(verb); + } + }; + pp.prototype.fmtBool = function(v, verb) { return this.$val.fmtBool(v, verb); }; + pp.ptr.prototype.fmtC = function(c) { + var c, p, r, w, x; + p = this; + r = ((c.$low + ((c.$high >> 31) * 4294967296)) >> 0); + if (!((x = new $Int64(0, r), (x.$high === c.$high && x.$low === c.$low)))) { + r = 65533; + } + w = utf8.EncodeRune($subslice(new sliceType(p.runeBuf), 0, 4), r); + p.fmt.pad($subslice(new sliceType(p.runeBuf), 0, w)); + }; + pp.prototype.fmtC = function(c) { return this.$val.fmtC(c); }; + pp.ptr.prototype.fmtInt64 = function(v, verb) { + var _ref, p, v, verb; + p = this; + _ref = verb; + if (_ref === 98) { + p.fmt.integer(v, new $Uint64(0, 2), true, "0123456789abcdef"); + } else if (_ref === 99) { + p.fmtC(v); + } else if (_ref === 100 || _ref === 118) { + p.fmt.integer(v, new $Uint64(0, 10), true, "0123456789abcdef"); + } else if (_ref === 111) { + p.fmt.integer(v, new $Uint64(0, 8), true, "0123456789abcdef"); + } else if (_ref === 113) { + if ((0 < v.$high || (0 === v.$high && 0 <= v.$low)) && (v.$high < 0 || (v.$high === 0 && v.$low <= 1114111))) { + p.fmt.fmt_qc(v); + } else { + p.badVerb(verb); + } + } else if (_ref === 120) { + p.fmt.integer(v, new $Uint64(0, 16), true, "0123456789abcdef"); + } else if (_ref === 85) { + p.fmtUnicode(v); + } else if (_ref === 88) { + p.fmt.integer(v, new $Uint64(0, 16), true, "0123456789ABCDEF"); + } else { + p.badVerb(verb); + } + }; + pp.prototype.fmtInt64 = function(v, verb) { return this.$val.fmtInt64(v, verb); }; + pp.ptr.prototype.fmt0x64 = function(v, leading0x) { + var leading0x, p, sharp, v; + p = this; + sharp = p.fmt.fmtFlags.sharp; + p.fmt.fmtFlags.sharp = leading0x; + p.fmt.integer(new $Int64(v.$high, v.$low), new $Uint64(0, 16), false, "0123456789abcdef"); + p.fmt.fmtFlags.sharp = sharp; + }; + pp.prototype.fmt0x64 = function(v, leading0x) { return this.$val.fmt0x64(v, leading0x); }; + pp.ptr.prototype.fmtUnicode = function(v) { + var p, prec, precPresent, sharp, v; + p = this; + precPresent = p.fmt.fmtFlags.precPresent; + sharp = p.fmt.fmtFlags.sharp; + p.fmt.fmtFlags.sharp = false; + prec = p.fmt.prec; + if (!precPresent) { + p.fmt.prec = 4; + p.fmt.fmtFlags.precPresent = true; + } + p.fmt.fmtFlags.unicode = true; + p.fmt.fmtFlags.uniQuote = sharp; + p.fmt.integer(v, new $Uint64(0, 16), false, "0123456789ABCDEF"); + p.fmt.fmtFlags.unicode = false; + p.fmt.fmtFlags.uniQuote = false; + p.fmt.prec = prec; + p.fmt.fmtFlags.precPresent = precPresent; + p.fmt.fmtFlags.sharp = sharp; + }; + pp.prototype.fmtUnicode = function(v) { return this.$val.fmtUnicode(v); }; + pp.ptr.prototype.fmtUint64 = function(v, verb) { + var _ref, p, v, verb; + p = this; + _ref = verb; + if (_ref === 98) { + p.fmt.integer(new $Int64(v.$high, v.$low), new $Uint64(0, 2), false, "0123456789abcdef"); + } else if (_ref === 99) { + p.fmtC(new $Int64(v.$high, v.$low)); + } else if (_ref === 100) { + p.fmt.integer(new $Int64(v.$high, v.$low), new $Uint64(0, 10), false, "0123456789abcdef"); + } else if (_ref === 118) { + if (p.fmt.fmtFlags.sharpV) { + p.fmt0x64(v, true); + } else { + p.fmt.integer(new $Int64(v.$high, v.$low), new $Uint64(0, 10), false, "0123456789abcdef"); + } + } else if (_ref === 111) { + p.fmt.integer(new $Int64(v.$high, v.$low), new $Uint64(0, 8), false, "0123456789abcdef"); + } else if (_ref === 113) { + if ((0 < v.$high || (0 === v.$high && 0 <= v.$low)) && (v.$high < 0 || (v.$high === 0 && v.$low <= 1114111))) { + p.fmt.fmt_qc(new $Int64(v.$high, v.$low)); + } else { + p.badVerb(verb); + } + } else if (_ref === 120) { + p.fmt.integer(new $Int64(v.$high, v.$low), new $Uint64(0, 16), false, "0123456789abcdef"); + } else if (_ref === 88) { + p.fmt.integer(new $Int64(v.$high, v.$low), new $Uint64(0, 16), false, "0123456789ABCDEF"); + } else if (_ref === 85) { + p.fmtUnicode(new $Int64(v.$high, v.$low)); + } else { + p.badVerb(verb); + } + }; + pp.prototype.fmtUint64 = function(v, verb) { return this.$val.fmtUint64(v, verb); }; + pp.ptr.prototype.fmtFloat32 = function(v, verb) { + var _ref, p, v, verb; + p = this; + _ref = verb; + if (_ref === 98) { + p.fmt.fmt_fb32(v); + } else if (_ref === 101) { + p.fmt.fmt_e32(v); + } else if (_ref === 69) { + p.fmt.fmt_E32(v); + } else if (_ref === 102 || _ref === 70) { + p.fmt.fmt_f32(v); + } else if (_ref === 103 || _ref === 118) { + p.fmt.fmt_g32(v); + } else if (_ref === 71) { + p.fmt.fmt_G32(v); + } else { + p.badVerb(verb); + } + }; + pp.prototype.fmtFloat32 = function(v, verb) { return this.$val.fmtFloat32(v, verb); }; + pp.ptr.prototype.fmtFloat64 = function(v, verb) { + var _ref, p, v, verb; + p = this; + _ref = verb; + if (_ref === 98) { + p.fmt.fmt_fb64(v); + } else if (_ref === 101) { + p.fmt.fmt_e64(v); + } else if (_ref === 69) { + p.fmt.fmt_E64(v); + } else if (_ref === 102 || _ref === 70) { + p.fmt.fmt_f64(v); + } else if (_ref === 103 || _ref === 118) { + p.fmt.fmt_g64(v); + } else if (_ref === 71) { + p.fmt.fmt_G64(v); + } else { + p.badVerb(verb); + } + }; + pp.prototype.fmtFloat64 = function(v, verb) { return this.$val.fmtFloat64(v, verb); }; + pp.ptr.prototype.fmtComplex64 = function(v, verb) { + var _ref, p, v, verb; + p = this; + _ref = verb; + if (_ref === 98 || _ref === 101 || _ref === 69 || _ref === 102 || _ref === 70 || _ref === 103 || _ref === 71) { + p.fmt.fmt_c64(v, verb); + } else if (_ref === 118) { + p.fmt.fmt_c64(v, 103); + } else { + p.badVerb(verb); + } + }; + pp.prototype.fmtComplex64 = function(v, verb) { return this.$val.fmtComplex64(v, verb); }; + pp.ptr.prototype.fmtComplex128 = function(v, verb) { + var _ref, p, v, verb; + p = this; + _ref = verb; + if (_ref === 98 || _ref === 101 || _ref === 69 || _ref === 102 || _ref === 70 || _ref === 103 || _ref === 71) { + p.fmt.fmt_c128(v, verb); + } else if (_ref === 118) { + p.fmt.fmt_c128(v, 103); + } else { + p.badVerb(verb); + } + }; + pp.prototype.fmtComplex128 = function(v, verb) { return this.$val.fmtComplex128(v, verb); }; + pp.ptr.prototype.fmtString = function(v, verb) { + var _ref, p, v, verb; + p = this; + _ref = verb; + if (_ref === 118) { + if (p.fmt.fmtFlags.sharpV) { + p.fmt.fmt_q(v); + } else { + p.fmt.fmt_s(v); + } + } else if (_ref === 115) { + p.fmt.fmt_s(v); + } else if (_ref === 120) { + p.fmt.fmt_sx(v, "0123456789abcdef"); + } else if (_ref === 88) { + p.fmt.fmt_sx(v, "0123456789ABCDEF"); + } else if (_ref === 113) { + p.fmt.fmt_q(v); + } else { + p.badVerb(verb); + } + }; + pp.prototype.fmtString = function(v, verb) { return this.$val.fmtString(v, verb); }; + pp.ptr.prototype.fmtBytes = function(v, verb, typ, depth) { + var _i, _ref, _ref$1, c, depth, i, p, typ, v, verb; + p = this; + if ((verb === 118) || (verb === 100)) { + if (p.fmt.fmtFlags.sharpV) { + if (v === sliceType.nil) { + if ($interfaceIsEqual(typ, $ifaceNil)) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString("[]byte(nil)"); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(typ.String()); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(nilParenBytes); + } + return; + } + if ($interfaceIsEqual(typ, $ifaceNil)) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(bytesBytes); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(typ.String()); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(123); + } + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(91); + } + _ref = v; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + c = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (i > 0) { + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(commaSpaceBytes); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(32); + } + } + p.printArg(new $Uint8(c), 118, depth + 1 >> 0); + _i++; + } + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(125); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(93); + } + return; + } + _ref$1 = verb; + if (_ref$1 === 115) { + p.fmt.fmt_s($bytesToString(v)); + } else if (_ref$1 === 120) { + p.fmt.fmt_bx(v, "0123456789abcdef"); + } else if (_ref$1 === 88) { + p.fmt.fmt_bx(v, "0123456789ABCDEF"); + } else if (_ref$1 === 113) { + p.fmt.fmt_q($bytesToString(v)); + } else { + p.badVerb(verb); + } + }; + pp.prototype.fmtBytes = function(v, verb, typ, depth) { return this.$val.fmtBytes(v, verb, typ, depth); }; + pp.ptr.prototype.fmtPointer = function(value, verb) { + var _ref, _ref$1, p, u, use0x64, value, verb; + p = this; + value = value; + use0x64 = true; + _ref = verb; + if (_ref === 112 || _ref === 118) { + } else if (_ref === 98 || _ref === 100 || _ref === 111 || _ref === 120 || _ref === 88) { + use0x64 = false; + } else { + p.badVerb(verb); + return; + } + u = 0; + _ref$1 = value.Kind(); + if (_ref$1 === 18 || _ref$1 === 19 || _ref$1 === 21 || _ref$1 === 22 || _ref$1 === 23 || _ref$1 === 26) { + u = value.Pointer(); + } else { + p.badVerb(verb); + return; + } + if (p.fmt.fmtFlags.sharpV) { + p.add(40); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(value.Type().String()); + p.add(41); + p.add(40); + if (u === 0) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(nilBytes); + } else { + p.fmt0x64(new $Uint64(0, u.constructor === Number ? u : 1), true); + } + p.add(41); + } else if ((verb === 118) && (u === 0)) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(nilAngleBytes); + } else { + if (use0x64) { + p.fmt0x64(new $Uint64(0, u.constructor === Number ? u : 1), !p.fmt.fmtFlags.sharp); + } else { + p.fmtUint64(new $Uint64(0, u.constructor === Number ? u : 1), verb); + } + } + }; + pp.prototype.fmtPointer = function(value, verb) { return this.$val.fmtPointer(value, verb); }; + pp.ptr.prototype.catchPanic = function(arg, verb) { + var arg, err, p, v, verb; + p = this; + err = $recover(); + if (!($interfaceIsEqual(err, $ifaceNil))) { + v = reflect.ValueOf(arg); + if ((v.Kind() === 22) && v.IsNil()) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(nilAngleBytes); + return; + } + if (p.panicking) { + $panic(err); + } + p.fmt.clearflags(); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(percentBangBytes); + p.add(verb); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(panicBytes); + p.panicking = true; + p.printArg(err, 118, 0); + p.panicking = false; + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(41); + } + }; + pp.prototype.catchPanic = function(arg, verb) { return this.$val.catchPanic(arg, verb); }; + pp.ptr.prototype.clearSpecialFlags = function() { + var p, plusV = false, sharpV = false; + p = this; + plusV = p.fmt.fmtFlags.plusV; + if (plusV) { + p.fmt.fmtFlags.plus = true; + p.fmt.fmtFlags.plusV = false; + } + sharpV = p.fmt.fmtFlags.sharpV; + if (sharpV) { + p.fmt.fmtFlags.sharp = true; + p.fmt.fmtFlags.sharpV = false; + } + return [plusV, sharpV]; + }; + pp.prototype.clearSpecialFlags = function() { return this.$val.clearSpecialFlags(); }; + pp.ptr.prototype.restoreSpecialFlags = function(plusV, sharpV) { + var p, plusV, sharpV; + p = this; + if (plusV) { + p.fmt.fmtFlags.plus = false; + p.fmt.fmtFlags.plusV = true; + } + if (sharpV) { + p.fmt.fmtFlags.sharp = false; + p.fmt.fmtFlags.sharpV = true; + } + }; + pp.prototype.restoreSpecialFlags = function(plusV, sharpV) { return this.$val.restoreSpecialFlags(plusV, sharpV); }; + pp.ptr.prototype.handleMethods = function(verb, depth) { + var $deferred = [], $err = null, _ref, _ref$1, _tuple, _tuple$1, _tuple$2, depth, formatter, handled = false, ok, ok$1, p, stringer, v, verb; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.erroring) { + return handled; + } + _tuple = $assertType(p.arg, Formatter, true); formatter = _tuple[0]; ok = _tuple[1]; + if (ok) { + handled = true; + _tuple$1 = p.clearSpecialFlags(); + $deferred.push([$methodVal(p, "restoreSpecialFlags"), [_tuple$1[0], _tuple$1[1]]]); + $deferred.push([$methodVal(p, "catchPanic"), [p.arg, verb]]); + formatter.Format(p, verb); + return handled; + } + if (p.fmt.fmtFlags.sharpV) { + _tuple$2 = $assertType(p.arg, GoStringer, true); stringer = _tuple$2[0]; ok$1 = _tuple$2[1]; + if (ok$1) { + handled = true; + $deferred.push([$methodVal(p, "catchPanic"), [p.arg, verb]]); + p.fmt.fmt_s(stringer.GoString()); + return handled; + } + } else { + _ref = verb; + if (_ref === 118 || _ref === 115 || _ref === 120 || _ref === 88 || _ref === 113) { + _ref$1 = p.arg; + if ($assertType(_ref$1, $error, true)[1]) { + v = _ref$1; + handled = true; + $deferred.push([$methodVal(p, "catchPanic"), [p.arg, verb]]); + p.printArg(new $String(v.Error()), verb, depth); + return handled; + } else if ($assertType(_ref$1, Stringer, true)[1]) { + v = _ref$1; + handled = true; + $deferred.push([$methodVal(p, "catchPanic"), [p.arg, verb]]); + p.printArg(new $String(v.String()), verb, depth); + return handled; + } + } + } + handled = false; + return handled; + /* */ } catch(err) { $err = err; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); return handled; } + }; + pp.prototype.handleMethods = function(verb, depth) { return this.$val.handleMethods(verb, depth); }; + pp.ptr.prototype.printArg = function(arg, verb, depth) { + var _ref, _ref$1, arg, depth, f, handled, p, verb, wasString = false; + p = this; + p.arg = arg; + p.value = new reflect.Value.ptr(ptrType$2.nil, 0, 0); + if ($interfaceIsEqual(arg, $ifaceNil)) { + if ((verb === 84) || (verb === 118)) { + p.fmt.pad(nilAngleBytes); + } else { + p.badVerb(verb); + } + wasString = false; + return wasString; + } + _ref = verb; + if (_ref === 84) { + p.printArg(new $String(reflect.TypeOf(arg).String()), 115, 0); + wasString = false; + return wasString; + } else if (_ref === 112) { + p.fmtPointer(reflect.ValueOf(arg), verb); + wasString = false; + return wasString; + } + _ref$1 = arg; + if ($assertType(_ref$1, $Bool, true)[1]) { + f = _ref$1.$val; + p.fmtBool(f, verb); + } else if ($assertType(_ref$1, $Float32, true)[1]) { + f = _ref$1.$val; + p.fmtFloat32(f, verb); + } else if ($assertType(_ref$1, $Float64, true)[1]) { + f = _ref$1.$val; + p.fmtFloat64(f, verb); + } else if ($assertType(_ref$1, $Complex64, true)[1]) { + f = _ref$1.$val; + p.fmtComplex64(f, verb); + } else if ($assertType(_ref$1, $Complex128, true)[1]) { + f = _ref$1.$val; + p.fmtComplex128(f, verb); + } else if ($assertType(_ref$1, $Int, true)[1]) { + f = _ref$1.$val; + p.fmtInt64(new $Int64(0, f), verb); + } else if ($assertType(_ref$1, $Int8, true)[1]) { + f = _ref$1.$val; + p.fmtInt64(new $Int64(0, f), verb); + } else if ($assertType(_ref$1, $Int16, true)[1]) { + f = _ref$1.$val; + p.fmtInt64(new $Int64(0, f), verb); + } else if ($assertType(_ref$1, $Int32, true)[1]) { + f = _ref$1.$val; + p.fmtInt64(new $Int64(0, f), verb); + } else if ($assertType(_ref$1, $Int64, true)[1]) { + f = _ref$1.$val; + p.fmtInt64(f, verb); + } else if ($assertType(_ref$1, $Uint, true)[1]) { + f = _ref$1.$val; + p.fmtUint64(new $Uint64(0, f), verb); + } else if ($assertType(_ref$1, $Uint8, true)[1]) { + f = _ref$1.$val; + p.fmtUint64(new $Uint64(0, f), verb); + } else if ($assertType(_ref$1, $Uint16, true)[1]) { + f = _ref$1.$val; + p.fmtUint64(new $Uint64(0, f), verb); + } else if ($assertType(_ref$1, $Uint32, true)[1]) { + f = _ref$1.$val; + p.fmtUint64(new $Uint64(0, f), verb); + } else if ($assertType(_ref$1, $Uint64, true)[1]) { + f = _ref$1.$val; + p.fmtUint64(f, verb); + } else if ($assertType(_ref$1, $Uintptr, true)[1]) { + f = _ref$1.$val; + p.fmtUint64(new $Uint64(0, f.constructor === Number ? f : 1), verb); + } else if ($assertType(_ref$1, $String, true)[1]) { + f = _ref$1.$val; + p.fmtString(f, verb); + wasString = (verb === 115) || (verb === 118); + } else if ($assertType(_ref$1, sliceType, true)[1]) { + f = _ref$1.$val; + p.fmtBytes(f, verb, $ifaceNil, depth); + wasString = verb === 115; + } else { + f = _ref$1; + handled = p.handleMethods(verb, depth); + if (handled) { + wasString = false; + return wasString; + } + wasString = p.printReflectValue(reflect.ValueOf(arg), verb, depth); + return wasString; + } + p.arg = $ifaceNil; + return wasString; + }; + pp.prototype.printArg = function(arg, verb, depth) { return this.$val.printArg(arg, verb, depth); }; + pp.ptr.prototype.printValue = function(value, verb, depth) { + var _ref, depth, handled, p, value, verb, wasString = false; + p = this; + value = value; + if (!value.IsValid()) { + if ((verb === 84) || (verb === 118)) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(nilAngleBytes); + } else { + p.badVerb(verb); + } + wasString = false; + return wasString; + } + _ref = verb; + if (_ref === 84) { + p.printArg(new $String(value.Type().String()), 115, 0); + wasString = false; + return wasString; + } else if (_ref === 112) { + p.fmtPointer(value, verb); + wasString = false; + return wasString; + } + p.arg = $ifaceNil; + if (value.CanInterface()) { + p.arg = value.Interface(); + } + handled = p.handleMethods(verb, depth); + if (handled) { + wasString = false; + return wasString; + } + wasString = p.printReflectValue(value, verb, depth); + return wasString; + }; + pp.prototype.printValue = function(value, verb, depth) { return this.$val.printValue(value, verb, depth); }; + pp.ptr.prototype.printReflectValue = function(value, verb, depth) { + var _i, _i$1, _ref, _ref$1, _ref$2, _ref$3, a, bytes, depth, f, f$1, i, i$1, i$2, i$3, key, keys, oldValue, p, t, typ, v, v$1, value, value$1, verb, wasString = false, x; + p = this; + value = value; + oldValue = p.value; + p.value = value; + f = value; + _ref = f.Kind(); + BigSwitch: + switch (0) { default: if (_ref === 1) { + p.fmtBool(f.Bool(), verb); + } else if (_ref === 2 || _ref === 3 || _ref === 4 || _ref === 5 || _ref === 6) { + p.fmtInt64(f.Int(), verb); + } else if (_ref === 7 || _ref === 8 || _ref === 9 || _ref === 10 || _ref === 11 || _ref === 12) { + p.fmtUint64(f.Uint(), verb); + } else if (_ref === 13 || _ref === 14) { + if (f.Type().Size() === 4) { + p.fmtFloat32(f.Float(), verb); + } else { + p.fmtFloat64(f.Float(), verb); + } + } else if (_ref === 15 || _ref === 16) { + if (f.Type().Size() === 8) { + p.fmtComplex64((x = f.Complex(), new $Complex64(x.$real, x.$imag)), verb); + } else { + p.fmtComplex128(f.Complex(), verb); + } + } else if (_ref === 24) { + p.fmtString(f.String(), verb); + } else if (_ref === 21) { + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(f.Type().String()); + if (f.IsNil()) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString("(nil)"); + break; + } + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(123); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(mapBytes); + } + keys = f.MapKeys(); + _ref$1 = keys; + _i = 0; + while (true) { + if (!(_i < _ref$1.$length)) { break; } + i = _i; + key = ((_i < 0 || _i >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i]); + if (i > 0) { + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(commaSpaceBytes); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(32); + } + } + p.printValue(key, verb, depth + 1 >> 0); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(58); + p.printValue(f.MapIndex(key), verb, depth + 1 >> 0); + _i++; + } + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(125); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(93); + } + } else if (_ref === 25) { + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(value.Type().String()); + } + p.add(123); + v = f; + t = v.Type(); + i$1 = 0; + while (true) { + if (!(i$1 < v.NumField())) { break; } + if (i$1 > 0) { + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(commaSpaceBytes); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(32); + } + } + if (p.fmt.fmtFlags.plusV || p.fmt.fmtFlags.sharpV) { + f$1 = $clone(t.Field(i$1), reflect.StructField); + if (!(f$1.Name === "")) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(f$1.Name); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(58); + } + } + p.printValue(getField(v, i$1), verb, depth + 1 >> 0); + i$1 = i$1 + (1) >> 0; + } + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(125); + } else if (_ref === 20) { + value$1 = f.Elem(); + if (!value$1.IsValid()) { + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(f.Type().String()); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(nilParenBytes); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(nilAngleBytes); + } + } else { + wasString = p.printValue(value$1, verb, depth + 1 >> 0); + } + } else if (_ref === 17 || _ref === 23) { + typ = f.Type(); + if ((typ.Elem().Kind() === 8) && ($interfaceIsEqual(typ.Elem(), byteType) || (verb === 115) || (verb === 113) || (verb === 120))) { + bytes = sliceType.nil; + if (f.Kind() === 23) { + bytes = f.Bytes(); + } else if (f.CanAddr()) { + bytes = f.Slice(0, f.Len()).Bytes(); + } else { + bytes = $makeSlice(sliceType, f.Len()); + _ref$2 = bytes; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$2.$length)) { break; } + i$2 = _i$1; + (i$2 < 0 || i$2 >= bytes.$length) ? $throwRuntimeError("index out of range") : bytes.$array[bytes.$offset + i$2] = (f.Index(i$2).Uint().$low << 24 >>> 24); + _i$1++; + } + } + p.fmtBytes(bytes, verb, typ, depth); + wasString = verb === 115; + break; + } + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(value.Type().String()); + if ((f.Kind() === 23) && f.IsNil()) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString("(nil)"); + break; + } + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(123); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(91); + } + i$3 = 0; + while (true) { + if (!(i$3 < f.Len())) { break; } + if (i$3 > 0) { + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(commaSpaceBytes); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(32); + } + } + p.printValue(f.Index(i$3), verb, depth + 1 >> 0); + i$3 = i$3 + (1) >> 0; + } + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(125); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(93); + } + } else if (_ref === 22) { + v$1 = f.Pointer(); + if (!((v$1 === 0)) && (depth === 0)) { + a = f.Elem(); + _ref$3 = a.Kind(); + if (_ref$3 === 17 || _ref$3 === 23) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(38); + p.printValue(a, verb, depth + 1 >> 0); + break BigSwitch; + } else if (_ref$3 === 25) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(38); + p.printValue(a, verb, depth + 1 >> 0); + break BigSwitch; + } else if (_ref$3 === 21) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(38); + p.printValue(a, verb, depth + 1 >> 0); + break BigSwitch; + } + } + p.fmtPointer(value, verb); + } else if (_ref === 18 || _ref === 19 || _ref === 26) { + p.fmtPointer(value, verb); + } else { + p.unknownType(f); + } } + p.value = oldValue; + wasString = wasString; + return wasString; + }; + pp.prototype.printReflectValue = function(value, verb, depth) { return this.$val.printReflectValue(value, verb, depth); }; + intFromArg = function(a, argNum) { + var _tuple, a, argNum, isInt = false, newArgNum = 0, num = 0; + newArgNum = argNum; + if (argNum < a.$length) { + _tuple = $assertType(((argNum < 0 || argNum >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + argNum]), $Int, true); num = _tuple[0]; isInt = _tuple[1]; + newArgNum = argNum + 1 >> 0; + } + return [num, isInt, newArgNum]; + }; + parseArgNumber = function(format) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, format, i, index = 0, newi, ok = false, ok$1, wid = 0, width; + i = 1; + while (true) { + if (!(i < format.length)) { break; } + if (format.charCodeAt(i) === 93) { + _tuple = parsenum(format, 1, i); width = _tuple[0]; ok$1 = _tuple[1]; newi = _tuple[2]; + if (!ok$1 || !((newi === i))) { + _tmp = 0; _tmp$1 = i + 1 >> 0; _tmp$2 = false; index = _tmp; wid = _tmp$1; ok = _tmp$2; + return [index, wid, ok]; + } + _tmp$3 = width - 1 >> 0; _tmp$4 = i + 1 >> 0; _tmp$5 = true; index = _tmp$3; wid = _tmp$4; ok = _tmp$5; + return [index, wid, ok]; + } + i = i + (1) >> 0; + } + _tmp$6 = 0; _tmp$7 = 1; _tmp$8 = false; index = _tmp$6; wid = _tmp$7; ok = _tmp$8; + return [index, wid, ok]; + }; + pp.ptr.prototype.argNumber = function(argNum, format, i, numArgs) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, argNum, format, found = false, i, index, newArgNum = 0, newi = 0, numArgs, ok, p, wid; + p = this; + if (format.length <= i || !((format.charCodeAt(i) === 91))) { + _tmp = argNum; _tmp$1 = i; _tmp$2 = false; newArgNum = _tmp; newi = _tmp$1; found = _tmp$2; + return [newArgNum, newi, found]; + } + p.reordered = true; + _tuple = parseArgNumber(format.substring(i)); index = _tuple[0]; wid = _tuple[1]; ok = _tuple[2]; + if (ok && 0 <= index && index < numArgs) { + _tmp$3 = index; _tmp$4 = i + wid >> 0; _tmp$5 = true; newArgNum = _tmp$3; newi = _tmp$4; found = _tmp$5; + return [newArgNum, newi, found]; + } + p.goodArgNum = false; + _tmp$6 = argNum; _tmp$7 = i + wid >> 0; _tmp$8 = true; newArgNum = _tmp$6; newi = _tmp$7; found = _tmp$8; + return [newArgNum, newi, found]; + }; + pp.prototype.argNumber = function(argNum, format, i, numArgs) { return this.$val.argNumber(argNum, format, i, numArgs); }; + pp.ptr.prototype.doPrintf = function(format, a) { + var _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, a, afterIndex, arg, arg$1, argNum, c, end, format, i, lasti, p, w; + p = this; + end = format.length; + argNum = 0; + afterIndex = false; + p.reordered = false; + i = 0; + while (true) { + if (!(i < end)) { break; } + p.goodArgNum = true; + lasti = i; + while (true) { + if (!(i < end && !((format.charCodeAt(i) === 37)))) { break; } + i = i + (1) >> 0; + } + if (i > lasti) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(format.substring(lasti, i)); + } + if (i >= end) { + break; + } + i = i + (1) >> 0; + p.fmt.clearflags(); + F: + while (true) { + if (!(i < end)) { break; } + _ref = format.charCodeAt(i); + if (_ref === 35) { + p.fmt.fmtFlags.sharp = true; + } else if (_ref === 48) { + p.fmt.fmtFlags.zero = true; + } else if (_ref === 43) { + p.fmt.fmtFlags.plus = true; + } else if (_ref === 45) { + p.fmt.fmtFlags.minus = true; + } else if (_ref === 32) { + p.fmt.fmtFlags.space = true; + } else { + break F; + } + i = i + (1) >> 0; + } + _tuple = p.argNumber(argNum, format, i, a.$length); argNum = _tuple[0]; i = _tuple[1]; afterIndex = _tuple[2]; + if (i < end && (format.charCodeAt(i) === 42)) { + i = i + (1) >> 0; + _tuple$1 = intFromArg(a, argNum); p.fmt.wid = _tuple$1[0]; p.fmt.fmtFlags.widPresent = _tuple$1[1]; argNum = _tuple$1[2]; + if (!p.fmt.fmtFlags.widPresent) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(badWidthBytes); + } + afterIndex = false; + } else { + _tuple$2 = parsenum(format, i, end); p.fmt.wid = _tuple$2[0]; p.fmt.fmtFlags.widPresent = _tuple$2[1]; i = _tuple$2[2]; + if (afterIndex && p.fmt.fmtFlags.widPresent) { + p.goodArgNum = false; + } + } + if ((i + 1 >> 0) < end && (format.charCodeAt(i) === 46)) { + i = i + (1) >> 0; + if (afterIndex) { + p.goodArgNum = false; + } + _tuple$3 = p.argNumber(argNum, format, i, a.$length); argNum = _tuple$3[0]; i = _tuple$3[1]; afterIndex = _tuple$3[2]; + if (format.charCodeAt(i) === 42) { + i = i + (1) >> 0; + _tuple$4 = intFromArg(a, argNum); p.fmt.prec = _tuple$4[0]; p.fmt.fmtFlags.precPresent = _tuple$4[1]; argNum = _tuple$4[2]; + if (!p.fmt.fmtFlags.precPresent) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(badPrecBytes); + } + afterIndex = false; + } else { + _tuple$5 = parsenum(format, i, end); p.fmt.prec = _tuple$5[0]; p.fmt.fmtFlags.precPresent = _tuple$5[1]; i = _tuple$5[2]; + if (!p.fmt.fmtFlags.precPresent) { + p.fmt.prec = 0; + p.fmt.fmtFlags.precPresent = true; + } + } + } + if (!afterIndex) { + _tuple$6 = p.argNumber(argNum, format, i, a.$length); argNum = _tuple$6[0]; i = _tuple$6[1]; afterIndex = _tuple$6[2]; + } + if (i >= end) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(noVerbBytes); + continue; + } + _tuple$7 = utf8.DecodeRuneInString(format.substring(i)); c = _tuple$7[0]; w = _tuple$7[1]; + i = i + (w) >> 0; + if (c === 37) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(37); + continue; + } + if (!p.goodArgNum) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(percentBangBytes); + p.add(c); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(badIndexBytes); + continue; + } else if (argNum >= a.$length) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(percentBangBytes); + p.add(c); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(missingBytes); + continue; + } + arg = ((argNum < 0 || argNum >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + argNum]); + argNum = argNum + (1) >> 0; + if (c === 118) { + if (p.fmt.fmtFlags.sharp) { + p.fmt.fmtFlags.sharp = false; + p.fmt.fmtFlags.sharpV = true; + } + if (p.fmt.fmtFlags.plus) { + p.fmt.fmtFlags.plus = false; + p.fmt.fmtFlags.plusV = true; + } + } + p.printArg(arg, c, 0); + } + if (!p.reordered && argNum < a.$length) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(extraBytes); + while (true) { + if (!(argNum < a.$length)) { break; } + arg$1 = ((argNum < 0 || argNum >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + argNum]); + if (!($interfaceIsEqual(arg$1, $ifaceNil))) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(reflect.TypeOf(arg$1).String()); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(61); + } + p.printArg(arg$1, 118, 0); + if ((argNum + 1 >> 0) < a.$length) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(commaSpaceBytes); + } + argNum = argNum + (1) >> 0; + } + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(41); + } + }; + pp.prototype.doPrintf = function(format, a) { return this.$val.doPrintf(format, a); }; + pp.ptr.prototype.doPrint = function(a, addspace, addnewline) { + var a, addnewline, addspace, arg, argNum, isString, p, prevString; + p = this; + prevString = false; + argNum = 0; + while (true) { + if (!(argNum < a.$length)) { break; } + p.fmt.clearflags(); + arg = ((argNum < 0 || argNum >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + argNum]); + if (argNum > 0) { + isString = !($interfaceIsEqual(arg, $ifaceNil)) && (reflect.TypeOf(arg).Kind() === 24); + if (addspace || !isString && !prevString) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(32); + } + } + prevString = p.printArg(arg, 118, 0); + argNum = argNum + (1) >> 0; + } + if (addnewline) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(10); + } + }; + pp.prototype.doPrint = function(a, addspace, addnewline) { return this.$val.doPrint(a, addspace, addnewline); }; + ss.ptr.prototype.Read = function(buf) { + var _tmp, _tmp$1, buf, err = $ifaceNil, n = 0, s; + s = this; + _tmp = 0; _tmp$1 = errors.New("ScanState's Read should not be called. Use ReadRune"); n = _tmp; err = _tmp$1; + return [n, err]; + }; + ss.prototype.Read = function(buf) { return this.$val.Read(buf); }; + ss.ptr.prototype.ReadRune = function() { + var _tuple, err = $ifaceNil, r = 0, s, size = 0; + s = this; + if (s.peekRune >= 0) { + s.count = s.count + (1) >> 0; + r = s.peekRune; + size = utf8.RuneLen(r); + s.prevRune = r; + s.peekRune = -1; + return [r, size, err]; + } + if (s.atEOF || s.ssave.nlIsEnd && (s.prevRune === 10) || s.count >= s.ssave.argLimit) { + err = io.EOF; + return [r, size, err]; + } + _tuple = s.rr.ReadRune(); r = _tuple[0]; size = _tuple[1]; err = _tuple[2]; + if ($interfaceIsEqual(err, $ifaceNil)) { + s.count = s.count + (1) >> 0; + s.prevRune = r; + } else if ($interfaceIsEqual(err, io.EOF)) { + s.atEOF = true; + } + return [r, size, err]; + }; + ss.prototype.ReadRune = function() { return this.$val.ReadRune(); }; + ss.ptr.prototype.Width = function() { + var _tmp, _tmp$1, _tmp$2, _tmp$3, ok = false, s, wid = 0; + s = this; + if (s.ssave.maxWid === 1073741824) { + _tmp = 0; _tmp$1 = false; wid = _tmp; ok = _tmp$1; + return [wid, ok]; + } + _tmp$2 = s.ssave.maxWid; _tmp$3 = true; wid = _tmp$2; ok = _tmp$3; + return [wid, ok]; + }; + ss.prototype.Width = function() { return this.$val.Width(); }; + ss.ptr.prototype.getRune = function() { + var _tuple, err, r = 0, s; + s = this; + _tuple = s.ReadRune(); r = _tuple[0]; err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + if ($interfaceIsEqual(err, io.EOF)) { + r = -1; + return r; + } + s.error(err); + } + return r; + }; + ss.prototype.getRune = function() { return this.$val.getRune(); }; + ss.ptr.prototype.UnreadRune = function() { + var _tuple, ok, s, u; + s = this; + _tuple = $assertType(s.rr, runeUnreader, true); u = _tuple[0]; ok = _tuple[1]; + if (ok) { + u.UnreadRune(); + } else { + s.peekRune = s.prevRune; + } + s.prevRune = -1; + s.count = s.count - (1) >> 0; + return $ifaceNil; + }; + ss.prototype.UnreadRune = function() { return this.$val.UnreadRune(); }; + ss.ptr.prototype.error = function(err) { + var err, s, x; + s = this; + $panic((x = new scanError.ptr(err), new x.constructor.elem(x))); + }; + ss.prototype.error = function(err) { return this.$val.error(err); }; + ss.ptr.prototype.errorString = function(err) { + var err, s, x; + s = this; + $panic((x = new scanError.ptr(errors.New(err)), new x.constructor.elem(x))); + }; + ss.prototype.errorString = function(err) { return this.$val.errorString(err); }; + ss.ptr.prototype.Token = function(skipSpace, f) { + var $deferred = [], $err = null, err = $ifaceNil, f, s, skipSpace, tok = sliceType.nil; + /* */ try { $deferFrames.push($deferred); + s = this; + $deferred.push([(function() { + var _tuple, e, ok, se; + e = $recover(); + if (!($interfaceIsEqual(e, $ifaceNil))) { + _tuple = $assertType(e, scanError, true); se = $clone(_tuple[0], scanError); ok = _tuple[1]; + if (ok) { + err = se.err; + } else { + $panic(e); + } + } + }), []]); + if (f === $throwNilPointerError) { + f = notSpace; + } + s.buf = $subslice(s.buf, 0, 0); + tok = s.token(skipSpace, f); + return [tok, err]; + /* */ } catch(err) { $err = err; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); return [tok, err]; } + }; + ss.prototype.Token = function(skipSpace, f) { return this.$val.Token(skipSpace, f); }; + isSpace = function(r) { + var _i, _ref, r, rng, rx; + if (r >= 65536) { + return false; + } + rx = (r << 16 >>> 16); + _ref = space; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + rng = $clone(((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]), arrayType); + if (rx < rng[0]) { + return false; + } + if (rx <= rng[1]) { + return true; + } + _i++; + } + return false; + }; + notSpace = function(r) { + var r; + return !isSpace(r); + }; + ss.ptr.prototype.SkipSpace = function() { + var s; + s = this; + s.skipSpace(false); + }; + ss.prototype.SkipSpace = function() { return this.$val.SkipSpace(); }; + ss.ptr.prototype.free = function(old) { + var old, s; + s = this; + old = $clone(old, ssave); + if (old.validSave) { + $copy(s.ssave, old, ssave); + return; + } + if (s.buf.$capacity > 1024) { + return; + } + s.buf = $subslice(s.buf, 0, 0); + s.rr = $ifaceNil; + ssFree.Put(s); + }; + ss.prototype.free = function(old) { return this.$val.free(old); }; + ss.ptr.prototype.skipSpace = function(stopAtNewline) { + var r, s, stopAtNewline; + s = this; + while (true) { + if (!(true)) { break; } + r = s.getRune(); + if (r === -1) { + return; + } + if ((r === 13) && s.peek("\n")) { + continue; + } + if (r === 10) { + if (stopAtNewline) { + break; + } + if (s.ssave.nlIsSpace) { + continue; + } + s.errorString("unexpected newline"); + return; + } + if (!isSpace(r)) { + s.UnreadRune(); + break; + } + } + }; + ss.prototype.skipSpace = function(stopAtNewline) { return this.$val.skipSpace(stopAtNewline); }; + ss.ptr.prototype.token = function(skipSpace, f) { + var f, r, s, skipSpace, x; + s = this; + if (skipSpace) { + s.skipSpace(false); + } + while (true) { + if (!(true)) { break; } + r = s.getRune(); + if (r === -1) { + break; + } + if (!f(r)) { + s.UnreadRune(); + break; + } + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, s).WriteRune(r); + } + return (x = s.buf, $subslice(new sliceType(x.$array), x.$offset, x.$offset + x.$length)); + }; + ss.prototype.token = function(skipSpace, f) { return this.$val.token(skipSpace, f); }; + indexRune = function(s, r) { + var _i, _ref, _rune, c, i, r, s; + _ref = s; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + i = _i; + c = _rune[0]; + if (c === r) { + return i; + } + _i += _rune[1]; + } + return -1; + }; + ss.ptr.prototype.peek = function(ok) { + var ok, r, s; + s = this; + r = s.getRune(); + if (!((r === -1))) { + s.UnreadRune(); + } + return indexRune(ok, r) >= 0; + }; + ss.prototype.peek = function(ok) { return this.$val.peek(ok); }; + ptrType$25.methods = [{prop: "clearflags", name: "clearflags", pkg: "fmt", typ: $funcType([], [], false)}, {prop: "init", name: "init", pkg: "fmt", typ: $funcType([ptrType$1], [], false)}, {prop: "computePadding", name: "computePadding", pkg: "fmt", typ: $funcType([$Int], [sliceType, $Int, $Int], false)}, {prop: "writePadding", name: "writePadding", pkg: "fmt", typ: $funcType([$Int, sliceType], [], false)}, {prop: "pad", name: "pad", pkg: "fmt", typ: $funcType([sliceType], [], false)}, {prop: "padString", name: "padString", pkg: "fmt", typ: $funcType([$String], [], false)}, {prop: "fmt_boolean", name: "fmt_boolean", pkg: "fmt", typ: $funcType([$Bool], [], false)}, {prop: "integer", name: "integer", pkg: "fmt", typ: $funcType([$Int64, $Uint64, $Bool, $String], [], false)}, {prop: "truncate", name: "truncate", pkg: "fmt", typ: $funcType([$String], [$String], false)}, {prop: "fmt_s", name: "fmt_s", pkg: "fmt", typ: $funcType([$String], [], false)}, {prop: "fmt_sbx", name: "fmt_sbx", pkg: "fmt", typ: $funcType([$String, sliceType, $String], [], false)}, {prop: "fmt_sx", name: "fmt_sx", pkg: "fmt", typ: $funcType([$String, $String], [], false)}, {prop: "fmt_bx", name: "fmt_bx", pkg: "fmt", typ: $funcType([sliceType, $String], [], false)}, {prop: "fmt_q", name: "fmt_q", pkg: "fmt", typ: $funcType([$String], [], false)}, {prop: "fmt_qc", name: "fmt_qc", pkg: "fmt", typ: $funcType([$Int64], [], false)}, {prop: "formatFloat", name: "formatFloat", pkg: "fmt", typ: $funcType([$Float64, $Uint8, $Int, $Int], [], false)}, {prop: "fmt_e64", name: "fmt_e64", pkg: "fmt", typ: $funcType([$Float64], [], false)}, {prop: "fmt_E64", name: "fmt_E64", pkg: "fmt", typ: $funcType([$Float64], [], false)}, {prop: "fmt_f64", name: "fmt_f64", pkg: "fmt", typ: $funcType([$Float64], [], false)}, {prop: "fmt_g64", name: "fmt_g64", pkg: "fmt", typ: $funcType([$Float64], [], false)}, {prop: "fmt_G64", name: "fmt_G64", pkg: "fmt", typ: $funcType([$Float64], [], false)}, {prop: "fmt_fb64", name: "fmt_fb64", pkg: "fmt", typ: $funcType([$Float64], [], false)}, {prop: "fmt_e32", name: "fmt_e32", pkg: "fmt", typ: $funcType([$Float32], [], false)}, {prop: "fmt_E32", name: "fmt_E32", pkg: "fmt", typ: $funcType([$Float32], [], false)}, {prop: "fmt_f32", name: "fmt_f32", pkg: "fmt", typ: $funcType([$Float32], [], false)}, {prop: "fmt_g32", name: "fmt_g32", pkg: "fmt", typ: $funcType([$Float32], [], false)}, {prop: "fmt_G32", name: "fmt_G32", pkg: "fmt", typ: $funcType([$Float32], [], false)}, {prop: "fmt_fb32", name: "fmt_fb32", pkg: "fmt", typ: $funcType([$Float32], [], false)}, {prop: "fmt_c64", name: "fmt_c64", pkg: "fmt", typ: $funcType([$Complex64, $Int32], [], false)}, {prop: "fmt_c128", name: "fmt_c128", pkg: "fmt", typ: $funcType([$Complex128, $Int32], [], false)}, {prop: "fmt_complex", name: "fmt_complex", pkg: "fmt", typ: $funcType([$Float64, $Float64, $Int, $Int32], [], false)}]; + ptrType$1.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}, {prop: "WriteByte", name: "WriteByte", pkg: "", typ: $funcType([$Uint8], [$error], false)}, {prop: "WriteRune", name: "WriteRune", pkg: "", typ: $funcType([$Int32], [$error], false)}]; + ptrType.methods = [{prop: "free", name: "free", pkg: "fmt", typ: $funcType([], [], false)}, {prop: "Width", name: "Width", pkg: "", typ: $funcType([], [$Int, $Bool], false)}, {prop: "Precision", name: "Precision", pkg: "", typ: $funcType([], [$Int, $Bool], false)}, {prop: "Flag", name: "Flag", pkg: "", typ: $funcType([$Int], [$Bool], false)}, {prop: "add", name: "add", pkg: "fmt", typ: $funcType([$Int32], [], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "unknownType", name: "unknownType", pkg: "fmt", typ: $funcType([reflect.Value], [], false)}, {prop: "badVerb", name: "badVerb", pkg: "fmt", typ: $funcType([$Int32], [], false)}, {prop: "fmtBool", name: "fmtBool", pkg: "fmt", typ: $funcType([$Bool, $Int32], [], false)}, {prop: "fmtC", name: "fmtC", pkg: "fmt", typ: $funcType([$Int64], [], false)}, {prop: "fmtInt64", name: "fmtInt64", pkg: "fmt", typ: $funcType([$Int64, $Int32], [], false)}, {prop: "fmt0x64", name: "fmt0x64", pkg: "fmt", typ: $funcType([$Uint64, $Bool], [], false)}, {prop: "fmtUnicode", name: "fmtUnicode", pkg: "fmt", typ: $funcType([$Int64], [], false)}, {prop: "fmtUint64", name: "fmtUint64", pkg: "fmt", typ: $funcType([$Uint64, $Int32], [], false)}, {prop: "fmtFloat32", name: "fmtFloat32", pkg: "fmt", typ: $funcType([$Float32, $Int32], [], false)}, {prop: "fmtFloat64", name: "fmtFloat64", pkg: "fmt", typ: $funcType([$Float64, $Int32], [], false)}, {prop: "fmtComplex64", name: "fmtComplex64", pkg: "fmt", typ: $funcType([$Complex64, $Int32], [], false)}, {prop: "fmtComplex128", name: "fmtComplex128", pkg: "fmt", typ: $funcType([$Complex128, $Int32], [], false)}, {prop: "fmtString", name: "fmtString", pkg: "fmt", typ: $funcType([$String, $Int32], [], false)}, {prop: "fmtBytes", name: "fmtBytes", pkg: "fmt", typ: $funcType([sliceType, $Int32, reflect.Type, $Int], [], false)}, {prop: "fmtPointer", name: "fmtPointer", pkg: "fmt", typ: $funcType([reflect.Value, $Int32], [], false)}, {prop: "catchPanic", name: "catchPanic", pkg: "fmt", typ: $funcType([$emptyInterface, $Int32], [], false)}, {prop: "clearSpecialFlags", name: "clearSpecialFlags", pkg: "fmt", typ: $funcType([], [$Bool, $Bool], false)}, {prop: "restoreSpecialFlags", name: "restoreSpecialFlags", pkg: "fmt", typ: $funcType([$Bool, $Bool], [], false)}, {prop: "handleMethods", name: "handleMethods", pkg: "fmt", typ: $funcType([$Int32, $Int], [$Bool], false)}, {prop: "printArg", name: "printArg", pkg: "fmt", typ: $funcType([$emptyInterface, $Int32, $Int], [$Bool], false)}, {prop: "printValue", name: "printValue", pkg: "fmt", typ: $funcType([reflect.Value, $Int32, $Int], [$Bool], false)}, {prop: "printReflectValue", name: "printReflectValue", pkg: "fmt", typ: $funcType([reflect.Value, $Int32, $Int], [$Bool], false)}, {prop: "argNumber", name: "argNumber", pkg: "fmt", typ: $funcType([$Int, $String, $Int, $Int], [$Int, $Int, $Bool], false)}, {prop: "doPrintf", name: "doPrintf", pkg: "fmt", typ: $funcType([$String, sliceType$1], [], false)}, {prop: "doPrint", name: "doPrint", pkg: "fmt", typ: $funcType([sliceType$1, $Bool, $Bool], [], false)}]; + ptrType$5.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "ReadRune", name: "ReadRune", pkg: "", typ: $funcType([], [$Int32, $Int, $error], false)}, {prop: "Width", name: "Width", pkg: "", typ: $funcType([], [$Int, $Bool], false)}, {prop: "getRune", name: "getRune", pkg: "fmt", typ: $funcType([], [$Int32], false)}, {prop: "mustReadRune", name: "mustReadRune", pkg: "fmt", typ: $funcType([], [$Int32], false)}, {prop: "UnreadRune", name: "UnreadRune", pkg: "", typ: $funcType([], [$error], false)}, {prop: "error", name: "error", pkg: "fmt", typ: $funcType([$error], [], false)}, {prop: "errorString", name: "errorString", pkg: "fmt", typ: $funcType([$String], [], false)}, {prop: "Token", name: "Token", pkg: "", typ: $funcType([$Bool, funcType], [sliceType, $error], false)}, {prop: "SkipSpace", name: "SkipSpace", pkg: "", typ: $funcType([], [], false)}, {prop: "free", name: "free", pkg: "fmt", typ: $funcType([ssave], [], false)}, {prop: "skipSpace", name: "skipSpace", pkg: "fmt", typ: $funcType([$Bool], [], false)}, {prop: "token", name: "token", pkg: "fmt", typ: $funcType([$Bool, funcType], [sliceType], false)}, {prop: "consume", name: "consume", pkg: "fmt", typ: $funcType([$String, $Bool], [$Bool], false)}, {prop: "peek", name: "peek", pkg: "fmt", typ: $funcType([$String], [$Bool], false)}, {prop: "notEOF", name: "notEOF", pkg: "fmt", typ: $funcType([], [], false)}, {prop: "accept", name: "accept", pkg: "fmt", typ: $funcType([$String], [$Bool], false)}, {prop: "okVerb", name: "okVerb", pkg: "fmt", typ: $funcType([$Int32, $String, $String], [$Bool], false)}, {prop: "scanBool", name: "scanBool", pkg: "fmt", typ: $funcType([$Int32], [$Bool], false)}, {prop: "getBase", name: "getBase", pkg: "fmt", typ: $funcType([$Int32], [$Int, $String], false)}, {prop: "scanNumber", name: "scanNumber", pkg: "fmt", typ: $funcType([$String, $Bool], [$String], false)}, {prop: "scanRune", name: "scanRune", pkg: "fmt", typ: $funcType([$Int], [$Int64], false)}, {prop: "scanBasePrefix", name: "scanBasePrefix", pkg: "fmt", typ: $funcType([], [$Int, $String, $Bool], false)}, {prop: "scanInt", name: "scanInt", pkg: "fmt", typ: $funcType([$Int32, $Int], [$Int64], false)}, {prop: "scanUint", name: "scanUint", pkg: "fmt", typ: $funcType([$Int32, $Int], [$Uint64], false)}, {prop: "floatToken", name: "floatToken", pkg: "fmt", typ: $funcType([], [$String], false)}, {prop: "complexTokens", name: "complexTokens", pkg: "fmt", typ: $funcType([], [$String, $String], false)}, {prop: "convertFloat", name: "convertFloat", pkg: "fmt", typ: $funcType([$String, $Int], [$Float64], false)}, {prop: "scanComplex", name: "scanComplex", pkg: "fmt", typ: $funcType([$Int32, $Int], [$Complex128], false)}, {prop: "convertString", name: "convertString", pkg: "fmt", typ: $funcType([$Int32], [$String], false)}, {prop: "quotedString", name: "quotedString", pkg: "fmt", typ: $funcType([], [$String], false)}, {prop: "hexDigit", name: "hexDigit", pkg: "fmt", typ: $funcType([$Int32], [$Int], false)}, {prop: "hexByte", name: "hexByte", pkg: "fmt", typ: $funcType([], [$Uint8, $Bool], false)}, {prop: "hexString", name: "hexString", pkg: "fmt", typ: $funcType([], [$String], false)}, {prop: "scanOne", name: "scanOne", pkg: "fmt", typ: $funcType([$Int32, $emptyInterface], [], false)}, {prop: "doScan", name: "doScan", pkg: "fmt", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "advance", name: "advance", pkg: "fmt", typ: $funcType([$String], [$Int], false)}, {prop: "doScanf", name: "doScanf", pkg: "fmt", typ: $funcType([$String, sliceType$1], [$Int, $error], false)}]; + fmtFlags.init([{prop: "widPresent", name: "widPresent", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "precPresent", name: "precPresent", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "minus", name: "minus", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "plus", name: "plus", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "sharp", name: "sharp", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "space", name: "space", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "unicode", name: "unicode", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "uniQuote", name: "uniQuote", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "zero", name: "zero", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "plusV", name: "plusV", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "sharpV", name: "sharpV", pkg: "fmt", typ: $Bool, tag: ""}]); + fmt.init([{prop: "intbuf", name: "intbuf", pkg: "fmt", typ: arrayType$2, tag: ""}, {prop: "buf", name: "buf", pkg: "fmt", typ: ptrType$1, tag: ""}, {prop: "wid", name: "wid", pkg: "fmt", typ: $Int, tag: ""}, {prop: "prec", name: "prec", pkg: "fmt", typ: $Int, tag: ""}, {prop: "fmtFlags", name: "", pkg: "fmt", typ: fmtFlags, tag: ""}]); + State.init([{prop: "Flag", name: "Flag", pkg: "", typ: $funcType([$Int], [$Bool], false)}, {prop: "Precision", name: "Precision", pkg: "", typ: $funcType([], [$Int, $Bool], false)}, {prop: "Width", name: "Width", pkg: "", typ: $funcType([], [$Int, $Bool], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}]); + Formatter.init([{prop: "Format", name: "Format", pkg: "", typ: $funcType([State, $Int32], [], false)}]); + Stringer.init([{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]); + GoStringer.init([{prop: "GoString", name: "GoString", pkg: "", typ: $funcType([], [$String], false)}]); + buffer.init($Uint8); + pp.init([{prop: "n", name: "n", pkg: "fmt", typ: $Int, tag: ""}, {prop: "panicking", name: "panicking", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "erroring", name: "erroring", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "buf", name: "buf", pkg: "fmt", typ: buffer, tag: ""}, {prop: "arg", name: "arg", pkg: "fmt", typ: $emptyInterface, tag: ""}, {prop: "value", name: "value", pkg: "fmt", typ: reflect.Value, tag: ""}, {prop: "reordered", name: "reordered", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "goodArgNum", name: "goodArgNum", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "runeBuf", name: "runeBuf", pkg: "fmt", typ: arrayType$1, tag: ""}, {prop: "fmt", name: "fmt", pkg: "fmt", typ: fmt, tag: ""}]); + runeUnreader.init([{prop: "UnreadRune", name: "UnreadRune", pkg: "", typ: $funcType([], [$error], false)}]); + scanError.init([{prop: "err", name: "err", pkg: "fmt", typ: $error, tag: ""}]); + ss.init([{prop: "rr", name: "rr", pkg: "fmt", typ: io.RuneReader, tag: ""}, {prop: "buf", name: "buf", pkg: "fmt", typ: buffer, tag: ""}, {prop: "peekRune", name: "peekRune", pkg: "fmt", typ: $Int32, tag: ""}, {prop: "prevRune", name: "prevRune", pkg: "fmt", typ: $Int32, tag: ""}, {prop: "count", name: "count", pkg: "fmt", typ: $Int, tag: ""}, {prop: "atEOF", name: "atEOF", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "ssave", name: "", pkg: "fmt", typ: ssave, tag: ""}]); + ssave.init([{prop: "validSave", name: "validSave", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "nlIsEnd", name: "nlIsEnd", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "nlIsSpace", name: "nlIsSpace", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "argLimit", name: "argLimit", pkg: "fmt", typ: $Int, tag: ""}, {prop: "limit", name: "limit", pkg: "fmt", typ: $Int, tag: ""}, {prop: "maxWid", name: "maxWid", pkg: "fmt", typ: $Int, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_fmt = function() { while (true) { switch ($s) { case 0: + $r = errors.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = io.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = math.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = os.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = reflect.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + $r = strconv.$init($BLOCKING); /* */ $s = 6; case 6: if ($r && $r.$blocking) { $r = $r(); } + $r = sync.$init($BLOCKING); /* */ $s = 7; case 7: if ($r && $r.$blocking) { $r = $r(); } + $r = utf8.$init($BLOCKING); /* */ $s = 8; case 8: if ($r && $r.$blocking) { $r = $r(); } + padZeroBytes = $makeSlice(sliceType, 65); + padSpaceBytes = $makeSlice(sliceType, 65); + trueBytes = new sliceType($stringToBytes("true")); + falseBytes = new sliceType($stringToBytes("false")); + commaSpaceBytes = new sliceType($stringToBytes(", ")); + nilAngleBytes = new sliceType($stringToBytes("")); + nilParenBytes = new sliceType($stringToBytes("(nil)")); + nilBytes = new sliceType($stringToBytes("nil")); + mapBytes = new sliceType($stringToBytes("map[")); + percentBangBytes = new sliceType($stringToBytes("%!")); + missingBytes = new sliceType($stringToBytes("(MISSING)")); + badIndexBytes = new sliceType($stringToBytes("(BADINDEX)")); + panicBytes = new sliceType($stringToBytes("(PANIC=")); + extraBytes = new sliceType($stringToBytes("%!(EXTRA ")); + irparenBytes = new sliceType($stringToBytes("i)")); + bytesBytes = new sliceType($stringToBytes("[]byte{")); + badWidthBytes = new sliceType($stringToBytes("%!(BADWIDTH)")); + badPrecBytes = new sliceType($stringToBytes("%!(BADPREC)")); + noVerbBytes = new sliceType($stringToBytes("%!(NOVERB)")); + ppFree = new sync.Pool.ptr(0, 0, sliceType$1.nil, (function() { + return new pp.ptr(); + })); + intBits = reflect.TypeOf(new $Int(0)).Bits(); + uintptrBits = reflect.TypeOf(new $Uintptr(0)).Bits(); + byteType = reflect.TypeOf(new $Uint8(0)); + space = new sliceType$2([$toNativeArray($kindUint16, [9, 13]), $toNativeArray($kindUint16, [32, 32]), $toNativeArray($kindUint16, [133, 133]), $toNativeArray($kindUint16, [160, 160]), $toNativeArray($kindUint16, [5760, 5760]), $toNativeArray($kindUint16, [8192, 8202]), $toNativeArray($kindUint16, [8232, 8233]), $toNativeArray($kindUint16, [8239, 8239]), $toNativeArray($kindUint16, [8287, 8287]), $toNativeArray($kindUint16, [12288, 12288])]); + ssFree = new sync.Pool.ptr(0, 0, sliceType$1.nil, (function() { + return new ss.ptr(); + })); + complexError = errors.New("syntax error scanning complex number"); + boolError = errors.New("syntax error scanning boolean"); + init(); + /* */ } return; } }; $init_fmt.$blocking = true; return $init_fmt; + }; + return $pkg; +})(); +$packages["sort"] = (function() { + var $pkg = {}, StringSlice, sliceType$2, Search, SearchStrings, min, insertionSort, siftDown, heapSort, medianOfThree, swapRange, doPivot, quickSort, Sort; + StringSlice = $pkg.StringSlice = $newType(12, $kindSlice, "sort.StringSlice", "StringSlice", "sort", null); + sliceType$2 = $sliceType($String); + Search = $pkg.Search = function(n, f) { + var _q, _tmp, _tmp$1, f, h, i, j, n; + _tmp = 0; _tmp$1 = n; i = _tmp; j = _tmp$1; + while (true) { + if (!(i < j)) { break; } + h = i + (_q = ((j - i >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0; + if (!f(h)) { + i = h + 1 >> 0; + } else { + j = h; + } + } + return i; + }; + SearchStrings = $pkg.SearchStrings = function(a, x) { + var a, x; + return Search(a.$length, (function(i) { + var i; + return ((i < 0 || i >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + i]) >= x; + })); + }; + StringSlice.prototype.Search = function(x) { + var p, x; + p = this; + return SearchStrings($subslice(new sliceType$2(p.$array), p.$offset, p.$offset + p.$length), x); + }; + $ptrType(StringSlice).prototype.Search = function(x) { return this.$get().Search(x); }; + min = function(a, b) { + var a, b; + if (a < b) { + return a; + } + return b; + }; + insertionSort = function(data, a, b) { + var a, b, data, i, j; + i = a + 1 >> 0; + while (true) { + if (!(i < b)) { break; } + j = i; + while (true) { + if (!(j > a && data.Less(j, j - 1 >> 0))) { break; } + data.Swap(j, j - 1 >> 0); + j = j - (1) >> 0; + } + i = i + (1) >> 0; + } + }; + siftDown = function(data, lo, hi, first) { + var child, data, first, hi, lo, root; + root = lo; + while (true) { + if (!(true)) { break; } + child = (2 * root >> 0) + 1 >> 0; + if (child >= hi) { + break; + } + if ((child + 1 >> 0) < hi && data.Less(first + child >> 0, (first + child >> 0) + 1 >> 0)) { + child = child + (1) >> 0; + } + if (!data.Less(first + root >> 0, first + child >> 0)) { + return; + } + data.Swap(first + root >> 0, first + child >> 0); + root = child; + } + }; + heapSort = function(data, a, b) { + var _q, a, b, data, first, hi, i, i$1, lo; + first = a; + lo = 0; + hi = b - a >> 0; + i = (_q = ((hi - 1 >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + while (true) { + if (!(i >= 0)) { break; } + siftDown(data, i, hi, first); + i = i - (1) >> 0; + } + i$1 = hi - 1 >> 0; + while (true) { + if (!(i$1 >= 0)) { break; } + data.Swap(first, first + i$1 >> 0); + siftDown(data, lo, i$1, first); + i$1 = i$1 - (1) >> 0; + } + }; + medianOfThree = function(data, a, b, c) { + var a, b, c, data, m0, m1, m2; + m0 = b; + m1 = a; + m2 = c; + if (data.Less(m1, m0)) { + data.Swap(m1, m0); + } + if (data.Less(m2, m1)) { + data.Swap(m2, m1); + } + if (data.Less(m1, m0)) { + data.Swap(m1, m0); + } + }; + swapRange = function(data, a, b, n) { + var a, b, data, i, n; + i = 0; + while (true) { + if (!(i < n)) { break; } + data.Swap(a + i >> 0, b + i >> 0); + i = i + (1) >> 0; + } + }; + doPivot = function(data, lo, hi) { + var _q, _q$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, a, b, c, d, data, hi, lo, m, midhi = 0, midlo = 0, n, pivot, s; + m = lo + (_q = ((hi - lo >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0; + if ((hi - lo >> 0) > 40) { + s = (_q$1 = ((hi - lo >> 0)) / 8, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")); + medianOfThree(data, lo, lo + s >> 0, lo + (2 * s >> 0) >> 0); + medianOfThree(data, m, m - s >> 0, m + s >> 0); + medianOfThree(data, hi - 1 >> 0, (hi - 1 >> 0) - s >> 0, (hi - 1 >> 0) - (2 * s >> 0) >> 0); + } + medianOfThree(data, lo, m, hi - 1 >> 0); + pivot = lo; + _tmp = lo + 1 >> 0; _tmp$1 = lo + 1 >> 0; _tmp$2 = hi; _tmp$3 = hi; a = _tmp; b = _tmp$1; c = _tmp$2; d = _tmp$3; + while (true) { + if (!(true)) { break; } + while (true) { + if (!(b < c)) { break; } + if (data.Less(b, pivot)) { + b = b + (1) >> 0; + } else if (!data.Less(pivot, b)) { + data.Swap(a, b); + a = a + (1) >> 0; + b = b + (1) >> 0; + } else { + break; + } + } + while (true) { + if (!(b < c)) { break; } + if (data.Less(pivot, c - 1 >> 0)) { + c = c - (1) >> 0; + } else if (!data.Less(c - 1 >> 0, pivot)) { + data.Swap(c - 1 >> 0, d - 1 >> 0); + c = c - (1) >> 0; + d = d - (1) >> 0; + } else { + break; + } + } + if (b >= c) { + break; + } + data.Swap(b, c - 1 >> 0); + b = b + (1) >> 0; + c = c - (1) >> 0; + } + n = min(b - a >> 0, a - lo >> 0); + swapRange(data, lo, b - n >> 0, n); + n = min(hi - d >> 0, d - c >> 0); + swapRange(data, c, hi - n >> 0, n); + _tmp$4 = (lo + b >> 0) - a >> 0; _tmp$5 = hi - ((d - c >> 0)) >> 0; midlo = _tmp$4; midhi = _tmp$5; + return [midlo, midhi]; + }; + quickSort = function(data, a, b, maxDepth) { + var _tuple, a, b, data, maxDepth, mhi, mlo; + while (true) { + if (!((b - a >> 0) > 7)) { break; } + if (maxDepth === 0) { + heapSort(data, a, b); + return; + } + maxDepth = maxDepth - (1) >> 0; + _tuple = doPivot(data, a, b); mlo = _tuple[0]; mhi = _tuple[1]; + if ((mlo - a >> 0) < (b - mhi >> 0)) { + quickSort(data, a, mlo, maxDepth); + a = mhi; + } else { + quickSort(data, mhi, b, maxDepth); + b = mlo; + } + } + if ((b - a >> 0) > 1) { + insertionSort(data, a, b); + } + }; + Sort = $pkg.Sort = function(data) { + var data, i, maxDepth, n; + n = data.Len(); + maxDepth = 0; + i = n; + while (true) { + if (!(i > 0)) { break; } + maxDepth = maxDepth + (1) >> 0; + i = (i >> $min((1), 31)) >> 0; + } + maxDepth = maxDepth * (2) >> 0; + quickSort(data, 0, n, maxDepth); + }; + StringSlice.prototype.Len = function() { + var p; + p = this; + return p.$length; + }; + $ptrType(StringSlice).prototype.Len = function() { return this.$get().Len(); }; + StringSlice.prototype.Less = function(i, j) { + var i, j, p; + p = this; + return ((i < 0 || i >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + i]) < ((j < 0 || j >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + j]); + }; + $ptrType(StringSlice).prototype.Less = function(i, j) { return this.$get().Less(i, j); }; + StringSlice.prototype.Swap = function(i, j) { + var _tmp, _tmp$1, i, j, p; + p = this; + _tmp = ((j < 0 || j >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + j]); _tmp$1 = ((i < 0 || i >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + i]); (i < 0 || i >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + i] = _tmp; (j < 0 || j >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + j] = _tmp$1; + }; + $ptrType(StringSlice).prototype.Swap = function(i, j) { return this.$get().Swap(i, j); }; + StringSlice.prototype.Sort = function() { + var p; + p = this; + Sort(p); + }; + $ptrType(StringSlice).prototype.Sort = function() { return this.$get().Sort(); }; + StringSlice.methods = [{prop: "Search", name: "Search", pkg: "", typ: $funcType([$String], [$Int], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}, {prop: "Sort", name: "Sort", pkg: "", typ: $funcType([], [], false)}]; + StringSlice.init($String); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_sort = function() { while (true) { switch ($s) { case 0: + /* */ } return; } }; $init_sort.$blocking = true; return $init_sort; + }; + return $pkg; +})(); +$packages["regexp/syntax"] = (function() { + var $pkg = {}, bytes, sort, strconv, strings, unicode, utf8, patchList, frag, compiler, Error, ErrorCode, Flags, parser, charGroup, ranges, Prog, InstOp, EmptyOp, Inst, Regexp, Op, sliceType, sliceType$1, sliceType$2, sliceType$3, ptrType, sliceType$4, arrayType, arrayType$1, ptrType$1, ptrType$2, ptrType$3, ptrType$4, ptrType$5, ptrType$6, sliceType$5, ptrType$7, anyRuneNotNL, anyRune, anyTable, code1, code2, code3, perlGroup, code4, code5, code6, code7, code8, code9, code10, code11, code12, code13, code14, code15, code16, code17, posixGroup, instOpNames, _map, _key, _map$1, _key$1, Compile, minFoldRune, repeatIsValid, cleanAlt, literalRegexp, Parse, isValidCaptureName, isCharClass, matchRune, mergeCharClass, unicodeTable, cleanClass, appendLiteral, appendRange, appendFoldedRange, appendClass, appendFoldedClass, appendNegatedClass, appendTable, appendNegatedTable, negateClass, checkUTF8, nextRune, isalnum, unhex, EmptyOpContext, IsWordChar, wordRune, bw, dumpProg, u32, dumpInst, writeRegexp, escape, simplify1; + bytes = $packages["bytes"]; + sort = $packages["sort"]; + strconv = $packages["strconv"]; + strings = $packages["strings"]; + unicode = $packages["unicode"]; + utf8 = $packages["unicode/utf8"]; + patchList = $pkg.patchList = $newType(4, $kindUint32, "syntax.patchList", "patchList", "regexp/syntax", null); + frag = $pkg.frag = $newType(0, $kindStruct, "syntax.frag", "frag", "regexp/syntax", function(i_, out_) { + this.$val = this; + this.i = i_ !== undefined ? i_ : 0; + this.out = out_ !== undefined ? out_ : 0; + }); + compiler = $pkg.compiler = $newType(0, $kindStruct, "syntax.compiler", "compiler", "regexp/syntax", function(p_) { + this.$val = this; + this.p = p_ !== undefined ? p_ : ptrType$3.nil; + }); + Error = $pkg.Error = $newType(0, $kindStruct, "syntax.Error", "Error", "regexp/syntax", function(Code_, Expr_) { + this.$val = this; + this.Code = Code_ !== undefined ? Code_ : ""; + this.Expr = Expr_ !== undefined ? Expr_ : ""; + }); + ErrorCode = $pkg.ErrorCode = $newType(8, $kindString, "syntax.ErrorCode", "ErrorCode", "regexp/syntax", null); + Flags = $pkg.Flags = $newType(2, $kindUint16, "syntax.Flags", "Flags", "regexp/syntax", null); + parser = $pkg.parser = $newType(0, $kindStruct, "syntax.parser", "parser", "regexp/syntax", function(flags_, stack_, free_, numCap_, wholeRegexp_, tmpClass_) { + this.$val = this; + this.flags = flags_ !== undefined ? flags_ : 0; + this.stack = stack_ !== undefined ? stack_ : sliceType$4.nil; + this.free = free_ !== undefined ? free_ : ptrType.nil; + this.numCap = numCap_ !== undefined ? numCap_ : 0; + this.wholeRegexp = wholeRegexp_ !== undefined ? wholeRegexp_ : ""; + this.tmpClass = tmpClass_ !== undefined ? tmpClass_ : sliceType.nil; + }); + charGroup = $pkg.charGroup = $newType(0, $kindStruct, "syntax.charGroup", "charGroup", "regexp/syntax", function(sign_, class$1_) { + this.$val = this; + this.sign = sign_ !== undefined ? sign_ : 0; + this.class$1 = class$1_ !== undefined ? class$1_ : sliceType.nil; + }); + ranges = $pkg.ranges = $newType(0, $kindStruct, "syntax.ranges", "ranges", "regexp/syntax", function(p_) { + this.$val = this; + this.p = p_ !== undefined ? p_ : ptrType$1.nil; + }); + Prog = $pkg.Prog = $newType(0, $kindStruct, "syntax.Prog", "Prog", "regexp/syntax", function(Inst_, Start_, NumCap_) { + this.$val = this; + this.Inst = Inst_ !== undefined ? Inst_ : sliceType$5.nil; + this.Start = Start_ !== undefined ? Start_ : 0; + this.NumCap = NumCap_ !== undefined ? NumCap_ : 0; + }); + InstOp = $pkg.InstOp = $newType(1, $kindUint8, "syntax.InstOp", "InstOp", "regexp/syntax", null); + EmptyOp = $pkg.EmptyOp = $newType(1, $kindUint8, "syntax.EmptyOp", "EmptyOp", "regexp/syntax", null); + Inst = $pkg.Inst = $newType(0, $kindStruct, "syntax.Inst", "Inst", "regexp/syntax", function(Op_, Out_, Arg_, Rune_) { + this.$val = this; + this.Op = Op_ !== undefined ? Op_ : 0; + this.Out = Out_ !== undefined ? Out_ : 0; + this.Arg = Arg_ !== undefined ? Arg_ : 0; + this.Rune = Rune_ !== undefined ? Rune_ : sliceType.nil; + }); + Regexp = $pkg.Regexp = $newType(0, $kindStruct, "syntax.Regexp", "Regexp", "regexp/syntax", function(Op_, Flags_, Sub_, Sub0_, Rune_, Rune0_, Min_, Max_, Cap_, Name_) { + this.$val = this; + this.Op = Op_ !== undefined ? Op_ : 0; + this.Flags = Flags_ !== undefined ? Flags_ : 0; + this.Sub = Sub_ !== undefined ? Sub_ : sliceType$4.nil; + this.Sub0 = Sub0_ !== undefined ? Sub0_ : arrayType.zero(); + this.Rune = Rune_ !== undefined ? Rune_ : sliceType.nil; + this.Rune0 = Rune0_ !== undefined ? Rune0_ : arrayType$1.zero(); + this.Min = Min_ !== undefined ? Min_ : 0; + this.Max = Max_ !== undefined ? Max_ : 0; + this.Cap = Cap_ !== undefined ? Cap_ : 0; + this.Name = Name_ !== undefined ? Name_ : ""; + }); + Op = $pkg.Op = $newType(1, $kindUint8, "syntax.Op", "Op", "regexp/syntax", null); + sliceType = $sliceType($Int32); + sliceType$1 = $sliceType(unicode.Range16); + sliceType$2 = $sliceType(unicode.Range32); + sliceType$3 = $sliceType($String); + ptrType = $ptrType(Regexp); + sliceType$4 = $sliceType(ptrType); + arrayType = $arrayType(ptrType, 1); + arrayType$1 = $arrayType($Int32, 2); + ptrType$1 = $ptrType(sliceType); + ptrType$2 = $ptrType(unicode.RangeTable); + ptrType$3 = $ptrType(Prog); + ptrType$4 = $ptrType(compiler); + ptrType$5 = $ptrType(Error); + ptrType$6 = $ptrType(parser); + sliceType$5 = $sliceType(Inst); + ptrType$7 = $ptrType(Inst); + patchList.prototype.next = function(p) { + var i, l, p, x, x$1; + l = this.$val; + i = (x = p.Inst, x$1 = l >>> 1 >>> 0, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])); + if (((l & 1) >>> 0) === 0) { + return (i.Out >>> 0); + } + return (i.Arg >>> 0); + }; + $ptrType(patchList).prototype.next = function(p) { return new patchList(this.$get()).next(p); }; + patchList.prototype.patch = function(p, val) { + var i, l, p, val, x, x$1; + l = this.$val; + while (true) { + if (!(!((l === 0)))) { break; } + i = (x = p.Inst, x$1 = l >>> 1 >>> 0, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])); + if (((l & 1) >>> 0) === 0) { + l = (i.Out >>> 0); + i.Out = val; + } else { + l = (i.Arg >>> 0); + i.Arg = val; + } + } + }; + $ptrType(patchList).prototype.patch = function(p, val) { return new patchList(this.$get()).patch(p, val); }; + patchList.prototype.append = function(p, l2) { + var i, l1, l2, last, next, p, x, x$1; + l1 = this.$val; + if (l1 === 0) { + return l2; + } + if (l2 === 0) { + return l1; + } + last = l1; + while (true) { + if (!(true)) { break; } + next = new patchList(last).next(p); + if (next === 0) { + break; + } + last = next; + } + i = (x = p.Inst, x$1 = last >>> 1 >>> 0, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])); + if (((last & 1) >>> 0) === 0) { + i.Out = (l2 >>> 0); + } else { + i.Arg = (l2 >>> 0); + } + return l1; + }; + $ptrType(patchList).prototype.append = function(p, l2) { return new patchList(this.$get()).append(p, l2); }; + Compile = $pkg.Compile = function(re) { + var c, f, re; + c = $clone(new compiler.ptr(), compiler); + c.init(); + f = $clone(c.compile(re), frag); + new patchList(f.out).patch(c.p, c.inst(4).i); + c.p.Start = (f.i >> 0); + return [c.p, $ifaceNil]; + }; + compiler.ptr.prototype.init = function() { + var c; + c = this; + c.p = new Prog.ptr(); + c.p.NumCap = 2; + c.inst(5); + }; + compiler.prototype.init = function() { return this.$val.init(); }; + compiler.ptr.prototype.compile = function(re) { + var _i, _i$1, _i$2, _ref, _ref$1, _ref$2, _ref$3, bra, c, f, f$1, f$2, f1, i, j, ket, re, sub, sub$1, sub$2, x, x$1, x$2, x$3; + c = this; + _ref = re.Op; + if (_ref === 1) { + return c.fail(); + } else if (_ref === 2) { + return c.nop(); + } else if (_ref === 3) { + if (re.Rune.$length === 0) { + return c.nop(); + } + f = $clone(new frag.ptr(), frag); + _ref$1 = re.Rune; + _i = 0; + while (true) { + if (!(_i < _ref$1.$length)) { break; } + j = _i; + f1 = $clone(c.rune($subslice(re.Rune, j, (j + 1 >> 0)), re.Flags), frag); + if (j === 0) { + $copy(f, f1, frag); + } else { + $copy(f, c.cat(f, f1), frag); + } + _i++; + } + return f; + } else if (_ref === 4) { + return c.rune(re.Rune, re.Flags); + } else if (_ref === 5) { + return c.rune(anyRuneNotNL, 0); + } else if (_ref === 6) { + return c.rune(anyRune, 0); + } else if (_ref === 7) { + return c.empty(1); + } else if (_ref === 8) { + return c.empty(2); + } else if (_ref === 9) { + return c.empty(4); + } else if (_ref === 10) { + return c.empty(8); + } else if (_ref === 11) { + return c.empty(16); + } else if (_ref === 12) { + return c.empty(32); + } else if (_ref === 13) { + bra = $clone(c.cap(((re.Cap << 1 >> 0) >>> 0)), frag); + sub = $clone(c.compile((x = re.Sub, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0]))), frag); + ket = $clone(c.cap((((re.Cap << 1 >> 0) | 1) >>> 0)), frag); + return c.cat(c.cat(bra, sub), ket); + } else if (_ref === 14) { + return c.star(c.compile((x$1 = re.Sub, ((0 < 0 || 0 >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + 0]))), !((((re.Flags & 32) >>> 0) === 0))); + } else if (_ref === 15) { + return c.plus(c.compile((x$2 = re.Sub, ((0 < 0 || 0 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + 0]))), !((((re.Flags & 32) >>> 0) === 0))); + } else if (_ref === 16) { + return c.quest(c.compile((x$3 = re.Sub, ((0 < 0 || 0 >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + 0]))), !((((re.Flags & 32) >>> 0) === 0))); + } else if (_ref === 18) { + if (re.Sub.$length === 0) { + return c.nop(); + } + f$1 = $clone(new frag.ptr(), frag); + _ref$2 = re.Sub; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$2.$length)) { break; } + i = _i$1; + sub$1 = ((_i$1 < 0 || _i$1 >= _ref$2.$length) ? $throwRuntimeError("index out of range") : _ref$2.$array[_ref$2.$offset + _i$1]); + if (i === 0) { + $copy(f$1, c.compile(sub$1), frag); + } else { + $copy(f$1, c.cat(f$1, c.compile(sub$1)), frag); + } + _i$1++; + } + return f$1; + } else if (_ref === 19) { + f$2 = $clone(new frag.ptr(), frag); + _ref$3 = re.Sub; + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$3.$length)) { break; } + sub$2 = ((_i$2 < 0 || _i$2 >= _ref$3.$length) ? $throwRuntimeError("index out of range") : _ref$3.$array[_ref$3.$offset + _i$2]); + $copy(f$2, c.alt(f$2, c.compile(sub$2)), frag); + _i$2++; + } + return f$2; + } + $panic(new $String("regexp: unhandled case in compile")); + }; + compiler.prototype.compile = function(re) { return this.$val.compile(re); }; + compiler.ptr.prototype.inst = function(op) { + var c, f, op; + c = this; + f = new frag.ptr((c.p.Inst.$length >>> 0), 0); + c.p.Inst = $append(c.p.Inst, new Inst.ptr(op, 0, 0, sliceType.nil)); + return f; + }; + compiler.prototype.inst = function(op) { return this.$val.inst(op); }; + compiler.ptr.prototype.nop = function() { + var c, f; + c = this; + f = $clone(c.inst(6), frag); + f.out = ((f.i << 1 >>> 0) >>> 0); + return f; + }; + compiler.prototype.nop = function() { return this.$val.nop(); }; + compiler.ptr.prototype.fail = function() { + var c; + c = this; + return new frag.ptr(0, 0); + }; + compiler.prototype.fail = function() { return this.$val.fail(); }; + compiler.ptr.prototype.cap = function(arg) { + var arg, c, f, x, x$1; + c = this; + f = $clone(c.inst(2), frag); + f.out = ((f.i << 1 >>> 0) >>> 0); + (x = c.p.Inst, x$1 = f.i, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])).Arg = arg; + if (c.p.NumCap < ((arg >> 0) + 1 >> 0)) { + c.p.NumCap = (arg >> 0) + 1 >> 0; + } + return f; + }; + compiler.prototype.cap = function(arg) { return this.$val.cap(arg); }; + compiler.ptr.prototype.cat = function(f1, f2) { + var c, f1, f2; + c = this; + f2 = $clone(f2, frag); + f1 = $clone(f1, frag); + if ((f1.i === 0) || (f2.i === 0)) { + return new frag.ptr(0, 0); + } + new patchList(f1.out).patch(c.p, f2.i); + return new frag.ptr(f1.i, f2.out); + }; + compiler.prototype.cat = function(f1, f2) { return this.$val.cat(f1, f2); }; + compiler.ptr.prototype.alt = function(f1, f2) { + var c, f, f1, f2, i, x, x$1; + c = this; + f2 = $clone(f2, frag); + f1 = $clone(f1, frag); + if (f1.i === 0) { + return f2; + } + if (f2.i === 0) { + return f1; + } + f = $clone(c.inst(0), frag); + i = (x = c.p.Inst, x$1 = f.i, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])); + i.Out = f1.i; + i.Arg = f2.i; + f.out = new patchList(f1.out).append(c.p, f2.out); + return f; + }; + compiler.prototype.alt = function(f1, f2) { return this.$val.alt(f1, f2); }; + compiler.ptr.prototype.quest = function(f1, nongreedy) { + var c, f, f1, i, nongreedy, x, x$1; + c = this; + f1 = $clone(f1, frag); + f = $clone(c.inst(0), frag); + i = (x = c.p.Inst, x$1 = f.i, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])); + if (nongreedy) { + i.Arg = f1.i; + f.out = ((f.i << 1 >>> 0) >>> 0); + } else { + i.Out = f1.i; + f.out = ((((f.i << 1 >>> 0) | 1) >>> 0) >>> 0); + } + f.out = new patchList(f.out).append(c.p, f1.out); + return f; + }; + compiler.prototype.quest = function(f1, nongreedy) { return this.$val.quest(f1, nongreedy); }; + compiler.ptr.prototype.star = function(f1, nongreedy) { + var c, f, f1, i, nongreedy, x, x$1; + c = this; + f1 = $clone(f1, frag); + f = $clone(c.inst(0), frag); + i = (x = c.p.Inst, x$1 = f.i, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])); + if (nongreedy) { + i.Arg = f1.i; + f.out = ((f.i << 1 >>> 0) >>> 0); + } else { + i.Out = f1.i; + f.out = ((((f.i << 1 >>> 0) | 1) >>> 0) >>> 0); + } + new patchList(f1.out).patch(c.p, f.i); + return f; + }; + compiler.prototype.star = function(f1, nongreedy) { return this.$val.star(f1, nongreedy); }; + compiler.ptr.prototype.plus = function(f1, nongreedy) { + var c, f1, nongreedy; + c = this; + f1 = $clone(f1, frag); + return new frag.ptr(f1.i, c.star(f1, nongreedy).out); + }; + compiler.prototype.plus = function(f1, nongreedy) { return this.$val.plus(f1, nongreedy); }; + compiler.ptr.prototype.empty = function(op) { + var c, f, op, x, x$1; + c = this; + f = $clone(c.inst(3), frag); + (x = c.p.Inst, x$1 = f.i, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])).Arg = (op >>> 0); + f.out = ((f.i << 1 >>> 0) >>> 0); + return f; + }; + compiler.prototype.empty = function(op) { return this.$val.empty(op); }; + compiler.ptr.prototype.rune = function(r, flags) { + var c, f, flags, i, r, x, x$1; + c = this; + f = $clone(c.inst(7), frag); + i = (x = c.p.Inst, x$1 = f.i, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])); + i.Rune = r; + flags = (flags & (1)) >>> 0; + if (!((r.$length === 1)) || (unicode.SimpleFold(((0 < 0 || 0 >= r.$length) ? $throwRuntimeError("index out of range") : r.$array[r.$offset + 0])) === ((0 < 0 || 0 >= r.$length) ? $throwRuntimeError("index out of range") : r.$array[r.$offset + 0]))) { + flags = flags & ~(1); + } + i.Arg = (flags >>> 0); + f.out = ((f.i << 1 >>> 0) >>> 0); + if ((((flags & 1) >>> 0) === 0) && ((r.$length === 1) || (r.$length === 2) && (((0 < 0 || 0 >= r.$length) ? $throwRuntimeError("index out of range") : r.$array[r.$offset + 0]) === ((1 < 0 || 1 >= r.$length) ? $throwRuntimeError("index out of range") : r.$array[r.$offset + 1])))) { + i.Op = 8; + } else if ((r.$length === 2) && (((0 < 0 || 0 >= r.$length) ? $throwRuntimeError("index out of range") : r.$array[r.$offset + 0]) === 0) && (((1 < 0 || 1 >= r.$length) ? $throwRuntimeError("index out of range") : r.$array[r.$offset + 1]) === 1114111)) { + i.Op = 9; + } else if ((r.$length === 4) && (((0 < 0 || 0 >= r.$length) ? $throwRuntimeError("index out of range") : r.$array[r.$offset + 0]) === 0) && (((1 < 0 || 1 >= r.$length) ? $throwRuntimeError("index out of range") : r.$array[r.$offset + 1]) === 9) && (((2 < 0 || 2 >= r.$length) ? $throwRuntimeError("index out of range") : r.$array[r.$offset + 2]) === 11) && (((3 < 0 || 3 >= r.$length) ? $throwRuntimeError("index out of range") : r.$array[r.$offset + 3]) === 1114111)) { + i.Op = 10; + } + return f; + }; + compiler.prototype.rune = function(r, flags) { return this.$val.rune(r, flags); }; + Error.ptr.prototype.Error = function() { + var e; + e = this; + return "error parsing regexp: " + new ErrorCode(e.Code).String() + ": `" + e.Expr + "`"; + }; + Error.prototype.Error = function() { return this.$val.Error(); }; + ErrorCode.prototype.String = function() { + var e; + e = this.$val; + return e; + }; + $ptrType(ErrorCode).prototype.String = function() { return new ErrorCode(this.$get()).String(); }; + parser.ptr.prototype.newRegexp = function(op) { + var op, p, re; + p = this; + re = p.free; + if (!(re === ptrType.nil)) { + p.free = re.Sub0[0]; + $copy(re, new Regexp.ptr(0, 0, sliceType$4.nil, arrayType.zero(), sliceType.nil, arrayType$1.zero(), 0, 0, 0, ""), Regexp); + } else { + re = new Regexp.ptr(); + } + re.Op = op; + return re; + }; + parser.prototype.newRegexp = function(op) { return this.$val.newRegexp(op); }; + parser.ptr.prototype.reuse = function(re) { + var p, re; + p = this; + re.Sub0[0] = p.free; + p.free = re; + }; + parser.prototype.reuse = function(re) { return this.$val.reuse(re); }; + parser.ptr.prototype.push = function(re) { + var p, re, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + p = this; + if ((re.Op === 4) && (re.Rune.$length === 2) && ((x = re.Rune, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])) === (x$1 = re.Rune, ((1 < 0 || 1 >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + 1])))) { + if (p.maybeConcat((x$16 = re.Rune, ((0 < 0 || 0 >= x$16.$length) ? $throwRuntimeError("index out of range") : x$16.$array[x$16.$offset + 0])), p.flags & ~1)) { + return ptrType.nil; + } + re.Op = 3; + re.Rune = $subslice(re.Rune, 0, 1); + re.Flags = p.flags & ~1; + } else if ((re.Op === 4) && (re.Rune.$length === 4) && ((x$2 = re.Rune, ((0 < 0 || 0 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + 0])) === (x$3 = re.Rune, ((1 < 0 || 1 >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + 1]))) && ((x$4 = re.Rune, ((2 < 0 || 2 >= x$4.$length) ? $throwRuntimeError("index out of range") : x$4.$array[x$4.$offset + 2])) === (x$5 = re.Rune, ((3 < 0 || 3 >= x$5.$length) ? $throwRuntimeError("index out of range") : x$5.$array[x$5.$offset + 3]))) && (unicode.SimpleFold((x$6 = re.Rune, ((0 < 0 || 0 >= x$6.$length) ? $throwRuntimeError("index out of range") : x$6.$array[x$6.$offset + 0]))) === (x$7 = re.Rune, ((2 < 0 || 2 >= x$7.$length) ? $throwRuntimeError("index out of range") : x$7.$array[x$7.$offset + 2]))) && (unicode.SimpleFold((x$8 = re.Rune, ((2 < 0 || 2 >= x$8.$length) ? $throwRuntimeError("index out of range") : x$8.$array[x$8.$offset + 2]))) === (x$9 = re.Rune, ((0 < 0 || 0 >= x$9.$length) ? $throwRuntimeError("index out of range") : x$9.$array[x$9.$offset + 0]))) || (re.Op === 4) && (re.Rune.$length === 2) && (((x$10 = re.Rune, ((0 < 0 || 0 >= x$10.$length) ? $throwRuntimeError("index out of range") : x$10.$array[x$10.$offset + 0])) + 1 >> 0) === (x$11 = re.Rune, ((1 < 0 || 1 >= x$11.$length) ? $throwRuntimeError("index out of range") : x$11.$array[x$11.$offset + 1]))) && (unicode.SimpleFold((x$12 = re.Rune, ((0 < 0 || 0 >= x$12.$length) ? $throwRuntimeError("index out of range") : x$12.$array[x$12.$offset + 0]))) === (x$13 = re.Rune, ((1 < 0 || 1 >= x$13.$length) ? $throwRuntimeError("index out of range") : x$13.$array[x$13.$offset + 1]))) && (unicode.SimpleFold((x$14 = re.Rune, ((1 < 0 || 1 >= x$14.$length) ? $throwRuntimeError("index out of range") : x$14.$array[x$14.$offset + 1]))) === (x$15 = re.Rune, ((0 < 0 || 0 >= x$15.$length) ? $throwRuntimeError("index out of range") : x$15.$array[x$15.$offset + 0])))) { + if (p.maybeConcat((x$17 = re.Rune, ((0 < 0 || 0 >= x$17.$length) ? $throwRuntimeError("index out of range") : x$17.$array[x$17.$offset + 0])), (p.flags | 1) >>> 0)) { + return ptrType.nil; + } + re.Op = 3; + re.Rune = $subslice(re.Rune, 0, 1); + re.Flags = (p.flags | 1) >>> 0; + } else { + p.maybeConcat(-1, 0); + } + p.stack = $append(p.stack, re); + return re; + }; + parser.prototype.push = function(re) { return this.$val.push(re); }; + parser.ptr.prototype.maybeConcat = function(r, flags) { + var flags, n, p, r, re1, re2, x, x$1, x$2, x$3, x$4; + p = this; + n = p.stack.$length; + if (n < 2) { + return false; + } + re1 = (x = p.stack, x$1 = n - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])); + re2 = (x$2 = p.stack, x$3 = n - 2 >> 0, ((x$3 < 0 || x$3 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + x$3])); + if (!((re1.Op === 3)) || !((re2.Op === 3)) || !((((re1.Flags & 1) >>> 0) === ((re2.Flags & 1) >>> 0)))) { + return false; + } + re2.Rune = $appendSlice(re2.Rune, re1.Rune); + if (r >= 0) { + re1.Rune = $subslice(new sliceType(re1.Rune0), 0, 1); + (x$4 = re1.Rune, (0 < 0 || 0 >= x$4.$length) ? $throwRuntimeError("index out of range") : x$4.$array[x$4.$offset + 0] = r); + re1.Flags = flags; + return true; + } + p.stack = $subslice(p.stack, 0, (n - 1 >> 0)); + p.reuse(re1); + return false; + }; + parser.prototype.maybeConcat = function(r, flags) { return this.$val.maybeConcat(r, flags); }; + parser.ptr.prototype.newLiteral = function(r, flags) { + var flags, p, r, re; + p = this; + re = p.newRegexp(3); + re.Flags = flags; + if (!((((flags & 1) >>> 0) === 0))) { + r = minFoldRune(r); + } + re.Rune0[0] = r; + re.Rune = $subslice(new sliceType(re.Rune0), 0, 1); + return re; + }; + parser.prototype.newLiteral = function(r, flags) { return this.$val.newLiteral(r, flags); }; + minFoldRune = function(r) { + var min, r, r0; + if (r < 65 || r > 71903) { + return r; + } + min = r; + r0 = r; + r = unicode.SimpleFold(r); + while (true) { + if (!(!((r === r0)))) { break; } + if (min > r) { + min = r; + } + r = unicode.SimpleFold(r); + } + return min; + }; + parser.ptr.prototype.literal = function(r) { + var p, r; + p = this; + p.push(p.newLiteral(r, p.flags)); + }; + parser.prototype.literal = function(r) { return this.$val.literal(r); }; + parser.ptr.prototype.op = function(op) { + var op, p, re; + p = this; + re = p.newRegexp(op); + re.Flags = p.flags; + return p.push(re); + }; + parser.prototype.op = function(op) { return this.$val.op(op); }; + parser.ptr.prototype.repeat = function(op, min, max, before, after, lastRepeat) { + var after, before, flags, lastRepeat, max, min, n, op, p, re, sub, x, x$1, x$2, x$3, x$4; + p = this; + flags = p.flags; + if (!((((p.flags & 64) >>> 0) === 0))) { + if (after.length > 0 && (after.charCodeAt(0) === 63)) { + after = after.substring(1); + flags = (flags ^ (32)) << 16 >>> 16; + } + if (!(lastRepeat === "")) { + return ["", new Error.ptr("invalid nested repetition operator", lastRepeat.substring(0, (lastRepeat.length - after.length >> 0)))]; + } + } + n = p.stack.$length; + if (n === 0) { + return ["", new Error.ptr("missing argument to repetition operator", before.substring(0, (before.length - after.length >> 0)))]; + } + sub = (x = p.stack, x$1 = n - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])); + if (sub.Op >= 128) { + return ["", new Error.ptr("missing argument to repetition operator", before.substring(0, (before.length - after.length >> 0)))]; + } + re = p.newRegexp(op); + re.Min = min; + re.Max = max; + re.Flags = flags; + re.Sub = $subslice(new sliceType$4(re.Sub0), 0, 1); + (x$2 = re.Sub, (0 < 0 || 0 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + 0] = sub); + (x$3 = p.stack, x$4 = n - 1 >> 0, (x$4 < 0 || x$4 >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + x$4] = re); + if ((op === 17) && (min >= 2 || max >= 2) && !repeatIsValid(re, 1000)) { + return ["", new Error.ptr("invalid repeat count", before.substring(0, (before.length - after.length >> 0)))]; + } + return [after, $ifaceNil]; + }; + parser.prototype.repeat = function(op, min, max, before, after, lastRepeat) { return this.$val.repeat(op, min, max, before, after, lastRepeat); }; + repeatIsValid = function(re, n) { + var _i, _q, _ref, m, n, re, sub; + if (re.Op === 17) { + m = re.Max; + if (m === 0) { + return true; + } + if (m < 0) { + m = re.Min; + } + if (m > n) { + return false; + } + if (m > 0) { + n = (_q = n / (m), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + } + } + _ref = re.Sub; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + sub = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (!repeatIsValid(sub, n)) { + return false; + } + _i++; + } + return true; + }; + parser.ptr.prototype.concat = function() { + var i, p, subs, x, x$1; + p = this; + p.maybeConcat(-1, 0); + i = p.stack.$length; + while (true) { + if (!(i > 0 && (x = p.stack, x$1 = i - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])).Op < 128)) { break; } + i = i - (1) >> 0; + } + subs = $subslice(p.stack, i); + p.stack = $subslice(p.stack, 0, i); + if (subs.$length === 0) { + return p.push(p.newRegexp(2)); + } + return p.push(p.collapse(subs, 18)); + }; + parser.prototype.concat = function() { return this.$val.concat(); }; + parser.ptr.prototype.alternate = function() { + var i, p, subs, x, x$1, x$2; + p = this; + i = p.stack.$length; + while (true) { + if (!(i > 0 && (x = p.stack, x$1 = i - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])).Op < 128)) { break; } + i = i - (1) >> 0; + } + subs = $subslice(p.stack, i); + p.stack = $subslice(p.stack, 0, i); + if (subs.$length > 0) { + cleanAlt((x$2 = subs.$length - 1 >> 0, ((x$2 < 0 || x$2 >= subs.$length) ? $throwRuntimeError("index out of range") : subs.$array[subs.$offset + x$2]))); + } + if (subs.$length === 0) { + return p.push(p.newRegexp(1)); + } + return p.push(p.collapse(subs, 19)); + }; + parser.prototype.alternate = function() { return this.$val.alternate(); }; + cleanAlt = function(re) { + var _ref, re, x, x$1, x$2, x$3, x$4, x$5; + _ref = re.Op; + if (_ref === 4) { + re.Rune = cleanClass(new ptrType$1(function() { return this.$target.Rune; }, function($v) { this.$target.Rune = $v; }, re)); + if ((re.Rune.$length === 2) && ((x = re.Rune, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])) === 0) && ((x$1 = re.Rune, ((1 < 0 || 1 >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + 1])) === 1114111)) { + re.Rune = sliceType.nil; + re.Op = 6; + return; + } + if ((re.Rune.$length === 4) && ((x$2 = re.Rune, ((0 < 0 || 0 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + 0])) === 0) && ((x$3 = re.Rune, ((1 < 0 || 1 >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + 1])) === 9) && ((x$4 = re.Rune, ((2 < 0 || 2 >= x$4.$length) ? $throwRuntimeError("index out of range") : x$4.$array[x$4.$offset + 2])) === 11) && ((x$5 = re.Rune, ((3 < 0 || 3 >= x$5.$length) ? $throwRuntimeError("index out of range") : x$5.$array[x$5.$offset + 3])) === 1114111)) { + re.Rune = sliceType.nil; + re.Op = 5; + return; + } + if ((re.Rune.$capacity - re.Rune.$length >> 0) > 100) { + re.Rune = $appendSlice($subslice(new sliceType(re.Rune0), 0, 0), re.Rune); + } + } + }; + parser.ptr.prototype.collapse = function(subs, op) { + var _i, _ref, old, op, p, re, sub, subs, x; + p = this; + if (subs.$length === 1) { + return ((0 < 0 || 0 >= subs.$length) ? $throwRuntimeError("index out of range") : subs.$array[subs.$offset + 0]); + } + re = p.newRegexp(op); + re.Sub = $subslice(new sliceType$4(re.Sub0), 0, 0); + _ref = subs; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + sub = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (sub.Op === op) { + re.Sub = $appendSlice(re.Sub, sub.Sub); + p.reuse(sub); + } else { + re.Sub = $append(re.Sub, sub); + } + _i++; + } + if (op === 19) { + re.Sub = p.factor(re.Sub, re.Flags); + if (re.Sub.$length === 1) { + old = re; + re = (x = re.Sub, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])); + p.reuse(old); + } + } + return re; + }; + parser.prototype.collapse = function(subs, op) { return this.$val.collapse(subs, op); }; + parser.ptr.prototype.factor = function(sub, flags) { + var _i, _ref, _tmp, _tmp$1, _tuple, first, flags, i, i$1, i$2, i$3, ifirst, iflags, istr, j, j$1, j$2, j$3, max, out, p, prefix, prefix$1, re, re$1, reuse, same, start, str, strflags, sub, suffix, suffix$1, x; + p = this; + if (sub.$length < 2) { + return sub; + } + str = sliceType.nil; + strflags = 0; + start = 0; + out = $subslice(sub, 0, 0); + i = 0; + while (true) { + if (!(i <= sub.$length)) { break; } + istr = sliceType.nil; + iflags = 0; + if (i < sub.$length) { + _tuple = p.leadingString(((i < 0 || i >= sub.$length) ? $throwRuntimeError("index out of range") : sub.$array[sub.$offset + i])); istr = _tuple[0]; iflags = _tuple[1]; + if (iflags === strflags) { + same = 0; + while (true) { + if (!(same < str.$length && same < istr.$length && (((same < 0 || same >= str.$length) ? $throwRuntimeError("index out of range") : str.$array[str.$offset + same]) === ((same < 0 || same >= istr.$length) ? $throwRuntimeError("index out of range") : istr.$array[istr.$offset + same])))) { break; } + same = same + (1) >> 0; + } + if (same > 0) { + str = $subslice(str, 0, same); + i = i + (1) >> 0; + continue; + } + } + } + if (i === start) { + } else if (i === (start + 1 >> 0)) { + out = $append(out, ((start < 0 || start >= sub.$length) ? $throwRuntimeError("index out of range") : sub.$array[sub.$offset + start])); + } else { + prefix = p.newRegexp(3); + prefix.Flags = strflags; + prefix.Rune = $appendSlice($subslice(prefix.Rune, 0, 0), str); + j = start; + while (true) { + if (!(j < i)) { break; } + (j < 0 || j >= sub.$length) ? $throwRuntimeError("index out of range") : sub.$array[sub.$offset + j] = p.removeLeadingString(((j < 0 || j >= sub.$length) ? $throwRuntimeError("index out of range") : sub.$array[sub.$offset + j]), str.$length); + j = j + (1) >> 0; + } + suffix = p.collapse($subslice(sub, start, i), 19); + re = p.newRegexp(18); + re.Sub = $append($subslice(re.Sub, 0, 0), prefix, suffix); + out = $append(out, re); + } + start = i; + str = istr; + strflags = iflags; + i = i + (1) >> 0; + } + sub = out; + start = 0; + out = $subslice(sub, 0, 0); + first = ptrType.nil; + i$1 = 0; + while (true) { + if (!(i$1 <= sub.$length)) { break; } + ifirst = ptrType.nil; + if (i$1 < sub.$length) { + ifirst = p.leadingRegexp(((i$1 < 0 || i$1 >= sub.$length) ? $throwRuntimeError("index out of range") : sub.$array[sub.$offset + i$1])); + if (!(first === ptrType.nil) && first.Equal(ifirst)) { + i$1 = i$1 + (1) >> 0; + continue; + } + } + if (i$1 === start) { + } else if (i$1 === (start + 1 >> 0)) { + out = $append(out, ((start < 0 || start >= sub.$length) ? $throwRuntimeError("index out of range") : sub.$array[sub.$offset + start])); + } else { + prefix$1 = first; + j$1 = start; + while (true) { + if (!(j$1 < i$1)) { break; } + reuse = !((j$1 === start)); + (j$1 < 0 || j$1 >= sub.$length) ? $throwRuntimeError("index out of range") : sub.$array[sub.$offset + j$1] = p.removeLeadingRegexp(((j$1 < 0 || j$1 >= sub.$length) ? $throwRuntimeError("index out of range") : sub.$array[sub.$offset + j$1]), reuse); + j$1 = j$1 + (1) >> 0; + } + suffix$1 = p.collapse($subslice(sub, start, i$1), 19); + re$1 = p.newRegexp(18); + re$1.Sub = $append($subslice(re$1.Sub, 0, 0), prefix$1, suffix$1); + out = $append(out, re$1); + } + start = i$1; + first = ifirst; + i$1 = i$1 + (1) >> 0; + } + sub = out; + start = 0; + out = $subslice(sub, 0, 0); + i$2 = 0; + while (true) { + if (!(i$2 <= sub.$length)) { break; } + if (i$2 < sub.$length && isCharClass(((i$2 < 0 || i$2 >= sub.$length) ? $throwRuntimeError("index out of range") : sub.$array[sub.$offset + i$2]))) { + i$2 = i$2 + (1) >> 0; + continue; + } + if (i$2 === start) { + } else if (i$2 === (start + 1 >> 0)) { + out = $append(out, ((start < 0 || start >= sub.$length) ? $throwRuntimeError("index out of range") : sub.$array[sub.$offset + start])); + } else { + max = start; + j$2 = start + 1 >> 0; + while (true) { + if (!(j$2 < i$2)) { break; } + if (((max < 0 || max >= sub.$length) ? $throwRuntimeError("index out of range") : sub.$array[sub.$offset + max]).Op < ((j$2 < 0 || j$2 >= sub.$length) ? $throwRuntimeError("index out of range") : sub.$array[sub.$offset + j$2]).Op || (((max < 0 || max >= sub.$length) ? $throwRuntimeError("index out of range") : sub.$array[sub.$offset + max]).Op === ((j$2 < 0 || j$2 >= sub.$length) ? $throwRuntimeError("index out of range") : sub.$array[sub.$offset + j$2]).Op) && ((max < 0 || max >= sub.$length) ? $throwRuntimeError("index out of range") : sub.$array[sub.$offset + max]).Rune.$length < ((j$2 < 0 || j$2 >= sub.$length) ? $throwRuntimeError("index out of range") : sub.$array[sub.$offset + j$2]).Rune.$length) { + max = j$2; + } + j$2 = j$2 + (1) >> 0; + } + _tmp = ((max < 0 || max >= sub.$length) ? $throwRuntimeError("index out of range") : sub.$array[sub.$offset + max]); _tmp$1 = ((start < 0 || start >= sub.$length) ? $throwRuntimeError("index out of range") : sub.$array[sub.$offset + start]); (start < 0 || start >= sub.$length) ? $throwRuntimeError("index out of range") : sub.$array[sub.$offset + start] = _tmp; (max < 0 || max >= sub.$length) ? $throwRuntimeError("index out of range") : sub.$array[sub.$offset + max] = _tmp$1; + j$3 = start + 1 >> 0; + while (true) { + if (!(j$3 < i$2)) { break; } + mergeCharClass(((start < 0 || start >= sub.$length) ? $throwRuntimeError("index out of range") : sub.$array[sub.$offset + start]), ((j$3 < 0 || j$3 >= sub.$length) ? $throwRuntimeError("index out of range") : sub.$array[sub.$offset + j$3])); + p.reuse(((j$3 < 0 || j$3 >= sub.$length) ? $throwRuntimeError("index out of range") : sub.$array[sub.$offset + j$3])); + j$3 = j$3 + (1) >> 0; + } + cleanAlt(((start < 0 || start >= sub.$length) ? $throwRuntimeError("index out of range") : sub.$array[sub.$offset + start])); + out = $append(out, ((start < 0 || start >= sub.$length) ? $throwRuntimeError("index out of range") : sub.$array[sub.$offset + start])); + } + if (i$2 < sub.$length) { + out = $append(out, ((i$2 < 0 || i$2 >= sub.$length) ? $throwRuntimeError("index out of range") : sub.$array[sub.$offset + i$2])); + } + start = i$2 + 1 >> 0; + i$2 = i$2 + (1) >> 0; + } + sub = out; + start = 0; + out = $subslice(sub, 0, 0); + _ref = sub; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i$3 = _i; + if ((i$3 + 1 >> 0) < sub.$length && (((i$3 < 0 || i$3 >= sub.$length) ? $throwRuntimeError("index out of range") : sub.$array[sub.$offset + i$3]).Op === 2) && ((x = i$3 + 1 >> 0, ((x < 0 || x >= sub.$length) ? $throwRuntimeError("index out of range") : sub.$array[sub.$offset + x])).Op === 2)) { + _i++; + continue; + } + out = $append(out, ((i$3 < 0 || i$3 >= sub.$length) ? $throwRuntimeError("index out of range") : sub.$array[sub.$offset + i$3])); + _i++; + } + sub = out; + return sub; + }; + parser.prototype.factor = function(sub, flags) { return this.$val.factor(sub, flags); }; + parser.ptr.prototype.leadingString = function(re) { + var p, re, x; + p = this; + if ((re.Op === 18) && re.Sub.$length > 0) { + re = (x = re.Sub, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])); + } + if (!((re.Op === 3))) { + return [sliceType.nil, 0]; + } + return [re.Rune, (re.Flags & 1) >>> 0]; + }; + parser.prototype.leadingString = function(re) { return this.$val.leadingString(re); }; + parser.ptr.prototype.removeLeadingString = function(re, n) { + var _ref, n, old, p, re, sub, x, x$1, x$2; + p = this; + if ((re.Op === 18) && re.Sub.$length > 0) { + sub = (x = re.Sub, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])); + sub = p.removeLeadingString(sub, n); + (x$1 = re.Sub, (0 < 0 || 0 >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + 0] = sub); + if (sub.Op === 2) { + p.reuse(sub); + _ref = re.Sub.$length; + if (_ref === 0 || _ref === 1) { + re.Op = 2; + re.Sub = sliceType$4.nil; + } else if (_ref === 2) { + old = re; + re = (x$2 = re.Sub, ((1 < 0 || 1 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + 1])); + p.reuse(old); + } else { + $copySlice(re.Sub, $subslice(re.Sub, 1)); + re.Sub = $subslice(re.Sub, 0, (re.Sub.$length - 1 >> 0)); + } + } + return re; + } + if (re.Op === 3) { + re.Rune = $subslice(re.Rune, 0, $copySlice(re.Rune, $subslice(re.Rune, n))); + if (re.Rune.$length === 0) { + re.Op = 2; + } + } + return re; + }; + parser.prototype.removeLeadingString = function(re, n) { return this.$val.removeLeadingString(re, n); }; + parser.ptr.prototype.leadingRegexp = function(re) { + var p, re, sub, x; + p = this; + if (re.Op === 2) { + return ptrType.nil; + } + if ((re.Op === 18) && re.Sub.$length > 0) { + sub = (x = re.Sub, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])); + if (sub.Op === 2) { + return ptrType.nil; + } + return sub; + } + return re; + }; + parser.prototype.leadingRegexp = function(re) { return this.$val.leadingRegexp(re); }; + parser.ptr.prototype.removeLeadingRegexp = function(re, reuse) { + var _ref, old, p, re, reuse, x, x$1; + p = this; + if ((re.Op === 18) && re.Sub.$length > 0) { + if (reuse) { + p.reuse((x = re.Sub, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0]))); + } + re.Sub = $subslice(re.Sub, 0, $copySlice(re.Sub, $subslice(re.Sub, 1))); + _ref = re.Sub.$length; + if (_ref === 0) { + re.Op = 2; + re.Sub = sliceType$4.nil; + } else if (_ref === 1) { + old = re; + re = (x$1 = re.Sub, ((0 < 0 || 0 >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + 0])); + p.reuse(old); + } + return re; + } + if (reuse) { + p.reuse(re); + } + return p.newRegexp(2); + }; + parser.prototype.removeLeadingRegexp = function(re, reuse) { return this.$val.removeLeadingRegexp(re, reuse); }; + literalRegexp = function(s, flags) { + var _i, _ref, _rune, c, flags, re, s; + re = new Regexp.ptr(3, 0, sliceType$4.nil, arrayType.zero(), sliceType.nil, arrayType$1.zero(), 0, 0, 0, ""); + re.Flags = flags; + re.Rune = $subslice(new sliceType(re.Rune0), 0, 0); + _ref = s; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + c = _rune[0]; + if (re.Rune.$length >= re.Rune.$capacity) { + re.Rune = new sliceType($stringToRunes(s)); + break; + } + re.Rune = $append(re.Rune, c); + _i += _rune[1]; + } + return re; + }; + Parse = $pkg.Parse = function(s, flags) { + var _ref, _ref$1, _ref$2, _struct, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, after, after$1, before, before$1, c, err, err$1, err$2, flags, i, lastRepeat, lit, max, min, n, ok, op, p, r, r$1, re, repeat, rest, rest$1, s, t, x; + if (!((((flags & 2) >>> 0) === 0))) { + err = checkUTF8(s); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [ptrType.nil, err]; + } + return [literalRegexp(s, flags), $ifaceNil]; + } + p = $clone(new parser.ptr(), parser); + err$1 = $ifaceNil; + c = 0; + op = 0; + lastRepeat = ""; + p.flags = flags; + p.wholeRegexp = s; + t = s; + while (true) { + if (!(!(t === ""))) { break; } + repeat = ""; + _ref = t.charCodeAt(0); + BigSwitch: + switch (0) { default: if (_ref === 40) { + if (!((((p.flags & 64) >>> 0) === 0)) && t.length >= 2 && (t.charCodeAt(1) === 63)) { + _tuple = p.parsePerlFlags(t); t = _tuple[0]; err$1 = _tuple[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return [ptrType.nil, err$1]; + } + break; + } + p.numCap = p.numCap + (1) >> 0; + p.op(128).Cap = p.numCap; + t = t.substring(1); + } else if (_ref === 124) { + err$1 = p.parseVerticalBar(); + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return [ptrType.nil, err$1]; + } + t = t.substring(1); + } else if (_ref === 41) { + err$1 = p.parseRightParen(); + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return [ptrType.nil, err$1]; + } + t = t.substring(1); + } else if (_ref === 94) { + if (!((((p.flags & 16) >>> 0) === 0))) { + p.op(9); + } else { + p.op(7); + } + t = t.substring(1); + } else if (_ref === 36) { + if (!((((p.flags & 16) >>> 0) === 0))) { + _struct = p.op(10); + _struct.Flags = (_struct.Flags | (256)) >>> 0; + } else { + p.op(8); + } + t = t.substring(1); + } else if (_ref === 46) { + if (!((((p.flags & 8) >>> 0) === 0))) { + p.op(6); + } else { + p.op(5); + } + t = t.substring(1); + } else if (_ref === 91) { + _tuple$1 = p.parseClass(t); t = _tuple$1[0]; err$1 = _tuple$1[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return [ptrType.nil, err$1]; + } + } else if (_ref === 42 || _ref === 43 || _ref === 63) { + before = t; + _ref$1 = t.charCodeAt(0); + if (_ref$1 === 42) { + op = 14; + } else if (_ref$1 === 43) { + op = 15; + } else if (_ref$1 === 63) { + op = 16; + } + after = t.substring(1); + _tuple$2 = p.repeat(op, 0, 0, before, after, lastRepeat); after = _tuple$2[0]; err$1 = _tuple$2[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return [ptrType.nil, err$1]; + } + repeat = before; + t = after; + } else if (_ref === 123) { + op = 17; + before$1 = t; + _tuple$3 = p.parseRepeat(t); min = _tuple$3[0]; max = _tuple$3[1]; after$1 = _tuple$3[2]; ok = _tuple$3[3]; + if (!ok) { + p.literal(123); + t = t.substring(1); + break; + } + if (min < 0 || min > 1000 || max > 1000 || max >= 0 && min > max) { + return [ptrType.nil, new Error.ptr("invalid repeat count", before$1.substring(0, (before$1.length - after$1.length >> 0)))]; + } + _tuple$4 = p.repeat(op, min, max, before$1, after$1, lastRepeat); after$1 = _tuple$4[0]; err$1 = _tuple$4[1]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return [ptrType.nil, err$1]; + } + repeat = before$1; + t = after$1; + } else if (_ref === 92) { + if (!((((p.flags & 64) >>> 0) === 0)) && t.length >= 2) { + _ref$2 = t.charCodeAt(1); + if (_ref$2 === 65) { + p.op(9); + t = t.substring(2); + break BigSwitch; + } else if (_ref$2 === 98) { + p.op(11); + t = t.substring(2); + break BigSwitch; + } else if (_ref$2 === 66) { + p.op(12); + t = t.substring(2); + break BigSwitch; + } else if (_ref$2 === 67) { + return [ptrType.nil, new Error.ptr("invalid escape sequence", t.substring(0, 2))]; + } else if (_ref$2 === 81) { + lit = ""; + i = strings.Index(t, "\\E"); + if (i < 0) { + lit = t.substring(2); + t = ""; + } else { + lit = t.substring(2, i); + t = t.substring((i + 2 >> 0)); + } + p.push(literalRegexp(lit, p.flags)); + break BigSwitch; + } else if (_ref$2 === 122) { + p.op(10); + t = t.substring(2); + break BigSwitch; + } + } + re = p.newRegexp(4); + re.Flags = p.flags; + if (t.length >= 2 && ((t.charCodeAt(1) === 112) || (t.charCodeAt(1) === 80))) { + _tuple$5 = p.parseUnicodeClass(t, $subslice(new sliceType(re.Rune0), 0, 0)); r = _tuple$5[0]; rest = _tuple$5[1]; err$2 = _tuple$5[2]; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + return [ptrType.nil, err$2]; + } + if (!(r === sliceType.nil)) { + re.Rune = r; + t = rest; + p.push(re); + break BigSwitch; + } + } + _tuple$6 = p.parsePerlClassEscape(t, $subslice(new sliceType(re.Rune0), 0, 0)); r$1 = _tuple$6[0]; rest$1 = _tuple$6[1]; + if (!(r$1 === sliceType.nil)) { + re.Rune = r$1; + t = rest$1; + p.push(re); + break BigSwitch; + } + p.reuse(re); + _tuple$7 = p.parseEscape(t); c = _tuple$7[0]; t = _tuple$7[1]; err$1 = _tuple$7[2]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return [ptrType.nil, err$1]; + } + p.literal(c); + } else { + _tuple$8 = nextRune(t); c = _tuple$8[0]; t = _tuple$8[1]; err$1 = _tuple$8[2]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return [ptrType.nil, err$1]; + } + p.literal(c); + } } + lastRepeat = repeat; + } + p.concat(); + if (p.swapVerticalBar()) { + p.stack = $subslice(p.stack, 0, (p.stack.$length - 1 >> 0)); + } + p.alternate(); + n = p.stack.$length; + if (!((n === 1))) { + return [ptrType.nil, new Error.ptr("missing closing )", s)]; + } + return [(x = p.stack, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])), $ifaceNil]; + }; + parser.ptr.prototype.parseRepeat = function(s) { + var _tuple, _tuple$1, max = 0, min = 0, ok = false, ok1, p, rest = "", s; + p = this; + if (s === "" || !((s.charCodeAt(0) === 123))) { + return [min, max, rest, ok]; + } + s = s.substring(1); + ok1 = false; + _tuple = p.parseInt(s); min = _tuple[0]; s = _tuple[1]; ok1 = _tuple[2]; + if (!ok1) { + return [min, max, rest, ok]; + } + if (s === "") { + return [min, max, rest, ok]; + } + if (!((s.charCodeAt(0) === 44))) { + max = min; + } else { + s = s.substring(1); + if (s === "") { + return [min, max, rest, ok]; + } + if (s.charCodeAt(0) === 125) { + max = -1; + } else { + _tuple$1 = p.parseInt(s); max = _tuple$1[0]; s = _tuple$1[1]; ok1 = _tuple$1[2]; + if (!ok1) { + return [min, max, rest, ok]; + } else if (max < 0) { + min = -1; + } + } + } + if (s === "" || !((s.charCodeAt(0) === 125))) { + return [min, max, rest, ok]; + } + rest = s.substring(1); + ok = true; + return [min, max, rest, ok]; + }; + parser.prototype.parseRepeat = function(s) { return this.$val.parseRepeat(s); }; + parser.ptr.prototype.parsePerlFlags = function(s) { + var _ref, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, c, capture, end, err = $ifaceNil, flags, name, p, re, rest = "", s, sawFlag, sign, t; + p = this; + t = s; + if (t.length > 4 && (t.charCodeAt(2) === 80) && (t.charCodeAt(3) === 60)) { + end = strings.IndexRune(t, 62); + if (end < 0) { + err = checkUTF8(t); + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = ""; _tmp$1 = err; rest = _tmp; err = _tmp$1; + return [rest, err]; + } + _tmp$2 = ""; _tmp$3 = new Error.ptr("invalid named capture", s); rest = _tmp$2; err = _tmp$3; + return [rest, err]; + } + capture = t.substring(0, (end + 1 >> 0)); + name = t.substring(4, end); + err = checkUTF8(name); + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$4 = ""; _tmp$5 = err; rest = _tmp$4; err = _tmp$5; + return [rest, err]; + } + if (!isValidCaptureName(name)) { + _tmp$6 = ""; _tmp$7 = new Error.ptr("invalid named capture", capture); rest = _tmp$6; err = _tmp$7; + return [rest, err]; + } + p.numCap = p.numCap + (1) >> 0; + re = p.op(128); + re.Cap = p.numCap; + re.Name = name; + _tmp$8 = t.substring((end + 1 >> 0)); _tmp$9 = $ifaceNil; rest = _tmp$8; err = _tmp$9; + return [rest, err]; + } + c = 0; + t = t.substring(2); + flags = p.flags; + sign = 1; + sawFlag = false; + Loop: + while (true) { + if (!(!(t === ""))) { break; } + _tuple = nextRune(t); c = _tuple[0]; t = _tuple[1]; err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$10 = ""; _tmp$11 = err; rest = _tmp$10; err = _tmp$11; + return [rest, err]; + } + _ref = c; + if (_ref === 105) { + flags = (flags | (1)) >>> 0; + sawFlag = true; + } else if (_ref === 109) { + flags = flags & ~(16); + sawFlag = true; + } else if (_ref === 115) { + flags = (flags | (8)) >>> 0; + sawFlag = true; + } else if (_ref === 85) { + flags = (flags | (32)) >>> 0; + sawFlag = true; + } else if (_ref === 45) { + if (sign < 0) { + break Loop; + } + sign = -1; + flags = ~flags << 16 >>> 16; + sawFlag = false; + } else if (_ref === 58 || _ref === 41) { + if (sign < 0) { + if (!sawFlag) { + break Loop; + } + flags = ~flags << 16 >>> 16; + } + if (c === 58) { + p.op(128); + } + p.flags = flags; + _tmp$12 = t; _tmp$13 = $ifaceNil; rest = _tmp$12; err = _tmp$13; + return [rest, err]; + } else { + break Loop; + } + } + _tmp$14 = ""; _tmp$15 = new Error.ptr("invalid or unsupported Perl syntax", s.substring(0, (s.length - t.length >> 0))); rest = _tmp$14; err = _tmp$15; + return [rest, err]; + }; + parser.prototype.parsePerlFlags = function(s) { return this.$val.parsePerlFlags(s); }; + isValidCaptureName = function(name) { + var _i, _ref, _rune, c, name; + if (name === "") { + return false; + } + _ref = name; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + c = _rune[0]; + if (!((c === 95)) && !isalnum(c)) { + return false; + } + _i += _rune[1]; + } + return true; + }; + parser.ptr.prototype.parseInt = function(s) { + var i, n = 0, ok = false, p, rest = "", s, t; + p = this; + if (s === "" || s.charCodeAt(0) < 48 || 57 < s.charCodeAt(0)) { + return [n, rest, ok]; + } + if (s.length >= 2 && (s.charCodeAt(0) === 48) && 48 <= s.charCodeAt(1) && s.charCodeAt(1) <= 57) { + return [n, rest, ok]; + } + t = s; + while (true) { + if (!(!(s === "") && 48 <= s.charCodeAt(0) && s.charCodeAt(0) <= 57)) { break; } + s = s.substring(1); + } + rest = s; + ok = true; + t = t.substring(0, (t.length - s.length >> 0)); + i = 0; + while (true) { + if (!(i < t.length)) { break; } + if (n >= 100000000) { + n = -1; + break; + } + n = ((n * 10 >> 0) + (t.charCodeAt(i) >> 0) >> 0) - 48 >> 0; + i = i + (1) >> 0; + } + return [n, rest, ok]; + }; + parser.prototype.parseInt = function(s) { return this.$val.parseInt(s); }; + isCharClass = function(re) { + var re; + return (re.Op === 3) && (re.Rune.$length === 1) || (re.Op === 4) || (re.Op === 5) || (re.Op === 6); + }; + matchRune = function(re, r) { + var _ref, i, r, re, x, x$1, x$2, x$3; + _ref = re.Op; + if (_ref === 3) { + return (re.Rune.$length === 1) && ((x = re.Rune, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])) === r); + } else if (_ref === 4) { + i = 0; + while (true) { + if (!(i < re.Rune.$length)) { break; } + if ((x$1 = re.Rune, ((i < 0 || i >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + i])) <= r && r <= (x$2 = re.Rune, x$3 = i + 1 >> 0, ((x$3 < 0 || x$3 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + x$3]))) { + return true; + } + i = i + (2) >> 0; + } + return false; + } else if (_ref === 5) { + return !((r === 10)); + } else if (_ref === 6) { + return true; + } + return false; + }; + parser.ptr.prototype.parseVerticalBar = function() { + var p; + p = this; + p.concat(); + if (!p.swapVerticalBar()) { + p.op(129); + } + return $ifaceNil; + }; + parser.prototype.parseVerticalBar = function() { return this.$val.parseVerticalBar(); }; + mergeCharClass = function(dst, src) { + var _ref, dst, src, x, x$1, x$2, x$3, x$4; + _ref = dst.Op; + switch (0) { default: if (_ref === 6) { + } else if (_ref === 5) { + if (matchRune(src, 10)) { + dst.Op = 6; + } + } else if (_ref === 4) { + if (src.Op === 3) { + dst.Rune = appendLiteral(dst.Rune, (x = src.Rune, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])), src.Flags); + } else { + dst.Rune = appendClass(dst.Rune, src.Rune); + } + } else if (_ref === 3) { + if (((x$1 = src.Rune, ((0 < 0 || 0 >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + 0])) === (x$2 = dst.Rune, ((0 < 0 || 0 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + 0]))) && (src.Flags === dst.Flags)) { + break; + } + dst.Op = 4; + dst.Rune = appendLiteral($subslice(dst.Rune, 0, 0), (x$3 = dst.Rune, ((0 < 0 || 0 >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + 0])), dst.Flags); + dst.Rune = appendLiteral(dst.Rune, (x$4 = src.Rune, ((0 < 0 || 0 >= x$4.$length) ? $throwRuntimeError("index out of range") : x$4.$array[x$4.$offset + 0])), src.Flags); + } } + }; + parser.ptr.prototype.swapVerticalBar = function() { + var _tmp, _tmp$1, n, p, re1, re1$1, re2, re3, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + p = this; + n = p.stack.$length; + if (n >= 3 && ((x = p.stack, x$1 = n - 2 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])).Op === 129) && isCharClass((x$2 = p.stack, x$3 = n - 1 >> 0, ((x$3 < 0 || x$3 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + x$3]))) && isCharClass((x$4 = p.stack, x$5 = n - 3 >> 0, ((x$5 < 0 || x$5 >= x$4.$length) ? $throwRuntimeError("index out of range") : x$4.$array[x$4.$offset + x$5])))) { + re1 = (x$6 = p.stack, x$7 = n - 1 >> 0, ((x$7 < 0 || x$7 >= x$6.$length) ? $throwRuntimeError("index out of range") : x$6.$array[x$6.$offset + x$7])); + re3 = (x$8 = p.stack, x$9 = n - 3 >> 0, ((x$9 < 0 || x$9 >= x$8.$length) ? $throwRuntimeError("index out of range") : x$8.$array[x$8.$offset + x$9])); + if (re1.Op > re3.Op) { + _tmp = re3; _tmp$1 = re1; re1 = _tmp; re3 = _tmp$1; + (x$10 = p.stack, x$11 = n - 3 >> 0, (x$11 < 0 || x$11 >= x$10.$length) ? $throwRuntimeError("index out of range") : x$10.$array[x$10.$offset + x$11] = re3); + } + mergeCharClass(re3, re1); + p.reuse(re1); + p.stack = $subslice(p.stack, 0, (n - 1 >> 0)); + return true; + } + if (n >= 2) { + re1$1 = (x$12 = p.stack, x$13 = n - 1 >> 0, ((x$13 < 0 || x$13 >= x$12.$length) ? $throwRuntimeError("index out of range") : x$12.$array[x$12.$offset + x$13])); + re2 = (x$14 = p.stack, x$15 = n - 2 >> 0, ((x$15 < 0 || x$15 >= x$14.$length) ? $throwRuntimeError("index out of range") : x$14.$array[x$14.$offset + x$15])); + if (re2.Op === 129) { + if (n >= 3) { + cleanAlt((x$16 = p.stack, x$17 = n - 3 >> 0, ((x$17 < 0 || x$17 >= x$16.$length) ? $throwRuntimeError("index out of range") : x$16.$array[x$16.$offset + x$17]))); + } + (x$18 = p.stack, x$19 = n - 2 >> 0, (x$19 < 0 || x$19 >= x$18.$length) ? $throwRuntimeError("index out of range") : x$18.$array[x$18.$offset + x$19] = re1$1); + (x$20 = p.stack, x$21 = n - 1 >> 0, (x$21 < 0 || x$21 >= x$20.$length) ? $throwRuntimeError("index out of range") : x$20.$array[x$20.$offset + x$21] = re2); + return true; + } + } + return false; + }; + parser.prototype.swapVerticalBar = function() { return this.$val.swapVerticalBar(); }; + parser.ptr.prototype.parseRightParen = function() { + var n, p, re1, re2, x, x$1, x$2, x$3, x$4; + p = this; + p.concat(); + if (p.swapVerticalBar()) { + p.stack = $subslice(p.stack, 0, (p.stack.$length - 1 >> 0)); + } + p.alternate(); + n = p.stack.$length; + if (n < 2) { + return new Error.ptr("unexpected )", p.wholeRegexp); + } + re1 = (x = p.stack, x$1 = n - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])); + re2 = (x$2 = p.stack, x$3 = n - 2 >> 0, ((x$3 < 0 || x$3 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + x$3])); + p.stack = $subslice(p.stack, 0, (n - 2 >> 0)); + if (!((re2.Op === 128))) { + return new Error.ptr("unexpected )", p.wholeRegexp); + } + p.flags = re2.Flags; + if (re2.Cap === 0) { + p.push(re1); + } else { + re2.Op = 13; + re2.Sub = $subslice(new sliceType$4(re2.Sub0), 0, 1); + (x$4 = re2.Sub, (0 < 0 || 0 >= x$4.$length) ? $throwRuntimeError("index out of range") : x$4.$array[x$4.$offset + 0] = re1); + p.push(re2); + } + return $ifaceNil; + }; + parser.prototype.parseRightParen = function() { return this.$val.parseRightParen(); }; + parser.ptr.prototype.parseEscape = function(s) { + var _ref, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$44, _tmp$45, _tmp$46, _tmp$47, _tmp$48, _tmp$49, _tmp$5, _tmp$50, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, c, err = $ifaceNil, i, nhex, p, r = 0, rest = "", s, t, v, x, y; + p = this; + t = s.substring(1); + if (t === "") { + _tmp = 0; _tmp$1 = ""; _tmp$2 = new Error.ptr("trailing backslash at end of expression", ""); r = _tmp; rest = _tmp$1; err = _tmp$2; + return [r, rest, err]; + } + _tuple = nextRune(t); c = _tuple[0]; t = _tuple[1]; err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$3 = 0; _tmp$4 = ""; _tmp$5 = err; r = _tmp$3; rest = _tmp$4; err = _tmp$5; + return [r, rest, err]; + } + _ref = c; + Switch: + switch (0) { default: if (_ref === 49 || _ref === 50 || _ref === 51 || _ref === 52 || _ref === 53 || _ref === 54 || _ref === 55) { + if (t === "" || t.charCodeAt(0) < 48 || t.charCodeAt(0) > 55) { + break; + } + r = c - 48 >> 0; + i = 1; + while (true) { + if (!(i < 3)) { break; } + if (t === "" || t.charCodeAt(0) < 48 || t.charCodeAt(0) > 55) { + break; + } + r = (((((r >>> 16 << 16) * 8 >> 0) + (r << 16 >>> 16) * 8) >> 0) + (t.charCodeAt(0) >> 0) >> 0) - 48 >> 0; + t = t.substring(1); + i = i + (1) >> 0; + } + _tmp$6 = r; _tmp$7 = t; _tmp$8 = $ifaceNil; r = _tmp$6; rest = _tmp$7; err = _tmp$8; + return [r, rest, err]; + } else if (_ref === 48) { + r = c - 48 >> 0; + i = 1; + while (true) { + if (!(i < 3)) { break; } + if (t === "" || t.charCodeAt(0) < 48 || t.charCodeAt(0) > 55) { + break; + } + r = (((((r >>> 16 << 16) * 8 >> 0) + (r << 16 >>> 16) * 8) >> 0) + (t.charCodeAt(0) >> 0) >> 0) - 48 >> 0; + t = t.substring(1); + i = i + (1) >> 0; + } + _tmp$9 = r; _tmp$10 = t; _tmp$11 = $ifaceNil; r = _tmp$9; rest = _tmp$10; err = _tmp$11; + return [r, rest, err]; + } else if (_ref === 120) { + if (t === "") { + break; + } + _tuple$1 = nextRune(t); c = _tuple$1[0]; t = _tuple$1[1]; err = _tuple$1[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$12 = 0; _tmp$13 = ""; _tmp$14 = err; r = _tmp$12; rest = _tmp$13; err = _tmp$14; + return [r, rest, err]; + } + if (c === 123) { + nhex = 0; + r = 0; + while (true) { + if (!(true)) { break; } + if (t === "") { + break Switch; + } + _tuple$2 = nextRune(t); c = _tuple$2[0]; t = _tuple$2[1]; err = _tuple$2[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$15 = 0; _tmp$16 = ""; _tmp$17 = err; r = _tmp$15; rest = _tmp$16; err = _tmp$17; + return [r, rest, err]; + } + if (c === 125) { + break; + } + v = unhex(c); + if (v < 0) { + break Switch; + } + r = ((((r >>> 16 << 16) * 16 >> 0) + (r << 16 >>> 16) * 16) >> 0) + v >> 0; + if (r > 1114111) { + break Switch; + } + nhex = nhex + (1) >> 0; + } + if (nhex === 0) { + break Switch; + } + _tmp$18 = r; _tmp$19 = t; _tmp$20 = $ifaceNil; r = _tmp$18; rest = _tmp$19; err = _tmp$20; + return [r, rest, err]; + } + x = unhex(c); + _tuple$3 = nextRune(t); c = _tuple$3[0]; t = _tuple$3[1]; err = _tuple$3[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$21 = 0; _tmp$22 = ""; _tmp$23 = err; r = _tmp$21; rest = _tmp$22; err = _tmp$23; + return [r, rest, err]; + } + y = unhex(c); + if (x < 0 || y < 0) { + break; + } + _tmp$24 = ((((x >>> 16 << 16) * 16 >> 0) + (x << 16 >>> 16) * 16) >> 0) + y >> 0; _tmp$25 = t; _tmp$26 = $ifaceNil; r = _tmp$24; rest = _tmp$25; err = _tmp$26; + return [r, rest, err]; + } else if (_ref === 97) { + _tmp$27 = 7; _tmp$28 = t; _tmp$29 = err; r = _tmp$27; rest = _tmp$28; err = _tmp$29; + return [r, rest, err]; + } else if (_ref === 102) { + _tmp$30 = 12; _tmp$31 = t; _tmp$32 = err; r = _tmp$30; rest = _tmp$31; err = _tmp$32; + return [r, rest, err]; + } else if (_ref === 110) { + _tmp$33 = 10; _tmp$34 = t; _tmp$35 = err; r = _tmp$33; rest = _tmp$34; err = _tmp$35; + return [r, rest, err]; + } else if (_ref === 114) { + _tmp$36 = 13; _tmp$37 = t; _tmp$38 = err; r = _tmp$36; rest = _tmp$37; err = _tmp$38; + return [r, rest, err]; + } else if (_ref === 116) { + _tmp$39 = 9; _tmp$40 = t; _tmp$41 = err; r = _tmp$39; rest = _tmp$40; err = _tmp$41; + return [r, rest, err]; + } else if (_ref === 118) { + _tmp$42 = 11; _tmp$43 = t; _tmp$44 = err; r = _tmp$42; rest = _tmp$43; err = _tmp$44; + return [r, rest, err]; + } else { + if (c < 128 && !isalnum(c)) { + _tmp$45 = c; _tmp$46 = t; _tmp$47 = $ifaceNil; r = _tmp$45; rest = _tmp$46; err = _tmp$47; + return [r, rest, err]; + } + } } + _tmp$48 = 0; _tmp$49 = ""; _tmp$50 = new Error.ptr("invalid escape sequence", s.substring(0, (s.length - t.length >> 0))); r = _tmp$48; rest = _tmp$49; err = _tmp$50; + return [r, rest, err]; + }; + parser.prototype.parseEscape = function(s) { return this.$val.parseEscape(s); }; + parser.ptr.prototype.parseClassChar = function(s, wholeClass) { + var _tmp, _tmp$1, _tmp$2, _tuple, _tuple$1, err = $ifaceNil, p, r = 0, rest = "", s, wholeClass; + p = this; + if (s === "") { + _tmp = 0; _tmp$1 = ""; _tmp$2 = new Error.ptr("missing closing ]", wholeClass); r = _tmp; rest = _tmp$1; err = _tmp$2; + return [r, rest, err]; + } + if (s.charCodeAt(0) === 92) { + _tuple = p.parseEscape(s); r = _tuple[0]; rest = _tuple[1]; err = _tuple[2]; + return [r, rest, err]; + } + _tuple$1 = nextRune(s); r = _tuple$1[0]; rest = _tuple$1[1]; err = _tuple$1[2]; + return [r, rest, err]; + }; + parser.prototype.parseClassChar = function(s, wholeClass) { return this.$val.parseClassChar(s, wholeClass); }; + parser.ptr.prototype.parsePerlClassEscape = function(s, r) { + var _entry, _tmp, _tmp$1, g, out = sliceType.nil, p, r, rest = "", s; + p = this; + if ((((p.flags & 64) >>> 0) === 0) || s.length < 2 || !((s.charCodeAt(0) === 92))) { + return [out, rest]; + } + g = $clone((_entry = perlGroup[s.substring(0, 2)], _entry !== undefined ? _entry.v : new charGroup.ptr()), charGroup); + if (g.sign === 0) { + return [out, rest]; + } + _tmp = p.appendGroup(r, g); _tmp$1 = s.substring(2); out = _tmp; rest = _tmp$1; + return [out, rest]; + }; + parser.prototype.parsePerlClassEscape = function(s, r) { return this.$val.parsePerlClassEscape(s, r); }; + parser.ptr.prototype.parseNamedClass = function(s, r) { + var _entry, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, err = $ifaceNil, g, i, name, out = sliceType.nil, p, r, rest = "", s; + p = this; + if (s.length < 2 || !((s.charCodeAt(0) === 91)) || !((s.charCodeAt(1) === 58))) { + return [out, rest, err]; + } + i = strings.Index(s.substring(2), ":]"); + if (i < 0) { + return [out, rest, err]; + } + i = i + (2) >> 0; + _tmp = s.substring(0, (i + 2 >> 0)); _tmp$1 = s.substring((i + 2 >> 0)); name = _tmp; s = _tmp$1; + g = $clone((_entry = posixGroup[name], _entry !== undefined ? _entry.v : new charGroup.ptr()), charGroup); + if (g.sign === 0) { + _tmp$2 = sliceType.nil; _tmp$3 = ""; _tmp$4 = new Error.ptr("invalid character class range", name); out = _tmp$2; rest = _tmp$3; err = _tmp$4; + return [out, rest, err]; + } + _tmp$5 = p.appendGroup(r, g); _tmp$6 = s; _tmp$7 = $ifaceNil; out = _tmp$5; rest = _tmp$6; err = _tmp$7; + return [out, rest, err]; + }; + parser.prototype.parseNamedClass = function(s, r) { return this.$val.parseNamedClass(s, r); }; + parser.ptr.prototype.appendGroup = function(r, g) { + var g, p, r, tmp; + p = this; + g = $clone(g, charGroup); + if (((p.flags & 1) >>> 0) === 0) { + if (g.sign < 0) { + r = appendNegatedClass(r, g.class$1); + } else { + r = appendClass(r, g.class$1); + } + } else { + tmp = $subslice(p.tmpClass, 0, 0); + tmp = appendFoldedClass(tmp, g.class$1); + p.tmpClass = tmp; + tmp = cleanClass(new ptrType$1(function() { return this.$target.tmpClass; }, function($v) { this.$target.tmpClass = $v; }, p)); + if (g.sign < 0) { + r = appendNegatedClass(r, tmp); + } else { + r = appendClass(r, tmp); + } + } + return r; + }; + parser.prototype.appendGroup = function(r, g) { return this.$val.appendGroup(r, g); }; + unicodeTable = function(name) { + var _entry, _entry$1, _entry$2, _entry$3, name, t, t$1; + if (name === "Any") { + return [anyTable, anyTable]; + } + t = (_entry = unicode.Categories[name], _entry !== undefined ? _entry.v : ptrType$2.nil); + if (!(t === ptrType$2.nil)) { + return [t, (_entry$1 = unicode.FoldCategory[name], _entry$1 !== undefined ? _entry$1.v : ptrType$2.nil)]; + } + t$1 = (_entry$2 = unicode.Scripts[name], _entry$2 !== undefined ? _entry$2.v : ptrType$2.nil); + if (!(t$1 === ptrType$2.nil)) { + return [t$1, (_entry$3 = unicode.FoldScript[name], _entry$3 !== undefined ? _entry$3.v : ptrType$2.nil)]; + } + return [ptrType$2.nil, ptrType$2.nil]; + }; + parser.ptr.prototype.parseUnicodeClass = function(s, r) { + var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, c, end, err = $ifaceNil, fold, name, out = sliceType.nil, p, r, rest = "", s, seq, sign, t, tab, tmp; + p = this; + if ((((p.flags & 128) >>> 0) === 0) || s.length < 2 || !((s.charCodeAt(0) === 92)) || !((s.charCodeAt(1) === 112)) && !((s.charCodeAt(1) === 80))) { + return [out, rest, err]; + } + sign = 1; + if (s.charCodeAt(1) === 80) { + sign = -1; + } + t = s.substring(2); + _tuple = nextRune(t); c = _tuple[0]; t = _tuple[1]; err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [out, rest, err]; + } + _tmp = ""; _tmp$1 = ""; seq = _tmp; name = _tmp$1; + if (!((c === 123))) { + seq = s.substring(0, (s.length - t.length >> 0)); + name = seq.substring(2); + } else { + end = strings.IndexRune(s, 125); + if (end < 0) { + err = checkUTF8(s); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [out, rest, err]; + } + _tmp$2 = sliceType.nil; _tmp$3 = ""; _tmp$4 = new Error.ptr("invalid character class range", s); out = _tmp$2; rest = _tmp$3; err = _tmp$4; + return [out, rest, err]; + } + _tmp$5 = s.substring(0, (end + 1 >> 0)); _tmp$6 = s.substring((end + 1 >> 0)); seq = _tmp$5; t = _tmp$6; + name = s.substring(3, end); + err = checkUTF8(name); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [out, rest, err]; + } + } + if (!(name === "") && (name.charCodeAt(0) === 94)) { + sign = -sign; + name = name.substring(1); + } + _tuple$1 = unicodeTable(name); tab = _tuple$1[0]; fold = _tuple$1[1]; + if (tab === ptrType$2.nil) { + _tmp$7 = sliceType.nil; _tmp$8 = ""; _tmp$9 = new Error.ptr("invalid character class range", seq); out = _tmp$7; rest = _tmp$8; err = _tmp$9; + return [out, rest, err]; + } + if ((((p.flags & 1) >>> 0) === 0) || fold === ptrType$2.nil) { + if (sign > 0) { + r = appendTable(r, tab); + } else { + r = appendNegatedTable(r, tab); + } + } else { + tmp = $subslice(p.tmpClass, 0, 0); + tmp = appendTable(tmp, tab); + tmp = appendTable(tmp, fold); + p.tmpClass = tmp; + tmp = cleanClass(new ptrType$1(function() { return this.$target.tmpClass; }, function($v) { this.$target.tmpClass = $v; }, p)); + if (sign > 0) { + r = appendClass(r, tmp); + } else { + r = appendNegatedClass(r, tmp); + } + } + _tmp$10 = r; _tmp$11 = t; _tmp$12 = $ifaceNil; out = _tmp$10; rest = _tmp$11; err = _tmp$12; + return [out, rest, err]; + }; + parser.prototype.parseUnicodeClass = function(s, r) { return this.$val.parseUnicodeClass(s, r); }; + parser.ptr.prototype.parseClass = function(s) { + var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, class$1, err = $ifaceNil, err$1, err$2, first, hi, lo, nclass, nclass$1, nclass$2, nt, nt$1, nt$2, p, re, rest = "", rng, s, sign, size, t; + p = this; + t = s.substring(1); + re = p.newRegexp(4); + re.Flags = p.flags; + re.Rune = $subslice(new sliceType(re.Rune0), 0, 0); + sign = 1; + if (!(t === "") && (t.charCodeAt(0) === 94)) { + sign = -1; + t = t.substring(1); + if (((p.flags & 4) >>> 0) === 0) { + re.Rune = $append(re.Rune, 10, 10); + } + } + class$1 = re.Rune; + first = true; + while (true) { + if (!(t === "" || !((t.charCodeAt(0) === 93)) || first)) { break; } + if (!(t === "") && (t.charCodeAt(0) === 45) && (((p.flags & 64) >>> 0) === 0) && !first && ((t.length === 1) || !((t.charCodeAt(1) === 93)))) { + _tuple = utf8.DecodeRuneInString(t.substring(1)); size = _tuple[1]; + _tmp = ""; _tmp$1 = new Error.ptr("invalid character class range", t.substring(0, (1 + size >> 0))); rest = _tmp; err = _tmp$1; + return [rest, err]; + } + first = false; + if (t.length > 2 && (t.charCodeAt(0) === 91) && (t.charCodeAt(1) === 58)) { + _tuple$1 = p.parseNamedClass(t, class$1); nclass = _tuple$1[0]; nt = _tuple$1[1]; err$1 = _tuple$1[2]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + _tmp$2 = ""; _tmp$3 = err$1; rest = _tmp$2; err = _tmp$3; + return [rest, err]; + } + if (!(nclass === sliceType.nil)) { + _tmp$4 = nclass; _tmp$5 = nt; class$1 = _tmp$4; t = _tmp$5; + continue; + } + } + _tuple$2 = p.parseUnicodeClass(t, class$1); nclass$1 = _tuple$2[0]; nt$1 = _tuple$2[1]; err$2 = _tuple$2[2]; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + _tmp$6 = ""; _tmp$7 = err$2; rest = _tmp$6; err = _tmp$7; + return [rest, err]; + } + if (!(nclass$1 === sliceType.nil)) { + _tmp$8 = nclass$1; _tmp$9 = nt$1; class$1 = _tmp$8; t = _tmp$9; + continue; + } + _tuple$3 = p.parsePerlClassEscape(t, class$1); nclass$2 = _tuple$3[0]; nt$2 = _tuple$3[1]; + if (!(nclass$2 === sliceType.nil)) { + _tmp$10 = nclass$2; _tmp$11 = nt$2; class$1 = _tmp$10; t = _tmp$11; + continue; + } + rng = t; + _tmp$12 = 0; _tmp$13 = 0; lo = _tmp$12; hi = _tmp$13; + _tuple$4 = p.parseClassChar(t, s); lo = _tuple$4[0]; t = _tuple$4[1]; err$2 = _tuple$4[2]; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + _tmp$14 = ""; _tmp$15 = err$2; rest = _tmp$14; err = _tmp$15; + return [rest, err]; + } + hi = lo; + if (t.length >= 2 && (t.charCodeAt(0) === 45) && !((t.charCodeAt(1) === 93))) { + t = t.substring(1); + _tuple$5 = p.parseClassChar(t, s); hi = _tuple$5[0]; t = _tuple$5[1]; err$2 = _tuple$5[2]; + if (!($interfaceIsEqual(err$2, $ifaceNil))) { + _tmp$16 = ""; _tmp$17 = err$2; rest = _tmp$16; err = _tmp$17; + return [rest, err]; + } + if (hi < lo) { + rng = rng.substring(0, (rng.length - t.length >> 0)); + _tmp$18 = ""; _tmp$19 = new Error.ptr("invalid character class range", rng); rest = _tmp$18; err = _tmp$19; + return [rest, err]; + } + } + if (((p.flags & 1) >>> 0) === 0) { + class$1 = appendRange(class$1, lo, hi); + } else { + class$1 = appendFoldedRange(class$1, lo, hi); + } + } + t = t.substring(1); + re.Rune = class$1; + class$1 = cleanClass(new ptrType$1(function() { return this.$target.Rune; }, function($v) { this.$target.Rune = $v; }, re)); + if (sign < 0) { + class$1 = negateClass(class$1); + } + re.Rune = class$1; + p.push(re); + _tmp$20 = t; _tmp$21 = $ifaceNil; rest = _tmp$20; err = _tmp$21; + return [rest, err]; + }; + parser.prototype.parseClass = function(s) { return this.$val.parseClass(s); }; + cleanClass = function(rp) { + var _tmp, _tmp$1, hi, i, lo, r, rp, w, x, x$1, x$2, x$3, x$4, x$5; + sort.Sort((x = new ranges.ptr(rp), new x.constructor.elem(x))); + r = rp.$get(); + if (r.$length < 2) { + return r; + } + w = 2; + i = 2; + while (true) { + if (!(i < r.$length)) { break; } + _tmp = ((i < 0 || i >= r.$length) ? $throwRuntimeError("index out of range") : r.$array[r.$offset + i]); _tmp$1 = (x$1 = i + 1 >> 0, ((x$1 < 0 || x$1 >= r.$length) ? $throwRuntimeError("index out of range") : r.$array[r.$offset + x$1])); lo = _tmp; hi = _tmp$1; + if (lo <= ((x$2 = w - 1 >> 0, ((x$2 < 0 || x$2 >= r.$length) ? $throwRuntimeError("index out of range") : r.$array[r.$offset + x$2])) + 1 >> 0)) { + if (hi > (x$3 = w - 1 >> 0, ((x$3 < 0 || x$3 >= r.$length) ? $throwRuntimeError("index out of range") : r.$array[r.$offset + x$3]))) { + (x$4 = w - 1 >> 0, (x$4 < 0 || x$4 >= r.$length) ? $throwRuntimeError("index out of range") : r.$array[r.$offset + x$4] = hi); + } + i = i + (2) >> 0; + continue; + } + (w < 0 || w >= r.$length) ? $throwRuntimeError("index out of range") : r.$array[r.$offset + w] = lo; + (x$5 = w + 1 >> 0, (x$5 < 0 || x$5 >= r.$length) ? $throwRuntimeError("index out of range") : r.$array[r.$offset + x$5] = hi); + w = w + (2) >> 0; + i = i + (2) >> 0; + } + return $subslice(r, 0, w); + }; + appendLiteral = function(r, x, flags) { + var flags, r, x; + if (!((((flags & 1) >>> 0) === 0))) { + return appendFoldedRange(r, x, x); + } + return appendRange(r, x, x); + }; + appendRange = function(r, lo, hi) { + var _tmp, _tmp$1, hi, i, lo, n, r, rhi, rlo, x, x$1, x$2, x$3; + n = r.$length; + i = 2; + while (true) { + if (!(i <= 4)) { break; } + if (n >= i) { + _tmp = (x = n - i >> 0, ((x < 0 || x >= r.$length) ? $throwRuntimeError("index out of range") : r.$array[r.$offset + x])); _tmp$1 = (x$1 = (n - i >> 0) + 1 >> 0, ((x$1 < 0 || x$1 >= r.$length) ? $throwRuntimeError("index out of range") : r.$array[r.$offset + x$1])); rlo = _tmp; rhi = _tmp$1; + if (lo <= (rhi + 1 >> 0) && rlo <= (hi + 1 >> 0)) { + if (lo < rlo) { + (x$2 = n - i >> 0, (x$2 < 0 || x$2 >= r.$length) ? $throwRuntimeError("index out of range") : r.$array[r.$offset + x$2] = lo); + } + if (hi > rhi) { + (x$3 = (n - i >> 0) + 1 >> 0, (x$3 < 0 || x$3 >= r.$length) ? $throwRuntimeError("index out of range") : r.$array[r.$offset + x$3] = hi); + } + return r; + } + } + i = i + (2) >> 0; + } + return $append(r, lo, hi); + }; + appendFoldedRange = function(r, lo, hi) { + var c, f, hi, lo, r; + if (lo <= 65 && hi >= 71903) { + return appendRange(r, lo, hi); + } + if (hi < 65 || lo > 71903) { + return appendRange(r, lo, hi); + } + if (lo < 65) { + r = appendRange(r, lo, 64); + lo = 65; + } + if (hi > 71903) { + r = appendRange(r, 71904, hi); + hi = 71903; + } + c = lo; + while (true) { + if (!(c <= hi)) { break; } + r = appendRange(r, c, c); + f = unicode.SimpleFold(c); + while (true) { + if (!(!((f === c)))) { break; } + r = appendRange(r, f, f); + f = unicode.SimpleFold(f); + } + c = c + (1) >> 0; + } + return r; + }; + appendClass = function(r, x) { + var i, r, x, x$1; + i = 0; + while (true) { + if (!(i < x.$length)) { break; } + r = appendRange(r, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i]), (x$1 = i + 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1]))); + i = i + (2) >> 0; + } + return r; + }; + appendFoldedClass = function(r, x) { + var i, r, x, x$1; + i = 0; + while (true) { + if (!(i < x.$length)) { break; } + r = appendFoldedRange(r, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i]), (x$1 = i + 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1]))); + i = i + (2) >> 0; + } + return r; + }; + appendNegatedClass = function(r, x) { + var _tmp, _tmp$1, hi, i, lo, nextLo, r, x, x$1; + nextLo = 0; + i = 0; + while (true) { + if (!(i < x.$length)) { break; } + _tmp = ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i]); _tmp$1 = (x$1 = i + 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])); lo = _tmp; hi = _tmp$1; + if (nextLo <= (lo - 1 >> 0)) { + r = appendRange(r, nextLo, lo - 1 >> 0); + } + nextLo = hi + 1 >> 0; + i = i + (2) >> 0; + } + if (nextLo <= 1114111) { + r = appendRange(r, nextLo, 1114111); + } + return r; + }; + appendTable = function(r, x) { + var _i, _i$1, _ref, _ref$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, c, c$1, hi, hi$1, lo, lo$1, r, stride, stride$1, x, xr, xr$1; + _ref = x.R16; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + xr = $clone(((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]), unicode.Range16); + _tmp = (xr.Lo >> 0); _tmp$1 = (xr.Hi >> 0); _tmp$2 = (xr.Stride >> 0); lo = _tmp; hi = _tmp$1; stride = _tmp$2; + if (stride === 1) { + r = appendRange(r, lo, hi); + _i++; + continue; + } + c = lo; + while (true) { + if (!(c <= hi)) { break; } + r = appendRange(r, c, c); + c = c + (stride) >> 0; + } + _i++; + } + _ref$1 = x.R32; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + xr$1 = $clone(((_i$1 < 0 || _i$1 >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i$1]), unicode.Range32); + _tmp$3 = (xr$1.Lo >> 0); _tmp$4 = (xr$1.Hi >> 0); _tmp$5 = (xr$1.Stride >> 0); lo$1 = _tmp$3; hi$1 = _tmp$4; stride$1 = _tmp$5; + if (stride$1 === 1) { + r = appendRange(r, lo$1, hi$1); + _i$1++; + continue; + } + c$1 = lo$1; + while (true) { + if (!(c$1 <= hi$1)) { break; } + r = appendRange(r, c$1, c$1); + c$1 = c$1 + (stride$1) >> 0; + } + _i$1++; + } + return r; + }; + appendNegatedTable = function(r, x) { + var _i, _i$1, _ref, _ref$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, c, c$1, hi, hi$1, lo, lo$1, nextLo, r, stride, stride$1, x, xr, xr$1; + nextLo = 0; + _ref = x.R16; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + xr = $clone(((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]), unicode.Range16); + _tmp = (xr.Lo >> 0); _tmp$1 = (xr.Hi >> 0); _tmp$2 = (xr.Stride >> 0); lo = _tmp; hi = _tmp$1; stride = _tmp$2; + if (stride === 1) { + if (nextLo <= (lo - 1 >> 0)) { + r = appendRange(r, nextLo, lo - 1 >> 0); + } + nextLo = hi + 1 >> 0; + _i++; + continue; + } + c = lo; + while (true) { + if (!(c <= hi)) { break; } + if (nextLo <= (c - 1 >> 0)) { + r = appendRange(r, nextLo, c - 1 >> 0); + } + nextLo = c + 1 >> 0; + c = c + (stride) >> 0; + } + _i++; + } + _ref$1 = x.R32; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + xr$1 = $clone(((_i$1 < 0 || _i$1 >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i$1]), unicode.Range32); + _tmp$3 = (xr$1.Lo >> 0); _tmp$4 = (xr$1.Hi >> 0); _tmp$5 = (xr$1.Stride >> 0); lo$1 = _tmp$3; hi$1 = _tmp$4; stride$1 = _tmp$5; + if (stride$1 === 1) { + if (nextLo <= (lo$1 - 1 >> 0)) { + r = appendRange(r, nextLo, lo$1 - 1 >> 0); + } + nextLo = hi$1 + 1 >> 0; + _i$1++; + continue; + } + c$1 = lo$1; + while (true) { + if (!(c$1 <= hi$1)) { break; } + if (nextLo <= (c$1 - 1 >> 0)) { + r = appendRange(r, nextLo, c$1 - 1 >> 0); + } + nextLo = c$1 + 1 >> 0; + c$1 = c$1 + (stride$1) >> 0; + } + _i$1++; + } + if (nextLo <= 1114111) { + r = appendRange(r, nextLo, 1114111); + } + return r; + }; + negateClass = function(r) { + var _tmp, _tmp$1, hi, i, lo, nextLo, r, w, x, x$1; + nextLo = 0; + w = 0; + i = 0; + while (true) { + if (!(i < r.$length)) { break; } + _tmp = ((i < 0 || i >= r.$length) ? $throwRuntimeError("index out of range") : r.$array[r.$offset + i]); _tmp$1 = (x = i + 1 >> 0, ((x < 0 || x >= r.$length) ? $throwRuntimeError("index out of range") : r.$array[r.$offset + x])); lo = _tmp; hi = _tmp$1; + if (nextLo <= (lo - 1 >> 0)) { + (w < 0 || w >= r.$length) ? $throwRuntimeError("index out of range") : r.$array[r.$offset + w] = nextLo; + (x$1 = w + 1 >> 0, (x$1 < 0 || x$1 >= r.$length) ? $throwRuntimeError("index out of range") : r.$array[r.$offset + x$1] = lo - 1 >> 0); + w = w + (2) >> 0; + } + nextLo = hi + 1 >> 0; + i = i + (2) >> 0; + } + r = $subslice(r, 0, w); + if (nextLo <= 1114111) { + r = $append(r, nextLo, 1114111); + } + return r; + }; + ranges.ptr.prototype.Less = function(i, j) { + var i, j, p, ra, x, x$1; + ra = $clone(this, ranges); + p = ra.p.$get(); + i = i * (2) >> 0; + j = j * (2) >> 0; + return ((i < 0 || i >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + i]) < ((j < 0 || j >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + j]) || (((i < 0 || i >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + i]) === ((j < 0 || j >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + j])) && (x = i + 1 >> 0, ((x < 0 || x >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + x])) > (x$1 = j + 1 >> 0, ((x$1 < 0 || x$1 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + x$1])); + }; + ranges.prototype.Less = function(i, j) { return this.$val.Less(i, j); }; + ranges.ptr.prototype.Len = function() { + var _q, ra; + ra = $clone(this, ranges); + return (_q = ra.p.$get().$length / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + }; + ranges.prototype.Len = function() { return this.$val.Len(); }; + ranges.ptr.prototype.Swap = function(i, j) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, i, j, p, ra, x, x$1, x$2, x$3; + ra = $clone(this, ranges); + p = ra.p.$get(); + i = i * (2) >> 0; + j = j * (2) >> 0; + _tmp = ((j < 0 || j >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + j]); _tmp$1 = (x = j + 1 >> 0, ((x < 0 || x >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + x])); _tmp$2 = ((i < 0 || i >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + i]); _tmp$3 = (x$1 = i + 1 >> 0, ((x$1 < 0 || x$1 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + x$1])); (i < 0 || i >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + i] = _tmp; (x$2 = i + 1 >> 0, (x$2 < 0 || x$2 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + x$2] = _tmp$1); (j < 0 || j >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + j] = _tmp$2; (x$3 = j + 1 >> 0, (x$3 < 0 || x$3 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + x$3] = _tmp$3); + }; + ranges.prototype.Swap = function(i, j) { return this.$val.Swap(i, j); }; + checkUTF8 = function(s) { + var _tuple, rune, s, size; + while (true) { + if (!(!(s === ""))) { break; } + _tuple = utf8.DecodeRuneInString(s); rune = _tuple[0]; size = _tuple[1]; + if ((rune === 65533) && (size === 1)) { + return new Error.ptr("invalid UTF-8", s); + } + s = s.substring(size); + } + return $ifaceNil; + }; + nextRune = function(s) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, c = 0, err = $ifaceNil, s, size, t = ""; + _tuple = utf8.DecodeRuneInString(s); c = _tuple[0]; size = _tuple[1]; + if ((c === 65533) && (size === 1)) { + _tmp = 0; _tmp$1 = ""; _tmp$2 = new Error.ptr("invalid UTF-8", s); c = _tmp; t = _tmp$1; err = _tmp$2; + return [c, t, err]; + } + _tmp$3 = c; _tmp$4 = s.substring(size); _tmp$5 = $ifaceNil; c = _tmp$3; t = _tmp$4; err = _tmp$5; + return [c, t, err]; + }; + isalnum = function(c) { + var c; + return 48 <= c && c <= 57 || 65 <= c && c <= 90 || 97 <= c && c <= 122; + }; + unhex = function(c) { + var c; + if (48 <= c && c <= 57) { + return c - 48 >> 0; + } + if (97 <= c && c <= 102) { + return (c - 97 >> 0) + 10 >> 0; + } + if (65 <= c && c <= 70) { + return (c - 65 >> 0) + 10 >> 0; + } + return -1; + }; + InstOp.prototype.String = function() { + var i; + i = this.$val; + if ((i >>> 0) >= (instOpNames.$length >>> 0)) { + return ""; + } + return ((i < 0 || i >= instOpNames.$length) ? $throwRuntimeError("index out of range") : instOpNames.$array[instOpNames.$offset + i]); + }; + $ptrType(InstOp).prototype.String = function() { return new InstOp(this.$get()).String(); }; + EmptyOpContext = $pkg.EmptyOpContext = function(r1, r2) { + var boundary, op, r1, r2; + op = 32; + boundary = 0; + if (IsWordChar(r1)) { + boundary = 1; + } else if (r1 === 10) { + op = (op | (1)) >>> 0; + } else if (r1 < 0) { + op = (op | (5)) >>> 0; + } + if (IsWordChar(r2)) { + boundary = (boundary ^ (1)) << 24 >>> 24; + } else if (r2 === 10) { + op = (op | (2)) >>> 0; + } else if (r2 < 0) { + op = (op | (10)) >>> 0; + } + if (!((boundary === 0))) { + op = (op ^ (48)) << 24 >>> 24; + } + return op; + }; + IsWordChar = $pkg.IsWordChar = function(r) { + var r; + return 65 <= r && r <= 90 || 97 <= r && r <= 122 || 48 <= r && r <= 57 || (r === 95); + }; + Prog.ptr.prototype.String = function() { + var b, p; + p = this; + b = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + dumpProg(b, p); + return b.String(); + }; + Prog.prototype.String = function() { return this.$val.String(); }; + Prog.ptr.prototype.skipNop = function(pc) { + var i, p, pc, x, x$1; + p = this; + i = (x = p.Inst, ((pc < 0 || pc >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + pc])); + while (true) { + if (!((i.Op === 6) || (i.Op === 2))) { break; } + pc = i.Out; + i = (x$1 = p.Inst, ((pc < 0 || pc >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + pc])); + } + return [i, pc]; + }; + Prog.prototype.skipNop = function(pc) { return this.$val.skipNop(pc); }; + Inst.ptr.prototype.op = function() { + var _ref, i, op; + i = this; + op = i.Op; + _ref = op; + if (_ref === 8 || _ref === 9 || _ref === 10) { + op = 7; + } + return op; + }; + Inst.prototype.op = function() { return this.$val.op(); }; + Prog.ptr.prototype.Prefix = function() { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, buf, complete = false, i, p, prefix = "", x; + p = this; + _tuple = p.skipNop((p.Start >>> 0)); i = _tuple[0]; + if (!((i.op() === 7)) || !((i.Rune.$length === 1))) { + _tmp = ""; _tmp$1 = i.Op === 4; prefix = _tmp; complete = _tmp$1; + return [prefix, complete]; + } + buf = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + while (true) { + if (!((i.op() === 7) && (i.Rune.$length === 1) && ((((i.Arg << 16 >>> 16) & 1) >>> 0) === 0))) { break; } + buf.WriteRune((x = i.Rune, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0]))); + _tuple$1 = p.skipNop(i.Out); i = _tuple$1[0]; + } + _tmp$2 = buf.String(); _tmp$3 = i.Op === 4; prefix = _tmp$2; complete = _tmp$3; + return [prefix, complete]; + }; + Prog.prototype.Prefix = function() { return this.$val.Prefix(); }; + Prog.ptr.prototype.StartCond = function() { + var _ref, flag, i, p, pc, x, x$1; + p = this; + flag = 0; + pc = (p.Start >>> 0); + i = (x = p.Inst, ((pc < 0 || pc >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + pc])); + Loop: + while (true) { + if (!(true)) { break; } + _ref = i.Op; + if (_ref === 3) { + flag = (flag | ((i.Arg << 24 >>> 24))) >>> 0; + } else if (_ref === 5) { + return 255; + } else if (_ref === 2 || _ref === 6) { + } else { + break Loop; + } + pc = i.Out; + i = (x$1 = p.Inst, ((pc < 0 || pc >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + pc])); + } + return flag; + }; + Prog.prototype.StartCond = function() { return this.$val.StartCond(); }; + Inst.ptr.prototype.MatchRune = function(r) { + var i, r; + i = this; + return !((i.MatchRunePos(r) === -1)); + }; + Inst.prototype.MatchRune = function(r) { return this.$val.MatchRune(r); }; + Inst.ptr.prototype.MatchRunePos = function(r) { + var _q, _q$1, _q$2, c, hi, i, j, lo, m, r, r0, r1, rune, x, x$1, x$2; + i = this; + rune = i.Rune; + if (rune.$length === 1) { + r0 = ((0 < 0 || 0 >= rune.$length) ? $throwRuntimeError("index out of range") : rune.$array[rune.$offset + 0]); + if (r === r0) { + return 0; + } + if (!(((((i.Arg << 16 >>> 16) & 1) >>> 0) === 0))) { + r1 = unicode.SimpleFold(r0); + while (true) { + if (!(!((r1 === r0)))) { break; } + if (r === r1) { + return 0; + } + r1 = unicode.SimpleFold(r1); + } + } + return -1; + } + j = 0; + while (true) { + if (!(j < rune.$length && j <= 8)) { break; } + if (r < ((j < 0 || j >= rune.$length) ? $throwRuntimeError("index out of range") : rune.$array[rune.$offset + j])) { + return -1; + } + if (r <= (x = j + 1 >> 0, ((x < 0 || x >= rune.$length) ? $throwRuntimeError("index out of range") : rune.$array[rune.$offset + x]))) { + return (_q = j / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + } + j = j + (2) >> 0; + } + lo = 0; + hi = (_q$1 = rune.$length / 2, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")); + while (true) { + if (!(lo < hi)) { break; } + m = lo + (_q$2 = ((hi - lo >> 0)) / 2, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero")) >> 0; + c = (x$1 = 2 * m >> 0, ((x$1 < 0 || x$1 >= rune.$length) ? $throwRuntimeError("index out of range") : rune.$array[rune.$offset + x$1])); + if (c <= r) { + if (r <= (x$2 = (2 * m >> 0) + 1 >> 0, ((x$2 < 0 || x$2 >= rune.$length) ? $throwRuntimeError("index out of range") : rune.$array[rune.$offset + x$2]))) { + return m; + } + lo = m + 1 >> 0; + } else { + hi = m; + } + } + return -1; + }; + Inst.prototype.MatchRunePos = function(r) { return this.$val.MatchRunePos(r); }; + wordRune = function(r) { + var r; + return (r === 95) || (65 <= r && r <= 90) || (97 <= r && r <= 122) || (48 <= r && r <= 57); + }; + Inst.ptr.prototype.MatchEmptyWidth = function(before, after) { + var _ref, after, before, i; + i = this; + _ref = (i.Arg << 24 >>> 24); + if (_ref === 1) { + return (before === 10) || (before === -1); + } else if (_ref === 2) { + return (after === 10) || (after === -1); + } else if (_ref === 4) { + return before === -1; + } else if (_ref === 8) { + return after === -1; + } else if (_ref === 16) { + return !(wordRune(before) === wordRune(after)); + } else if (_ref === 32) { + return wordRune(before) === wordRune(after); + } + $panic(new $String("unknown empty width arg")); + }; + Inst.prototype.MatchEmptyWidth = function(before, after) { return this.$val.MatchEmptyWidth(before, after); }; + Inst.ptr.prototype.String = function() { + var b, i; + i = this; + b = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + dumpInst(b, i); + return b.String(); + }; + Inst.prototype.String = function() { return this.$val.String(); }; + bw = function(b, args) { + var _i, _ref, args, b, s; + _ref = args; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + s = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + b.WriteString(s); + _i++; + } + }; + dumpProg = function(b, p) { + var _i, _ref, b, i, j, p, pc, x; + _ref = p.Inst; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + j = _i; + i = (x = p.Inst, ((j < 0 || j >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + j])); + pc = strconv.Itoa(j); + if (pc.length < 3) { + b.WriteString(" ".substring(pc.length)); + } + if (j === p.Start) { + pc = pc + ("*"); + } + bw(b, new sliceType$3([pc, "\t"])); + dumpInst(b, i); + bw(b, new sliceType$3(["\n"])); + _i++; + } + }; + u32 = function(i) { + var i; + return strconv.FormatUint(new $Uint64(0, i), 10); + }; + dumpInst = function(b, i) { + var _ref, b, i; + _ref = i.Op; + if (_ref === 0) { + bw(b, new sliceType$3(["alt -> ", u32(i.Out), ", ", u32(i.Arg)])); + } else if (_ref === 1) { + bw(b, new sliceType$3(["altmatch -> ", u32(i.Out), ", ", u32(i.Arg)])); + } else if (_ref === 2) { + bw(b, new sliceType$3(["cap ", u32(i.Arg), " -> ", u32(i.Out)])); + } else if (_ref === 3) { + bw(b, new sliceType$3(["empty ", u32(i.Arg), " -> ", u32(i.Out)])); + } else if (_ref === 4) { + bw(b, new sliceType$3(["match"])); + } else if (_ref === 5) { + bw(b, new sliceType$3(["fail"])); + } else if (_ref === 6) { + bw(b, new sliceType$3(["nop -> ", u32(i.Out)])); + } else if (_ref === 7) { + if (i.Rune === sliceType.nil) { + bw(b, new sliceType$3(["rune "])); + } + bw(b, new sliceType$3(["rune ", strconv.QuoteToASCII($runesToString(i.Rune))])); + if (!(((((i.Arg << 16 >>> 16) & 1) >>> 0) === 0))) { + bw(b, new sliceType$3(["/i"])); + } + bw(b, new sliceType$3([" -> ", u32(i.Out)])); + } else if (_ref === 8) { + bw(b, new sliceType$3(["rune1 ", strconv.QuoteToASCII($runesToString(i.Rune)), " -> ", u32(i.Out)])); + } else if (_ref === 9) { + bw(b, new sliceType$3(["any -> ", u32(i.Out)])); + } else if (_ref === 10) { + bw(b, new sliceType$3(["anynotnl -> ", u32(i.Out)])); + } + }; + Regexp.ptr.prototype.Equal = function(y) { + var _i, _i$1, _ref, _ref$1, _ref$2, i, i$1, r, sub, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, y; + x = this; + if (x === ptrType.nil || y === ptrType.nil) { + return x === y; + } + if (!((x.Op === y.Op))) { + return false; + } + _ref = x.Op; + if (_ref === 10) { + if (!((((x.Flags & 256) >>> 0) === ((y.Flags & 256) >>> 0)))) { + return false; + } + } else if (_ref === 3 || _ref === 4) { + if (!((x.Rune.$length === y.Rune.$length))) { + return false; + } + _ref$1 = x.Rune; + _i = 0; + while (true) { + if (!(_i < _ref$1.$length)) { break; } + i = _i; + r = ((_i < 0 || _i >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i]); + if (!((r === (x$1 = y.Rune, ((i < 0 || i >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + i]))))) { + return false; + } + _i++; + } + } else if (_ref === 19 || _ref === 18) { + if (!((x.Sub.$length === y.Sub.$length))) { + return false; + } + _ref$2 = x.Sub; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$2.$length)) { break; } + i$1 = _i$1; + sub = ((_i$1 < 0 || _i$1 >= _ref$2.$length) ? $throwRuntimeError("index out of range") : _ref$2.$array[_ref$2.$offset + _i$1]); + if (!sub.Equal((x$2 = y.Sub, ((i$1 < 0 || i$1 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + i$1])))) { + return false; + } + _i$1++; + } + } else if (_ref === 14 || _ref === 15 || _ref === 16) { + if (!((((x.Flags & 32) >>> 0) === ((y.Flags & 32) >>> 0))) || !(x$3 = x.Sub, ((0 < 0 || 0 >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + 0])).Equal((x$4 = y.Sub, ((0 < 0 || 0 >= x$4.$length) ? $throwRuntimeError("index out of range") : x$4.$array[x$4.$offset + 0])))) { + return false; + } + } else if (_ref === 17) { + if (!((((x.Flags & 32) >>> 0) === ((y.Flags & 32) >>> 0))) || !((x.Min === y.Min)) || !((x.Max === y.Max)) || !(x$5 = x.Sub, ((0 < 0 || 0 >= x$5.$length) ? $throwRuntimeError("index out of range") : x$5.$array[x$5.$offset + 0])).Equal((x$6 = y.Sub, ((0 < 0 || 0 >= x$6.$length) ? $throwRuntimeError("index out of range") : x$6.$array[x$6.$offset + 0])))) { + return false; + } + } else if (_ref === 13) { + if (!((x.Cap === y.Cap)) || !(x.Name === y.Name) || !(x$7 = x.Sub, ((0 < 0 || 0 >= x$7.$length) ? $throwRuntimeError("index out of range") : x$7.$array[x$7.$offset + 0])).Equal((x$8 = y.Sub, ((0 < 0 || 0 >= x$8.$length) ? $throwRuntimeError("index out of range") : x$8.$array[x$8.$offset + 0])))) { + return false; + } + } + return true; + }; + Regexp.prototype.Equal = function(y) { return this.$val.Equal(y); }; + writeRegexp = function(b, re) { + var _i, _i$1, _i$2, _r, _ref, _ref$1, _ref$2, _ref$3, _ref$4, _tmp, _tmp$1, _tmp$2, _tmp$3, b, hi, hi$1, i, i$1, i$2, lo, lo$1, r, re, sub, sub$1, sub$2, x, x$1, x$10, x$11, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + _ref = re.Op; + switch (0) { default: if (_ref === 1) { + b.WriteString("[^\\x00-\\x{10FFFF}]"); + } else if (_ref === 2) { + b.WriteString("(?:)"); + } else if (_ref === 3) { + if (!((((re.Flags & 1) >>> 0) === 0))) { + b.WriteString("(?i:"); + } + _ref$1 = re.Rune; + _i = 0; + while (true) { + if (!(_i < _ref$1.$length)) { break; } + r = ((_i < 0 || _i >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i]); + escape(b, r, false); + _i++; + } + if (!((((re.Flags & 1) >>> 0) === 0))) { + b.WriteString(")"); + } + } else if (_ref === 4) { + if (!(((_r = re.Rune.$length % 2, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) === 0))) { + b.WriteString("[invalid char class]"); + break; + } + b.WriteRune(91); + if (re.Rune.$length === 0) { + b.WriteString("^\\x00-\\x{10FFFF}"); + } else if (((x = re.Rune, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])) === 0) && ((x$1 = re.Rune, x$2 = re.Rune.$length - 1 >> 0, ((x$2 < 0 || x$2 >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + x$2])) === 1114111)) { + b.WriteRune(94); + i = 1; + while (true) { + if (!(i < (re.Rune.$length - 1 >> 0))) { break; } + _tmp = (x$3 = re.Rune, ((i < 0 || i >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + i])) + 1 >> 0; _tmp$1 = (x$4 = re.Rune, x$5 = i + 1 >> 0, ((x$5 < 0 || x$5 >= x$4.$length) ? $throwRuntimeError("index out of range") : x$4.$array[x$4.$offset + x$5])) - 1 >> 0; lo = _tmp; hi = _tmp$1; + escape(b, lo, lo === 45); + if (!((lo === hi))) { + b.WriteRune(45); + escape(b, hi, hi === 45); + } + i = i + (2) >> 0; + } + } else { + i$1 = 0; + while (true) { + if (!(i$1 < re.Rune.$length)) { break; } + _tmp$2 = (x$6 = re.Rune, ((i$1 < 0 || i$1 >= x$6.$length) ? $throwRuntimeError("index out of range") : x$6.$array[x$6.$offset + i$1])); _tmp$3 = (x$7 = re.Rune, x$8 = i$1 + 1 >> 0, ((x$8 < 0 || x$8 >= x$7.$length) ? $throwRuntimeError("index out of range") : x$7.$array[x$7.$offset + x$8])); lo$1 = _tmp$2; hi$1 = _tmp$3; + escape(b, lo$1, lo$1 === 45); + if (!((lo$1 === hi$1))) { + b.WriteRune(45); + escape(b, hi$1, hi$1 === 45); + } + i$1 = i$1 + (2) >> 0; + } + } + b.WriteRune(93); + } else if (_ref === 5) { + b.WriteString("(?-s:.)"); + } else if (_ref === 6) { + b.WriteString("(?s:.)"); + } else if (_ref === 7) { + b.WriteRune(94); + } else if (_ref === 8) { + b.WriteRune(36); + } else if (_ref === 9) { + b.WriteString("\\A"); + } else if (_ref === 10) { + if (!((((re.Flags & 256) >>> 0) === 0))) { + b.WriteString("(?-m:$)"); + } else { + b.WriteString("\\z"); + } + } else if (_ref === 11) { + b.WriteString("\\b"); + } else if (_ref === 12) { + b.WriteString("\\B"); + } else if (_ref === 13) { + if (!(re.Name === "")) { + b.WriteString("(?P<"); + b.WriteString(re.Name); + b.WriteRune(62); + } else { + b.WriteRune(40); + } + if (!(((x$9 = re.Sub, ((0 < 0 || 0 >= x$9.$length) ? $throwRuntimeError("index out of range") : x$9.$array[x$9.$offset + 0])).Op === 2))) { + writeRegexp(b, (x$10 = re.Sub, ((0 < 0 || 0 >= x$10.$length) ? $throwRuntimeError("index out of range") : x$10.$array[x$10.$offset + 0]))); + } + b.WriteRune(41); + } else if (_ref === 14 || _ref === 15 || _ref === 16 || _ref === 17) { + sub = (x$11 = re.Sub, ((0 < 0 || 0 >= x$11.$length) ? $throwRuntimeError("index out of range") : x$11.$array[x$11.$offset + 0])); + if (sub.Op > 13 || (sub.Op === 3) && sub.Rune.$length > 1) { + b.WriteString("(?:"); + writeRegexp(b, sub); + b.WriteString(")"); + } else { + writeRegexp(b, sub); + } + _ref$2 = re.Op; + if (_ref$2 === 14) { + b.WriteRune(42); + } else if (_ref$2 === 15) { + b.WriteRune(43); + } else if (_ref$2 === 16) { + b.WriteRune(63); + } else if (_ref$2 === 17) { + b.WriteRune(123); + b.WriteString(strconv.Itoa(re.Min)); + if (!((re.Max === re.Min))) { + b.WriteRune(44); + if (re.Max >= 0) { + b.WriteString(strconv.Itoa(re.Max)); + } + } + b.WriteRune(125); + } + if (!((((re.Flags & 32) >>> 0) === 0))) { + b.WriteRune(63); + } + } else if (_ref === 18) { + _ref$3 = re.Sub; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$3.$length)) { break; } + sub$1 = ((_i$1 < 0 || _i$1 >= _ref$3.$length) ? $throwRuntimeError("index out of range") : _ref$3.$array[_ref$3.$offset + _i$1]); + if (sub$1.Op === 19) { + b.WriteString("(?:"); + writeRegexp(b, sub$1); + b.WriteString(")"); + } else { + writeRegexp(b, sub$1); + } + _i$1++; + } + } else if (_ref === 19) { + _ref$4 = re.Sub; + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$4.$length)) { break; } + i$2 = _i$2; + sub$2 = ((_i$2 < 0 || _i$2 >= _ref$4.$length) ? $throwRuntimeError("index out of range") : _ref$4.$array[_ref$4.$offset + _i$2]); + if (i$2 > 0) { + b.WriteRune(124); + } + writeRegexp(b, sub$2); + _i$2++; + } + } else { + b.WriteString("> 0)) + ">"); + } } + }; + Regexp.ptr.prototype.String = function() { + var b, re; + re = this; + b = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + writeRegexp(b, re); + return b.String(); + }; + Regexp.prototype.String = function() { return this.$val.String(); }; + escape = function(b, r, force) { + var _ref, b, force, r, s; + if (unicode.IsPrint(r)) { + if (strings.IndexRune("\\.+*?()|[]{}^$", r) >= 0 || force) { + b.WriteRune(92); + } + b.WriteRune(r); + return; + } + _ref = r; + switch (0) { default: if (_ref === 7) { + b.WriteString("\\a"); + } else if (_ref === 12) { + b.WriteString("\\f"); + } else if (_ref === 10) { + b.WriteString("\\n"); + } else if (_ref === 13) { + b.WriteString("\\r"); + } else if (_ref === 9) { + b.WriteString("\\t"); + } else if (_ref === 11) { + b.WriteString("\\v"); + } else { + if (r < 256) { + b.WriteString("\\x"); + s = strconv.FormatInt(new $Int64(0, r), 16); + if (s.length === 1) { + b.WriteRune(48); + } + b.WriteString(s); + break; + } + b.WriteString("\\x{"); + b.WriteString(strconv.FormatInt(new $Int64(0, r), 16)); + b.WriteString("}"); + } } + }; + Regexp.ptr.prototype.MaxCap = function() { + var _i, _ref, m, n, re, sub; + re = this; + m = 0; + if (re.Op === 13) { + m = re.Cap; + } + _ref = re.Sub; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + sub = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + n = sub.MaxCap(); + if (m < n) { + m = n; + } + _i++; + } + return m; + }; + Regexp.prototype.MaxCap = function() { return this.$val.MaxCap(); }; + Regexp.ptr.prototype.CapNames = function() { + var names, re; + re = this; + names = $makeSlice(sliceType$3, (re.MaxCap() + 1 >> 0)); + re.capNames(names); + return names; + }; + Regexp.prototype.CapNames = function() { return this.$val.CapNames(); }; + Regexp.ptr.prototype.capNames = function(names) { + var _i, _ref, names, re, sub, x; + re = this; + if (re.Op === 13) { + (x = re.Cap, (x < 0 || x >= names.$length) ? $throwRuntimeError("index out of range") : names.$array[names.$offset + x] = re.Name); + } + _ref = re.Sub; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + sub = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + sub.capNames(names); + _i++; + } + }; + Regexp.prototype.capNames = function(names) { return this.$val.capNames(names); }; + Regexp.ptr.prototype.Simplify = function() { + var _i, _ref, _ref$1, i, i$1, i$2, i$3, nre, nre$1, nre2, nsub, prefix, re, sub, sub$1, sub$2, suffix, x, x$1; + re = this; + if (re === ptrType.nil) { + return ptrType.nil; + } + _ref = re.Op; + if (_ref === 13 || _ref === 18 || _ref === 19) { + nre = re; + _ref$1 = re.Sub; + _i = 0; + while (true) { + if (!(_i < _ref$1.$length)) { break; } + i = _i; + sub = ((_i < 0 || _i >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i]); + nsub = sub.Simplify(); + if (nre === re && !(nsub === sub)) { + nre = new Regexp.ptr(); + $copy(nre, re, Regexp); + nre.Rune = sliceType.nil; + nre.Sub = $appendSlice($subslice(new sliceType$4(nre.Sub0), 0, 0), $subslice(re.Sub, 0, i)); + } + if (!(nre === re)) { + nre.Sub = $append(nre.Sub, nsub); + } + _i++; + } + return nre; + } else if (_ref === 14 || _ref === 15 || _ref === 16) { + sub$1 = (x = re.Sub, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])).Simplify(); + return simplify1(re.Op, re.Flags, sub$1, re); + } else if (_ref === 17) { + if ((re.Min === 0) && (re.Max === 0)) { + return new Regexp.ptr(2, 0, sliceType$4.nil, arrayType.zero(), sliceType.nil, arrayType$1.zero(), 0, 0, 0, ""); + } + sub$2 = (x$1 = re.Sub, ((0 < 0 || 0 >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + 0])).Simplify(); + if (re.Max === -1) { + if (re.Min === 0) { + return simplify1(14, re.Flags, sub$2, ptrType.nil); + } + if (re.Min === 1) { + return simplify1(15, re.Flags, sub$2, ptrType.nil); + } + nre$1 = new Regexp.ptr(18, 0, sliceType$4.nil, arrayType.zero(), sliceType.nil, arrayType$1.zero(), 0, 0, 0, ""); + nre$1.Sub = $subslice(new sliceType$4(nre$1.Sub0), 0, 0); + i$1 = 0; + while (true) { + if (!(i$1 < (re.Min - 1 >> 0))) { break; } + nre$1.Sub = $append(nre$1.Sub, sub$2); + i$1 = i$1 + (1) >> 0; + } + nre$1.Sub = $append(nre$1.Sub, simplify1(15, re.Flags, sub$2, ptrType.nil)); + return nre$1; + } + if ((re.Min === 1) && (re.Max === 1)) { + return sub$2; + } + prefix = ptrType.nil; + if (re.Min > 0) { + prefix = new Regexp.ptr(18, 0, sliceType$4.nil, arrayType.zero(), sliceType.nil, arrayType$1.zero(), 0, 0, 0, ""); + prefix.Sub = $subslice(new sliceType$4(prefix.Sub0), 0, 0); + i$2 = 0; + while (true) { + if (!(i$2 < re.Min)) { break; } + prefix.Sub = $append(prefix.Sub, sub$2); + i$2 = i$2 + (1) >> 0; + } + } + if (re.Max > re.Min) { + suffix = simplify1(16, re.Flags, sub$2, ptrType.nil); + i$3 = re.Min + 1 >> 0; + while (true) { + if (!(i$3 < re.Max)) { break; } + nre2 = new Regexp.ptr(18, 0, sliceType$4.nil, arrayType.zero(), sliceType.nil, arrayType$1.zero(), 0, 0, 0, ""); + nre2.Sub = $append($subslice(new sliceType$4(nre2.Sub0), 0, 0), sub$2, suffix); + suffix = simplify1(16, re.Flags, nre2, ptrType.nil); + i$3 = i$3 + (1) >> 0; + } + if (prefix === ptrType.nil) { + return suffix; + } + prefix.Sub = $append(prefix.Sub, suffix); + } + if (!(prefix === ptrType.nil)) { + return prefix; + } + return new Regexp.ptr(1, 0, sliceType$4.nil, arrayType.zero(), sliceType.nil, arrayType$1.zero(), 0, 0, 0, ""); + } + return re; + }; + Regexp.prototype.Simplify = function() { return this.$val.Simplify(); }; + simplify1 = function(op, flags, sub, re) { + var flags, op, re, sub, x; + if (sub.Op === 2) { + return sub; + } + if ((op === sub.Op) && (((flags & 32) >>> 0) === ((sub.Flags & 32) >>> 0))) { + return sub; + } + if (!(re === ptrType.nil) && (re.Op === op) && (((re.Flags & 32) >>> 0) === ((flags & 32) >>> 0)) && sub === (x = re.Sub, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0]))) { + return re; + } + re = new Regexp.ptr(op, flags, sliceType$4.nil, arrayType.zero(), sliceType.nil, arrayType$1.zero(), 0, 0, 0, ""); + re.Sub = $append($subslice(new sliceType$4(re.Sub0), 0, 0), sub); + return re; + }; + patchList.methods = [{prop: "next", name: "next", pkg: "regexp/syntax", typ: $funcType([ptrType$3], [patchList], false)}, {prop: "patch", name: "patch", pkg: "regexp/syntax", typ: $funcType([ptrType$3, $Uint32], [], false)}, {prop: "append", name: "append", pkg: "regexp/syntax", typ: $funcType([ptrType$3, patchList], [patchList], false)}]; + ptrType$4.methods = [{prop: "init", name: "init", pkg: "regexp/syntax", typ: $funcType([], [], false)}, {prop: "compile", name: "compile", pkg: "regexp/syntax", typ: $funcType([ptrType], [frag], false)}, {prop: "inst", name: "inst", pkg: "regexp/syntax", typ: $funcType([InstOp], [frag], false)}, {prop: "nop", name: "nop", pkg: "regexp/syntax", typ: $funcType([], [frag], false)}, {prop: "fail", name: "fail", pkg: "regexp/syntax", typ: $funcType([], [frag], false)}, {prop: "cap", name: "cap", pkg: "regexp/syntax", typ: $funcType([$Uint32], [frag], false)}, {prop: "cat", name: "cat", pkg: "regexp/syntax", typ: $funcType([frag, frag], [frag], false)}, {prop: "alt", name: "alt", pkg: "regexp/syntax", typ: $funcType([frag, frag], [frag], false)}, {prop: "quest", name: "quest", pkg: "regexp/syntax", typ: $funcType([frag, $Bool], [frag], false)}, {prop: "star", name: "star", pkg: "regexp/syntax", typ: $funcType([frag, $Bool], [frag], false)}, {prop: "plus", name: "plus", pkg: "regexp/syntax", typ: $funcType([frag, $Bool], [frag], false)}, {prop: "empty", name: "empty", pkg: "regexp/syntax", typ: $funcType([EmptyOp], [frag], false)}, {prop: "rune", name: "rune", pkg: "regexp/syntax", typ: $funcType([sliceType, Flags], [frag], false)}]; + ptrType$5.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ErrorCode.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$6.methods = [{prop: "newRegexp", name: "newRegexp", pkg: "regexp/syntax", typ: $funcType([Op], [ptrType], false)}, {prop: "reuse", name: "reuse", pkg: "regexp/syntax", typ: $funcType([ptrType], [], false)}, {prop: "push", name: "push", pkg: "regexp/syntax", typ: $funcType([ptrType], [ptrType], false)}, {prop: "maybeConcat", name: "maybeConcat", pkg: "regexp/syntax", typ: $funcType([$Int32, Flags], [$Bool], false)}, {prop: "newLiteral", name: "newLiteral", pkg: "regexp/syntax", typ: $funcType([$Int32, Flags], [ptrType], false)}, {prop: "literal", name: "literal", pkg: "regexp/syntax", typ: $funcType([$Int32], [], false)}, {prop: "op", name: "op", pkg: "regexp/syntax", typ: $funcType([Op], [ptrType], false)}, {prop: "repeat", name: "repeat", pkg: "regexp/syntax", typ: $funcType([Op, $Int, $Int, $String, $String, $String], [$String, $error], false)}, {prop: "concat", name: "concat", pkg: "regexp/syntax", typ: $funcType([], [ptrType], false)}, {prop: "alternate", name: "alternate", pkg: "regexp/syntax", typ: $funcType([], [ptrType], false)}, {prop: "collapse", name: "collapse", pkg: "regexp/syntax", typ: $funcType([sliceType$4, Op], [ptrType], false)}, {prop: "factor", name: "factor", pkg: "regexp/syntax", typ: $funcType([sliceType$4, Flags], [sliceType$4], false)}, {prop: "leadingString", name: "leadingString", pkg: "regexp/syntax", typ: $funcType([ptrType], [sliceType, Flags], false)}, {prop: "removeLeadingString", name: "removeLeadingString", pkg: "regexp/syntax", typ: $funcType([ptrType, $Int], [ptrType], false)}, {prop: "leadingRegexp", name: "leadingRegexp", pkg: "regexp/syntax", typ: $funcType([ptrType], [ptrType], false)}, {prop: "removeLeadingRegexp", name: "removeLeadingRegexp", pkg: "regexp/syntax", typ: $funcType([ptrType, $Bool], [ptrType], false)}, {prop: "parseRepeat", name: "parseRepeat", pkg: "regexp/syntax", typ: $funcType([$String], [$Int, $Int, $String, $Bool], false)}, {prop: "parsePerlFlags", name: "parsePerlFlags", pkg: "regexp/syntax", typ: $funcType([$String], [$String, $error], false)}, {prop: "parseInt", name: "parseInt", pkg: "regexp/syntax", typ: $funcType([$String], [$Int, $String, $Bool], false)}, {prop: "parseVerticalBar", name: "parseVerticalBar", pkg: "regexp/syntax", typ: $funcType([], [$error], false)}, {prop: "swapVerticalBar", name: "swapVerticalBar", pkg: "regexp/syntax", typ: $funcType([], [$Bool], false)}, {prop: "parseRightParen", name: "parseRightParen", pkg: "regexp/syntax", typ: $funcType([], [$error], false)}, {prop: "parseEscape", name: "parseEscape", pkg: "regexp/syntax", typ: $funcType([$String], [$Int32, $String, $error], false)}, {prop: "parseClassChar", name: "parseClassChar", pkg: "regexp/syntax", typ: $funcType([$String, $String], [$Int32, $String, $error], false)}, {prop: "parsePerlClassEscape", name: "parsePerlClassEscape", pkg: "regexp/syntax", typ: $funcType([$String, sliceType], [sliceType, $String], false)}, {prop: "parseNamedClass", name: "parseNamedClass", pkg: "regexp/syntax", typ: $funcType([$String, sliceType], [sliceType, $String, $error], false)}, {prop: "appendGroup", name: "appendGroup", pkg: "regexp/syntax", typ: $funcType([sliceType, charGroup], [sliceType], false)}, {prop: "parseUnicodeClass", name: "parseUnicodeClass", pkg: "regexp/syntax", typ: $funcType([$String, sliceType], [sliceType, $String, $error], false)}, {prop: "parseClass", name: "parseClass", pkg: "regexp/syntax", typ: $funcType([$String], [$String, $error], false)}]; + ranges.methods = [{prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}]; + ptrType$3.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "skipNop", name: "skipNop", pkg: "regexp/syntax", typ: $funcType([$Uint32], [ptrType$7, $Uint32], false)}, {prop: "Prefix", name: "Prefix", pkg: "", typ: $funcType([], [$String, $Bool], false)}, {prop: "StartCond", name: "StartCond", pkg: "", typ: $funcType([], [EmptyOp], false)}]; + InstOp.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$7.methods = [{prop: "op", name: "op", pkg: "regexp/syntax", typ: $funcType([], [InstOp], false)}, {prop: "MatchRune", name: "MatchRune", pkg: "", typ: $funcType([$Int32], [$Bool], false)}, {prop: "MatchRunePos", name: "MatchRunePos", pkg: "", typ: $funcType([$Int32], [$Int], false)}, {prop: "MatchEmptyWidth", name: "MatchEmptyWidth", pkg: "", typ: $funcType([$Int32, $Int32], [$Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType.methods = [{prop: "Equal", name: "Equal", pkg: "", typ: $funcType([ptrType], [$Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "MaxCap", name: "MaxCap", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "CapNames", name: "CapNames", pkg: "", typ: $funcType([], [sliceType$3], false)}, {prop: "capNames", name: "capNames", pkg: "regexp/syntax", typ: $funcType([sliceType$3], [], false)}, {prop: "Simplify", name: "Simplify", pkg: "", typ: $funcType([], [ptrType], false)}]; + frag.init([{prop: "i", name: "i", pkg: "regexp/syntax", typ: $Uint32, tag: ""}, {prop: "out", name: "out", pkg: "regexp/syntax", typ: patchList, tag: ""}]); + compiler.init([{prop: "p", name: "p", pkg: "regexp/syntax", typ: ptrType$3, tag: ""}]); + Error.init([{prop: "Code", name: "Code", pkg: "", typ: ErrorCode, tag: ""}, {prop: "Expr", name: "Expr", pkg: "", typ: $String, tag: ""}]); + parser.init([{prop: "flags", name: "flags", pkg: "regexp/syntax", typ: Flags, tag: ""}, {prop: "stack", name: "stack", pkg: "regexp/syntax", typ: sliceType$4, tag: ""}, {prop: "free", name: "free", pkg: "regexp/syntax", typ: ptrType, tag: ""}, {prop: "numCap", name: "numCap", pkg: "regexp/syntax", typ: $Int, tag: ""}, {prop: "wholeRegexp", name: "wholeRegexp", pkg: "regexp/syntax", typ: $String, tag: ""}, {prop: "tmpClass", name: "tmpClass", pkg: "regexp/syntax", typ: sliceType, tag: ""}]); + charGroup.init([{prop: "sign", name: "sign", pkg: "regexp/syntax", typ: $Int, tag: ""}, {prop: "class$1", name: "class", pkg: "regexp/syntax", typ: sliceType, tag: ""}]); + ranges.init([{prop: "p", name: "p", pkg: "regexp/syntax", typ: ptrType$1, tag: ""}]); + Prog.init([{prop: "Inst", name: "Inst", pkg: "", typ: sliceType$5, tag: ""}, {prop: "Start", name: "Start", pkg: "", typ: $Int, tag: ""}, {prop: "NumCap", name: "NumCap", pkg: "", typ: $Int, tag: ""}]); + Inst.init([{prop: "Op", name: "Op", pkg: "", typ: InstOp, tag: ""}, {prop: "Out", name: "Out", pkg: "", typ: $Uint32, tag: ""}, {prop: "Arg", name: "Arg", pkg: "", typ: $Uint32, tag: ""}, {prop: "Rune", name: "Rune", pkg: "", typ: sliceType, tag: ""}]); + Regexp.init([{prop: "Op", name: "Op", pkg: "", typ: Op, tag: ""}, {prop: "Flags", name: "Flags", pkg: "", typ: Flags, tag: ""}, {prop: "Sub", name: "Sub", pkg: "", typ: sliceType$4, tag: ""}, {prop: "Sub0", name: "Sub0", pkg: "", typ: arrayType, tag: ""}, {prop: "Rune", name: "Rune", pkg: "", typ: sliceType, tag: ""}, {prop: "Rune0", name: "Rune0", pkg: "", typ: arrayType$1, tag: ""}, {prop: "Min", name: "Min", pkg: "", typ: $Int, tag: ""}, {prop: "Max", name: "Max", pkg: "", typ: $Int, tag: ""}, {prop: "Cap", name: "Cap", pkg: "", typ: $Int, tag: ""}, {prop: "Name", name: "Name", pkg: "", typ: $String, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_syntax = function() { while (true) { switch ($s) { case 0: + $r = bytes.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = sort.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = strconv.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = strings.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = unicode.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + $r = utf8.$init($BLOCKING); /* */ $s = 6; case 6: if ($r && $r.$blocking) { $r = $r(); } + anyRuneNotNL = new sliceType([0, 9, 11, 1114111]); + anyRune = new sliceType([0, 1114111]); + anyTable = new unicode.RangeTable.ptr(new sliceType$1([new unicode.Range16.ptr(0, 65535, 1)]), new sliceType$2([new unicode.Range32.ptr(65536, 1114111, 1)]), 0); + code1 = new sliceType([48, 57]); + code2 = new sliceType([9, 10, 12, 13, 32, 32]); + code3 = new sliceType([48, 57, 65, 90, 95, 95, 97, 122]); + perlGroup = (_map = new $Map(), _key = "\\d", _map[_key] = { k: _key, v: new charGroup.ptr(1, code1) }, _key = "\\D", _map[_key] = { k: _key, v: new charGroup.ptr(-1, code1) }, _key = "\\s", _map[_key] = { k: _key, v: new charGroup.ptr(1, code2) }, _key = "\\S", _map[_key] = { k: _key, v: new charGroup.ptr(-1, code2) }, _key = "\\w", _map[_key] = { k: _key, v: new charGroup.ptr(1, code3) }, _key = "\\W", _map[_key] = { k: _key, v: new charGroup.ptr(-1, code3) }, _map); + code4 = new sliceType([48, 57, 65, 90, 97, 122]); + code5 = new sliceType([65, 90, 97, 122]); + code6 = new sliceType([0, 127]); + code7 = new sliceType([9, 9, 32, 32]); + code8 = new sliceType([0, 31, 127, 127]); + code9 = new sliceType([48, 57]); + code10 = new sliceType([33, 126]); + code11 = new sliceType([97, 122]); + code12 = new sliceType([32, 126]); + code13 = new sliceType([33, 47, 58, 64, 91, 96, 123, 126]); + code14 = new sliceType([9, 13, 32, 32]); + code15 = new sliceType([65, 90]); + code16 = new sliceType([48, 57, 65, 90, 95, 95, 97, 122]); + code17 = new sliceType([48, 57, 65, 70, 97, 102]); + posixGroup = (_map$1 = new $Map(), _key$1 = "[:alnum:]", _map$1[_key$1] = { k: _key$1, v: new charGroup.ptr(1, code4) }, _key$1 = "[:^alnum:]", _map$1[_key$1] = { k: _key$1, v: new charGroup.ptr(-1, code4) }, _key$1 = "[:alpha:]", _map$1[_key$1] = { k: _key$1, v: new charGroup.ptr(1, code5) }, _key$1 = "[:^alpha:]", _map$1[_key$1] = { k: _key$1, v: new charGroup.ptr(-1, code5) }, _key$1 = "[:ascii:]", _map$1[_key$1] = { k: _key$1, v: new charGroup.ptr(1, code6) }, _key$1 = "[:^ascii:]", _map$1[_key$1] = { k: _key$1, v: new charGroup.ptr(-1, code6) }, _key$1 = "[:blank:]", _map$1[_key$1] = { k: _key$1, v: new charGroup.ptr(1, code7) }, _key$1 = "[:^blank:]", _map$1[_key$1] = { k: _key$1, v: new charGroup.ptr(-1, code7) }, _key$1 = "[:cntrl:]", _map$1[_key$1] = { k: _key$1, v: new charGroup.ptr(1, code8) }, _key$1 = "[:^cntrl:]", _map$1[_key$1] = { k: _key$1, v: new charGroup.ptr(-1, code8) }, _key$1 = "[:digit:]", _map$1[_key$1] = { k: _key$1, v: new charGroup.ptr(1, code9) }, _key$1 = "[:^digit:]", _map$1[_key$1] = { k: _key$1, v: new charGroup.ptr(-1, code9) }, _key$1 = "[:graph:]", _map$1[_key$1] = { k: _key$1, v: new charGroup.ptr(1, code10) }, _key$1 = "[:^graph:]", _map$1[_key$1] = { k: _key$1, v: new charGroup.ptr(-1, code10) }, _key$1 = "[:lower:]", _map$1[_key$1] = { k: _key$1, v: new charGroup.ptr(1, code11) }, _key$1 = "[:^lower:]", _map$1[_key$1] = { k: _key$1, v: new charGroup.ptr(-1, code11) }, _key$1 = "[:print:]", _map$1[_key$1] = { k: _key$1, v: new charGroup.ptr(1, code12) }, _key$1 = "[:^print:]", _map$1[_key$1] = { k: _key$1, v: new charGroup.ptr(-1, code12) }, _key$1 = "[:punct:]", _map$1[_key$1] = { k: _key$1, v: new charGroup.ptr(1, code13) }, _key$1 = "[:^punct:]", _map$1[_key$1] = { k: _key$1, v: new charGroup.ptr(-1, code13) }, _key$1 = "[:space:]", _map$1[_key$1] = { k: _key$1, v: new charGroup.ptr(1, code14) }, _key$1 = "[:^space:]", _map$1[_key$1] = { k: _key$1, v: new charGroup.ptr(-1, code14) }, _key$1 = "[:upper:]", _map$1[_key$1] = { k: _key$1, v: new charGroup.ptr(1, code15) }, _key$1 = "[:^upper:]", _map$1[_key$1] = { k: _key$1, v: new charGroup.ptr(-1, code15) }, _key$1 = "[:word:]", _map$1[_key$1] = { k: _key$1, v: new charGroup.ptr(1, code16) }, _key$1 = "[:^word:]", _map$1[_key$1] = { k: _key$1, v: new charGroup.ptr(-1, code16) }, _key$1 = "[:xdigit:]", _map$1[_key$1] = { k: _key$1, v: new charGroup.ptr(1, code17) }, _key$1 = "[:^xdigit:]", _map$1[_key$1] = { k: _key$1, v: new charGroup.ptr(-1, code17) }, _map$1); + instOpNames = new sliceType$3(["InstAlt", "InstAltMatch", "InstCapture", "InstEmptyWidth", "InstMatch", "InstFail", "InstNop", "InstRune", "InstRune1", "InstRuneAny", "InstRuneAnyNotNL"]); + /* */ } return; } }; $init_syntax.$blocking = true; return $init_syntax; + }; + return $pkg; +})(); +$packages["flag"] = (function() { + var $pkg = {}, errors, fmt, io, os, sort, strconv, time, boolValue, boolFlag, intValue, int64Value, uintValue, uint64Value, stringValue, float64Value, durationValue, Value, ErrorHandling, FlagSet, Flag, sliceType, ptrType, ptrType$1, ptrType$2, ptrType$3, ptrType$4, ptrType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$9, sliceType$1, ptrType$10, ptrType$11, ptrType$12, ptrType$13, ptrType$14, ptrType$15, ptrType$16, sliceType$2, funcType, ptrType$17, funcType$1, mapType, x, newBoolValue, newIntValue, newInt64Value, newUintValue, newUint64Value, newStringValue, newFloat64Value, newDurationValue, sortFlags, PrintDefaults, defaultUsage, Bool, Int, String, Duration, NewFlagSet; + errors = $packages["errors"]; + fmt = $packages["fmt"]; + io = $packages["io"]; + os = $packages["os"]; + sort = $packages["sort"]; + strconv = $packages["strconv"]; + time = $packages["time"]; + boolValue = $pkg.boolValue = $newType(1, $kindBool, "flag.boolValue", "boolValue", "flag", null); + boolFlag = $pkg.boolFlag = $newType(8, $kindInterface, "flag.boolFlag", "boolFlag", "flag", null); + intValue = $pkg.intValue = $newType(4, $kindInt, "flag.intValue", "intValue", "flag", null); + int64Value = $pkg.int64Value = $newType(8, $kindInt64, "flag.int64Value", "int64Value", "flag", null); + uintValue = $pkg.uintValue = $newType(4, $kindUint, "flag.uintValue", "uintValue", "flag", null); + uint64Value = $pkg.uint64Value = $newType(8, $kindUint64, "flag.uint64Value", "uint64Value", "flag", null); + stringValue = $pkg.stringValue = $newType(8, $kindString, "flag.stringValue", "stringValue", "flag", null); + float64Value = $pkg.float64Value = $newType(8, $kindFloat64, "flag.float64Value", "float64Value", "flag", null); + durationValue = $pkg.durationValue = $newType(8, $kindInt64, "flag.durationValue", "durationValue", "flag", null); + Value = $pkg.Value = $newType(8, $kindInterface, "flag.Value", "Value", "flag", null); + ErrorHandling = $pkg.ErrorHandling = $newType(4, $kindInt, "flag.ErrorHandling", "ErrorHandling", "flag", null); + FlagSet = $pkg.FlagSet = $newType(0, $kindStruct, "flag.FlagSet", "FlagSet", "flag", function(Usage_, name_, parsed_, actual_, formal_, args_, errorHandling_, output_) { + this.$val = this; + this.Usage = Usage_ !== undefined ? Usage_ : $throwNilPointerError; + this.name = name_ !== undefined ? name_ : ""; + this.parsed = parsed_ !== undefined ? parsed_ : false; + this.actual = actual_ !== undefined ? actual_ : false; + this.formal = formal_ !== undefined ? formal_ : false; + this.args = args_ !== undefined ? args_ : sliceType$2.nil; + this.errorHandling = errorHandling_ !== undefined ? errorHandling_ : 0; + this.output = output_ !== undefined ? output_ : $ifaceNil; + }); + Flag = $pkg.Flag = $newType(0, $kindStruct, "flag.Flag", "Flag", "flag", function(Name_, Usage_, Value_, DefValue_) { + this.$val = this; + this.Name = Name_ !== undefined ? Name_ : ""; + this.Usage = Usage_ !== undefined ? Usage_ : ""; + this.Value = Value_ !== undefined ? Value_ : $ifaceNil; + this.DefValue = DefValue_ !== undefined ? DefValue_ : ""; + }); + sliceType = $sliceType($emptyInterface); + ptrType = $ptrType(boolValue); + ptrType$1 = $ptrType(intValue); + ptrType$2 = $ptrType(int64Value); + ptrType$3 = $ptrType(uintValue); + ptrType$4 = $ptrType(uint64Value); + ptrType$5 = $ptrType(stringValue); + ptrType$6 = $ptrType(float64Value); + ptrType$7 = $ptrType(durationValue); + ptrType$8 = $ptrType(time.Duration); + ptrType$9 = $ptrType(Flag); + sliceType$1 = $sliceType(ptrType$9); + ptrType$10 = $ptrType($Bool); + ptrType$11 = $ptrType($Int); + ptrType$12 = $ptrType($Int64); + ptrType$13 = $ptrType($Uint); + ptrType$14 = $ptrType($Uint64); + ptrType$15 = $ptrType($String); + ptrType$16 = $ptrType($Float64); + sliceType$2 = $sliceType($String); + funcType = $funcType([ptrType$9], [], false); + ptrType$17 = $ptrType(FlagSet); + funcType$1 = $funcType([], [], false); + mapType = $mapType($String, ptrType$9); + newBoolValue = function(val, p) { + var p, val; + p.$set(val); + return new ptrType(p.$get, p.$set); + }; + $ptrType(boolValue).prototype.Set = function(s) { + var _tuple, b, err, s, v; + b = this; + _tuple = strconv.ParseBool(s); v = _tuple[0]; err = _tuple[1]; + b.$set(v); + return err; + }; + $ptrType(boolValue).prototype.Get = function() { + var b; + b = this; + return new $Bool(b.$get()); + }; + $ptrType(boolValue).prototype.String = function() { + var b; + b = this; + return fmt.Sprintf("%v", new sliceType([new boolValue(b.$get())])); + }; + $ptrType(boolValue).prototype.IsBoolFlag = function() { + var b; + b = this; + return true; + }; + newIntValue = function(val, p) { + var p, val; + p.$set(val); + return new ptrType$1(p.$get, p.$set); + }; + $ptrType(intValue).prototype.Set = function(s) { + var _tuple, err, i, s, v; + i = this; + _tuple = strconv.ParseInt(s, 0, 64); v = _tuple[0]; err = _tuple[1]; + i.$set(((v.$low + ((v.$high >> 31) * 4294967296)) >> 0)); + return err; + }; + $ptrType(intValue).prototype.Get = function() { + var i; + i = this; + return new $Int((i.$get() >> 0)); + }; + $ptrType(intValue).prototype.String = function() { + var i; + i = this; + return fmt.Sprintf("%v", new sliceType([new intValue(i.$get())])); + }; + newInt64Value = function(val, p) { + var p, val; + p.$set(val); + return new ptrType$2(p.$get, p.$set); + }; + $ptrType(int64Value).prototype.Set = function(s) { + var _tuple, err, i, s, v; + i = this; + _tuple = strconv.ParseInt(s, 0, 64); v = _tuple[0]; err = _tuple[1]; + i.$set(new int64Value(v.$high, v.$low)); + return err; + }; + $ptrType(int64Value).prototype.Get = function() { + var i, x$1; + i = this; + return (x$1 = i.$get(), new $Int64(x$1.$high, x$1.$low)); + }; + $ptrType(int64Value).prototype.String = function() { + var i; + i = this; + return fmt.Sprintf("%v", new sliceType([i.$get()])); + }; + newUintValue = function(val, p) { + var p, val; + p.$set(val); + return new ptrType$3(p.$get, p.$set); + }; + $ptrType(uintValue).prototype.Set = function(s) { + var _tuple, err, i, s, v; + i = this; + _tuple = strconv.ParseUint(s, 0, 64); v = _tuple[0]; err = _tuple[1]; + i.$set((v.$low >>> 0)); + return err; + }; + $ptrType(uintValue).prototype.Get = function() { + var i; + i = this; + return new $Uint((i.$get() >>> 0)); + }; + $ptrType(uintValue).prototype.String = function() { + var i; + i = this; + return fmt.Sprintf("%v", new sliceType([new uintValue(i.$get())])); + }; + newUint64Value = function(val, p) { + var p, val; + p.$set(val); + return new ptrType$4(p.$get, p.$set); + }; + $ptrType(uint64Value).prototype.Set = function(s) { + var _tuple, err, i, s, v; + i = this; + _tuple = strconv.ParseUint(s, 0, 64); v = _tuple[0]; err = _tuple[1]; + i.$set(new uint64Value(v.$high, v.$low)); + return err; + }; + $ptrType(uint64Value).prototype.Get = function() { + var i, x$1; + i = this; + return (x$1 = i.$get(), new $Uint64(x$1.$high, x$1.$low)); + }; + $ptrType(uint64Value).prototype.String = function() { + var i; + i = this; + return fmt.Sprintf("%v", new sliceType([i.$get()])); + }; + newStringValue = function(val, p) { + var p, val; + p.$set(val); + return new ptrType$5(p.$get, p.$set); + }; + $ptrType(stringValue).prototype.Set = function(val) { + var s, val; + s = this; + s.$set(val); + return $ifaceNil; + }; + $ptrType(stringValue).prototype.Get = function() { + var s; + s = this; + return new $String(s.$get()); + }; + $ptrType(stringValue).prototype.String = function() { + var s; + s = this; + return fmt.Sprintf("%s", new sliceType([new stringValue(s.$get())])); + }; + newFloat64Value = function(val, p) { + var p, val; + p.$set(val); + return new ptrType$6(p.$get, p.$set); + }; + $ptrType(float64Value).prototype.Set = function(s) { + var _tuple, err, f, s, v; + f = this; + _tuple = strconv.ParseFloat(s, 64); v = _tuple[0]; err = _tuple[1]; + f.$set(v); + return err; + }; + $ptrType(float64Value).prototype.Get = function() { + var f; + f = this; + return new $Float64(f.$get()); + }; + $ptrType(float64Value).prototype.String = function() { + var f; + f = this; + return fmt.Sprintf("%v", new sliceType([new float64Value(f.$get())])); + }; + newDurationValue = function(val, p) { + var p, val; + p.$set(val); + return new ptrType$7(p.$get, p.$set); + }; + $ptrType(durationValue).prototype.Set = function(s) { + var _tuple, d, err, s, v; + d = this; + _tuple = time.ParseDuration(s); v = _tuple[0]; err = _tuple[1]; + d.$set(new durationValue(v.$high, v.$low)); + return err; + }; + $ptrType(durationValue).prototype.Get = function() { + var d, x$1; + d = this; + return (x$1 = d.$get(), new time.Duration(x$1.$high, x$1.$low)); + }; + $ptrType(durationValue).prototype.String = function() { + var d; + d = this; + return new ptrType$8(d.$get, d.$set).String(); + }; + sortFlags = function(flags) { + var _entry, _entry$1, _i, _i$1, _keys, _ref, _ref$1, f, flags, i, i$1, list, name, result; + list = $makeSlice(sort.StringSlice, $keys(flags).length); + i = 0; + _ref = flags; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + continue; + } + f = _entry.v; + (i < 0 || i >= list.$length) ? $throwRuntimeError("index out of range") : list.$array[list.$offset + i] = f.Name; + i = i + (1) >> 0; + _i++; + } + list.Sort(); + result = $makeSlice(sliceType$1, list.$length); + _ref$1 = list; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i$1 = _i$1; + name = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i$1]); + (i$1 < 0 || i$1 >= result.$length) ? $throwRuntimeError("index out of range") : result.$array[result.$offset + i$1] = (_entry$1 = flags[name], _entry$1 !== undefined ? _entry$1.v : ptrType$9.nil); + _i$1++; + } + return result; + }; + FlagSet.ptr.prototype.out = function() { + var f; + f = this; + if ($interfaceIsEqual(f.output, $ifaceNil)) { + return os.Stderr; + } + return f.output; + }; + FlagSet.prototype.out = function() { return this.$val.out(); }; + FlagSet.ptr.prototype.SetOutput = function(output) { + var f, output; + f = this; + f.output = output; + }; + FlagSet.prototype.SetOutput = function(output) { return this.$val.SetOutput(output); }; + FlagSet.ptr.prototype.VisitAll = function(fn) { + var _i, _ref, f, flag, fn; + f = this; + _ref = sortFlags(f.formal); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + flag = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + fn(flag); + _i++; + } + }; + FlagSet.prototype.VisitAll = function(fn) { return this.$val.VisitAll(fn); }; + FlagSet.ptr.prototype.Visit = function(fn) { + var _i, _ref, f, flag, fn; + f = this; + _ref = sortFlags(f.actual); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + flag = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + fn(flag); + _i++; + } + }; + FlagSet.prototype.Visit = function(fn) { return this.$val.Visit(fn); }; + FlagSet.ptr.prototype.Lookup = function(name) { + var _entry, f, name; + f = this; + return (_entry = f.formal[name], _entry !== undefined ? _entry.v : ptrType$9.nil); + }; + FlagSet.prototype.Lookup = function(name) { return this.$val.Lookup(name); }; + FlagSet.ptr.prototype.Set = function(name, value) { + var _entry, _key, _tuple, err, f, flag, name, ok, value; + f = this; + _tuple = (_entry = f.formal[name], _entry !== undefined ? [_entry.v, true] : [ptrType$9.nil, false]); flag = _tuple[0]; ok = _tuple[1]; + if (!ok) { + return fmt.Errorf("no such flag -%v", new sliceType([new $String(name)])); + } + err = flag.Value.Set(value); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + if (f.actual === false) { + f.actual = new $Map(); + } + _key = name; (f.actual || $throwRuntimeError("assignment to entry in nil map"))[_key] = { k: _key, v: flag }; + return $ifaceNil; + }; + FlagSet.prototype.Set = function(name, value) { return this.$val.Set(name, value); }; + FlagSet.ptr.prototype.PrintDefaults = function() { + var f; + f = this; + f.VisitAll((function(flag) { + var _tuple, flag, format, ok; + format = " -%s=%s: %s\n"; + _tuple = $assertType(flag.Value, ptrType$5, true); ok = _tuple[1]; + if (ok) { + format = " -%s=%q: %s\n"; + } + fmt.Fprintf(f.out(), format, new sliceType([new $String(flag.Name), new $String(flag.DefValue), new $String(flag.Usage)])); + })); + }; + FlagSet.prototype.PrintDefaults = function() { return this.$val.PrintDefaults(); }; + PrintDefaults = $pkg.PrintDefaults = function() { + $pkg.CommandLine.PrintDefaults(); + }; + defaultUsage = function(f) { + var f; + if (f.name === "") { + fmt.Fprintf(f.out(), "Usage:\n", new sliceType([])); + } else { + fmt.Fprintf(f.out(), "Usage of %s:\n", new sliceType([new $String(f.name)])); + } + f.PrintDefaults(); + }; + FlagSet.ptr.prototype.NFlag = function() { + var f; + f = this; + return $keys(f.actual).length; + }; + FlagSet.prototype.NFlag = function() { return this.$val.NFlag(); }; + FlagSet.ptr.prototype.Arg = function(i) { + var f, i, x$1; + f = this; + if (i < 0 || i >= f.args.$length) { + return ""; + } + return (x$1 = f.args, ((i < 0 || i >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + i])); + }; + FlagSet.prototype.Arg = function(i) { return this.$val.Arg(i); }; + FlagSet.ptr.prototype.NArg = function() { + var f; + f = this; + return f.args.$length; + }; + FlagSet.prototype.NArg = function() { return this.$val.NArg(); }; + FlagSet.ptr.prototype.Args = function() { + var f; + f = this; + return f.args; + }; + FlagSet.prototype.Args = function() { return this.$val.Args(); }; + FlagSet.ptr.prototype.BoolVar = function(p, name, value, usage) { + var f, name, p, usage, value; + f = this; + f.Var(newBoolValue(value, p), name, usage); + }; + FlagSet.prototype.BoolVar = function(p, name, value, usage) { return this.$val.BoolVar(p, name, value, usage); }; + FlagSet.ptr.prototype.Bool = function(name, value, usage) { + var f, name, p, usage, value; + f = this; + p = $newDataPointer(false, ptrType$10); + f.BoolVar(p, name, value, usage); + return p; + }; + FlagSet.prototype.Bool = function(name, value, usage) { return this.$val.Bool(name, value, usage); }; + Bool = $pkg.Bool = function(name, value, usage) { + var name, usage, value; + return $pkg.CommandLine.Bool(name, value, usage); + }; + FlagSet.ptr.prototype.IntVar = function(p, name, value, usage) { + var f, name, p, usage, value; + f = this; + f.Var(newIntValue(value, p), name, usage); + }; + FlagSet.prototype.IntVar = function(p, name, value, usage) { return this.$val.IntVar(p, name, value, usage); }; + FlagSet.ptr.prototype.Int = function(name, value, usage) { + var f, name, p, usage, value; + f = this; + p = $newDataPointer(0, ptrType$11); + f.IntVar(p, name, value, usage); + return p; + }; + FlagSet.prototype.Int = function(name, value, usage) { return this.$val.Int(name, value, usage); }; + Int = $pkg.Int = function(name, value, usage) { + var name, usage, value; + return $pkg.CommandLine.Int(name, value, usage); + }; + FlagSet.ptr.prototype.Int64Var = function(p, name, value, usage) { + var f, name, p, usage, value; + f = this; + f.Var(newInt64Value(value, p), name, usage); + }; + FlagSet.prototype.Int64Var = function(p, name, value, usage) { return this.$val.Int64Var(p, name, value, usage); }; + FlagSet.ptr.prototype.Int64 = function(name, value, usage) { + var f, name, p, usage, value; + f = this; + p = $newDataPointer(new $Int64(0, 0), ptrType$12); + f.Int64Var(p, name, value, usage); + return p; + }; + FlagSet.prototype.Int64 = function(name, value, usage) { return this.$val.Int64(name, value, usage); }; + FlagSet.ptr.prototype.UintVar = function(p, name, value, usage) { + var f, name, p, usage, value; + f = this; + f.Var(newUintValue(value, p), name, usage); + }; + FlagSet.prototype.UintVar = function(p, name, value, usage) { return this.$val.UintVar(p, name, value, usage); }; + FlagSet.ptr.prototype.Uint = function(name, value, usage) { + var f, name, p, usage, value; + f = this; + p = $newDataPointer(0, ptrType$13); + f.UintVar(p, name, value, usage); + return p; + }; + FlagSet.prototype.Uint = function(name, value, usage) { return this.$val.Uint(name, value, usage); }; + FlagSet.ptr.prototype.Uint64Var = function(p, name, value, usage) { + var f, name, p, usage, value; + f = this; + f.Var(newUint64Value(value, p), name, usage); + }; + FlagSet.prototype.Uint64Var = function(p, name, value, usage) { return this.$val.Uint64Var(p, name, value, usage); }; + FlagSet.ptr.prototype.Uint64 = function(name, value, usage) { + var f, name, p, usage, value; + f = this; + p = $newDataPointer(new $Uint64(0, 0), ptrType$14); + f.Uint64Var(p, name, value, usage); + return p; + }; + FlagSet.prototype.Uint64 = function(name, value, usage) { return this.$val.Uint64(name, value, usage); }; + FlagSet.ptr.prototype.StringVar = function(p, name, value, usage) { + var f, name, p, usage, value; + f = this; + f.Var(newStringValue(value, p), name, usage); + }; + FlagSet.prototype.StringVar = function(p, name, value, usage) { return this.$val.StringVar(p, name, value, usage); }; + FlagSet.ptr.prototype.String = function(name, value, usage) { + var f, name, p, usage, value; + f = this; + p = $newDataPointer("", ptrType$15); + f.StringVar(p, name, value, usage); + return p; + }; + FlagSet.prototype.String = function(name, value, usage) { return this.$val.String(name, value, usage); }; + String = $pkg.String = function(name, value, usage) { + var name, usage, value; + return $pkg.CommandLine.String(name, value, usage); + }; + FlagSet.ptr.prototype.Float64Var = function(p, name, value, usage) { + var f, name, p, usage, value; + f = this; + f.Var(newFloat64Value(value, p), name, usage); + }; + FlagSet.prototype.Float64Var = function(p, name, value, usage) { return this.$val.Float64Var(p, name, value, usage); }; + FlagSet.ptr.prototype.Float64 = function(name, value, usage) { + var f, name, p, usage, value; + f = this; + p = $newDataPointer(0, ptrType$16); + f.Float64Var(p, name, value, usage); + return p; + }; + FlagSet.prototype.Float64 = function(name, value, usage) { return this.$val.Float64(name, value, usage); }; + FlagSet.ptr.prototype.DurationVar = function(p, name, value, usage) { + var f, name, p, usage, value; + f = this; + f.Var(newDurationValue(value, p), name, usage); + }; + FlagSet.prototype.DurationVar = function(p, name, value, usage) { return this.$val.DurationVar(p, name, value, usage); }; + FlagSet.ptr.prototype.Duration = function(name, value, usage) { + var f, name, p, usage, value; + f = this; + p = $newDataPointer(new time.Duration(0, 0), ptrType$8); + f.DurationVar(p, name, value, usage); + return p; + }; + FlagSet.prototype.Duration = function(name, value, usage) { return this.$val.Duration(name, value, usage); }; + Duration = $pkg.Duration = function(name, value, usage) { + var name, usage, value; + return $pkg.CommandLine.Duration(name, value, usage); + }; + FlagSet.ptr.prototype.Var = function(value, name, usage) { + var _entry, _key, _tuple, alreadythere, f, flag, msg, name, usage, value; + f = this; + flag = new Flag.ptr(name, usage, value, value.String()); + _tuple = (_entry = f.formal[name], _entry !== undefined ? [_entry.v, true] : [ptrType$9.nil, false]); alreadythere = _tuple[1]; + if (alreadythere) { + msg = ""; + if (f.name === "") { + msg = fmt.Sprintf("flag redefined: %s", new sliceType([new $String(name)])); + } else { + msg = fmt.Sprintf("%s flag redefined: %s", new sliceType([new $String(f.name), new $String(name)])); + } + fmt.Fprintln(f.out(), new sliceType([new $String(msg)])); + $panic(new $String(msg)); + } + if (f.formal === false) { + f.formal = new $Map(); + } + _key = name; (f.formal || $throwRuntimeError("assignment to entry in nil map"))[_key] = { k: _key, v: flag }; + }; + FlagSet.prototype.Var = function(value, name, usage) { return this.$val.Var(value, name, usage); }; + FlagSet.ptr.prototype.failf = function(format, a) { + var a, err, f, format; + f = this; + err = fmt.Errorf(format, a); + fmt.Fprintln(f.out(), new sliceType([err])); + f.usage(); + return err; + }; + FlagSet.prototype.failf = function(format, a) { return this.$val.failf(format, a); }; + FlagSet.ptr.prototype.usage = function() { + var f; + f = this; + if (f.Usage === $throwNilPointerError) { + if (f === $pkg.CommandLine) { + $pkg.Usage(); + } else { + defaultUsage(f); + } + } else { + f.Usage(); + } + }; + FlagSet.prototype.usage = function() { return this.$val.usage(); }; + FlagSet.ptr.prototype.parseOne = function() { + var _entry, _key, _tmp, _tmp$1, _tuple, _tuple$1, alreadythere, err, err$1, f, flag, fv, has_value, i, m, name, num_minuses, ok, s, value, x$1, x$2; + f = this; + if (f.args.$length === 0) { + return [false, $ifaceNil]; + } + s = (x$1 = f.args, ((0 < 0 || 0 >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + 0])); + if ((s.length === 0) || !((s.charCodeAt(0) === 45)) || (s.length === 1)) { + return [false, $ifaceNil]; + } + num_minuses = 1; + if (s.charCodeAt(1) === 45) { + num_minuses = num_minuses + (1) >> 0; + if (s.length === 2) { + f.args = $subslice(f.args, 1); + return [false, $ifaceNil]; + } + } + name = s.substring(num_minuses); + if ((name.length === 0) || (name.charCodeAt(0) === 45) || (name.charCodeAt(0) === 61)) { + return [false, f.failf("bad flag syntax: %s", new sliceType([new $String(s)]))]; + } + f.args = $subslice(f.args, 1); + has_value = false; + value = ""; + i = 1; + while (true) { + if (!(i < name.length)) { break; } + if (name.charCodeAt(i) === 61) { + value = name.substring((i + 1 >> 0)); + has_value = true; + name = name.substring(0, i); + break; + } + i = i + (1) >> 0; + } + m = f.formal; + _tuple = (_entry = m[name], _entry !== undefined ? [_entry.v, true] : [ptrType$9.nil, false]); flag = _tuple[0]; alreadythere = _tuple[1]; + if (!alreadythere) { + if (name === "help" || name === "h") { + f.usage(); + return [false, $pkg.ErrHelp]; + } + return [false, f.failf("flag provided but not defined: -%s", new sliceType([new $String(name)]))]; + } + _tuple$1 = $assertType(flag.Value, boolFlag, true); fv = _tuple$1[0]; ok = _tuple$1[1]; + if (ok && fv.IsBoolFlag()) { + if (has_value) { + err = fv.Set(value); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [false, f.failf("invalid boolean value %q for -%s: %v", new sliceType([new $String(value), new $String(name), err]))]; + } + } else { + fv.Set("true"); + } + } else { + if (!has_value && f.args.$length > 0) { + has_value = true; + _tmp = (x$2 = f.args, ((0 < 0 || 0 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + 0])); _tmp$1 = $subslice(f.args, 1); value = _tmp; f.args = _tmp$1; + } + if (!has_value) { + return [false, f.failf("flag needs an argument: -%s", new sliceType([new $String(name)]))]; + } + err$1 = flag.Value.Set(value); + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return [false, f.failf("invalid value %q for flag -%s: %v", new sliceType([new $String(value), new $String(name), err$1]))]; + } + } + if (f.actual === false) { + f.actual = new $Map(); + } + _key = name; (f.actual || $throwRuntimeError("assignment to entry in nil map"))[_key] = { k: _key, v: flag }; + return [true, $ifaceNil]; + }; + FlagSet.prototype.parseOne = function() { return this.$val.parseOne(); }; + FlagSet.ptr.prototype.Parse = function(arguments$1) { + var _ref, _tuple, arguments$1, err, f, seen; + f = this; + f.parsed = true; + f.args = arguments$1; + while (true) { + if (!(true)) { break; } + _tuple = f.parseOne(); seen = _tuple[0]; err = _tuple[1]; + if (seen) { + continue; + } + if ($interfaceIsEqual(err, $ifaceNil)) { + break; + } + _ref = f.errorHandling; + if (_ref === 0) { + return err; + } else if (_ref === 1) { + os.Exit(2); + } else if (_ref === 2) { + $panic(err); + } + } + return $ifaceNil; + }; + FlagSet.prototype.Parse = function(arguments$1) { return this.$val.Parse(arguments$1); }; + FlagSet.ptr.prototype.Parsed = function() { + var f; + f = this; + return f.parsed; + }; + FlagSet.prototype.Parsed = function() { return this.$val.Parsed(); }; + NewFlagSet = $pkg.NewFlagSet = function(name, errorHandling) { + var errorHandling, f, name; + f = new FlagSet.ptr($throwNilPointerError, name, false, false, false, sliceType$2.nil, errorHandling, $ifaceNil); + return f; + }; + FlagSet.ptr.prototype.Init = function(name, errorHandling) { + var errorHandling, f, name; + f = this; + f.name = name; + f.errorHandling = errorHandling; + }; + FlagSet.prototype.Init = function(name, errorHandling) { return this.$val.Init(name, errorHandling); }; + ptrType.methods = [{prop: "Set", name: "Set", pkg: "", typ: $funcType([$String], [$error], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "IsBoolFlag", name: "IsBoolFlag", pkg: "", typ: $funcType([], [$Bool], false)}]; + ptrType$1.methods = [{prop: "Set", name: "Set", pkg: "", typ: $funcType([$String], [$error], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$2.methods = [{prop: "Set", name: "Set", pkg: "", typ: $funcType([$String], [$error], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$3.methods = [{prop: "Set", name: "Set", pkg: "", typ: $funcType([$String], [$error], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$4.methods = [{prop: "Set", name: "Set", pkg: "", typ: $funcType([$String], [$error], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$5.methods = [{prop: "Set", name: "Set", pkg: "", typ: $funcType([$String], [$error], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$6.methods = [{prop: "Set", name: "Set", pkg: "", typ: $funcType([$String], [$error], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$7.methods = [{prop: "Set", name: "Set", pkg: "", typ: $funcType([$String], [$error], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$17.methods = [{prop: "out", name: "out", pkg: "flag", typ: $funcType([], [io.Writer], false)}, {prop: "SetOutput", name: "SetOutput", pkg: "", typ: $funcType([io.Writer], [], false)}, {prop: "VisitAll", name: "VisitAll", pkg: "", typ: $funcType([funcType], [], false)}, {prop: "Visit", name: "Visit", pkg: "", typ: $funcType([funcType], [], false)}, {prop: "Lookup", name: "Lookup", pkg: "", typ: $funcType([$String], [ptrType$9], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$String, $String], [$error], false)}, {prop: "PrintDefaults", name: "PrintDefaults", pkg: "", typ: $funcType([], [], false)}, {prop: "NFlag", name: "NFlag", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Arg", name: "Arg", pkg: "", typ: $funcType([$Int], [$String], false)}, {prop: "NArg", name: "NArg", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Args", name: "Args", pkg: "", typ: $funcType([], [sliceType$2], false)}, {prop: "BoolVar", name: "BoolVar", pkg: "", typ: $funcType([ptrType$10, $String, $Bool, $String], [], false)}, {prop: "Bool", name: "Bool", pkg: "", typ: $funcType([$String, $Bool, $String], [ptrType$10], false)}, {prop: "IntVar", name: "IntVar", pkg: "", typ: $funcType([ptrType$11, $String, $Int, $String], [], false)}, {prop: "Int", name: "Int", pkg: "", typ: $funcType([$String, $Int, $String], [ptrType$11], false)}, {prop: "Int64Var", name: "Int64Var", pkg: "", typ: $funcType([ptrType$12, $String, $Int64, $String], [], false)}, {prop: "Int64", name: "Int64", pkg: "", typ: $funcType([$String, $Int64, $String], [ptrType$12], false)}, {prop: "UintVar", name: "UintVar", pkg: "", typ: $funcType([ptrType$13, $String, $Uint, $String], [], false)}, {prop: "Uint", name: "Uint", pkg: "", typ: $funcType([$String, $Uint, $String], [ptrType$13], false)}, {prop: "Uint64Var", name: "Uint64Var", pkg: "", typ: $funcType([ptrType$14, $String, $Uint64, $String], [], false)}, {prop: "Uint64", name: "Uint64", pkg: "", typ: $funcType([$String, $Uint64, $String], [ptrType$14], false)}, {prop: "StringVar", name: "StringVar", pkg: "", typ: $funcType([ptrType$15, $String, $String, $String], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([$String, $String, $String], [ptrType$15], false)}, {prop: "Float64Var", name: "Float64Var", pkg: "", typ: $funcType([ptrType$16, $String, $Float64, $String], [], false)}, {prop: "Float64", name: "Float64", pkg: "", typ: $funcType([$String, $Float64, $String], [ptrType$16], false)}, {prop: "DurationVar", name: "DurationVar", pkg: "", typ: $funcType([ptrType$8, $String, time.Duration, $String], [], false)}, {prop: "Duration", name: "Duration", pkg: "", typ: $funcType([$String, time.Duration, $String], [ptrType$8], false)}, {prop: "Var", name: "Var", pkg: "", typ: $funcType([Value, $String, $String], [], false)}, {prop: "failf", name: "failf", pkg: "flag", typ: $funcType([$String, sliceType], [$error], true)}, {prop: "usage", name: "usage", pkg: "flag", typ: $funcType([], [], false)}, {prop: "parseOne", name: "parseOne", pkg: "flag", typ: $funcType([], [$Bool, $error], false)}, {prop: "Parse", name: "Parse", pkg: "", typ: $funcType([sliceType$2], [$error], false)}, {prop: "Parsed", name: "Parsed", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Init", name: "Init", pkg: "", typ: $funcType([$String, ErrorHandling], [], false)}]; + boolFlag.init([{prop: "IsBoolFlag", name: "IsBoolFlag", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$String], [$error], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]); + Value.init([{prop: "Set", name: "Set", pkg: "", typ: $funcType([$String], [$error], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]); + FlagSet.init([{prop: "Usage", name: "Usage", pkg: "", typ: funcType$1, tag: ""}, {prop: "name", name: "name", pkg: "flag", typ: $String, tag: ""}, {prop: "parsed", name: "parsed", pkg: "flag", typ: $Bool, tag: ""}, {prop: "actual", name: "actual", pkg: "flag", typ: mapType, tag: ""}, {prop: "formal", name: "formal", pkg: "flag", typ: mapType, tag: ""}, {prop: "args", name: "args", pkg: "flag", typ: sliceType$2, tag: ""}, {prop: "errorHandling", name: "errorHandling", pkg: "flag", typ: ErrorHandling, tag: ""}, {prop: "output", name: "output", pkg: "flag", typ: io.Writer, tag: ""}]); + Flag.init([{prop: "Name", name: "Name", pkg: "", typ: $String, tag: ""}, {prop: "Usage", name: "Usage", pkg: "", typ: $String, tag: ""}, {prop: "Value", name: "Value", pkg: "", typ: Value, tag: ""}, {prop: "DefValue", name: "DefValue", pkg: "", typ: $String, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_flag = function() { while (true) { switch ($s) { case 0: + $r = errors.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = fmt.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = io.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = os.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = sort.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + $r = strconv.$init($BLOCKING); /* */ $s = 6; case 6: if ($r && $r.$blocking) { $r = $r(); } + $r = time.$init($BLOCKING); /* */ $s = 7; case 7: if ($r && $r.$blocking) { $r = $r(); } + $pkg.ErrHelp = errors.New("flag: help requested"); + $pkg.CommandLine = NewFlagSet((x = os.Args, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])), 1); + $pkg.Usage = (function() { + var x$1; + fmt.Fprintf(os.Stderr, "Usage of %s:\n", new sliceType([new $String((x$1 = os.Args, ((0 < 0 || 0 >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + 0])))])); + PrintDefaults(); + }); + /* */ } return; } }; $init_flag.$blocking = true; return $init_flag; + }; + return $pkg; +})(); +$packages["runtime/pprof"] = (function() { + var $pkg = {}, io, sync; + io = $packages["io"]; + sync = $packages["sync"]; + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_pprof = function() { while (true) { switch ($s) { case 0: + $r = io.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = sync.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + /* */ } return; } }; $init_pprof.$blocking = true; return $init_pprof; + }; + return $pkg; +})(); +$packages["testing"] = (function() { + var $pkg = {}, bytes, flag, fmt, nosync, io, os, runtime, pprof, strconv, strings, atomic, time, matchBenchmarks, benchTime, benchmarkMemory, short$1, outputDir, chatty, coverProfile, match, memProfile, memProfileRate, cpuProfile, blockProfile, blockProfileRate, timeout, cpuListStr, parallel; + bytes = $packages["bytes"]; + flag = $packages["flag"]; + fmt = $packages["fmt"]; + nosync = $packages["github.com/gopherjs/gopherjs/nosync"]; + io = $packages["io"]; + os = $packages["os"]; + runtime = $packages["runtime"]; + pprof = $packages["runtime/pprof"]; + strconv = $packages["strconv"]; + strings = $packages["strings"]; + atomic = $packages["sync/atomic"]; + time = $packages["time"]; + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_testing = function() { while (true) { switch ($s) { case 0: + $r = bytes.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = flag.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = fmt.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = nosync.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = io.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + $r = os.$init($BLOCKING); /* */ $s = 6; case 6: if ($r && $r.$blocking) { $r = $r(); } + $r = runtime.$init($BLOCKING); /* */ $s = 7; case 7: if ($r && $r.$blocking) { $r = $r(); } + $r = pprof.$init($BLOCKING); /* */ $s = 8; case 8: if ($r && $r.$blocking) { $r = $r(); } + $r = strconv.$init($BLOCKING); /* */ $s = 9; case 9: if ($r && $r.$blocking) { $r = $r(); } + $r = strings.$init($BLOCKING); /* */ $s = 10; case 10: if ($r && $r.$blocking) { $r = $r(); } + $r = atomic.$init($BLOCKING); /* */ $s = 11; case 11: if ($r && $r.$blocking) { $r = $r(); } + $r = time.$init($BLOCKING); /* */ $s = 12; case 12: if ($r && $r.$blocking) { $r = $r(); } + matchBenchmarks = flag.String("test.bench", "", "regular expression to select benchmarks to run"); + benchTime = flag.Duration("test.benchtime", new time.Duration(0, 1000000000), "approximate run time for each benchmark"); + benchmarkMemory = flag.Bool("test.benchmem", false, "print memory allocations for benchmarks"); + short$1 = flag.Bool("test.short", false, "run smaller test suite to save time"); + outputDir = flag.String("test.outputdir", "", "directory in which to write profiles"); + chatty = flag.Bool("test.v", false, "verbose: print additional output"); + coverProfile = flag.String("test.coverprofile", "", "write a coverage profile to the named file after execution"); + match = flag.String("test.run", "", "regular expression to select tests and examples to run"); + memProfile = flag.String("test.memprofile", "", "write a memory profile to the named file after execution"); + memProfileRate = flag.Int("test.memprofilerate", 0, "if >=0, sets runtime.MemProfileRate"); + cpuProfile = flag.String("test.cpuprofile", "", "write a cpu profile to the named file during execution"); + blockProfile = flag.String("test.blockprofile", "", "write a goroutine blocking profile to the named file after execution"); + blockProfileRate = flag.Int("test.blockprofilerate", 1, "if >= 0, calls runtime.SetBlockProfileRate()"); + timeout = flag.Duration("test.timeout", new time.Duration(0, 0), "if positive, sets an aggregate time limit for all tests"); + cpuListStr = flag.String("test.cpu", "", "comma-separated list of number of CPUs to use for each test"); + parallel = flag.Int("test.parallel", runtime.GOMAXPROCS(0), "maximum test parallelism"); + /* */ } return; } }; $init_testing.$blocking = true; return $init_testing; + }; + return $pkg; +})(); +$packages["regexp"] = (function() { + var $pkg = {}, bytes, nosync, io, syntax, sort, strconv, strings, testing, unicode, utf8, queue, entry, thread, machine, onePassProg, onePassInst, queueOnePass, runeSlice, Regexp, input, inputString, inputBytes, inputReader, sliceType, sliceType$1, sliceType$2, ptrType, sliceType$3, ptrType$1, ptrType$2, ptrType$3, sliceType$5, sliceType$6, ptrType$4, ptrType$5, sliceType$7, ptrType$6, sliceType$8, ptrType$7, sliceType$9, ptrType$8, sliceType$10, sliceType$11, sliceType$12, sliceType$13, sliceType$14, ptrType$9, ptrType$10, funcType, funcType$1, funcType$2, funcType$3, ptrType$11, ptrType$12, ptrType$13, empty, noRune, noNext, anyRuneNotNL, anyRune, notOnePass, progMachine, onePassPrefix, onePassNext, iop, newQueue, mergeRuneSets, cleanupOnePass, onePassCopy, makeOnePass, compileOnePass, Compile, compile, MustCompile, quote, extract; + bytes = $packages["bytes"]; + nosync = $packages["github.com/gopherjs/gopherjs/nosync"]; + io = $packages["io"]; + syntax = $packages["regexp/syntax"]; + sort = $packages["sort"]; + strconv = $packages["strconv"]; + strings = $packages["strings"]; + testing = $packages["testing"]; + unicode = $packages["unicode"]; + utf8 = $packages["unicode/utf8"]; + queue = $pkg.queue = $newType(0, $kindStruct, "regexp.queue", "queue", "regexp", function(sparse_, dense_) { + this.$val = this; + this.sparse = sparse_ !== undefined ? sparse_ : sliceType$2.nil; + this.dense = dense_ !== undefined ? dense_ : sliceType$6.nil; + }); + entry = $pkg.entry = $newType(0, $kindStruct, "regexp.entry", "entry", "regexp", function(pc_, t_) { + this.$val = this; + this.pc = pc_ !== undefined ? pc_ : 0; + this.t = t_ !== undefined ? t_ : ptrType$3.nil; + }); + thread = $pkg.thread = $newType(0, $kindStruct, "regexp.thread", "thread", "regexp", function(inst_, cap_) { + this.$val = this; + this.inst = inst_ !== undefined ? inst_ : ptrType$9.nil; + this.cap = cap_ !== undefined ? cap_ : sliceType.nil; + }); + machine = $pkg.machine = $newType(0, $kindStruct, "regexp.machine", "machine", "regexp", function(re_, p_, op_, q0_, q1_, pool_, matched_, matchcap_, inputBytes_, inputString_, inputReader_) { + this.$val = this; + this.re = re_ !== undefined ? re_ : ptrType$1.nil; + this.p = p_ !== undefined ? p_ : ptrType$2.nil; + this.op = op_ !== undefined ? op_ : ptrType.nil; + this.q0 = q0_ !== undefined ? q0_ : new queue.ptr(); + this.q1 = q1_ !== undefined ? q1_ : new queue.ptr(); + this.pool = pool_ !== undefined ? pool_ : sliceType$5.nil; + this.matched = matched_ !== undefined ? matched_ : false; + this.matchcap = matchcap_ !== undefined ? matchcap_ : sliceType.nil; + this.inputBytes = inputBytes_ !== undefined ? inputBytes_ : new inputBytes.ptr(); + this.inputString = inputString_ !== undefined ? inputString_ : new inputString.ptr(); + this.inputReader = inputReader_ !== undefined ? inputReader_ : new inputReader.ptr(); + }); + onePassProg = $pkg.onePassProg = $newType(0, $kindStruct, "regexp.onePassProg", "onePassProg", "regexp", function(Inst_, Start_, NumCap_) { + this.$val = this; + this.Inst = Inst_ !== undefined ? Inst_ : sliceType$7.nil; + this.Start = Start_ !== undefined ? Start_ : 0; + this.NumCap = NumCap_ !== undefined ? NumCap_ : 0; + }); + onePassInst = $pkg.onePassInst = $newType(0, $kindStruct, "regexp.onePassInst", "onePassInst", "regexp", function(Inst_, Next_) { + this.$val = this; + this.Inst = Inst_ !== undefined ? Inst_ : new syntax.Inst.ptr(); + this.Next = Next_ !== undefined ? Next_ : sliceType$2.nil; + }); + queueOnePass = $pkg.queueOnePass = $newType(0, $kindStruct, "regexp.queueOnePass", "queueOnePass", "regexp", function(sparse_, dense_, size_, nextIndex_) { + this.$val = this; + this.sparse = sparse_ !== undefined ? sparse_ : sliceType$2.nil; + this.dense = dense_ !== undefined ? dense_ : sliceType$2.nil; + this.size = size_ !== undefined ? size_ : 0; + this.nextIndex = nextIndex_ !== undefined ? nextIndex_ : 0; + }); + runeSlice = $pkg.runeSlice = $newType(12, $kindSlice, "regexp.runeSlice", "runeSlice", "regexp", null); + Regexp = $pkg.Regexp = $newType(0, $kindStruct, "regexp.Regexp", "Regexp", "regexp", function(expr_, prog_, onepass_, prefix_, prefixBytes_, prefixComplete_, prefixRune_, prefixEnd_, cond_, numSubexp_, subexpNames_, longest_, mu_, machine_) { + this.$val = this; + this.expr = expr_ !== undefined ? expr_ : ""; + this.prog = prog_ !== undefined ? prog_ : ptrType$2.nil; + this.onepass = onepass_ !== undefined ? onepass_ : ptrType.nil; + this.prefix = prefix_ !== undefined ? prefix_ : ""; + this.prefixBytes = prefixBytes_ !== undefined ? prefixBytes_ : sliceType$3.nil; + this.prefixComplete = prefixComplete_ !== undefined ? prefixComplete_ : false; + this.prefixRune = prefixRune_ !== undefined ? prefixRune_ : 0; + this.prefixEnd = prefixEnd_ !== undefined ? prefixEnd_ : 0; + this.cond = cond_ !== undefined ? cond_ : 0; + this.numSubexp = numSubexp_ !== undefined ? numSubexp_ : 0; + this.subexpNames = subexpNames_ !== undefined ? subexpNames_ : sliceType$9.nil; + this.longest = longest_ !== undefined ? longest_ : false; + this.mu = mu_ !== undefined ? mu_ : new nosync.Mutex.ptr(); + this.machine = machine_ !== undefined ? machine_ : sliceType$10.nil; + }); + input = $pkg.input = $newType(8, $kindInterface, "regexp.input", "input", "regexp", null); + inputString = $pkg.inputString = $newType(0, $kindStruct, "regexp.inputString", "inputString", "regexp", function(str_) { + this.$val = this; + this.str = str_ !== undefined ? str_ : ""; + }); + inputBytes = $pkg.inputBytes = $newType(0, $kindStruct, "regexp.inputBytes", "inputBytes", "regexp", function(str_) { + this.$val = this; + this.str = str_ !== undefined ? str_ : sliceType$3.nil; + }); + inputReader = $pkg.inputReader = $newType(0, $kindStruct, "regexp.inputReader", "inputReader", "regexp", function(r_, atEOT_, pos_) { + this.$val = this; + this.r = r_ !== undefined ? r_ : $ifaceNil; + this.atEOT = atEOT_ !== undefined ? atEOT_ : false; + this.pos = pos_ !== undefined ? pos_ : 0; + }); + sliceType = $sliceType($Int); + sliceType$1 = $sliceType($Int32); + sliceType$2 = $sliceType($Uint32); + ptrType = $ptrType(onePassProg); + sliceType$3 = $sliceType($Uint8); + ptrType$1 = $ptrType(Regexp); + ptrType$2 = $ptrType(syntax.Prog); + ptrType$3 = $ptrType(thread); + sliceType$5 = $sliceType(ptrType$3); + sliceType$6 = $sliceType(entry); + ptrType$4 = $ptrType($Int); + ptrType$5 = $ptrType(queueOnePass); + sliceType$7 = $sliceType(onePassInst); + ptrType$6 = $ptrType($Uint32); + sliceType$8 = $sliceType(sliceType$1); + ptrType$7 = $ptrType(sliceType$1); + sliceType$9 = $sliceType($String); + ptrType$8 = $ptrType(machine); + sliceType$10 = $sliceType(ptrType$8); + sliceType$11 = $sliceType(sliceType$3); + sliceType$12 = $sliceType(sliceType); + sliceType$13 = $sliceType(sliceType$11); + sliceType$14 = $sliceType(sliceType$9); + ptrType$9 = $ptrType(syntax.Inst); + ptrType$10 = $ptrType(queue); + funcType = $funcType([$String], [$String], false); + funcType$1 = $funcType([sliceType$3, sliceType], [sliceType$3], false); + funcType$2 = $funcType([sliceType$3], [sliceType$3], false); + funcType$3 = $funcType([sliceType], [], false); + ptrType$11 = $ptrType(inputString); + ptrType$12 = $ptrType(inputBytes); + ptrType$13 = $ptrType(inputReader); + machine.ptr.prototype.newInputBytes = function(b) { + var b, m; + m = this; + m.inputBytes.str = b; + return m.inputBytes; + }; + machine.prototype.newInputBytes = function(b) { return this.$val.newInputBytes(b); }; + machine.ptr.prototype.newInputString = function(s) { + var m, s; + m = this; + m.inputString.str = s; + return m.inputString; + }; + machine.prototype.newInputString = function(s) { return this.$val.newInputString(s); }; + machine.ptr.prototype.newInputReader = function(r) { + var m, r; + m = this; + m.inputReader.r = r; + m.inputReader.atEOT = false; + m.inputReader.pos = 0; + return m.inputReader; + }; + machine.prototype.newInputReader = function(r) { return this.$val.newInputReader(r); }; + progMachine = function(p, op) { + var m, n, ncap, op, p; + m = new machine.ptr(ptrType$1.nil, p, op, new queue.ptr(), new queue.ptr(), sliceType$5.nil, false, sliceType.nil, new inputBytes.ptr(), new inputString.ptr(), new inputReader.ptr()); + n = m.p.Inst.$length; + $copy(m.q0, new queue.ptr($makeSlice(sliceType$2, n), $makeSlice(sliceType$6, 0, n)), queue); + $copy(m.q1, new queue.ptr($makeSlice(sliceType$2, n), $makeSlice(sliceType$6, 0, n)), queue); + ncap = p.NumCap; + if (ncap < 2) { + ncap = 2; + } + m.matchcap = $makeSlice(sliceType, ncap); + return m; + }; + machine.ptr.prototype.init = function(ncap) { + var _i, _ref, m, ncap, t; + m = this; + _ref = m.pool; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + t = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + t.cap = $subslice(t.cap, 0, ncap); + _i++; + } + m.matchcap = $subslice(m.matchcap, 0, ncap); + }; + machine.prototype.init = function(ncap) { return this.$val.init(ncap); }; + machine.ptr.prototype.alloc = function(i) { + var i, m, n, t, x, x$1; + m = this; + t = ptrType$3.nil; + n = m.pool.$length; + if (n > 0) { + t = (x = m.pool, x$1 = n - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])); + m.pool = $subslice(m.pool, 0, (n - 1 >> 0)); + } else { + t = new thread.ptr(); + t.cap = $makeSlice(sliceType, m.matchcap.$length, m.matchcap.$capacity); + } + t.inst = i; + return t; + }; + machine.prototype.alloc = function(i) { return this.$val.alloc(i); }; + machine.ptr.prototype.match = function(i, pos) { + var _i, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, advance, flag, i, i$1, m, nextq, pos, r, r1, runq, startCond, width, width1, x, x$1; + m = this; + startCond = m.re.cond; + if (startCond === 255) { + return false; + } + m.matched = false; + _ref = m.matchcap; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i$1 = _i; + (x = m.matchcap, (i$1 < 0 || i$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i$1] = -1); + _i++; + } + _tmp = m.q0; _tmp$1 = m.q1; runq = _tmp; nextq = _tmp$1; + _tmp$2 = -1; _tmp$3 = -1; r = _tmp$2; r1 = _tmp$3; + _tmp$4 = 0; _tmp$5 = 0; width = _tmp$4; width1 = _tmp$5; + _tuple = i.step(pos); r = _tuple[0]; width = _tuple[1]; + if (!((r === -1))) { + _tuple$1 = i.step(pos + width >> 0); r1 = _tuple$1[0]; width1 = _tuple$1[1]; + } + flag = 0; + if (pos === 0) { + flag = syntax.EmptyOpContext(-1, r); + } else { + flag = i.context(pos); + } + while (true) { + if (!(true)) { break; } + if (runq.dense.$length === 0) { + if (!((((startCond & 4) >>> 0) === 0)) && !((pos === 0))) { + break; + } + if (m.matched) { + break; + } + if (m.re.prefix.length > 0 && !((r1 === m.re.prefixRune)) && i.canCheckPrefix()) { + advance = i.index(m.re, pos); + if (advance < 0) { + break; + } + pos = pos + (advance) >> 0; + _tuple$2 = i.step(pos); r = _tuple$2[0]; width = _tuple$2[1]; + _tuple$3 = i.step(pos + width >> 0); r1 = _tuple$3[0]; width1 = _tuple$3[1]; + } + } + if (!m.matched) { + if (m.matchcap.$length > 0) { + (x$1 = m.matchcap, (0 < 0 || 0 >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + 0] = pos); + } + m.add(runq, (m.p.Start >>> 0), pos, m.matchcap, flag, ptrType$3.nil); + } + flag = syntax.EmptyOpContext(r, r1); + m.step(runq, nextq, pos, pos + width >> 0, r, flag); + if (width === 0) { + break; + } + if ((m.matchcap.$length === 0) && m.matched) { + break; + } + pos = pos + (width) >> 0; + _tmp$6 = r1; _tmp$7 = width1; r = _tmp$6; width = _tmp$7; + if (!((r === -1))) { + _tuple$4 = i.step(pos + width >> 0); r1 = _tuple$4[0]; width1 = _tuple$4[1]; + } + _tmp$8 = nextq; _tmp$9 = runq; runq = _tmp$8; nextq = _tmp$9; + } + m.clear(nextq); + return m.matched; + }; + machine.prototype.match = function(i, pos) { return this.$val.match(i, pos); }; + machine.ptr.prototype.clear = function(q) { + var _i, _ref, d, m, q; + m = this; + _ref = q.dense; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + d = $clone(((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]), entry); + if (!(d.t === ptrType$3.nil)) { + m.pool = $append(m.pool, d.t); + } + _i++; + } + q.dense = $subslice(q.dense, 0, 0); + }; + machine.prototype.clear = function(q) { return this.$val.clear(q); }; + machine.ptr.prototype.step = function(runq, nextq, pos, nextPos, c, nextCond) { + var _i, _ref, _ref$1, add, c, d, d$1, i, j, longest, m, nextCond, nextPos, nextq, pos, runq, t, x, x$1, x$2, x$3, x$4, x$5; + m = this; + longest = m.re.longest; + j = 0; + while (true) { + if (!(j < runq.dense.$length)) { break; } + d = (x = runq.dense, ((j < 0 || j >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + j])); + t = d.t; + if (t === ptrType$3.nil) { + j = j + (1) >> 0; + continue; + } + if (longest && m.matched && t.cap.$length > 0 && (x$1 = m.matchcap, ((0 < 0 || 0 >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + 0])) < (x$2 = t.cap, ((0 < 0 || 0 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + 0]))) { + m.pool = $append(m.pool, t); + j = j + (1) >> 0; + continue; + } + i = t.inst; + add = false; + _ref = i.Op; + if (_ref === 4) { + if (t.cap.$length > 0 && (!longest || !m.matched || (x$3 = m.matchcap, ((1 < 0 || 1 >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + 1])) < pos)) { + (x$4 = t.cap, (1 < 0 || 1 >= x$4.$length) ? $throwRuntimeError("index out of range") : x$4.$array[x$4.$offset + 1] = pos); + $copySlice(m.matchcap, t.cap); + } + if (!longest) { + _ref$1 = $subslice(runq.dense, (j + 1 >> 0)); + _i = 0; + while (true) { + if (!(_i < _ref$1.$length)) { break; } + d$1 = $clone(((_i < 0 || _i >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i]), entry); + if (!(d$1.t === ptrType$3.nil)) { + m.pool = $append(m.pool, d$1.t); + } + _i++; + } + runq.dense = $subslice(runq.dense, 0, 0); + } + m.matched = true; + } else if (_ref === 7) { + add = i.MatchRune(c); + } else if (_ref === 8) { + add = c === (x$5 = i.Rune, ((0 < 0 || 0 >= x$5.$length) ? $throwRuntimeError("index out of range") : x$5.$array[x$5.$offset + 0])); + } else if (_ref === 9) { + add = true; + } else if (_ref === 10) { + add = !((c === 10)); + } else { + $panic(new $String("bad inst")); + } + if (add) { + t = m.add(nextq, i.Out, nextPos, t.cap, nextCond, t); + } + if (!(t === ptrType$3.nil)) { + m.pool = $append(m.pool, t); + } + j = j + (1) >> 0; + } + runq.dense = $subslice(runq.dense, 0, 0); + }; + machine.prototype.step = function(runq, nextq, pos, nextPos, c, nextCond) { return this.$val.step(runq, nextq, pos, nextPos, c, nextCond); }; + machine.ptr.prototype.add = function(q, pc, pos, cap, cond, t) { + var _ref, cap, cond, d, i, j, j$1, m, opos, pc, pos, q, t, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7; + m = this; + if (pc === 0) { + return t; + } + j = (x = q.sparse, ((pc < 0 || pc >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + pc])); + if (j < (q.dense.$length >>> 0) && ((x$1 = q.dense, ((j < 0 || j >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + j])).pc === pc)) { + return t; + } + j$1 = q.dense.$length; + q.dense = $subslice(q.dense, 0, (j$1 + 1 >> 0)); + d = (x$2 = q.dense, ((j$1 < 0 || j$1 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + j$1])); + d.t = ptrType$3.nil; + d.pc = pc; + (x$3 = q.sparse, (pc < 0 || pc >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + pc] = (j$1 >>> 0)); + i = (x$4 = m.p.Inst, ((pc < 0 || pc >= x$4.$length) ? $throwRuntimeError("index out of range") : x$4.$array[x$4.$offset + pc])); + _ref = i.Op; + if (_ref === 5) { + } else if (_ref === 0 || _ref === 1) { + t = m.add(q, i.Out, pos, cap, cond, t); + t = m.add(q, i.Arg, pos, cap, cond, t); + } else if (_ref === 3) { + if (((i.Arg << 24 >>> 24) & ~cond) === 0) { + t = m.add(q, i.Out, pos, cap, cond, t); + } + } else if (_ref === 6) { + t = m.add(q, i.Out, pos, cap, cond, t); + } else if (_ref === 2) { + if ((i.Arg >> 0) < cap.$length) { + opos = (x$5 = i.Arg, ((x$5 < 0 || x$5 >= cap.$length) ? $throwRuntimeError("index out of range") : cap.$array[cap.$offset + x$5])); + (x$6 = i.Arg, (x$6 < 0 || x$6 >= cap.$length) ? $throwRuntimeError("index out of range") : cap.$array[cap.$offset + x$6] = pos); + m.add(q, i.Out, pos, cap, cond, ptrType$3.nil); + (x$7 = i.Arg, (x$7 < 0 || x$7 >= cap.$length) ? $throwRuntimeError("index out of range") : cap.$array[cap.$offset + x$7] = opos); + } else { + t = m.add(q, i.Out, pos, cap, cond, t); + } + } else if (_ref === 4 || _ref === 7 || _ref === 8 || _ref === 9 || _ref === 10) { + if (t === ptrType$3.nil) { + t = m.alloc(i); + } else { + t.inst = i; + } + if (cap.$length > 0 && !($pointerIsEqual(new ptrType$4(function() { return ((0 < 0 || 0 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + 0]); }, function($v) { (0 < 0 || 0 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + 0] = $v; }, t.cap), new ptrType$4(function() { return ((0 < 0 || 0 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + 0]); }, function($v) { (0 < 0 || 0 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + 0] = $v; }, cap)))) { + $copySlice(t.cap, cap); + } + d.t = t; + t = ptrType$3.nil; + } else { + $panic(new $String("unhandled")); + } + return t; + }; + machine.prototype.add = function(q, pc, pos, cap, cond, t) { return this.$val.add(q, pc, pos, cap, cond, t); }; + machine.ptr.prototype.onepass = function(i, pos) { + var _i, _ref, _ref$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, flag, i, i$1, inst, m, pc, pos, r, r1, startCond, width, width1, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7; + m = this; + startCond = m.re.cond; + if (startCond === 255) { + return false; + } + m.matched = false; + _ref = m.matchcap; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i$1 = _i; + (x = m.matchcap, (i$1 < 0 || i$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i$1] = -1); + _i++; + } + _tmp = -1; _tmp$1 = -1; r = _tmp; r1 = _tmp$1; + _tmp$2 = 0; _tmp$3 = 0; width = _tmp$2; width1 = _tmp$3; + _tuple = i.step(pos); r = _tuple[0]; width = _tuple[1]; + if (!((r === -1))) { + _tuple$1 = i.step(pos + width >> 0); r1 = _tuple$1[0]; width1 = _tuple$1[1]; + } + flag = 0; + if (pos === 0) { + flag = syntax.EmptyOpContext(-1, r); + } else { + flag = i.context(pos); + } + pc = m.op.Start; + inst = $clone((x$1 = m.op.Inst, ((pc < 0 || pc >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + pc])), onePassInst); + if ((pos === 0) && (((inst.Inst.Arg << 24 >>> 24) & ~flag) === 0) && m.re.prefix.length > 0 && i.canCheckPrefix()) { + if (i.hasPrefix(m.re)) { + pos = pos + (m.re.prefix.length) >> 0; + _tuple$2 = i.step(pos); r = _tuple$2[0]; width = _tuple$2[1]; + _tuple$3 = i.step(pos + width >> 0); r1 = _tuple$3[0]; width1 = _tuple$3[1]; + flag = i.context(pos); + pc = (m.re.prefixEnd >> 0); + } else { + return m.matched; + } + } + while (true) { + if (!(true)) { break; } + $copy(inst, (x$2 = m.op.Inst, ((pc < 0 || pc >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + pc])), onePassInst); + pc = (inst.Inst.Out >> 0); + _ref$1 = inst.Inst.Op; + if (_ref$1 === 4) { + m.matched = true; + if (m.matchcap.$length > 0) { + (x$3 = m.matchcap, (0 < 0 || 0 >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + 0] = 0); + (x$4 = m.matchcap, (1 < 0 || 1 >= x$4.$length) ? $throwRuntimeError("index out of range") : x$4.$array[x$4.$offset + 1] = pos); + } + return m.matched; + } else if (_ref$1 === 7) { + if (!inst.Inst.MatchRune(r)) { + return m.matched; + } + } else if (_ref$1 === 8) { + if (!((r === (x$5 = inst.Inst.Rune, ((0 < 0 || 0 >= x$5.$length) ? $throwRuntimeError("index out of range") : x$5.$array[x$5.$offset + 0]))))) { + return m.matched; + } + } else if (_ref$1 === 9) { + } else if (_ref$1 === 10) { + if (r === 10) { + return m.matched; + } + } else if (_ref$1 === 0 || _ref$1 === 1) { + pc = (onePassNext(inst, r) >> 0); + continue; + } else if (_ref$1 === 5) { + return m.matched; + } else if (_ref$1 === 6) { + continue; + } else if (_ref$1 === 3) { + if (!((((inst.Inst.Arg << 24 >>> 24) & ~flag) === 0))) { + return m.matched; + } + continue; + } else if (_ref$1 === 2) { + if ((inst.Inst.Arg >> 0) < m.matchcap.$length) { + (x$6 = m.matchcap, x$7 = inst.Inst.Arg, (x$7 < 0 || x$7 >= x$6.$length) ? $throwRuntimeError("index out of range") : x$6.$array[x$6.$offset + x$7] = pos); + } + continue; + } else { + $panic(new $String("bad inst")); + } + if (width === 0) { + break; + } + flag = syntax.EmptyOpContext(r, r1); + pos = pos + (width) >> 0; + _tmp$4 = r1; _tmp$5 = width1; r = _tmp$4; width = _tmp$5; + if (!((r === -1))) { + _tuple$4 = i.step(pos + width >> 0); r1 = _tuple$4[0]; width1 = _tuple$4[1]; + } + } + return m.matched; + }; + machine.prototype.onepass = function(i, pos) { return this.$val.onepass(i, pos); }; + Regexp.ptr.prototype.doExecute = function(r, b, s, pos, ncap) { + var b, cap, i, m, ncap, pos, r, re, s; + re = this; + m = re.get(); + i = $ifaceNil; + if (!($interfaceIsEqual(r, $ifaceNil))) { + i = m.newInputReader(r); + } else if (!(b === sliceType$3.nil)) { + i = m.newInputBytes(b); + } else { + i = m.newInputString(s); + } + if (!(m.op === notOnePass)) { + if (!m.onepass(i, pos)) { + re.put(m); + return sliceType.nil; + } + } else { + m.init(ncap); + if (!m.match(i, pos)) { + re.put(m); + return sliceType.nil; + } + } + if (ncap === 0) { + re.put(m); + return empty; + } + cap = $makeSlice(sliceType, m.matchcap.$length); + $copySlice(cap, m.matchcap); + re.put(m); + return cap; + }; + Regexp.prototype.doExecute = function(r, b, s, pos, ncap) { return this.$val.doExecute(r, b, s, pos, ncap); }; + onePassPrefix = function(p) { + var _tmp, _tmp$1, _tmp$10, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, buf, complete = false, i, p, pc = 0, prefix = "", x, x$1, x$2, x$3, x$4, x$5, x$6; + i = (x = p.Inst, x$1 = p.Start, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])); + if (!((i.Op === 3)) || (((((i.Arg << 24 >>> 24)) & 4) >>> 0) === 0)) { + _tmp = ""; _tmp$1 = i.Op === 4; _tmp$2 = (p.Start >>> 0); prefix = _tmp; complete = _tmp$1; pc = _tmp$2; + return [prefix, complete, pc]; + } + pc = i.Out; + i = (x$2 = p.Inst, ((pc < 0 || pc >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + pc])); + while (true) { + if (!(i.Op === 6)) { break; } + pc = i.Out; + i = (x$3 = p.Inst, ((pc < 0 || pc >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + pc])); + } + if (!((iop(i) === 7)) || !((i.Rune.$length === 1))) { + _tmp$3 = ""; _tmp$4 = i.Op === 4; _tmp$5 = (p.Start >>> 0); prefix = _tmp$3; complete = _tmp$4; pc = _tmp$5; + return [prefix, complete, pc]; + } + buf = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + while (true) { + if (!((iop(i) === 7) && (i.Rune.$length === 1) && ((((i.Arg << 16 >>> 16) & 1) >>> 0) === 0))) { break; } + buf.WriteRune((x$4 = i.Rune, ((0 < 0 || 0 >= x$4.$length) ? $throwRuntimeError("index out of range") : x$4.$array[x$4.$offset + 0]))); + _tmp$6 = i.Out; _tmp$7 = (x$5 = p.Inst, x$6 = i.Out, ((x$6 < 0 || x$6 >= x$5.$length) ? $throwRuntimeError("index out of range") : x$5.$array[x$5.$offset + x$6])); pc = _tmp$6; i = _tmp$7; + } + _tmp$8 = buf.String(); _tmp$9 = (i.Op === 3) && !((((((i.Arg << 24 >>> 24)) & 4) >>> 0) === 0)); _tmp$10 = pc; prefix = _tmp$8; complete = _tmp$9; pc = _tmp$10; + return [prefix, complete, pc]; + }; + onePassNext = function(i, r) { + var i, next, r, x; + next = i.Inst.MatchRunePos(r); + if (next >= 0) { + return (x = i.Next, ((next < 0 || next >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + next])); + } + if (i.Inst.Op === 1) { + return i.Inst.Out; + } + return 0; + }; + iop = function(i) { + var _ref, i, op; + op = i.Op; + _ref = op; + if (_ref === 8 || _ref === 9 || _ref === 10) { + op = 7; + } + return op; + }; + queueOnePass.ptr.prototype.empty = function() { + var q; + q = this; + return q.nextIndex >= q.size; + }; + queueOnePass.prototype.empty = function() { return this.$val.empty(); }; + queueOnePass.ptr.prototype.next = function() { + var n = 0, q, x, x$1; + q = this; + n = (x = q.dense, x$1 = q.nextIndex, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])); + q.nextIndex = q.nextIndex + (1) >>> 0; + return n; + }; + queueOnePass.prototype.next = function() { return this.$val.next(); }; + queueOnePass.ptr.prototype.clear = function() { + var q; + q = this; + q.size = 0; + q.nextIndex = 0; + }; + queueOnePass.prototype.clear = function() { return this.$val.clear(); }; + queueOnePass.ptr.prototype.contains = function(u) { + var q, u, x, x$1, x$2, x$3; + q = this; + if (u >= (q.sparse.$length >>> 0)) { + return false; + } + return (x = q.sparse, ((u < 0 || u >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + u])) < q.size && ((x$1 = q.dense, x$2 = (x$3 = q.sparse, ((u < 0 || u >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + u])), ((x$2 < 0 || x$2 >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + x$2])) === u); + }; + queueOnePass.prototype.contains = function(u) { return this.$val.contains(u); }; + queueOnePass.ptr.prototype.insert = function(u) { + var q, u; + q = this; + if (!q.contains(u)) { + q.insertNew(u); + } + }; + queueOnePass.prototype.insert = function(u) { return this.$val.insert(u); }; + queueOnePass.ptr.prototype.insertNew = function(u) { + var q, u, x, x$1, x$2; + q = this; + if (u >= (q.sparse.$length >>> 0)) { + return; + } + (x = q.sparse, (u < 0 || u >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + u] = q.size); + (x$1 = q.dense, x$2 = q.size, (x$2 < 0 || x$2 >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + x$2] = u); + q.size = q.size + (1) >>> 0; + }; + queueOnePass.prototype.insertNew = function(u) { return this.$val.insertNew(u); }; + newQueue = function(size) { + var q = ptrType$5.nil, size; + q = new queueOnePass.ptr($makeSlice(sliceType$2, size), $makeSlice(sliceType$2, size), 0, 0); + return q; + }; + mergeRuneSets = function(leftRunes, rightRunes, leftPC, rightPC) { + var $deferred = [], $err = null, _tmp, _tmp$1, extend, ix, leftLen, leftPC, leftRunes, lx, merged, next, ok, rightLen, rightPC, rightRunes, rx, x, x$1; + /* */ try { $deferFrames.push($deferred); + leftLen = leftRunes.$get().$length; + rightLen = rightRunes.$get().$length; + if (!(((leftLen & 1) === 0)) || !(((rightLen & 1) === 0))) { + $panic(new $String("mergeRuneSets odd length []rune")); + } + _tmp = 0; _tmp$1 = 0; lx = _tmp; rx = _tmp$1; + merged = $makeSlice(sliceType$1, 0); + next = $makeSlice(sliceType$2, 0); + ok = true; + $deferred.push([(function() { + if (!ok) { + merged = sliceType$1.nil; + next = sliceType$2.nil; + } + }), []]); + ix = -1; + extend = (function(newLow, newArray, pc) { + var newArray, newLow, pc, x, x$1, x$2, x$3, x$4, x$5; + if (ix > 0 && (x = newArray.$get(), x$1 = newLow.$get(), ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])) <= ((ix < 0 || ix >= merged.$length) ? $throwRuntimeError("index out of range") : merged.$array[merged.$offset + ix])) { + return false; + } + merged = $append(merged, (x$2 = newArray.$get(), x$3 = newLow.$get(), ((x$3 < 0 || x$3 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + x$3])), (x$4 = newArray.$get(), x$5 = newLow.$get() + 1 >> 0, ((x$5 < 0 || x$5 >= x$4.$length) ? $throwRuntimeError("index out of range") : x$4.$array[x$4.$offset + x$5]))); + newLow.$set(newLow.$get() + (2) >> 0); + ix = ix + (2) >> 0; + next = $append(next, pc); + return true; + }); + while (true) { + if (!(lx < leftLen || rx < rightLen)) { break; } + if (rx >= rightLen) { + ok = extend(new ptrType$4(function() { return lx; }, function($v) { lx = $v; }), leftRunes, leftPC); + } else if (lx >= leftLen) { + ok = extend(new ptrType$4(function() { return rx; }, function($v) { rx = $v; }), rightRunes, rightPC); + } else if ((x = rightRunes.$get(), ((rx < 0 || rx >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + rx])) < (x$1 = leftRunes.$get(), ((lx < 0 || lx >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + lx]))) { + ok = extend(new ptrType$4(function() { return rx; }, function($v) { rx = $v; }), rightRunes, rightPC); + } else { + ok = extend(new ptrType$4(function() { return lx; }, function($v) { lx = $v; }), leftRunes, leftPC); + } + if (!ok) { + return [noRune, noNext]; + } + } + return [merged, next]; + /* */ } catch(err) { $err = err; return [sliceType$1.nil, sliceType$2.nil]; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + cleanupOnePass = function(prog, original) { + var _i, _ref, _ref$1, instOriginal, ix, original, prog, x, x$1, x$2; + _ref = original.Inst; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + ix = _i; + instOriginal = $clone(((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]), syntax.Inst); + _ref$1 = instOriginal.Op; + if (_ref$1 === 0 || _ref$1 === 1 || _ref$1 === 7) { + } else if (_ref$1 === 2 || _ref$1 === 3 || _ref$1 === 6 || _ref$1 === 4 || _ref$1 === 5) { + (x = prog.Inst, ((ix < 0 || ix >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + ix])).Next = sliceType$2.nil; + } else if (_ref$1 === 8 || _ref$1 === 9 || _ref$1 === 10) { + (x$1 = prog.Inst, ((ix < 0 || ix >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + ix])).Next = sliceType$2.nil; + $copy((x$2 = prog.Inst, ((ix < 0 || ix >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + ix])), new onePassInst.ptr($clone(instOriginal, syntax.Inst), sliceType$2.nil), onePassInst); + } + _i++; + } + }; + onePassCopy = function(prog) { + var _i, _i$1, _ref, _ref$1, _ref$2, _tmp, _tmp$1, _tmp$2, _tmp$3, inst, instAlt, instOther, p, p_A_Alt, p_A_Other, p_B_Alt, p_B_Other, patch, pc, prog, x, x$1, x$10, x$11, x$12, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + p = new onePassProg.ptr(sliceType$7.nil, prog.Start, prog.NumCap); + _ref = prog.Inst; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + inst = $clone(((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]), syntax.Inst); + p.Inst = $append(p.Inst, new onePassInst.ptr($clone(inst, syntax.Inst), sliceType$2.nil)); + _i++; + } + _ref$1 = p.Inst; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + p_A_Alt = [undefined]; + pc = _i$1; + _ref$2 = (x = p.Inst, ((pc < 0 || pc >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + pc])).Inst.Op; + if (_ref$2 === 0 || _ref$2 === 1) { + p_A_Other = new ptrType$6(function() { return this.$target.Inst.Out; }, function($v) { this.$target.Inst.Out = $v; }, (x$1 = p.Inst, ((pc < 0 || pc >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + pc]))); + p_A_Alt[0] = new ptrType$6(function() { return this.$target.Inst.Arg; }, function($v) { this.$target.Inst.Arg = $v; }, (x$2 = p.Inst, ((pc < 0 || pc >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + pc]))); + instAlt = $clone((x$3 = p.Inst, x$4 = p_A_Alt[0].$get(), ((x$4 < 0 || x$4 >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + x$4])), onePassInst); + if (!((instAlt.Inst.Op === 0) || (instAlt.Inst.Op === 1))) { + _tmp = p_A_Other; _tmp$1 = p_A_Alt[0]; p_A_Alt[0] = _tmp; p_A_Other = _tmp$1; + $copy(instAlt, (x$5 = p.Inst, x$6 = p_A_Alt[0].$get(), ((x$6 < 0 || x$6 >= x$5.$length) ? $throwRuntimeError("index out of range") : x$5.$array[x$5.$offset + x$6])), onePassInst); + if (!((instAlt.Inst.Op === 0) || (instAlt.Inst.Op === 1))) { + _i$1++; + continue; + } + } + instOther = $clone((x$7 = p.Inst, x$8 = p_A_Other.$get(), ((x$8 < 0 || x$8 >= x$7.$length) ? $throwRuntimeError("index out of range") : x$7.$array[x$7.$offset + x$8])), onePassInst); + if ((instOther.Inst.Op === 0) || (instOther.Inst.Op === 1)) { + _i$1++; + continue; + } + p_B_Alt = new ptrType$6(function() { return this.$target.Inst.Out; }, function($v) { this.$target.Inst.Out = $v; }, (x$9 = p.Inst, x$10 = p_A_Alt[0].$get(), ((x$10 < 0 || x$10 >= x$9.$length) ? $throwRuntimeError("index out of range") : x$9.$array[x$9.$offset + x$10]))); + p_B_Other = new ptrType$6(function() { return this.$target.Inst.Arg; }, function($v) { this.$target.Inst.Arg = $v; }, (x$11 = p.Inst, x$12 = p_A_Alt[0].$get(), ((x$12 < 0 || x$12 >= x$11.$length) ? $throwRuntimeError("index out of range") : x$11.$array[x$11.$offset + x$12]))); + patch = false; + if (instAlt.Inst.Out === (pc >>> 0)) { + patch = true; + } else if (instAlt.Inst.Arg === (pc >>> 0)) { + patch = true; + _tmp$2 = p_B_Other; _tmp$3 = p_B_Alt; p_B_Alt = _tmp$2; p_B_Other = _tmp$3; + } + if (patch) { + p_B_Alt.$set(p_A_Other.$get()); + } + if (p_A_Other.$get() === p_B_Alt.$get()) { + p_A_Alt[0].$set(p_B_Other.$get()); + } + } else { + _i$1++; + continue; + } + _i$1++; + } + return p; + }; + runeSlice.prototype.Len = function() { + var p; + p = this; + return p.$length; + }; + $ptrType(runeSlice).prototype.Len = function() { return this.$get().Len(); }; + runeSlice.prototype.Less = function(i, j) { + var i, j, p; + p = this; + return ((i < 0 || i >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + i]) < ((j < 0 || j >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + j]); + }; + $ptrType(runeSlice).prototype.Less = function(i, j) { return this.$get().Less(i, j); }; + runeSlice.prototype.Swap = function(i, j) { + var _tmp, _tmp$1, i, j, p; + p = this; + _tmp = ((j < 0 || j >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + j]); _tmp$1 = ((i < 0 || i >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + i]); (i < 0 || i >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + i] = _tmp; (j < 0 || j >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + j] = _tmp$1; + }; + $ptrType(runeSlice).prototype.Swap = function(i, j) { return this.$get().Swap(i, j); }; + runeSlice.prototype.Sort = function() { + var p; + p = this; + sort.Sort(p); + }; + $ptrType(runeSlice).prototype.Sort = function() { return this.$get().Sort(); }; + makeOnePass = function(p) { + var _i, _ref, _ref$1, build, check, i, inst, instQueue, m, onePassRunes, p, pc, visitQueue, x, x$1; + if (p.Inst.$length >= 1000) { + return notOnePass; + } + instQueue = newQueue(p.Inst.$length); + visitQueue = newQueue(p.Inst.$length); + build = $throwNilPointerError; + check = $throwNilPointerError; + onePassRunes = $makeSlice(sliceType$8, p.Inst.$length); + build = (function(pc, q) { + var _ref, inst, pc, q, x; + if (q.contains(pc)) { + return; + } + inst = $clone((x = p.Inst, ((pc < 0 || pc >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + pc])), onePassInst); + _ref = inst.Inst.Op; + if (_ref === 0 || _ref === 1) { + q.insert(inst.Inst.Out); + build(inst.Inst.Out, q); + q.insert(inst.Inst.Arg); + } else if (_ref === 4 || _ref === 5) { + } else { + q.insert(inst.Inst.Out); + } + }); + check = (function(pc, m) { + var _entry, _entry$1, _entry$2, _entry$3, _key, _key$1, _key$2, _key$3, _key$4, _key$5, _key$6, _key$7, _q, _q$1, _q$2, _q$3, _q$4, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, i, i$1, i$2, i$3, i$4, inst, m, matchArg, matchOut, ok = false, pc, r0, r0$1, r1, r1$1, runes, runes$1, x, x$1, x$10, x$11, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + ok = true; + inst = (x = p.Inst, ((pc < 0 || pc >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + pc])); + if (visitQueue.contains(pc)) { + return ok; + } + visitQueue.insert(pc); + _ref = inst.Inst.Op; + switch (0) { default: if (_ref === 0 || _ref === 1) { + ok = check(inst.Inst.Out, m) && check(inst.Inst.Arg, m); + matchOut = (_entry = m[inst.Inst.Out], _entry !== undefined ? _entry.v : false); + matchArg = (_entry$1 = m[inst.Inst.Arg], _entry$1 !== undefined ? _entry$1.v : false); + if (matchOut && matchArg) { + ok = false; + break; + } + if (matchArg) { + _tmp = inst.Inst.Arg; _tmp$1 = inst.Inst.Out; inst.Inst.Out = _tmp; inst.Inst.Arg = _tmp$1; + _tmp$2 = matchArg; _tmp$3 = matchOut; matchOut = _tmp$2; matchArg = _tmp$3; + } + if (matchOut) { + _key = pc; (m || $throwRuntimeError("assignment to entry in nil map"))[_key] = { k: _key, v: true }; + inst.Inst.Op = 1; + } + _tuple = mergeRuneSets(new ptrType$7(function() { return (x$2 = inst.Inst.Out, ((x$2 < 0 || x$2 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + x$2])); }, function($v) { (x$1 = inst.Inst.Out, (x$1 < 0 || x$1 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + x$1] = $v); }, onePassRunes), new ptrType$7(function() { return (x$4 = inst.Inst.Arg, ((x$4 < 0 || x$4 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + x$4])); }, function($v) { (x$3 = inst.Inst.Arg, (x$3 < 0 || x$3 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + x$3] = $v); }, onePassRunes), inst.Inst.Out, inst.Inst.Arg); (pc < 0 || pc >= onePassRunes.$length) ? $throwRuntimeError("index out of range") : onePassRunes.$array[onePassRunes.$offset + pc] = _tuple[0]; inst.Next = _tuple[1]; + if (inst.Next.$length > 0 && ((x$5 = inst.Next, ((0 < 0 || 0 >= x$5.$length) ? $throwRuntimeError("index out of range") : x$5.$array[x$5.$offset + 0])) === 4294967295)) { + ok = false; + break; + } + } else if (_ref === 2 || _ref === 6) { + ok = check(inst.Inst.Out, m); + _key$1 = pc; (m || $throwRuntimeError("assignment to entry in nil map"))[_key$1] = { k: _key$1, v: (_entry$2 = m[inst.Inst.Out], _entry$2 !== undefined ? _entry$2.v : false) }; + (pc < 0 || pc >= onePassRunes.$length) ? $throwRuntimeError("index out of range") : onePassRunes.$array[onePassRunes.$offset + pc] = $appendSlice(new sliceType$1([]), (x$6 = inst.Inst.Out, ((x$6 < 0 || x$6 >= onePassRunes.$length) ? $throwRuntimeError("index out of range") : onePassRunes.$array[onePassRunes.$offset + x$6]))); + inst.Next = new sliceType$2([]); + i = (_q = ((pc < 0 || pc >= onePassRunes.$length) ? $throwRuntimeError("index out of range") : onePassRunes.$array[onePassRunes.$offset + pc]).$length / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + while (true) { + if (!(i >= 0)) { break; } + inst.Next = $append(inst.Next, inst.Inst.Out); + i = i - (1) >> 0; + } + } else if (_ref === 3) { + ok = check(inst.Inst.Out, m); + _key$2 = pc; (m || $throwRuntimeError("assignment to entry in nil map"))[_key$2] = { k: _key$2, v: (_entry$3 = m[inst.Inst.Out], _entry$3 !== undefined ? _entry$3.v : false) }; + (pc < 0 || pc >= onePassRunes.$length) ? $throwRuntimeError("index out of range") : onePassRunes.$array[onePassRunes.$offset + pc] = $appendSlice(new sliceType$1([]), (x$7 = inst.Inst.Out, ((x$7 < 0 || x$7 >= onePassRunes.$length) ? $throwRuntimeError("index out of range") : onePassRunes.$array[onePassRunes.$offset + x$7]))); + inst.Next = new sliceType$2([]); + i$1 = (_q$1 = ((pc < 0 || pc >= onePassRunes.$length) ? $throwRuntimeError("index out of range") : onePassRunes.$array[onePassRunes.$offset + pc]).$length / 2, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")); + while (true) { + if (!(i$1 >= 0)) { break; } + inst.Next = $append(inst.Next, inst.Inst.Out); + i$1 = i$1 - (1) >> 0; + } + } else if (_ref === 4 || _ref === 5) { + _key$3 = pc; (m || $throwRuntimeError("assignment to entry in nil map"))[_key$3] = { k: _key$3, v: inst.Inst.Op === 4 }; + break; + } else if (_ref === 7) { + ok = check(inst.Inst.Out, m); + _key$4 = pc; (m || $throwRuntimeError("assignment to entry in nil map"))[_key$4] = { k: _key$4, v: false }; + if (inst.Next.$length > 0) { + break; + } + if (inst.Inst.Rune.$length === 0) { + (pc < 0 || pc >= onePassRunes.$length) ? $throwRuntimeError("index out of range") : onePassRunes.$array[onePassRunes.$offset + pc] = new sliceType$1([]); + inst.Next = new sliceType$2([inst.Inst.Out]); + break; + } + runes = $makeSlice(sliceType$1, 0); + if ((inst.Inst.Rune.$length === 1) && !(((((inst.Inst.Arg << 16 >>> 16) & 1) >>> 0) === 0))) { + r0 = (x$8 = inst.Inst.Rune, ((0 < 0 || 0 >= x$8.$length) ? $throwRuntimeError("index out of range") : x$8.$array[x$8.$offset + 0])); + runes = $append(runes, r0, r0); + r1 = unicode.SimpleFold(r0); + while (true) { + if (!(!((r1 === r0)))) { break; } + runes = $append(runes, r1, r1); + r1 = unicode.SimpleFold(r1); + } + sort.Sort($subslice(new runeSlice(runes.$array), runes.$offset, runes.$offset + runes.$length)); + } else { + runes = $appendSlice(runes, inst.Inst.Rune); + } + (pc < 0 || pc >= onePassRunes.$length) ? $throwRuntimeError("index out of range") : onePassRunes.$array[onePassRunes.$offset + pc] = runes; + inst.Next = new sliceType$2([]); + i$2 = (_q$2 = ((pc < 0 || pc >= onePassRunes.$length) ? $throwRuntimeError("index out of range") : onePassRunes.$array[onePassRunes.$offset + pc]).$length / 2, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero")); + while (true) { + if (!(i$2 >= 0)) { break; } + inst.Next = $append(inst.Next, inst.Inst.Out); + i$2 = i$2 - (1) >> 0; + } + inst.Inst.Op = 7; + } else if (_ref === 8) { + ok = check(inst.Inst.Out, m); + _key$5 = pc; (m || $throwRuntimeError("assignment to entry in nil map"))[_key$5] = { k: _key$5, v: false }; + if (inst.Next.$length > 0) { + break; + } + runes$1 = new sliceType$1([]); + if (!(((((inst.Inst.Arg << 16 >>> 16) & 1) >>> 0) === 0))) { + r0$1 = (x$9 = inst.Inst.Rune, ((0 < 0 || 0 >= x$9.$length) ? $throwRuntimeError("index out of range") : x$9.$array[x$9.$offset + 0])); + runes$1 = $append(runes$1, r0$1, r0$1); + r1$1 = unicode.SimpleFold(r0$1); + while (true) { + if (!(!((r1$1 === r0$1)))) { break; } + runes$1 = $append(runes$1, r1$1, r1$1); + r1$1 = unicode.SimpleFold(r1$1); + } + sort.Sort($subslice(new runeSlice(runes$1.$array), runes$1.$offset, runes$1.$offset + runes$1.$length)); + } else { + runes$1 = $append(runes$1, (x$10 = inst.Inst.Rune, ((0 < 0 || 0 >= x$10.$length) ? $throwRuntimeError("index out of range") : x$10.$array[x$10.$offset + 0])), (x$11 = inst.Inst.Rune, ((0 < 0 || 0 >= x$11.$length) ? $throwRuntimeError("index out of range") : x$11.$array[x$11.$offset + 0]))); + } + (pc < 0 || pc >= onePassRunes.$length) ? $throwRuntimeError("index out of range") : onePassRunes.$array[onePassRunes.$offset + pc] = runes$1; + inst.Next = new sliceType$2([]); + i$3 = (_q$3 = ((pc < 0 || pc >= onePassRunes.$length) ? $throwRuntimeError("index out of range") : onePassRunes.$array[onePassRunes.$offset + pc]).$length / 2, (_q$3 === _q$3 && _q$3 !== 1/0 && _q$3 !== -1/0) ? _q$3 >> 0 : $throwRuntimeError("integer divide by zero")); + while (true) { + if (!(i$3 >= 0)) { break; } + inst.Next = $append(inst.Next, inst.Inst.Out); + i$3 = i$3 - (1) >> 0; + } + inst.Inst.Op = 7; + } else if (_ref === 9) { + ok = check(inst.Inst.Out, m); + _key$6 = pc; (m || $throwRuntimeError("assignment to entry in nil map"))[_key$6] = { k: _key$6, v: false }; + if (inst.Next.$length > 0) { + break; + } + (pc < 0 || pc >= onePassRunes.$length) ? $throwRuntimeError("index out of range") : onePassRunes.$array[onePassRunes.$offset + pc] = $appendSlice(new sliceType$1([]), anyRune); + inst.Next = new sliceType$2([inst.Inst.Out]); + } else if (_ref === 10) { + ok = check(inst.Inst.Out, m); + _key$7 = pc; (m || $throwRuntimeError("assignment to entry in nil map"))[_key$7] = { k: _key$7, v: false }; + if (inst.Next.$length > 0) { + break; + } + (pc < 0 || pc >= onePassRunes.$length) ? $throwRuntimeError("index out of range") : onePassRunes.$array[onePassRunes.$offset + pc] = $appendSlice(new sliceType$1([]), anyRuneNotNL); + inst.Next = new sliceType$2([]); + i$4 = (_q$4 = ((pc < 0 || pc >= onePassRunes.$length) ? $throwRuntimeError("index out of range") : onePassRunes.$array[onePassRunes.$offset + pc]).$length / 2, (_q$4 === _q$4 && _q$4 !== 1/0 && _q$4 !== -1/0) ? _q$4 >> 0 : $throwRuntimeError("integer divide by zero")); + while (true) { + if (!(i$4 >= 0)) { break; } + inst.Next = $append(inst.Next, inst.Inst.Out); + i$4 = i$4 - (1) >> 0; + } + } } + return ok; + }); + instQueue.clear(); + instQueue.insert((p.Start >>> 0)); + m = new $Map(); + while (true) { + if (!(!instQueue.empty())) { break; } + pc = instQueue.next(); + inst = $clone((x = p.Inst, ((pc < 0 || pc >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + pc])), onePassInst); + visitQueue.clear(); + if (!check(pc, m)) { + p = notOnePass; + break; + } + _ref = inst.Inst.Op; + if (_ref === 0 || _ref === 1) { + instQueue.insert(inst.Inst.Out); + instQueue.insert(inst.Inst.Arg); + } else if (_ref === 2 || _ref === 3 || _ref === 6) { + instQueue.insert(inst.Inst.Out); + } else if (_ref === 4) { + } else if (_ref === 5) { + } else if (_ref === 7 || _ref === 8 || _ref === 9 || _ref === 10) { + } else { + } + } + if (!(p === notOnePass)) { + _ref$1 = p.Inst; + _i = 0; + while (true) { + if (!(_i < _ref$1.$length)) { break; } + i = _i; + (x$1 = p.Inst, ((i < 0 || i >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + i])).Inst.Rune = ((i < 0 || i >= onePassRunes.$length) ? $throwRuntimeError("index out of range") : onePassRunes.$array[onePassRunes.$offset + i]); + _i++; + } + } + return p; + }; + compileOnePass = function(prog) { + var _i, _ref, _ref$1, inst, opOut, p = ptrType.nil, prog, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7; + if (prog.Start === 0) { + p = notOnePass; + return p; + } + if (!(((x = prog.Inst, x$1 = prog.Start, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])).Op === 3)) || !((((((x$2 = prog.Inst, x$3 = prog.Start, ((x$3 < 0 || x$3 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + x$3])).Arg << 24 >>> 24) & 4) >>> 0) === 4))) { + p = notOnePass; + return p; + } + _ref = prog.Inst; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + inst = $clone(((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]), syntax.Inst); + opOut = (x$4 = prog.Inst, x$5 = inst.Out, ((x$5 < 0 || x$5 >= x$4.$length) ? $throwRuntimeError("index out of range") : x$4.$array[x$4.$offset + x$5])).Op; + _ref$1 = inst.Op; + if (_ref$1 === 0 || _ref$1 === 1) { + if ((opOut === 4) || ((x$6 = prog.Inst, x$7 = inst.Arg, ((x$7 < 0 || x$7 >= x$6.$length) ? $throwRuntimeError("index out of range") : x$6.$array[x$6.$offset + x$7])).Op === 4)) { + p = notOnePass; + return p; + } + } else if (_ref$1 === 3) { + if (opOut === 4) { + if ((((inst.Arg << 24 >>> 24) & 8) >>> 0) === 8) { + _i++; + continue; + } + p = notOnePass; + return p; + } + } else { + if (opOut === 4) { + p = notOnePass; + return p; + } + } + _i++; + } + p = onePassCopy(prog); + p = makeOnePass(p); + if (!(p === notOnePass)) { + cleanupOnePass(p, prog); + } + p = p; + return p; + }; + Regexp.ptr.prototype.String = function() { + var re; + re = this; + return re.expr; + }; + Regexp.prototype.String = function() { return this.$val.String(); }; + Compile = $pkg.Compile = function(expr) { + var expr; + return compile(expr, 212, false); + }; + Regexp.ptr.prototype.Longest = function() { + var re; + re = this; + re.longest = true; + }; + Regexp.prototype.Longest = function() { return this.$val.Longest(); }; + compile = function(expr, mode, longest) { + var _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, capNames, err, expr, longest, maxCap, mode, prog, re, regexp; + _tuple = syntax.Parse(expr, mode); re = _tuple[0]; err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [ptrType$1.nil, err]; + } + maxCap = re.MaxCap(); + capNames = re.CapNames(); + re = re.Simplify(); + _tuple$1 = syntax.Compile(re); prog = _tuple$1[0]; err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [ptrType$1.nil, err]; + } + regexp = new Regexp.ptr(expr, prog, compileOnePass(prog), "", sliceType$3.nil, false, 0, 0, prog.StartCond(), maxCap, capNames, longest, new nosync.Mutex.ptr(), sliceType$10.nil); + if (regexp.onepass === notOnePass) { + _tuple$2 = prog.Prefix(); regexp.prefix = _tuple$2[0]; regexp.prefixComplete = _tuple$2[1]; + } else { + _tuple$3 = onePassPrefix(prog); regexp.prefix = _tuple$3[0]; regexp.prefixComplete = _tuple$3[1]; regexp.prefixEnd = _tuple$3[2]; + } + if (!(regexp.prefix === "")) { + regexp.prefixBytes = new sliceType$3($stringToBytes(regexp.prefix)); + _tuple$4 = utf8.DecodeRuneInString(regexp.prefix); regexp.prefixRune = _tuple$4[0]; + } + return [regexp, $ifaceNil]; + }; + Regexp.ptr.prototype.get = function() { + var n, re, x, x$1, z, z$1; + re = this; + re.mu.Lock(); + n = re.machine.$length; + if (n > 0) { + z = (x = re.machine, x$1 = n - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])); + re.machine = $subslice(re.machine, 0, (n - 1 >> 0)); + re.mu.Unlock(); + return z; + } + re.mu.Unlock(); + z$1 = progMachine(re.prog, re.onepass); + z$1.re = re; + return z$1; + }; + Regexp.prototype.get = function() { return this.$val.get(); }; + Regexp.ptr.prototype.put = function(z) { + var re, z; + re = this; + re.mu.Lock(); + re.machine = $append(re.machine, z); + re.mu.Unlock(); + }; + Regexp.prototype.put = function(z) { return this.$val.put(z); }; + MustCompile = $pkg.MustCompile = function(str) { + var _tuple, error, regexp, str; + _tuple = Compile(str); regexp = _tuple[0]; error = _tuple[1]; + if (!($interfaceIsEqual(error, $ifaceNil))) { + $panic(new $String("regexp: Compile(" + quote(str) + "): " + error.Error())); + } + return regexp; + }; + quote = function(s) { + var s; + if (strconv.CanBackquote(s)) { + return "`" + s + "`"; + } + return strconv.Quote(s); + }; + Regexp.ptr.prototype.NumSubexp = function() { + var re; + re = this; + return re.numSubexp; + }; + Regexp.prototype.NumSubexp = function() { return this.$val.NumSubexp(); }; + Regexp.ptr.prototype.SubexpNames = function() { + var re; + re = this; + return re.subexpNames; + }; + Regexp.prototype.SubexpNames = function() { return this.$val.SubexpNames(); }; + inputString.ptr.prototype.step = function(pos) { + var c, i, pos; + i = this; + if (pos < i.str.length) { + c = i.str.charCodeAt(pos); + if (c < 128) { + return [(c >> 0), 1]; + } + return utf8.DecodeRuneInString(i.str.substring(pos)); + } + return [-1, 0]; + }; + inputString.prototype.step = function(pos) { return this.$val.step(pos); }; + inputString.ptr.prototype.canCheckPrefix = function() { + var i; + i = this; + return true; + }; + inputString.prototype.canCheckPrefix = function() { return this.$val.canCheckPrefix(); }; + inputString.ptr.prototype.hasPrefix = function(re) { + var i, re; + i = this; + return strings.HasPrefix(i.str, re.prefix); + }; + inputString.prototype.hasPrefix = function(re) { return this.$val.hasPrefix(re); }; + inputString.ptr.prototype.index = function(re, pos) { + var i, pos, re; + i = this; + return strings.Index(i.str.substring(pos), re.prefix); + }; + inputString.prototype.index = function(re, pos) { return this.$val.index(re, pos); }; + inputString.ptr.prototype.context = function(pos) { + var _tmp, _tmp$1, _tuple, _tuple$1, i, pos, r1, r2; + i = this; + _tmp = -1; _tmp$1 = -1; r1 = _tmp; r2 = _tmp$1; + if (pos > 0 && pos <= i.str.length) { + _tuple = utf8.DecodeLastRuneInString(i.str.substring(0, pos)); r1 = _tuple[0]; + } + if (pos < i.str.length) { + _tuple$1 = utf8.DecodeRuneInString(i.str.substring(pos)); r2 = _tuple$1[0]; + } + return syntax.EmptyOpContext(r1, r2); + }; + inputString.prototype.context = function(pos) { return this.$val.context(pos); }; + inputBytes.ptr.prototype.step = function(pos) { + var c, i, pos, x; + i = this; + if (pos < i.str.$length) { + c = (x = i.str, ((pos < 0 || pos >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + pos])); + if (c < 128) { + return [(c >> 0), 1]; + } + return utf8.DecodeRune($subslice(i.str, pos)); + } + return [-1, 0]; + }; + inputBytes.prototype.step = function(pos) { return this.$val.step(pos); }; + inputBytes.ptr.prototype.canCheckPrefix = function() { + var i; + i = this; + return true; + }; + inputBytes.prototype.canCheckPrefix = function() { return this.$val.canCheckPrefix(); }; + inputBytes.ptr.prototype.hasPrefix = function(re) { + var i, re; + i = this; + return bytes.HasPrefix(i.str, re.prefixBytes); + }; + inputBytes.prototype.hasPrefix = function(re) { return this.$val.hasPrefix(re); }; + inputBytes.ptr.prototype.index = function(re, pos) { + var i, pos, re; + i = this; + return bytes.Index($subslice(i.str, pos), re.prefixBytes); + }; + inputBytes.prototype.index = function(re, pos) { return this.$val.index(re, pos); }; + inputBytes.ptr.prototype.context = function(pos) { + var _tmp, _tmp$1, _tuple, _tuple$1, i, pos, r1, r2; + i = this; + _tmp = -1; _tmp$1 = -1; r1 = _tmp; r2 = _tmp$1; + if (pos > 0 && pos <= i.str.$length) { + _tuple = utf8.DecodeLastRune($subslice(i.str, 0, pos)); r1 = _tuple[0]; + } + if (pos < i.str.$length) { + _tuple$1 = utf8.DecodeRune($subslice(i.str, pos)); r2 = _tuple$1[0]; + } + return syntax.EmptyOpContext(r1, r2); + }; + inputBytes.prototype.context = function(pos) { return this.$val.context(pos); }; + inputReader.ptr.prototype.step = function(pos) { + var _tuple, err, i, pos, r, w; + i = this; + if (!i.atEOT && !((pos === i.pos))) { + return [-1, 0]; + } + _tuple = i.r.ReadRune(); r = _tuple[0]; w = _tuple[1]; err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + i.atEOT = true; + return [-1, 0]; + } + i.pos = i.pos + (w) >> 0; + return [r, w]; + }; + inputReader.prototype.step = function(pos) { return this.$val.step(pos); }; + inputReader.ptr.prototype.canCheckPrefix = function() { + var i; + i = this; + return false; + }; + inputReader.prototype.canCheckPrefix = function() { return this.$val.canCheckPrefix(); }; + inputReader.ptr.prototype.hasPrefix = function(re) { + var i, re; + i = this; + return false; + }; + inputReader.prototype.hasPrefix = function(re) { return this.$val.hasPrefix(re); }; + inputReader.ptr.prototype.index = function(re, pos) { + var i, pos, re; + i = this; + return -1; + }; + inputReader.prototype.index = function(re, pos) { return this.$val.index(re, pos); }; + inputReader.ptr.prototype.context = function(pos) { + var i, pos; + i = this; + return 0; + }; + inputReader.prototype.context = function(pos) { return this.$val.context(pos); }; + Regexp.ptr.prototype.LiteralPrefix = function() { + var _tmp, _tmp$1, complete = false, prefix = "", re; + re = this; + _tmp = re.prefix; _tmp$1 = re.prefixComplete; prefix = _tmp; complete = _tmp$1; + return [prefix, complete]; + }; + Regexp.prototype.LiteralPrefix = function() { return this.$val.LiteralPrefix(); }; + Regexp.ptr.prototype.MatchReader = function(r) { + var r, re; + re = this; + return !(re.doExecute(r, sliceType$3.nil, "", 0, 0) === sliceType.nil); + }; + Regexp.prototype.MatchReader = function(r) { return this.$val.MatchReader(r); }; + Regexp.ptr.prototype.MatchString = function(s) { + var re, s; + re = this; + return !(re.doExecute($ifaceNil, sliceType$3.nil, s, 0, 0) === sliceType.nil); + }; + Regexp.prototype.MatchString = function(s) { return this.$val.MatchString(s); }; + Regexp.ptr.prototype.Match = function(b) { + var b, re; + re = this; + return !(re.doExecute($ifaceNil, b, "", 0, 0) === sliceType.nil); + }; + Regexp.prototype.Match = function(b) { return this.$val.Match(b); }; + Regexp.ptr.prototype.ReplaceAllString = function(src, repl) { + var b, n, re, repl, src; + re = this; + n = 2; + if (strings.Index(repl, "$") >= 0) { + n = 2 * ((re.numSubexp + 1 >> 0)) >> 0; + } + b = re.replaceAll(sliceType$3.nil, src, n, (function(dst, match) { + var dst, match; + return re.expand(dst, repl, sliceType$3.nil, src, match); + })); + return $bytesToString(b); + }; + Regexp.prototype.ReplaceAllString = function(src, repl) { return this.$val.ReplaceAllString(src, repl); }; + Regexp.ptr.prototype.ReplaceAllLiteralString = function(src, repl) { + var re, repl, src; + re = this; + return $bytesToString(re.replaceAll(sliceType$3.nil, src, 2, (function(dst, match) { + var dst, match; + return $appendSlice(dst, new sliceType$3($stringToBytes(repl))); + }))); + }; + Regexp.prototype.ReplaceAllLiteralString = function(src, repl) { return this.$val.ReplaceAllLiteralString(src, repl); }; + Regexp.ptr.prototype.ReplaceAllStringFunc = function(src, repl) { + var b, re, repl, src; + re = this; + b = re.replaceAll(sliceType$3.nil, src, 2, (function(dst, match) { + var dst, match; + return $appendSlice(dst, new sliceType$3($stringToBytes(repl(src.substring(((0 < 0 || 0 >= match.$length) ? $throwRuntimeError("index out of range") : match.$array[match.$offset + 0]), ((1 < 0 || 1 >= match.$length) ? $throwRuntimeError("index out of range") : match.$array[match.$offset + 1])))))); + })); + return $bytesToString(b); + }; + Regexp.prototype.ReplaceAllStringFunc = function(src, repl) { return this.$val.ReplaceAllStringFunc(src, repl); }; + Regexp.ptr.prototype.replaceAll = function(bsrc, src, nmatch, repl) { + var _tuple, _tuple$1, a, bsrc, buf, endPos, lastMatchEnd, nmatch, re, repl, searchPos, src, width; + re = this; + lastMatchEnd = 0; + searchPos = 0; + buf = sliceType$3.nil; + endPos = 0; + if (!(bsrc === sliceType$3.nil)) { + endPos = bsrc.$length; + } else { + endPos = src.length; + } + while (true) { + if (!(searchPos <= endPos)) { break; } + a = re.doExecute($ifaceNil, bsrc, src, searchPos, nmatch); + if (a.$length === 0) { + break; + } + if (!(bsrc === sliceType$3.nil)) { + buf = $appendSlice(buf, $subslice(bsrc, lastMatchEnd, ((0 < 0 || 0 >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + 0]))); + } else { + buf = $appendSlice(buf, new sliceType$3($stringToBytes(src.substring(lastMatchEnd, ((0 < 0 || 0 >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + 0]))))); + } + if (((1 < 0 || 1 >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + 1]) > lastMatchEnd || (((0 < 0 || 0 >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + 0]) === 0)) { + buf = repl(buf, a); + } + lastMatchEnd = ((1 < 0 || 1 >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + 1]); + width = 0; + if (!(bsrc === sliceType$3.nil)) { + _tuple = utf8.DecodeRune($subslice(bsrc, searchPos)); width = _tuple[1]; + } else { + _tuple$1 = utf8.DecodeRuneInString(src.substring(searchPos)); width = _tuple$1[1]; + } + if ((searchPos + width >> 0) > ((1 < 0 || 1 >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + 1])) { + searchPos = searchPos + (width) >> 0; + } else if ((searchPos + 1 >> 0) > ((1 < 0 || 1 >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + 1])) { + searchPos = searchPos + (1) >> 0; + } else { + searchPos = ((1 < 0 || 1 >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + 1]); + } + } + if (!(bsrc === sliceType$3.nil)) { + buf = $appendSlice(buf, $subslice(bsrc, lastMatchEnd)); + } else { + buf = $appendSlice(buf, new sliceType$3($stringToBytes(src.substring(lastMatchEnd)))); + } + return buf; + }; + Regexp.prototype.replaceAll = function(bsrc, src, nmatch, repl) { return this.$val.replaceAll(bsrc, src, nmatch, repl); }; + Regexp.ptr.prototype.ReplaceAll = function(src, repl) { + var b, n, re, repl, src, srepl; + re = this; + n = 2; + if (bytes.IndexByte(repl, 36) >= 0) { + n = 2 * ((re.numSubexp + 1 >> 0)) >> 0; + } + srepl = ""; + b = re.replaceAll(src, "", n, (function(dst, match) { + var dst, match; + if (!((srepl.length === repl.$length))) { + srepl = $bytesToString(repl); + } + return re.expand(dst, srepl, src, "", match); + })); + return b; + }; + Regexp.prototype.ReplaceAll = function(src, repl) { return this.$val.ReplaceAll(src, repl); }; + Regexp.ptr.prototype.ReplaceAllLiteral = function(src, repl) { + var re, repl, src; + re = this; + return re.replaceAll(src, "", 2, (function(dst, match) { + var dst, match; + return $appendSlice(dst, repl); + })); + }; + Regexp.prototype.ReplaceAllLiteral = function(src, repl) { return this.$val.ReplaceAllLiteral(src, repl); }; + Regexp.ptr.prototype.ReplaceAllFunc = function(src, repl) { + var re, repl, src; + re = this; + return re.replaceAll(src, "", 2, (function(dst, match) { + var dst, match; + return $appendSlice(dst, repl($subslice(src, ((0 < 0 || 0 >= match.$length) ? $throwRuntimeError("index out of range") : match.$array[match.$offset + 0]), ((1 < 0 || 1 >= match.$length) ? $throwRuntimeError("index out of range") : match.$array[match.$offset + 1])))); + })); + }; + Regexp.prototype.ReplaceAllFunc = function(src, repl) { return this.$val.ReplaceAllFunc(src, repl); }; + Regexp.ptr.prototype.pad = function(a) { + var a, n, re; + re = this; + if (a === sliceType.nil) { + return sliceType.nil; + } + n = ((1 + re.numSubexp >> 0)) * 2 >> 0; + while (true) { + if (!(a.$length < n)) { break; } + a = $append(a, -1); + } + return a; + }; + Regexp.prototype.pad = function(a) { return this.$val.pad(a); }; + Regexp.ptr.prototype.allMatches = function(s, b, n, deliver) { + var _tmp, _tmp$1, _tmp$2, _tuple, _tuple$1, accept, b, deliver, end, i, matches, n, pos, prevMatchEnd, re, s, width; + re = this; + end = 0; + if (b === sliceType$3.nil) { + end = s.length; + } else { + end = b.$length; + } + _tmp = 0; _tmp$1 = 0; _tmp$2 = -1; pos = _tmp; i = _tmp$1; prevMatchEnd = _tmp$2; + while (true) { + if (!(i < n && pos <= end)) { break; } + matches = re.doExecute($ifaceNil, b, s, pos, re.prog.NumCap); + if (matches.$length === 0) { + break; + } + accept = true; + if (((1 < 0 || 1 >= matches.$length) ? $throwRuntimeError("index out of range") : matches.$array[matches.$offset + 1]) === pos) { + if (((0 < 0 || 0 >= matches.$length) ? $throwRuntimeError("index out of range") : matches.$array[matches.$offset + 0]) === prevMatchEnd) { + accept = false; + } + width = 0; + if (b === sliceType$3.nil) { + _tuple = utf8.DecodeRuneInString(s.substring(pos, end)); width = _tuple[1]; + } else { + _tuple$1 = utf8.DecodeRune($subslice(b, pos, end)); width = _tuple$1[1]; + } + if (width > 0) { + pos = pos + (width) >> 0; + } else { + pos = end + 1 >> 0; + } + } else { + pos = ((1 < 0 || 1 >= matches.$length) ? $throwRuntimeError("index out of range") : matches.$array[matches.$offset + 1]); + } + prevMatchEnd = ((1 < 0 || 1 >= matches.$length) ? $throwRuntimeError("index out of range") : matches.$array[matches.$offset + 1]); + if (accept) { + deliver(re.pad(matches)); + i = i + (1) >> 0; + } + } + }; + Regexp.prototype.allMatches = function(s, b, n, deliver) { return this.$val.allMatches(s, b, n, deliver); }; + Regexp.ptr.prototype.Find = function(b) { + var a, b, re; + re = this; + a = re.doExecute($ifaceNil, b, "", 0, 2); + if (a === sliceType.nil) { + return sliceType$3.nil; + } + return $subslice(b, ((0 < 0 || 0 >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + 0]), ((1 < 0 || 1 >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + 1])); + }; + Regexp.prototype.Find = function(b) { return this.$val.Find(b); }; + Regexp.ptr.prototype.FindIndex = function(b) { + var a, b, loc = sliceType.nil, re; + re = this; + a = re.doExecute($ifaceNil, b, "", 0, 2); + if (a === sliceType.nil) { + loc = sliceType.nil; + return loc; + } + loc = $subslice(a, 0, 2); + return loc; + }; + Regexp.prototype.FindIndex = function(b) { return this.$val.FindIndex(b); }; + Regexp.ptr.prototype.FindString = function(s) { + var a, re, s; + re = this; + a = re.doExecute($ifaceNil, sliceType$3.nil, s, 0, 2); + if (a === sliceType.nil) { + return ""; + } + return s.substring(((0 < 0 || 0 >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + 0]), ((1 < 0 || 1 >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + 1])); + }; + Regexp.prototype.FindString = function(s) { return this.$val.FindString(s); }; + Regexp.ptr.prototype.FindStringIndex = function(s) { + var a, loc = sliceType.nil, re, s; + re = this; + a = re.doExecute($ifaceNil, sliceType$3.nil, s, 0, 2); + if (a === sliceType.nil) { + loc = sliceType.nil; + return loc; + } + loc = $subslice(a, 0, 2); + return loc; + }; + Regexp.prototype.FindStringIndex = function(s) { return this.$val.FindStringIndex(s); }; + Regexp.ptr.prototype.FindReaderIndex = function(r) { + var a, loc = sliceType.nil, r, re; + re = this; + a = re.doExecute(r, sliceType$3.nil, "", 0, 2); + if (a === sliceType.nil) { + loc = sliceType.nil; + return loc; + } + loc = $subslice(a, 0, 2); + return loc; + }; + Regexp.prototype.FindReaderIndex = function(r) { return this.$val.FindReaderIndex(r); }; + Regexp.ptr.prototype.FindSubmatch = function(b) { + var _i, _ref, a, b, i, re, ret, x, x$1, x$2; + re = this; + a = re.doExecute($ifaceNil, b, "", 0, re.prog.NumCap); + if (a === sliceType.nil) { + return sliceType$11.nil; + } + ret = $makeSlice(sliceType$11, (1 + re.numSubexp >> 0)); + _ref = ret; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + if ((2 * i >> 0) < a.$length && (x = 2 * i >> 0, ((x < 0 || x >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + x])) >= 0) { + (i < 0 || i >= ret.$length) ? $throwRuntimeError("index out of range") : ret.$array[ret.$offset + i] = $subslice(b, (x$1 = 2 * i >> 0, ((x$1 < 0 || x$1 >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + x$1])), (x$2 = (2 * i >> 0) + 1 >> 0, ((x$2 < 0 || x$2 >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + x$2]))); + } + _i++; + } + return ret; + }; + Regexp.prototype.FindSubmatch = function(b) { return this.$val.FindSubmatch(b); }; + Regexp.ptr.prototype.Expand = function(dst, template, src, match) { + var dst, match, re, src, template; + re = this; + return re.expand(dst, $bytesToString(template), src, "", match); + }; + Regexp.prototype.Expand = function(dst, template, src, match) { return this.$val.Expand(dst, template, src, match); }; + Regexp.ptr.prototype.ExpandString = function(dst, template, src, match) { + var dst, match, re, src, template; + re = this; + return re.expand(dst, template, sliceType$3.nil, src, match); + }; + Regexp.prototype.ExpandString = function(dst, template, src, match) { return this.$val.ExpandString(dst, template, src, match); }; + Regexp.ptr.prototype.expand = function(dst, template, bsrc, src, match) { + var _i, _ref, _tuple, bsrc, dst, i, i$1, match, name, namei, num, ok, re, rest, src, template, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + re = this; + while (true) { + if (!(template.length > 0)) { break; } + i = strings.Index(template, "$"); + if (i < 0) { + break; + } + dst = $appendSlice(dst, new sliceType$3($stringToBytes(template.substring(0, i)))); + template = template.substring(i); + if (template.length > 1 && (template.charCodeAt(1) === 36)) { + dst = $append(dst, 36); + template = template.substring(2); + continue; + } + _tuple = extract(template); name = _tuple[0]; num = _tuple[1]; rest = _tuple[2]; ok = _tuple[3]; + if (!ok) { + dst = $append(dst, 36); + template = template.substring(1); + continue; + } + template = rest; + if (num >= 0) { + if (((2 * num >> 0) + 1 >> 0) < match.$length && (x = 2 * num >> 0, ((x < 0 || x >= match.$length) ? $throwRuntimeError("index out of range") : match.$array[match.$offset + x])) >= 0) { + if (!(bsrc === sliceType$3.nil)) { + dst = $appendSlice(dst, $subslice(bsrc, (x$1 = 2 * num >> 0, ((x$1 < 0 || x$1 >= match.$length) ? $throwRuntimeError("index out of range") : match.$array[match.$offset + x$1])), (x$2 = (2 * num >> 0) + 1 >> 0, ((x$2 < 0 || x$2 >= match.$length) ? $throwRuntimeError("index out of range") : match.$array[match.$offset + x$2])))); + } else { + dst = $appendSlice(dst, new sliceType$3($stringToBytes(src.substring((x$3 = 2 * num >> 0, ((x$3 < 0 || x$3 >= match.$length) ? $throwRuntimeError("index out of range") : match.$array[match.$offset + x$3])), (x$4 = (2 * num >> 0) + 1 >> 0, ((x$4 < 0 || x$4 >= match.$length) ? $throwRuntimeError("index out of range") : match.$array[match.$offset + x$4])))))); + } + } + } else { + _ref = re.subexpNames; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i$1 = _i; + namei = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (name === namei && ((2 * i$1 >> 0) + 1 >> 0) < match.$length && (x$5 = 2 * i$1 >> 0, ((x$5 < 0 || x$5 >= match.$length) ? $throwRuntimeError("index out of range") : match.$array[match.$offset + x$5])) >= 0) { + if (!(bsrc === sliceType$3.nil)) { + dst = $appendSlice(dst, $subslice(bsrc, (x$6 = 2 * i$1 >> 0, ((x$6 < 0 || x$6 >= match.$length) ? $throwRuntimeError("index out of range") : match.$array[match.$offset + x$6])), (x$7 = (2 * i$1 >> 0) + 1 >> 0, ((x$7 < 0 || x$7 >= match.$length) ? $throwRuntimeError("index out of range") : match.$array[match.$offset + x$7])))); + } else { + dst = $appendSlice(dst, new sliceType$3($stringToBytes(src.substring((x$8 = 2 * i$1 >> 0, ((x$8 < 0 || x$8 >= match.$length) ? $throwRuntimeError("index out of range") : match.$array[match.$offset + x$8])), (x$9 = (2 * i$1 >> 0) + 1 >> 0, ((x$9 < 0 || x$9 >= match.$length) ? $throwRuntimeError("index out of range") : match.$array[match.$offset + x$9])))))); + } + break; + } + _i++; + } + } + } + dst = $appendSlice(dst, new sliceType$3($stringToBytes(template))); + return dst; + }; + Regexp.prototype.expand = function(dst, template, bsrc, src, match) { return this.$val.expand(dst, template, bsrc, src, match); }; + extract = function(str) { + var _tuple, brace, i, i$1, name = "", num = 0, ok = false, rest = "", rune, size, str; + if (str.length < 2 || !((str.charCodeAt(0) === 36))) { + return [name, num, rest, ok]; + } + brace = false; + if (str.charCodeAt(1) === 123) { + brace = true; + str = str.substring(2); + } else { + str = str.substring(1); + } + i = 0; + while (true) { + if (!(i < str.length)) { break; } + _tuple = utf8.DecodeRuneInString(str.substring(i)); rune = _tuple[0]; size = _tuple[1]; + if (!unicode.IsLetter(rune) && !unicode.IsDigit(rune) && !((rune === 95))) { + break; + } + i = i + (size) >> 0; + } + if (i === 0) { + return [name, num, rest, ok]; + } + name = str.substring(0, i); + if (brace) { + if (i >= str.length || !((str.charCodeAt(i) === 125))) { + return [name, num, rest, ok]; + } + i = i + (1) >> 0; + } + num = 0; + i$1 = 0; + while (true) { + if (!(i$1 < name.length)) { break; } + if (name.charCodeAt(i$1) < 48 || 57 < name.charCodeAt(i$1) || num >= 100000000) { + num = -1; + break; + } + num = ((num * 10 >> 0) + (name.charCodeAt(i$1) >> 0) >> 0) - 48 >> 0; + i$1 = i$1 + (1) >> 0; + } + if ((name.charCodeAt(0) === 48) && name.length > 1) { + num = -1; + } + rest = str.substring(i); + ok = true; + return [name, num, rest, ok]; + }; + Regexp.ptr.prototype.FindSubmatchIndex = function(b) { + var b, re; + re = this; + return re.pad(re.doExecute($ifaceNil, b, "", 0, re.prog.NumCap)); + }; + Regexp.prototype.FindSubmatchIndex = function(b) { return this.$val.FindSubmatchIndex(b); }; + Regexp.ptr.prototype.FindStringSubmatch = function(s) { + var _i, _ref, a, i, re, ret, s, x, x$1, x$2; + re = this; + a = re.doExecute($ifaceNil, sliceType$3.nil, s, 0, re.prog.NumCap); + if (a === sliceType.nil) { + return sliceType$9.nil; + } + ret = $makeSlice(sliceType$9, (1 + re.numSubexp >> 0)); + _ref = ret; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + if ((2 * i >> 0) < a.$length && (x = 2 * i >> 0, ((x < 0 || x >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + x])) >= 0) { + (i < 0 || i >= ret.$length) ? $throwRuntimeError("index out of range") : ret.$array[ret.$offset + i] = s.substring((x$1 = 2 * i >> 0, ((x$1 < 0 || x$1 >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + x$1])), (x$2 = (2 * i >> 0) + 1 >> 0, ((x$2 < 0 || x$2 >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + x$2]))); + } + _i++; + } + return ret; + }; + Regexp.prototype.FindStringSubmatch = function(s) { return this.$val.FindStringSubmatch(s); }; + Regexp.ptr.prototype.FindStringSubmatchIndex = function(s) { + var re, s; + re = this; + return re.pad(re.doExecute($ifaceNil, sliceType$3.nil, s, 0, re.prog.NumCap)); + }; + Regexp.prototype.FindStringSubmatchIndex = function(s) { return this.$val.FindStringSubmatchIndex(s); }; + Regexp.ptr.prototype.FindReaderSubmatchIndex = function(r) { + var r, re; + re = this; + return re.pad(re.doExecute(r, sliceType$3.nil, "", 0, re.prog.NumCap)); + }; + Regexp.prototype.FindReaderSubmatchIndex = function(r) { return this.$val.FindReaderSubmatchIndex(r); }; + Regexp.ptr.prototype.FindAll = function(b, n) { + var b, n, re, result; + re = this; + if (n < 0) { + n = b.$length + 1 >> 0; + } + result = $makeSlice(sliceType$11, 0, 10); + re.allMatches("", b, n, (function(match) { + var match; + result = $append(result, $subslice(b, ((0 < 0 || 0 >= match.$length) ? $throwRuntimeError("index out of range") : match.$array[match.$offset + 0]), ((1 < 0 || 1 >= match.$length) ? $throwRuntimeError("index out of range") : match.$array[match.$offset + 1]))); + })); + if (result.$length === 0) { + return sliceType$11.nil; + } + return result; + }; + Regexp.prototype.FindAll = function(b, n) { return this.$val.FindAll(b, n); }; + Regexp.ptr.prototype.FindAllIndex = function(b, n) { + var b, n, re, result; + re = this; + if (n < 0) { + n = b.$length + 1 >> 0; + } + result = $makeSlice(sliceType$12, 0, 10); + re.allMatches("", b, n, (function(match) { + var match; + result = $append(result, $subslice(match, 0, 2)); + })); + if (result.$length === 0) { + return sliceType$12.nil; + } + return result; + }; + Regexp.prototype.FindAllIndex = function(b, n) { return this.$val.FindAllIndex(b, n); }; + Regexp.ptr.prototype.FindAllString = function(s, n) { + var n, re, result, s; + re = this; + if (n < 0) { + n = s.length + 1 >> 0; + } + result = $makeSlice(sliceType$9, 0, 10); + re.allMatches(s, sliceType$3.nil, n, (function(match) { + var match; + result = $append(result, s.substring(((0 < 0 || 0 >= match.$length) ? $throwRuntimeError("index out of range") : match.$array[match.$offset + 0]), ((1 < 0 || 1 >= match.$length) ? $throwRuntimeError("index out of range") : match.$array[match.$offset + 1]))); + })); + if (result.$length === 0) { + return sliceType$9.nil; + } + return result; + }; + Regexp.prototype.FindAllString = function(s, n) { return this.$val.FindAllString(s, n); }; + Regexp.ptr.prototype.FindAllStringIndex = function(s, n) { + var n, re, result, s; + re = this; + if (n < 0) { + n = s.length + 1 >> 0; + } + result = $makeSlice(sliceType$12, 0, 10); + re.allMatches(s, sliceType$3.nil, n, (function(match) { + var match; + result = $append(result, $subslice(match, 0, 2)); + })); + if (result.$length === 0) { + return sliceType$12.nil; + } + return result; + }; + Regexp.prototype.FindAllStringIndex = function(s, n) { return this.$val.FindAllStringIndex(s, n); }; + Regexp.ptr.prototype.FindAllSubmatch = function(b, n) { + var b, n, re, result; + re = this; + if (n < 0) { + n = b.$length + 1 >> 0; + } + result = $makeSlice(sliceType$13, 0, 10); + re.allMatches("", b, n, (function(match) { + var _i, _q, _ref, j, match, slice, x, x$1, x$2; + slice = $makeSlice(sliceType$11, (_q = match.$length / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))); + _ref = slice; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + j = _i; + if ((x = 2 * j >> 0, ((x < 0 || x >= match.$length) ? $throwRuntimeError("index out of range") : match.$array[match.$offset + x])) >= 0) { + (j < 0 || j >= slice.$length) ? $throwRuntimeError("index out of range") : slice.$array[slice.$offset + j] = $subslice(b, (x$1 = 2 * j >> 0, ((x$1 < 0 || x$1 >= match.$length) ? $throwRuntimeError("index out of range") : match.$array[match.$offset + x$1])), (x$2 = (2 * j >> 0) + 1 >> 0, ((x$2 < 0 || x$2 >= match.$length) ? $throwRuntimeError("index out of range") : match.$array[match.$offset + x$2]))); + } + _i++; + } + result = $append(result, slice); + })); + if (result.$length === 0) { + return sliceType$13.nil; + } + return result; + }; + Regexp.prototype.FindAllSubmatch = function(b, n) { return this.$val.FindAllSubmatch(b, n); }; + Regexp.ptr.prototype.FindAllSubmatchIndex = function(b, n) { + var b, n, re, result; + re = this; + if (n < 0) { + n = b.$length + 1 >> 0; + } + result = $makeSlice(sliceType$12, 0, 10); + re.allMatches("", b, n, (function(match) { + var match; + result = $append(result, match); + })); + if (result.$length === 0) { + return sliceType$12.nil; + } + return result; + }; + Regexp.prototype.FindAllSubmatchIndex = function(b, n) { return this.$val.FindAllSubmatchIndex(b, n); }; + Regexp.ptr.prototype.FindAllStringSubmatch = function(s, n) { + var n, re, result, s; + re = this; + if (n < 0) { + n = s.length + 1 >> 0; + } + result = $makeSlice(sliceType$14, 0, 10); + re.allMatches(s, sliceType$3.nil, n, (function(match) { + var _i, _q, _ref, j, match, slice, x, x$1, x$2; + slice = $makeSlice(sliceType$9, (_q = match.$length / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))); + _ref = slice; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + j = _i; + if ((x = 2 * j >> 0, ((x < 0 || x >= match.$length) ? $throwRuntimeError("index out of range") : match.$array[match.$offset + x])) >= 0) { + (j < 0 || j >= slice.$length) ? $throwRuntimeError("index out of range") : slice.$array[slice.$offset + j] = s.substring((x$1 = 2 * j >> 0, ((x$1 < 0 || x$1 >= match.$length) ? $throwRuntimeError("index out of range") : match.$array[match.$offset + x$1])), (x$2 = (2 * j >> 0) + 1 >> 0, ((x$2 < 0 || x$2 >= match.$length) ? $throwRuntimeError("index out of range") : match.$array[match.$offset + x$2]))); + } + _i++; + } + result = $append(result, slice); + })); + if (result.$length === 0) { + return sliceType$14.nil; + } + return result; + }; + Regexp.prototype.FindAllStringSubmatch = function(s, n) { return this.$val.FindAllStringSubmatch(s, n); }; + Regexp.ptr.prototype.FindAllStringSubmatchIndex = function(s, n) { + var n, re, result, s; + re = this; + if (n < 0) { + n = s.length + 1 >> 0; + } + result = $makeSlice(sliceType$12, 0, 10); + re.allMatches(s, sliceType$3.nil, n, (function(match) { + var match; + result = $append(result, match); + })); + if (result.$length === 0) { + return sliceType$12.nil; + } + return result; + }; + Regexp.prototype.FindAllStringSubmatchIndex = function(s, n) { return this.$val.FindAllStringSubmatchIndex(s, n); }; + Regexp.ptr.prototype.Split = function(s, n) { + var _i, _ref, beg, end, match, matches, n, re, s, strings$1; + re = this; + if (n === 0) { + return sliceType$9.nil; + } + if (re.expr.length > 0 && (s.length === 0)) { + return new sliceType$9([""]); + } + matches = re.FindAllStringIndex(s, n); + strings$1 = $makeSlice(sliceType$9, 0, matches.$length); + beg = 0; + end = 0; + _ref = matches; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + match = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (n > 0 && strings$1.$length >= (n - 1 >> 0)) { + break; + } + end = ((0 < 0 || 0 >= match.$length) ? $throwRuntimeError("index out of range") : match.$array[match.$offset + 0]); + if (!((((1 < 0 || 1 >= match.$length) ? $throwRuntimeError("index out of range") : match.$array[match.$offset + 1]) === 0))) { + strings$1 = $append(strings$1, s.substring(beg, end)); + } + beg = ((1 < 0 || 1 >= match.$length) ? $throwRuntimeError("index out of range") : match.$array[match.$offset + 1]); + _i++; + } + if (!((end === s.length))) { + strings$1 = $append(strings$1, s.substring(beg)); + } + return strings$1; + }; + Regexp.prototype.Split = function(s, n) { return this.$val.Split(s, n); }; + ptrType$8.methods = [{prop: "newInputBytes", name: "newInputBytes", pkg: "regexp", typ: $funcType([sliceType$3], [input], false)}, {prop: "newInputString", name: "newInputString", pkg: "regexp", typ: $funcType([$String], [input], false)}, {prop: "newInputReader", name: "newInputReader", pkg: "regexp", typ: $funcType([io.RuneReader], [input], false)}, {prop: "init", name: "init", pkg: "regexp", typ: $funcType([$Int], [], false)}, {prop: "alloc", name: "alloc", pkg: "regexp", typ: $funcType([ptrType$9], [ptrType$3], false)}, {prop: "free", name: "free", pkg: "regexp", typ: $funcType([ptrType$3], [], false)}, {prop: "match", name: "match", pkg: "regexp", typ: $funcType([input, $Int], [$Bool], false)}, {prop: "clear", name: "clear", pkg: "regexp", typ: $funcType([ptrType$10], [], false)}, {prop: "step", name: "step", pkg: "regexp", typ: $funcType([ptrType$10, ptrType$10, $Int, $Int, $Int32, syntax.EmptyOp], [], false)}, {prop: "add", name: "add", pkg: "regexp", typ: $funcType([ptrType$10, $Uint32, $Int, sliceType, syntax.EmptyOp, ptrType$3], [ptrType$3], false)}, {prop: "onepass", name: "onepass", pkg: "regexp", typ: $funcType([input, $Int], [$Bool], false)}]; + ptrType$5.methods = [{prop: "empty", name: "empty", pkg: "regexp", typ: $funcType([], [$Bool], false)}, {prop: "next", name: "next", pkg: "regexp", typ: $funcType([], [$Uint32], false)}, {prop: "clear", name: "clear", pkg: "regexp", typ: $funcType([], [], false)}, {prop: "reset", name: "reset", pkg: "regexp", typ: $funcType([], [], false)}, {prop: "contains", name: "contains", pkg: "regexp", typ: $funcType([$Uint32], [$Bool], false)}, {prop: "insert", name: "insert", pkg: "regexp", typ: $funcType([$Uint32], [], false)}, {prop: "insertNew", name: "insertNew", pkg: "regexp", typ: $funcType([$Uint32], [], false)}]; + runeSlice.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}, {prop: "Sort", name: "Sort", pkg: "", typ: $funcType([], [], false)}]; + ptrType$1.methods = [{prop: "doExecute", name: "doExecute", pkg: "regexp", typ: $funcType([io.RuneReader, sliceType$3, $String, $Int, $Int], [sliceType], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Longest", name: "Longest", pkg: "", typ: $funcType([], [], false)}, {prop: "get", name: "get", pkg: "regexp", typ: $funcType([], [ptrType$8], false)}, {prop: "put", name: "put", pkg: "regexp", typ: $funcType([ptrType$8], [], false)}, {prop: "NumSubexp", name: "NumSubexp", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "SubexpNames", name: "SubexpNames", pkg: "", typ: $funcType([], [sliceType$9], false)}, {prop: "LiteralPrefix", name: "LiteralPrefix", pkg: "", typ: $funcType([], [$String, $Bool], false)}, {prop: "MatchReader", name: "MatchReader", pkg: "", typ: $funcType([io.RuneReader], [$Bool], false)}, {prop: "MatchString", name: "MatchString", pkg: "", typ: $funcType([$String], [$Bool], false)}, {prop: "Match", name: "Match", pkg: "", typ: $funcType([sliceType$3], [$Bool], false)}, {prop: "ReplaceAllString", name: "ReplaceAllString", pkg: "", typ: $funcType([$String, $String], [$String], false)}, {prop: "ReplaceAllLiteralString", name: "ReplaceAllLiteralString", pkg: "", typ: $funcType([$String, $String], [$String], false)}, {prop: "ReplaceAllStringFunc", name: "ReplaceAllStringFunc", pkg: "", typ: $funcType([$String, funcType], [$String], false)}, {prop: "replaceAll", name: "replaceAll", pkg: "regexp", typ: $funcType([sliceType$3, $String, $Int, funcType$1], [sliceType$3], false)}, {prop: "ReplaceAll", name: "ReplaceAll", pkg: "", typ: $funcType([sliceType$3, sliceType$3], [sliceType$3], false)}, {prop: "ReplaceAllLiteral", name: "ReplaceAllLiteral", pkg: "", typ: $funcType([sliceType$3, sliceType$3], [sliceType$3], false)}, {prop: "ReplaceAllFunc", name: "ReplaceAllFunc", pkg: "", typ: $funcType([sliceType$3, funcType$2], [sliceType$3], false)}, {prop: "pad", name: "pad", pkg: "regexp", typ: $funcType([sliceType], [sliceType], false)}, {prop: "allMatches", name: "allMatches", pkg: "regexp", typ: $funcType([$String, sliceType$3, $Int, funcType$3], [], false)}, {prop: "Find", name: "Find", pkg: "", typ: $funcType([sliceType$3], [sliceType$3], false)}, {prop: "FindIndex", name: "FindIndex", pkg: "", typ: $funcType([sliceType$3], [sliceType], false)}, {prop: "FindString", name: "FindString", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "FindStringIndex", name: "FindStringIndex", pkg: "", typ: $funcType([$String], [sliceType], false)}, {prop: "FindReaderIndex", name: "FindReaderIndex", pkg: "", typ: $funcType([io.RuneReader], [sliceType], false)}, {prop: "FindSubmatch", name: "FindSubmatch", pkg: "", typ: $funcType([sliceType$3], [sliceType$11], false)}, {prop: "Expand", name: "Expand", pkg: "", typ: $funcType([sliceType$3, sliceType$3, sliceType$3, sliceType], [sliceType$3], false)}, {prop: "ExpandString", name: "ExpandString", pkg: "", typ: $funcType([sliceType$3, $String, $String, sliceType], [sliceType$3], false)}, {prop: "expand", name: "expand", pkg: "regexp", typ: $funcType([sliceType$3, $String, sliceType$3, $String, sliceType], [sliceType$3], false)}, {prop: "FindSubmatchIndex", name: "FindSubmatchIndex", pkg: "", typ: $funcType([sliceType$3], [sliceType], false)}, {prop: "FindStringSubmatch", name: "FindStringSubmatch", pkg: "", typ: $funcType([$String], [sliceType$9], false)}, {prop: "FindStringSubmatchIndex", name: "FindStringSubmatchIndex", pkg: "", typ: $funcType([$String], [sliceType], false)}, {prop: "FindReaderSubmatchIndex", name: "FindReaderSubmatchIndex", pkg: "", typ: $funcType([io.RuneReader], [sliceType], false)}, {prop: "FindAll", name: "FindAll", pkg: "", typ: $funcType([sliceType$3, $Int], [sliceType$11], false)}, {prop: "FindAllIndex", name: "FindAllIndex", pkg: "", typ: $funcType([sliceType$3, $Int], [sliceType$12], false)}, {prop: "FindAllString", name: "FindAllString", pkg: "", typ: $funcType([$String, $Int], [sliceType$9], false)}, {prop: "FindAllStringIndex", name: "FindAllStringIndex", pkg: "", typ: $funcType([$String, $Int], [sliceType$12], false)}, {prop: "FindAllSubmatch", name: "FindAllSubmatch", pkg: "", typ: $funcType([sliceType$3, $Int], [sliceType$13], false)}, {prop: "FindAllSubmatchIndex", name: "FindAllSubmatchIndex", pkg: "", typ: $funcType([sliceType$3, $Int], [sliceType$12], false)}, {prop: "FindAllStringSubmatch", name: "FindAllStringSubmatch", pkg: "", typ: $funcType([$String, $Int], [sliceType$14], false)}, {prop: "FindAllStringSubmatchIndex", name: "FindAllStringSubmatchIndex", pkg: "", typ: $funcType([$String, $Int], [sliceType$12], false)}, {prop: "Split", name: "Split", pkg: "", typ: $funcType([$String, $Int], [sliceType$9], false)}]; + ptrType$11.methods = [{prop: "step", name: "step", pkg: "regexp", typ: $funcType([$Int], [$Int32, $Int], false)}, {prop: "canCheckPrefix", name: "canCheckPrefix", pkg: "regexp", typ: $funcType([], [$Bool], false)}, {prop: "hasPrefix", name: "hasPrefix", pkg: "regexp", typ: $funcType([ptrType$1], [$Bool], false)}, {prop: "index", name: "index", pkg: "regexp", typ: $funcType([ptrType$1, $Int], [$Int], false)}, {prop: "context", name: "context", pkg: "regexp", typ: $funcType([$Int], [syntax.EmptyOp], false)}]; + ptrType$12.methods = [{prop: "step", name: "step", pkg: "regexp", typ: $funcType([$Int], [$Int32, $Int], false)}, {prop: "canCheckPrefix", name: "canCheckPrefix", pkg: "regexp", typ: $funcType([], [$Bool], false)}, {prop: "hasPrefix", name: "hasPrefix", pkg: "regexp", typ: $funcType([ptrType$1], [$Bool], false)}, {prop: "index", name: "index", pkg: "regexp", typ: $funcType([ptrType$1, $Int], [$Int], false)}, {prop: "context", name: "context", pkg: "regexp", typ: $funcType([$Int], [syntax.EmptyOp], false)}]; + ptrType$13.methods = [{prop: "step", name: "step", pkg: "regexp", typ: $funcType([$Int], [$Int32, $Int], false)}, {prop: "canCheckPrefix", name: "canCheckPrefix", pkg: "regexp", typ: $funcType([], [$Bool], false)}, {prop: "hasPrefix", name: "hasPrefix", pkg: "regexp", typ: $funcType([ptrType$1], [$Bool], false)}, {prop: "index", name: "index", pkg: "regexp", typ: $funcType([ptrType$1, $Int], [$Int], false)}, {prop: "context", name: "context", pkg: "regexp", typ: $funcType([$Int], [syntax.EmptyOp], false)}]; + queue.init([{prop: "sparse", name: "sparse", pkg: "regexp", typ: sliceType$2, tag: ""}, {prop: "dense", name: "dense", pkg: "regexp", typ: sliceType$6, tag: ""}]); + entry.init([{prop: "pc", name: "pc", pkg: "regexp", typ: $Uint32, tag: ""}, {prop: "t", name: "t", pkg: "regexp", typ: ptrType$3, tag: ""}]); + thread.init([{prop: "inst", name: "inst", pkg: "regexp", typ: ptrType$9, tag: ""}, {prop: "cap", name: "cap", pkg: "regexp", typ: sliceType, tag: ""}]); + machine.init([{prop: "re", name: "re", pkg: "regexp", typ: ptrType$1, tag: ""}, {prop: "p", name: "p", pkg: "regexp", typ: ptrType$2, tag: ""}, {prop: "op", name: "op", pkg: "regexp", typ: ptrType, tag: ""}, {prop: "q0", name: "q0", pkg: "regexp", typ: queue, tag: ""}, {prop: "q1", name: "q1", pkg: "regexp", typ: queue, tag: ""}, {prop: "pool", name: "pool", pkg: "regexp", typ: sliceType$5, tag: ""}, {prop: "matched", name: "matched", pkg: "regexp", typ: $Bool, tag: ""}, {prop: "matchcap", name: "matchcap", pkg: "regexp", typ: sliceType, tag: ""}, {prop: "inputBytes", name: "inputBytes", pkg: "regexp", typ: inputBytes, tag: ""}, {prop: "inputString", name: "inputString", pkg: "regexp", typ: inputString, tag: ""}, {prop: "inputReader", name: "inputReader", pkg: "regexp", typ: inputReader, tag: ""}]); + onePassProg.init([{prop: "Inst", name: "Inst", pkg: "", typ: sliceType$7, tag: ""}, {prop: "Start", name: "Start", pkg: "", typ: $Int, tag: ""}, {prop: "NumCap", name: "NumCap", pkg: "", typ: $Int, tag: ""}]); + onePassInst.init([{prop: "Inst", name: "", pkg: "", typ: syntax.Inst, tag: ""}, {prop: "Next", name: "Next", pkg: "", typ: sliceType$2, tag: ""}]); + queueOnePass.init([{prop: "sparse", name: "sparse", pkg: "regexp", typ: sliceType$2, tag: ""}, {prop: "dense", name: "dense", pkg: "regexp", typ: sliceType$2, tag: ""}, {prop: "size", name: "size", pkg: "regexp", typ: $Uint32, tag: ""}, {prop: "nextIndex", name: "nextIndex", pkg: "regexp", typ: $Uint32, tag: ""}]); + runeSlice.init($Int32); + Regexp.init([{prop: "expr", name: "expr", pkg: "regexp", typ: $String, tag: ""}, {prop: "prog", name: "prog", pkg: "regexp", typ: ptrType$2, tag: ""}, {prop: "onepass", name: "onepass", pkg: "regexp", typ: ptrType, tag: ""}, {prop: "prefix", name: "prefix", pkg: "regexp", typ: $String, tag: ""}, {prop: "prefixBytes", name: "prefixBytes", pkg: "regexp", typ: sliceType$3, tag: ""}, {prop: "prefixComplete", name: "prefixComplete", pkg: "regexp", typ: $Bool, tag: ""}, {prop: "prefixRune", name: "prefixRune", pkg: "regexp", typ: $Int32, tag: ""}, {prop: "prefixEnd", name: "prefixEnd", pkg: "regexp", typ: $Uint32, tag: ""}, {prop: "cond", name: "cond", pkg: "regexp", typ: syntax.EmptyOp, tag: ""}, {prop: "numSubexp", name: "numSubexp", pkg: "regexp", typ: $Int, tag: ""}, {prop: "subexpNames", name: "subexpNames", pkg: "regexp", typ: sliceType$9, tag: ""}, {prop: "longest", name: "longest", pkg: "regexp", typ: $Bool, tag: ""}, {prop: "mu", name: "mu", pkg: "regexp", typ: nosync.Mutex, tag: ""}, {prop: "machine", name: "machine", pkg: "regexp", typ: sliceType$10, tag: ""}]); + input.init([{prop: "canCheckPrefix", name: "canCheckPrefix", pkg: "regexp", typ: $funcType([], [$Bool], false)}, {prop: "context", name: "context", pkg: "regexp", typ: $funcType([$Int], [syntax.EmptyOp], false)}, {prop: "hasPrefix", name: "hasPrefix", pkg: "regexp", typ: $funcType([ptrType$1], [$Bool], false)}, {prop: "index", name: "index", pkg: "regexp", typ: $funcType([ptrType$1, $Int], [$Int], false)}, {prop: "step", name: "step", pkg: "regexp", typ: $funcType([$Int], [$Int32, $Int], false)}]); + inputString.init([{prop: "str", name: "str", pkg: "regexp", typ: $String, tag: ""}]); + inputBytes.init([{prop: "str", name: "str", pkg: "regexp", typ: sliceType$3, tag: ""}]); + inputReader.init([{prop: "r", name: "r", pkg: "regexp", typ: io.RuneReader, tag: ""}, {prop: "atEOT", name: "atEOT", pkg: "regexp", typ: $Bool, tag: ""}, {prop: "pos", name: "pos", pkg: "regexp", typ: $Int, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_regexp = function() { while (true) { switch ($s) { case 0: + $r = bytes.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = nosync.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = io.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = syntax.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = sort.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + $r = strconv.$init($BLOCKING); /* */ $s = 6; case 6: if ($r && $r.$blocking) { $r = $r(); } + $r = strings.$init($BLOCKING); /* */ $s = 7; case 7: if ($r && $r.$blocking) { $r = $r(); } + $r = testing.$init($BLOCKING); /* */ $s = 8; case 8: if ($r && $r.$blocking) { $r = $r(); } + $r = unicode.$init($BLOCKING); /* */ $s = 9; case 9: if ($r && $r.$blocking) { $r = $r(); } + $r = utf8.$init($BLOCKING); /* */ $s = 10; case 10: if ($r && $r.$blocking) { $r = $r(); } + empty = $makeSlice(sliceType, 0); + noRune = new sliceType$1([]); + noNext = new sliceType$2([4294967295]); + anyRuneNotNL = new sliceType$1([0, 9, 11, 1114111]); + anyRune = new sliceType$1([0, 1114111]); + notOnePass = ptrType.nil; + /* */ } return; } }; $init_regexp.$blocking = true; return $init_regexp; + }; + return $pkg; +})(); +$packages["github.com/mattn/go-runewidth"] = (function() { + var $pkg = {}, os, regexp, strings, interval, Condition, sliceType, sliceType$1, sliceType$2, ptrType, combining, ambiguous, reLoc, RuneWidth, IsAmbiguousWidth, StringWidth, IsEastAsian; + os = $packages["os"]; + regexp = $packages["regexp"]; + strings = $packages["strings"]; + interval = $pkg.interval = $newType(0, $kindStruct, "runewidth.interval", "interval", "github.com/mattn/go-runewidth", function(first_, last_) { + this.$val = this; + this.first = first_ !== undefined ? first_ : 0; + this.last = last_ !== undefined ? last_ : 0; + }); + Condition = $pkg.Condition = $newType(0, $kindStruct, "runewidth.Condition", "Condition", "github.com/mattn/go-runewidth", function(EastAsianWidth_) { + this.$val = this; + this.EastAsianWidth = EastAsianWidth_ !== undefined ? EastAsianWidth_ : false; + }); + sliceType = $sliceType(interval); + sliceType$1 = $sliceType($Int32); + sliceType$2 = $sliceType($Uint8); + ptrType = $ptrType(Condition); + Condition.ptr.prototype.RuneWidth = function(r) { + var _i, _ref, c, iv, r; + c = this; + if (r === 0) { + return 0; + } + if (r < 32 || (r >= 127 && r < 160)) { + return 1; + } + _ref = combining; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + iv = $clone(((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]), interval); + if (iv.first <= r && r <= iv.last) { + return 0; + } + _i++; + } + if (c.EastAsianWidth && IsAmbiguousWidth(r)) { + return 2; + } + if (r >= 4352 && (r <= 4447 || (r === 9001) || (r === 9002) || (r >= 11904 && r <= 42191 && !((r === 12351))) || (r >= 44032 && r <= 55203) || (r >= 63744 && r <= 64255) || (r >= 65072 && r <= 65135) || (r >= 65280 && r <= 65376) || (r >= 65504 && r <= 65510) || (r >= 131072 && r <= 196605) || (r >= 196608 && r <= 262141))) { + return 2; + } + return 1; + }; + Condition.prototype.RuneWidth = function(r) { return this.$val.RuneWidth(r); }; + Condition.ptr.prototype.StringWidth = function(s) { + var _i, _ref, c, r, s, width = 0; + c = this; + _ref = new sliceType$1($stringToRunes(s)); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + r = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + width = width + (c.RuneWidth(r)) >> 0; + _i++; + } + width = width; + return width; + }; + Condition.prototype.StringWidth = function(s) { return this.$val.StringWidth(s); }; + Condition.ptr.prototype.Truncate = function(s, w, tail) { + var c, cw, i, r, s, tail, tw, w, width; + c = this; + r = new sliceType$1($stringToRunes(s)); + tw = StringWidth(tail); + w = w - (tw) >> 0; + width = 0; + i = 0; + while (true) { + if (!(i < r.$length)) { break; } + cw = RuneWidth(((i < 0 || i >= r.$length) ? $throwRuntimeError("index out of range") : r.$array[r.$offset + i])); + if ((width + cw >> 0) > w) { + break; + } + width = width + (cw) >> 0; + i = i + (1) >> 0; + } + if (i === r.$length) { + return $runesToString($subslice(r, 0, i)); + } + return $runesToString($subslice(r, 0, i)) + tail; + }; + Condition.prototype.Truncate = function(s, w, tail) { return this.$val.Truncate(s, w, tail); }; + RuneWidth = $pkg.RuneWidth = function(r) { + var r; + return $pkg.DefaultCondition.RuneWidth(r); + }; + IsAmbiguousWidth = $pkg.IsAmbiguousWidth = function(r) { + var _i, _ref, iv, r; + _ref = ambiguous; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + iv = $clone(((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]), interval); + if (iv.first <= r && r <= iv.last) { + return true; + } + _i++; + } + return false; + }; + StringWidth = $pkg.StringWidth = function(s) { + var s, width = 0; + width = $pkg.DefaultCondition.StringWidth(s); + return width; + }; + IsEastAsian = $pkg.IsEastAsian = function($b) { + var $args = arguments, $r, $s = 0, $this = this, _i, _r, _r$1, _ref, _ref$1, b, charset, locale, mbc_max, pos, r; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_IsEastAsian = function() { s: while (true) { switch ($s) { case 0: + _r = os.Getenv("LC_CTYPE", $BLOCKING); /* */ $s = 1; case 1: if (_r && _r.$blocking) { _r = _r(); } + locale = _r; + /* if (locale === "") { */ if (locale === "") {} else { $s = 2; continue; } + _r$1 = os.Getenv("LANG", $BLOCKING); /* */ $s = 3; case 3: if (_r$1 && _r$1.$blocking) { _r$1 = _r$1(); } + locale = _r$1; + /* } */ case 2: + if (locale === "POSIX" || locale === "C") { + return false; + } + if (locale.length > 1 && (locale.charCodeAt(0) === 67) && ((locale.charCodeAt(1) === 46) || (locale.charCodeAt(1) === 45))) { + return false; + } + charset = strings.ToLower(locale); + r = reLoc.FindStringSubmatch(locale); + if (r.$length === 2) { + charset = strings.ToLower(((1 < 0 || 1 >= r.$length) ? $throwRuntimeError("index out of range") : r.$array[r.$offset + 1])); + } + if (strings.HasSuffix(charset, "@cjk_narrow")) { + return false; + } + _ref = new sliceType$2($stringToBytes(charset)); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + pos = _i; + b = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (b === 64) { + charset = charset.substring(0, pos); + break; + } + _i++; + } + mbc_max = 1; + _ref$1 = charset; + if (_ref$1 === "utf-8" || _ref$1 === "utf8") { + mbc_max = 6; + } else if (_ref$1 === "jis") { + mbc_max = 8; + } else if (_ref$1 === "eucjp") { + mbc_max = 3; + } else if (_ref$1 === "euckr" || _ref$1 === "euccn") { + mbc_max = 2; + } else if (_ref$1 === "sjis" || _ref$1 === "cp932" || _ref$1 === "cp51932" || _ref$1 === "cp936" || _ref$1 === "cp949" || _ref$1 === "cp950") { + mbc_max = 2; + } else if (_ref$1 === "big5") { + mbc_max = 2; + } else if (_ref$1 === "gbk" || _ref$1 === "gb2312") { + mbc_max = 2; + } + if (mbc_max > 1 && (!((charset.charCodeAt(0) === 117)) || strings.HasPrefix(locale, "ja") || strings.HasPrefix(locale, "ko") || strings.HasPrefix(locale, "zh"))) { + return true; + } + return false; + /* */ case -1: } return; } }; $blocking_IsEastAsian.$blocking = true; return $blocking_IsEastAsian; + }; + ptrType.methods = [{prop: "RuneWidth", name: "RuneWidth", pkg: "", typ: $funcType([$Int32], [$Int], false)}, {prop: "StringWidth", name: "StringWidth", pkg: "", typ: $funcType([$String], [$Int], false)}, {prop: "Truncate", name: "Truncate", pkg: "", typ: $funcType([$String, $Int, $String], [$String], false)}]; + interval.init([{prop: "first", name: "first", pkg: "github.com/mattn/go-runewidth", typ: $Int32, tag: ""}, {prop: "last", name: "last", pkg: "github.com/mattn/go-runewidth", typ: $Int32, tag: ""}]); + Condition.init([{prop: "EastAsianWidth", name: "EastAsianWidth", pkg: "", typ: $Bool, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_runewidth = function() { while (true) { switch ($s) { case 0: + $r = os.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = regexp.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = strings.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + combining = new sliceType([new interval.ptr(768, 879), new interval.ptr(1155, 1158), new interval.ptr(1160, 1161), new interval.ptr(1425, 1469), new interval.ptr(1471, 1471), new interval.ptr(1473, 1474), new interval.ptr(1476, 1477), new interval.ptr(1479, 1479), new interval.ptr(1536, 1539), new interval.ptr(1552, 1557), new interval.ptr(1611, 1630), new interval.ptr(1648, 1648), new interval.ptr(1750, 1764), new interval.ptr(1767, 1768), new interval.ptr(1770, 1773), new interval.ptr(1807, 1807), new interval.ptr(1809, 1809), new interval.ptr(1840, 1866), new interval.ptr(1958, 1968), new interval.ptr(2027, 2035), new interval.ptr(2305, 2306), new interval.ptr(2364, 2364), new interval.ptr(2369, 2376), new interval.ptr(2381, 2381), new interval.ptr(2385, 2388), new interval.ptr(2402, 2403), new interval.ptr(2433, 2433), new interval.ptr(2492, 2492), new interval.ptr(2497, 2500), new interval.ptr(2509, 2509), new interval.ptr(2530, 2531), new interval.ptr(2561, 2562), new interval.ptr(2620, 2620), new interval.ptr(2625, 2626), new interval.ptr(2631, 2632), new interval.ptr(2635, 2637), new interval.ptr(2672, 2673), new interval.ptr(2689, 2690), new interval.ptr(2748, 2748), new interval.ptr(2753, 2757), new interval.ptr(2759, 2760), new interval.ptr(2765, 2765), new interval.ptr(2786, 2787), new interval.ptr(2817, 2817), new interval.ptr(2876, 2876), new interval.ptr(2879, 2879), new interval.ptr(2881, 2883), new interval.ptr(2893, 2893), new interval.ptr(2902, 2902), new interval.ptr(2946, 2946), new interval.ptr(3008, 3008), new interval.ptr(3021, 3021), new interval.ptr(3134, 3136), new interval.ptr(3142, 3144), new interval.ptr(3146, 3149), new interval.ptr(3157, 3158), new interval.ptr(3260, 3260), new interval.ptr(3263, 3263), new interval.ptr(3270, 3270), new interval.ptr(3276, 3277), new interval.ptr(3298, 3299), new interval.ptr(3393, 3395), new interval.ptr(3405, 3405), new interval.ptr(3530, 3530), new interval.ptr(3538, 3540), new interval.ptr(3542, 3542), new interval.ptr(3633, 3633), new interval.ptr(3636, 3642), new interval.ptr(3655, 3662), new interval.ptr(3761, 3761), new interval.ptr(3764, 3769), new interval.ptr(3771, 3772), new interval.ptr(3784, 3789), new interval.ptr(3864, 3865), new interval.ptr(3893, 3893), new interval.ptr(3895, 3895), new interval.ptr(3897, 3897), new interval.ptr(3953, 3966), new interval.ptr(3968, 3972), new interval.ptr(3974, 3975), new interval.ptr(3984, 3991), new interval.ptr(3993, 4028), new interval.ptr(4038, 4038), new interval.ptr(4141, 4144), new interval.ptr(4146, 4146), new interval.ptr(4150, 4151), new interval.ptr(4153, 4153), new interval.ptr(4184, 4185), new interval.ptr(4448, 4607), new interval.ptr(4959, 4959), new interval.ptr(5906, 5908), new interval.ptr(5938, 5940), new interval.ptr(5970, 5971), new interval.ptr(6002, 6003), new interval.ptr(6068, 6069), new interval.ptr(6071, 6077), new interval.ptr(6086, 6086), new interval.ptr(6089, 6099), new interval.ptr(6109, 6109), new interval.ptr(6155, 6157), new interval.ptr(6313, 6313), new interval.ptr(6432, 6434), new interval.ptr(6439, 6440), new interval.ptr(6450, 6450), new interval.ptr(6457, 6459), new interval.ptr(6679, 6680), new interval.ptr(6912, 6915), new interval.ptr(6964, 6964), new interval.ptr(6966, 6970), new interval.ptr(6972, 6972), new interval.ptr(6978, 6978), new interval.ptr(7019, 7027), new interval.ptr(7616, 7626), new interval.ptr(7678, 7679), new interval.ptr(8203, 8207), new interval.ptr(8234, 8238), new interval.ptr(8288, 8291), new interval.ptr(8298, 8303), new interval.ptr(8400, 8431), new interval.ptr(12330, 12335), new interval.ptr(12441, 12442), new interval.ptr(43014, 43014), new interval.ptr(43019, 43019), new interval.ptr(43045, 43046), new interval.ptr(64286, 64286), new interval.ptr(65024, 65039), new interval.ptr(65056, 65059), new interval.ptr(65279, 65279), new interval.ptr(65529, 65531), new interval.ptr(68097, 68099), new interval.ptr(68101, 68102), new interval.ptr(68108, 68111), new interval.ptr(68152, 68154), new interval.ptr(68159, 68159), new interval.ptr(119143, 119145), new interval.ptr(119155, 119170), new interval.ptr(119173, 119179), new interval.ptr(119210, 119213), new interval.ptr(119362, 119364), new interval.ptr(917505, 917505), new interval.ptr(917536, 917631), new interval.ptr(917760, 917999)]); + ambiguous = new sliceType([new interval.ptr(161, 161), new interval.ptr(164, 164), new interval.ptr(167, 168), new interval.ptr(170, 170), new interval.ptr(174, 174), new interval.ptr(176, 180), new interval.ptr(182, 186), new interval.ptr(188, 191), new interval.ptr(198, 198), new interval.ptr(208, 208), new interval.ptr(215, 216), new interval.ptr(222, 225), new interval.ptr(230, 230), new interval.ptr(232, 234), new interval.ptr(236, 237), new interval.ptr(240, 240), new interval.ptr(242, 243), new interval.ptr(247, 250), new interval.ptr(252, 252), new interval.ptr(254, 254), new interval.ptr(257, 257), new interval.ptr(273, 273), new interval.ptr(275, 275), new interval.ptr(283, 283), new interval.ptr(294, 295), new interval.ptr(299, 299), new interval.ptr(305, 307), new interval.ptr(312, 312), new interval.ptr(319, 322), new interval.ptr(324, 324), new interval.ptr(328, 331), new interval.ptr(333, 333), new interval.ptr(338, 339), new interval.ptr(358, 359), new interval.ptr(363, 363), new interval.ptr(462, 462), new interval.ptr(464, 464), new interval.ptr(466, 466), new interval.ptr(468, 468), new interval.ptr(470, 470), new interval.ptr(472, 472), new interval.ptr(474, 474), new interval.ptr(476, 476), new interval.ptr(593, 593), new interval.ptr(609, 609), new interval.ptr(708, 708), new interval.ptr(711, 711), new interval.ptr(713, 715), new interval.ptr(717, 717), new interval.ptr(720, 720), new interval.ptr(728, 731), new interval.ptr(733, 733), new interval.ptr(735, 735), new interval.ptr(913, 929), new interval.ptr(931, 937), new interval.ptr(945, 961), new interval.ptr(963, 969), new interval.ptr(1025, 1025), new interval.ptr(1040, 1103), new interval.ptr(1105, 1105), new interval.ptr(8208, 8208), new interval.ptr(8211, 8214), new interval.ptr(8216, 8217), new interval.ptr(8220, 8221), new interval.ptr(8224, 8226), new interval.ptr(8228, 8231), new interval.ptr(8240, 8240), new interval.ptr(8242, 8243), new interval.ptr(8245, 8245), new interval.ptr(8251, 8251), new interval.ptr(8254, 8254), new interval.ptr(8308, 8308), new interval.ptr(8319, 8319), new interval.ptr(8321, 8324), new interval.ptr(8364, 8364), new interval.ptr(8451, 8451), new interval.ptr(8453, 8453), new interval.ptr(8457, 8457), new interval.ptr(8467, 8467), new interval.ptr(8470, 8470), new interval.ptr(8481, 8482), new interval.ptr(8486, 8486), new interval.ptr(8491, 8491), new interval.ptr(8531, 8532), new interval.ptr(8539, 8542), new interval.ptr(8544, 8555), new interval.ptr(8560, 8569), new interval.ptr(8592, 8601), new interval.ptr(8632, 8633), new interval.ptr(8658, 8658), new interval.ptr(8660, 8660), new interval.ptr(8679, 8679), new interval.ptr(8704, 8704), new interval.ptr(8706, 8707), new interval.ptr(8711, 8712), new interval.ptr(8715, 8715), new interval.ptr(8719, 8719), new interval.ptr(8721, 8721), new interval.ptr(8725, 8725), new interval.ptr(8730, 8730), new interval.ptr(8733, 8736), new interval.ptr(8739, 8739), new interval.ptr(8741, 8741), new interval.ptr(8743, 8748), new interval.ptr(8750, 8750), new interval.ptr(8756, 8759), new interval.ptr(8764, 8765), new interval.ptr(8776, 8776), new interval.ptr(8780, 8780), new interval.ptr(8786, 8786), new interval.ptr(8800, 8801), new interval.ptr(8804, 8807), new interval.ptr(8810, 8811), new interval.ptr(8814, 8815), new interval.ptr(8834, 8835), new interval.ptr(8838, 8839), new interval.ptr(8853, 8853), new interval.ptr(8857, 8857), new interval.ptr(8869, 8869), new interval.ptr(8895, 8895), new interval.ptr(8978, 8978), new interval.ptr(9312, 9449), new interval.ptr(9451, 9547), new interval.ptr(9552, 9587), new interval.ptr(9600, 9615), new interval.ptr(9618, 9621), new interval.ptr(9632, 9633), new interval.ptr(9635, 9641), new interval.ptr(9650, 9651), new interval.ptr(9654, 9655), new interval.ptr(9660, 9661), new interval.ptr(9664, 9665), new interval.ptr(9670, 9672), new interval.ptr(9675, 9675), new interval.ptr(9678, 9681), new interval.ptr(9698, 9701), new interval.ptr(9711, 9711), new interval.ptr(9733, 9734), new interval.ptr(9737, 9737), new interval.ptr(9742, 9743), new interval.ptr(9748, 9749), new interval.ptr(9756, 9756), new interval.ptr(9758, 9758), new interval.ptr(9792, 9792), new interval.ptr(9794, 9794), new interval.ptr(9824, 9825), new interval.ptr(9827, 9829), new interval.ptr(9831, 9834), new interval.ptr(9836, 9837), new interval.ptr(9839, 9839), new interval.ptr(10045, 10045), new interval.ptr(10102, 10111), new interval.ptr(57344, 63743), new interval.ptr(65533, 65533), new interval.ptr(983040, 1048573), new interval.ptr(1048576, 1114109)]); + reLoc = regexp.MustCompile("^[a-z][a-z][a-z]?(?:_[A-Z][A-Z])?\\.(.+)"); + $pkg.EastAsianWidth = IsEastAsian(); + $pkg.DefaultCondition = new Condition.ptr($pkg.EastAsianWidth); + /* */ } return; } }; $init_runewidth.$blocking = true; return $init_runewidth; + }; + return $pkg; +})(); +$packages["github.com/shurcooL/sanitized_anchor_name"] = (function() { + var $pkg = {}, unicode, sliceType, Create; + unicode = $packages["unicode"]; + sliceType = $sliceType($Int32); + Create = $pkg.Create = function(text) { + var _i, _ref, anchorName, futureDash, r, text; + anchorName = sliceType.nil; + futureDash = false; + _ref = new sliceType($stringToRunes(text)); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + r = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (unicode.IsLetter(r) || unicode.IsNumber(r)) { + if (futureDash && anchorName.$length > 0) { + anchorName = $append(anchorName, 45); + } + futureDash = false; + anchorName = $append(anchorName, unicode.ToLower(r)); + } else { + futureDash = true; + } + _i++; + } + return $runesToString(anchorName); + }; + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_sanitized_anchor_name = function() { while (true) { switch ($s) { case 0: + $r = unicode.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + /* */ } return; } }; $init_sanitized_anchor_name.$blocking = true; return $init_sanitized_anchor_name; + }; + return $pkg; +})(); +$packages["github.com/russross/blackfriday"] = (function() { + var $pkg = {}, bytes, fmt, sanitized_anchor_name, regexp, strconv, strings, utf8, Renderer, inlineParser, parser, reference, sliceType$1, sliceType$2, ptrType, ptrType$1, sliceType$3, ptrType$2, ptrType$3, ptrType$5, sliceType$5, sliceType$6, funcType, ptrType$9, arrayType, mapType$1, htmlEntity, urlRe, anchorRe, escapeChars, validUris, blockTags, _map, _key, isBackslashEscaped, emphasis, codeSpan, lineBreak, link, leftAngle, escape, unescapeText, entity, linkEndsWithEntity, autoLink, isEndOfLink, isSafeLink, tagLength, isMailtoAutoLink, helperFindEmphChar, helperEmphasis, helperDoubleEmphasis, helperTripleEmphasis, Markdown, firstPass, secondPass, isReference, scanLinkRef, scanFootnote, ispunct, isspace, isletter, isalnum, expandTabs, isIndented, slugify; + bytes = $packages["bytes"]; + fmt = $packages["fmt"]; + sanitized_anchor_name = $packages["github.com/shurcooL/sanitized_anchor_name"]; + regexp = $packages["regexp"]; + strconv = $packages["strconv"]; + strings = $packages["strings"]; + utf8 = $packages["unicode/utf8"]; + Renderer = $pkg.Renderer = $newType(8, $kindInterface, "blackfriday.Renderer", "Renderer", "github.com/russross/blackfriday", null); + inlineParser = $pkg.inlineParser = $newType(4, $kindFunc, "blackfriday.inlineParser", "inlineParser", "github.com/russross/blackfriday", null); + parser = $pkg.parser = $newType(0, $kindStruct, "blackfriday.parser", "parser", "github.com/russross/blackfriday", function(r_, refs_, inlineCallback_, flags_, nesting_, maxNesting_, insideLink_, notes_) { + this.$val = this; + this.r = r_ !== undefined ? r_ : $ifaceNil; + this.refs = refs_ !== undefined ? refs_ : false; + this.inlineCallback = inlineCallback_ !== undefined ? inlineCallback_ : arrayType.zero(); + this.flags = flags_ !== undefined ? flags_ : 0; + this.nesting = nesting_ !== undefined ? nesting_ : 0; + this.maxNesting = maxNesting_ !== undefined ? maxNesting_ : 0; + this.insideLink = insideLink_ !== undefined ? insideLink_ : false; + this.notes = notes_ !== undefined ? notes_ : sliceType$6.nil; + }); + reference = $pkg.reference = $newType(0, $kindStruct, "blackfriday.reference", "reference", "github.com/russross/blackfriday", function(link_, title_, noteId_, hasBlock_) { + this.$val = this; + this.link = link_ !== undefined ? link_ : sliceType$1.nil; + this.title = title_ !== undefined ? title_ : sliceType$1.nil; + this.noteId = noteId_ !== undefined ? noteId_ : 0; + this.hasBlock = hasBlock_ !== undefined ? hasBlock_ : false; + }); + sliceType$1 = $sliceType($Uint8); + sliceType$2 = $sliceType(sliceType$1); + ptrType = $ptrType($String); + ptrType$1 = $ptrType(ptrType); + sliceType$3 = $sliceType($Int); + ptrType$2 = $ptrType($Int); + ptrType$3 = $ptrType(bytes.Buffer); + ptrType$5 = $ptrType(reference); + sliceType$5 = $sliceType(sliceType$3); + sliceType$6 = $sliceType(ptrType$5); + funcType = $funcType([], [$Bool], false); + ptrType$9 = $ptrType(parser); + arrayType = $arrayType(inlineParser, 256); + mapType$1 = $mapType($String, ptrType$5); + parser.ptr.prototype.block = function(out, data) { + var data, i, i$1, i$2, i$3, i$4, i$5, out, p, x; + p = this; + if ((data.$length === 0) || !(((x = data.$length - 1 >> 0, ((x < 0 || x >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x])) === 10))) { + $panic(new $String("block input is missing terminating newline")); + } + if (p.nesting >= p.maxNesting) { + return; + } + p.nesting = p.nesting + (1) >> 0; + while (true) { + if (!(data.$length > 0)) { break; } + if (p.isPrefixHeader(data)) { + data = $subslice(data, p.prefixHeader(out, data)); + continue; + } + if (((0 < 0 || 0 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 0]) === 60) { + i = p.html(out, data, true); + if (i > 0) { + data = $subslice(data, i); + continue; + } + } + if (!(((p.flags & 4096) === 0))) { + if (((0 < 0 || 0 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 0]) === 37) { + i$1 = p.titleBlock(out, data, true); + if (i$1 > 0) { + data = $subslice(data, i$1); + continue; + } + } + } + i$2 = p.isEmpty(data); + if (i$2 > 0) { + data = $subslice(data, i$2); + continue; + } + if (p.codePrefix(data) > 0) { + data = $subslice(data, p.code(out, data)); + continue; + } + if (!(((p.flags & 4) === 0))) { + i$3 = p.fencedCode(out, data, true); + if (i$3 > 0) { + data = $subslice(data, i$3); + continue; + } + } + if (p.isHRule(data)) { + p.r.HRule(out); + i$4 = 0; + i$4 = 0; + while (true) { + if (!(!((((i$4 < 0 || i$4 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i$4]) === 10)))) { break; } + i$4 = i$4 + (1) >> 0; + } + data = $subslice(data, i$4); + continue; + } + if (p.quotePrefix(data) > 0) { + data = $subslice(data, p.quote(out, data)); + continue; + } + if (!(((p.flags & 2) === 0))) { + i$5 = p.table(out, data); + if (i$5 > 0) { + data = $subslice(data, i$5); + continue; + } + } + if (p.uliPrefix(data) > 0) { + data = $subslice(data, p.list(out, data, 0)); + continue; + } + if (p.oliPrefix(data) > 0) { + data = $subslice(data, p.list(out, data, 1)); + continue; + } + data = $subslice(data, p.paragraph(out, data)); + } + p.nesting = p.nesting - (1) >> 0; + }; + parser.prototype.block = function(out, data) { return this.$val.block(out, data); }; + parser.ptr.prototype.isPrefixHeader = function(data) { + var data, level, p; + p = this; + if (!((((0 < 0 || 0 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 0]) === 35))) { + return false; + } + if (!(((p.flags & 64) === 0))) { + level = 0; + while (true) { + if (!(level < 6 && (((level < 0 || level >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + level]) === 35))) { break; } + level = level + (1) >> 0; + } + if (!((((level < 0 || level >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + level]) === 32))) { + return false; + } + } + return true; + }; + parser.prototype.isPrefixHeader = function(data) { return this.$val.isPrefixHeader(data); }; + parser.ptr.prototype.prefixHeader = function(out, data) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, data, end, i, id, j, k, level, out, p, skip, work, x, x$1, x$2, x$3; + p = this; + level = 0; + while (true) { + if (!(level < 6 && (((level < 0 || level >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + level]) === 35))) { break; } + level = level + (1) >> 0; + } + _tmp = 0; _tmp$1 = 0; i = _tmp; end = _tmp$1; + i = level; + while (true) { + if (!(((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 32)) { break; } + i = i + (1) >> 0; + } + end = i; + while (true) { + if (!(!((((end < 0 || end >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + end]) === 10)))) { break; } + end = end + (1) >> 0; + } + skip = end; + id = ""; + if (!(((p.flags & 2048) === 0))) { + _tmp$2 = 0; _tmp$3 = 0; j = _tmp$2; k = _tmp$3; + j = i; + while (true) { + if (!(j < (end - 1 >> 0) && (!((((j < 0 || j >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + j]) === 123)) || !(((x = j + 1 >> 0, ((x < 0 || x >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x])) === 35))))) { break; } + j = j + (1) >> 0; + } + k = j + 1 >> 0; + while (true) { + if (!(k < end && !((((k < 0 || k >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + k]) === 125)))) { break; } + k = k + (1) >> 0; + } + if (j < end && k < end) { + id = $bytesToString($subslice(data, (j + 2 >> 0), k)); + end = j; + skip = k + 1 >> 0; + while (true) { + if (!(end > 0 && ((x$1 = end - 1 >> 0, ((x$1 < 0 || x$1 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$1])) === 32))) { break; } + end = end - (1) >> 0; + } + } + } + while (true) { + if (!(end > 0 && ((x$2 = end - 1 >> 0, ((x$2 < 0 || x$2 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$2])) === 35))) { break; } + end = end - (1) >> 0; + } + while (true) { + if (!(end > 0 && ((x$3 = end - 1 >> 0, ((x$3 < 0 || x$3 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$3])) === 32))) { break; } + end = end - (1) >> 0; + } + if (end > i) { + if (id === "" && !(((p.flags & 8192) === 0))) { + id = sanitized_anchor_name.Create($bytesToString($subslice(data, i, end))); + } + work = (function() { + p.inline(out, $subslice(data, i, end)); + return true; + }); + p.r.Header(out, work, level, id); + } + return skip; + }; + parser.prototype.prefixHeader = function(out, data) { return this.$val.prefixHeader(out, data); }; + parser.ptr.prototype.isUnderlinedHeader = function(data) { + var data, i, i$1, p; + p = this; + if (((0 < 0 || 0 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 0]) === 61) { + i = 1; + while (true) { + if (!(((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 61)) { break; } + i = i + (1) >> 0; + } + while (true) { + if (!(((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 32)) { break; } + i = i + (1) >> 0; + } + if (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 10) { + return 1; + } else { + return 0; + } + } + if (((0 < 0 || 0 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 0]) === 45) { + i$1 = 1; + while (true) { + if (!(((i$1 < 0 || i$1 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i$1]) === 45)) { break; } + i$1 = i$1 + (1) >> 0; + } + while (true) { + if (!(((i$1 < 0 || i$1 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i$1]) === 32)) { break; } + i$1 = i$1 + (1) >> 0; + } + if (((i$1 < 0 || i$1 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i$1]) === 10) { + return 2; + } else { + return 0; + } + } + return 0; + }; + parser.prototype.isUnderlinedHeader = function(data) { return this.$val.isUnderlinedHeader(data); }; + parser.ptr.prototype.titleBlock = function(out, data, doRender) { + var _i, _ref, b, data, doRender, i, idx, out, p, splitData; + p = this; + if (!((((0 < 0 || 0 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 0]) === 37))) { + return 0; + } + splitData = bytes.Split(data, new sliceType$1($stringToBytes("\n"))); + i = 0; + _ref = splitData; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + idx = _i; + b = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (!bytes.HasPrefix(b, new sliceType$1($stringToBytes("%")))) { + i = idx; + break; + } + _i++; + } + data = bytes.Join($subslice(splitData, 0, i), new sliceType$1($stringToBytes("\n"))); + p.r.TitleBlock(out, data); + return data.$length; + }; + parser.prototype.titleBlock = function(out, data, doRender) { return this.$val.titleBlock(out, data, doRender); }; + parser.ptr.prototype.html = function(out, data, doRender) { + var _tmp, _tmp$1, _tuple, curtag, data, doRender, end, found, i, j, out, p, size, size$1, tagfound, x, x$1; + p = this; + _tmp = 0; _tmp$1 = 0; i = _tmp; j = _tmp$1; + if (!((((0 < 0 || 0 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 0]) === 60))) { + return 0; + } + _tuple = p.htmlFindTag($subslice(data, 1)); curtag = _tuple[0]; tagfound = _tuple[1]; + if (!tagfound) { + size = p.htmlComment(out, data, doRender); + if (size > 0) { + return size; + } + size$1 = p.htmlHr(out, data, doRender); + if (size$1 > 0) { + return size$1; + } + return 0; + } + found = false; + if (!found && !(curtag === "ins") && !(curtag === "del")) { + i = 1; + while (true) { + if (!(i < data.$length)) { break; } + i = i + (1) >> 0; + while (true) { + if (!(i < data.$length && !(((x = i - 1 >> 0, ((x < 0 || x >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x])) === 60) && (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 47)))) { break; } + i = i + (1) >> 0; + } + if (((i + 2 >> 0) + curtag.length >> 0) >= data.$length) { + break; + } + j = p.htmlFindEnd(curtag, $subslice(data, (i - 1 >> 0))); + if (j > 0) { + i = i + ((j - 1 >> 0)) >> 0; + found = true; + break; + } + } + } + if (!found) { + return 0; + } + if (doRender) { + end = i; + while (true) { + if (!(end > 0 && ((x$1 = end - 1 >> 0, ((x$1 < 0 || x$1 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$1])) === 10))) { break; } + end = end - (1) >> 0; + } + p.r.BlockHtml(out, $subslice(data, 0, end)); + } + return i; + }; + parser.prototype.html = function(out, data, doRender) { return this.$val.html(out, data, doRender); }; + parser.ptr.prototype.htmlComment = function(out, data, doRender) { + var data, doRender, end, i, j, out, p, size, x, x$1, x$2; + p = this; + if (!((((0 < 0 || 0 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 0]) === 60)) || !((((1 < 0 || 1 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 1]) === 33)) || !((((2 < 0 || 2 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 2]) === 45)) || !((((3 < 0 || 3 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 3]) === 45))) { + return 0; + } + i = 5; + while (true) { + if (!(i < data.$length && !(((x = i - 2 >> 0, ((x < 0 || x >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x])) === 45) && ((x$1 = i - 1 >> 0, ((x$1 < 0 || x$1 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$1])) === 45) && (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 62)))) { break; } + i = i + (1) >> 0; + } + i = i + (1) >> 0; + if (i >= data.$length) { + return 0; + } + j = p.isEmpty($subslice(data, i)); + if (j > 0) { + size = i + j >> 0; + if (doRender) { + end = size; + while (true) { + if (!(end > 0 && ((x$2 = end - 1 >> 0, ((x$2 < 0 || x$2 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$2])) === 10))) { break; } + end = end - (1) >> 0; + } + p.r.BlockHtml(out, $subslice(data, 0, end)); + } + return size; + } + return 0; + }; + parser.prototype.htmlComment = function(out, data, doRender) { return this.$val.htmlComment(out, data, doRender); }; + parser.ptr.prototype.htmlHr = function(out, data, doRender) { + var data, doRender, end, i, j, out, p, size, x; + p = this; + if (!((((0 < 0 || 0 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 0]) === 60)) || (!((((1 < 0 || 1 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 1]) === 104)) && !((((1 < 0 || 1 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 1]) === 72))) || (!((((2 < 0 || 2 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 2]) === 114)) && !((((2 < 0 || 2 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 2]) === 82)))) { + return 0; + } + if (!((((3 < 0 || 3 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 3]) === 32)) && !((((3 < 0 || 3 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 3]) === 47)) && !((((3 < 0 || 3 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 3]) === 62))) { + return 0; + } + i = 3; + while (true) { + if (!(!((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 62)) && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 10)))) { break; } + i = i + (1) >> 0; + } + if (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 62) { + i = i + (1) >> 0; + j = p.isEmpty($subslice(data, i)); + if (j > 0) { + size = i + j >> 0; + if (doRender) { + end = size; + while (true) { + if (!(end > 0 && ((x = end - 1 >> 0, ((x < 0 || x >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x])) === 10))) { break; } + end = end - (1) >> 0; + } + p.r.BlockHtml(out, $subslice(data, 0, end)); + } + return size; + } + } + return 0; + }; + parser.prototype.htmlHr = function(out, data, doRender) { return this.$val.htmlHr(out, data, doRender); }; + parser.ptr.prototype.htmlFindTag = function(data) { + var _entry, data, i, key, p; + p = this; + i = 0; + while (true) { + if (!(isalnum(((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i])))) { break; } + i = i + (1) >> 0; + } + key = $bytesToString($subslice(data, 0, i)); + if ((_entry = blockTags[key], _entry !== undefined ? _entry.v : false)) { + return [key, true]; + } + return ["", false]; + }; + parser.prototype.htmlFindTag = function(data) { return this.$val.htmlFindTag(data); }; + parser.ptr.prototype.htmlFindEnd = function(tag, data) { + var closetag, data, i, p, skip, tag; + p = this; + closetag = new sliceType$1($stringToBytes("")); + if (!bytes.HasPrefix(data, closetag)) { + return 0; + } + i = closetag.$length; + skip = 0; + skip = p.isEmpty($subslice(data, i)); + if (skip === 0) { + return 0; + } + i = i + (skip) >> 0; + skip = 0; + if (i >= data.$length) { + return i; + } + if (!(((p.flags & 32) === 0))) { + return i; + } + skip = p.isEmpty($subslice(data, i)); + if (skip === 0) { + return 0; + } + return i + skip >> 0; + }; + parser.prototype.htmlFindEnd = function(tag, data) { return this.$val.htmlFindEnd(tag, data); }; + parser.ptr.prototype.isEmpty = function(data) { + var data, i, p; + p = this; + if (data.$length === 0) { + return 0; + } + i = 0; + i = 0; + while (true) { + if (!(i < data.$length && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 10)))) { break; } + if (!((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 32)) && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 9))) { + return 0; + } + i = i + (1) >> 0; + } + return i + 1 >> 0; + }; + parser.prototype.isEmpty = function(data) { return this.$val.isEmpty(data); }; + parser.ptr.prototype.isHRule = function(data) { + var c, data, i, n, p; + p = this; + i = 0; + while (true) { + if (!(i < 3 && (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 32))) { break; } + i = i + (1) >> 0; + } + if (!((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 42)) && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 45)) && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 95))) { + return false; + } + c = ((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]); + n = 0; + while (true) { + if (!(!((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 10)))) { break; } + if (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === c) { + n = n + (1) >> 0; + } else if (!((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 32))) { + return false; + } + i = i + (1) >> 0; + } + return n >= 3; + }; + parser.prototype.isHRule = function(data) { return this.$val.isHRule(data); }; + parser.ptr.prototype.isFencedCode = function(data, syntax, oldmarker) { + var _tmp, _tmp$1, c, data, i, language, marker = "", oldmarker, p, size, skip = 0, syn, syntax, syntaxStart, x; + p = this; + _tmp = 0; _tmp$1 = 0; i = _tmp; size = _tmp$1; + skip = 0; + while (true) { + if (!(i < data.$length && i < 3 && (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 32))) { break; } + i = i + (1) >> 0; + } + if (i >= data.$length) { + return [skip, marker]; + } + if (!((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 126)) && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 96))) { + return [skip, marker]; + } + c = ((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]); + while (true) { + if (!(i < data.$length && (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === c))) { break; } + size = size + (1) >> 0; + i = i + (1) >> 0; + } + if (i >= data.$length) { + return [skip, marker]; + } + if (size < 3) { + return [skip, marker]; + } + marker = $bytesToString($subslice(data, (i - size >> 0), i)); + if (!(oldmarker === "") && !(marker === oldmarker)) { + return [skip, marker]; + } + if (!($pointerIsEqual(syntax, ptrType$1.nil))) { + syn = 0; + while (true) { + if (!(i < data.$length && (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 32))) { break; } + i = i + (1) >> 0; + } + if (i >= data.$length) { + return [skip, marker]; + } + syntaxStart = i; + if (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 123) { + i = i + (1) >> 0; + syntaxStart = syntaxStart + (1) >> 0; + while (true) { + if (!(i < data.$length && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 125)) && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 10)))) { break; } + syn = syn + (1) >> 0; + i = i + (1) >> 0; + } + if (i >= data.$length || !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 125))) { + return [skip, marker]; + } + while (true) { + if (!(syn > 0 && isspace(((syntaxStart < 0 || syntaxStart >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + syntaxStart])))) { break; } + syntaxStart = syntaxStart + (1) >> 0; + syn = syn - (1) >> 0; + } + while (true) { + if (!(syn > 0 && isspace((x = (syntaxStart + syn >> 0) - 1 >> 0, ((x < 0 || x >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x]))))) { break; } + syn = syn - (1) >> 0; + } + i = i + (1) >> 0; + } else { + while (true) { + if (!(i < data.$length && !isspace(((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i])))) { break; } + syn = syn + (1) >> 0; + i = i + (1) >> 0; + } + } + language = $bytesToString($subslice(data, syntaxStart, (syntaxStart + syn >> 0))); + syntax.$set(new ptrType(function() { return language; }, function($v) { language = $v; })); + } + while (true) { + if (!(i < data.$length && (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 32))) { break; } + i = i + (1) >> 0; + } + if (i >= data.$length || !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 10))) { + return [skip, marker]; + } + skip = i + 1 >> 0; + return [skip, marker]; + }; + parser.prototype.isFencedCode = function(data, syntax, oldmarker) { return this.$val.isFencedCode(data, syntax, oldmarker); }; + parser.ptr.prototype.fencedCode = function(out, data, doRender) { + var _tuple, _tuple$1, beg, data, doRender, end, fenceEnd, lang, marker, out, p, syntax, work; + p = this; + lang = ptrType.nil; + _tuple = p.isFencedCode(data, new ptrType$1(function() { return lang; }, function($v) { lang = $v; }), ""); beg = _tuple[0]; marker = _tuple[1]; + if ((beg === 0) || beg >= data.$length) { + return 0; + } + work = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + while (true) { + if (!(true)) { break; } + _tuple$1 = p.isFencedCode($subslice(data, beg), ptrType$1.nil, marker); fenceEnd = _tuple$1[0]; + if (!((fenceEnd === 0))) { + beg = beg + (fenceEnd) >> 0; + break; + } + end = beg; + while (true) { + if (!(end < data.$length && !((((end < 0 || end >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + end]) === 10)))) { break; } + end = end + (1) >> 0; + } + end = end + (1) >> 0; + if (end >= data.$length) { + return 0; + } + if (doRender) { + work.Write($subslice(data, beg, end)); + } + beg = end; + } + syntax = ""; + if (!($pointerIsEqual(lang, ptrType.nil))) { + syntax = lang.$get(); + } + if (doRender) { + p.r.BlockCode(out, work.Bytes(), syntax); + } + return beg; + }; + parser.prototype.fencedCode = function(out, data, doRender) { return this.$val.fencedCode(out, data, doRender); }; + parser.ptr.prototype.table = function(out, data) { + var _tmp, _tmp$1, _tuple, body, columns, data, header, i, out, p, pipes, rowStart; + p = this; + header = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + _tuple = p.tableHeader(header, data); i = _tuple[0]; columns = _tuple[1]; + if (i === 0) { + return 0; + } + body = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + while (true) { + if (!(i < data.$length)) { break; } + _tmp = 0; _tmp$1 = i; pipes = _tmp; rowStart = _tmp$1; + while (true) { + if (!(!((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 10)))) { break; } + if (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 124) { + pipes = pipes + (1) >> 0; + } + i = i + (1) >> 0; + } + if (pipes === 0) { + i = rowStart; + break; + } + i = i + (1) >> 0; + p.tableRow(body, $subslice(data, rowStart, i), columns, false); + } + p.r.Table(out, header.Bytes(), body.Bytes(), columns); + return i; + }; + parser.prototype.table = function(out, data) { return this.$val.table(out, data); }; + isBackslashEscaped = function(data, i) { + var backslashes, data, i, x; + backslashes = 0; + while (true) { + if (!(((i - backslashes >> 0) - 1 >> 0) >= 0 && ((x = (i - backslashes >> 0) - 1 >> 0, ((x < 0 || x >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x])) === 92))) { break; } + backslashes = backslashes + (1) >> 0; + } + return (backslashes & 1) === 1; + }; + parser.ptr.prototype.tableHeader = function(out, data) { + var col, colCount, columns = sliceType$3.nil, dashes, data, header, i, out, p, size = 0, x; + p = this; + i = 0; + colCount = 1; + i = 0; + while (true) { + if (!(!((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 10)))) { break; } + if ((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 124) && !isBackslashEscaped(data, i)) { + colCount = colCount + (1) >> 0; + } + i = i + (1) >> 0; + } + if (colCount === 1) { + return [size, columns]; + } + header = $subslice(data, 0, (i + 1 >> 0)); + if (((0 < 0 || 0 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 0]) === 124) { + colCount = colCount - (1) >> 0; + } + if (i > 2 && ((x = i - 1 >> 0, ((x < 0 || x >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x])) === 124) && !isBackslashEscaped(data, i - 1 >> 0)) { + colCount = colCount - (1) >> 0; + } + columns = $makeSlice(sliceType$3, colCount); + i = i + (1) >> 0; + if (i >= data.$length) { + return [size, columns]; + } + if ((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 124) && !isBackslashEscaped(data, i)) { + i = i + (1) >> 0; + } + while (true) { + if (!(((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 32)) { break; } + i = i + (1) >> 0; + } + col = 0; + while (true) { + if (!(!((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 10)))) { break; } + dashes = 0; + if (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 58) { + i = i + (1) >> 0; + (col < 0 || col >= columns.$length) ? $throwRuntimeError("index out of range") : columns.$array[columns.$offset + col] = ((col < 0 || col >= columns.$length) ? $throwRuntimeError("index out of range") : columns.$array[columns.$offset + col]) | (1); + dashes = dashes + (1) >> 0; + } + while (true) { + if (!(((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 45)) { break; } + i = i + (1) >> 0; + dashes = dashes + (1) >> 0; + } + if (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 58) { + i = i + (1) >> 0; + (col < 0 || col >= columns.$length) ? $throwRuntimeError("index out of range") : columns.$array[columns.$offset + col] = ((col < 0 || col >= columns.$length) ? $throwRuntimeError("index out of range") : columns.$array[columns.$offset + col]) | (2); + dashes = dashes + (1) >> 0; + } + while (true) { + if (!(((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 32)) { break; } + i = i + (1) >> 0; + } + if (dashes < 3) { + return [size, columns]; + } else if ((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 124) && !isBackslashEscaped(data, i)) { + col = col + (1) >> 0; + i = i + (1) >> 0; + while (true) { + if (!(((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 32)) { break; } + i = i + (1) >> 0; + } + if (col >= colCount && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 10))) { + return [size, columns]; + } + } else if ((!((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 124)) || isBackslashEscaped(data, i)) && (col + 1 >> 0) < colCount) { + return [size, columns]; + } else if (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 10) { + col = col + (1) >> 0; + } else { + return [size, columns]; + } + } + if (!((col === colCount))) { + return [size, columns]; + } + p.tableRow(out, header, columns, true); + size = i + 1 >> 0; + return [size, columns]; + }; + parser.prototype.tableHeader = function(out, data) { return this.$val.tableHeader(out, data); }; + parser.ptr.prototype.tableRow = function(out, data, columns, header) { + var _tmp, _tmp$1, cellEnd, cellStart, cellWork, col, columns, data, header, i, out, p, rowWork, x; + p = this; + _tmp = 0; _tmp$1 = 0; i = _tmp; col = _tmp$1; + rowWork = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + if ((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 124) && !isBackslashEscaped(data, i)) { + i = i + (1) >> 0; + } + col = 0; + while (true) { + if (!(col < columns.$length && i < data.$length)) { break; } + while (true) { + if (!(((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 32)) { break; } + i = i + (1) >> 0; + } + cellStart = i; + while (true) { + if (!((!((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 124)) || isBackslashEscaped(data, i)) && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 10)))) { break; } + i = i + (1) >> 0; + } + cellEnd = i; + i = i + (1) >> 0; + while (true) { + if (!(cellEnd > cellStart && ((x = cellEnd - 1 >> 0, ((x < 0 || x >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x])) === 32))) { break; } + cellEnd = cellEnd - (1) >> 0; + } + cellWork = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + p.inline(cellWork, $subslice(data, cellStart, cellEnd)); + if (header) { + p.r.TableHeaderCell(rowWork, cellWork.Bytes(), ((col < 0 || col >= columns.$length) ? $throwRuntimeError("index out of range") : columns.$array[columns.$offset + col])); + } else { + p.r.TableCell(rowWork, cellWork.Bytes(), ((col < 0 || col >= columns.$length) ? $throwRuntimeError("index out of range") : columns.$array[columns.$offset + col])); + } + col = col + (1) >> 0; + } + while (true) { + if (!(col < columns.$length)) { break; } + if (header) { + p.r.TableHeaderCell(rowWork, sliceType$1.nil, ((col < 0 || col >= columns.$length) ? $throwRuntimeError("index out of range") : columns.$array[columns.$offset + col])); + } else { + p.r.TableCell(rowWork, sliceType$1.nil, ((col < 0 || col >= columns.$length) ? $throwRuntimeError("index out of range") : columns.$array[columns.$offset + col])); + } + col = col + (1) >> 0; + } + p.r.TableRow(out, rowWork.Bytes()); + }; + parser.prototype.tableRow = function(out, data, columns, header) { return this.$val.tableRow(out, data, columns, header); }; + parser.ptr.prototype.quotePrefix = function(data) { + var data, i, p, x; + p = this; + i = 0; + while (true) { + if (!(i < 3 && (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 32))) { break; } + i = i + (1) >> 0; + } + if (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 62) { + if ((x = i + 1 >> 0, ((x < 0 || x >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x])) === 32) { + return i + 2 >> 0; + } + return i + 1 >> 0; + } + return 0; + }; + parser.prototype.quotePrefix = function(data) { return this.$val.quotePrefix(data); }; + parser.ptr.prototype.quote = function(out, data) { + var _tmp, _tmp$1, beg, cooked, data, end, out, p, pre, raw; + p = this; + raw = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + _tmp = 0; _tmp$1 = 0; beg = _tmp; end = _tmp$1; + while (true) { + if (!(beg < data.$length)) { break; } + end = beg; + while (true) { + if (!(!((((end < 0 || end >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + end]) === 10)))) { break; } + end = end + (1) >> 0; + } + end = end + (1) >> 0; + pre = p.quotePrefix($subslice(data, beg)); + if (pre > 0) { + beg = beg + (pre) >> 0; + } else if (p.isEmpty($subslice(data, beg)) > 0 && (end >= data.$length || ((p.quotePrefix($subslice(data, end)) === 0) && (p.isEmpty($subslice(data, end)) === 0)))) { + break; + } + raw.Write($subslice(data, beg, end)); + beg = end; + } + cooked = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + p.block(cooked, raw.Bytes()); + p.r.BlockQuote(out, cooked.Bytes()); + return end; + }; + parser.prototype.quote = function(out, data) { return this.$val.quote(out, data); }; + parser.ptr.prototype.codePrefix = function(data) { + var data, p; + p = this; + if ((((0 < 0 || 0 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 0]) === 32) && (((1 < 0 || 1 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 1]) === 32) && (((2 < 0 || 2 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 2]) === 32) && (((3 < 0 || 3 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 3]) === 32)) { + return 4; + } + return 0; + }; + parser.prototype.codePrefix = function(data) { return this.$val.codePrefix(data); }; + parser.ptr.prototype.code = function(out, data) { + var beg, blankline, data, eol, i, out, p, pre, work, workbytes, x; + p = this; + work = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + i = 0; + while (true) { + if (!(i < data.$length)) { break; } + beg = i; + while (true) { + if (!(!((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 10)))) { break; } + i = i + (1) >> 0; + } + i = i + (1) >> 0; + blankline = p.isEmpty($subslice(data, beg, i)) > 0; + pre = p.codePrefix($subslice(data, beg, i)); + if (pre > 0) { + beg = beg + (pre) >> 0; + } else if (!blankline) { + i = beg; + break; + } + if (blankline) { + work.WriteByte(10); + } else { + work.Write($subslice(data, beg, i)); + } + } + workbytes = work.Bytes(); + eol = workbytes.$length; + while (true) { + if (!(eol > 0 && ((x = eol - 1 >> 0, ((x < 0 || x >= workbytes.$length) ? $throwRuntimeError("index out of range") : workbytes.$array[workbytes.$offset + x])) === 10))) { break; } + eol = eol - (1) >> 0; + } + if (!((eol === workbytes.$length))) { + work.Truncate(eol); + } + work.WriteByte(10); + p.r.BlockCode(out, work.Bytes(), ""); + return i; + }; + parser.prototype.code = function(out, data) { return this.$val.code(out, data); }; + parser.ptr.prototype.uliPrefix = function(data) { + var data, i, p, x; + p = this; + i = 0; + while (true) { + if (!(i < 3 && (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 32))) { break; } + i = i + (1) >> 0; + } + if ((!((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 42)) && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 43)) && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 45))) || !(((x = i + 1 >> 0, ((x < 0 || x >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x])) === 32))) { + return 0; + } + return i + 2 >> 0; + }; + parser.prototype.uliPrefix = function(data) { return this.$val.uliPrefix(data); }; + parser.ptr.prototype.oliPrefix = function(data) { + var data, i, p, start, x; + p = this; + i = 0; + while (true) { + if (!(i < 3 && (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 32))) { break; } + i = i + (1) >> 0; + } + start = i; + while (true) { + if (!(((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) >= 48 && ((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) <= 57)) { break; } + i = i + (1) >> 0; + } + if ((start === i) || !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 46)) || !(((x = i + 1 >> 0, ((x < 0 || x >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x])) === 32))) { + return 0; + } + return i + 2 >> 0; + }; + parser.prototype.oliPrefix = function(data) { return this.$val.oliPrefix(data); }; + parser.ptr.prototype.list = function(out, data, flags) { + var data, flags, i, out, p, work; + p = this; + i = 0; + flags = flags | (4); + work = (function() { + var skip; + while (true) { + if (!(i < data.$length)) { break; } + skip = p.listItem(out, $subslice(data, i), new ptrType$2(function() { return flags; }, function($v) { flags = $v; })); + i = i + (skip) >> 0; + if ((skip === 0) || !(((flags & 8) === 0))) { + break; + } + flags = flags & (-5); + } + return true; + }); + p.r.List(out, work, flags); + return i; + }; + parser.prototype.list = function(out, data, flags) { return this.$val.list(out, data, flags); }; + parser.ptr.prototype.listItem = function(out, data, flags) { + var chunk, containsBlankLine, cooked, cookedBytes, data, flags, i, indent, itemIndent, line, out, p, parsedEnd, raw, rawBytes, sublist, x, x$1, x$2, x$3; + p = this; + itemIndent = 0; + while (true) { + if (!(itemIndent < 3 && (((itemIndent < 0 || itemIndent >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + itemIndent]) === 32))) { break; } + itemIndent = itemIndent + (1) >> 0; + } + i = p.uliPrefix(data); + if (i === 0) { + i = p.oliPrefix(data); + } + if (i === 0) { + return 0; + } + while (true) { + if (!(((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 32)) { break; } + i = i + (1) >> 0; + } + line = i; + while (true) { + if (!(!(((x = i - 1 >> 0, ((x < 0 || x >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x])) === 10)))) { break; } + i = i + (1) >> 0; + } + raw = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + raw.Write($subslice(data, line, i)); + line = i; + containsBlankLine = false; + sublist = 0; + gatherlines: + while (true) { + if (!(line < data.$length)) { break; } + i = i + (1) >> 0; + while (true) { + if (!(!(((x$1 = i - 1 >> 0, ((x$1 < 0 || x$1 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$1])) === 10)))) { break; } + i = i + (1) >> 0; + } + if (p.isEmpty($subslice(data, line, i)) > 0) { + containsBlankLine = true; + line = i; + continue; + } + indent = 0; + while (true) { + if (!(indent < 4 && (line + indent >> 0) < i && ((x$2 = line + indent >> 0, ((x$2 < 0 || x$2 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$2])) === 32))) { break; } + indent = indent + (1) >> 0; + } + chunk = $subslice(data, (line + indent >> 0), i); + if ((p.uliPrefix(chunk) > 0 && !p.isHRule(chunk)) || p.oliPrefix(chunk) > 0) { + if (containsBlankLine) { + flags.$set(flags.$get() | (2)); + } + if (indent <= itemIndent) { + break gatherlines; + } + if (sublist === 0) { + sublist = raw.Len(); + } + } else if (p.isPrefixHeader(chunk)) { + if (containsBlankLine && indent < 4) { + flags.$set(flags.$get() | (8)); + break gatherlines; + } + flags.$set(flags.$get() | (2)); + } else if (containsBlankLine && indent < 4) { + flags.$set(flags.$get() | (8)); + break gatherlines; + } else if (containsBlankLine) { + raw.WriteByte(10); + flags.$set(flags.$get() | (2)); + } + if (containsBlankLine) { + containsBlankLine = false; + raw.WriteByte(10); + } + raw.Write($subslice(data, (line + indent >> 0), i)); + line = i; + } + rawBytes = raw.Bytes(); + cooked = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + if (!(((flags.$get() & 2) === 0))) { + if (sublist > 0) { + p.block(cooked, $subslice(rawBytes, 0, sublist)); + p.block(cooked, $subslice(rawBytes, sublist)); + } else { + p.block(cooked, rawBytes); + } + } else { + if (sublist > 0) { + p.inline(cooked, $subslice(rawBytes, 0, sublist)); + p.block(cooked, $subslice(rawBytes, sublist)); + } else { + p.inline(cooked, rawBytes); + } + } + cookedBytes = cooked.Bytes(); + parsedEnd = cookedBytes.$length; + while (true) { + if (!(parsedEnd > 0 && ((x$3 = parsedEnd - 1 >> 0, ((x$3 < 0 || x$3 >= cookedBytes.$length) ? $throwRuntimeError("index out of range") : cookedBytes.$array[cookedBytes.$offset + x$3])) === 10))) { break; } + parsedEnd = parsedEnd - (1) >> 0; + } + p.r.ListItem(out, $subslice(cookedBytes, 0, parsedEnd), flags.$get()); + return line; + }; + parser.prototype.listItem = function(out, data, flags) { return this.$val.listItem(out, data, flags); }; + parser.ptr.prototype.renderParagraph = function(out, data) { + var beg, data, end, out, p, work, x; + p = this; + if (data.$length === 0) { + return; + } + beg = 0; + while (true) { + if (!(((beg < 0 || beg >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + beg]) === 32)) { break; } + beg = beg + (1) >> 0; + } + end = data.$length - 1 >> 0; + while (true) { + if (!(end > beg && ((x = end - 1 >> 0, ((x < 0 || x >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x])) === 32))) { break; } + end = end - (1) >> 0; + } + work = (function() { + p.inline(out, $subslice(data, beg, end)); + return true; + }); + p.r.Paragraph(out, work); + }; + parser.prototype.renderParagraph = function(out, data) { return this.$val.renderParagraph(out, data); }; + parser.ptr.prototype.paragraph = function(out, data) { + var _tmp, _tmp$1, _tmp$2, current, data, eol, i, id, level, line, n, out, p, prev, work, x; + p = this; + _tmp = 0; _tmp$1 = 0; _tmp$2 = 0; prev = _tmp; line = _tmp$1; i = _tmp$2; + while (true) { + if (!(i < data.$length)) { break; } + prev = line; + current = $subslice(data, i); + line = i; + n = p.isEmpty(current); + if (n > 0) { + p.renderParagraph(out, $subslice(data, 0, i)); + return i + n >> 0; + } + if (i > 0) { + level = p.isUnderlinedHeader(current); + if (level > 0) { + p.renderParagraph(out, $subslice(data, 0, prev)); + eol = i - 1 >> 0; + while (true) { + if (!(prev < eol && (((prev < 0 || prev >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + prev]) === 32))) { break; } + prev = prev + (1) >> 0; + } + while (true) { + if (!(eol > prev && ((x = eol - 1 >> 0, ((x < 0 || x >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x])) === 32))) { break; } + eol = eol - (1) >> 0; + } + work = (function(o, pp, d) { + var d, o, pp; + return (function() { + pp.inline(o, d); + return true; + }); + })(out, p, $subslice(data, prev, eol)); + id = ""; + if (!(((p.flags & 8192) === 0))) { + id = sanitized_anchor_name.Create($bytesToString($subslice(data, prev, eol))); + } + p.r.Header(out, work, level, id); + while (true) { + if (!(!((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 10)))) { break; } + i = i + (1) >> 0; + } + return i; + } + } + if (!(((p.flags & 32) === 0))) { + if ((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 60) && p.html(out, current, false) > 0) { + p.renderParagraph(out, $subslice(data, 0, i)); + return i; + } + } + if (p.isPrefixHeader(current) || p.isHRule(current)) { + p.renderParagraph(out, $subslice(data, 0, i)); + return i; + } + if (!(((p.flags & 1024) === 0))) { + if (!((p.uliPrefix(current) === 0)) || !((p.oliPrefix(current) === 0)) || !((p.quotePrefix(current) === 0)) || !((p.codePrefix(current) === 0))) { + p.renderParagraph(out, $subslice(data, 0, i)); + return i; + } + } + while (true) { + if (!(!((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 10)))) { break; } + i = i + (1) >> 0; + } + i = i + (1) >> 0; + } + p.renderParagraph(out, $subslice(data, 0, i)); + return i; + }; + parser.prototype.paragraph = function(out, data) { return this.$val.paragraph(out, data); }; + parser.ptr.prototype.inline = function(out, data) { + var _tmp, _tmp$1, consumed, data, end, handler, i, out, p, x, x$1, x$2, x$3; + p = this; + if (p.nesting >= p.maxNesting) { + return; + } + p.nesting = p.nesting + (1) >> 0; + _tmp = 0; _tmp$1 = 0; i = _tmp; end = _tmp$1; + while (true) { + if (!(i < data.$length)) { break; } + while (true) { + if (!(end < data.$length && (x = p.inlineCallback, x$1 = ((end < 0 || end >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + end]), ((x$1 < 0 || x$1 >= x.length) ? $throwRuntimeError("index out of range") : x[x$1])) === $throwNilPointerError)) { break; } + end = end + (1) >> 0; + } + p.r.NormalText(out, $subslice(data, i, end)); + if (end >= data.$length) { + break; + } + i = end; + handler = (x$2 = p.inlineCallback, x$3 = ((end < 0 || end >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + end]), ((x$3 < 0 || x$3 >= x$2.length) ? $throwRuntimeError("index out of range") : x$2[x$3])); + consumed = handler(p, out, data, i); + if (consumed === 0) { + end = i + 1 >> 0; + } else { + i = i + (consumed) >> 0; + end = i; + } + } + p.nesting = p.nesting - (1) >> 0; + }; + parser.prototype.inline = function(out, data) { return this.$val.inline(out, data); }; + emphasis = function(p, out, data, offset) { + var c, data, offset, out, p, ret; + data = $subslice(data, offset); + c = ((0 < 0 || 0 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 0]); + ret = 0; + if (data.$length > 2 && !((((1 < 0 || 1 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 1]) === c))) { + if ((c === 126) || isspace(((1 < 0 || 1 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 1]))) { + return 0; + } + ret = helperEmphasis(p, out, $subslice(data, 1), c); + if (ret === 0) { + return 0; + } + return ret + 1 >> 0; + } + if (data.$length > 3 && (((1 < 0 || 1 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 1]) === c) && !((((2 < 0 || 2 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 2]) === c))) { + if (isspace(((2 < 0 || 2 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 2]))) { + return 0; + } + ret = helperDoubleEmphasis(p, out, $subslice(data, 2), c); + if (ret === 0) { + return 0; + } + return ret + 2 >> 0; + } + if (data.$length > 4 && (((1 < 0 || 1 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 1]) === c) && (((2 < 0 || 2 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 2]) === c) && !((((3 < 0 || 3 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 3]) === c))) { + if ((c === 126) || isspace(((3 < 0 || 3 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 3]))) { + return 0; + } + ret = helperTripleEmphasis(p, out, data, 3, c); + if (ret === 0) { + return 0; + } + return ret + 3 >> 0; + } + return 0; + }; + codeSpan = function(p, out, data, offset) { + var _tmp, _tmp$1, data, end, fBegin, fEnd, i, nb, offset, out, p, x; + data = $subslice(data, offset); + nb = 0; + while (true) { + if (!(nb < data.$length && (((nb < 0 || nb >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + nb]) === 96))) { break; } + nb = nb + (1) >> 0; + } + _tmp = 0; _tmp$1 = 0; i = _tmp; end = _tmp$1; + end = nb; + while (true) { + if (!(end < data.$length && i < nb)) { break; } + if (((end < 0 || end >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + end]) === 96) { + i = i + (1) >> 0; + } else { + i = 0; + } + end = end + (1) >> 0; + } + if (i < nb && end >= data.$length) { + return 0; + } + fBegin = nb; + while (true) { + if (!(fBegin < end && (((fBegin < 0 || fBegin >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + fBegin]) === 32))) { break; } + fBegin = fBegin + (1) >> 0; + } + fEnd = end - nb >> 0; + while (true) { + if (!(fEnd > fBegin && ((x = fEnd - 1 >> 0, ((x < 0 || x >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x])) === 32))) { break; } + fEnd = fEnd - (1) >> 0; + } + if (!((fBegin === fEnd))) { + p.r.CodeSpan(out, $subslice(data, fBegin, fEnd)); + } + return end; + }; + lineBreak = function(p, out, data, offset) { + var data, end, eol, offset, out, outBytes, p, precededByTwoSpaces, x, x$1, x$2; + outBytes = out.Bytes(); + end = outBytes.$length; + eol = end; + while (true) { + if (!(eol > 0 && ((x = eol - 1 >> 0, ((x < 0 || x >= outBytes.$length) ? $throwRuntimeError("index out of range") : outBytes.$array[outBytes.$offset + x])) === 32))) { break; } + eol = eol - (1) >> 0; + } + out.Truncate(eol); + precededByTwoSpaces = offset >= 2 && ((x$1 = offset - 2 >> 0, ((x$1 < 0 || x$1 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$1])) === 32) && ((x$2 = offset - 1 >> 0, ((x$2 < 0 || x$2 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$2])) === 32); + if (((p.flags & 128) === 0) && !precededByTwoSpaces) { + return 0; + } + p.r.LineBreak(out); + return 1; + }; + link = function(p, out, data, offset) { + var _entry, _entry$1, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, b, b$1, content, data, fragment, i, id, id$1, insideLink, j, j$1, key, key$1, level, link$1, linkB, linkB$1, linkE, linkE$1, lr, lr$1, noteId, offset, ok, ok$1, out, outBytes, outBytes$1, outSize, outSize$1, p, ref, t, textHasNl, title, titleB, titleE, txtE, uLink, uLinkBuf, x, x$1, x$10, x$11, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + if (p.insideLink && (offset > 0 && ((x = offset - 1 >> 0, ((x < 0 || x >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x])) === 91) || (data.$length - 1 >> 0) > offset && ((x$1 = offset + 1 >> 0, ((x$1 < 0 || x$1 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$1])) === 94))) { + return 0; + } + t = 0; + if (offset > 0 && ((x$2 = offset - 1 >> 0, ((x$2 < 0 || x$2 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$2])) === 33)) { + t = 1; + } else if (!(((p.flags & 512) === 0))) { + if (offset > 0 && ((x$3 = offset - 1 >> 0, ((x$3 < 0 || x$3 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$3])) === 94)) { + t = 3; + } else if ((data.$length - 1 >> 0) > offset && ((x$4 = offset + 1 >> 0, ((x$4 < 0 || x$4 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$4])) === 94)) { + t = 2; + } + } + data = $subslice(data, offset); + i = 1; + noteId = 0; + _tmp = sliceType$1.nil; _tmp$1 = sliceType$1.nil; title = _tmp; link$1 = _tmp$1; + textHasNl = false; + if (t === 2) { + i = i + (1) >> 0; + } + level = 1; + while (true) { + if (!(level > 0 && i < data.$length)) { break; } + if (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 10) { + textHasNl = true; + } else if ((x$5 = i - 1 >> 0, ((x$5 < 0 || x$5 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$5])) === 92) { + i = i + (1) >> 0; + continue; + } else if (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 91) { + level = level + (1) >> 0; + } else if (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 93) { + level = level - (1) >> 0; + if (level <= 0) { + i = i - (1) >> 0; + } + } + i = i + (1) >> 0; + } + if (i >= data.$length) { + return 0; + } + txtE = i; + i = i + (1) >> 0; + while (true) { + if (!(i < data.$length && isspace(((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i])))) { break; } + i = i + (1) >> 0; + } + if (i < data.$length && (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 40)) { + i = i + (1) >> 0; + while (true) { + if (!(i < data.$length && isspace(((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i])))) { break; } + i = i + (1) >> 0; + } + linkB = i; + findlinkend: + while (true) { + if (!(i < data.$length)) { break; } + if (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 92) { + i = i + (2) >> 0; + } else if ((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 41) || (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 39) || (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 34)) { + break findlinkend; + } else { + i = i + (1) >> 0; + } + } + if (i >= data.$length) { + return 0; + } + linkE = i; + _tmp$2 = 0; _tmp$3 = 0; titleB = _tmp$2; titleE = _tmp$3; + if ((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 39) || (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 34)) { + i = i + (1) >> 0; + titleB = i; + findtitleend: + while (true) { + if (!(i < data.$length)) { break; } + if (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 92) { + i = i + (2) >> 0; + } else if (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 41) { + break findtitleend; + } else { + i = i + (1) >> 0; + } + } + if (i >= data.$length) { + return 0; + } + titleE = i - 1 >> 0; + while (true) { + if (!(titleE > titleB && isspace(((titleE < 0 || titleE >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + titleE])))) { break; } + titleE = titleE - (1) >> 0; + } + if (!((((titleE < 0 || titleE >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + titleE]) === 39)) && !((((titleE < 0 || titleE >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + titleE]) === 34))) { + _tmp$4 = 0; _tmp$5 = 0; titleB = _tmp$4; titleE = _tmp$5; + linkE = i; + } + } + while (true) { + if (!(linkE > linkB && isspace((x$6 = linkE - 1 >> 0, ((x$6 < 0 || x$6 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$6]))))) { break; } + linkE = linkE - (1) >> 0; + } + if (((linkB < 0 || linkB >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + linkB]) === 60) { + linkB = linkB + (1) >> 0; + } + if ((x$7 = linkE - 1 >> 0, ((x$7 < 0 || x$7 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$7])) === 62) { + linkE = linkE - (1) >> 0; + } + if (linkE > linkB) { + link$1 = $subslice(data, linkB, linkE); + } + if (titleE > titleB) { + title = $subslice(data, titleB, titleE); + } + i = i + (1) >> 0; + } else if (i < data.$length && (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 91)) { + id = sliceType$1.nil; + i = i + (1) >> 0; + linkB$1 = i; + while (true) { + if (!(i < data.$length && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 93)))) { break; } + i = i + (1) >> 0; + } + if (i >= data.$length) { + return 0; + } + linkE$1 = i; + if (linkB$1 === linkE$1) { + if (textHasNl) { + b = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + j = 1; + while (true) { + if (!(j < txtE)) { break; } + if (!((((j < 0 || j >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + j]) === 10))) { + b.WriteByte(((j < 0 || j >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + j])); + } else if (!(((x$8 = j - 1 >> 0, ((x$8 < 0 || x$8 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$8])) === 32))) { + b.WriteByte(32); + } + j = j + (1) >> 0; + } + id = b.Bytes(); + } else { + id = $subslice(data, 1, txtE); + } + } else { + id = $subslice(data, linkB$1, linkE$1); + } + key = $bytesToString(bytes.ToLower(id)); + _tuple = (_entry = p.refs[key], _entry !== undefined ? [_entry.v, true] : [ptrType$5.nil, false]); lr = _tuple[0]; ok = _tuple[1]; + if (!ok) { + return 0; + } + link$1 = lr.link; + title = lr.title; + i = i + (1) >> 0; + } else { + id$1 = sliceType$1.nil; + if (textHasNl) { + b$1 = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + j$1 = 1; + while (true) { + if (!(j$1 < txtE)) { break; } + if (!((((j$1 < 0 || j$1 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + j$1]) === 10))) { + b$1.WriteByte(((j$1 < 0 || j$1 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + j$1])); + } else if (!(((x$9 = j$1 - 1 >> 0, ((x$9 < 0 || x$9 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$9])) === 32))) { + b$1.WriteByte(32); + } + j$1 = j$1 + (1) >> 0; + } + id$1 = b$1.Bytes(); + } else { + if (t === 2) { + id$1 = $subslice(data, 2, txtE); + } else { + id$1 = $subslice(data, 1, txtE); + } + } + key$1 = $bytesToString(bytes.ToLower(id$1)); + if (t === 3) { + noteId = p.notes.$length + 1 >> 0; + fragment = sliceType$1.nil; + if (id$1.$length > 0) { + if (id$1.$length < 16) { + fragment = $makeSlice(sliceType$1, id$1.$length); + } else { + fragment = $makeSlice(sliceType$1, 16); + } + $copySlice(fragment, slugify(id$1)); + } else { + fragment = $appendSlice(new sliceType$1($stringToBytes("footnote-")), new sliceType$1($stringToBytes(strconv.Itoa(noteId)))); + } + ref = new reference.ptr(fragment, id$1, noteId, false); + p.notes = $append(p.notes, ref); + link$1 = ref.link; + title = ref.title; + } else { + _tuple$1 = (_entry$1 = p.refs[key$1], _entry$1 !== undefined ? [_entry$1.v, true] : [ptrType$5.nil, false]); lr$1 = _tuple$1[0]; ok$1 = _tuple$1[1]; + if (!ok$1) { + return 0; + } + if (t === 2) { + lr$1.noteId = p.notes.$length + 1 >> 0; + p.notes = $append(p.notes, lr$1); + } + link$1 = lr$1.link; + title = lr$1.title; + noteId = lr$1.noteId; + } + i = txtE + 1 >> 0; + } + content = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + if (txtE > 1) { + if (t === 1) { + content.Write($subslice(data, 1, txtE)); + } else { + insideLink = p.insideLink; + p.insideLink = true; + p.inline(content, $subslice(data, 1, txtE)); + p.insideLink = insideLink; + } + } + uLink = sliceType$1.nil; + if ((t === 0) || (t === 1)) { + if (link$1.$length > 0) { + uLinkBuf = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + unescapeText(uLinkBuf, link$1); + uLink = uLinkBuf.Bytes(); + } + if ((uLink.$length === 0) || ((t === 0) && (content.Len() === 0))) { + return 0; + } + } + _ref = t; + if (_ref === 0) { + p.r.Link(out, uLink, title, content.Bytes()); + } else if (_ref === 1) { + outSize = out.Len(); + outBytes = out.Bytes(); + if (outSize > 0 && ((x$10 = outSize - 1 >> 0, ((x$10 < 0 || x$10 >= outBytes.$length) ? $throwRuntimeError("index out of range") : outBytes.$array[outBytes.$offset + x$10])) === 33)) { + out.Truncate(outSize - 1 >> 0); + } + p.r.Image(out, uLink, title, content.Bytes()); + } else if (_ref === 3) { + outSize$1 = out.Len(); + outBytes$1 = out.Bytes(); + if (outSize$1 > 0 && ((x$11 = outSize$1 - 1 >> 0, ((x$11 < 0 || x$11 >= outBytes$1.$length) ? $throwRuntimeError("index out of range") : outBytes$1.$array[outBytes$1.$offset + x$11])) === 94)) { + out.Truncate(outSize$1 - 1 >> 0); + } + p.r.FootnoteRef(out, link$1, noteId); + } else if (_ref === 2) { + p.r.FootnoteRef(out, link$1, noteId); + } else { + return 0; + } + return i; + }; + leftAngle = function(p, out, data, offset) { + var altype, data, end, offset, out, p, uLink; + data = $subslice(data, offset); + altype = 0; + end = tagLength(data, new ptrType$2(function() { return altype; }, function($v) { altype = $v; })); + if (end > 2) { + if (!((altype === 0))) { + uLink = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + unescapeText(uLink, $subslice(data, 1, ((end + 1 >> 0) - 2 >> 0))); + if (uLink.Len() > 0) { + p.r.AutoLink(out, uLink.Bytes(), altype); + } + } else { + p.r.RawHtmlTag(out, $subslice(data, 0, end)); + } + } + return end; + }; + escape = function(p, out, data, offset) { + var data, offset, out, p; + data = $subslice(data, offset); + if (data.$length > 1) { + if (bytes.IndexByte(escapeChars, ((1 < 0 || 1 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 1])) < 0) { + return 0; + } + p.r.NormalText(out, $subslice(data, 1, 2)); + } + return 2; + }; + unescapeText = function(ob, src) { + var i, ob, org, src, x; + i = 0; + while (true) { + if (!(i < src.$length)) { break; } + org = i; + while (true) { + if (!(i < src.$length && !((((i < 0 || i >= src.$length) ? $throwRuntimeError("index out of range") : src.$array[src.$offset + i]) === 92)))) { break; } + i = i + (1) >> 0; + } + if (i > org) { + ob.Write($subslice(src, org, i)); + } + if ((i + 1 >> 0) >= src.$length) { + break; + } + ob.WriteByte((x = i + 1 >> 0, ((x < 0 || x >= src.$length) ? $throwRuntimeError("index out of range") : src.$array[src.$offset + x]))); + i = i + (2) >> 0; + } + }; + entity = function(p, out, data, offset) { + var data, end, offset, out, p; + data = $subslice(data, offset); + end = 1; + if (end < data.$length && (((end < 0 || end >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + end]) === 35)) { + end = end + (1) >> 0; + } + while (true) { + if (!(end < data.$length && isalnum(((end < 0 || end >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + end])))) { break; } + end = end + (1) >> 0; + } + if (end < data.$length && (((end < 0 || end >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + end]) === 59)) { + end = end + (1) >> 0; + } else { + return 0; + } + p.r.Entity(out, $subslice(data, 0, end)); + return end; + }; + linkEndsWithEntity = function(data, linkEnd) { + var data, entityRanges, linkEnd, x, x$1; + entityRanges = htmlEntity.FindAllIndex($subslice(data, 0, linkEnd), -1); + if (!(entityRanges === sliceType$5.nil) && ((x = (x$1 = entityRanges.$length - 1 >> 0, ((x$1 < 0 || x$1 >= entityRanges.$length) ? $throwRuntimeError("index out of range") : entityRanges.$array[entityRanges.$offset + x$1])), ((1 < 0 || 1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 1])) === linkEnd)) { + return true; + } + return false; + }; + autoLink = function(p, out, data, offset) { + var _ref, anchorStart, anchorStr, bufEnd, copen, data, linkEnd, offset, offsetFromAnchor, openDelim, origData, out, p, rewind, uLink, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + if (p.insideLink || data.$length < (offset + 3 >> 0) || !(((x = offset + 1 >> 0, ((x < 0 || x >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x])) === 47)) || !(((x$1 = offset + 2 >> 0, ((x$1 < 0 || x$1 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$1])) === 47))) { + return 0; + } + anchorStart = offset; + offsetFromAnchor = 0; + while (true) { + if (!(anchorStart > 0 && !((((anchorStart < 0 || anchorStart >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + anchorStart]) === 60)))) { break; } + anchorStart = anchorStart - (1) >> 0; + offsetFromAnchor = offsetFromAnchor + (1) >> 0; + } + anchorStr = anchorRe.Find($subslice(data, anchorStart)); + if (!(anchorStr === sliceType$1.nil)) { + out.Write($subslice(anchorStr, offsetFromAnchor)); + return anchorStr.$length - offsetFromAnchor >> 0; + } + rewind = 0; + while (true) { + if (!((offset - rewind >> 0) > 0 && rewind <= 7 && isletter((x$2 = (offset - rewind >> 0) - 1 >> 0, ((x$2 < 0 || x$2 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$2]))))) { break; } + rewind = rewind + (1) >> 0; + } + if (rewind > 6) { + return 0; + } + origData = data; + data = $subslice(data, (offset - rewind >> 0)); + if (!isSafeLink(data)) { + return 0; + } + linkEnd = 0; + while (true) { + if (!(linkEnd < data.$length && !isEndOfLink(((linkEnd < 0 || linkEnd >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + linkEnd])))) { break; } + linkEnd = linkEnd + (1) >> 0; + } + if ((((x$3 = linkEnd - 1 >> 0, ((x$3 < 0 || x$3 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$3])) === 46) || ((x$4 = linkEnd - 1 >> 0, ((x$4 < 0 || x$4 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$4])) === 44)) && !(((x$5 = linkEnd - 2 >> 0, ((x$5 < 0 || x$5 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$5])) === 92))) { + linkEnd = linkEnd - (1) >> 0; + } + if (((x$6 = linkEnd - 1 >> 0, ((x$6 < 0 || x$6 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$6])) === 59) && !(((x$7 = linkEnd - 2 >> 0, ((x$7 < 0 || x$7 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$7])) === 92)) && !linkEndsWithEntity(data, linkEnd)) { + linkEnd = linkEnd - (1) >> 0; + } + copen = 0; + _ref = (x$8 = linkEnd - 1 >> 0, ((x$8 < 0 || x$8 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$8])); + if (_ref === 34) { + copen = 34; + } else if (_ref === 39) { + copen = 39; + } else if (_ref === 41) { + copen = 40; + } else if (_ref === 93) { + copen = 91; + } else if (_ref === 125) { + copen = 123; + } else { + copen = 0; + } + if (!((copen === 0))) { + bufEnd = ((offset - rewind >> 0) + linkEnd >> 0) - 2 >> 0; + openDelim = 1; + while (true) { + if (!(bufEnd >= 0 && !((((bufEnd < 0 || bufEnd >= origData.$length) ? $throwRuntimeError("index out of range") : origData.$array[origData.$offset + bufEnd]) === 10)) && !((openDelim === 0)))) { break; } + if (((bufEnd < 0 || bufEnd >= origData.$length) ? $throwRuntimeError("index out of range") : origData.$array[origData.$offset + bufEnd]) === (x$9 = linkEnd - 1 >> 0, ((x$9 < 0 || x$9 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$9]))) { + openDelim = openDelim + (1) >> 0; + } + if (((bufEnd < 0 || bufEnd >= origData.$length) ? $throwRuntimeError("index out of range") : origData.$array[origData.$offset + bufEnd]) === copen) { + openDelim = openDelim - (1) >> 0; + } + bufEnd = bufEnd - (1) >> 0; + } + if (openDelim === 0) { + linkEnd = linkEnd - (1) >> 0; + } + } + if (out.Len() >= rewind) { + out.Truncate(out.Bytes().$length - rewind >> 0); + } + uLink = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + unescapeText(uLink, $subslice(data, 0, linkEnd)); + if (uLink.Len() > 0) { + p.r.AutoLink(out, uLink.Bytes(), 1); + } + return linkEnd - rewind >> 0; + }; + isEndOfLink = function(char$1) { + var char$1; + return isspace(char$1) || (char$1 === 60); + }; + isSafeLink = function(link$1) { + var _i, _ref, link$1, prefix, x; + _ref = validUris; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + prefix = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (link$1.$length > prefix.$length && bytes.Equal(bytes.ToLower($subslice(link$1, 0, prefix.$length)), prefix) && isalnum((x = prefix.$length, ((x < 0 || x >= link$1.$length) ? $throwRuntimeError("index out of range") : link$1.$array[link$1.$offset + x])))) { + return true; + } + _i++; + } + return false; + }; + tagLength = function(data, autolink) { + var _tmp, _tmp$1, autolink, data, i, j; + _tmp = 0; _tmp$1 = 0; i = _tmp; j = _tmp$1; + if (data.$length < 3) { + return 0; + } + if (!((((0 < 0 || 0 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 0]) === 60))) { + return 0; + } + if (((1 < 0 || 1 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 1]) === 47) { + i = 2; + } else { + i = 1; + } + if (!isalnum(((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]))) { + return 0; + } + autolink.$set(0); + while (true) { + if (!(i < data.$length && (isalnum(((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i])) || (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 46) || (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 43) || (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 45)))) { break; } + i = i + (1) >> 0; + } + if (i > 1 && i < data.$length && (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 64)) { + j = isMailtoAutoLink($subslice(data, i)); + if (!((j === 0))) { + autolink.$set(2); + return i + j >> 0; + } + } + if (i > 2 && i < data.$length && (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 58)) { + autolink.$set(1); + i = i + (1) >> 0; + } + if (i >= data.$length) { + autolink.$set(0); + } else if (!((autolink.$get() === 0))) { + j = i; + while (true) { + if (!(i < data.$length)) { break; } + if (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 92) { + i = i + (2) >> 0; + } else if ((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 62) || (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 39) || (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 34) || isspace(((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]))) { + break; + } else { + i = i + (1) >> 0; + } + } + if (i >= data.$length) { + return 0; + } + if (i > j && (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 62)) { + return i + 1 >> 0; + } + autolink.$set(0); + } + while (true) { + if (!(i < data.$length && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 62)))) { break; } + i = i + (1) >> 0; + } + if (i >= data.$length) { + return 0; + } + return i + 1 >> 0; + }; + isMailtoAutoLink = function(data) { + var _ref, data, i, nb; + nb = 0; + i = 0; + while (true) { + if (!(i < data.$length)) { break; } + if (isalnum(((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]))) { + i = i + (1) >> 0; + continue; + } + _ref = ((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]); + switch (0) { default: if (_ref === 64) { + nb = nb + (1) >> 0; + } else if (_ref === 45 || _ref === 46 || _ref === 95) { + break; + } else if (_ref === 62) { + if (nb === 1) { + return i + 1 >> 0; + } else { + return 0; + } + } else { + return 0; + } } + i = i + (1) >> 0; + } + return 0; + }; + helperFindEmphChar = function(data, c) { + var c, cc, data, i, tmpI, tmpI$1, x; + i = 1; + while (true) { + if (!(i < data.$length)) { break; } + while (true) { + if (!(i < data.$length && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === c)) && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 96)) && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 91)))) { break; } + i = i + (1) >> 0; + } + if (i >= data.$length) { + return 0; + } + if (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === c) { + return i; + } + if (!((i === 0)) && ((x = i - 1 >> 0, ((x < 0 || x >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x])) === 92)) { + i = i + (1) >> 0; + continue; + } + if (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 96) { + tmpI = 0; + i = i + (1) >> 0; + while (true) { + if (!(i < data.$length && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 96)))) { break; } + if ((tmpI === 0) && (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === c)) { + tmpI = i; + } + i = i + (1) >> 0; + } + if (i >= data.$length) { + return tmpI; + } + i = i + (1) >> 0; + } else if (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 91) { + tmpI$1 = 0; + i = i + (1) >> 0; + while (true) { + if (!(i < data.$length && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 93)))) { break; } + if ((tmpI$1 === 0) && (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === c)) { + tmpI$1 = i; + } + i = i + (1) >> 0; + } + i = i + (1) >> 0; + while (true) { + if (!(i < data.$length && ((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 32) || (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 10)))) { break; } + i = i + (1) >> 0; + } + if (i >= data.$length) { + return tmpI$1; + } + if (!((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 91)) && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 40))) { + if (tmpI$1 > 0) { + return tmpI$1; + } else { + continue; + } + } + cc = ((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]); + i = i + (1) >> 0; + while (true) { + if (!(i < data.$length && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === cc)))) { break; } + if ((tmpI$1 === 0) && (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === c)) { + return i; + } + i = i + (1) >> 0; + } + if (i >= data.$length) { + return tmpI$1; + } + i = i + (1) >> 0; + } + } + return 0; + }; + helperEmphasis = function(p, out, data, c) { + var c, data, i, length, out, p, work, x, x$1, x$2, x$3; + i = 0; + if (data.$length > 1 && (((0 < 0 || 0 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 0]) === c) && (((1 < 0 || 1 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 1]) === c)) { + i = 1; + } + while (true) { + if (!(i < data.$length)) { break; } + length = helperFindEmphChar($subslice(data, i), c); + if (length === 0) { + return 0; + } + i = i + (length) >> 0; + if (i >= data.$length) { + return 0; + } + if ((i + 1 >> 0) < data.$length && ((x = i + 1 >> 0, ((x < 0 || x >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x])) === c)) { + i = i + (1) >> 0; + continue; + } + if ((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === c) && !isspace((x$1 = i - 1 >> 0, ((x$1 < 0 || x$1 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$1])))) { + if (!(((p.flags & 1) === 0))) { + if (!(((i + 1 >> 0) === data.$length) || isspace((x$2 = i + 1 >> 0, ((x$2 < 0 || x$2 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$2]))) || ispunct((x$3 = i + 1 >> 0, ((x$3 < 0 || x$3 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$3]))))) { + continue; + } + } + work = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + p.inline(work, $subslice(data, 0, i)); + p.r.Emphasis(out, work.Bytes()); + return i + 1 >> 0; + } + } + return 0; + }; + helperDoubleEmphasis = function(p, out, data, c) { + var c, data, i, length, out, p, work, x, x$1; + i = 0; + while (true) { + if (!(i < data.$length)) { break; } + length = helperFindEmphChar($subslice(data, i), c); + if (length === 0) { + return 0; + } + i = i + (length) >> 0; + if ((i + 1 >> 0) < data.$length && (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === c) && ((x = i + 1 >> 0, ((x < 0 || x >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x])) === c) && i > 0 && !isspace((x$1 = i - 1 >> 0, ((x$1 < 0 || x$1 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$1])))) { + work = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + p.inline(work, $subslice(data, 0, i)); + if (work.Len() > 0) { + if (c === 126) { + p.r.StrikeThrough(out, work.Bytes()); + } else { + p.r.DoubleEmphasis(out, work.Bytes()); + } + } + return i + 2 >> 0; + } + i = i + (1) >> 0; + } + return 0; + }; + helperTripleEmphasis = function(p, out, data, offset, c) { + var c, data, i, length, offset, origData, out, p, work, x, x$1, x$2, x$3; + i = 0; + origData = data; + data = $subslice(data, offset); + while (true) { + if (!(i < data.$length)) { break; } + length = helperFindEmphChar($subslice(data, i), c); + if (length === 0) { + return 0; + } + i = i + (length) >> 0; + if (!((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === c)) || isspace((x = i - 1 >> 0, ((x < 0 || x >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x])))) { + continue; + } + if ((i + 2 >> 0) < data.$length && ((x$1 = i + 1 >> 0, ((x$1 < 0 || x$1 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$1])) === c) && ((x$2 = i + 2 >> 0, ((x$2 < 0 || x$2 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$2])) === c)) { + work = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + p.inline(work, $subslice(data, 0, i)); + if (work.Len() > 0) { + p.r.TripleEmphasis(out, work.Bytes()); + } + return i + 3 >> 0; + } else if ((i + 1 >> 0) < data.$length && ((x$3 = i + 1 >> 0, ((x$3 < 0 || x$3 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$3])) === c)) { + length = helperEmphasis(p, out, $subslice(origData, (offset - 2 >> 0)), c); + if (length === 0) { + return 0; + } else { + return length - 2 >> 0; + } + } else { + length = helperDoubleEmphasis(p, out, $subslice(origData, (offset - 1 >> 0)), c); + if (length === 0) { + return 0; + } else { + return length - 1 >> 0; + } + } + } + return 0; + }; + Markdown = $pkg.Markdown = function(input, renderer, extensions) { + var extensions, first, input, p, renderer, second; + if ($interfaceIsEqual(renderer, $ifaceNil)) { + return sliceType$1.nil; + } + p = new parser.ptr(); + p.r = renderer; + p.flags = extensions; + p.refs = new $Map(); + p.maxNesting = 16; + p.insideLink = false; + p.inlineCallback[42] = emphasis; + p.inlineCallback[95] = emphasis; + if (!(((extensions & 16) === 0))) { + p.inlineCallback[126] = emphasis; + } + p.inlineCallback[96] = codeSpan; + p.inlineCallback[10] = lineBreak; + p.inlineCallback[91] = link; + p.inlineCallback[60] = leftAngle; + p.inlineCallback[92] = escape; + p.inlineCallback[38] = entity; + if (!(((extensions & 8) === 0))) { + p.inlineCallback[58] = autoLink; + } + if (!(((extensions & 512) === 0))) { + p.notes = $makeSlice(sliceType$6, 0); + } + first = firstPass(p, input); + second = secondPass(p, first); + return second; + }; + firstPass = function(p, input) { + var _tmp, _tmp$1, beg, end, i, input, lastFencedCodeBlockEnd, lastLineWasBlank, out, p, tabSize; + out = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + tabSize = 4; + if (!(((p.flags & 256) === 0))) { + tabSize = 8; + } + _tmp = 0; _tmp$1 = 0; beg = _tmp; end = _tmp$1; + lastLineWasBlank = false; + lastFencedCodeBlockEnd = 0; + while (true) { + if (!(beg < input.$length)) { break; } + end = isReference(p, $subslice(input, beg), tabSize); + if (end > 0) { + beg = beg + (end) >> 0; + } else { + end = beg; + while (true) { + if (!(end < input.$length && !((((end < 0 || end >= input.$length) ? $throwRuntimeError("index out of range") : input.$array[input.$offset + end]) === 10)) && !((((end < 0 || end >= input.$length) ? $throwRuntimeError("index out of range") : input.$array[input.$offset + end]) === 13)))) { break; } + end = end + (1) >> 0; + } + if (!(((p.flags & 4) === 0))) { + if (beg >= lastFencedCodeBlockEnd) { + i = p.fencedCode(out, $subslice(input, beg), false); + if (i > 0) { + if (!lastLineWasBlank) { + out.WriteByte(10); + } + lastFencedCodeBlockEnd = beg + i >> 0; + } + } + lastLineWasBlank = end === beg; + } + if (end > beg) { + if (end < lastFencedCodeBlockEnd) { + out.Write($subslice(input, beg, end)); + } else { + expandTabs(out, $subslice(input, beg, end), tabSize); + } + } + out.WriteByte(10); + if (end < input.$length && (((end < 0 || end >= input.$length) ? $throwRuntimeError("index out of range") : input.$array[input.$offset + end]) === 13)) { + end = end + (1) >> 0; + } + if (end < input.$length && (((end < 0 || end >= input.$length) ? $throwRuntimeError("index out of range") : input.$array[input.$offset + end]) === 10)) { + end = end + (1) >> 0; + } + beg = end; + } + } + if (out.Len() === 0) { + out.WriteByte(10); + } + return out.Bytes(); + }; + secondPass = function(p, input) { + var input, output, p; + output = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + p.r.DocumentHeader(output); + p.block(output, input); + if (!(((p.flags & 512) === 0)) && p.notes.$length > 0) { + p.r.Footnotes(output, (function() { + var _i, _ref, buf, flags, ref; + flags = 4; + _ref = p.notes; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + ref = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + buf = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + if (ref.hasBlock) { + flags = flags | (2); + p.block(buf, ref.title); + } else { + p.inline(buf, ref.title); + } + p.r.FootnoteItem(output, ref.link, buf.Bytes(), flags); + flags = flags & ~(6); + _i++; + } + return true; + })); + } + p.r.DocumentFooter(output); + if (!((p.nesting === 0))) { + $panic(new $String("Nesting level did not end at zero")); + } + return output.Bytes(); + }; + isReference = function(p, data, tabSize) { + var _key$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, data, hasBlock, i, id, idEnd, idOffset, lineEnd, linkEnd, linkOffset, noteId, p, raw, ref, tabSize, titleEnd, titleOffset, x; + if (data.$length < 4) { + return 0; + } + i = 0; + while (true) { + if (!(i < 3 && (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 32))) { break; } + i = i + (1) >> 0; + } + noteId = 0; + if (!((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 91))) { + return 0; + } + i = i + (1) >> 0; + if (!(((p.flags & 512) === 0))) { + if (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 94) { + noteId = 1; + i = i + (1) >> 0; + } + } + idOffset = i; + while (true) { + if (!(i < data.$length && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 10)) && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 13)) && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 93)))) { break; } + i = i + (1) >> 0; + } + if (i >= data.$length || !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 93))) { + return 0; + } + idEnd = i; + i = i + (1) >> 0; + if (i >= data.$length || !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 58))) { + return 0; + } + i = i + (1) >> 0; + while (true) { + if (!(i < data.$length && ((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 32) || (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 9)))) { break; } + i = i + (1) >> 0; + } + if (i < data.$length && ((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 10) || (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 13))) { + i = i + (1) >> 0; + if (i < data.$length && (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 10) && ((x = i - 1 >> 0, ((x < 0 || x >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x])) === 13)) { + i = i + (1) >> 0; + } + } + while (true) { + if (!(i < data.$length && ((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 32) || (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 9)))) { break; } + i = i + (1) >> 0; + } + if (i >= data.$length) { + return 0; + } + _tmp = 0; _tmp$1 = 0; linkOffset = _tmp; linkEnd = _tmp$1; + _tmp$2 = 0; _tmp$3 = 0; titleOffset = _tmp$2; titleEnd = _tmp$3; + lineEnd = 0; + raw = sliceType$1.nil; + hasBlock = false; + if (!(((p.flags & 512) === 0)) && !((noteId === 0))) { + _tuple = scanFootnote(p, data, i, tabSize); linkOffset = _tuple[0]; linkEnd = _tuple[1]; raw = _tuple[2]; hasBlock = _tuple[3]; + lineEnd = linkEnd; + } else { + _tuple$1 = scanLinkRef(p, data, i); linkOffset = _tuple$1[0]; linkEnd = _tuple$1[1]; titleOffset = _tuple$1[2]; titleEnd = _tuple$1[3]; lineEnd = _tuple$1[4]; + } + if (lineEnd === 0) { + return 0; + } + ref = new reference.ptr(sliceType$1.nil, sliceType$1.nil, noteId, hasBlock); + if (noteId > 0) { + ref.link = $subslice(data, idOffset, idEnd); + ref.title = raw; + } else { + ref.link = $subslice(data, linkOffset, linkEnd); + ref.title = $subslice(data, titleOffset, titleEnd); + } + id = $bytesToString(bytes.ToLower($subslice(data, idOffset, idEnd))); + _key$1 = id; (p.refs || $throwRuntimeError("assignment to entry in nil map"))[_key$1] = { k: _key$1, v: ref }; + return lineEnd; + }; + scanLinkRef = function(p, data, i) { + var data, i, lineEnd = 0, linkEnd = 0, linkOffset = 0, p, titleEnd = 0, titleOffset = 0, x, x$1, x$2; + if (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 60) { + i = i + (1) >> 0; + } + linkOffset = i; + while (true) { + if (!(i < data.$length && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 32)) && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 9)) && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 10)) && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 13)))) { break; } + i = i + (1) >> 0; + } + linkEnd = i; + if ((((linkOffset < 0 || linkOffset >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + linkOffset]) === 60) && ((x = linkEnd - 1 >> 0, ((x < 0 || x >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x])) === 62)) { + linkOffset = linkOffset + (1) >> 0; + linkEnd = linkEnd - (1) >> 0; + } + while (true) { + if (!(i < data.$length && ((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 32) || (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 9)))) { break; } + i = i + (1) >> 0; + } + if (i < data.$length && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 10)) && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 13)) && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 39)) && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 34)) && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 40))) { + return [linkOffset, linkEnd, titleOffset, titleEnd, lineEnd]; + } + if (i >= data.$length || (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 13) || (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 10)) { + lineEnd = i; + } + if ((i + 1 >> 0) < data.$length && (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 13) && ((x$1 = i + 1 >> 0, ((x$1 < 0 || x$1 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$1])) === 10)) { + lineEnd = lineEnd + (1) >> 0; + } + if (lineEnd > 0) { + i = lineEnd + 1 >> 0; + while (true) { + if (!(i < data.$length && ((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 32) || (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 9)))) { break; } + i = i + (1) >> 0; + } + } + if ((i + 1 >> 0) < data.$length && ((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 39) || (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 34) || (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 40))) { + i = i + (1) >> 0; + titleOffset = i; + while (true) { + if (!(i < data.$length && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 10)) && !((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 13)))) { break; } + i = i + (1) >> 0; + } + if ((i + 1 >> 0) < data.$length && (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 10) && ((x$2 = i + 1 >> 0, ((x$2 < 0 || x$2 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$2])) === 13)) { + titleEnd = i + 1 >> 0; + } else { + titleEnd = i; + } + i = i - (1) >> 0; + while (true) { + if (!(i > titleOffset && ((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 32) || (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 9)))) { break; } + i = i - (1) >> 0; + } + if (i > titleOffset && ((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 39) || (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 34) || (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 41))) { + lineEnd = titleEnd; + titleEnd = i; + } + } + return [linkOffset, linkEnd, titleOffset, titleEnd, lineEnd]; + }; + scanFootnote = function(p, data, i, indentSize) { + var blockEnd = 0, blockStart = 0, containsBlankLine, contents = sliceType$1.nil, data, hasBlock = false, i, indentSize, n, p, raw, x, x$1, x$2; + if ((i === 0) || (data.$length === 0)) { + return [blockStart, blockEnd, contents, hasBlock]; + } + while (true) { + if (!(i < data.$length && (((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 32))) { break; } + i = i + (1) >> 0; + } + blockStart = i; + blockEnd = i; + while (true) { + if (!(i < data.$length && !(((x = i - 1 >> 0, ((x < 0 || x >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x])) === 10)))) { break; } + i = i + (1) >> 0; + } + raw = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + raw.Write($subslice(data, blockEnd, i)); + blockEnd = i; + containsBlankLine = false; + gatherLines: + while (true) { + if (!(blockEnd < data.$length)) { break; } + i = i + (1) >> 0; + while (true) { + if (!(i < data.$length && !(((x$1 = i - 1 >> 0, ((x$1 < 0 || x$1 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$1])) === 10)))) { break; } + i = i + (1) >> 0; + } + if (p.isEmpty($subslice(data, blockEnd, i)) > 0) { + containsBlankLine = true; + blockEnd = i; + continue; + } + n = 0; + n = isIndented($subslice(data, blockEnd, i), indentSize); + if (n === 0) { + break gatherLines; + } + if (containsBlankLine) { + raw.WriteByte(10); + containsBlankLine = false; + } + raw.Write($subslice(data, (blockEnd + n >> 0), i)); + hasBlock = true; + blockEnd = i; + } + if (!(((x$2 = blockEnd - 1 >> 0, ((x$2 < 0 || x$2 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + x$2])) === 10))) { + raw.WriteByte(10); + } + contents = raw.Bytes(); + return [blockStart, blockEnd, contents, hasBlock]; + }; + ispunct = function(c) { + var _i, _ref, c, r; + _ref = new sliceType$1($stringToBytes("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~")); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + r = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (c === r) { + return true; + } + _i++; + } + return false; + }; + isspace = function(c) { + var c; + return (c === 32) || (c === 9) || (c === 10) || (c === 13) || (c === 12) || (c === 11); + }; + isletter = function(c) { + var c; + return (c >= 97 && c <= 122) || (c >= 65 && c <= 90); + }; + isalnum = function(c) { + var c; + return (c >= 48 && c <= 57) || isletter(c); + }; + expandTabs = function(out, line, tabSize) { + var _r, _tmp, _tmp$1, _tuple, column, i, line, out, prefix, size, slowcase, start, tabSize; + _tmp = 0; _tmp$1 = 0; i = _tmp; prefix = _tmp$1; + slowcase = false; + i = 0; + while (true) { + if (!(i < line.$length)) { break; } + if (((i < 0 || i >= line.$length) ? $throwRuntimeError("index out of range") : line.$array[line.$offset + i]) === 9) { + if (prefix === i) { + prefix = prefix + (1) >> 0; + } else { + slowcase = true; + break; + } + } + i = i + (1) >> 0; + } + if (!slowcase) { + i = 0; + while (true) { + if (!(i < (prefix * tabSize >> 0))) { break; } + out.WriteByte(32); + i = i + (1) >> 0; + } + out.Write($subslice(line, prefix)); + return; + } + column = 0; + i = 0; + while (true) { + if (!(i < line.$length)) { break; } + start = i; + while (true) { + if (!(i < line.$length && !((((i < 0 || i >= line.$length) ? $throwRuntimeError("index out of range") : line.$array[line.$offset + i]) === 9)))) { break; } + _tuple = utf8.DecodeRune($subslice(line, i)); size = _tuple[1]; + i = i + (size) >> 0; + column = column + (1) >> 0; + } + if (i > start) { + out.Write($subslice(line, start, i)); + } + if (i >= line.$length) { + break; + } + while (true) { + if (!(true)) { break; } + out.WriteByte(32); + column = column + (1) >> 0; + if ((_r = column % tabSize, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) === 0) { + break; + } + } + i = i + (1) >> 0; + } + }; + isIndented = function(data, indentSize) { + var data, i, indentSize; + if (data.$length === 0) { + return 0; + } + if (((0 < 0 || 0 >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + 0]) === 9) { + return 1; + } + if (data.$length < indentSize) { + return 0; + } + i = 0; + while (true) { + if (!(i < indentSize)) { break; } + if (!((((i < 0 || i >= data.$length) ? $throwRuntimeError("index out of range") : data.$array[data.$offset + i]) === 32))) { + return 0; + } + i = i + (1) >> 0; + } + return indentSize; + }; + slugify = function(in$1) { + var _i, _i$1, _ref, _ref$1, _tmp, _tmp$1, a, b, ch, ch$1, in$1, out, sym; + if (in$1.$length === 0) { + return in$1; + } + out = $makeSlice(sliceType$1, 0, in$1.$length); + sym = false; + _ref = in$1; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + ch = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (isalnum(ch)) { + sym = false; + out = $append(out, ch); + } else if (sym) { + _i++; + continue; + } else { + out = $append(out, 45); + sym = true; + } + _i++; + } + _tmp = 0; _tmp$1 = 0; a = _tmp; b = _tmp$1; + ch$1 = 0; + _ref$1 = out; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + a = _i$1; + ch$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i$1]); + if (!((ch$1 === 45))) { + break; + } + _i$1++; + } + b = out.$length - 1 >> 0; + while (true) { + if (!(b > 0)) { break; } + if (!((((b < 0 || b >= out.$length) ? $throwRuntimeError("index out of range") : out.$array[out.$offset + b]) === 45))) { + break; + } + b = b - (1) >> 0; + } + return $subslice(out, a, (b + 1 >> 0)); + }; + ptrType$9.methods = [{prop: "block", name: "block", pkg: "github.com/russross/blackfriday", typ: $funcType([ptrType$3, sliceType$1], [], false)}, {prop: "isPrefixHeader", name: "isPrefixHeader", pkg: "github.com/russross/blackfriday", typ: $funcType([sliceType$1], [$Bool], false)}, {prop: "prefixHeader", name: "prefixHeader", pkg: "github.com/russross/blackfriday", typ: $funcType([ptrType$3, sliceType$1], [$Int], false)}, {prop: "isUnderlinedHeader", name: "isUnderlinedHeader", pkg: "github.com/russross/blackfriday", typ: $funcType([sliceType$1], [$Int], false)}, {prop: "titleBlock", name: "titleBlock", pkg: "github.com/russross/blackfriday", typ: $funcType([ptrType$3, sliceType$1, $Bool], [$Int], false)}, {prop: "html", name: "html", pkg: "github.com/russross/blackfriday", typ: $funcType([ptrType$3, sliceType$1, $Bool], [$Int], false)}, {prop: "htmlComment", name: "htmlComment", pkg: "github.com/russross/blackfriday", typ: $funcType([ptrType$3, sliceType$1, $Bool], [$Int], false)}, {prop: "htmlHr", name: "htmlHr", pkg: "github.com/russross/blackfriday", typ: $funcType([ptrType$3, sliceType$1, $Bool], [$Int], false)}, {prop: "htmlFindTag", name: "htmlFindTag", pkg: "github.com/russross/blackfriday", typ: $funcType([sliceType$1], [$String, $Bool], false)}, {prop: "htmlFindEnd", name: "htmlFindEnd", pkg: "github.com/russross/blackfriday", typ: $funcType([$String, sliceType$1], [$Int], false)}, {prop: "isEmpty", name: "isEmpty", pkg: "github.com/russross/blackfriday", typ: $funcType([sliceType$1], [$Int], false)}, {prop: "isHRule", name: "isHRule", pkg: "github.com/russross/blackfriday", typ: $funcType([sliceType$1], [$Bool], false)}, {prop: "isFencedCode", name: "isFencedCode", pkg: "github.com/russross/blackfriday", typ: $funcType([sliceType$1, ptrType$1, $String], [$Int, $String], false)}, {prop: "fencedCode", name: "fencedCode", pkg: "github.com/russross/blackfriday", typ: $funcType([ptrType$3, sliceType$1, $Bool], [$Int], false)}, {prop: "table", name: "table", pkg: "github.com/russross/blackfriday", typ: $funcType([ptrType$3, sliceType$1], [$Int], false)}, {prop: "tableHeader", name: "tableHeader", pkg: "github.com/russross/blackfriday", typ: $funcType([ptrType$3, sliceType$1], [$Int, sliceType$3], false)}, {prop: "tableRow", name: "tableRow", pkg: "github.com/russross/blackfriday", typ: $funcType([ptrType$3, sliceType$1, sliceType$3, $Bool], [], false)}, {prop: "quotePrefix", name: "quotePrefix", pkg: "github.com/russross/blackfriday", typ: $funcType([sliceType$1], [$Int], false)}, {prop: "quote", name: "quote", pkg: "github.com/russross/blackfriday", typ: $funcType([ptrType$3, sliceType$1], [$Int], false)}, {prop: "codePrefix", name: "codePrefix", pkg: "github.com/russross/blackfriday", typ: $funcType([sliceType$1], [$Int], false)}, {prop: "code", name: "code", pkg: "github.com/russross/blackfriday", typ: $funcType([ptrType$3, sliceType$1], [$Int], false)}, {prop: "uliPrefix", name: "uliPrefix", pkg: "github.com/russross/blackfriday", typ: $funcType([sliceType$1], [$Int], false)}, {prop: "oliPrefix", name: "oliPrefix", pkg: "github.com/russross/blackfriday", typ: $funcType([sliceType$1], [$Int], false)}, {prop: "list", name: "list", pkg: "github.com/russross/blackfriday", typ: $funcType([ptrType$3, sliceType$1, $Int], [$Int], false)}, {prop: "listItem", name: "listItem", pkg: "github.com/russross/blackfriday", typ: $funcType([ptrType$3, sliceType$1, ptrType$2], [$Int], false)}, {prop: "renderParagraph", name: "renderParagraph", pkg: "github.com/russross/blackfriday", typ: $funcType([ptrType$3, sliceType$1], [], false)}, {prop: "paragraph", name: "paragraph", pkg: "github.com/russross/blackfriday", typ: $funcType([ptrType$3, sliceType$1], [$Int], false)}, {prop: "inline", name: "inline", pkg: "github.com/russross/blackfriday", typ: $funcType([ptrType$3, sliceType$1], [], false)}]; + Renderer.init([{prop: "AutoLink", name: "AutoLink", pkg: "", typ: $funcType([ptrType$3, sliceType$1, $Int], [], false)}, {prop: "BlockCode", name: "BlockCode", pkg: "", typ: $funcType([ptrType$3, sliceType$1, $String], [], false)}, {prop: "BlockHtml", name: "BlockHtml", pkg: "", typ: $funcType([ptrType$3, sliceType$1], [], false)}, {prop: "BlockQuote", name: "BlockQuote", pkg: "", typ: $funcType([ptrType$3, sliceType$1], [], false)}, {prop: "CodeSpan", name: "CodeSpan", pkg: "", typ: $funcType([ptrType$3, sliceType$1], [], false)}, {prop: "DocumentFooter", name: "DocumentFooter", pkg: "", typ: $funcType([ptrType$3], [], false)}, {prop: "DocumentHeader", name: "DocumentHeader", pkg: "", typ: $funcType([ptrType$3], [], false)}, {prop: "DoubleEmphasis", name: "DoubleEmphasis", pkg: "", typ: $funcType([ptrType$3, sliceType$1], [], false)}, {prop: "Emphasis", name: "Emphasis", pkg: "", typ: $funcType([ptrType$3, sliceType$1], [], false)}, {prop: "Entity", name: "Entity", pkg: "", typ: $funcType([ptrType$3, sliceType$1], [], false)}, {prop: "FootnoteItem", name: "FootnoteItem", pkg: "", typ: $funcType([ptrType$3, sliceType$1, sliceType$1, $Int], [], false)}, {prop: "FootnoteRef", name: "FootnoteRef", pkg: "", typ: $funcType([ptrType$3, sliceType$1, $Int], [], false)}, {prop: "Footnotes", name: "Footnotes", pkg: "", typ: $funcType([ptrType$3, funcType], [], false)}, {prop: "GetFlags", name: "GetFlags", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "HRule", name: "HRule", pkg: "", typ: $funcType([ptrType$3], [], false)}, {prop: "Header", name: "Header", pkg: "", typ: $funcType([ptrType$3, funcType, $Int, $String], [], false)}, {prop: "Image", name: "Image", pkg: "", typ: $funcType([ptrType$3, sliceType$1, sliceType$1, sliceType$1], [], false)}, {prop: "LineBreak", name: "LineBreak", pkg: "", typ: $funcType([ptrType$3], [], false)}, {prop: "Link", name: "Link", pkg: "", typ: $funcType([ptrType$3, sliceType$1, sliceType$1, sliceType$1], [], false)}, {prop: "List", name: "List", pkg: "", typ: $funcType([ptrType$3, funcType, $Int], [], false)}, {prop: "ListItem", name: "ListItem", pkg: "", typ: $funcType([ptrType$3, sliceType$1, $Int], [], false)}, {prop: "NormalText", name: "NormalText", pkg: "", typ: $funcType([ptrType$3, sliceType$1], [], false)}, {prop: "Paragraph", name: "Paragraph", pkg: "", typ: $funcType([ptrType$3, funcType], [], false)}, {prop: "RawHtmlTag", name: "RawHtmlTag", pkg: "", typ: $funcType([ptrType$3, sliceType$1], [], false)}, {prop: "StrikeThrough", name: "StrikeThrough", pkg: "", typ: $funcType([ptrType$3, sliceType$1], [], false)}, {prop: "Table", name: "Table", pkg: "", typ: $funcType([ptrType$3, sliceType$1, sliceType$1, sliceType$3], [], false)}, {prop: "TableCell", name: "TableCell", pkg: "", typ: $funcType([ptrType$3, sliceType$1, $Int], [], false)}, {prop: "TableHeaderCell", name: "TableHeaderCell", pkg: "", typ: $funcType([ptrType$3, sliceType$1, $Int], [], false)}, {prop: "TableRow", name: "TableRow", pkg: "", typ: $funcType([ptrType$3, sliceType$1], [], false)}, {prop: "TitleBlock", name: "TitleBlock", pkg: "", typ: $funcType([ptrType$3, sliceType$1], [], false)}, {prop: "TripleEmphasis", name: "TripleEmphasis", pkg: "", typ: $funcType([ptrType$3, sliceType$1], [], false)}]); + inlineParser.init([ptrType$9, ptrType$3, sliceType$1, $Int], [$Int], false); + parser.init([{prop: "r", name: "r", pkg: "github.com/russross/blackfriday", typ: Renderer, tag: ""}, {prop: "refs", name: "refs", pkg: "github.com/russross/blackfriday", typ: mapType$1, tag: ""}, {prop: "inlineCallback", name: "inlineCallback", pkg: "github.com/russross/blackfriday", typ: arrayType, tag: ""}, {prop: "flags", name: "flags", pkg: "github.com/russross/blackfriday", typ: $Int, tag: ""}, {prop: "nesting", name: "nesting", pkg: "github.com/russross/blackfriday", typ: $Int, tag: ""}, {prop: "maxNesting", name: "maxNesting", pkg: "github.com/russross/blackfriday", typ: $Int, tag: ""}, {prop: "insideLink", name: "insideLink", pkg: "github.com/russross/blackfriday", typ: $Bool, tag: ""}, {prop: "notes", name: "notes", pkg: "github.com/russross/blackfriday", typ: sliceType$6, tag: ""}]); + reference.init([{prop: "link", name: "link", pkg: "github.com/russross/blackfriday", typ: sliceType$1, tag: ""}, {prop: "title", name: "title", pkg: "github.com/russross/blackfriday", typ: sliceType$1, tag: ""}, {prop: "noteId", name: "noteId", pkg: "github.com/russross/blackfriday", typ: $Int, tag: ""}, {prop: "hasBlock", name: "hasBlock", pkg: "github.com/russross/blackfriday", typ: $Bool, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_blackfriday = function() { while (true) { switch ($s) { case 0: + $r = bytes.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = fmt.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = sanitized_anchor_name.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = regexp.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = strconv.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + $r = strings.$init($BLOCKING); /* */ $s = 6; case 6: if ($r && $r.$blocking) { $r = $r(); } + $r = utf8.$init($BLOCKING); /* */ $s = 7; case 7: if ($r && $r.$blocking) { $r = $r(); } + htmlEntity = regexp.MustCompile("&[a-z]{2,5};"); + urlRe = "((https?|ftp):\\/\\/|\\/)[-A-Za-z0-9+&@#\\/%?=~_|!:,.;\\(\\)]+"; + anchorRe = regexp.MustCompile("^(]+\")?\\s?>" + urlRe + "<\\/a>)"); + escapeChars = new sliceType$1($stringToBytes("\\`*_{}[]()#+-.!:|&<>~")); + validUris = new sliceType$2([new sliceType$1($stringToBytes("http://")), new sliceType$1($stringToBytes("https://")), new sliceType$1($stringToBytes("ftp://")), new sliceType$1($stringToBytes("mailto://")), new sliceType$1($stringToBytes("/"))]); + blockTags = (_map = new $Map(), _key = "p", _map[_key] = { k: _key, v: true }, _key = "dl", _map[_key] = { k: _key, v: true }, _key = "h1", _map[_key] = { k: _key, v: true }, _key = "h2", _map[_key] = { k: _key, v: true }, _key = "h3", _map[_key] = { k: _key, v: true }, _key = "h4", _map[_key] = { k: _key, v: true }, _key = "h5", _map[_key] = { k: _key, v: true }, _key = "h6", _map[_key] = { k: _key, v: true }, _key = "ol", _map[_key] = { k: _key, v: true }, _key = "ul", _map[_key] = { k: _key, v: true }, _key = "del", _map[_key] = { k: _key, v: true }, _key = "div", _map[_key] = { k: _key, v: true }, _key = "ins", _map[_key] = { k: _key, v: true }, _key = "pre", _map[_key] = { k: _key, v: true }, _key = "form", _map[_key] = { k: _key, v: true }, _key = "math", _map[_key] = { k: _key, v: true }, _key = "table", _map[_key] = { k: _key, v: true }, _key = "iframe", _map[_key] = { k: _key, v: true }, _key = "script", _map[_key] = { k: _key, v: true }, _key = "fieldset", _map[_key] = { k: _key, v: true }, _key = "noscript", _map[_key] = { k: _key, v: true }, _key = "blockquote", _map[_key] = { k: _key, v: true }, _key = "video", _map[_key] = { k: _key, v: true }, _key = "aside", _map[_key] = { k: _key, v: true }, _key = "canvas", _map[_key] = { k: _key, v: true }, _key = "figure", _map[_key] = { k: _key, v: true }, _key = "footer", _map[_key] = { k: _key, v: true }, _key = "header", _map[_key] = { k: _key, v: true }, _key = "hgroup", _map[_key] = { k: _key, v: true }, _key = "output", _map[_key] = { k: _key, v: true }, _key = "article", _map[_key] = { k: _key, v: true }, _key = "section", _map[_key] = { k: _key, v: true }, _key = "progress", _map[_key] = { k: _key, v: true }, _key = "figcaption", _map[_key] = { k: _key, v: true }, _map); + /* */ } return; } }; $init_blackfriday.$blocking = true; return $init_blackfriday; + }; + return $pkg; +})(); +$packages["github.com/bradfitz/iter"] = (function() { + var $pkg = {}, structType, sliceType, N; + structType = $structType([]); + sliceType = $sliceType(structType); + N = $pkg.N = function(n) { + var n; + return $makeSlice(sliceType, n); + }; + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_iter = function() { while (true) { switch ($s) { case 0: + /* */ } return; } }; $init_iter.$blocking = true; return $init_iter; + }; + return $pkg; +})(); +$packages["github.com/shurcooL/go/indentwriter"] = (function() { + var $pkg = {}, iter, io, indentWriter, sliceType, ptrType, New; + iter = $packages["github.com/bradfitz/iter"]; + io = $packages["io"]; + indentWriter = $pkg.indentWriter = $newType(0, $kindStruct, "indentwriter.indentWriter", "indentWriter", "github.com/shurcooL/go/indentwriter", function(w_, indent_, wroteIndent_) { + this.$val = this; + this.w = w_ !== undefined ? w_ : $ifaceNil; + this.indent = indent_ !== undefined ? indent_ : 0; + this.wroteIndent = wroteIndent_ !== undefined ? wroteIndent_ : false; + }); + sliceType = $sliceType($Uint8); + ptrType = $ptrType(indentWriter); + New = $pkg.New = function(w, indent) { + var indent, w; + return new indentWriter.ptr(w, indent, false); + }; + indentWriter.ptr.prototype.Write = function(p) { + var _i, _ref, _tmp, _tmp$1, b, err = $ifaceNil, iw, n = 0, p; + iw = this; + _ref = p; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + b = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + err = iw.WriteByte(b); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [n, err]; + } + n = n + (1) >> 0; + _i++; + } + if (!((n === p.$length))) { + err = io.ErrShortWrite; + return [n, err]; + } + _tmp = p.$length; _tmp$1 = $ifaceNil; n = _tmp; err = _tmp$1; + return [n, err]; + }; + indentWriter.prototype.Write = function(p) { return this.$val.Write(p); }; + indentWriter.ptr.prototype.WriteString = function(s) { + var _tuple, err = $ifaceNil, iw, n = 0, s; + iw = this; + _tuple = iw.Write(new sliceType($stringToBytes(s))); n = _tuple[0]; err = _tuple[1]; + return [n, err]; + }; + indentWriter.prototype.WriteString = function(s) { return this.$val.WriteString(s); }; + indentWriter.ptr.prototype.WriteByte = function(c) { + var _i, _ref, _tuple, c, err, iw; + iw = this; + if (c === 10) { + iw.wroteIndent = false; + } else { + if (!iw.wroteIndent) { + iw.wroteIndent = true; + _ref = iter.N(iw.indent); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + iw.w.Write(new sliceType([9])); + _i++; + } + } + } + _tuple = iw.w.Write(new sliceType([c])); err = _tuple[1]; + return err; + }; + indentWriter.prototype.WriteByte = function(c) { return this.$val.WriteByte(c); }; + ptrType.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}, {prop: "WriteByte", name: "WriteByte", pkg: "", typ: $funcType([$Uint8], [$error], false)}]; + indentWriter.init([{prop: "w", name: "w", pkg: "github.com/shurcooL/go/indentwriter", typ: io.Writer, tag: ""}, {prop: "indent", name: "indent", pkg: "github.com/shurcooL/go/indentwriter", typ: $Int, tag: ""}, {prop: "wroteIndent", name: "wroteIndent", pkg: "github.com/shurcooL/go/indentwriter", typ: $Bool, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_indentwriter = function() { while (true) { switch ($s) { case 0: + $r = iter.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = io.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + /* */ } return; } }; $init_indentwriter.$blocking = true; return $init_indentwriter; + }; + return $pkg; +})(); +$packages["go/token"] = (function() { + var $pkg = {}, fmt, nosync, sort, strconv, testing, Position, Pos, File, lineInfo, FileSet, serializedFile, serializedFileSet, Token, sliceType, sliceType$1, ptrType, sliceType$2, sliceType$3, sliceType$4, ptrType$1, ptrType$2, sliceType$5, funcType, funcType$1, tokens, keywords, searchLineInfos, NewFileSet, searchFiles, searchInts, init, Lookup; + fmt = $packages["fmt"]; + nosync = $packages["github.com/gopherjs/gopherjs/nosync"]; + sort = $packages["sort"]; + strconv = $packages["strconv"]; + testing = $packages["testing"]; + Position = $pkg.Position = $newType(0, $kindStruct, "token.Position", "Position", "go/token", function(Filename_, Offset_, Line_, Column_) { + this.$val = this; + this.Filename = Filename_ !== undefined ? Filename_ : ""; + this.Offset = Offset_ !== undefined ? Offset_ : 0; + this.Line = Line_ !== undefined ? Line_ : 0; + this.Column = Column_ !== undefined ? Column_ : 0; + }); + Pos = $pkg.Pos = $newType(4, $kindInt, "token.Pos", "Pos", "go/token", null); + File = $pkg.File = $newType(0, $kindStruct, "token.File", "File", "go/token", function(set_, name_, base_, size_, lines_, infos_) { + this.$val = this; + this.set = set_ !== undefined ? set_ : ptrType$2.nil; + this.name = name_ !== undefined ? name_ : ""; + this.base = base_ !== undefined ? base_ : 0; + this.size = size_ !== undefined ? size_ : 0; + this.lines = lines_ !== undefined ? lines_ : sliceType$1.nil; + this.infos = infos_ !== undefined ? infos_ : sliceType$3.nil; + }); + lineInfo = $pkg.lineInfo = $newType(0, $kindStruct, "token.lineInfo", "lineInfo", "go/token", function(Offset_, Filename_, Line_) { + this.$val = this; + this.Offset = Offset_ !== undefined ? Offset_ : 0; + this.Filename = Filename_ !== undefined ? Filename_ : ""; + this.Line = Line_ !== undefined ? Line_ : 0; + }); + FileSet = $pkg.FileSet = $newType(0, $kindStruct, "token.FileSet", "FileSet", "go/token", function(mutex_, base_, files_, last_) { + this.$val = this; + this.mutex = mutex_ !== undefined ? mutex_ : new nosync.RWMutex.ptr(); + this.base = base_ !== undefined ? base_ : 0; + this.files = files_ !== undefined ? files_ : sliceType$2.nil; + this.last = last_ !== undefined ? last_ : ptrType.nil; + }); + serializedFile = $pkg.serializedFile = $newType(0, $kindStruct, "token.serializedFile", "serializedFile", "go/token", function(Name_, Base_, Size_, Lines_, Infos_) { + this.$val = this; + this.Name = Name_ !== undefined ? Name_ : ""; + this.Base = Base_ !== undefined ? Base_ : 0; + this.Size = Size_ !== undefined ? Size_ : 0; + this.Lines = Lines_ !== undefined ? Lines_ : sliceType$1.nil; + this.Infos = Infos_ !== undefined ? Infos_ : sliceType$3.nil; + }); + serializedFileSet = $pkg.serializedFileSet = $newType(0, $kindStruct, "token.serializedFileSet", "serializedFileSet", "go/token", function(Base_, Files_) { + this.$val = this; + this.Base = Base_ !== undefined ? Base_ : 0; + this.Files = Files_ !== undefined ? Files_ : sliceType$4.nil; + }); + Token = $pkg.Token = $newType(4, $kindInt, "token.Token", "Token", "go/token", null); + sliceType = $sliceType($emptyInterface); + sliceType$1 = $sliceType($Int); + ptrType = $ptrType(File); + sliceType$2 = $sliceType(ptrType); + sliceType$3 = $sliceType(lineInfo); + sliceType$4 = $sliceType(serializedFile); + ptrType$1 = $ptrType(Position); + ptrType$2 = $ptrType(FileSet); + sliceType$5 = $sliceType($Uint8); + funcType = $funcType([ptrType], [$Bool], false); + funcType$1 = $funcType([$emptyInterface], [$error], false); + Position.ptr.prototype.IsValid = function() { + var pos; + pos = this; + return pos.Line > 0; + }; + Position.prototype.IsValid = function() { return this.$val.IsValid(); }; + Position.ptr.prototype.String = function() { + var pos, s; + pos = $clone(this, Position); + s = pos.Filename; + if (pos.IsValid()) { + if (!(s === "")) { + s = s + (":"); + } + s = s + (fmt.Sprintf("%d:%d", new sliceType([new $Int(pos.Line), new $Int(pos.Column)]))); + } + if (s === "") { + s = "-"; + } + return s; + }; + Position.prototype.String = function() { return this.$val.String(); }; + Pos.prototype.IsValid = function() { + var p; + p = this.$val; + return !((p === 0)); + }; + $ptrType(Pos).prototype.IsValid = function() { return new Pos(this.$get()).IsValid(); }; + File.ptr.prototype.Name = function() { + var f; + f = this; + return f.name; + }; + File.prototype.Name = function() { return this.$val.Name(); }; + File.ptr.prototype.Base = function() { + var f; + f = this; + return f.base; + }; + File.prototype.Base = function() { return this.$val.Base(); }; + File.ptr.prototype.Size = function() { + var f; + f = this; + return f.size; + }; + File.prototype.Size = function() { return this.$val.Size(); }; + File.ptr.prototype.LineCount = function() { + var f, n; + f = this; + f.set.mutex.RLock(); + n = f.lines.$length; + f.set.mutex.RUnlock(); + return n; + }; + File.prototype.LineCount = function() { return this.$val.LineCount(); }; + File.ptr.prototype.AddLine = function(offset) { + var f, i, offset, x, x$1; + f = this; + f.set.mutex.Lock(); + i = f.lines.$length; + if (((i === 0) || (x = f.lines, x$1 = i - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])) < offset) && offset < f.size) { + f.lines = $append(f.lines, offset); + } + f.set.mutex.Unlock(); + }; + File.prototype.AddLine = function(offset) { return this.$val.AddLine(offset); }; + File.ptr.prototype.MergeLine = function(line) { + var $deferred = [], $err = null, f, line; + /* */ try { $deferFrames.push($deferred); + f = this; + if (line <= 0) { + $panic(new $String("illegal line number (line numbering starts at 1)")); + } + f.set.mutex.Lock(); + $deferred.push([$methodVal(f.set.mutex, "Unlock"), []]); + if (line >= f.lines.$length) { + $panic(new $String("illegal line number")); + } + $copySlice($subslice(f.lines, line), $subslice(f.lines, (line + 1 >> 0))); + f.lines = $subslice(f.lines, 0, (f.lines.$length - 1 >> 0)); + /* */ } catch(err) { $err = err; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + File.prototype.MergeLine = function(line) { return this.$val.MergeLine(line); }; + File.ptr.prototype.SetLines = function(lines) { + var _i, _ref, f, i, lines, offset, size, x; + f = this; + size = f.size; + _ref = lines; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + offset = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (i > 0 && offset <= (x = i - 1 >> 0, ((x < 0 || x >= lines.$length) ? $throwRuntimeError("index out of range") : lines.$array[lines.$offset + x])) || size <= offset) { + return false; + } + _i++; + } + f.set.mutex.Lock(); + f.lines = lines; + f.set.mutex.Unlock(); + return true; + }; + File.prototype.SetLines = function(lines) { return this.$val.SetLines(lines); }; + File.ptr.prototype.SetLinesForContent = function(content) { + var _i, _ref, b, content, f, line, lines, offset; + f = this; + lines = sliceType$1.nil; + line = 0; + _ref = content; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + offset = _i; + b = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (line >= 0) { + lines = $append(lines, line); + } + line = -1; + if (b === 10) { + line = offset + 1 >> 0; + } + _i++; + } + f.set.mutex.Lock(); + f.lines = lines; + f.set.mutex.Unlock(); + }; + File.prototype.SetLinesForContent = function(content) { return this.$val.SetLinesForContent(content); }; + File.ptr.prototype.AddLineInfo = function(offset, filename, line) { + var f, filename, i, line, offset, x, x$1; + f = this; + f.set.mutex.Lock(); + i = f.infos.$length; + if ((i === 0) || (x = f.infos, x$1 = i - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])).Offset < offset && offset < f.size) { + f.infos = $append(f.infos, new lineInfo.ptr(offset, filename, line)); + } + f.set.mutex.Unlock(); + }; + File.prototype.AddLineInfo = function(offset, filename, line) { return this.$val.AddLineInfo(offset, filename, line); }; + File.ptr.prototype.Pos = function(offset) { + var f, offset; + f = this; + if (offset > f.size) { + $panic(new $String("illegal file offset")); + } + return ((f.base + offset >> 0) >> 0); + }; + File.prototype.Pos = function(offset) { return this.$val.Pos(offset); }; + File.ptr.prototype.Offset = function(p) { + var f, p; + f = this; + if ((p >> 0) < f.base || (p >> 0) > (f.base + f.size >> 0)) { + $panic(new $String("illegal Pos value")); + } + return (p >> 0) - f.base >> 0; + }; + File.prototype.Offset = function(p) { return this.$val.Offset(p); }; + File.ptr.prototype.Line = function(p) { + var f, p; + f = this; + return f.Position(p).Line; + }; + File.prototype.Line = function(p) { return this.$val.Line(p); }; + searchLineInfos = function(a, x) { + var a, x; + return sort.Search(a.$length, (function(i) { + var i; + return ((i < 0 || i >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + i]).Offset > x; + })) - 1 >> 0; + }; + File.ptr.prototype.unpack = function(offset, adjusted) { + var _tmp, _tmp$1, adjusted, alt, column = 0, f, filename = "", i, i$1, i$2, line = 0, offset, x, x$1; + f = this; + filename = f.name; + i = searchInts(f.lines, offset); + if (i >= 0) { + _tmp = i + 1 >> 0; _tmp$1 = (offset - (x = f.lines, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])) >> 0) + 1 >> 0; line = _tmp; column = _tmp$1; + } + if (adjusted && f.infos.$length > 0) { + i$1 = searchLineInfos(f.infos, offset); + if (i$1 >= 0) { + alt = (x$1 = f.infos, ((i$1 < 0 || i$1 >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + i$1])); + filename = alt.Filename; + i$2 = searchInts(f.lines, alt.Offset); + if (i$2 >= 0) { + line = line + (((alt.Line - i$2 >> 0) - 1 >> 0)) >> 0; + } + } + } + return [filename, line, column]; + }; + File.prototype.unpack = function(offset, adjusted) { return this.$val.unpack(offset, adjusted); }; + File.ptr.prototype.position = function(p, adjusted) { + var _tuple, adjusted, f, offset, p, pos = new Position.ptr(); + f = this; + offset = (p >> 0) - f.base >> 0; + pos.Offset = offset; + _tuple = f.unpack(offset, adjusted); pos.Filename = _tuple[0]; pos.Line = _tuple[1]; pos.Column = _tuple[2]; + return pos; + }; + File.prototype.position = function(p, adjusted) { return this.$val.position(p, adjusted); }; + File.ptr.prototype.PositionFor = function(p, adjusted) { + var adjusted, f, p, pos = new Position.ptr(); + f = this; + if (!((p === 0))) { + if ((p >> 0) < f.base || (p >> 0) > (f.base + f.size >> 0)) { + $panic(new $String("illegal Pos value")); + } + $copy(pos, f.position(p, adjusted), Position); + } + return pos; + }; + File.prototype.PositionFor = function(p, adjusted) { return this.$val.PositionFor(p, adjusted); }; + File.ptr.prototype.Position = function(p) { + var f, p, pos = new Position.ptr(); + f = this; + $copy(pos, f.PositionFor(p, true), Position); + return pos; + }; + File.prototype.Position = function(p) { return this.$val.Position(p); }; + NewFileSet = $pkg.NewFileSet = function() { + return new FileSet.ptr(new nosync.RWMutex.ptr(), 1, sliceType$2.nil, ptrType.nil); + }; + FileSet.ptr.prototype.Base = function() { + var b, s; + s = this; + s.mutex.RLock(); + b = s.base; + s.mutex.RUnlock(); + return b; + }; + FileSet.prototype.Base = function() { return this.$val.Base(); }; + FileSet.ptr.prototype.AddFile = function(filename, base, size) { + var $deferred = [], $err = null, base, f, filename, s, size; + /* */ try { $deferFrames.push($deferred); + s = this; + s.mutex.Lock(); + $deferred.push([$methodVal(s.mutex, "Unlock"), []]); + if (base < 0) { + base = s.base; + } + if (base < s.base || size < 0) { + $panic(new $String("illegal base or size")); + } + f = new File.ptr(s, filename, base, size, new sliceType$1([0]), sliceType$3.nil); + base = base + ((size + 1 >> 0)) >> 0; + if (base < 0) { + $panic(new $String("token.Pos offset overflow (> 2G of source code in file set)")); + } + s.base = base; + s.files = $append(s.files, f); + s.last = f; + return f; + /* */ } catch(err) { $err = err; return ptrType.nil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + FileSet.prototype.AddFile = function(filename, base, size) { return this.$val.AddFile(filename, base, size); }; + FileSet.ptr.prototype.Iterate = function(f) { + var f, file, i, s, x; + s = this; + i = 0; + while (true) { + if (!(true)) { break; } + file = ptrType.nil; + s.mutex.RLock(); + if (i < s.files.$length) { + file = (x = s.files, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + } + s.mutex.RUnlock(); + if (file === ptrType.nil || !f(file)) { + break; + } + i = i + (1) >> 0; + } + }; + FileSet.prototype.Iterate = function(f) { return this.$val.Iterate(f); }; + searchFiles = function(a, x) { + var a, x; + return sort.Search(a.$length, (function(i) { + var i; + return ((i < 0 || i >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + i]).base > x; + })) - 1 >> 0; + }; + FileSet.ptr.prototype.file = function(p) { + var f, f$1, i, p, s, x; + s = this; + s.mutex.RLock(); + f = s.last; + if (!(f === ptrType.nil) && f.base <= (p >> 0) && (p >> 0) <= (f.base + f.size >> 0)) { + s.mutex.RUnlock(); + return f; + } + i = searchFiles(s.files, (p >> 0)); + if (i >= 0) { + f$1 = (x = s.files, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + if ((p >> 0) <= (f$1.base + f$1.size >> 0)) { + s.mutex.RUnlock(); + s.mutex.Lock(); + s.last = f$1; + s.mutex.Unlock(); + return f$1; + } + } + s.mutex.RUnlock(); + return ptrType.nil; + }; + FileSet.prototype.file = function(p) { return this.$val.file(p); }; + FileSet.ptr.prototype.File = function(p) { + var f = ptrType.nil, p, s; + s = this; + if (!((p === 0))) { + f = s.file(p); + } + return f; + }; + FileSet.prototype.File = function(p) { return this.$val.File(p); }; + FileSet.ptr.prototype.PositionFor = function(p, adjusted) { + var adjusted, f, p, pos = new Position.ptr(), s; + s = this; + if (!((p === 0))) { + f = s.file(p); + if (!(f === ptrType.nil)) { + $copy(pos, f.position(p, adjusted), Position); + } + } + return pos; + }; + FileSet.prototype.PositionFor = function(p, adjusted) { return this.$val.PositionFor(p, adjusted); }; + FileSet.ptr.prototype.Position = function(p) { + var p, pos = new Position.ptr(), s; + s = this; + $copy(pos, s.PositionFor(p, true), Position); + return pos; + }; + FileSet.prototype.Position = function(p) { return this.$val.Position(p); }; + searchInts = function(a, x) { + var _q, _tmp, _tmp$1, a, h, i, j, x; + _tmp = 0; _tmp$1 = a.$length; i = _tmp; j = _tmp$1; + while (true) { + if (!(i < j)) { break; } + h = i + (_q = ((j - i >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0; + if (((h < 0 || h >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + h]) <= x) { + i = h + 1 >> 0; + } else { + j = h; + } + } + return i - 1 >> 0; + }; + FileSet.ptr.prototype.Read = function(decode) { + var decode, err, f, files, i, s, ss, x; + s = this; + ss = $clone(new serializedFileSet.ptr(), serializedFileSet); + err = decode(ss); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + s.mutex.Lock(); + s.base = ss.Base; + files = $makeSlice(sliceType$2, ss.Files.$length); + i = 0; + while (true) { + if (!(i < ss.Files.$length)) { break; } + f = (x = ss.Files, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + (i < 0 || i >= files.$length) ? $throwRuntimeError("index out of range") : files.$array[files.$offset + i] = new File.ptr(s, f.Name, f.Base, f.Size, f.Lines, f.Infos); + i = i + (1) >> 0; + } + s.files = files; + s.last = ptrType.nil; + s.mutex.Unlock(); + return $ifaceNil; + }; + FileSet.prototype.Read = function(decode) { return this.$val.Read(decode); }; + FileSet.ptr.prototype.Write = function(encode) { + var _i, _ref, encode, f, files, i, s, ss; + s = this; + ss = $clone(new serializedFileSet.ptr(), serializedFileSet); + s.mutex.Lock(); + ss.Base = s.base; + files = $makeSlice(sliceType$4, s.files.$length); + _ref = s.files; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + f = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + $copy(((i < 0 || i >= files.$length) ? $throwRuntimeError("index out of range") : files.$array[files.$offset + i]), new serializedFile.ptr(f.name, f.base, f.size, f.lines, f.infos), serializedFile); + _i++; + } + ss.Files = files; + s.mutex.Unlock(); + return encode(new ss.constructor.elem(ss)); + }; + FileSet.prototype.Write = function(encode) { return this.$val.Write(encode); }; + Token.prototype.String = function() { + var s, tok; + tok = this.$val; + s = ""; + if (0 <= tok && tok < 86) { + s = ((tok < 0 || tok >= tokens.length) ? $throwRuntimeError("index out of range") : tokens[tok]); + } + if (s === "") { + s = "token(" + strconv.Itoa((tok >> 0)) + ")"; + } + return s; + }; + $ptrType(Token).prototype.String = function() { return new Token(this.$get()).String(); }; + Token.prototype.Precedence = function() { + var _ref, op; + op = this.$val; + _ref = op; + if (_ref === 35) { + return 1; + } else if (_ref === 34) { + return 2; + } else if (_ref === 39 || _ref === 44 || _ref === 40 || _ref === 45 || _ref === 41 || _ref === 46) { + return 3; + } else if (_ref === 12 || _ref === 13 || _ref === 18 || _ref === 19) { + return 4; + } else if (_ref === 14 || _ref === 15 || _ref === 16 || _ref === 20 || _ref === 21 || _ref === 17 || _ref === 22) { + return 5; + } + return 0; + }; + $ptrType(Token).prototype.Precedence = function() { return new Token(this.$get()).Precedence(); }; + init = function() { + var _key, i; + keywords = new $Map(); + i = 61; + while (true) { + if (!(i < 86)) { break; } + _key = ((i < 0 || i >= tokens.length) ? $throwRuntimeError("index out of range") : tokens[i]); (keywords || $throwRuntimeError("assignment to entry in nil map"))[_key] = { k: _key, v: i }; + i = i + (1) >> 0; + } + }; + Lookup = $pkg.Lookup = function(ident) { + var _entry, _tuple, ident, is_keyword, tok; + _tuple = (_entry = keywords[ident], _entry !== undefined ? [_entry.v, true] : [0, false]); tok = _tuple[0]; is_keyword = _tuple[1]; + if (is_keyword) { + return tok; + } + return 4; + }; + Token.prototype.IsLiteral = function() { + var tok; + tok = this.$val; + return 3 < tok && tok < 10; + }; + $ptrType(Token).prototype.IsLiteral = function() { return new Token(this.$get()).IsLiteral(); }; + Token.prototype.IsOperator = function() { + var tok; + tok = this.$val; + return 11 < tok && tok < 59; + }; + $ptrType(Token).prototype.IsOperator = function() { return new Token(this.$get()).IsOperator(); }; + Token.prototype.IsKeyword = function() { + var tok; + tok = this.$val; + return 60 < tok && tok < 86; + }; + $ptrType(Token).prototype.IsKeyword = function() { return new Token(this.$get()).IsKeyword(); }; + Position.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$1.methods = [{prop: "IsValid", name: "IsValid", pkg: "", typ: $funcType([], [$Bool], false)}]; + Pos.methods = [{prop: "IsValid", name: "IsValid", pkg: "", typ: $funcType([], [$Bool], false)}]; + ptrType.methods = [{prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Base", name: "Base", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "LineCount", name: "LineCount", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "AddLine", name: "AddLine", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "MergeLine", name: "MergeLine", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "SetLines", name: "SetLines", pkg: "", typ: $funcType([sliceType$1], [$Bool], false)}, {prop: "SetLinesForContent", name: "SetLinesForContent", pkg: "", typ: $funcType([sliceType$5], [], false)}, {prop: "AddLineInfo", name: "AddLineInfo", pkg: "", typ: $funcType([$Int, $String, $Int], [], false)}, {prop: "Pos", name: "Pos", pkg: "", typ: $funcType([$Int], [Pos], false)}, {prop: "Offset", name: "Offset", pkg: "", typ: $funcType([Pos], [$Int], false)}, {prop: "Line", name: "Line", pkg: "", typ: $funcType([Pos], [$Int], false)}, {prop: "unpack", name: "unpack", pkg: "go/token", typ: $funcType([$Int, $Bool], [$String, $Int, $Int], false)}, {prop: "position", name: "position", pkg: "go/token", typ: $funcType([Pos, $Bool], [Position], false)}, {prop: "PositionFor", name: "PositionFor", pkg: "", typ: $funcType([Pos, $Bool], [Position], false)}, {prop: "Position", name: "Position", pkg: "", typ: $funcType([Pos], [Position], false)}]; + ptrType$2.methods = [{prop: "Base", name: "Base", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "AddFile", name: "AddFile", pkg: "", typ: $funcType([$String, $Int, $Int], [ptrType], false)}, {prop: "Iterate", name: "Iterate", pkg: "", typ: $funcType([funcType], [], false)}, {prop: "file", name: "file", pkg: "go/token", typ: $funcType([Pos], [ptrType], false)}, {prop: "File", name: "File", pkg: "", typ: $funcType([Pos], [ptrType], false)}, {prop: "PositionFor", name: "PositionFor", pkg: "", typ: $funcType([Pos, $Bool], [Position], false)}, {prop: "Position", name: "Position", pkg: "", typ: $funcType([Pos], [Position], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([funcType$1], [$error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([funcType$1], [$error], false)}]; + Token.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Precedence", name: "Precedence", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "IsLiteral", name: "IsLiteral", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsOperator", name: "IsOperator", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsKeyword", name: "IsKeyword", pkg: "", typ: $funcType([], [$Bool], false)}]; + Position.init([{prop: "Filename", name: "Filename", pkg: "", typ: $String, tag: ""}, {prop: "Offset", name: "Offset", pkg: "", typ: $Int, tag: ""}, {prop: "Line", name: "Line", pkg: "", typ: $Int, tag: ""}, {prop: "Column", name: "Column", pkg: "", typ: $Int, tag: ""}]); + File.init([{prop: "set", name: "set", pkg: "go/token", typ: ptrType$2, tag: ""}, {prop: "name", name: "name", pkg: "go/token", typ: $String, tag: ""}, {prop: "base", name: "base", pkg: "go/token", typ: $Int, tag: ""}, {prop: "size", name: "size", pkg: "go/token", typ: $Int, tag: ""}, {prop: "lines", name: "lines", pkg: "go/token", typ: sliceType$1, tag: ""}, {prop: "infos", name: "infos", pkg: "go/token", typ: sliceType$3, tag: ""}]); + lineInfo.init([{prop: "Offset", name: "Offset", pkg: "", typ: $Int, tag: ""}, {prop: "Filename", name: "Filename", pkg: "", typ: $String, tag: ""}, {prop: "Line", name: "Line", pkg: "", typ: $Int, tag: ""}]); + FileSet.init([{prop: "mutex", name: "mutex", pkg: "go/token", typ: nosync.RWMutex, tag: ""}, {prop: "base", name: "base", pkg: "go/token", typ: $Int, tag: ""}, {prop: "files", name: "files", pkg: "go/token", typ: sliceType$2, tag: ""}, {prop: "last", name: "last", pkg: "go/token", typ: ptrType, tag: ""}]); + serializedFile.init([{prop: "Name", name: "Name", pkg: "", typ: $String, tag: ""}, {prop: "Base", name: "Base", pkg: "", typ: $Int, tag: ""}, {prop: "Size", name: "Size", pkg: "", typ: $Int, tag: ""}, {prop: "Lines", name: "Lines", pkg: "", typ: sliceType$1, tag: ""}, {prop: "Infos", name: "Infos", pkg: "", typ: sliceType$3, tag: ""}]); + serializedFileSet.init([{prop: "Base", name: "Base", pkg: "", typ: $Int, tag: ""}, {prop: "Files", name: "Files", pkg: "", typ: sliceType$4, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_token = function() { while (true) { switch ($s) { case 0: + $r = fmt.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = nosync.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = sort.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = strconv.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = testing.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + keywords = false; + tokens = $toNativeArray($kindString, ["ILLEGAL", "EOF", "COMMENT", "", "IDENT", "INT", "FLOAT", "IMAG", "CHAR", "STRING", "", "", "+", "-", "*", "/", "%", "&", "|", "^", "<<", ">>", "&^", "+=", "-=", "*=", "/=", "%=", "&=", "|=", "^=", "<<=", ">>=", "&^=", "&&", "||", "<-", "++", "--", "==", "<", ">", "=", "!", "!=", "<=", ">=", ":=", "...", "(", "[", "{", ",", ".", ")", "]", "}", ";", ":", "", "", "break", "case", "chan", "const", "continue", "default", "defer", "else", "fallthrough", "for", "func", "go", "goto", "if", "import", "interface", "map", "package", "range", "return", "select", "struct", "switch", "type", "var"]); + init(); + /* */ } return; } }; $init_token.$blocking = true; return $init_token; + }; + return $pkg; +})(); +$packages["path/filepath"] = (function() { + var $pkg = {}, bytes, errors, os, runtime, sort, strings, utf8, lazybuf, sliceType$1, ptrType, Clean, FromSlash, Split, Join, VolumeName, IsAbs, volumeNameLen; + bytes = $packages["bytes"]; + errors = $packages["errors"]; + os = $packages["os"]; + runtime = $packages["runtime"]; + sort = $packages["sort"]; + strings = $packages["strings"]; + utf8 = $packages["unicode/utf8"]; + lazybuf = $pkg.lazybuf = $newType(0, $kindStruct, "filepath.lazybuf", "lazybuf", "path/filepath", function(path_, buf_, w_, volAndPath_, volLen_) { + this.$val = this; + this.path = path_ !== undefined ? path_ : ""; + this.buf = buf_ !== undefined ? buf_ : sliceType$1.nil; + this.w = w_ !== undefined ? w_ : 0; + this.volAndPath = volAndPath_ !== undefined ? volAndPath_ : ""; + this.volLen = volLen_ !== undefined ? volLen_ : 0; + }); + sliceType$1 = $sliceType($Uint8); + ptrType = $ptrType(lazybuf); + lazybuf.ptr.prototype.index = function(i) { + var b, i, x; + b = this; + if (!(b.buf === sliceType$1.nil)) { + return (x = b.buf, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + } + return b.path.charCodeAt(i); + }; + lazybuf.prototype.index = function(i) { return this.$val.index(i); }; + lazybuf.ptr.prototype.append = function(c) { + var b, c, x, x$1; + b = this; + if (b.buf === sliceType$1.nil) { + if (b.w < b.path.length && (b.path.charCodeAt(b.w) === c)) { + b.w = b.w + (1) >> 0; + return; + } + b.buf = $makeSlice(sliceType$1, b.path.length); + $copyString(b.buf, b.path.substring(0, b.w)); + } + (x = b.buf, x$1 = b.w, (x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1] = c); + b.w = b.w + (1) >> 0; + }; + lazybuf.prototype.append = function(c) { return this.$val.append(c); }; + lazybuf.ptr.prototype.string = function() { + var b; + b = this; + if (b.buf === sliceType$1.nil) { + return b.volAndPath.substring(0, (b.volLen + b.w >> 0)); + } + return b.volAndPath.substring(0, b.volLen) + $bytesToString($subslice(b.buf, 0, b.w)); + }; + lazybuf.prototype.string = function() { return this.$val.string(); }; + Clean = $pkg.Clean = function(path) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, dotdot, n, originalPath, out, path, r, rooted, volLen; + originalPath = path; + volLen = volumeNameLen(path); + path = path.substring(volLen); + if (path === "") { + if (volLen > 1 && !((originalPath.charCodeAt(1) === 58))) { + return FromSlash(originalPath); + } + return originalPath + "."; + } + rooted = os.IsPathSeparator(path.charCodeAt(0)); + n = path.length; + out = new lazybuf.ptr(path, sliceType$1.nil, 0, originalPath, volLen); + _tmp = 0; _tmp$1 = 0; r = _tmp; dotdot = _tmp$1; + if (rooted) { + out.append(47); + _tmp$2 = 1; _tmp$3 = 1; r = _tmp$2; dotdot = _tmp$3; + } + while (true) { + if (!(r < n)) { break; } + if (os.IsPathSeparator(path.charCodeAt(r))) { + r = r + (1) >> 0; + } else if ((path.charCodeAt(r) === 46) && (((r + 1 >> 0) === n) || os.IsPathSeparator(path.charCodeAt((r + 1 >> 0))))) { + r = r + (1) >> 0; + } else if ((path.charCodeAt(r) === 46) && (path.charCodeAt((r + 1 >> 0)) === 46) && (((r + 2 >> 0) === n) || os.IsPathSeparator(path.charCodeAt((r + 2 >> 0))))) { + r = r + (2) >> 0; + if (out.w > dotdot) { + out.w = out.w - (1) >> 0; + while (true) { + if (!(out.w > dotdot && !os.IsPathSeparator(out.index(out.w)))) { break; } + out.w = out.w - (1) >> 0; + } + } else if (!rooted) { + if (out.w > 0) { + out.append(47); + } + out.append(46); + out.append(46); + dotdot = out.w; + } + } else { + if (rooted && !((out.w === 1)) || !rooted && !((out.w === 0))) { + out.append(47); + } + while (true) { + if (!(r < n && !os.IsPathSeparator(path.charCodeAt(r)))) { break; } + out.append(path.charCodeAt(r)); + r = r + (1) >> 0; + } + } + } + if (out.w === 0) { + out.append(46); + } + return FromSlash(out.string()); + }; + FromSlash = $pkg.FromSlash = function(path) { + var path; + return path; + return strings.Replace(path, "/", "/", -1); + }; + Split = $pkg.Split = function(path) { + var _tmp, _tmp$1, dir = "", file = "", i, path, vol; + vol = VolumeName(path); + i = path.length - 1 >> 0; + while (true) { + if (!(i >= vol.length && !os.IsPathSeparator(path.charCodeAt(i)))) { break; } + i = i - (1) >> 0; + } + _tmp = path.substring(0, (i + 1 >> 0)); _tmp$1 = path.substring((i + 1 >> 0)); dir = _tmp; file = _tmp$1; + return [dir, file]; + }; + Join = $pkg.Join = function(elem) { + var _i, _ref, e, elem, i; + _ref = elem; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + e = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (!(e === "")) { + return Clean(strings.Join($subslice(elem, i), "/")); + } + _i++; + } + return ""; + }; + VolumeName = $pkg.VolumeName = function(path) { + var path, v = ""; + v = path.substring(0, volumeNameLen(path)); + return v; + }; + IsAbs = $pkg.IsAbs = function(path) { + var path; + return strings.HasPrefix(path, "/"); + }; + volumeNameLen = function(path) { + var path; + return 0; + }; + ptrType.methods = [{prop: "index", name: "index", pkg: "path/filepath", typ: $funcType([$Int], [$Uint8], false)}, {prop: "append", name: "append", pkg: "path/filepath", typ: $funcType([$Uint8], [], false)}, {prop: "string", name: "string", pkg: "path/filepath", typ: $funcType([], [$String], false)}]; + lazybuf.init([{prop: "path", name: "path", pkg: "path/filepath", typ: $String, tag: ""}, {prop: "buf", name: "buf", pkg: "path/filepath", typ: sliceType$1, tag: ""}, {prop: "w", name: "w", pkg: "path/filepath", typ: $Int, tag: ""}, {prop: "volAndPath", name: "volAndPath", pkg: "path/filepath", typ: $String, tag: ""}, {prop: "volLen", name: "volLen", pkg: "path/filepath", typ: $Int, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_filepath = function() { while (true) { switch ($s) { case 0: + $r = bytes.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = errors.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = os.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = runtime.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = sort.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + $r = strings.$init($BLOCKING); /* */ $s = 6; case 6: if ($r && $r.$blocking) { $r = $r(); } + $r = utf8.$init($BLOCKING); /* */ $s = 7; case 7: if ($r && $r.$blocking) { $r = $r(); } + $pkg.ErrBadPattern = errors.New("syntax error in pattern"); + $pkg.SkipDir = errors.New("skip this directory"); + /* */ } return; } }; $init_filepath.$blocking = true; return $init_filepath; + }; + return $pkg; +})(); +$packages["go/scanner"] = (function() { + var $pkg = {}, bytes, fmt, token, io, filepath, sort, strconv, unicode, utf8, Error, ErrorList, ErrorHandler, Scanner, Mode, sliceType, sliceType$1, sliceType$2, ptrType, ptrType$1, ptrType$2, ptrType$3, prefix, isLetter, isDigit, digitVal, stripCR; + bytes = $packages["bytes"]; + fmt = $packages["fmt"]; + token = $packages["go/token"]; + io = $packages["io"]; + filepath = $packages["path/filepath"]; + sort = $packages["sort"]; + strconv = $packages["strconv"]; + unicode = $packages["unicode"]; + utf8 = $packages["unicode/utf8"]; + Error = $pkg.Error = $newType(0, $kindStruct, "scanner.Error", "Error", "go/scanner", function(Pos_, Msg_) { + this.$val = this; + this.Pos = Pos_ !== undefined ? Pos_ : new token.Position.ptr(); + this.Msg = Msg_ !== undefined ? Msg_ : ""; + }); + ErrorList = $pkg.ErrorList = $newType(12, $kindSlice, "scanner.ErrorList", "ErrorList", "go/scanner", null); + ErrorHandler = $pkg.ErrorHandler = $newType(4, $kindFunc, "scanner.ErrorHandler", "ErrorHandler", "go/scanner", null); + Scanner = $pkg.Scanner = $newType(0, $kindStruct, "scanner.Scanner", "Scanner", "go/scanner", function(file_, dir_, src_, err_, mode_, ch_, offset_, rdOffset_, lineOffset_, insertSemi_, ErrorCount_) { + this.$val = this; + this.file = file_ !== undefined ? file_ : ptrType$2.nil; + this.dir = dir_ !== undefined ? dir_ : ""; + this.src = src_ !== undefined ? src_ : sliceType.nil; + this.err = err_ !== undefined ? err_ : $throwNilPointerError; + this.mode = mode_ !== undefined ? mode_ : 0; + this.ch = ch_ !== undefined ? ch_ : 0; + this.offset = offset_ !== undefined ? offset_ : 0; + this.rdOffset = rdOffset_ !== undefined ? rdOffset_ : 0; + this.lineOffset = lineOffset_ !== undefined ? lineOffset_ : 0; + this.insertSemi = insertSemi_ !== undefined ? insertSemi_ : false; + this.ErrorCount = ErrorCount_ !== undefined ? ErrorCount_ : 0; + }); + Mode = $pkg.Mode = $newType(4, $kindUint, "scanner.Mode", "Mode", "go/scanner", null); + sliceType = $sliceType($Uint8); + sliceType$1 = $sliceType($emptyInterface); + sliceType$2 = $sliceType($String); + ptrType = $ptrType(ErrorList); + ptrType$1 = $ptrType(Error); + ptrType$2 = $ptrType(token.File); + ptrType$3 = $ptrType(Scanner); + Error.ptr.prototype.Error = function() { + var e; + e = $clone(this, Error); + if (!(e.Pos.Filename === "") || e.Pos.IsValid()) { + return e.Pos.String() + ": " + e.Msg; + } + return e.Msg; + }; + Error.prototype.Error = function() { return this.$val.Error(); }; + $ptrType(ErrorList).prototype.Add = function(pos, msg) { + var msg, p, pos; + p = this; + pos = $clone(pos, token.Position); + p.$set($append(p.$get(), new Error.ptr($clone(pos, token.Position), msg))); + }; + $ptrType(ErrorList).prototype.Reset = function() { + var p; + p = this; + p.$set($subslice((p.$get()), 0, 0)); + }; + ErrorList.prototype.Len = function() { + var p; + p = this; + return p.$length; + }; + $ptrType(ErrorList).prototype.Len = function() { return this.$get().Len(); }; + ErrorList.prototype.Swap = function(i, j) { + var _tmp, _tmp$1, i, j, p; + p = this; + _tmp = ((j < 0 || j >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + j]); _tmp$1 = ((i < 0 || i >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + i]); (i < 0 || i >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + i] = _tmp; (j < 0 || j >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + j] = _tmp$1; + }; + $ptrType(ErrorList).prototype.Swap = function(i, j) { return this.$get().Swap(i, j); }; + ErrorList.prototype.Less = function(i, j) { + var e, f, i, j, p; + p = this; + e = ((i < 0 || i >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + i]).Pos; + f = ((j < 0 || j >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + j]).Pos; + if (e.Filename < f.Filename) { + return true; + } + if (e.Filename === f.Filename) { + if (e.Line < f.Line) { + return true; + } + if (e.Line === f.Line) { + return e.Column < f.Column; + } + } + return false; + }; + $ptrType(ErrorList).prototype.Less = function(i, j) { return this.$get().Less(i, j); }; + ErrorList.prototype.Sort = function() { + var p; + p = this; + sort.Sort(p); + }; + $ptrType(ErrorList).prototype.Sort = function() { return this.$get().Sort(); }; + $ptrType(ErrorList).prototype.RemoveMultiples = function() { + var _i, _ref, e, i, last, p, x; + p = this; + sort.Sort(p); + last = $clone(new token.Position.ptr(), token.Position); + i = 0; + _ref = p.$get(); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + e = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (!(e.Pos.Filename === last.Filename) || !((e.Pos.Line === last.Line))) { + $copy(last, e.Pos, token.Position); + (x = p.$get(), (i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i] = e); + i = i + (1) >> 0; + } + _i++; + } + p.$set($subslice((p.$get()), 0, i)); + }; + ErrorList.prototype.Error = function() { + var _ref, p; + p = this; + _ref = p.$length; + if (_ref === 0) { + return "no errors"; + } else if (_ref === 1) { + return ((0 < 0 || 0 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 0]).Error(); + } + return fmt.Sprintf("%s (and %d more errors)", new sliceType$1([((0 < 0 || 0 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 0]), new $Int((p.$length - 1 >> 0))])); + }; + $ptrType(ErrorList).prototype.Error = function() { return this.$get().Error(); }; + ErrorList.prototype.Err = function() { + var p; + p = this; + if (p.$length === 0) { + return $ifaceNil; + } + return p; + }; + $ptrType(ErrorList).prototype.Err = function() { return this.$get().Err(); }; + Scanner.ptr.prototype.next = function() { + var _tmp, _tmp$1, _tuple, r, s, w, x, x$1; + s = this; + if (s.rdOffset < s.src.$length) { + s.offset = s.rdOffset; + if (s.ch === 10) { + s.lineOffset = s.offset; + s.file.AddLine(s.offset); + } + _tmp = ((x = s.src, x$1 = s.rdOffset, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])) >> 0); _tmp$1 = 1; r = _tmp; w = _tmp$1; + if (r === 0) { + s.error(s.offset, "illegal character NUL"); + } else if (r >= 128) { + _tuple = utf8.DecodeRune($subslice(s.src, s.rdOffset)); r = _tuple[0]; w = _tuple[1]; + if ((r === 65533) && (w === 1)) { + s.error(s.offset, "illegal UTF-8 encoding"); + } else if ((r === 65279) && s.offset > 0) { + s.error(s.offset, "illegal byte order mark"); + } + } + s.rdOffset = s.rdOffset + (w) >> 0; + s.ch = r; + } else { + s.offset = s.src.$length; + if (s.ch === 10) { + s.lineOffset = s.offset; + s.file.AddLine(s.offset); + } + s.ch = -1; + } + }; + Scanner.prototype.next = function() { return this.$val.next(); }; + Scanner.ptr.prototype.Init = function(file, src, err, mode) { + var _tuple, err, file, mode, s, src; + s = this; + if (!((file.Size() === src.$length))) { + $panic(new $String(fmt.Sprintf("file size (%d) does not match src len (%d)", new sliceType$1([new $Int(file.Size()), new $Int(src.$length)])))); + } + s.file = file; + _tuple = filepath.Split(file.Name()); s.dir = _tuple[0]; + s.src = src; + s.err = err; + s.mode = mode; + s.ch = 32; + s.offset = 0; + s.rdOffset = 0; + s.lineOffset = 0; + s.insertSemi = false; + s.ErrorCount = 0; + s.next(); + if (s.ch === 65279) { + s.next(); + } + }; + Scanner.prototype.Init = function(file, src, err, mode) { return this.$val.Init(file, src, err, mode); }; + Scanner.ptr.prototype.error = function(offs, msg) { + var msg, offs, s; + s = this; + if (!(s.err === $throwNilPointerError)) { + s.err(s.file.Position(s.file.Pos(offs)), msg); + } + s.ErrorCount = s.ErrorCount + (1) >> 0; + }; + Scanner.prototype.error = function(offs, msg) { return this.$val.error(offs, msg); }; + Scanner.ptr.prototype.interpretLineComment = function(text) { + var _tuple, err, filename, i, line, s, text; + s = this; + if (bytes.HasPrefix(text, prefix)) { + i = bytes.LastIndex(text, new sliceType([58])); + if (i > 0) { + _tuple = strconv.Atoi($bytesToString($subslice(text, (i + 1 >> 0)))); line = _tuple[0]; err = _tuple[1]; + if ($interfaceIsEqual(err, $ifaceNil) && line > 0) { + filename = $bytesToString(bytes.TrimSpace($subslice(text, prefix.$length, i))); + if (!(filename === "")) { + filename = filepath.Clean(filename); + if (!filepath.IsAbs(filename)) { + filename = filepath.Join(new sliceType$2([s.dir, filename])); + } + } + s.file.AddLineInfo((s.lineOffset + text.$length >> 0) + 1 >> 0, filename, line); + } + } + } + }; + Scanner.prototype.interpretLineComment = function(text) { return this.$val.interpretLineComment(text); }; + Scanner.ptr.prototype.scanComment = function() { + var $args = arguments, $s = 0, $this = this, ch, hasCR, lit, offs, s; + /* */ s: while (true) { switch ($s) { case 0: + s = $this; + offs = s.offset - 1 >> 0; + hasCR = false; + /* if (s.ch === 47) { */ if (s.ch === 47) {} else { $s = 1; continue; } + s.next(); + while (true) { + if (!(!((s.ch === 10)) && s.ch >= 0)) { break; } + if (s.ch === 13) { + hasCR = true; + } + s.next(); + } + if (offs === s.lineOffset) { + s.interpretLineComment($subslice(s.src, offs, s.offset)); + } + /* goto exit */ $s = 2; continue; + /* } */ case 1: + s.next(); + /* while (true) { */ case 3: + /* if (!(s.ch >= 0)) { break; } */ if(!(s.ch >= 0)) { $s = 4; continue; } + ch = s.ch; + if (ch === 13) { + hasCR = true; + } + s.next(); + /* if ((ch === 42) && (s.ch === 47)) { */ if ((ch === 42) && (s.ch === 47)) {} else { $s = 5; continue; } + s.next(); + /* goto exit */ $s = 2; continue; + /* } */ case 5: + /* } */ $s = 3; continue; case 4: + s.error(offs, "comment not terminated"); + /* exit: */ case 2: + lit = $subslice(s.src, offs, s.offset); + if (hasCR) { + lit = stripCR(lit); + } + return $bytesToString(lit); + /* */ case -1: } return; } + }; + Scanner.prototype.scanComment = function() { return this.$val.scanComment(); }; + Scanner.ptr.prototype.findLineEnd = function() { + var $deferred = [], $err = null, ch, s; + /* */ try { $deferFrames.push($deferred); + s = this; + $deferred.push([(function(offs) { + var offs; + s.ch = 47; + s.offset = offs; + s.rdOffset = offs + 1 >> 0; + s.next(); + }), [s.offset - 1 >> 0]]); + while (true) { + if (!((s.ch === 47) || (s.ch === 42))) { break; } + if (s.ch === 47) { + return true; + } + s.next(); + while (true) { + if (!(s.ch >= 0)) { break; } + ch = s.ch; + if (ch === 10) { + return true; + } + s.next(); + if ((ch === 42) && (s.ch === 47)) { + s.next(); + break; + } + } + s.skipWhitespace(); + if (s.ch < 0 || (s.ch === 10)) { + return true; + } + if (!((s.ch === 47))) { + return false; + } + s.next(); + } + return false; + /* */ } catch(err) { $err = err; return false; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + Scanner.prototype.findLineEnd = function() { return this.$val.findLineEnd(); }; + isLetter = function(ch) { + var ch; + return 97 <= ch && ch <= 122 || 65 <= ch && ch <= 90 || (ch === 95) || ch >= 128 && unicode.IsLetter(ch); + }; + isDigit = function(ch) { + var ch; + return 48 <= ch && ch <= 57 || ch >= 128 && unicode.IsDigit(ch); + }; + Scanner.ptr.prototype.scanIdentifier = function() { + var offs, s; + s = this; + offs = s.offset; + while (true) { + if (!(isLetter(s.ch) || isDigit(s.ch))) { break; } + s.next(); + } + return $bytesToString($subslice(s.src, offs, s.offset)); + }; + Scanner.prototype.scanIdentifier = function() { return this.$val.scanIdentifier(); }; + digitVal = function(ch) { + var ch; + if (48 <= ch && ch <= 57) { + return ((ch - 48 >> 0) >> 0); + } else if (97 <= ch && ch <= 102) { + return (((ch - 97 >> 0) + 10 >> 0) >> 0); + } else if (65 <= ch && ch <= 70) { + return (((ch - 65 >> 0) + 10 >> 0) >> 0); + } + return 16; + }; + Scanner.ptr.prototype.scanMantissa = function(base) { + var base, s; + s = this; + while (true) { + if (!(digitVal(s.ch) < base)) { break; } + s.next(); + } + }; + Scanner.prototype.scanMantissa = function(base) { return this.$val.scanMantissa(base); }; + Scanner.ptr.prototype.scanNumber = function(seenDecimalPoint) { + var $args = arguments, $s = 0, $this = this, offs, offs$1, s, seenDecimalDigit, tok; + /* */ s: while (true) { switch ($s) { case 0: + s = $this; + offs = s.offset; + tok = 5; + /* if (seenDecimalPoint) { */ if (seenDecimalPoint) {} else { $s = 1; continue; } + offs = offs - (1) >> 0; + tok = 6; + s.scanMantissa(10); + /* goto exponent */ $s = 2; continue; + /* } */ case 1: + /* if (s.ch === 48) { */ if (s.ch === 48) {} else { $s = 3; continue; } + offs$1 = s.offset; + s.next(); + /* if ((s.ch === 120) || (s.ch === 88)) { */ if ((s.ch === 120) || (s.ch === 88)) {} else { $s = 4; continue; } + s.next(); + s.scanMantissa(16); + if ((s.offset - offs$1 >> 0) <= 2) { + s.error(offs$1, "illegal hexadecimal number"); + } + /* } else { */ $s = 5; continue; case 4: + seenDecimalDigit = false; + s.scanMantissa(8); + if ((s.ch === 56) || (s.ch === 57)) { + seenDecimalDigit = true; + s.scanMantissa(10); + } + /* if ((s.ch === 46) || (s.ch === 101) || (s.ch === 69) || (s.ch === 105)) { */ if ((s.ch === 46) || (s.ch === 101) || (s.ch === 69) || (s.ch === 105)) {} else { $s = 6; continue; } + /* goto fraction */ $s = 7; continue; + /* } */ case 6: + if (seenDecimalDigit) { + s.error(offs$1, "illegal octal number"); + } + /* } */ case 5: + /* goto exit */ $s = 8; continue; + /* } */ case 3: + s.scanMantissa(10); + /* fraction: */ case 7: + if (s.ch === 46) { + tok = 6; + s.next(); + s.scanMantissa(10); + } + /* exponent: */ case 2: + if ((s.ch === 101) || (s.ch === 69)) { + tok = 6; + s.next(); + if ((s.ch === 45) || (s.ch === 43)) { + s.next(); + } + s.scanMantissa(10); + } + if (s.ch === 105) { + tok = 7; + s.next(); + } + /* exit: */ case 8: + return [tok, $bytesToString($subslice(s.src, offs, s.offset))]; + /* */ case -1: } return; } + }; + Scanner.prototype.scanNumber = function(seenDecimalPoint) { return this.$val.scanNumber(seenDecimalPoint); }; + Scanner.ptr.prototype.scanEscape = function(quote) { + var _ref, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, base, d, max, msg, msg$1, n, offs, quote, s, x; + s = this; + offs = s.offset; + n = 0; + _tmp = 0; _tmp$1 = 0; base = _tmp; max = _tmp$1; + _ref = s.ch; + if (_ref === 97 || _ref === 98 || _ref === 102 || _ref === 110 || _ref === 114 || _ref === 116 || _ref === 118 || _ref === 92 || _ref === quote) { + s.next(); + return true; + } else if (_ref === 48 || _ref === 49 || _ref === 50 || _ref === 51 || _ref === 52 || _ref === 53 || _ref === 54 || _ref === 55) { + _tmp$2 = 3; _tmp$3 = 8; _tmp$4 = 255; n = _tmp$2; base = _tmp$3; max = _tmp$4; + } else if (_ref === 120) { + s.next(); + _tmp$5 = 2; _tmp$6 = 16; _tmp$7 = 255; n = _tmp$5; base = _tmp$6; max = _tmp$7; + } else if (_ref === 117) { + s.next(); + _tmp$8 = 4; _tmp$9 = 16; _tmp$10 = 1114111; n = _tmp$8; base = _tmp$9; max = _tmp$10; + } else if (_ref === 85) { + s.next(); + _tmp$11 = 8; _tmp$12 = 16; _tmp$13 = 1114111; n = _tmp$11; base = _tmp$12; max = _tmp$13; + } else { + msg = "unknown escape sequence"; + if (s.ch < 0) { + msg = "escape sequence not terminated"; + } + s.error(offs, msg); + return false; + } + x = 0; + while (true) { + if (!(n > 0)) { break; } + d = (digitVal(s.ch) >>> 0); + if (d >= base) { + msg$1 = fmt.Sprintf("illegal character %#U in escape sequence", new sliceType$1([new $Int32(s.ch)])); + if (s.ch < 0) { + msg$1 = "escape sequence not terminated"; + } + s.error(s.offset, msg$1); + return false; + } + x = ((((x >>> 16 << 16) * base >>> 0) + (x << 16 >>> 16) * base) >>> 0) + d >>> 0; + s.next(); + n = n - (1) >> 0; + } + if (x > max || 55296 <= x && x < 57344) { + s.error(offs, "escape sequence is invalid Unicode code point"); + return false; + } + return true; + }; + Scanner.prototype.scanEscape = function(quote) { return this.$val.scanEscape(quote); }; + Scanner.ptr.prototype.scanRune = function() { + var ch, n, offs, s, valid; + s = this; + offs = s.offset - 1 >> 0; + valid = true; + n = 0; + while (true) { + if (!(true)) { break; } + ch = s.ch; + if ((ch === 10) || ch < 0) { + if (valid) { + s.error(offs, "rune literal not terminated"); + valid = false; + } + break; + } + s.next(); + if (ch === 39) { + break; + } + n = n + (1) >> 0; + if (ch === 92) { + if (!s.scanEscape(39)) { + valid = false; + } + } + } + if (valid && !((n === 1))) { + s.error(offs, "illegal rune literal"); + } + return $bytesToString($subslice(s.src, offs, s.offset)); + }; + Scanner.prototype.scanRune = function() { return this.$val.scanRune(); }; + Scanner.ptr.prototype.scanString = function() { + var ch, offs, s; + s = this; + offs = s.offset - 1 >> 0; + while (true) { + if (!(true)) { break; } + ch = s.ch; + if ((ch === 10) || ch < 0) { + s.error(offs, "string literal not terminated"); + break; + } + s.next(); + if (ch === 34) { + break; + } + if (ch === 92) { + s.scanEscape(34); + } + } + return $bytesToString($subslice(s.src, offs, s.offset)); + }; + Scanner.prototype.scanString = function() { return this.$val.scanString(); }; + stripCR = function(b) { + var _i, _ref, b, c, ch, i; + c = $makeSlice(sliceType, b.$length); + i = 0; + _ref = b; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + ch = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (!((ch === 13))) { + (i < 0 || i >= c.$length) ? $throwRuntimeError("index out of range") : c.$array[c.$offset + i] = ch; + i = i + (1) >> 0; + } + _i++; + } + return $subslice(c, 0, i); + }; + Scanner.ptr.prototype.scanRawString = function() { + var ch, hasCR, lit, offs, s; + s = this; + offs = s.offset - 1 >> 0; + hasCR = false; + while (true) { + if (!(true)) { break; } + ch = s.ch; + if (ch < 0) { + s.error(offs, "raw string literal not terminated"); + break; + } + s.next(); + if (ch === 96) { + break; + } + if (ch === 13) { + hasCR = true; + } + } + lit = $subslice(s.src, offs, s.offset); + if (hasCR) { + lit = stripCR(lit); + } + return $bytesToString(lit); + }; + Scanner.prototype.scanRawString = function() { return this.$val.scanRawString(); }; + Scanner.ptr.prototype.skipWhitespace = function() { + var s; + s = this; + while (true) { + if (!((s.ch === 32) || (s.ch === 9) || (s.ch === 10) && !s.insertSemi || (s.ch === 13))) { break; } + s.next(); + } + }; + Scanner.prototype.skipWhitespace = function() { return this.$val.skipWhitespace(); }; + Scanner.ptr.prototype.switch2 = function(tok0, tok1) { + var s, tok0, tok1; + s = this; + if (s.ch === 61) { + s.next(); + return tok1; + } + return tok0; + }; + Scanner.prototype.switch2 = function(tok0, tok1) { return this.$val.switch2(tok0, tok1); }; + Scanner.ptr.prototype.switch3 = function(tok0, tok1, ch2, tok2) { + var ch2, s, tok0, tok1, tok2; + s = this; + if (s.ch === 61) { + s.next(); + return tok1; + } + if (s.ch === ch2) { + s.next(); + return tok2; + } + return tok0; + }; + Scanner.prototype.switch3 = function(tok0, tok1, ch2, tok2) { return this.$val.switch3(tok0, tok1, ch2, tok2); }; + Scanner.ptr.prototype.switch4 = function(tok0, tok1, ch2, tok2, tok3) { + var ch2, s, tok0, tok1, tok2, tok3; + s = this; + if (s.ch === 61) { + s.next(); + return tok1; + } + if (s.ch === ch2) { + s.next(); + if (s.ch === 61) { + s.next(); + return tok3; + } + return tok2; + } + return tok0; + }; + Scanner.prototype.switch4 = function(tok0, tok1, ch2, tok2, tok3) { return this.$val.switch4(tok0, tok1, ch2, tok2, tok3); }; + Scanner.ptr.prototype.Scan = function() { + var $args = arguments, $s = 0, $this = this, _ref, _ref$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, _tuple$1, ch, insertSemi, lit = "", pos = 0, s, tok = 0; + /* */ s: while (true) { switch ($s) { case 0: + s = $this; + /* scanAgain: */ case 1: + s.skipWhitespace(); + pos = s.file.Pos(s.offset); + insertSemi = false; + ch = s.ch; + /* if (isLetter(ch)) { */ if (isLetter(ch)) {} else if (48 <= ch && ch <= 57) { $s = 2; continue; } else { $s = 3; continue; } + lit = s.scanIdentifier(); + if (lit.length > 1) { + tok = token.Lookup(lit); + _ref = tok; + if (_ref === 4 || _ref === 61 || _ref === 65 || _ref === 69 || _ref === 80) { + insertSemi = true; + } + } else { + insertSemi = true; + tok = 4; + } + /* } else if (48 <= ch && ch <= 57) { */ $s = 4; continue; case 2: + insertSemi = true; + _tuple = s.scanNumber(false); tok = _tuple[0]; lit = _tuple[1]; + /* } else { */ $s = 4; continue; case 3: + s.next(); + _ref$1 = ch; + /* if (_ref$1 === -1) { */ if (_ref$1 === -1) {} else if (_ref$1 === 10) { $s = 5; continue; } else if (_ref$1 === 34) { $s = 6; continue; } else if (_ref$1 === 39) { $s = 7; continue; } else if (_ref$1 === 96) { $s = 8; continue; } else if (_ref$1 === 58) { $s = 9; continue; } else if (_ref$1 === 46) { $s = 10; continue; } else if (_ref$1 === 44) { $s = 11; continue; } else if (_ref$1 === 59) { $s = 12; continue; } else if (_ref$1 === 40) { $s = 13; continue; } else if (_ref$1 === 41) { $s = 14; continue; } else if (_ref$1 === 91) { $s = 15; continue; } else if (_ref$1 === 93) { $s = 16; continue; } else if (_ref$1 === 123) { $s = 17; continue; } else if (_ref$1 === 125) { $s = 18; continue; } else if (_ref$1 === 43) { $s = 19; continue; } else if (_ref$1 === 45) { $s = 20; continue; } else if (_ref$1 === 42) { $s = 21; continue; } else if (_ref$1 === 47) { $s = 22; continue; } else if (_ref$1 === 37) { $s = 23; continue; } else if (_ref$1 === 94) { $s = 24; continue; } else if (_ref$1 === 60) { $s = 25; continue; } else if (_ref$1 === 62) { $s = 26; continue; } else if (_ref$1 === 61) { $s = 27; continue; } else if (_ref$1 === 33) { $s = 28; continue; } else if (_ref$1 === 38) { $s = 29; continue; } else if (_ref$1 === 124) { $s = 30; continue; } else { $s = 31; continue; } + if (s.insertSemi) { + s.insertSemi = false; + _tmp = pos; _tmp$1 = 57; _tmp$2 = "\n"; pos = _tmp; tok = _tmp$1; lit = _tmp$2; + return [pos, tok, lit]; + } + tok = 1; + /* } else if (_ref$1 === 10) { */ $s = 32; continue; case 5: + s.insertSemi = false; + _tmp$3 = pos; _tmp$4 = 57; _tmp$5 = "\n"; pos = _tmp$3; tok = _tmp$4; lit = _tmp$5; + return [pos, tok, lit]; + /* } else if (_ref$1 === 34) { */ $s = 32; continue; case 6: + insertSemi = true; + tok = 9; + lit = s.scanString(); + /* } else if (_ref$1 === 39) { */ $s = 32; continue; case 7: + insertSemi = true; + tok = 8; + lit = s.scanRune(); + /* } else if (_ref$1 === 96) { */ $s = 32; continue; case 8: + insertSemi = true; + tok = 9; + lit = s.scanRawString(); + /* } else if (_ref$1 === 58) { */ $s = 32; continue; case 9: + tok = s.switch2(58, 47); + /* } else if (_ref$1 === 46) { */ $s = 32; continue; case 10: + if (48 <= s.ch && s.ch <= 57) { + insertSemi = true; + _tuple$1 = s.scanNumber(true); tok = _tuple$1[0]; lit = _tuple$1[1]; + } else if (s.ch === 46) { + s.next(); + if (s.ch === 46) { + s.next(); + tok = 48; + } + } else { + tok = 53; + } + /* } else if (_ref$1 === 44) { */ $s = 32; continue; case 11: + tok = 52; + /* } else if (_ref$1 === 59) { */ $s = 32; continue; case 12: + tok = 57; + lit = ";"; + /* } else if (_ref$1 === 40) { */ $s = 32; continue; case 13: + tok = 49; + /* } else if (_ref$1 === 41) { */ $s = 32; continue; case 14: + insertSemi = true; + tok = 54; + /* } else if (_ref$1 === 91) { */ $s = 32; continue; case 15: + tok = 50; + /* } else if (_ref$1 === 93) { */ $s = 32; continue; case 16: + insertSemi = true; + tok = 55; + /* } else if (_ref$1 === 123) { */ $s = 32; continue; case 17: + tok = 51; + /* } else if (_ref$1 === 125) { */ $s = 32; continue; case 18: + insertSemi = true; + tok = 56; + /* } else if (_ref$1 === 43) { */ $s = 32; continue; case 19: + tok = s.switch3(12, 23, 43, 37); + if (tok === 37) { + insertSemi = true; + } + /* } else if (_ref$1 === 45) { */ $s = 32; continue; case 20: + tok = s.switch3(13, 24, 45, 38); + if (tok === 38) { + insertSemi = true; + } + /* } else if (_ref$1 === 42) { */ $s = 32; continue; case 21: + tok = s.switch2(14, 25); + /* } else if (_ref$1 === 47) { */ $s = 32; continue; case 22: + /* if ((s.ch === 47) || (s.ch === 42)) { */ if ((s.ch === 47) || (s.ch === 42)) {} else { $s = 33; continue; } + if (s.insertSemi && s.findLineEnd()) { + s.ch = 47; + s.offset = s.file.Offset(pos); + s.rdOffset = s.offset + 1 >> 0; + s.insertSemi = false; + _tmp$6 = pos; _tmp$7 = 57; _tmp$8 = "\n"; pos = _tmp$6; tok = _tmp$7; lit = _tmp$8; + return [pos, tok, lit]; + } + lit = s.scanComment(); + /* if (((s.mode & 1) >>> 0) === 0) { */ if (((s.mode & 1) >>> 0) === 0) {} else { $s = 35; continue; } + s.insertSemi = false; + /* goto scanAgain */ $s = 1; continue; + /* } */ case 35: + tok = 2; + /* } else { */ $s = 34; continue; case 33: + tok = s.switch2(15, 26); + /* } */ case 34: + /* } else if (_ref$1 === 37) { */ $s = 32; continue; case 23: + tok = s.switch2(16, 27); + /* } else if (_ref$1 === 94) { */ $s = 32; continue; case 24: + tok = s.switch2(19, 30); + /* } else if (_ref$1 === 60) { */ $s = 32; continue; case 25: + if (s.ch === 45) { + s.next(); + tok = 36; + } else { + tok = s.switch4(40, 45, 60, 20, 31); + } + /* } else if (_ref$1 === 62) { */ $s = 32; continue; case 26: + tok = s.switch4(41, 46, 62, 21, 32); + /* } else if (_ref$1 === 61) { */ $s = 32; continue; case 27: + tok = s.switch2(42, 39); + /* } else if (_ref$1 === 33) { */ $s = 32; continue; case 28: + tok = s.switch2(43, 44); + /* } else if (_ref$1 === 38) { */ $s = 32; continue; case 29: + if (s.ch === 94) { + s.next(); + tok = s.switch2(22, 33); + } else { + tok = s.switch3(17, 28, 38, 34); + } + /* } else if (_ref$1 === 124) { */ $s = 32; continue; case 30: + tok = s.switch3(18, 29, 124, 35); + /* } else { */ $s = 32; continue; case 31: + if (!((ch === 65279))) { + s.error(s.file.Offset(pos), fmt.Sprintf("illegal character %#U", new sliceType$1([new $Int32(ch)]))); + } + insertSemi = s.insertSemi; + tok = 0; + lit = $encodeRune(ch); + /* } */ case 32: + /* } */ case 4: + if (((s.mode & 2) >>> 0) === 0) { + s.insertSemi = insertSemi; + } + return [pos, tok, lit]; + /* */ case -1: } return; } + }; + Scanner.prototype.Scan = function() { return this.$val.Scan(); }; + Error.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ErrorList.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}, {prop: "Sort", name: "Sort", pkg: "", typ: $funcType([], [], false)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Err", name: "Err", pkg: "", typ: $funcType([], [$error], false)}]; + ptrType.methods = [{prop: "Add", name: "Add", pkg: "", typ: $funcType([token.Position, $String], [], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "RemoveMultiples", name: "RemoveMultiples", pkg: "", typ: $funcType([], [], false)}]; + ptrType$3.methods = [{prop: "next", name: "next", pkg: "go/scanner", typ: $funcType([], [], false)}, {prop: "Init", name: "Init", pkg: "", typ: $funcType([ptrType$2, sliceType, ErrorHandler, Mode], [], false)}, {prop: "error", name: "error", pkg: "go/scanner", typ: $funcType([$Int, $String], [], false)}, {prop: "interpretLineComment", name: "interpretLineComment", pkg: "go/scanner", typ: $funcType([sliceType], [], false)}, {prop: "scanComment", name: "scanComment", pkg: "go/scanner", typ: $funcType([], [$String], false)}, {prop: "findLineEnd", name: "findLineEnd", pkg: "go/scanner", typ: $funcType([], [$Bool], false)}, {prop: "scanIdentifier", name: "scanIdentifier", pkg: "go/scanner", typ: $funcType([], [$String], false)}, {prop: "scanMantissa", name: "scanMantissa", pkg: "go/scanner", typ: $funcType([$Int], [], false)}, {prop: "scanNumber", name: "scanNumber", pkg: "go/scanner", typ: $funcType([$Bool], [token.Token, $String], false)}, {prop: "scanEscape", name: "scanEscape", pkg: "go/scanner", typ: $funcType([$Int32], [$Bool], false)}, {prop: "scanRune", name: "scanRune", pkg: "go/scanner", typ: $funcType([], [$String], false)}, {prop: "scanString", name: "scanString", pkg: "go/scanner", typ: $funcType([], [$String], false)}, {prop: "scanRawString", name: "scanRawString", pkg: "go/scanner", typ: $funcType([], [$String], false)}, {prop: "skipWhitespace", name: "skipWhitespace", pkg: "go/scanner", typ: $funcType([], [], false)}, {prop: "switch2", name: "switch2", pkg: "go/scanner", typ: $funcType([token.Token, token.Token], [token.Token], false)}, {prop: "switch3", name: "switch3", pkg: "go/scanner", typ: $funcType([token.Token, token.Token, $Int32, token.Token], [token.Token], false)}, {prop: "switch4", name: "switch4", pkg: "go/scanner", typ: $funcType([token.Token, token.Token, $Int32, token.Token, token.Token], [token.Token], false)}, {prop: "Scan", name: "Scan", pkg: "", typ: $funcType([], [token.Pos, token.Token, $String], false)}]; + Error.init([{prop: "Pos", name: "Pos", pkg: "", typ: token.Position, tag: ""}, {prop: "Msg", name: "Msg", pkg: "", typ: $String, tag: ""}]); + ErrorList.init(ptrType$1); + ErrorHandler.init([token.Position, $String], [], false); + Scanner.init([{prop: "file", name: "file", pkg: "go/scanner", typ: ptrType$2, tag: ""}, {prop: "dir", name: "dir", pkg: "go/scanner", typ: $String, tag: ""}, {prop: "src", name: "src", pkg: "go/scanner", typ: sliceType, tag: ""}, {prop: "err", name: "err", pkg: "go/scanner", typ: ErrorHandler, tag: ""}, {prop: "mode", name: "mode", pkg: "go/scanner", typ: Mode, tag: ""}, {prop: "ch", name: "ch", pkg: "go/scanner", typ: $Int32, tag: ""}, {prop: "offset", name: "offset", pkg: "go/scanner", typ: $Int, tag: ""}, {prop: "rdOffset", name: "rdOffset", pkg: "go/scanner", typ: $Int, tag: ""}, {prop: "lineOffset", name: "lineOffset", pkg: "go/scanner", typ: $Int, tag: ""}, {prop: "insertSemi", name: "insertSemi", pkg: "go/scanner", typ: $Bool, tag: ""}, {prop: "ErrorCount", name: "ErrorCount", pkg: "", typ: $Int, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_scanner = function() { while (true) { switch ($s) { case 0: + $r = bytes.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = fmt.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = token.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = io.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = filepath.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + $r = sort.$init($BLOCKING); /* */ $s = 6; case 6: if ($r && $r.$blocking) { $r = $r(); } + $r = strconv.$init($BLOCKING); /* */ $s = 7; case 7: if ($r && $r.$blocking) { $r = $r(); } + $r = unicode.$init($BLOCKING); /* */ $s = 8; case 8: if ($r && $r.$blocking) { $r = $r(); } + $r = utf8.$init($BLOCKING); /* */ $s = 9; case 9: if ($r && $r.$blocking) { $r = $r(); } + prefix = new sliceType($stringToBytes("//line ")); + /* */ } return; } }; $init_scanner.$blocking = true; return $init_scanner; + }; + return $pkg; +})(); +$packages["go/ast"] = (function() { + var $pkg = {}, bytes, fmt, scanner, token, io, os, reflect, sort, strconv, strings, unicode, utf8, Node, Expr, Stmt, Decl, Comment, CommentGroup, Field, FieldList, BadExpr, Ident, Ellipsis, BasicLit, FuncLit, CompositeLit, ParenExpr, SelectorExpr, IndexExpr, SliceExpr, TypeAssertExpr, CallExpr, StarExpr, UnaryExpr, BinaryExpr, KeyValueExpr, ChanDir, ArrayType, StructType, FuncType, InterfaceType, MapType, ChanType, BadStmt, DeclStmt, EmptyStmt, LabeledStmt, ExprStmt, SendStmt, IncDecStmt, AssignStmt, GoStmt, DeferStmt, ReturnStmt, BranchStmt, BlockStmt, IfStmt, CaseClause, SwitchStmt, TypeSwitchStmt, CommClause, SelectStmt, ForStmt, RangeStmt, Spec, ImportSpec, ValueSpec, TypeSpec, BadDecl, GenDecl, FuncDecl, File, Package, posSpan, byImportSpec, byCommentPos, Scope, Object, ObjKind, Visitor, inspector, ptrType, sliceType$1, ptrType$1, ptrType$2, ptrType$3, ptrType$4, ptrType$5, sliceType$2, ptrType$6, ptrType$9, ptrType$10, sliceType$4, ptrType$11, ptrType$12, ptrType$13, ptrType$14, ptrType$15, ptrType$16, ptrType$17, ptrType$18, ptrType$19, ptrType$20, ptrType$21, ptrType$22, ptrType$23, sliceType$5, sliceType$6, ptrType$24, sliceType$7, sliceType$8, sliceType$9, ptrType$26, ptrType$27, ptrType$28, ptrType$29, ptrType$30, ptrType$31, ptrType$32, ptrType$33, ptrType$34, ptrType$35, ptrType$36, ptrType$37, ptrType$38, ptrType$39, ptrType$40, ptrType$41, ptrType$42, ptrType$43, ptrType$44, ptrType$45, ptrType$46, ptrType$47, ptrType$48, ptrType$49, ptrType$50, ptrType$51, ptrType$52, ptrType$53, ptrType$54, ptrType$55, ptrType$56, ptrType$57, ptrType$58, ptrType$59, sliceType$10, sliceType$11, sliceType$12, sliceType$13, mapType, mapType$1, objKindStrings, isWhitespace, stripTrailingWhitespace, IsExported, SortImports, importPath, importName, importComment, collapse, sortSpecs, NewScope, NewObj, walkIdentList, walkExprList, walkStmtList, walkDeclList, Walk, Inspect; + bytes = $packages["bytes"]; + fmt = $packages["fmt"]; + scanner = $packages["go/scanner"]; + token = $packages["go/token"]; + io = $packages["io"]; + os = $packages["os"]; + reflect = $packages["reflect"]; + sort = $packages["sort"]; + strconv = $packages["strconv"]; + strings = $packages["strings"]; + unicode = $packages["unicode"]; + utf8 = $packages["unicode/utf8"]; + Node = $pkg.Node = $newType(8, $kindInterface, "ast.Node", "Node", "go/ast", null); + Expr = $pkg.Expr = $newType(8, $kindInterface, "ast.Expr", "Expr", "go/ast", null); + Stmt = $pkg.Stmt = $newType(8, $kindInterface, "ast.Stmt", "Stmt", "go/ast", null); + Decl = $pkg.Decl = $newType(8, $kindInterface, "ast.Decl", "Decl", "go/ast", null); + Comment = $pkg.Comment = $newType(0, $kindStruct, "ast.Comment", "Comment", "go/ast", function(Slash_, Text_) { + this.$val = this; + this.Slash = Slash_ !== undefined ? Slash_ : 0; + this.Text = Text_ !== undefined ? Text_ : ""; + }); + CommentGroup = $pkg.CommentGroup = $newType(0, $kindStruct, "ast.CommentGroup", "CommentGroup", "go/ast", function(List_) { + this.$val = this; + this.List = List_ !== undefined ? List_ : sliceType$5.nil; + }); + Field = $pkg.Field = $newType(0, $kindStruct, "ast.Field", "Field", "go/ast", function(Doc_, Names_, Type_, Tag_, Comment_) { + this.$val = this; + this.Doc = Doc_ !== undefined ? Doc_ : ptrType.nil; + this.Names = Names_ !== undefined ? Names_ : sliceType$8.nil; + this.Type = Type_ !== undefined ? Type_ : $ifaceNil; + this.Tag = Tag_ !== undefined ? Tag_ : ptrType$1.nil; + this.Comment = Comment_ !== undefined ? Comment_ : ptrType.nil; + }); + FieldList = $pkg.FieldList = $newType(0, $kindStruct, "ast.FieldList", "FieldList", "go/ast", function(Opening_, List_, Closing_) { + this.$val = this; + this.Opening = Opening_ !== undefined ? Opening_ : 0; + this.List = List_ !== undefined ? List_ : sliceType$10.nil; + this.Closing = Closing_ !== undefined ? Closing_ : 0; + }); + BadExpr = $pkg.BadExpr = $newType(0, $kindStruct, "ast.BadExpr", "BadExpr", "go/ast", function(From_, To_) { + this.$val = this; + this.From = From_ !== undefined ? From_ : 0; + this.To = To_ !== undefined ? To_ : 0; + }); + Ident = $pkg.Ident = $newType(0, $kindStruct, "ast.Ident", "Ident", "go/ast", function(NamePos_, Name_, Obj_) { + this.$val = this; + this.NamePos = NamePos_ !== undefined ? NamePos_ : 0; + this.Name = Name_ !== undefined ? Name_ : ""; + this.Obj = Obj_ !== undefined ? Obj_ : ptrType$3.nil; + }); + Ellipsis = $pkg.Ellipsis = $newType(0, $kindStruct, "ast.Ellipsis", "Ellipsis", "go/ast", function(Ellipsis_, Elt_) { + this.$val = this; + this.Ellipsis = Ellipsis_ !== undefined ? Ellipsis_ : 0; + this.Elt = Elt_ !== undefined ? Elt_ : $ifaceNil; + }); + BasicLit = $pkg.BasicLit = $newType(0, $kindStruct, "ast.BasicLit", "BasicLit", "go/ast", function(ValuePos_, Kind_, Value_) { + this.$val = this; + this.ValuePos = ValuePos_ !== undefined ? ValuePos_ : 0; + this.Kind = Kind_ !== undefined ? Kind_ : 0; + this.Value = Value_ !== undefined ? Value_ : ""; + }); + FuncLit = $pkg.FuncLit = $newType(0, $kindStruct, "ast.FuncLit", "FuncLit", "go/ast", function(Type_, Body_) { + this.$val = this; + this.Type = Type_ !== undefined ? Type_ : ptrType$16.nil; + this.Body = Body_ !== undefined ? Body_ : ptrType$5.nil; + }); + CompositeLit = $pkg.CompositeLit = $newType(0, $kindStruct, "ast.CompositeLit", "CompositeLit", "go/ast", function(Type_, Lbrace_, Elts_, Rbrace_) { + this.$val = this; + this.Type = Type_ !== undefined ? Type_ : $ifaceNil; + this.Lbrace = Lbrace_ !== undefined ? Lbrace_ : 0; + this.Elts = Elts_ !== undefined ? Elts_ : sliceType$11.nil; + this.Rbrace = Rbrace_ !== undefined ? Rbrace_ : 0; + }); + ParenExpr = $pkg.ParenExpr = $newType(0, $kindStruct, "ast.ParenExpr", "ParenExpr", "go/ast", function(Lparen_, X_, Rparen_) { + this.$val = this; + this.Lparen = Lparen_ !== undefined ? Lparen_ : 0; + this.X = X_ !== undefined ? X_ : $ifaceNil; + this.Rparen = Rparen_ !== undefined ? Rparen_ : 0; + }); + SelectorExpr = $pkg.SelectorExpr = $newType(0, $kindStruct, "ast.SelectorExpr", "SelectorExpr", "go/ast", function(X_, Sel_) { + this.$val = this; + this.X = X_ !== undefined ? X_ : $ifaceNil; + this.Sel = Sel_ !== undefined ? Sel_ : ptrType$4.nil; + }); + IndexExpr = $pkg.IndexExpr = $newType(0, $kindStruct, "ast.IndexExpr", "IndexExpr", "go/ast", function(X_, Lbrack_, Index_, Rbrack_) { + this.$val = this; + this.X = X_ !== undefined ? X_ : $ifaceNil; + this.Lbrack = Lbrack_ !== undefined ? Lbrack_ : 0; + this.Index = Index_ !== undefined ? Index_ : $ifaceNil; + this.Rbrack = Rbrack_ !== undefined ? Rbrack_ : 0; + }); + SliceExpr = $pkg.SliceExpr = $newType(0, $kindStruct, "ast.SliceExpr", "SliceExpr", "go/ast", function(X_, Lbrack_, Low_, High_, Max_, Slice3_, Rbrack_) { + this.$val = this; + this.X = X_ !== undefined ? X_ : $ifaceNil; + this.Lbrack = Lbrack_ !== undefined ? Lbrack_ : 0; + this.Low = Low_ !== undefined ? Low_ : $ifaceNil; + this.High = High_ !== undefined ? High_ : $ifaceNil; + this.Max = Max_ !== undefined ? Max_ : $ifaceNil; + this.Slice3 = Slice3_ !== undefined ? Slice3_ : false; + this.Rbrack = Rbrack_ !== undefined ? Rbrack_ : 0; + }); + TypeAssertExpr = $pkg.TypeAssertExpr = $newType(0, $kindStruct, "ast.TypeAssertExpr", "TypeAssertExpr", "go/ast", function(X_, Lparen_, Type_, Rparen_) { + this.$val = this; + this.X = X_ !== undefined ? X_ : $ifaceNil; + this.Lparen = Lparen_ !== undefined ? Lparen_ : 0; + this.Type = Type_ !== undefined ? Type_ : $ifaceNil; + this.Rparen = Rparen_ !== undefined ? Rparen_ : 0; + }); + CallExpr = $pkg.CallExpr = $newType(0, $kindStruct, "ast.CallExpr", "CallExpr", "go/ast", function(Fun_, Lparen_, Args_, Ellipsis_, Rparen_) { + this.$val = this; + this.Fun = Fun_ !== undefined ? Fun_ : $ifaceNil; + this.Lparen = Lparen_ !== undefined ? Lparen_ : 0; + this.Args = Args_ !== undefined ? Args_ : sliceType$11.nil; + this.Ellipsis = Ellipsis_ !== undefined ? Ellipsis_ : 0; + this.Rparen = Rparen_ !== undefined ? Rparen_ : 0; + }); + StarExpr = $pkg.StarExpr = $newType(0, $kindStruct, "ast.StarExpr", "StarExpr", "go/ast", function(Star_, X_) { + this.$val = this; + this.Star = Star_ !== undefined ? Star_ : 0; + this.X = X_ !== undefined ? X_ : $ifaceNil; + }); + UnaryExpr = $pkg.UnaryExpr = $newType(0, $kindStruct, "ast.UnaryExpr", "UnaryExpr", "go/ast", function(OpPos_, Op_, X_) { + this.$val = this; + this.OpPos = OpPos_ !== undefined ? OpPos_ : 0; + this.Op = Op_ !== undefined ? Op_ : 0; + this.X = X_ !== undefined ? X_ : $ifaceNil; + }); + BinaryExpr = $pkg.BinaryExpr = $newType(0, $kindStruct, "ast.BinaryExpr", "BinaryExpr", "go/ast", function(X_, OpPos_, Op_, Y_) { + this.$val = this; + this.X = X_ !== undefined ? X_ : $ifaceNil; + this.OpPos = OpPos_ !== undefined ? OpPos_ : 0; + this.Op = Op_ !== undefined ? Op_ : 0; + this.Y = Y_ !== undefined ? Y_ : $ifaceNil; + }); + KeyValueExpr = $pkg.KeyValueExpr = $newType(0, $kindStruct, "ast.KeyValueExpr", "KeyValueExpr", "go/ast", function(Key_, Colon_, Value_) { + this.$val = this; + this.Key = Key_ !== undefined ? Key_ : $ifaceNil; + this.Colon = Colon_ !== undefined ? Colon_ : 0; + this.Value = Value_ !== undefined ? Value_ : $ifaceNil; + }); + ChanDir = $pkg.ChanDir = $newType(4, $kindInt, "ast.ChanDir", "ChanDir", "go/ast", null); + ArrayType = $pkg.ArrayType = $newType(0, $kindStruct, "ast.ArrayType", "ArrayType", "go/ast", function(Lbrack_, Len_, Elt_) { + this.$val = this; + this.Lbrack = Lbrack_ !== undefined ? Lbrack_ : 0; + this.Len = Len_ !== undefined ? Len_ : $ifaceNil; + this.Elt = Elt_ !== undefined ? Elt_ : $ifaceNil; + }); + StructType = $pkg.StructType = $newType(0, $kindStruct, "ast.StructType", "StructType", "go/ast", function(Struct_, Fields_, Incomplete_) { + this.$val = this; + this.Struct = Struct_ !== undefined ? Struct_ : 0; + this.Fields = Fields_ !== undefined ? Fields_ : ptrType$2.nil; + this.Incomplete = Incomplete_ !== undefined ? Incomplete_ : false; + }); + FuncType = $pkg.FuncType = $newType(0, $kindStruct, "ast.FuncType", "FuncType", "go/ast", function(Func_, Params_, Results_) { + this.$val = this; + this.Func = Func_ !== undefined ? Func_ : 0; + this.Params = Params_ !== undefined ? Params_ : ptrType$2.nil; + this.Results = Results_ !== undefined ? Results_ : ptrType$2.nil; + }); + InterfaceType = $pkg.InterfaceType = $newType(0, $kindStruct, "ast.InterfaceType", "InterfaceType", "go/ast", function(Interface_, Methods_, Incomplete_) { + this.$val = this; + this.Interface = Interface_ !== undefined ? Interface_ : 0; + this.Methods = Methods_ !== undefined ? Methods_ : ptrType$2.nil; + this.Incomplete = Incomplete_ !== undefined ? Incomplete_ : false; + }); + MapType = $pkg.MapType = $newType(0, $kindStruct, "ast.MapType", "MapType", "go/ast", function(Map_, Key_, Value_) { + this.$val = this; + this.Map = Map_ !== undefined ? Map_ : 0; + this.Key = Key_ !== undefined ? Key_ : $ifaceNil; + this.Value = Value_ !== undefined ? Value_ : $ifaceNil; + }); + ChanType = $pkg.ChanType = $newType(0, $kindStruct, "ast.ChanType", "ChanType", "go/ast", function(Begin_, Arrow_, Dir_, Value_) { + this.$val = this; + this.Begin = Begin_ !== undefined ? Begin_ : 0; + this.Arrow = Arrow_ !== undefined ? Arrow_ : 0; + this.Dir = Dir_ !== undefined ? Dir_ : 0; + this.Value = Value_ !== undefined ? Value_ : $ifaceNil; + }); + BadStmt = $pkg.BadStmt = $newType(0, $kindStruct, "ast.BadStmt", "BadStmt", "go/ast", function(From_, To_) { + this.$val = this; + this.From = From_ !== undefined ? From_ : 0; + this.To = To_ !== undefined ? To_ : 0; + }); + DeclStmt = $pkg.DeclStmt = $newType(0, $kindStruct, "ast.DeclStmt", "DeclStmt", "go/ast", function(Decl_) { + this.$val = this; + this.Decl = Decl_ !== undefined ? Decl_ : $ifaceNil; + }); + EmptyStmt = $pkg.EmptyStmt = $newType(0, $kindStruct, "ast.EmptyStmt", "EmptyStmt", "go/ast", function(Semicolon_) { + this.$val = this; + this.Semicolon = Semicolon_ !== undefined ? Semicolon_ : 0; + }); + LabeledStmt = $pkg.LabeledStmt = $newType(0, $kindStruct, "ast.LabeledStmt", "LabeledStmt", "go/ast", function(Label_, Colon_, Stmt_) { + this.$val = this; + this.Label = Label_ !== undefined ? Label_ : ptrType$4.nil; + this.Colon = Colon_ !== undefined ? Colon_ : 0; + this.Stmt = Stmt_ !== undefined ? Stmt_ : $ifaceNil; + }); + ExprStmt = $pkg.ExprStmt = $newType(0, $kindStruct, "ast.ExprStmt", "ExprStmt", "go/ast", function(X_) { + this.$val = this; + this.X = X_ !== undefined ? X_ : $ifaceNil; + }); + SendStmt = $pkg.SendStmt = $newType(0, $kindStruct, "ast.SendStmt", "SendStmt", "go/ast", function(Chan_, Arrow_, Value_) { + this.$val = this; + this.Chan = Chan_ !== undefined ? Chan_ : $ifaceNil; + this.Arrow = Arrow_ !== undefined ? Arrow_ : 0; + this.Value = Value_ !== undefined ? Value_ : $ifaceNil; + }); + IncDecStmt = $pkg.IncDecStmt = $newType(0, $kindStruct, "ast.IncDecStmt", "IncDecStmt", "go/ast", function(X_, TokPos_, Tok_) { + this.$val = this; + this.X = X_ !== undefined ? X_ : $ifaceNil; + this.TokPos = TokPos_ !== undefined ? TokPos_ : 0; + this.Tok = Tok_ !== undefined ? Tok_ : 0; + }); + AssignStmt = $pkg.AssignStmt = $newType(0, $kindStruct, "ast.AssignStmt", "AssignStmt", "go/ast", function(Lhs_, TokPos_, Tok_, Rhs_) { + this.$val = this; + this.Lhs = Lhs_ !== undefined ? Lhs_ : sliceType$11.nil; + this.TokPos = TokPos_ !== undefined ? TokPos_ : 0; + this.Tok = Tok_ !== undefined ? Tok_ : 0; + this.Rhs = Rhs_ !== undefined ? Rhs_ : sliceType$11.nil; + }); + GoStmt = $pkg.GoStmt = $newType(0, $kindStruct, "ast.GoStmt", "GoStmt", "go/ast", function(Go_, Call_) { + this.$val = this; + this.Go = Go_ !== undefined ? Go_ : 0; + this.Call = Call_ !== undefined ? Call_ : ptrType$36.nil; + }); + DeferStmt = $pkg.DeferStmt = $newType(0, $kindStruct, "ast.DeferStmt", "DeferStmt", "go/ast", function(Defer_, Call_) { + this.$val = this; + this.Defer = Defer_ !== undefined ? Defer_ : 0; + this.Call = Call_ !== undefined ? Call_ : ptrType$36.nil; + }); + ReturnStmt = $pkg.ReturnStmt = $newType(0, $kindStruct, "ast.ReturnStmt", "ReturnStmt", "go/ast", function(Return_, Results_) { + this.$val = this; + this.Return = Return_ !== undefined ? Return_ : 0; + this.Results = Results_ !== undefined ? Results_ : sliceType$11.nil; + }); + BranchStmt = $pkg.BranchStmt = $newType(0, $kindStruct, "ast.BranchStmt", "BranchStmt", "go/ast", function(TokPos_, Tok_, Label_) { + this.$val = this; + this.TokPos = TokPos_ !== undefined ? TokPos_ : 0; + this.Tok = Tok_ !== undefined ? Tok_ : 0; + this.Label = Label_ !== undefined ? Label_ : ptrType$4.nil; + }); + BlockStmt = $pkg.BlockStmt = $newType(0, $kindStruct, "ast.BlockStmt", "BlockStmt", "go/ast", function(Lbrace_, List_, Rbrace_) { + this.$val = this; + this.Lbrace = Lbrace_ !== undefined ? Lbrace_ : 0; + this.List = List_ !== undefined ? List_ : sliceType$12.nil; + this.Rbrace = Rbrace_ !== undefined ? Rbrace_ : 0; + }); + IfStmt = $pkg.IfStmt = $newType(0, $kindStruct, "ast.IfStmt", "IfStmt", "go/ast", function(If_, Init_, Cond_, Body_, Else_) { + this.$val = this; + this.If = If_ !== undefined ? If_ : 0; + this.Init = Init_ !== undefined ? Init_ : $ifaceNil; + this.Cond = Cond_ !== undefined ? Cond_ : $ifaceNil; + this.Body = Body_ !== undefined ? Body_ : ptrType$5.nil; + this.Else = Else_ !== undefined ? Else_ : $ifaceNil; + }); + CaseClause = $pkg.CaseClause = $newType(0, $kindStruct, "ast.CaseClause", "CaseClause", "go/ast", function(Case_, List_, Colon_, Body_) { + this.$val = this; + this.Case = Case_ !== undefined ? Case_ : 0; + this.List = List_ !== undefined ? List_ : sliceType$11.nil; + this.Colon = Colon_ !== undefined ? Colon_ : 0; + this.Body = Body_ !== undefined ? Body_ : sliceType$12.nil; + }); + SwitchStmt = $pkg.SwitchStmt = $newType(0, $kindStruct, "ast.SwitchStmt", "SwitchStmt", "go/ast", function(Switch_, Init_, Tag_, Body_) { + this.$val = this; + this.Switch = Switch_ !== undefined ? Switch_ : 0; + this.Init = Init_ !== undefined ? Init_ : $ifaceNil; + this.Tag = Tag_ !== undefined ? Tag_ : $ifaceNil; + this.Body = Body_ !== undefined ? Body_ : ptrType$5.nil; + }); + TypeSwitchStmt = $pkg.TypeSwitchStmt = $newType(0, $kindStruct, "ast.TypeSwitchStmt", "TypeSwitchStmt", "go/ast", function(Switch_, Init_, Assign_, Body_) { + this.$val = this; + this.Switch = Switch_ !== undefined ? Switch_ : 0; + this.Init = Init_ !== undefined ? Init_ : $ifaceNil; + this.Assign = Assign_ !== undefined ? Assign_ : $ifaceNil; + this.Body = Body_ !== undefined ? Body_ : ptrType$5.nil; + }); + CommClause = $pkg.CommClause = $newType(0, $kindStruct, "ast.CommClause", "CommClause", "go/ast", function(Case_, Comm_, Colon_, Body_) { + this.$val = this; + this.Case = Case_ !== undefined ? Case_ : 0; + this.Comm = Comm_ !== undefined ? Comm_ : $ifaceNil; + this.Colon = Colon_ !== undefined ? Colon_ : 0; + this.Body = Body_ !== undefined ? Body_ : sliceType$12.nil; + }); + SelectStmt = $pkg.SelectStmt = $newType(0, $kindStruct, "ast.SelectStmt", "SelectStmt", "go/ast", function(Select_, Body_) { + this.$val = this; + this.Select = Select_ !== undefined ? Select_ : 0; + this.Body = Body_ !== undefined ? Body_ : ptrType$5.nil; + }); + ForStmt = $pkg.ForStmt = $newType(0, $kindStruct, "ast.ForStmt", "ForStmt", "go/ast", function(For_, Init_, Cond_, Post_, Body_) { + this.$val = this; + this.For = For_ !== undefined ? For_ : 0; + this.Init = Init_ !== undefined ? Init_ : $ifaceNil; + this.Cond = Cond_ !== undefined ? Cond_ : $ifaceNil; + this.Post = Post_ !== undefined ? Post_ : $ifaceNil; + this.Body = Body_ !== undefined ? Body_ : ptrType$5.nil; + }); + RangeStmt = $pkg.RangeStmt = $newType(0, $kindStruct, "ast.RangeStmt", "RangeStmt", "go/ast", function(For_, Key_, Value_, TokPos_, Tok_, X_, Body_) { + this.$val = this; + this.For = For_ !== undefined ? For_ : 0; + this.Key = Key_ !== undefined ? Key_ : $ifaceNil; + this.Value = Value_ !== undefined ? Value_ : $ifaceNil; + this.TokPos = TokPos_ !== undefined ? TokPos_ : 0; + this.Tok = Tok_ !== undefined ? Tok_ : 0; + this.X = X_ !== undefined ? X_ : $ifaceNil; + this.Body = Body_ !== undefined ? Body_ : ptrType$5.nil; + }); + Spec = $pkg.Spec = $newType(8, $kindInterface, "ast.Spec", "Spec", "go/ast", null); + ImportSpec = $pkg.ImportSpec = $newType(0, $kindStruct, "ast.ImportSpec", "ImportSpec", "go/ast", function(Doc_, Name_, Path_, Comment_, EndPos_) { + this.$val = this; + this.Doc = Doc_ !== undefined ? Doc_ : ptrType.nil; + this.Name = Name_ !== undefined ? Name_ : ptrType$4.nil; + this.Path = Path_ !== undefined ? Path_ : ptrType$1.nil; + this.Comment = Comment_ !== undefined ? Comment_ : ptrType.nil; + this.EndPos = EndPos_ !== undefined ? EndPos_ : 0; + }); + ValueSpec = $pkg.ValueSpec = $newType(0, $kindStruct, "ast.ValueSpec", "ValueSpec", "go/ast", function(Doc_, Names_, Type_, Values_, Comment_) { + this.$val = this; + this.Doc = Doc_ !== undefined ? Doc_ : ptrType.nil; + this.Names = Names_ !== undefined ? Names_ : sliceType$8.nil; + this.Type = Type_ !== undefined ? Type_ : $ifaceNil; + this.Values = Values_ !== undefined ? Values_ : sliceType$11.nil; + this.Comment = Comment_ !== undefined ? Comment_ : ptrType.nil; + }); + TypeSpec = $pkg.TypeSpec = $newType(0, $kindStruct, "ast.TypeSpec", "TypeSpec", "go/ast", function(Doc_, Name_, Type_, Comment_) { + this.$val = this; + this.Doc = Doc_ !== undefined ? Doc_ : ptrType.nil; + this.Name = Name_ !== undefined ? Name_ : ptrType$4.nil; + this.Type = Type_ !== undefined ? Type_ : $ifaceNil; + this.Comment = Comment_ !== undefined ? Comment_ : ptrType.nil; + }); + BadDecl = $pkg.BadDecl = $newType(0, $kindStruct, "ast.BadDecl", "BadDecl", "go/ast", function(From_, To_) { + this.$val = this; + this.From = From_ !== undefined ? From_ : 0; + this.To = To_ !== undefined ? To_ : 0; + }); + GenDecl = $pkg.GenDecl = $newType(0, $kindStruct, "ast.GenDecl", "GenDecl", "go/ast", function(Doc_, TokPos_, Tok_, Lparen_, Specs_, Rparen_) { + this.$val = this; + this.Doc = Doc_ !== undefined ? Doc_ : ptrType.nil; + this.TokPos = TokPos_ !== undefined ? TokPos_ : 0; + this.Tok = Tok_ !== undefined ? Tok_ : 0; + this.Lparen = Lparen_ !== undefined ? Lparen_ : 0; + this.Specs = Specs_ !== undefined ? Specs_ : sliceType$13.nil; + this.Rparen = Rparen_ !== undefined ? Rparen_ : 0; + }); + FuncDecl = $pkg.FuncDecl = $newType(0, $kindStruct, "ast.FuncDecl", "FuncDecl", "go/ast", function(Doc_, Recv_, Name_, Type_, Body_) { + this.$val = this; + this.Doc = Doc_ !== undefined ? Doc_ : ptrType.nil; + this.Recv = Recv_ !== undefined ? Recv_ : ptrType$2.nil; + this.Name = Name_ !== undefined ? Name_ : ptrType$4.nil; + this.Type = Type_ !== undefined ? Type_ : ptrType$16.nil; + this.Body = Body_ !== undefined ? Body_ : ptrType$5.nil; + }); + File = $pkg.File = $newType(0, $kindStruct, "ast.File", "File", "go/ast", function(Doc_, Package_, Name_, Decls_, Scope_, Imports_, Unresolved_, Comments_) { + this.$val = this; + this.Doc = Doc_ !== undefined ? Doc_ : ptrType.nil; + this.Package = Package_ !== undefined ? Package_ : 0; + this.Name = Name_ !== undefined ? Name_ : ptrType$4.nil; + this.Decls = Decls_ !== undefined ? Decls_ : sliceType$6.nil; + this.Scope = Scope_ !== undefined ? Scope_ : ptrType$26.nil; + this.Imports = Imports_ !== undefined ? Imports_ : sliceType$7.nil; + this.Unresolved = Unresolved_ !== undefined ? Unresolved_ : sliceType$8.nil; + this.Comments = Comments_ !== undefined ? Comments_ : sliceType$2.nil; + }); + Package = $pkg.Package = $newType(0, $kindStruct, "ast.Package", "Package", "go/ast", function(Name_, Scope_, Imports_, Files_) { + this.$val = this; + this.Name = Name_ !== undefined ? Name_ : ""; + this.Scope = Scope_ !== undefined ? Scope_ : ptrType$26.nil; + this.Imports = Imports_ !== undefined ? Imports_ : false; + this.Files = Files_ !== undefined ? Files_ : false; + }); + posSpan = $pkg.posSpan = $newType(0, $kindStruct, "ast.posSpan", "posSpan", "go/ast", function(Start_, End_) { + this.$val = this; + this.Start = Start_ !== undefined ? Start_ : 0; + this.End = End_ !== undefined ? End_ : 0; + }); + byImportSpec = $pkg.byImportSpec = $newType(12, $kindSlice, "ast.byImportSpec", "byImportSpec", "go/ast", null); + byCommentPos = $pkg.byCommentPos = $newType(12, $kindSlice, "ast.byCommentPos", "byCommentPos", "go/ast", null); + Scope = $pkg.Scope = $newType(0, $kindStruct, "ast.Scope", "Scope", "go/ast", function(Outer_, Objects_) { + this.$val = this; + this.Outer = Outer_ !== undefined ? Outer_ : ptrType$26.nil; + this.Objects = Objects_ !== undefined ? Objects_ : false; + }); + Object = $pkg.Object = $newType(0, $kindStruct, "ast.Object", "Object", "go/ast", function(Kind_, Name_, Decl_, Data_, Type_) { + this.$val = this; + this.Kind = Kind_ !== undefined ? Kind_ : 0; + this.Name = Name_ !== undefined ? Name_ : ""; + this.Decl = Decl_ !== undefined ? Decl_ : $ifaceNil; + this.Data = Data_ !== undefined ? Data_ : $ifaceNil; + this.Type = Type_ !== undefined ? Type_ : $ifaceNil; + }); + ObjKind = $pkg.ObjKind = $newType(4, $kindInt, "ast.ObjKind", "ObjKind", "go/ast", null); + Visitor = $pkg.Visitor = $newType(8, $kindInterface, "ast.Visitor", "Visitor", "go/ast", null); + inspector = $pkg.inspector = $newType(4, $kindFunc, "ast.inspector", "inspector", "go/ast", null); + ptrType = $ptrType(CommentGroup); + sliceType$1 = $sliceType($String); + ptrType$1 = $ptrType(BasicLit); + ptrType$2 = $ptrType(FieldList); + ptrType$3 = $ptrType(Object); + ptrType$4 = $ptrType(Ident); + ptrType$5 = $ptrType(BlockStmt); + sliceType$2 = $sliceType(ptrType); + ptrType$6 = $ptrType(Comment); + ptrType$9 = $ptrType(File); + ptrType$10 = $ptrType(Field); + sliceType$4 = $sliceType($emptyInterface); + ptrType$11 = $ptrType(SelectorExpr); + ptrType$12 = $ptrType(StarExpr); + ptrType$13 = $ptrType(ParenExpr); + ptrType$14 = $ptrType(ArrayType); + ptrType$15 = $ptrType(StructType); + ptrType$16 = $ptrType(FuncType); + ptrType$17 = $ptrType(InterfaceType); + ptrType$18 = $ptrType(MapType); + ptrType$19 = $ptrType(ChanType); + ptrType$20 = $ptrType(ValueSpec); + ptrType$21 = $ptrType(TypeSpec); + ptrType$22 = $ptrType(GenDecl); + ptrType$23 = $ptrType(FuncDecl); + sliceType$5 = $sliceType(ptrType$6); + sliceType$6 = $sliceType(Decl); + ptrType$24 = $ptrType(ImportSpec); + sliceType$7 = $sliceType(ptrType$24); + sliceType$8 = $sliceType(ptrType$4); + sliceType$9 = $sliceType(posSpan); + ptrType$26 = $ptrType(Scope); + ptrType$27 = $ptrType(LabeledStmt); + ptrType$28 = $ptrType(AssignStmt); + ptrType$29 = $ptrType(BadExpr); + ptrType$30 = $ptrType(Ellipsis); + ptrType$31 = $ptrType(FuncLit); + ptrType$32 = $ptrType(CompositeLit); + ptrType$33 = $ptrType(IndexExpr); + ptrType$34 = $ptrType(SliceExpr); + ptrType$35 = $ptrType(TypeAssertExpr); + ptrType$36 = $ptrType(CallExpr); + ptrType$37 = $ptrType(UnaryExpr); + ptrType$38 = $ptrType(BinaryExpr); + ptrType$39 = $ptrType(KeyValueExpr); + ptrType$40 = $ptrType(BadStmt); + ptrType$41 = $ptrType(DeclStmt); + ptrType$42 = $ptrType(EmptyStmt); + ptrType$43 = $ptrType(ExprStmt); + ptrType$44 = $ptrType(SendStmt); + ptrType$45 = $ptrType(IncDecStmt); + ptrType$46 = $ptrType(GoStmt); + ptrType$47 = $ptrType(DeferStmt); + ptrType$48 = $ptrType(ReturnStmt); + ptrType$49 = $ptrType(BranchStmt); + ptrType$50 = $ptrType(IfStmt); + ptrType$51 = $ptrType(CaseClause); + ptrType$52 = $ptrType(SwitchStmt); + ptrType$53 = $ptrType(TypeSwitchStmt); + ptrType$54 = $ptrType(CommClause); + ptrType$55 = $ptrType(SelectStmt); + ptrType$56 = $ptrType(ForStmt); + ptrType$57 = $ptrType(RangeStmt); + ptrType$58 = $ptrType(BadDecl); + ptrType$59 = $ptrType(Package); + sliceType$10 = $sliceType(ptrType$10); + sliceType$11 = $sliceType(Expr); + sliceType$12 = $sliceType(Stmt); + sliceType$13 = $sliceType(Spec); + mapType = $mapType($String, ptrType$3); + mapType$1 = $mapType($String, ptrType$9); + Comment.ptr.prototype.Pos = function() { + var c; + c = this; + return c.Slash; + }; + Comment.prototype.Pos = function() { return this.$val.Pos(); }; + Comment.ptr.prototype.End = function() { + var c; + c = this; + return (((c.Slash >> 0) + c.Text.length >> 0) >> 0); + }; + Comment.prototype.End = function() { return this.$val.End(); }; + CommentGroup.ptr.prototype.Pos = function() { + var g, x; + g = this; + return (x = g.List, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])).Pos(); + }; + CommentGroup.prototype.Pos = function() { return this.$val.Pos(); }; + CommentGroup.ptr.prototype.End = function() { + var g, x, x$1; + g = this; + return (x = g.List, x$1 = g.List.$length - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])).End(); + }; + CommentGroup.prototype.End = function() { return this.$val.End(); }; + isWhitespace = function(ch) { + var ch; + return (ch === 32) || (ch === 9) || (ch === 10) || (ch === 13); + }; + stripTrailingWhitespace = function(s) { + var i, s; + i = s.length; + while (true) { + if (!(i > 0 && isWhitespace(s.charCodeAt((i - 1 >> 0))))) { break; } + i = i - (1) >> 0; + } + return s.substring(0, i); + }; + CommentGroup.ptr.prototype.Text = function() { + var _i, _i$1, _i$2, _i$3, _ref, _ref$1, _ref$2, _ref$3, _ref$4, c, c$1, cl, comments, g, i, l, line, lines, n, x, x$1; + g = this; + if (g === ptrType.nil) { + return ""; + } + comments = $makeSlice(sliceType$1, g.List.$length); + _ref = g.List; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + c = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + (i < 0 || i >= comments.$length) ? $throwRuntimeError("index out of range") : comments.$array[comments.$offset + i] = c.Text; + _i++; + } + lines = $makeSlice(sliceType$1, 0, 10); + _ref$1 = comments; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + c$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i$1]); + _ref$2 = c$1.charCodeAt(1); + if (_ref$2 === 47) { + c$1 = c$1.substring(2); + if (c$1.length > 0 && (c$1.charCodeAt(0) === 32)) { + c$1 = c$1.substring(1); + } + } else if (_ref$2 === 42) { + c$1 = c$1.substring(2, (c$1.length - 2 >> 0)); + } + cl = strings.Split(c$1, "\n"); + _ref$3 = cl; + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$3.$length)) { break; } + l = ((_i$2 < 0 || _i$2 >= _ref$3.$length) ? $throwRuntimeError("index out of range") : _ref$3.$array[_ref$3.$offset + _i$2]); + lines = $append(lines, stripTrailingWhitespace(l)); + _i$2++; + } + _i$1++; + } + n = 0; + _ref$4 = lines; + _i$3 = 0; + while (true) { + if (!(_i$3 < _ref$4.$length)) { break; } + line = ((_i$3 < 0 || _i$3 >= _ref$4.$length) ? $throwRuntimeError("index out of range") : _ref$4.$array[_ref$4.$offset + _i$3]); + if (!(line === "") || n > 0 && !((x = n - 1 >> 0, ((x < 0 || x >= lines.$length) ? $throwRuntimeError("index out of range") : lines.$array[lines.$offset + x])) === "")) { + (n < 0 || n >= lines.$length) ? $throwRuntimeError("index out of range") : lines.$array[lines.$offset + n] = line; + n = n + (1) >> 0; + } + _i$3++; + } + lines = $subslice(lines, 0, n); + if (n > 0 && !((x$1 = n - 1 >> 0, ((x$1 < 0 || x$1 >= lines.$length) ? $throwRuntimeError("index out of range") : lines.$array[lines.$offset + x$1])) === "")) { + lines = $append(lines, ""); + } + return strings.Join(lines, "\n"); + }; + CommentGroup.prototype.Text = function() { return this.$val.Text(); }; + Field.ptr.prototype.Pos = function() { + var f, x; + f = this; + if (f.Names.$length > 0) { + return (x = f.Names, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])).Pos(); + } + return f.Type.Pos(); + }; + Field.prototype.Pos = function() { return this.$val.Pos(); }; + Field.ptr.prototype.End = function() { + var f; + f = this; + if (!(f.Tag === ptrType$1.nil)) { + return f.Tag.End(); + } + return f.Type.End(); + }; + Field.prototype.End = function() { return this.$val.End(); }; + FieldList.ptr.prototype.Pos = function() { + var f, x; + f = this; + if (new token.Pos(f.Opening).IsValid()) { + return f.Opening; + } + if (f.List.$length > 0) { + return (x = f.List, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])).Pos(); + } + return 0; + }; + FieldList.prototype.Pos = function() { return this.$val.Pos(); }; + FieldList.ptr.prototype.End = function() { + var f, n, x, x$1; + f = this; + if (new token.Pos(f.Closing).IsValid()) { + return f.Closing + 1 >> 0; + } + n = f.List.$length; + if (n > 0) { + return (x = f.List, x$1 = n - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])).End(); + } + return 0; + }; + FieldList.prototype.End = function() { return this.$val.End(); }; + FieldList.ptr.prototype.NumFields = function() { + var _i, _ref, f, g, m, n; + f = this; + n = 0; + if (!(f === ptrType$2.nil)) { + _ref = f.List; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + g = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + m = g.Names.$length; + if (m === 0) { + m = 1; + } + n = n + (m) >> 0; + _i++; + } + } + return n; + }; + FieldList.prototype.NumFields = function() { return this.$val.NumFields(); }; + BadExpr.ptr.prototype.Pos = function() { + var x; + x = this; + return x.From; + }; + BadExpr.prototype.Pos = function() { return this.$val.Pos(); }; + Ident.ptr.prototype.Pos = function() { + var x; + x = this; + return x.NamePos; + }; + Ident.prototype.Pos = function() { return this.$val.Pos(); }; + Ellipsis.ptr.prototype.Pos = function() { + var x; + x = this; + return x.Ellipsis; + }; + Ellipsis.prototype.Pos = function() { return this.$val.Pos(); }; + BasicLit.ptr.prototype.Pos = function() { + var x; + x = this; + return x.ValuePos; + }; + BasicLit.prototype.Pos = function() { return this.$val.Pos(); }; + FuncLit.ptr.prototype.Pos = function() { + var x; + x = this; + return x.Type.Pos(); + }; + FuncLit.prototype.Pos = function() { return this.$val.Pos(); }; + CompositeLit.ptr.prototype.Pos = function() { + var x; + x = this; + if (!($interfaceIsEqual(x.Type, $ifaceNil))) { + return x.Type.Pos(); + } + return x.Lbrace; + }; + CompositeLit.prototype.Pos = function() { return this.$val.Pos(); }; + ParenExpr.ptr.prototype.Pos = function() { + var x; + x = this; + return x.Lparen; + }; + ParenExpr.prototype.Pos = function() { return this.$val.Pos(); }; + SelectorExpr.ptr.prototype.Pos = function() { + var x; + x = this; + return x.X.Pos(); + }; + SelectorExpr.prototype.Pos = function() { return this.$val.Pos(); }; + IndexExpr.ptr.prototype.Pos = function() { + var x; + x = this; + return x.X.Pos(); + }; + IndexExpr.prototype.Pos = function() { return this.$val.Pos(); }; + SliceExpr.ptr.prototype.Pos = function() { + var x; + x = this; + return x.X.Pos(); + }; + SliceExpr.prototype.Pos = function() { return this.$val.Pos(); }; + TypeAssertExpr.ptr.prototype.Pos = function() { + var x; + x = this; + return x.X.Pos(); + }; + TypeAssertExpr.prototype.Pos = function() { return this.$val.Pos(); }; + CallExpr.ptr.prototype.Pos = function() { + var x; + x = this; + return x.Fun.Pos(); + }; + CallExpr.prototype.Pos = function() { return this.$val.Pos(); }; + StarExpr.ptr.prototype.Pos = function() { + var x; + x = this; + return x.Star; + }; + StarExpr.prototype.Pos = function() { return this.$val.Pos(); }; + UnaryExpr.ptr.prototype.Pos = function() { + var x; + x = this; + return x.OpPos; + }; + UnaryExpr.prototype.Pos = function() { return this.$val.Pos(); }; + BinaryExpr.ptr.prototype.Pos = function() { + var x; + x = this; + return x.X.Pos(); + }; + BinaryExpr.prototype.Pos = function() { return this.$val.Pos(); }; + KeyValueExpr.ptr.prototype.Pos = function() { + var x; + x = this; + return x.Key.Pos(); + }; + KeyValueExpr.prototype.Pos = function() { return this.$val.Pos(); }; + ArrayType.ptr.prototype.Pos = function() { + var x; + x = this; + return x.Lbrack; + }; + ArrayType.prototype.Pos = function() { return this.$val.Pos(); }; + StructType.ptr.prototype.Pos = function() { + var x; + x = this; + return x.Struct; + }; + StructType.prototype.Pos = function() { return this.$val.Pos(); }; + FuncType.ptr.prototype.Pos = function() { + var x; + x = this; + if (new token.Pos(x.Func).IsValid() || x.Params === ptrType$2.nil) { + return x.Func; + } + return x.Params.Pos(); + }; + FuncType.prototype.Pos = function() { return this.$val.Pos(); }; + InterfaceType.ptr.prototype.Pos = function() { + var x; + x = this; + return x.Interface; + }; + InterfaceType.prototype.Pos = function() { return this.$val.Pos(); }; + MapType.ptr.prototype.Pos = function() { + var x; + x = this; + return x.Map; + }; + MapType.prototype.Pos = function() { return this.$val.Pos(); }; + ChanType.ptr.prototype.Pos = function() { + var x; + x = this; + return x.Begin; + }; + ChanType.prototype.Pos = function() { return this.$val.Pos(); }; + BadExpr.ptr.prototype.End = function() { + var x; + x = this; + return x.To; + }; + BadExpr.prototype.End = function() { return this.$val.End(); }; + Ident.ptr.prototype.End = function() { + var x; + x = this; + return (((x.NamePos >> 0) + x.Name.length >> 0) >> 0); + }; + Ident.prototype.End = function() { return this.$val.End(); }; + Ellipsis.ptr.prototype.End = function() { + var x; + x = this; + if (!($interfaceIsEqual(x.Elt, $ifaceNil))) { + return x.Elt.End(); + } + return x.Ellipsis + 3 >> 0; + }; + Ellipsis.prototype.End = function() { return this.$val.End(); }; + BasicLit.ptr.prototype.End = function() { + var x; + x = this; + return (((x.ValuePos >> 0) + x.Value.length >> 0) >> 0); + }; + BasicLit.prototype.End = function() { return this.$val.End(); }; + FuncLit.ptr.prototype.End = function() { + var x; + x = this; + return x.Body.End(); + }; + FuncLit.prototype.End = function() { return this.$val.End(); }; + CompositeLit.ptr.prototype.End = function() { + var x; + x = this; + return x.Rbrace + 1 >> 0; + }; + CompositeLit.prototype.End = function() { return this.$val.End(); }; + ParenExpr.ptr.prototype.End = function() { + var x; + x = this; + return x.Rparen + 1 >> 0; + }; + ParenExpr.prototype.End = function() { return this.$val.End(); }; + SelectorExpr.ptr.prototype.End = function() { + var x; + x = this; + return x.Sel.End(); + }; + SelectorExpr.prototype.End = function() { return this.$val.End(); }; + IndexExpr.ptr.prototype.End = function() { + var x; + x = this; + return x.Rbrack + 1 >> 0; + }; + IndexExpr.prototype.End = function() { return this.$val.End(); }; + SliceExpr.ptr.prototype.End = function() { + var x; + x = this; + return x.Rbrack + 1 >> 0; + }; + SliceExpr.prototype.End = function() { return this.$val.End(); }; + TypeAssertExpr.ptr.prototype.End = function() { + var x; + x = this; + return x.Rparen + 1 >> 0; + }; + TypeAssertExpr.prototype.End = function() { return this.$val.End(); }; + CallExpr.ptr.prototype.End = function() { + var x; + x = this; + return x.Rparen + 1 >> 0; + }; + CallExpr.prototype.End = function() { return this.$val.End(); }; + StarExpr.ptr.prototype.End = function() { + var x; + x = this; + return x.X.End(); + }; + StarExpr.prototype.End = function() { return this.$val.End(); }; + UnaryExpr.ptr.prototype.End = function() { + var x; + x = this; + return x.X.End(); + }; + UnaryExpr.prototype.End = function() { return this.$val.End(); }; + BinaryExpr.ptr.prototype.End = function() { + var x; + x = this; + return x.Y.End(); + }; + BinaryExpr.prototype.End = function() { return this.$val.End(); }; + KeyValueExpr.ptr.prototype.End = function() { + var x; + x = this; + return x.Value.End(); + }; + KeyValueExpr.prototype.End = function() { return this.$val.End(); }; + ArrayType.ptr.prototype.End = function() { + var x; + x = this; + return x.Elt.End(); + }; + ArrayType.prototype.End = function() { return this.$val.End(); }; + StructType.ptr.prototype.End = function() { + var x; + x = this; + return x.Fields.End(); + }; + StructType.prototype.End = function() { return this.$val.End(); }; + FuncType.ptr.prototype.End = function() { + var x; + x = this; + if (!(x.Results === ptrType$2.nil)) { + return x.Results.End(); + } + return x.Params.End(); + }; + FuncType.prototype.End = function() { return this.$val.End(); }; + InterfaceType.ptr.prototype.End = function() { + var x; + x = this; + return x.Methods.End(); + }; + InterfaceType.prototype.End = function() { return this.$val.End(); }; + MapType.ptr.prototype.End = function() { + var x; + x = this; + return x.Value.End(); + }; + MapType.prototype.End = function() { return this.$val.End(); }; + ChanType.ptr.prototype.End = function() { + var x; + x = this; + return x.Value.End(); + }; + ChanType.prototype.End = function() { return this.$val.End(); }; + IsExported = $pkg.IsExported = function(name) { + var _tuple, ch, name; + _tuple = utf8.DecodeRuneInString(name); ch = _tuple[0]; + return unicode.IsUpper(ch); + }; + Ident.ptr.prototype.IsExported = function() { + var id; + id = this; + return IsExported(id.Name); + }; + Ident.prototype.IsExported = function() { return this.$val.IsExported(); }; + Ident.ptr.prototype.String = function() { + var id; + id = this; + if (!(id === ptrType$4.nil)) { + return id.Name; + } + return ""; + }; + Ident.prototype.String = function() { return this.$val.String(); }; + BadStmt.ptr.prototype.Pos = function() { + var s; + s = this; + return s.From; + }; + BadStmt.prototype.Pos = function() { return this.$val.Pos(); }; + DeclStmt.ptr.prototype.Pos = function() { + var s; + s = this; + return s.Decl.Pos(); + }; + DeclStmt.prototype.Pos = function() { return this.$val.Pos(); }; + EmptyStmt.ptr.prototype.Pos = function() { + var s; + s = this; + return s.Semicolon; + }; + EmptyStmt.prototype.Pos = function() { return this.$val.Pos(); }; + LabeledStmt.ptr.prototype.Pos = function() { + var s; + s = this; + return s.Label.Pos(); + }; + LabeledStmt.prototype.Pos = function() { return this.$val.Pos(); }; + ExprStmt.ptr.prototype.Pos = function() { + var s; + s = this; + return s.X.Pos(); + }; + ExprStmt.prototype.Pos = function() { return this.$val.Pos(); }; + SendStmt.ptr.prototype.Pos = function() { + var s; + s = this; + return s.Chan.Pos(); + }; + SendStmt.prototype.Pos = function() { return this.$val.Pos(); }; + IncDecStmt.ptr.prototype.Pos = function() { + var s; + s = this; + return s.X.Pos(); + }; + IncDecStmt.prototype.Pos = function() { return this.$val.Pos(); }; + AssignStmt.ptr.prototype.Pos = function() { + var s, x; + s = this; + return (x = s.Lhs, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])).Pos(); + }; + AssignStmt.prototype.Pos = function() { return this.$val.Pos(); }; + GoStmt.ptr.prototype.Pos = function() { + var s; + s = this; + return s.Go; + }; + GoStmt.prototype.Pos = function() { return this.$val.Pos(); }; + DeferStmt.ptr.prototype.Pos = function() { + var s; + s = this; + return s.Defer; + }; + DeferStmt.prototype.Pos = function() { return this.$val.Pos(); }; + ReturnStmt.ptr.prototype.Pos = function() { + var s; + s = this; + return s.Return; + }; + ReturnStmt.prototype.Pos = function() { return this.$val.Pos(); }; + BranchStmt.ptr.prototype.Pos = function() { + var s; + s = this; + return s.TokPos; + }; + BranchStmt.prototype.Pos = function() { return this.$val.Pos(); }; + BlockStmt.ptr.prototype.Pos = function() { + var s; + s = this; + return s.Lbrace; + }; + BlockStmt.prototype.Pos = function() { return this.$val.Pos(); }; + IfStmt.ptr.prototype.Pos = function() { + var s; + s = this; + return s.If; + }; + IfStmt.prototype.Pos = function() { return this.$val.Pos(); }; + CaseClause.ptr.prototype.Pos = function() { + var s; + s = this; + return s.Case; + }; + CaseClause.prototype.Pos = function() { return this.$val.Pos(); }; + SwitchStmt.ptr.prototype.Pos = function() { + var s; + s = this; + return s.Switch; + }; + SwitchStmt.prototype.Pos = function() { return this.$val.Pos(); }; + TypeSwitchStmt.ptr.prototype.Pos = function() { + var s; + s = this; + return s.Switch; + }; + TypeSwitchStmt.prototype.Pos = function() { return this.$val.Pos(); }; + CommClause.ptr.prototype.Pos = function() { + var s; + s = this; + return s.Case; + }; + CommClause.prototype.Pos = function() { return this.$val.Pos(); }; + SelectStmt.ptr.prototype.Pos = function() { + var s; + s = this; + return s.Select; + }; + SelectStmt.prototype.Pos = function() { return this.$val.Pos(); }; + ForStmt.ptr.prototype.Pos = function() { + var s; + s = this; + return s.For; + }; + ForStmt.prototype.Pos = function() { return this.$val.Pos(); }; + RangeStmt.ptr.prototype.Pos = function() { + var s; + s = this; + return s.For; + }; + RangeStmt.prototype.Pos = function() { return this.$val.Pos(); }; + BadStmt.ptr.prototype.End = function() { + var s; + s = this; + return s.To; + }; + BadStmt.prototype.End = function() { return this.$val.End(); }; + DeclStmt.ptr.prototype.End = function() { + var s; + s = this; + return s.Decl.End(); + }; + DeclStmt.prototype.End = function() { return this.$val.End(); }; + EmptyStmt.ptr.prototype.End = function() { + var s; + s = this; + return s.Semicolon + 1 >> 0; + }; + EmptyStmt.prototype.End = function() { return this.$val.End(); }; + LabeledStmt.ptr.prototype.End = function() { + var s; + s = this; + return s.Stmt.End(); + }; + LabeledStmt.prototype.End = function() { return this.$val.End(); }; + ExprStmt.ptr.prototype.End = function() { + var s; + s = this; + return s.X.End(); + }; + ExprStmt.prototype.End = function() { return this.$val.End(); }; + SendStmt.ptr.prototype.End = function() { + var s; + s = this; + return s.Value.End(); + }; + SendStmt.prototype.End = function() { return this.$val.End(); }; + IncDecStmt.ptr.prototype.End = function() { + var s; + s = this; + return s.TokPos + 2 >> 0; + }; + IncDecStmt.prototype.End = function() { return this.$val.End(); }; + AssignStmt.ptr.prototype.End = function() { + var s, x, x$1; + s = this; + return (x = s.Rhs, x$1 = s.Rhs.$length - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])).End(); + }; + AssignStmt.prototype.End = function() { return this.$val.End(); }; + GoStmt.ptr.prototype.End = function() { + var s; + s = this; + return s.Call.End(); + }; + GoStmt.prototype.End = function() { return this.$val.End(); }; + DeferStmt.ptr.prototype.End = function() { + var s; + s = this; + return s.Call.End(); + }; + DeferStmt.prototype.End = function() { return this.$val.End(); }; + ReturnStmt.ptr.prototype.End = function() { + var n, s, x, x$1; + s = this; + n = s.Results.$length; + if (n > 0) { + return (x = s.Results, x$1 = n - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])).End(); + } + return s.Return + 6 >> 0; + }; + ReturnStmt.prototype.End = function() { return this.$val.End(); }; + BranchStmt.ptr.prototype.End = function() { + var s; + s = this; + if (!(s.Label === ptrType$4.nil)) { + return s.Label.End(); + } + return (((s.TokPos >> 0) + new token.Token(s.Tok).String().length >> 0) >> 0); + }; + BranchStmt.prototype.End = function() { return this.$val.End(); }; + BlockStmt.ptr.prototype.End = function() { + var s; + s = this; + return s.Rbrace + 1 >> 0; + }; + BlockStmt.prototype.End = function() { return this.$val.End(); }; + IfStmt.ptr.prototype.End = function() { + var s; + s = this; + if (!($interfaceIsEqual(s.Else, $ifaceNil))) { + return s.Else.End(); + } + return s.Body.End(); + }; + IfStmt.prototype.End = function() { return this.$val.End(); }; + CaseClause.ptr.prototype.End = function() { + var n, s, x, x$1; + s = this; + n = s.Body.$length; + if (n > 0) { + return (x = s.Body, x$1 = n - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])).End(); + } + return s.Colon + 1 >> 0; + }; + CaseClause.prototype.End = function() { return this.$val.End(); }; + SwitchStmt.ptr.prototype.End = function() { + var s; + s = this; + return s.Body.End(); + }; + SwitchStmt.prototype.End = function() { return this.$val.End(); }; + TypeSwitchStmt.ptr.prototype.End = function() { + var s; + s = this; + return s.Body.End(); + }; + TypeSwitchStmt.prototype.End = function() { return this.$val.End(); }; + CommClause.ptr.prototype.End = function() { + var n, s, x, x$1; + s = this; + n = s.Body.$length; + if (n > 0) { + return (x = s.Body, x$1 = n - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])).End(); + } + return s.Colon + 1 >> 0; + }; + CommClause.prototype.End = function() { return this.$val.End(); }; + SelectStmt.ptr.prototype.End = function() { + var s; + s = this; + return s.Body.End(); + }; + SelectStmt.prototype.End = function() { return this.$val.End(); }; + ForStmt.ptr.prototype.End = function() { + var s; + s = this; + return s.Body.End(); + }; + ForStmt.prototype.End = function() { return this.$val.End(); }; + RangeStmt.ptr.prototype.End = function() { + var s; + s = this; + return s.Body.End(); + }; + RangeStmt.prototype.End = function() { return this.$val.End(); }; + ImportSpec.ptr.prototype.Pos = function() { + var s; + s = this; + if (!(s.Name === ptrType$4.nil)) { + return s.Name.Pos(); + } + return s.Path.Pos(); + }; + ImportSpec.prototype.Pos = function() { return this.$val.Pos(); }; + ValueSpec.ptr.prototype.Pos = function() { + var s, x; + s = this; + return (x = s.Names, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])).Pos(); + }; + ValueSpec.prototype.Pos = function() { return this.$val.Pos(); }; + TypeSpec.ptr.prototype.Pos = function() { + var s; + s = this; + return s.Name.Pos(); + }; + TypeSpec.prototype.Pos = function() { return this.$val.Pos(); }; + ImportSpec.ptr.prototype.End = function() { + var s; + s = this; + if (!((s.EndPos === 0))) { + return s.EndPos; + } + return s.Path.End(); + }; + ImportSpec.prototype.End = function() { return this.$val.End(); }; + ValueSpec.ptr.prototype.End = function() { + var n, s, x, x$1, x$2, x$3; + s = this; + n = s.Values.$length; + if (n > 0) { + return (x = s.Values, x$1 = n - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])).End(); + } + if (!($interfaceIsEqual(s.Type, $ifaceNil))) { + return s.Type.End(); + } + return (x$2 = s.Names, x$3 = s.Names.$length - 1 >> 0, ((x$3 < 0 || x$3 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + x$3])).End(); + }; + ValueSpec.prototype.End = function() { return this.$val.End(); }; + TypeSpec.ptr.prototype.End = function() { + var s; + s = this; + return s.Type.End(); + }; + TypeSpec.prototype.End = function() { return this.$val.End(); }; + BadDecl.ptr.prototype.Pos = function() { + var d; + d = this; + return d.From; + }; + BadDecl.prototype.Pos = function() { return this.$val.Pos(); }; + GenDecl.ptr.prototype.Pos = function() { + var d; + d = this; + return d.TokPos; + }; + GenDecl.prototype.Pos = function() { return this.$val.Pos(); }; + FuncDecl.ptr.prototype.Pos = function() { + var d; + d = this; + return d.Type.Pos(); + }; + FuncDecl.prototype.Pos = function() { return this.$val.Pos(); }; + BadDecl.ptr.prototype.End = function() { + var d; + d = this; + return d.To; + }; + BadDecl.prototype.End = function() { return this.$val.End(); }; + GenDecl.ptr.prototype.End = function() { + var d, x; + d = this; + if (new token.Pos(d.Rparen).IsValid()) { + return d.Rparen + 1 >> 0; + } + return (x = d.Specs, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])).End(); + }; + GenDecl.prototype.End = function() { return this.$val.End(); }; + FuncDecl.ptr.prototype.End = function() { + var d; + d = this; + if (!(d.Body === ptrType$5.nil)) { + return d.Body.End(); + } + return d.Type.End(); + }; + FuncDecl.prototype.End = function() { return this.$val.End(); }; + File.ptr.prototype.Pos = function() { + var f; + f = this; + return f.Package; + }; + File.prototype.Pos = function() { return this.$val.Pos(); }; + File.ptr.prototype.End = function() { + var f, n, x, x$1; + f = this; + n = f.Decls.$length; + if (n > 0) { + return (x = f.Decls, x$1 = n - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])).End(); + } + return f.Name.End(); + }; + File.prototype.End = function() { return this.$val.End(); }; + Package.ptr.prototype.Pos = function() { + var p; + p = this; + return 0; + }; + Package.prototype.Pos = function() { return this.$val.Pos(); }; + Package.ptr.prototype.End = function() { + var p; + p = this; + return 0; + }; + Package.prototype.End = function() { return this.$val.End(); }; + SortImports = $pkg.SortImports = function(fset, f) { + var _i, _i$1, _ref, _ref$1, _tuple, d, d$1, f, fset, i, j, lastLine, lastSpec, ok, rParenLine, s, specs, x, x$1, x$2, x$3; + _ref = f.Decls; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + d = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + _tuple = $assertType(d, ptrType$22, true); d$1 = _tuple[0]; ok = _tuple[1]; + if (!ok || !((d$1.Tok === 75))) { + break; + } + if (!new token.Pos(d$1.Lparen).IsValid()) { + _i++; + continue; + } + i = 0; + specs = $subslice(d$1.Specs, 0, 0); + _ref$1 = d$1.Specs; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + j = _i$1; + s = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i$1]); + if (j > i && fset.Position(s.Pos()).Line > (1 + fset.Position((x = d$1.Specs, x$1 = j - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])).End()).Line >> 0)) { + specs = $appendSlice(specs, sortSpecs(fset, f, $subslice(d$1.Specs, i, j))); + i = j; + } + _i$1++; + } + specs = $appendSlice(specs, sortSpecs(fset, f, $subslice(d$1.Specs, i))); + d$1.Specs = specs; + if (d$1.Specs.$length > 0) { + lastSpec = (x$2 = d$1.Specs, x$3 = d$1.Specs.$length - 1 >> 0, ((x$3 < 0 || x$3 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + x$3])); + lastLine = fset.Position(lastSpec.Pos()).Line; + rParenLine = fset.Position(d$1.Rparen).Line; + if (rParenLine > (lastLine + 1 >> 0)) { + fset.File(d$1.Rparen).MergeLine(rParenLine - 1 >> 0); + } + } + _i++; + } + }; + importPath = function(s) { + var _tuple, err, s, t; + _tuple = strconv.Unquote($assertType(s, ptrType$24).Path.Value); t = _tuple[0]; err = _tuple[1]; + if ($interfaceIsEqual(err, $ifaceNil)) { + return t; + } + return ""; + }; + importName = function(s) { + var n, s; + n = $assertType(s, ptrType$24).Name; + if (n === ptrType$4.nil) { + return ""; + } + return n.Name; + }; + importComment = function(s) { + var c, s; + c = $assertType(s, ptrType$24).Comment; + if (c === ptrType.nil) { + return ""; + } + return c.Text(); + }; + collapse = function(prev, next) { + var next, prev; + if (!(importPath(next) === importPath(prev)) || !(importName(next) === importName(prev))) { + return false; + } + return $assertType(prev, ptrType$24).Comment === ptrType.nil; + }; + sortSpecs = function(fset, f, specs) { + var _entry, _entry$1, _i, _i$1, _i$2, _i$3, _i$4, _i$5, _i$6, _key, _key$1, _map, _ref, _ref$1, _ref$2, _ref$3, _ref$4, _ref$5, _ref$6, c, cend, comments, cstart, deduped, f, fset, g, g$1, g$2, i, i$1, i$2, i$3, importComment$1, lastLine, p, pos, s, s$1, s$2, s$3, s$4, specIndex, specs, x, x$1, x$2; + if (specs.$length <= 1) { + return specs; + } + pos = $makeSlice(sliceType$9, specs.$length); + _ref = specs; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + s = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + $copy(((i < 0 || i >= pos.$length) ? $throwRuntimeError("index out of range") : pos.$array[pos.$offset + i]), new posSpan.ptr(s.Pos(), s.End()), posSpan); + _i++; + } + lastLine = fset.Position((x = pos.$length - 1 >> 0, ((x < 0 || x >= pos.$length) ? $throwRuntimeError("index out of range") : pos.$array[pos.$offset + x])).End).Line; + cstart = f.Comments.$length; + cend = f.Comments.$length; + _ref$1 = f.Comments; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i$1 = _i$1; + g = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i$1]); + if (g.Pos() < ((0 < 0 || 0 >= pos.$length) ? $throwRuntimeError("index out of range") : pos.$array[pos.$offset + 0]).Start) { + _i$1++; + continue; + } + if (i$1 < cstart) { + cstart = i$1; + } + if (fset.Position(g.End()).Line > lastLine) { + cend = i$1; + break; + } + _i$1++; + } + comments = $subslice(f.Comments, cstart, cend); + importComment$1 = (_map = new $Map(), _map); + specIndex = 0; + _ref$2 = comments; + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$2.$length)) { break; } + g$1 = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? $throwRuntimeError("index out of range") : _ref$2.$array[_ref$2.$offset + _i$2]); + while (true) { + if (!((specIndex + 1 >> 0) < specs.$length && (x$1 = specIndex + 1 >> 0, ((x$1 < 0 || x$1 >= pos.$length) ? $throwRuntimeError("index out of range") : pos.$array[pos.$offset + x$1])).Start <= g$1.Pos())) { break; } + specIndex = specIndex + (1) >> 0; + } + s$1 = $assertType(((specIndex < 0 || specIndex >= specs.$length) ? $throwRuntimeError("index out of range") : specs.$array[specs.$offset + specIndex]), ptrType$24); + _key$1 = s$1; (importComment$1 || $throwRuntimeError("assignment to entry in nil map"))[_key$1.$key()] = { k: _key$1, v: $append((_entry = importComment$1[s$1.$key()], _entry !== undefined ? _entry.v : sliceType$2.nil), g$1) }; + _i$2++; + } + sort.Sort($subslice(new byImportSpec(specs.$array), specs.$offset, specs.$offset + specs.$length)); + deduped = $subslice(specs, 0, 0); + _ref$3 = specs; + _i$3 = 0; + while (true) { + if (!(_i$3 < _ref$3.$length)) { break; } + i$2 = _i$3; + s$2 = ((_i$3 < 0 || _i$3 >= _ref$3.$length) ? $throwRuntimeError("index out of range") : _ref$3.$array[_ref$3.$offset + _i$3]); + if ((i$2 === (specs.$length - 1 >> 0)) || !collapse(s$2, (x$2 = i$2 + 1 >> 0, ((x$2 < 0 || x$2 >= specs.$length) ? $throwRuntimeError("index out of range") : specs.$array[specs.$offset + x$2])))) { + deduped = $append(deduped, s$2); + } else { + p = s$2.Pos(); + fset.File(p).MergeLine(fset.Position(p).Line); + } + _i$3++; + } + specs = deduped; + _ref$4 = specs; + _i$4 = 0; + while (true) { + if (!(_i$4 < _ref$4.$length)) { break; } + i$3 = _i$4; + s$3 = ((_i$4 < 0 || _i$4 >= _ref$4.$length) ? $throwRuntimeError("index out of range") : _ref$4.$array[_ref$4.$offset + _i$4]); + s$4 = $assertType(s$3, ptrType$24); + if (!(s$4.Name === ptrType$4.nil)) { + s$4.Name.NamePos = ((i$3 < 0 || i$3 >= pos.$length) ? $throwRuntimeError("index out of range") : pos.$array[pos.$offset + i$3]).Start; + } + s$4.Path.ValuePos = ((i$3 < 0 || i$3 >= pos.$length) ? $throwRuntimeError("index out of range") : pos.$array[pos.$offset + i$3]).Start; + s$4.EndPos = ((i$3 < 0 || i$3 >= pos.$length) ? $throwRuntimeError("index out of range") : pos.$array[pos.$offset + i$3]).End; + _ref$5 = (_entry$1 = importComment$1[s$4.$key()], _entry$1 !== undefined ? _entry$1.v : sliceType$2.nil); + _i$5 = 0; + while (true) { + if (!(_i$5 < _ref$5.$length)) { break; } + g$2 = ((_i$5 < 0 || _i$5 >= _ref$5.$length) ? $throwRuntimeError("index out of range") : _ref$5.$array[_ref$5.$offset + _i$5]); + _ref$6 = g$2.List; + _i$6 = 0; + while (true) { + if (!(_i$6 < _ref$6.$length)) { break; } + c = ((_i$6 < 0 || _i$6 >= _ref$6.$length) ? $throwRuntimeError("index out of range") : _ref$6.$array[_ref$6.$offset + _i$6]); + c.Slash = ((i$3 < 0 || i$3 >= pos.$length) ? $throwRuntimeError("index out of range") : pos.$array[pos.$offset + i$3]).End; + _i$6++; + } + _i$5++; + } + _i$4++; + } + sort.Sort($subslice(new byCommentPos(comments.$array), comments.$offset, comments.$offset + comments.$length)); + return specs; + }; + byImportSpec.prototype.Len = function() { + var x; + x = this; + return x.$length; + }; + $ptrType(byImportSpec).prototype.Len = function() { return this.$get().Len(); }; + byImportSpec.prototype.Swap = function(i, j) { + var _tmp, _tmp$1, i, j, x; + x = this; + _tmp = ((j < 0 || j >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + j]); _tmp$1 = ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i]); (i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i] = _tmp; (j < 0 || j >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + j] = _tmp$1; + }; + $ptrType(byImportSpec).prototype.Swap = function(i, j) { return this.$get().Swap(i, j); }; + byImportSpec.prototype.Less = function(i, j) { + var i, iname, ipath, j, jname, jpath, x; + x = this; + ipath = importPath(((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + jpath = importPath(((j < 0 || j >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + j])); + if (!(ipath === jpath)) { + return ipath < jpath; + } + iname = importName(((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + jname = importName(((j < 0 || j >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + j])); + if (!(iname === jname)) { + return iname < jname; + } + return importComment(((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])) < importComment(((j < 0 || j >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + j])); + }; + $ptrType(byImportSpec).prototype.Less = function(i, j) { return this.$get().Less(i, j); }; + byCommentPos.prototype.Len = function() { + var x; + x = this; + return x.$length; + }; + $ptrType(byCommentPos).prototype.Len = function() { return this.$get().Len(); }; + byCommentPos.prototype.Swap = function(i, j) { + var _tmp, _tmp$1, i, j, x; + x = this; + _tmp = ((j < 0 || j >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + j]); _tmp$1 = ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i]); (i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i] = _tmp; (j < 0 || j >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + j] = _tmp$1; + }; + $ptrType(byCommentPos).prototype.Swap = function(i, j) { return this.$get().Swap(i, j); }; + byCommentPos.prototype.Less = function(i, j) { + var i, j, x; + x = this; + return ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i]).Pos() < ((j < 0 || j >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + j]).Pos(); + }; + $ptrType(byCommentPos).prototype.Less = function(i, j) { return this.$get().Less(i, j); }; + NewScope = $pkg.NewScope = function(outer) { + var outer; + return new Scope.ptr(outer, new $Map()); + }; + Scope.ptr.prototype.Lookup = function(name) { + var _entry, name, s; + s = this; + return (_entry = s.Objects[name], _entry !== undefined ? _entry.v : ptrType$3.nil); + }; + Scope.prototype.Lookup = function(name) { return this.$val.Lookup(name); }; + Scope.ptr.prototype.Insert = function(obj) { + var _entry, _key, alt = ptrType$3.nil, obj, s; + s = this; + alt = (_entry = s.Objects[obj.Name], _entry !== undefined ? _entry.v : ptrType$3.nil); + if (alt === ptrType$3.nil) { + _key = obj.Name; (s.Objects || $throwRuntimeError("assignment to entry in nil map"))[_key] = { k: _key, v: obj }; + } + return alt; + }; + Scope.prototype.Insert = function(obj) { return this.$val.Insert(obj); }; + Scope.ptr.prototype.String = function() { + var _entry, _i, _keys, _ref, buf, obj, s; + s = this; + buf = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + fmt.Fprintf(buf, "scope %p {", new sliceType$4([s])); + if (!(s === ptrType$26.nil) && $keys(s.Objects).length > 0) { + fmt.Fprintln(buf, new sliceType$4([])); + _ref = s.Objects; + _i = 0; + _keys = $keys(_ref); + while (true) { + if (!(_i < _keys.length)) { break; } + _entry = _ref[_keys[_i]]; + if (_entry === undefined) { + _i++; + continue; + } + obj = _entry.v; + fmt.Fprintf(buf, "\t%s %s\n", new sliceType$4([new ObjKind(obj.Kind), new $String(obj.Name)])); + _i++; + } + } + fmt.Fprintf(buf, "}\n", new sliceType$4([])); + return buf.String(); + }; + Scope.prototype.String = function() { return this.$val.String(); }; + NewObj = $pkg.NewObj = function(kind, name) { + var kind, name; + return new Object.ptr(kind, name, $ifaceNil, $ifaceNil, $ifaceNil); + }; + Object.ptr.prototype.Pos = function() { + var _i, _i$1, _i$2, _ref, _ref$1, _ref$2, _ref$3, _tuple, d, ident, isIdent, n, n$1, name, obj, x; + obj = this; + name = obj.Name; + _ref = obj.Decl; + if ($assertType(_ref, ptrType$10, true)[1]) { + d = _ref.$val; + _ref$1 = d.Names; + _i = 0; + while (true) { + if (!(_i < _ref$1.$length)) { break; } + n = ((_i < 0 || _i >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i]); + if (n.Name === name) { + return n.Pos(); + } + _i++; + } + } else if ($assertType(_ref, ptrType$24, true)[1]) { + d = _ref.$val; + if (!(d.Name === ptrType$4.nil) && d.Name.Name === name) { + return d.Name.Pos(); + } + return d.Path.Pos(); + } else if ($assertType(_ref, ptrType$20, true)[1]) { + d = _ref.$val; + _ref$2 = d.Names; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$2.$length)) { break; } + n$1 = ((_i$1 < 0 || _i$1 >= _ref$2.$length) ? $throwRuntimeError("index out of range") : _ref$2.$array[_ref$2.$offset + _i$1]); + if (n$1.Name === name) { + return n$1.Pos(); + } + _i$1++; + } + } else if ($assertType(_ref, ptrType$21, true)[1]) { + d = _ref.$val; + if (d.Name.Name === name) { + return d.Name.Pos(); + } + } else if ($assertType(_ref, ptrType$23, true)[1]) { + d = _ref.$val; + if (d.Name.Name === name) { + return d.Name.Pos(); + } + } else if ($assertType(_ref, ptrType$27, true)[1]) { + d = _ref.$val; + if (d.Label.Name === name) { + return d.Label.Pos(); + } + } else if ($assertType(_ref, ptrType$28, true)[1]) { + d = _ref.$val; + _ref$3 = d.Lhs; + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$3.$length)) { break; } + x = ((_i$2 < 0 || _i$2 >= _ref$3.$length) ? $throwRuntimeError("index out of range") : _ref$3.$array[_ref$3.$offset + _i$2]); + _tuple = $assertType(x, ptrType$4, true); ident = _tuple[0]; isIdent = _tuple[1]; + if (isIdent && ident.Name === name) { + return ident.Pos(); + } + _i$2++; + } + } + return 0; + }; + Object.prototype.Pos = function() { return this.$val.Pos(); }; + ObjKind.prototype.String = function() { + var kind; + kind = this.$val; + return ((kind < 0 || kind >= objKindStrings.length) ? $throwRuntimeError("index out of range") : objKindStrings[kind]); + }; + $ptrType(ObjKind).prototype.String = function() { return new ObjKind(this.$get()).String(); }; + walkIdentList = function(v, list) { + var _i, _ref, list, v, x; + _ref = list; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + x = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + Walk(v, x); + _i++; + } + }; + walkExprList = function(v, list) { + var _i, _ref, list, v, x; + _ref = list; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + x = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + Walk(v, x); + _i++; + } + }; + walkStmtList = function(v, list) { + var _i, _ref, list, v, x; + _ref = list; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + x = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + Walk(v, x); + _i++; + } + }; + walkDeclList = function(v, list) { + var _i, _ref, list, v, x; + _ref = list; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + x = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + Walk(v, x); + _i++; + } + }; + Walk = $pkg.Walk = function(v, node) { + var _entry, _i, _i$1, _i$2, _i$3, _keys, _ref, _ref$1, _ref$2, _ref$3, _ref$4, c, f, f$1, n, node, s, v; + v = v.Visit(node); + if ($interfaceIsEqual(v, $ifaceNil)) { + return; + } + _ref = node; + if ($assertType(_ref, ptrType$6, true)[1]) { + n = _ref.$val; + } else if ($assertType(_ref, ptrType, true)[1]) { + n = _ref.$val; + _ref$1 = n.List; + _i = 0; + while (true) { + if (!(_i < _ref$1.$length)) { break; } + c = ((_i < 0 || _i >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i]); + Walk(v, c); + _i++; + } + } else if ($assertType(_ref, ptrType$10, true)[1]) { + n = _ref.$val; + if (!(n.Doc === ptrType.nil)) { + Walk(v, n.Doc); + } + walkIdentList(v, n.Names); + Walk(v, n.Type); + if (!(n.Tag === ptrType$1.nil)) { + Walk(v, n.Tag); + } + if (!(n.Comment === ptrType.nil)) { + Walk(v, n.Comment); + } + } else if ($assertType(_ref, ptrType$2, true)[1]) { + n = _ref.$val; + _ref$2 = n.List; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$2.$length)) { break; } + f = ((_i$1 < 0 || _i$1 >= _ref$2.$length) ? $throwRuntimeError("index out of range") : _ref$2.$array[_ref$2.$offset + _i$1]); + Walk(v, f); + _i$1++; + } + } else if ($assertType(_ref, ptrType$29, true)[1] || $assertType(_ref, ptrType$4, true)[1] || $assertType(_ref, ptrType$1, true)[1]) { + n = _ref; + } else if ($assertType(_ref, ptrType$30, true)[1]) { + n = _ref.$val; + if (!($interfaceIsEqual(n.Elt, $ifaceNil))) { + Walk(v, n.Elt); + } + } else if ($assertType(_ref, ptrType$31, true)[1]) { + n = _ref.$val; + Walk(v, n.Type); + Walk(v, n.Body); + } else if ($assertType(_ref, ptrType$32, true)[1]) { + n = _ref.$val; + if (!($interfaceIsEqual(n.Type, $ifaceNil))) { + Walk(v, n.Type); + } + walkExprList(v, n.Elts); + } else if ($assertType(_ref, ptrType$13, true)[1]) { + n = _ref.$val; + Walk(v, n.X); + } else if ($assertType(_ref, ptrType$11, true)[1]) { + n = _ref.$val; + Walk(v, n.X); + Walk(v, n.Sel); + } else if ($assertType(_ref, ptrType$33, true)[1]) { + n = _ref.$val; + Walk(v, n.X); + Walk(v, n.Index); + } else if ($assertType(_ref, ptrType$34, true)[1]) { + n = _ref.$val; + Walk(v, n.X); + if (!($interfaceIsEqual(n.Low, $ifaceNil))) { + Walk(v, n.Low); + } + if (!($interfaceIsEqual(n.High, $ifaceNil))) { + Walk(v, n.High); + } + if (!($interfaceIsEqual(n.Max, $ifaceNil))) { + Walk(v, n.Max); + } + } else if ($assertType(_ref, ptrType$35, true)[1]) { + n = _ref.$val; + Walk(v, n.X); + if (!($interfaceIsEqual(n.Type, $ifaceNil))) { + Walk(v, n.Type); + } + } else if ($assertType(_ref, ptrType$36, true)[1]) { + n = _ref.$val; + Walk(v, n.Fun); + walkExprList(v, n.Args); + } else if ($assertType(_ref, ptrType$12, true)[1]) { + n = _ref.$val; + Walk(v, n.X); + } else if ($assertType(_ref, ptrType$37, true)[1]) { + n = _ref.$val; + Walk(v, n.X); + } else if ($assertType(_ref, ptrType$38, true)[1]) { + n = _ref.$val; + Walk(v, n.X); + Walk(v, n.Y); + } else if ($assertType(_ref, ptrType$39, true)[1]) { + n = _ref.$val; + Walk(v, n.Key); + Walk(v, n.Value); + } else if ($assertType(_ref, ptrType$14, true)[1]) { + n = _ref.$val; + if (!($interfaceIsEqual(n.Len, $ifaceNil))) { + Walk(v, n.Len); + } + Walk(v, n.Elt); + } else if ($assertType(_ref, ptrType$15, true)[1]) { + n = _ref.$val; + Walk(v, n.Fields); + } else if ($assertType(_ref, ptrType$16, true)[1]) { + n = _ref.$val; + if (!(n.Params === ptrType$2.nil)) { + Walk(v, n.Params); + } + if (!(n.Results === ptrType$2.nil)) { + Walk(v, n.Results); + } + } else if ($assertType(_ref, ptrType$17, true)[1]) { + n = _ref.$val; + Walk(v, n.Methods); + } else if ($assertType(_ref, ptrType$18, true)[1]) { + n = _ref.$val; + Walk(v, n.Key); + Walk(v, n.Value); + } else if ($assertType(_ref, ptrType$19, true)[1]) { + n = _ref.$val; + Walk(v, n.Value); + } else if ($assertType(_ref, ptrType$40, true)[1]) { + n = _ref.$val; + } else if ($assertType(_ref, ptrType$41, true)[1]) { + n = _ref.$val; + Walk(v, n.Decl); + } else if ($assertType(_ref, ptrType$42, true)[1]) { + n = _ref.$val; + } else if ($assertType(_ref, ptrType$27, true)[1]) { + n = _ref.$val; + Walk(v, n.Label); + Walk(v, n.Stmt); + } else if ($assertType(_ref, ptrType$43, true)[1]) { + n = _ref.$val; + Walk(v, n.X); + } else if ($assertType(_ref, ptrType$44, true)[1]) { + n = _ref.$val; + Walk(v, n.Chan); + Walk(v, n.Value); + } else if ($assertType(_ref, ptrType$45, true)[1]) { + n = _ref.$val; + Walk(v, n.X); + } else if ($assertType(_ref, ptrType$28, true)[1]) { + n = _ref.$val; + walkExprList(v, n.Lhs); + walkExprList(v, n.Rhs); + } else if ($assertType(_ref, ptrType$46, true)[1]) { + n = _ref.$val; + Walk(v, n.Call); + } else if ($assertType(_ref, ptrType$47, true)[1]) { + n = _ref.$val; + Walk(v, n.Call); + } else if ($assertType(_ref, ptrType$48, true)[1]) { + n = _ref.$val; + walkExprList(v, n.Results); + } else if ($assertType(_ref, ptrType$49, true)[1]) { + n = _ref.$val; + if (!(n.Label === ptrType$4.nil)) { + Walk(v, n.Label); + } + } else if ($assertType(_ref, ptrType$5, true)[1]) { + n = _ref.$val; + walkStmtList(v, n.List); + } else if ($assertType(_ref, ptrType$50, true)[1]) { + n = _ref.$val; + if (!($interfaceIsEqual(n.Init, $ifaceNil))) { + Walk(v, n.Init); + } + Walk(v, n.Cond); + Walk(v, n.Body); + if (!($interfaceIsEqual(n.Else, $ifaceNil))) { + Walk(v, n.Else); + } + } else if ($assertType(_ref, ptrType$51, true)[1]) { + n = _ref.$val; + walkExprList(v, n.List); + walkStmtList(v, n.Body); + } else if ($assertType(_ref, ptrType$52, true)[1]) { + n = _ref.$val; + if (!($interfaceIsEqual(n.Init, $ifaceNil))) { + Walk(v, n.Init); + } + if (!($interfaceIsEqual(n.Tag, $ifaceNil))) { + Walk(v, n.Tag); + } + Walk(v, n.Body); + } else if ($assertType(_ref, ptrType$53, true)[1]) { + n = _ref.$val; + if (!($interfaceIsEqual(n.Init, $ifaceNil))) { + Walk(v, n.Init); + } + Walk(v, n.Assign); + Walk(v, n.Body); + } else if ($assertType(_ref, ptrType$54, true)[1]) { + n = _ref.$val; + if (!($interfaceIsEqual(n.Comm, $ifaceNil))) { + Walk(v, n.Comm); + } + walkStmtList(v, n.Body); + } else if ($assertType(_ref, ptrType$55, true)[1]) { + n = _ref.$val; + Walk(v, n.Body); + } else if ($assertType(_ref, ptrType$56, true)[1]) { + n = _ref.$val; + if (!($interfaceIsEqual(n.Init, $ifaceNil))) { + Walk(v, n.Init); + } + if (!($interfaceIsEqual(n.Cond, $ifaceNil))) { + Walk(v, n.Cond); + } + if (!($interfaceIsEqual(n.Post, $ifaceNil))) { + Walk(v, n.Post); + } + Walk(v, n.Body); + } else if ($assertType(_ref, ptrType$57, true)[1]) { + n = _ref.$val; + if (!($interfaceIsEqual(n.Key, $ifaceNil))) { + Walk(v, n.Key); + } + if (!($interfaceIsEqual(n.Value, $ifaceNil))) { + Walk(v, n.Value); + } + Walk(v, n.X); + Walk(v, n.Body); + } else if ($assertType(_ref, ptrType$24, true)[1]) { + n = _ref.$val; + if (!(n.Doc === ptrType.nil)) { + Walk(v, n.Doc); + } + if (!(n.Name === ptrType$4.nil)) { + Walk(v, n.Name); + } + Walk(v, n.Path); + if (!(n.Comment === ptrType.nil)) { + Walk(v, n.Comment); + } + } else if ($assertType(_ref, ptrType$20, true)[1]) { + n = _ref.$val; + if (!(n.Doc === ptrType.nil)) { + Walk(v, n.Doc); + } + walkIdentList(v, n.Names); + if (!($interfaceIsEqual(n.Type, $ifaceNil))) { + Walk(v, n.Type); + } + walkExprList(v, n.Values); + if (!(n.Comment === ptrType.nil)) { + Walk(v, n.Comment); + } + } else if ($assertType(_ref, ptrType$21, true)[1]) { + n = _ref.$val; + if (!(n.Doc === ptrType.nil)) { + Walk(v, n.Doc); + } + Walk(v, n.Name); + Walk(v, n.Type); + if (!(n.Comment === ptrType.nil)) { + Walk(v, n.Comment); + } + } else if ($assertType(_ref, ptrType$58, true)[1]) { + n = _ref.$val; + } else if ($assertType(_ref, ptrType$22, true)[1]) { + n = _ref.$val; + if (!(n.Doc === ptrType.nil)) { + Walk(v, n.Doc); + } + _ref$3 = n.Specs; + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$3.$length)) { break; } + s = ((_i$2 < 0 || _i$2 >= _ref$3.$length) ? $throwRuntimeError("index out of range") : _ref$3.$array[_ref$3.$offset + _i$2]); + Walk(v, s); + _i$2++; + } + } else if ($assertType(_ref, ptrType$23, true)[1]) { + n = _ref.$val; + if (!(n.Doc === ptrType.nil)) { + Walk(v, n.Doc); + } + if (!(n.Recv === ptrType$2.nil)) { + Walk(v, n.Recv); + } + Walk(v, n.Name); + Walk(v, n.Type); + if (!(n.Body === ptrType$5.nil)) { + Walk(v, n.Body); + } + } else if ($assertType(_ref, ptrType$9, true)[1]) { + n = _ref.$val; + if (!(n.Doc === ptrType.nil)) { + Walk(v, n.Doc); + } + Walk(v, n.Name); + walkDeclList(v, n.Decls); + } else if ($assertType(_ref, ptrType$59, true)[1]) { + n = _ref.$val; + _ref$4 = n.Files; + _i$3 = 0; + _keys = $keys(_ref$4); + while (true) { + if (!(_i$3 < _keys.length)) { break; } + _entry = _ref$4[_keys[_i$3]]; + if (_entry === undefined) { + _i$3++; + continue; + } + f$1 = _entry.v; + Walk(v, f$1); + _i$3++; + } + } else { + n = _ref; + fmt.Printf("ast.Walk: unexpected node type %T", new sliceType$4([n])); + $panic(new $String("ast.Walk")); + } + v.Visit($ifaceNil); + }; + inspector.prototype.Visit = function(node) { + var f, node; + f = this.$val; + if (f(node)) { + return new inspector(f); + } + return $ifaceNil; + }; + $ptrType(inspector).prototype.Visit = function(node) { return new inspector(this.$get()).Visit(node); }; + Inspect = $pkg.Inspect = function(node, f) { + var f, node; + Walk(new inspector(f), node); + }; + ptrType$6.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}]; + ptrType.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "Text", name: "Text", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$10.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}]; + ptrType$2.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "NumFields", name: "NumFields", pkg: "", typ: $funcType([], [$Int], false)}]; + ptrType$29.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "exprNode", name: "exprNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$4.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "exprNode", name: "exprNode", pkg: "go/ast", typ: $funcType([], [], false)}, {prop: "IsExported", name: "IsExported", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$30.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "exprNode", name: "exprNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$1.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "exprNode", name: "exprNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$31.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "exprNode", name: "exprNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$32.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "exprNode", name: "exprNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$13.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "exprNode", name: "exprNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$11.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "exprNode", name: "exprNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$33.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "exprNode", name: "exprNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$34.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "exprNode", name: "exprNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$35.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "exprNode", name: "exprNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$36.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "exprNode", name: "exprNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$12.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "exprNode", name: "exprNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$37.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "exprNode", name: "exprNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$38.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "exprNode", name: "exprNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$39.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "exprNode", name: "exprNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$14.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "exprNode", name: "exprNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$15.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "exprNode", name: "exprNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$16.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "exprNode", name: "exprNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$17.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "exprNode", name: "exprNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$18.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "exprNode", name: "exprNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$19.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "exprNode", name: "exprNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$40.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "stmtNode", name: "stmtNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$41.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "stmtNode", name: "stmtNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$42.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "stmtNode", name: "stmtNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$27.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "stmtNode", name: "stmtNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$43.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "stmtNode", name: "stmtNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$44.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "stmtNode", name: "stmtNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$45.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "stmtNode", name: "stmtNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$28.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "stmtNode", name: "stmtNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$46.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "stmtNode", name: "stmtNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$47.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "stmtNode", name: "stmtNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$48.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "stmtNode", name: "stmtNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$49.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "stmtNode", name: "stmtNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$5.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "stmtNode", name: "stmtNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$50.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "stmtNode", name: "stmtNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$51.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "stmtNode", name: "stmtNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$52.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "stmtNode", name: "stmtNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$53.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "stmtNode", name: "stmtNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$54.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "stmtNode", name: "stmtNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$55.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "stmtNode", name: "stmtNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$56.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "stmtNode", name: "stmtNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$57.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "stmtNode", name: "stmtNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$24.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "specNode", name: "specNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$20.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "specNode", name: "specNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$21.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "specNode", name: "specNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$58.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "declNode", name: "declNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$22.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "declNode", name: "declNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$23.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "declNode", name: "declNode", pkg: "go/ast", typ: $funcType([], [], false)}]; + ptrType$9.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}]; + ptrType$59.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}]; + byImportSpec.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}]; + byCommentPos.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}]; + ptrType$26.methods = [{prop: "Lookup", name: "Lookup", pkg: "", typ: $funcType([$String], [ptrType$3], false)}, {prop: "Insert", name: "Insert", pkg: "", typ: $funcType([ptrType$3], [ptrType$3], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$3.methods = [{prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}]; + ObjKind.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + inspector.methods = [{prop: "Visit", name: "Visit", pkg: "", typ: $funcType([Node], [Visitor], false)}]; + Node.init([{prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}]); + Expr.init([{prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "exprNode", name: "exprNode", pkg: "go/ast", typ: $funcType([], [], false)}]); + Stmt.init([{prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "stmtNode", name: "stmtNode", pkg: "go/ast", typ: $funcType([], [], false)}]); + Decl.init([{prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "declNode", name: "declNode", pkg: "go/ast", typ: $funcType([], [], false)}]); + Comment.init([{prop: "Slash", name: "Slash", pkg: "", typ: token.Pos, tag: ""}, {prop: "Text", name: "Text", pkg: "", typ: $String, tag: ""}]); + CommentGroup.init([{prop: "List", name: "List", pkg: "", typ: sliceType$5, tag: ""}]); + Field.init([{prop: "Doc", name: "Doc", pkg: "", typ: ptrType, tag: ""}, {prop: "Names", name: "Names", pkg: "", typ: sliceType$8, tag: ""}, {prop: "Type", name: "Type", pkg: "", typ: Expr, tag: ""}, {prop: "Tag", name: "Tag", pkg: "", typ: ptrType$1, tag: ""}, {prop: "Comment", name: "Comment", pkg: "", typ: ptrType, tag: ""}]); + FieldList.init([{prop: "Opening", name: "Opening", pkg: "", typ: token.Pos, tag: ""}, {prop: "List", name: "List", pkg: "", typ: sliceType$10, tag: ""}, {prop: "Closing", name: "Closing", pkg: "", typ: token.Pos, tag: ""}]); + BadExpr.init([{prop: "From", name: "From", pkg: "", typ: token.Pos, tag: ""}, {prop: "To", name: "To", pkg: "", typ: token.Pos, tag: ""}]); + Ident.init([{prop: "NamePos", name: "NamePos", pkg: "", typ: token.Pos, tag: ""}, {prop: "Name", name: "Name", pkg: "", typ: $String, tag: ""}, {prop: "Obj", name: "Obj", pkg: "", typ: ptrType$3, tag: ""}]); + Ellipsis.init([{prop: "Ellipsis", name: "Ellipsis", pkg: "", typ: token.Pos, tag: ""}, {prop: "Elt", name: "Elt", pkg: "", typ: Expr, tag: ""}]); + BasicLit.init([{prop: "ValuePos", name: "ValuePos", pkg: "", typ: token.Pos, tag: ""}, {prop: "Kind", name: "Kind", pkg: "", typ: token.Token, tag: ""}, {prop: "Value", name: "Value", pkg: "", typ: $String, tag: ""}]); + FuncLit.init([{prop: "Type", name: "Type", pkg: "", typ: ptrType$16, tag: ""}, {prop: "Body", name: "Body", pkg: "", typ: ptrType$5, tag: ""}]); + CompositeLit.init([{prop: "Type", name: "Type", pkg: "", typ: Expr, tag: ""}, {prop: "Lbrace", name: "Lbrace", pkg: "", typ: token.Pos, tag: ""}, {prop: "Elts", name: "Elts", pkg: "", typ: sliceType$11, tag: ""}, {prop: "Rbrace", name: "Rbrace", pkg: "", typ: token.Pos, tag: ""}]); + ParenExpr.init([{prop: "Lparen", name: "Lparen", pkg: "", typ: token.Pos, tag: ""}, {prop: "X", name: "X", pkg: "", typ: Expr, tag: ""}, {prop: "Rparen", name: "Rparen", pkg: "", typ: token.Pos, tag: ""}]); + SelectorExpr.init([{prop: "X", name: "X", pkg: "", typ: Expr, tag: ""}, {prop: "Sel", name: "Sel", pkg: "", typ: ptrType$4, tag: ""}]); + IndexExpr.init([{prop: "X", name: "X", pkg: "", typ: Expr, tag: ""}, {prop: "Lbrack", name: "Lbrack", pkg: "", typ: token.Pos, tag: ""}, {prop: "Index", name: "Index", pkg: "", typ: Expr, tag: ""}, {prop: "Rbrack", name: "Rbrack", pkg: "", typ: token.Pos, tag: ""}]); + SliceExpr.init([{prop: "X", name: "X", pkg: "", typ: Expr, tag: ""}, {prop: "Lbrack", name: "Lbrack", pkg: "", typ: token.Pos, tag: ""}, {prop: "Low", name: "Low", pkg: "", typ: Expr, tag: ""}, {prop: "High", name: "High", pkg: "", typ: Expr, tag: ""}, {prop: "Max", name: "Max", pkg: "", typ: Expr, tag: ""}, {prop: "Slice3", name: "Slice3", pkg: "", typ: $Bool, tag: ""}, {prop: "Rbrack", name: "Rbrack", pkg: "", typ: token.Pos, tag: ""}]); + TypeAssertExpr.init([{prop: "X", name: "X", pkg: "", typ: Expr, tag: ""}, {prop: "Lparen", name: "Lparen", pkg: "", typ: token.Pos, tag: ""}, {prop: "Type", name: "Type", pkg: "", typ: Expr, tag: ""}, {prop: "Rparen", name: "Rparen", pkg: "", typ: token.Pos, tag: ""}]); + CallExpr.init([{prop: "Fun", name: "Fun", pkg: "", typ: Expr, tag: ""}, {prop: "Lparen", name: "Lparen", pkg: "", typ: token.Pos, tag: ""}, {prop: "Args", name: "Args", pkg: "", typ: sliceType$11, tag: ""}, {prop: "Ellipsis", name: "Ellipsis", pkg: "", typ: token.Pos, tag: ""}, {prop: "Rparen", name: "Rparen", pkg: "", typ: token.Pos, tag: ""}]); + StarExpr.init([{prop: "Star", name: "Star", pkg: "", typ: token.Pos, tag: ""}, {prop: "X", name: "X", pkg: "", typ: Expr, tag: ""}]); + UnaryExpr.init([{prop: "OpPos", name: "OpPos", pkg: "", typ: token.Pos, tag: ""}, {prop: "Op", name: "Op", pkg: "", typ: token.Token, tag: ""}, {prop: "X", name: "X", pkg: "", typ: Expr, tag: ""}]); + BinaryExpr.init([{prop: "X", name: "X", pkg: "", typ: Expr, tag: ""}, {prop: "OpPos", name: "OpPos", pkg: "", typ: token.Pos, tag: ""}, {prop: "Op", name: "Op", pkg: "", typ: token.Token, tag: ""}, {prop: "Y", name: "Y", pkg: "", typ: Expr, tag: ""}]); + KeyValueExpr.init([{prop: "Key", name: "Key", pkg: "", typ: Expr, tag: ""}, {prop: "Colon", name: "Colon", pkg: "", typ: token.Pos, tag: ""}, {prop: "Value", name: "Value", pkg: "", typ: Expr, tag: ""}]); + ArrayType.init([{prop: "Lbrack", name: "Lbrack", pkg: "", typ: token.Pos, tag: ""}, {prop: "Len", name: "Len", pkg: "", typ: Expr, tag: ""}, {prop: "Elt", name: "Elt", pkg: "", typ: Expr, tag: ""}]); + StructType.init([{prop: "Struct", name: "Struct", pkg: "", typ: token.Pos, tag: ""}, {prop: "Fields", name: "Fields", pkg: "", typ: ptrType$2, tag: ""}, {prop: "Incomplete", name: "Incomplete", pkg: "", typ: $Bool, tag: ""}]); + FuncType.init([{prop: "Func", name: "Func", pkg: "", typ: token.Pos, tag: ""}, {prop: "Params", name: "Params", pkg: "", typ: ptrType$2, tag: ""}, {prop: "Results", name: "Results", pkg: "", typ: ptrType$2, tag: ""}]); + InterfaceType.init([{prop: "Interface", name: "Interface", pkg: "", typ: token.Pos, tag: ""}, {prop: "Methods", name: "Methods", pkg: "", typ: ptrType$2, tag: ""}, {prop: "Incomplete", name: "Incomplete", pkg: "", typ: $Bool, tag: ""}]); + MapType.init([{prop: "Map", name: "Map", pkg: "", typ: token.Pos, tag: ""}, {prop: "Key", name: "Key", pkg: "", typ: Expr, tag: ""}, {prop: "Value", name: "Value", pkg: "", typ: Expr, tag: ""}]); + ChanType.init([{prop: "Begin", name: "Begin", pkg: "", typ: token.Pos, tag: ""}, {prop: "Arrow", name: "Arrow", pkg: "", typ: token.Pos, tag: ""}, {prop: "Dir", name: "Dir", pkg: "", typ: ChanDir, tag: ""}, {prop: "Value", name: "Value", pkg: "", typ: Expr, tag: ""}]); + BadStmt.init([{prop: "From", name: "From", pkg: "", typ: token.Pos, tag: ""}, {prop: "To", name: "To", pkg: "", typ: token.Pos, tag: ""}]); + DeclStmt.init([{prop: "Decl", name: "Decl", pkg: "", typ: Decl, tag: ""}]); + EmptyStmt.init([{prop: "Semicolon", name: "Semicolon", pkg: "", typ: token.Pos, tag: ""}]); + LabeledStmt.init([{prop: "Label", name: "Label", pkg: "", typ: ptrType$4, tag: ""}, {prop: "Colon", name: "Colon", pkg: "", typ: token.Pos, tag: ""}, {prop: "Stmt", name: "Stmt", pkg: "", typ: Stmt, tag: ""}]); + ExprStmt.init([{prop: "X", name: "X", pkg: "", typ: Expr, tag: ""}]); + SendStmt.init([{prop: "Chan", name: "Chan", pkg: "", typ: Expr, tag: ""}, {prop: "Arrow", name: "Arrow", pkg: "", typ: token.Pos, tag: ""}, {prop: "Value", name: "Value", pkg: "", typ: Expr, tag: ""}]); + IncDecStmt.init([{prop: "X", name: "X", pkg: "", typ: Expr, tag: ""}, {prop: "TokPos", name: "TokPos", pkg: "", typ: token.Pos, tag: ""}, {prop: "Tok", name: "Tok", pkg: "", typ: token.Token, tag: ""}]); + AssignStmt.init([{prop: "Lhs", name: "Lhs", pkg: "", typ: sliceType$11, tag: ""}, {prop: "TokPos", name: "TokPos", pkg: "", typ: token.Pos, tag: ""}, {prop: "Tok", name: "Tok", pkg: "", typ: token.Token, tag: ""}, {prop: "Rhs", name: "Rhs", pkg: "", typ: sliceType$11, tag: ""}]); + GoStmt.init([{prop: "Go", name: "Go", pkg: "", typ: token.Pos, tag: ""}, {prop: "Call", name: "Call", pkg: "", typ: ptrType$36, tag: ""}]); + DeferStmt.init([{prop: "Defer", name: "Defer", pkg: "", typ: token.Pos, tag: ""}, {prop: "Call", name: "Call", pkg: "", typ: ptrType$36, tag: ""}]); + ReturnStmt.init([{prop: "Return", name: "Return", pkg: "", typ: token.Pos, tag: ""}, {prop: "Results", name: "Results", pkg: "", typ: sliceType$11, tag: ""}]); + BranchStmt.init([{prop: "TokPos", name: "TokPos", pkg: "", typ: token.Pos, tag: ""}, {prop: "Tok", name: "Tok", pkg: "", typ: token.Token, tag: ""}, {prop: "Label", name: "Label", pkg: "", typ: ptrType$4, tag: ""}]); + BlockStmt.init([{prop: "Lbrace", name: "Lbrace", pkg: "", typ: token.Pos, tag: ""}, {prop: "List", name: "List", pkg: "", typ: sliceType$12, tag: ""}, {prop: "Rbrace", name: "Rbrace", pkg: "", typ: token.Pos, tag: ""}]); + IfStmt.init([{prop: "If", name: "If", pkg: "", typ: token.Pos, tag: ""}, {prop: "Init", name: "Init", pkg: "", typ: Stmt, tag: ""}, {prop: "Cond", name: "Cond", pkg: "", typ: Expr, tag: ""}, {prop: "Body", name: "Body", pkg: "", typ: ptrType$5, tag: ""}, {prop: "Else", name: "Else", pkg: "", typ: Stmt, tag: ""}]); + CaseClause.init([{prop: "Case", name: "Case", pkg: "", typ: token.Pos, tag: ""}, {prop: "List", name: "List", pkg: "", typ: sliceType$11, tag: ""}, {prop: "Colon", name: "Colon", pkg: "", typ: token.Pos, tag: ""}, {prop: "Body", name: "Body", pkg: "", typ: sliceType$12, tag: ""}]); + SwitchStmt.init([{prop: "Switch", name: "Switch", pkg: "", typ: token.Pos, tag: ""}, {prop: "Init", name: "Init", pkg: "", typ: Stmt, tag: ""}, {prop: "Tag", name: "Tag", pkg: "", typ: Expr, tag: ""}, {prop: "Body", name: "Body", pkg: "", typ: ptrType$5, tag: ""}]); + TypeSwitchStmt.init([{prop: "Switch", name: "Switch", pkg: "", typ: token.Pos, tag: ""}, {prop: "Init", name: "Init", pkg: "", typ: Stmt, tag: ""}, {prop: "Assign", name: "Assign", pkg: "", typ: Stmt, tag: ""}, {prop: "Body", name: "Body", pkg: "", typ: ptrType$5, tag: ""}]); + CommClause.init([{prop: "Case", name: "Case", pkg: "", typ: token.Pos, tag: ""}, {prop: "Comm", name: "Comm", pkg: "", typ: Stmt, tag: ""}, {prop: "Colon", name: "Colon", pkg: "", typ: token.Pos, tag: ""}, {prop: "Body", name: "Body", pkg: "", typ: sliceType$12, tag: ""}]); + SelectStmt.init([{prop: "Select", name: "Select", pkg: "", typ: token.Pos, tag: ""}, {prop: "Body", name: "Body", pkg: "", typ: ptrType$5, tag: ""}]); + ForStmt.init([{prop: "For", name: "For", pkg: "", typ: token.Pos, tag: ""}, {prop: "Init", name: "Init", pkg: "", typ: Stmt, tag: ""}, {prop: "Cond", name: "Cond", pkg: "", typ: Expr, tag: ""}, {prop: "Post", name: "Post", pkg: "", typ: Stmt, tag: ""}, {prop: "Body", name: "Body", pkg: "", typ: ptrType$5, tag: ""}]); + RangeStmt.init([{prop: "For", name: "For", pkg: "", typ: token.Pos, tag: ""}, {prop: "Key", name: "Key", pkg: "", typ: Expr, tag: ""}, {prop: "Value", name: "Value", pkg: "", typ: Expr, tag: ""}, {prop: "TokPos", name: "TokPos", pkg: "", typ: token.Pos, tag: ""}, {prop: "Tok", name: "Tok", pkg: "", typ: token.Token, tag: ""}, {prop: "X", name: "X", pkg: "", typ: Expr, tag: ""}, {prop: "Body", name: "Body", pkg: "", typ: ptrType$5, tag: ""}]); + Spec.init([{prop: "End", name: "End", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [token.Pos], false)}, {prop: "specNode", name: "specNode", pkg: "go/ast", typ: $funcType([], [], false)}]); + ImportSpec.init([{prop: "Doc", name: "Doc", pkg: "", typ: ptrType, tag: ""}, {prop: "Name", name: "Name", pkg: "", typ: ptrType$4, tag: ""}, {prop: "Path", name: "Path", pkg: "", typ: ptrType$1, tag: ""}, {prop: "Comment", name: "Comment", pkg: "", typ: ptrType, tag: ""}, {prop: "EndPos", name: "EndPos", pkg: "", typ: token.Pos, tag: ""}]); + ValueSpec.init([{prop: "Doc", name: "Doc", pkg: "", typ: ptrType, tag: ""}, {prop: "Names", name: "Names", pkg: "", typ: sliceType$8, tag: ""}, {prop: "Type", name: "Type", pkg: "", typ: Expr, tag: ""}, {prop: "Values", name: "Values", pkg: "", typ: sliceType$11, tag: ""}, {prop: "Comment", name: "Comment", pkg: "", typ: ptrType, tag: ""}]); + TypeSpec.init([{prop: "Doc", name: "Doc", pkg: "", typ: ptrType, tag: ""}, {prop: "Name", name: "Name", pkg: "", typ: ptrType$4, tag: ""}, {prop: "Type", name: "Type", pkg: "", typ: Expr, tag: ""}, {prop: "Comment", name: "Comment", pkg: "", typ: ptrType, tag: ""}]); + BadDecl.init([{prop: "From", name: "From", pkg: "", typ: token.Pos, tag: ""}, {prop: "To", name: "To", pkg: "", typ: token.Pos, tag: ""}]); + GenDecl.init([{prop: "Doc", name: "Doc", pkg: "", typ: ptrType, tag: ""}, {prop: "TokPos", name: "TokPos", pkg: "", typ: token.Pos, tag: ""}, {prop: "Tok", name: "Tok", pkg: "", typ: token.Token, tag: ""}, {prop: "Lparen", name: "Lparen", pkg: "", typ: token.Pos, tag: ""}, {prop: "Specs", name: "Specs", pkg: "", typ: sliceType$13, tag: ""}, {prop: "Rparen", name: "Rparen", pkg: "", typ: token.Pos, tag: ""}]); + FuncDecl.init([{prop: "Doc", name: "Doc", pkg: "", typ: ptrType, tag: ""}, {prop: "Recv", name: "Recv", pkg: "", typ: ptrType$2, tag: ""}, {prop: "Name", name: "Name", pkg: "", typ: ptrType$4, tag: ""}, {prop: "Type", name: "Type", pkg: "", typ: ptrType$16, tag: ""}, {prop: "Body", name: "Body", pkg: "", typ: ptrType$5, tag: ""}]); + File.init([{prop: "Doc", name: "Doc", pkg: "", typ: ptrType, tag: ""}, {prop: "Package", name: "Package", pkg: "", typ: token.Pos, tag: ""}, {prop: "Name", name: "Name", pkg: "", typ: ptrType$4, tag: ""}, {prop: "Decls", name: "Decls", pkg: "", typ: sliceType$6, tag: ""}, {prop: "Scope", name: "Scope", pkg: "", typ: ptrType$26, tag: ""}, {prop: "Imports", name: "Imports", pkg: "", typ: sliceType$7, tag: ""}, {prop: "Unresolved", name: "Unresolved", pkg: "", typ: sliceType$8, tag: ""}, {prop: "Comments", name: "Comments", pkg: "", typ: sliceType$2, tag: ""}]); + Package.init([{prop: "Name", name: "Name", pkg: "", typ: $String, tag: ""}, {prop: "Scope", name: "Scope", pkg: "", typ: ptrType$26, tag: ""}, {prop: "Imports", name: "Imports", pkg: "", typ: mapType, tag: ""}, {prop: "Files", name: "Files", pkg: "", typ: mapType$1, tag: ""}]); + posSpan.init([{prop: "Start", name: "Start", pkg: "", typ: token.Pos, tag: ""}, {prop: "End", name: "End", pkg: "", typ: token.Pos, tag: ""}]); + byImportSpec.init(Spec); + byCommentPos.init(ptrType); + Scope.init([{prop: "Outer", name: "Outer", pkg: "", typ: ptrType$26, tag: ""}, {prop: "Objects", name: "Objects", pkg: "", typ: mapType, tag: ""}]); + Object.init([{prop: "Kind", name: "Kind", pkg: "", typ: ObjKind, tag: ""}, {prop: "Name", name: "Name", pkg: "", typ: $String, tag: ""}, {prop: "Decl", name: "Decl", pkg: "", typ: $emptyInterface, tag: ""}, {prop: "Data", name: "Data", pkg: "", typ: $emptyInterface, tag: ""}, {prop: "Type", name: "Type", pkg: "", typ: $emptyInterface, tag: ""}]); + Visitor.init([{prop: "Visit", name: "Visit", pkg: "", typ: $funcType([Node], [Visitor], false)}]); + inspector.init([Node], [$Bool], false); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_ast = function() { while (true) { switch ($s) { case 0: + $r = bytes.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = fmt.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = scanner.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = token.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = io.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + $r = os.$init($BLOCKING); /* */ $s = 6; case 6: if ($r && $r.$blocking) { $r = $r(); } + $r = reflect.$init($BLOCKING); /* */ $s = 7; case 7: if ($r && $r.$blocking) { $r = $r(); } + $r = sort.$init($BLOCKING); /* */ $s = 8; case 8: if ($r && $r.$blocking) { $r = $r(); } + $r = strconv.$init($BLOCKING); /* */ $s = 9; case 9: if ($r && $r.$blocking) { $r = $r(); } + $r = strings.$init($BLOCKING); /* */ $s = 10; case 10: if ($r && $r.$blocking) { $r = $r(); } + $r = unicode.$init($BLOCKING); /* */ $s = 11; case 11: if ($r && $r.$blocking) { $r = $r(); } + $r = utf8.$init($BLOCKING); /* */ $s = 12; case 12: if ($r && $r.$blocking) { $r = $r(); } + objKindStrings = $toNativeArray($kindString, ["bad", "package", "const", "type", "var", "func", "label"]); + /* */ } return; } }; $init_ast.$blocking = true; return $init_ast; + }; + return $pkg; +})(); +$packages["io/ioutil"] = (function() { + var $pkg = {}, bytes, io, os, filepath, sort, strconv, sync, time, sliceType, sliceType$1, ptrType, blackHolePool, readAll, ReadFile; + bytes = $packages["bytes"]; + io = $packages["io"]; + os = $packages["os"]; + filepath = $packages["path/filepath"]; + sort = $packages["sort"]; + strconv = $packages["strconv"]; + sync = $packages["sync"]; + time = $packages["time"]; + sliceType = $sliceType($emptyInterface); + sliceType$1 = $sliceType($Uint8); + ptrType = $ptrType(sliceType$1); + readAll = function(r, capacity) { + var $deferred = [], $err = null, _tmp, _tmp$1, _tuple, b = sliceType$1.nil, buf, capacity, err = $ifaceNil, r; + /* */ try { $deferFrames.push($deferred); + buf = bytes.NewBuffer($makeSlice(sliceType$1, 0, $flatten64(capacity))); + $deferred.push([(function() { + var _tuple, e, ok, panicErr; + e = $recover(); + if ($interfaceIsEqual(e, $ifaceNil)) { + return; + } + _tuple = $assertType(e, $error, true); panicErr = _tuple[0]; ok = _tuple[1]; + if (ok && $interfaceIsEqual(panicErr, bytes.ErrTooLarge)) { + err = panicErr; + } else { + $panic(e); + } + }), []]); + _tuple = buf.ReadFrom(r); err = _tuple[1]; + _tmp = buf.Bytes(); _tmp$1 = err; b = _tmp; err = _tmp$1; + return [b, err]; + /* */ } catch(err) { $err = err; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); return [b, err]; } + }; + ReadFile = $pkg.ReadFile = function(filename) { + var $deferred = [], $err = null, _tuple, _tuple$1, err, err$1, f, fi, filename, n, size; + /* */ try { $deferFrames.push($deferred); + _tuple = os.Open(filename); f = _tuple[0]; err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [sliceType$1.nil, err]; + } + $deferred.push([$methodVal(f, "Close"), []]); + n = new $Int64(0, 0); + _tuple$1 = f.Stat(); fi = _tuple$1[0]; err$1 = _tuple$1[1]; + if ($interfaceIsEqual(err$1, $ifaceNil)) { + size = fi.Size(); + if ((size.$high < 0 || (size.$high === 0 && size.$low < 1000000000))) { + n = size; + } + } + return readAll(f, new $Int64(n.$high + 0, n.$low + 512)); + /* */ } catch(err) { $err = err; return [sliceType$1.nil, $ifaceNil]; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_ioutil = function() { while (true) { switch ($s) { case 0: + $r = bytes.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = io.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = os.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = filepath.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = sort.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + $r = strconv.$init($BLOCKING); /* */ $s = 6; case 6: if ($r && $r.$blocking) { $r = $r(); } + $r = sync.$init($BLOCKING); /* */ $s = 7; case 7: if ($r && $r.$blocking) { $r = $r(); } + $r = time.$init($BLOCKING); /* */ $s = 8; case 8: if ($r && $r.$blocking) { $r = $r(); } + blackHolePool = new sync.Pool.ptr(0, 0, sliceType.nil, (function() { + var b; + b = $makeSlice(sliceType$1, 8192); + return new ptrType(function() { return b; }, function($v) { b = $v; }); + })); + /* */ } return; } }; $init_ioutil.$blocking = true; return $init_ioutil; + }; + return $pkg; +})(); +$packages["go/parser"] = (function() { + var $pkg = {}, bytes, errors, fmt, ast, scanner, token, io, ioutil, os, filepath, strconv, strings, unicode, Mode, parser, bailout, parseSpecFunction, sliceType, ptrType, ptrType$1, ptrType$2, ptrType$3, sliceType$1, ptrType$4, ptrType$5, sliceType$2, sliceType$3, sliceType$4, ptrType$7, ptrType$8, sliceType$6, ptrType$9, sliceType$7, sliceType$8, ptrType$10, ptrType$11, ptrType$12, ptrType$13, sliceType$9, ptrType$14, ptrType$15, ptrType$16, ptrType$17, ptrType$18, ptrType$19, sliceType$10, ptrType$20, arrayType, arrayType$1, ptrType$21, ptrType$22, ptrType$23, ptrType$24, ptrType$25, ptrType$26, ptrType$27, ptrType$28, ptrType$29, ptrType$30, ptrType$31, ptrType$32, ptrType$33, ptrType$34, ptrType$35, ptrType$36, ptrType$37, ptrType$38, ptrType$39, ptrType$40, ptrType$41, ptrType$42, sliceType$11, ptrType$43, ptrType$44, sliceType$12, ptrType$45, ptrType$46, funcType, unresolved, readSource, ParseFile, trace, un, assert, syncStmt, syncDecl, isTypeName, isLiteralType, deref, unparen, isTypeSwitchAssert, isTypeSwitchGuard, isValidImport; + bytes = $packages["bytes"]; + errors = $packages["errors"]; + fmt = $packages["fmt"]; + ast = $packages["go/ast"]; + scanner = $packages["go/scanner"]; + token = $packages["go/token"]; + io = $packages["io"]; + ioutil = $packages["io/ioutil"]; + os = $packages["os"]; + filepath = $packages["path/filepath"]; + strconv = $packages["strconv"]; + strings = $packages["strings"]; + unicode = $packages["unicode"]; + Mode = $pkg.Mode = $newType(4, $kindUint, "parser.Mode", "Mode", "go/parser", null); + parser = $pkg.parser = $newType(0, $kindStruct, "parser.parser", "parser", "go/parser", function(file_, errors_, scanner_, mode_, trace_, indent_, comments_, leadComment_, lineComment_, pos_, tok_, lit_, syncPos_, syncCnt_, exprLev_, inRhs_, pkgScope_, topScope_, unresolved_, imports_, labelScope_, targetStack_) { + this.$val = this; + this.file = file_ !== undefined ? file_ : ptrType$44.nil; + this.errors = errors_ !== undefined ? errors_ : scanner.ErrorList.nil; + this.scanner = scanner_ !== undefined ? scanner_ : new scanner.Scanner.ptr(); + this.mode = mode_ !== undefined ? mode_ : 0; + this.trace = trace_ !== undefined ? trace_ : false; + this.indent = indent_ !== undefined ? indent_ : 0; + this.comments = comments_ !== undefined ? comments_ : sliceType$4.nil; + this.leadComment = leadComment_ !== undefined ? leadComment_ : ptrType$2.nil; + this.lineComment = lineComment_ !== undefined ? lineComment_ : ptrType$2.nil; + this.pos = pos_ !== undefined ? pos_ : 0; + this.tok = tok_ !== undefined ? tok_ : 0; + this.lit = lit_ !== undefined ? lit_ : ""; + this.syncPos = syncPos_ !== undefined ? syncPos_ : 0; + this.syncCnt = syncCnt_ !== undefined ? syncCnt_ : 0; + this.exprLev = exprLev_ !== undefined ? exprLev_ : 0; + this.inRhs = inRhs_ !== undefined ? inRhs_ : false; + this.pkgScope = pkgScope_ !== undefined ? pkgScope_ : ptrType$4.nil; + this.topScope = topScope_ !== undefined ? topScope_ : ptrType$4.nil; + this.unresolved = unresolved_ !== undefined ? unresolved_ : sliceType$3.nil; + this.imports = imports_ !== undefined ? imports_ : sliceType$2.nil; + this.labelScope = labelScope_ !== undefined ? labelScope_ : ptrType$4.nil; + this.targetStack = targetStack_ !== undefined ? targetStack_ : sliceType$12.nil; + }); + bailout = $pkg.bailout = $newType(0, $kindStruct, "parser.bailout", "bailout", "go/parser", function() { + this.$val = this; + }); + parseSpecFunction = $pkg.parseSpecFunction = $newType(4, $kindFunc, "parser.parseSpecFunction", "parseSpecFunction", "go/parser", null); + sliceType = $sliceType($Uint8); + ptrType = $ptrType(bytes.Buffer); + ptrType$1 = $ptrType(ast.File); + ptrType$2 = $ptrType(ast.CommentGroup); + ptrType$3 = $ptrType(ast.Ident); + sliceType$1 = $sliceType(ast.Decl); + ptrType$4 = $ptrType(ast.Scope); + ptrType$5 = $ptrType(ast.ImportSpec); + sliceType$2 = $sliceType(ptrType$5); + sliceType$3 = $sliceType(ptrType$3); + sliceType$4 = $sliceType(ptrType$2); + ptrType$7 = $ptrType(scanner.ErrorList); + ptrType$8 = $ptrType(ast.Object); + sliceType$6 = $sliceType($emptyInterface); + ptrType$9 = $ptrType(ast.Comment); + sliceType$7 = $sliceType(ptrType$9); + sliceType$8 = $sliceType(ast.Expr); + ptrType$10 = $ptrType(ast.BadExpr); + ptrType$11 = $ptrType(ast.Field); + ptrType$12 = $ptrType(ast.BasicLit); + ptrType$13 = $ptrType(ast.StructType); + sliceType$9 = $sliceType(ptrType$11); + ptrType$14 = $ptrType(ast.FieldList); + ptrType$15 = $ptrType(ast.StarExpr); + ptrType$16 = $ptrType(ast.FuncType); + ptrType$17 = $ptrType(ast.InterfaceType); + ptrType$18 = $ptrType(ast.MapType); + ptrType$19 = $ptrType(ast.ChanType); + sliceType$10 = $sliceType(ast.Stmt); + ptrType$20 = $ptrType(ast.BlockStmt); + arrayType = $arrayType(ast.Expr, 3); + arrayType$1 = $arrayType(token.Pos, 2); + ptrType$21 = $ptrType(ast.CallExpr); + ptrType$22 = $ptrType(ast.FuncLit); + ptrType$23 = $ptrType(ast.CompositeLit); + ptrType$24 = $ptrType(ast.ParenExpr); + ptrType$25 = $ptrType(ast.SelectorExpr); + ptrType$26 = $ptrType(ast.IndexExpr); + ptrType$27 = $ptrType(ast.SliceExpr); + ptrType$28 = $ptrType(ast.TypeAssertExpr); + ptrType$29 = $ptrType(ast.UnaryExpr); + ptrType$30 = $ptrType(ast.BinaryExpr); + ptrType$31 = $ptrType(ast.ArrayType); + ptrType$32 = $ptrType(ast.Ellipsis); + ptrType$33 = $ptrType(ast.ReturnStmt); + ptrType$34 = $ptrType(ast.BranchStmt); + ptrType$35 = $ptrType(ast.ExprStmt); + ptrType$36 = $ptrType(ast.IfStmt); + ptrType$37 = $ptrType(ast.CaseClause); + ptrType$38 = $ptrType(ast.AssignStmt); + ptrType$39 = $ptrType(ast.CommClause); + ptrType$40 = $ptrType(ast.SelectStmt); + ptrType$41 = $ptrType(ast.LabeledStmt); + ptrType$42 = $ptrType(ast.GenDecl); + sliceType$11 = $sliceType(ast.Spec); + ptrType$43 = $ptrType(ast.FuncDecl); + ptrType$44 = $ptrType(token.File); + sliceType$12 = $sliceType(sliceType$3); + ptrType$45 = $ptrType(token.FileSet); + ptrType$46 = $ptrType(parser); + funcType = $funcType([ptrType$46], [], false); + readSource = function(filename, src) { + var _ref, _tuple, buf, err, filename, s, src; + if (!($interfaceIsEqual(src, $ifaceNil))) { + _ref = src; + if ($assertType(_ref, $String, true)[1]) { + s = _ref.$val; + return [new sliceType($stringToBytes(s)), $ifaceNil]; + } else if ($assertType(_ref, sliceType, true)[1]) { + s = _ref.$val; + return [s, $ifaceNil]; + } else if ($assertType(_ref, ptrType, true)[1]) { + s = _ref.$val; + if (!(s === ptrType.nil)) { + return [s.Bytes(), $ifaceNil]; + } + } else if ($assertType(_ref, io.Reader, true)[1]) { + s = _ref; + buf = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + _tuple = io.Copy(buf, s); err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [sliceType.nil, err]; + } + return [buf.Bytes(), $ifaceNil]; + } + return [sliceType.nil, errors.New("invalid source")]; + } + return ioutil.ReadFile(filename); + }; + ParseFile = $pkg.ParseFile = function(fset, filename, src, mode) { + var $deferred = [], $err = null, _tmp, _tmp$1, _tuple, err = $ifaceNil, f = ptrType$1.nil, filename, fset, mode, p, src, text; + /* */ try { $deferFrames.push($deferred); + _tuple = readSource(filename, src); text = _tuple[0]; err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = ptrType$1.nil; _tmp$1 = err; f = _tmp; err = _tmp$1; + return [f, err]; + } + p = $clone(new parser.ptr(), parser); + $deferred.push([(function() { + var e; + e = $recover(); + if (!($interfaceIsEqual(e, $ifaceNil))) { + } + if (f === ptrType$1.nil) { + f = new ast.File.ptr(ptrType$2.nil, 0, new ast.Ident.ptr(), sliceType$1.nil, ast.NewScope(ptrType$4.nil), sliceType$2.nil, sliceType$3.nil, sliceType$4.nil); + } + p.errors.Sort(); + err = p.errors.Err(); + }), []]); + p.init(fset, filename, text, mode); + f = p.parseFile(); + return [f, err]; + /* */ } catch(err) { $err = err; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); return [f, err]; } + }; + parser.ptr.prototype.init = function(fset, filename, src, mode) { + var eh, filename, fset, m, mode, p, src; + p = this; + p.file = fset.AddFile(filename, -1, src.$length); + m = 0; + if (!((((mode & 4) >>> 0) === 0))) { + m = 1; + } + eh = (function(pos, msg) { + var msg, pos; + new ptrType$7(function() { return this.$target.errors; }, function($v) { this.$target.errors = $v; }, p).Add(pos, msg); + }); + p.scanner.Init(p.file, src, eh, m); + p.mode = mode; + p.trace = !((((mode & 8) >>> 0) === 0)); + p.next(); + }; + parser.prototype.init = function(fset, filename, src, mode) { return this.$val.init(fset, filename, src, mode); }; + parser.ptr.prototype.openScope = function() { + var p; + p = this; + p.topScope = ast.NewScope(p.topScope); + }; + parser.prototype.openScope = function() { return this.$val.openScope(); }; + parser.ptr.prototype.closeScope = function() { + var p; + p = this; + p.topScope = p.topScope.Outer; + }; + parser.prototype.closeScope = function() { return this.$val.closeScope(); }; + parser.ptr.prototype.openLabelScope = function() { + var p; + p = this; + p.labelScope = ast.NewScope(p.labelScope); + p.targetStack = $append(p.targetStack, sliceType$3.nil); + }; + parser.prototype.openLabelScope = function() { return this.$val.openLabelScope(); }; + parser.ptr.prototype.closeLabelScope = function() { + var _i, _ref, ident, n, p, scope, x; + p = this; + n = p.targetStack.$length - 1 >> 0; + scope = p.labelScope; + _ref = (x = p.targetStack, ((n < 0 || n >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + n])); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + ident = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + ident.Obj = scope.Lookup(ident.Name); + if (ident.Obj === ptrType$8.nil && !((((p.mode & 16) >>> 0) === 0))) { + p.error(ident.Pos(), fmt.Sprintf("label %s undefined", new sliceType$6([new $String(ident.Name)]))); + } + _i++; + } + p.targetStack = $subslice(p.targetStack, 0, n); + p.labelScope = p.labelScope.Outer; + }; + parser.prototype.closeLabelScope = function() { return this.$val.closeLabelScope(); }; + parser.ptr.prototype.declare = function(decl, data, scope, kind, idents) { + var _i, _ref, alt, data, decl, ident, idents, kind, obj, p, pos, prevDecl, scope, x; + p = this; + _ref = idents; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + ident = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + assert(ident.Obj === ptrType$8.nil, "identifier already declared or resolved"); + obj = ast.NewObj(kind, ident.Name); + obj.Decl = decl; + obj.Data = data; + ident.Obj = obj; + if (!(ident.Name === "_")) { + alt = scope.Insert(obj); + if (!(alt === ptrType$8.nil) && !((((p.mode & 16) >>> 0) === 0))) { + prevDecl = ""; + pos = alt.Pos(); + if (new token.Pos(pos).IsValid()) { + prevDecl = fmt.Sprintf("\n\tprevious declaration at %s", new sliceType$6([(x = p.file.Position(pos), new x.constructor.elem(x))])); + } + p.error(ident.Pos(), fmt.Sprintf("%s redeclared in this block%s", new sliceType$6([new $String(ident.Name), new $String(prevDecl)]))); + } + } + _i++; + } + }; + parser.prototype.declare = function(decl, data, scope, kind, idents) { return this.$val.declare(decl, data, scope, kind, idents); }; + parser.ptr.prototype.shortVarDecl = function(decl, list) { + var _i, _ref, _tuple, alt, decl, ident, isIdent, list, n, obj, p, x; + p = this; + n = 0; + _ref = list; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + x = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + _tuple = $assertType(x, ptrType$3, true); ident = _tuple[0]; isIdent = _tuple[1]; + if (isIdent) { + assert(ident.Obj === ptrType$8.nil, "identifier already declared or resolved"); + obj = ast.NewObj(4, ident.Name); + obj.Decl = decl; + ident.Obj = obj; + if (!(ident.Name === "_")) { + alt = p.topScope.Insert(obj); + if (!(alt === ptrType$8.nil)) { + ident.Obj = alt; + } else { + n = n + (1) >> 0; + } + } + } else { + p.errorExpected(x.Pos(), "identifier on left side of :="); + } + _i++; + } + if ((n === 0) && !((((p.mode & 16) >>> 0) === 0))) { + p.error(((0 < 0 || 0 >= list.$length) ? $throwRuntimeError("index out of range") : list.$array[list.$offset + 0]).Pos(), "no new variables on left side of :="); + } + }; + parser.prototype.shortVarDecl = function(decl, list) { return this.$val.shortVarDecl(decl, list); }; + parser.ptr.prototype.tryResolve = function(x, collectUnresolved) { + var _tuple, collectUnresolved, ident, obj, p, s, x; + p = this; + _tuple = $assertType(x, ptrType$3, true); ident = _tuple[0]; + if (ident === ptrType$3.nil) { + return; + } + assert(ident.Obj === ptrType$8.nil, "identifier already declared or resolved"); + if (ident.Name === "_") { + return; + } + s = p.topScope; + while (true) { + if (!(!(s === ptrType$4.nil))) { break; } + obj = s.Lookup(ident.Name); + if (!(obj === ptrType$8.nil)) { + ident.Obj = obj; + return; + } + s = s.Outer; + } + if (collectUnresolved) { + ident.Obj = unresolved; + p.unresolved = $append(p.unresolved, ident); + } + }; + parser.prototype.tryResolve = function(x, collectUnresolved) { return this.$val.tryResolve(x, collectUnresolved); }; + parser.ptr.prototype.resolve = function(x) { + var p, x; + p = this; + p.tryResolve(x, true); + }; + parser.prototype.resolve = function(x) { return this.$val.resolve(x); }; + parser.ptr.prototype.printTrace = function(a) { + var a, i, p, pos; + p = this; + pos = $clone(p.file.Position(p.pos), token.Position); + fmt.Printf("%5d:%3d: ", new sliceType$6([new $Int(pos.Line), new $Int(pos.Column)])); + i = 2 * p.indent >> 0; + while (true) { + if (!(i > 64)) { break; } + fmt.Print(new sliceType$6([new $String(". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ")])); + i = i - (64) >> 0; + } + fmt.Print(new sliceType$6([new $String(". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ".substring(0, i))])); + fmt.Println(a); + }; + parser.prototype.printTrace = function(a) { return this.$val.printTrace(a); }; + trace = function(p, msg) { + var msg, p; + p.printTrace(new sliceType$6([new $String(msg), new $String("(")])); + p.indent = p.indent + (1) >> 0; + return p; + }; + un = function(p) { + var p; + p.indent = p.indent - (1) >> 0; + p.printTrace(new sliceType$6([new $String(")")])); + }; + parser.ptr.prototype.next0 = function() { + var _tuple, p, s; + p = this; + if (p.trace && new token.Pos(p.pos).IsValid()) { + s = new token.Token(p.tok).String(); + if (new token.Token(p.tok).IsLiteral()) { + p.printTrace(new sliceType$6([new $String(s), new $String(p.lit)])); + } else if (new token.Token(p.tok).IsOperator() || new token.Token(p.tok).IsKeyword()) { + p.printTrace(new sliceType$6([new $String("\"" + s + "\"")])); + } else { + p.printTrace(new sliceType$6([new $String(s)])); + } + } + _tuple = p.scanner.Scan(); p.pos = _tuple[0]; p.tok = _tuple[1]; p.lit = _tuple[2]; + }; + parser.prototype.next0 = function() { return this.$val.next0(); }; + parser.ptr.prototype.consumeComment = function() { + var comment = ptrType$9.nil, endline = 0, i, p; + p = this; + endline = p.file.Line(p.pos); + if (p.lit.charCodeAt(1) === 42) { + i = 0; + while (true) { + if (!(i < p.lit.length)) { break; } + if (p.lit.charCodeAt(i) === 10) { + endline = endline + (1) >> 0; + } + i = i + (1) >> 0; + } + } + comment = new ast.Comment.ptr(p.pos, p.lit); + p.next0(); + return [comment, endline]; + }; + parser.prototype.consumeComment = function() { return this.$val.consumeComment(); }; + parser.ptr.prototype.consumeCommentGroup = function(n) { + var _tuple, comment, comments = ptrType$2.nil, endline = 0, list, n, p; + p = this; + list = sliceType$7.nil; + endline = p.file.Line(p.pos); + while (true) { + if (!((p.tok === 2) && p.file.Line(p.pos) <= (endline + n >> 0))) { break; } + comment = ptrType$9.nil; + _tuple = p.consumeComment(); comment = _tuple[0]; endline = _tuple[1]; + list = $append(list, comment); + } + comments = new ast.CommentGroup.ptr(list); + p.comments = $append(p.comments, comments); + return [comments, endline]; + }; + parser.prototype.consumeCommentGroup = function(n) { return this.$val.consumeCommentGroup(n); }; + parser.ptr.prototype.next = function() { + var _tuple, _tuple$1, comment, endline, p, prev; + p = this; + p.leadComment = ptrType$2.nil; + p.lineComment = ptrType$2.nil; + prev = p.pos; + p.next0(); + if (p.tok === 2) { + comment = ptrType$2.nil; + endline = 0; + if (p.file.Line(p.pos) === p.file.Line(prev)) { + _tuple = p.consumeCommentGroup(0); comment = _tuple[0]; endline = _tuple[1]; + if (!((p.file.Line(p.pos) === endline))) { + p.lineComment = comment; + } + } + endline = -1; + while (true) { + if (!(p.tok === 2)) { break; } + _tuple$1 = p.consumeCommentGroup(1); comment = _tuple$1[0]; endline = _tuple$1[1]; + } + if ((endline + 1 >> 0) === p.file.Line(p.pos)) { + p.leadComment = comment; + } + } + }; + parser.prototype.next = function() { return this.$val.next(); }; + parser.ptr.prototype.error = function(pos, msg) { + var epos, msg, n, p, pos, x, x$1, x$2; + p = this; + epos = $clone(p.file.Position(pos), token.Position); + if (((p.mode & 32) >>> 0) === 0) { + n = p.errors.$length; + if (n > 0 && ((x = p.errors, x$1 = n - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])).Pos.Line === epos.Line)) { + return; + } + if (n > 10) { + $panic((x$2 = new bailout.ptr(), new x$2.constructor.elem(x$2))); + } + } + new ptrType$7(function() { return this.$target.errors; }, function($v) { this.$target.errors = $v; }, p).Add(epos, msg); + }; + parser.prototype.error = function(pos, msg) { return this.$val.error(pos, msg); }; + parser.ptr.prototype.errorExpected = function(pos, msg) { + var msg, p, pos; + p = this; + msg = "expected " + msg; + if (pos === p.pos) { + if ((p.tok === 57) && p.lit === "\n") { + msg = msg + (", found newline"); + } else { + msg = msg + (", found '" + new token.Token(p.tok).String() + "'"); + if (new token.Token(p.tok).IsLiteral()) { + msg = msg + (" " + p.lit); + } + } + } + p.error(pos, msg); + }; + parser.prototype.errorExpected = function(pos, msg) { return this.$val.errorExpected(pos, msg); }; + parser.ptr.prototype.expect = function(tok) { + var p, pos, tok; + p = this; + pos = p.pos; + if (!((p.tok === tok))) { + p.errorExpected(pos, "'" + new token.Token(tok).String() + "'"); + } + p.next(); + return pos; + }; + parser.prototype.expect = function(tok) { return this.$val.expect(tok); }; + parser.ptr.prototype.expectClosing = function(tok, context) { + var context, p, tok; + p = this; + if (!((p.tok === tok)) && (p.tok === 57) && p.lit === "\n") { + p.error(p.pos, "missing ',' before newline in " + context); + p.next(); + } + return p.expect(tok); + }; + parser.prototype.expectClosing = function(tok, context) { return this.$val.expectClosing(tok, context); }; + parser.ptr.prototype.expectSemi = function() { + var p; + p = this; + if (!((p.tok === 54)) && !((p.tok === 56))) { + if (p.tok === 57) { + p.next(); + } else { + p.errorExpected(p.pos, "';'"); + syncStmt(p); + } + } + }; + parser.prototype.expectSemi = function() { return this.$val.expectSemi(); }; + parser.ptr.prototype.atComma = function(context) { + var context, p; + p = this; + if (p.tok === 52) { + return true; + } + if ((p.tok === 57) && p.lit === "\n") { + p.error(p.pos, "missing ',' before newline in " + context); + return true; + } + return false; + }; + parser.prototype.atComma = function(context) { return this.$val.atComma(context); }; + assert = function(cond, msg) { + var cond, msg; + if (!cond) { + $panic(new $String("go/parser internal error: " + msg)); + } + }; + syncStmt = function(p) { + var _ref, p; + while (true) { + if (!(true)) { break; } + _ref = p.tok; + if (_ref === 61 || _ref === 64 || _ref === 65 || _ref === 67 || _ref === 69 || _ref === 70 || _ref === 72 || _ref === 73 || _ref === 74 || _ref === 80 || _ref === 81 || _ref === 83 || _ref === 84 || _ref === 85) { + if ((p.pos === p.syncPos) && p.syncCnt < 10) { + p.syncCnt = p.syncCnt + (1) >> 0; + return; + } + if (p.pos > p.syncPos) { + p.syncPos = p.pos; + p.syncCnt = 0; + return; + } + } else if (_ref === 1) { + return; + } + p.next(); + } + }; + syncDecl = function(p) { + var _ref, p; + while (true) { + if (!(true)) { break; } + _ref = p.tok; + if (_ref === 64 || _ref === 84 || _ref === 85) { + if ((p.pos === p.syncPos) && p.syncCnt < 10) { + p.syncCnt = p.syncCnt + (1) >> 0; + return; + } + if (p.pos > p.syncPos) { + p.syncPos = p.pos; + p.syncCnt = 0; + return; + } + } else if (_ref === 1) { + return; + } + p.next(); + } + }; + parser.ptr.prototype.safePos = function(pos) { + var $deferred = [], $err = null, p, pos, res = 0; + /* */ try { $deferFrames.push($deferred); + p = this; + $deferred.push([(function() { + if (!($interfaceIsEqual($recover(), $ifaceNil))) { + res = ((p.file.Base() + p.file.Size() >> 0) >> 0); + } + }), []]); + p.file.Offset(pos); + res = pos; + return res; + /* */ } catch(err) { $err = err; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); return res; } + }; + parser.prototype.safePos = function(pos) { return this.$val.safePos(pos); }; + parser.ptr.prototype.parseIdent = function() { + var name, p, pos; + p = this; + pos = p.pos; + name = "_"; + if (p.tok === 4) { + name = p.lit; + p.next(); + } else { + p.expect(4); + } + return new ast.Ident.ptr(pos, name, ptrType$8.nil); + }; + parser.prototype.parseIdent = function() { return this.$val.parseIdent(); }; + parser.ptr.prototype.parseIdentList = function() { + var $deferred = [], $err = null, list = sliceType$3.nil, p; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "IdentList")]]); + } + list = $append(list, p.parseIdent()); + while (true) { + if (!(p.tok === 52)) { break; } + p.next(); + list = $append(list, p.parseIdent()); + } + return list; + /* */ } catch(err) { $err = err; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); return list; } + }; + parser.prototype.parseIdentList = function() { return this.$val.parseIdentList(); }; + parser.ptr.prototype.parseExprList = function(lhs) { + var $deferred = [], $err = null, lhs, list = sliceType$8.nil, p; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "ExpressionList")]]); + } + list = $append(list, p.checkExpr(p.parseExpr(lhs))); + while (true) { + if (!(p.tok === 52)) { break; } + p.next(); + list = $append(list, p.checkExpr(p.parseExpr(lhs))); + } + return list; + /* */ } catch(err) { $err = err; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); return list; } + }; + parser.prototype.parseExprList = function(lhs) { return this.$val.parseExprList(lhs); }; + parser.ptr.prototype.parseLhsList = function() { + var _i, _ref, _ref$1, list, old, p, x; + p = this; + old = p.inRhs; + p.inRhs = false; + list = p.parseExprList(true); + _ref = p.tok; + if (_ref === 47) { + } else if (_ref === 58) { + } else { + _ref$1 = list; + _i = 0; + while (true) { + if (!(_i < _ref$1.$length)) { break; } + x = ((_i < 0 || _i >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i]); + p.resolve(x); + _i++; + } + } + p.inRhs = old; + return list; + }; + parser.prototype.parseLhsList = function() { return this.$val.parseLhsList(); }; + parser.ptr.prototype.parseRhsList = function() { + var list, old, p; + p = this; + old = p.inRhs; + p.inRhs = true; + list = p.parseExprList(false); + p.inRhs = old; + return list; + }; + parser.prototype.parseRhsList = function() { return this.$val.parseRhsList(); }; + parser.ptr.prototype.parseType = function() { + var $deferred = [], $err = null, p, pos, typ; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "Type")]]); + } + typ = p.tryType(); + if ($interfaceIsEqual(typ, $ifaceNil)) { + pos = p.pos; + p.errorExpected(pos, "type"); + p.next(); + return new ast.BadExpr.ptr(pos, p.pos); + } + return typ; + /* */ } catch(err) { $err = err; return $ifaceNil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseType = function() { return this.$val.parseType(); }; + parser.ptr.prototype.parseTypeName = function() { + var $deferred = [], $err = null, ident, p, sel; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "TypeName")]]); + } + ident = p.parseIdent(); + if (p.tok === 53) { + p.next(); + p.resolve(ident); + sel = p.parseIdent(); + return new ast.SelectorExpr.ptr(ident, sel); + } + return ident; + /* */ } catch(err) { $err = err; return $ifaceNil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseTypeName = function() { return this.$val.parseTypeName(); }; + parser.ptr.prototype.parseArrayType = function() { + var $deferred = [], $err = null, elt, lbrack, len, p; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "ArrayType")]]); + } + lbrack = p.expect(50); + p.exprLev = p.exprLev + (1) >> 0; + len = $ifaceNil; + if (p.tok === 48) { + len = new ast.Ellipsis.ptr(p.pos, $ifaceNil); + p.next(); + } else if (!((p.tok === 55))) { + len = p.parseRhs(); + } + p.exprLev = p.exprLev - (1) >> 0; + p.expect(55); + elt = p.parseType(); + return new ast.ArrayType.ptr(lbrack, len, elt); + /* */ } catch(err) { $err = err; return $ifaceNil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseArrayType = function() { return this.$val.parseArrayType(); }; + parser.ptr.prototype.makeIdentList = function(list) { + var _i, _ref, _tuple, _tuple$1, i, ident, idents, isBad, isIdent, list, p, x; + p = this; + idents = $makeSlice(sliceType$3, list.$length); + _ref = list; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + x = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + _tuple = $assertType(x, ptrType$3, true); ident = _tuple[0]; isIdent = _tuple[1]; + if (!isIdent) { + _tuple$1 = $assertType(x, ptrType$10, true); isBad = _tuple$1[1]; + if (!isBad) { + p.errorExpected(x.Pos(), "identifier"); + } + ident = new ast.Ident.ptr(x.Pos(), "_", ptrType$8.nil); + } + (i < 0 || i >= idents.$length) ? $throwRuntimeError("index out of range") : idents.$array[idents.$offset + i] = ident; + _i++; + } + return idents; + }; + parser.prototype.makeIdentList = function(list) { return this.$val.makeIdentList(list); }; + parser.ptr.prototype.parseFieldDecl = function(scope) { + var $deferred = [], $err = null, _tuple, doc, field, idents, list, n, p, pos, scope, tag, typ, x; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "FieldDecl")]]); + } + doc = p.leadComment; + _tuple = p.parseVarList(false); list = _tuple[0]; typ = _tuple[1]; + tag = ptrType$12.nil; + if (p.tok === 9) { + tag = new ast.BasicLit.ptr(p.pos, p.tok, p.lit); + p.next(); + } + idents = sliceType$3.nil; + if (!($interfaceIsEqual(typ, $ifaceNil))) { + idents = p.makeIdentList(list); + } else { + typ = ((0 < 0 || 0 >= list.$length) ? $throwRuntimeError("index out of range") : list.$array[list.$offset + 0]); + n = list.$length; + if (n > 1 || !isTypeName(deref(typ))) { + pos = typ.Pos(); + p.errorExpected(pos, "anonymous field"); + typ = new ast.BadExpr.ptr(pos, p.safePos((x = n - 1 >> 0, ((x < 0 || x >= list.$length) ? $throwRuntimeError("index out of range") : list.$array[list.$offset + x])).End())); + } + } + p.expectSemi(); + field = new ast.Field.ptr(doc, idents, typ, tag, p.lineComment); + p.declare(field, $ifaceNil, scope, 4, idents); + p.resolve(typ); + return field; + /* */ } catch(err) { $err = err; return ptrType$11.nil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseFieldDecl = function(scope) { return this.$val.parseFieldDecl(scope); }; + parser.ptr.prototype.parseStructType = function() { + var $deferred = [], $err = null, lbrace, list, p, pos, rbrace, scope; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "StructType")]]); + } + pos = p.expect(82); + lbrace = p.expect(51); + scope = ast.NewScope(ptrType$4.nil); + list = sliceType$9.nil; + while (true) { + if (!((p.tok === 4) || (p.tok === 14) || (p.tok === 49))) { break; } + list = $append(list, p.parseFieldDecl(scope)); + } + rbrace = p.expect(56); + return new ast.StructType.ptr(pos, new ast.FieldList.ptr(lbrace, list, rbrace), false); + /* */ } catch(err) { $err = err; return ptrType$13.nil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseStructType = function() { return this.$val.parseStructType(); }; + parser.ptr.prototype.parsePointerType = function() { + var $deferred = [], $err = null, base, p, star; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "PointerType")]]); + } + star = p.expect(14); + base = p.parseType(); + return new ast.StarExpr.ptr(star, base); + /* */ } catch(err) { $err = err; return ptrType$15.nil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parsePointerType = function() { return this.$val.parsePointerType(); }; + parser.ptr.prototype.tryVarType = function(isParam) { + var isParam, p, pos, typ; + p = this; + if (isParam && (p.tok === 48)) { + pos = p.pos; + p.next(); + typ = p.tryIdentOrType(); + if (!($interfaceIsEqual(typ, $ifaceNil))) { + p.resolve(typ); + } else { + p.error(pos, "'...' parameter is missing type"); + typ = new ast.BadExpr.ptr(pos, p.pos); + } + return new ast.Ellipsis.ptr(pos, typ); + } + return p.tryIdentOrType(); + }; + parser.prototype.tryVarType = function(isParam) { return this.$val.tryVarType(isParam); }; + parser.ptr.prototype.parseVarType = function(isParam) { + var isParam, p, pos, typ; + p = this; + typ = p.tryVarType(isParam); + if ($interfaceIsEqual(typ, $ifaceNil)) { + pos = p.pos; + p.errorExpected(pos, "type"); + p.next(); + typ = new ast.BadExpr.ptr(pos, p.pos); + } + return typ; + }; + parser.prototype.parseVarType = function(isParam) { return this.$val.parseVarType(isParam); }; + parser.ptr.prototype.parseVarList = function(isParam) { + var $deferred = [], $err = null, isParam, list = sliceType$8.nil, p, typ = $ifaceNil, typ$1; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "VarList")]]); + } + typ$1 = p.parseVarType(isParam); + while (true) { + if (!(!($interfaceIsEqual(typ$1, $ifaceNil)))) { break; } + list = $append(list, typ$1); + if (!((p.tok === 52))) { + break; + } + p.next(); + typ$1 = p.tryVarType(isParam); + } + typ = p.tryVarType(isParam); + return [list, typ]; + /* */ } catch(err) { $err = err; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); return [list, typ]; } + }; + parser.prototype.parseVarList = function(isParam) { return this.$val.parseVarList(isParam); }; + parser.ptr.prototype.parseParameterList = function(scope, ellipsisOk) { + var $deferred = [], $err = null, _i, _ref, _tuple, ellipsisOk, field, field$1, i, idents, idents$1, list, p, params = sliceType$9.nil, scope, typ, typ$1, typ$2; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "ParameterList")]]); + } + _tuple = p.parseVarList(ellipsisOk); list = _tuple[0]; typ = _tuple[1]; + if (!($interfaceIsEqual(typ, $ifaceNil))) { + idents = p.makeIdentList(list); + field = new ast.Field.ptr(ptrType$2.nil, idents, typ, ptrType$12.nil, ptrType$2.nil); + params = $append(params, field); + p.declare(field, $ifaceNil, scope, 4, idents); + p.resolve(typ); + if (!p.atComma("parameter list")) { + return params; + } + p.next(); + while (true) { + if (!(!((p.tok === 54)) && !((p.tok === 1)))) { break; } + idents$1 = p.parseIdentList(); + typ$1 = p.parseVarType(ellipsisOk); + field$1 = new ast.Field.ptr(ptrType$2.nil, idents$1, typ$1, ptrType$12.nil, ptrType$2.nil); + params = $append(params, field$1); + p.declare(field$1, $ifaceNil, scope, 4, idents$1); + p.resolve(typ$1); + if (!p.atComma("parameter list")) { + break; + } + p.next(); + } + return params; + } + params = $makeSlice(sliceType$9, list.$length); + _ref = list; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + typ$2 = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + p.resolve(typ$2); + (i < 0 || i >= params.$length) ? $throwRuntimeError("index out of range") : params.$array[params.$offset + i] = new ast.Field.ptr(ptrType$2.nil, sliceType$3.nil, typ$2, ptrType$12.nil, ptrType$2.nil); + _i++; + } + return params; + /* */ } catch(err) { $err = err; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); return params; } + }; + parser.prototype.parseParameterList = function(scope, ellipsisOk) { return this.$val.parseParameterList(scope, ellipsisOk); }; + parser.ptr.prototype.parseParameters = function(scope, ellipsisOk) { + var $deferred = [], $err = null, ellipsisOk, lparen, p, params, rparen, scope; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "Parameters")]]); + } + params = sliceType$9.nil; + lparen = p.expect(49); + if (!((p.tok === 54))) { + params = p.parseParameterList(scope, ellipsisOk); + } + rparen = p.expect(54); + return new ast.FieldList.ptr(lparen, params, rparen); + /* */ } catch(err) { $err = err; return ptrType$14.nil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseParameters = function(scope, ellipsisOk) { return this.$val.parseParameters(scope, ellipsisOk); }; + parser.ptr.prototype.parseResult = function(scope) { + var $deferred = [], $err = null, list, p, scope, typ; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "Result")]]); + } + if (p.tok === 49) { + return p.parseParameters(scope, false); + } + typ = p.tryType(); + if (!($interfaceIsEqual(typ, $ifaceNil))) { + list = $makeSlice(sliceType$9, 1); + (0 < 0 || 0 >= list.$length) ? $throwRuntimeError("index out of range") : list.$array[list.$offset + 0] = new ast.Field.ptr(ptrType$2.nil, sliceType$3.nil, typ, ptrType$12.nil, ptrType$2.nil); + return new ast.FieldList.ptr(0, list, 0); + } + return ptrType$14.nil; + /* */ } catch(err) { $err = err; return ptrType$14.nil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseResult = function(scope) { return this.$val.parseResult(scope); }; + parser.ptr.prototype.parseSignature = function(scope) { + var $deferred = [], $err = null, p, params = ptrType$14.nil, results = ptrType$14.nil, scope; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "Signature")]]); + } + params = p.parseParameters(scope, true); + results = p.parseResult(scope); + return [params, results]; + /* */ } catch(err) { $err = err; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); return [params, results]; } + }; + parser.prototype.parseSignature = function(scope) { return this.$val.parseSignature(scope); }; + parser.ptr.prototype.parseFuncType = function() { + var $deferred = [], $err = null, _tuple, p, params, pos, results, scope; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "FuncType")]]); + } + pos = p.expect(71); + scope = ast.NewScope(p.topScope); + _tuple = p.parseSignature(scope); params = _tuple[0]; results = _tuple[1]; + return [new ast.FuncType.ptr(pos, params, results), scope]; + /* */ } catch(err) { $err = err; return [ptrType$16.nil, ptrType$4.nil]; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseFuncType = function() { return this.$val.parseFuncType(); }; + parser.ptr.prototype.parseMethodSpec = function(scope) { + var $deferred = [], $err = null, _tuple, _tuple$1, doc, ident, idents, isIdent, p, params, results, scope, scope$1, spec, typ, x; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "MethodSpec")]]); + } + doc = p.leadComment; + idents = sliceType$3.nil; + typ = $ifaceNil; + x = p.parseTypeName(); + _tuple = $assertType(x, ptrType$3, true); ident = _tuple[0]; isIdent = _tuple[1]; + if (isIdent && (p.tok === 49)) { + idents = new sliceType$3([ident]); + scope$1 = ast.NewScope(ptrType$4.nil); + _tuple$1 = p.parseSignature(scope$1); params = _tuple$1[0]; results = _tuple$1[1]; + typ = new ast.FuncType.ptr(0, params, results); + } else { + typ = x; + p.resolve(typ); + } + p.expectSemi(); + spec = new ast.Field.ptr(doc, idents, typ, ptrType$12.nil, p.lineComment); + p.declare(spec, $ifaceNil, scope, 5, idents); + return spec; + /* */ } catch(err) { $err = err; return ptrType$11.nil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseMethodSpec = function(scope) { return this.$val.parseMethodSpec(scope); }; + parser.ptr.prototype.parseInterfaceType = function() { + var $deferred = [], $err = null, lbrace, list, p, pos, rbrace, scope; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "InterfaceType")]]); + } + pos = p.expect(76); + lbrace = p.expect(51); + scope = ast.NewScope(ptrType$4.nil); + list = sliceType$9.nil; + while (true) { + if (!(p.tok === 4)) { break; } + list = $append(list, p.parseMethodSpec(scope)); + } + rbrace = p.expect(56); + return new ast.InterfaceType.ptr(pos, new ast.FieldList.ptr(lbrace, list, rbrace), false); + /* */ } catch(err) { $err = err; return ptrType$17.nil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseInterfaceType = function() { return this.$val.parseInterfaceType(); }; + parser.ptr.prototype.parseMapType = function() { + var $deferred = [], $err = null, key, p, pos, value; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "MapType")]]); + } + pos = p.expect(77); + p.expect(50); + key = p.parseType(); + p.expect(55); + value = p.parseType(); + return new ast.MapType.ptr(pos, key, value); + /* */ } catch(err) { $err = err; return ptrType$18.nil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseMapType = function() { return this.$val.parseMapType(); }; + parser.ptr.prototype.parseChanType = function() { + var $deferred = [], $err = null, arrow, dir, p, pos, value; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "ChanType")]]); + } + pos = p.pos; + dir = 3; + arrow = 0; + if (p.tok === 63) { + p.next(); + if (p.tok === 36) { + arrow = p.pos; + p.next(); + dir = 1; + } + } else { + arrow = p.expect(36); + p.expect(63); + dir = 2; + } + value = p.parseType(); + return new ast.ChanType.ptr(pos, arrow, dir, value); + /* */ } catch(err) { $err = err; return ptrType$19.nil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseChanType = function() { return this.$val.parseChanType(); }; + parser.ptr.prototype.tryIdentOrType = function() { + var _ref, _tuple, lparen, p, rparen, typ, typ$1; + p = this; + _ref = p.tok; + if (_ref === 4) { + return p.parseTypeName(); + } else if (_ref === 50) { + return p.parseArrayType(); + } else if (_ref === 82) { + return p.parseStructType(); + } else if (_ref === 14) { + return p.parsePointerType(); + } else if (_ref === 71) { + _tuple = p.parseFuncType(); typ = _tuple[0]; + return typ; + } else if (_ref === 76) { + return p.parseInterfaceType(); + } else if (_ref === 77) { + return p.parseMapType(); + } else if (_ref === 63 || _ref === 36) { + return p.parseChanType(); + } else if (_ref === 49) { + lparen = p.pos; + p.next(); + typ$1 = p.parseType(); + rparen = p.expect(54); + return new ast.ParenExpr.ptr(lparen, typ$1, rparen); + } + return $ifaceNil; + }; + parser.prototype.tryIdentOrType = function() { return this.$val.tryIdentOrType(); }; + parser.ptr.prototype.tryType = function() { + var p, typ; + p = this; + typ = p.tryIdentOrType(); + if (!($interfaceIsEqual(typ, $ifaceNil))) { + p.resolve(typ); + } + return typ; + }; + parser.prototype.tryType = function() { return this.$val.tryType(); }; + parser.ptr.prototype.parseStmtList = function() { + var $deferred = [], $err = null, list = sliceType$10.nil, p; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "StatementList")]]); + } + while (true) { + if (!(!((p.tok === 62)) && !((p.tok === 66)) && !((p.tok === 56)) && !((p.tok === 1)))) { break; } + list = $append(list, p.parseStmt()); + } + return list; + /* */ } catch(err) { $err = err; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); return list; } + }; + parser.prototype.parseStmtList = function() { return this.$val.parseStmtList(); }; + parser.ptr.prototype.parseBody = function(scope) { + var $deferred = [], $err = null, lbrace, list, p, rbrace, scope; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "Body")]]); + } + lbrace = p.expect(51); + p.topScope = scope; + p.openLabelScope(); + list = p.parseStmtList(); + p.closeLabelScope(); + p.closeScope(); + rbrace = p.expect(56); + return new ast.BlockStmt.ptr(lbrace, list, rbrace); + /* */ } catch(err) { $err = err; return ptrType$20.nil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseBody = function(scope) { return this.$val.parseBody(scope); }; + parser.ptr.prototype.parseBlockStmt = function() { + var $deferred = [], $err = null, lbrace, list, p, rbrace; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "BlockStmt")]]); + } + lbrace = p.expect(51); + p.openScope(); + list = p.parseStmtList(); + p.closeScope(); + rbrace = p.expect(56); + return new ast.BlockStmt.ptr(lbrace, list, rbrace); + /* */ } catch(err) { $err = err; return ptrType$20.nil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseBlockStmt = function() { return this.$val.parseBlockStmt(); }; + parser.ptr.prototype.parseFuncTypeOrLit = function() { + var $deferred = [], $err = null, _tuple, body, p, scope, typ; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "FuncTypeOrLit")]]); + } + _tuple = p.parseFuncType(); typ = _tuple[0]; scope = _tuple[1]; + if (!((p.tok === 51))) { + return typ; + } + p.exprLev = p.exprLev + (1) >> 0; + body = p.parseBody(scope); + p.exprLev = p.exprLev - (1) >> 0; + return new ast.FuncLit.ptr(typ, body); + /* */ } catch(err) { $err = err; return $ifaceNil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseFuncTypeOrLit = function() { return this.$val.parseFuncTypeOrLit(); }; + parser.ptr.prototype.parseOperand = function(lhs) { + var $deferred = [], $err = null, _ref, _tuple, isIdent, lhs, lparen, p, pos, rparen, typ, x, x$1, x$2; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "Operand")]]); + } + _ref = p.tok; + if (_ref === 4) { + x = p.parseIdent(); + if (!lhs) { + p.resolve(x); + } + return x; + } else if (_ref === 5 || _ref === 6 || _ref === 7 || _ref === 8 || _ref === 9) { + x$1 = new ast.BasicLit.ptr(p.pos, p.tok, p.lit); + p.next(); + return x$1; + } else if (_ref === 49) { + lparen = p.pos; + p.next(); + p.exprLev = p.exprLev + (1) >> 0; + x$2 = p.parseRhsOrType(); + p.exprLev = p.exprLev - (1) >> 0; + rparen = p.expect(54); + return new ast.ParenExpr.ptr(lparen, x$2, rparen); + } else if (_ref === 71) { + return p.parseFuncTypeOrLit(); + } + typ = p.tryIdentOrType(); + if (!($interfaceIsEqual(typ, $ifaceNil))) { + _tuple = $assertType(typ, ptrType$3, true); isIdent = _tuple[1]; + assert(!isIdent, "type cannot be identifier"); + return typ; + } + pos = p.pos; + p.errorExpected(pos, "operand"); + syncStmt(p); + return new ast.BadExpr.ptr(pos, p.pos); + /* */ } catch(err) { $err = err; return $ifaceNil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseOperand = function(lhs) { return this.$val.parseOperand(lhs); }; + parser.ptr.prototype.parseSelector = function(x) { + var $deferred = [], $err = null, p, sel, x; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "Selector")]]); + } + sel = p.parseIdent(); + return new ast.SelectorExpr.ptr(x, sel); + /* */ } catch(err) { $err = err; return $ifaceNil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseSelector = function(x) { return this.$val.parseSelector(x); }; + parser.ptr.prototype.parseTypeAssertion = function(x) { + var $deferred = [], $err = null, lparen, p, rparen, typ, x; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "TypeAssertion")]]); + } + lparen = p.expect(49); + typ = $ifaceNil; + if (p.tok === 84) { + p.next(); + } else { + typ = p.parseType(); + } + rparen = p.expect(54); + return new ast.TypeAssertExpr.ptr(x, lparen, typ, rparen); + /* */ } catch(err) { $err = err; return $ifaceNil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseTypeAssertion = function(x) { return this.$val.parseTypeAssertion(x); }; + parser.ptr.prototype.parseIndexOrSlice = function(x) { + var $deferred = [], $err = null, colons, index, lbrack, ncolons, p, rbrack, slice3, x; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "IndexOrSlice")]]); + } + lbrack = p.expect(50); + p.exprLev = p.exprLev + (1) >> 0; + index = $clone(arrayType.zero(), arrayType); + colons = $clone(arrayType$1.zero(), arrayType$1); + if (!((p.tok === 58))) { + index[0] = p.parseRhs(); + } + ncolons = 0; + while (true) { + if (!((p.tok === 58) && ncolons < 2)) { break; } + (ncolons < 0 || ncolons >= colons.length) ? $throwRuntimeError("index out of range") : colons[ncolons] = p.pos; + ncolons = ncolons + (1) >> 0; + p.next(); + if (!((p.tok === 58)) && !((p.tok === 55)) && !((p.tok === 1))) { + (ncolons < 0 || ncolons >= index.length) ? $throwRuntimeError("index out of range") : index[ncolons] = p.parseRhs(); + } + } + p.exprLev = p.exprLev - (1) >> 0; + rbrack = p.expect(55); + if (ncolons > 0) { + slice3 = false; + if (ncolons === 2) { + slice3 = true; + if ($interfaceIsEqual(index[1], $ifaceNil)) { + p.error(colons[0], "2nd index required in 3-index slice"); + index[1] = new ast.BadExpr.ptr(colons[0] + 1 >> 0, colons[1]); + } + if ($interfaceIsEqual(index[2], $ifaceNil)) { + p.error(colons[1], "3rd index required in 3-index slice"); + index[2] = new ast.BadExpr.ptr(colons[1] + 1 >> 0, rbrack); + } + } + return new ast.SliceExpr.ptr(x, lbrack, index[0], index[1], index[2], slice3, rbrack); + } + return new ast.IndexExpr.ptr(x, lbrack, index[0], rbrack); + /* */ } catch(err) { $err = err; return $ifaceNil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseIndexOrSlice = function(x) { return this.$val.parseIndexOrSlice(x); }; + parser.ptr.prototype.parseCallOrConversion = function(fun) { + var $deferred = [], $err = null, ellipsis, fun, list, lparen, p, rparen; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "CallOrConversion")]]); + } + lparen = p.expect(49); + p.exprLev = p.exprLev + (1) >> 0; + list = sliceType$8.nil; + ellipsis = 0; + while (true) { + if (!(!((p.tok === 54)) && !((p.tok === 1)) && !new token.Pos(ellipsis).IsValid())) { break; } + list = $append(list, p.parseRhsOrType()); + if (p.tok === 48) { + ellipsis = p.pos; + p.next(); + } + if (!p.atComma("argument list")) { + break; + } + p.next(); + } + p.exprLev = p.exprLev - (1) >> 0; + rparen = p.expectClosing(54, "argument list"); + return new ast.CallExpr.ptr(fun, lparen, list, ellipsis, rparen); + /* */ } catch(err) { $err = err; return ptrType$21.nil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseCallOrConversion = function(fun) { return this.$val.parseCallOrConversion(fun); }; + parser.ptr.prototype.parseElement = function(keyOk) { + var $deferred = [], $err = null, colon, keyOk, p, x; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "Element")]]); + } + if (p.tok === 51) { + return p.parseLiteralValue($ifaceNil); + } + x = p.checkExpr(p.parseExpr(keyOk)); + if (keyOk) { + if (p.tok === 58) { + colon = p.pos; + p.next(); + p.tryResolve(x, false); + return new ast.KeyValueExpr.ptr(x, colon, p.parseElement(false)); + } + p.resolve(x); + } + return x; + /* */ } catch(err) { $err = err; return $ifaceNil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseElement = function(keyOk) { return this.$val.parseElement(keyOk); }; + parser.ptr.prototype.parseElementList = function() { + var $deferred = [], $err = null, list = sliceType$8.nil, p; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "ElementList")]]); + } + while (true) { + if (!(!((p.tok === 56)) && !((p.tok === 1)))) { break; } + list = $append(list, p.parseElement(true)); + if (!p.atComma("composite literal")) { + break; + } + p.next(); + } + return list; + /* */ } catch(err) { $err = err; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); return list; } + }; + parser.prototype.parseElementList = function() { return this.$val.parseElementList(); }; + parser.ptr.prototype.parseLiteralValue = function(typ) { + var $deferred = [], $err = null, elts, lbrace, p, rbrace, typ; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "LiteralValue")]]); + } + lbrace = p.expect(51); + elts = sliceType$8.nil; + p.exprLev = p.exprLev + (1) >> 0; + if (!((p.tok === 56))) { + elts = p.parseElementList(); + } + p.exprLev = p.exprLev - (1) >> 0; + rbrace = p.expectClosing(56, "composite literal"); + return new ast.CompositeLit.ptr(typ, lbrace, elts, rbrace); + /* */ } catch(err) { $err = err; return $ifaceNil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseLiteralValue = function(typ) { return this.$val.parseLiteralValue(typ); }; + parser.ptr.prototype.checkExpr = function(x) { + var _ref, p, x; + p = this; + _ref = unparen(x); + if ($assertType(_ref, ptrType$10, true)[1]) { + } else if ($assertType(_ref, ptrType$3, true)[1]) { + } else if ($assertType(_ref, ptrType$12, true)[1]) { + } else if ($assertType(_ref, ptrType$22, true)[1]) { + } else if ($assertType(_ref, ptrType$23, true)[1]) { + } else if ($assertType(_ref, ptrType$24, true)[1]) { + $panic(new $String("unreachable")); + } else if ($assertType(_ref, ptrType$25, true)[1]) { + } else if ($assertType(_ref, ptrType$26, true)[1]) { + } else if ($assertType(_ref, ptrType$27, true)[1]) { + } else if ($assertType(_ref, ptrType$28, true)[1]) { + } else if ($assertType(_ref, ptrType$21, true)[1]) { + } else if ($assertType(_ref, ptrType$15, true)[1]) { + } else if ($assertType(_ref, ptrType$29, true)[1]) { + } else if ($assertType(_ref, ptrType$30, true)[1]) { + } else { + p.errorExpected(x.Pos(), "expression"); + x = new ast.BadExpr.ptr(x.Pos(), p.safePos(x.End())); + } + return x; + }; + parser.prototype.checkExpr = function(x) { return this.$val.checkExpr(x); }; + isTypeName = function(x) { + var _ref, _tuple, isIdent, t, x; + _ref = x; + if ($assertType(_ref, ptrType$10, true)[1]) { + t = _ref.$val; + } else if ($assertType(_ref, ptrType$3, true)[1]) { + t = _ref.$val; + } else if ($assertType(_ref, ptrType$25, true)[1]) { + t = _ref.$val; + _tuple = $assertType(t.X, ptrType$3, true); isIdent = _tuple[1]; + return isIdent; + } else { + t = _ref; + return false; + } + return true; + }; + isLiteralType = function(x) { + var _ref, _tuple, isIdent, t, x; + _ref = x; + if ($assertType(_ref, ptrType$10, true)[1]) { + t = _ref.$val; + } else if ($assertType(_ref, ptrType$3, true)[1]) { + t = _ref.$val; + } else if ($assertType(_ref, ptrType$25, true)[1]) { + t = _ref.$val; + _tuple = $assertType(t.X, ptrType$3, true); isIdent = _tuple[1]; + return isIdent; + } else if ($assertType(_ref, ptrType$31, true)[1]) { + t = _ref.$val; + } else if ($assertType(_ref, ptrType$13, true)[1]) { + t = _ref.$val; + } else if ($assertType(_ref, ptrType$18, true)[1]) { + t = _ref.$val; + } else { + t = _ref; + return false; + } + return true; + }; + deref = function(x) { + var _tuple, isPtr, p, x; + _tuple = $assertType(x, ptrType$15, true); p = _tuple[0]; isPtr = _tuple[1]; + if (isPtr) { + x = p.X; + } + return x; + }; + unparen = function(x) { + var _tuple, isParen, p, x; + _tuple = $assertType(x, ptrType$24, true); p = _tuple[0]; isParen = _tuple[1]; + if (isParen) { + x = unparen(p.X); + } + return x; + }; + parser.ptr.prototype.checkExprOrType = function(x) { + var _ref, _tuple, isEllipsis, len, p, t, x; + p = this; + _ref = unparen(x); + if ($assertType(_ref, ptrType$24, true)[1]) { + t = _ref.$val; + $panic(new $String("unreachable")); + } else if ($assertType(_ref, ptrType$29, true)[1]) { + t = _ref.$val; + } else if ($assertType(_ref, ptrType$31, true)[1]) { + t = _ref.$val; + _tuple = $assertType(t.Len, ptrType$32, true); len = _tuple[0]; isEllipsis = _tuple[1]; + if (isEllipsis) { + p.error(len.Pos(), "expected array length, found '...'"); + x = new ast.BadExpr.ptr(x.Pos(), p.safePos(x.End())); + } + } + return x; + }; + parser.prototype.checkExprOrType = function(x) { return this.$val.checkExprOrType(x); }; + parser.ptr.prototype.parsePrimaryExpr = function(lhs) { + var $deferred = [], $err = null, _ref, _ref$1, lhs, p, pos, x; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "PrimaryExpr")]]); + } + x = p.parseOperand(lhs); + L: + while (true) { + if (!(true)) { break; } + _ref = p.tok; + if (_ref === 53) { + p.next(); + if (lhs) { + p.resolve(x); + } + _ref$1 = p.tok; + if (_ref$1 === 4) { + x = p.parseSelector(p.checkExprOrType(x)); + } else if (_ref$1 === 49) { + x = p.parseTypeAssertion(p.checkExpr(x)); + } else { + pos = p.pos; + p.errorExpected(pos, "selector or type assertion"); + p.next(); + x = new ast.BadExpr.ptr(pos, p.pos); + } + } else if (_ref === 50) { + if (lhs) { + p.resolve(x); + } + x = p.parseIndexOrSlice(p.checkExpr(x)); + } else if (_ref === 49) { + if (lhs) { + p.resolve(x); + } + x = p.parseCallOrConversion(p.checkExprOrType(x)); + } else if (_ref === 51) { + if (isLiteralType(x) && (p.exprLev >= 0 || !isTypeName(x))) { + if (lhs) { + p.resolve(x); + } + x = p.parseLiteralValue(x); + } else { + break L; + } + } else { + break L; + } + lhs = false; + } + return x; + /* */ } catch(err) { $err = err; return $ifaceNil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parsePrimaryExpr = function(lhs) { return this.$val.parsePrimaryExpr(lhs); }; + parser.ptr.prototype.parseUnaryExpr = function(lhs) { + var $deferred = [], $err = null, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tuple, _tuple$1, arrow, dir, lhs, ok, op, p, pos, pos$1, typ, x, x$1, x$2; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "UnaryExpr")]]); + } + _ref = p.tok; + if (_ref === 12 || _ref === 13 || _ref === 43 || _ref === 19 || _ref === 17) { + _tmp = p.pos; _tmp$1 = p.tok; pos = _tmp; op = _tmp$1; + p.next(); + x = p.parseUnaryExpr(false); + return new ast.UnaryExpr.ptr(pos, op, p.checkExpr(x)); + } else if (_ref === 36) { + arrow = p.pos; + p.next(); + x$1 = p.parseUnaryExpr(false); + _tuple = $assertType(x$1, ptrType$19, true); typ = _tuple[0]; ok = _tuple[1]; + if (ok) { + dir = 1; + while (true) { + if (!(ok && (dir === 1))) { break; } + if (typ.Dir === 2) { + p.errorExpected(typ.Arrow, "'chan'"); + } + _tmp$2 = typ.Arrow; _tmp$3 = arrow; _tmp$4 = arrow; arrow = _tmp$2; typ.Begin = _tmp$3; typ.Arrow = _tmp$4; + _tmp$5 = typ.Dir; _tmp$6 = 2; dir = _tmp$5; typ.Dir = _tmp$6; + _tuple$1 = $assertType(typ.Value, ptrType$19, true); typ = _tuple$1[0]; ok = _tuple$1[1]; + } + if (dir === 1) { + p.errorExpected(arrow, "channel type"); + } + return x$1; + } + return new ast.UnaryExpr.ptr(arrow, 36, p.checkExpr(x$1)); + } else if (_ref === 14) { + pos$1 = p.pos; + p.next(); + x$2 = p.parseUnaryExpr(false); + return new ast.StarExpr.ptr(pos$1, p.checkExprOrType(x$2)); + } + return p.parsePrimaryExpr(lhs); + /* */ } catch(err) { $err = err; return $ifaceNil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseUnaryExpr = function(lhs) { return this.$val.parseUnaryExpr(lhs); }; + parser.ptr.prototype.tokPrec = function() { + var p, tok; + p = this; + tok = p.tok; + if (p.inRhs && (tok === 42)) { + tok = 39; + } + return [tok, new token.Token(tok).Precedence()]; + }; + parser.prototype.tokPrec = function() { return this.$val.tokPrec(); }; + parser.ptr.prototype.parseBinaryExpr = function(lhs, prec1) { + var $deferred = [], $err = null, _tuple, _tuple$1, lhs, op, oprec, p, pos, prec, prec1, x, y; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "BinaryExpr")]]); + } + x = p.parseUnaryExpr(lhs); + _tuple = p.tokPrec(); prec = _tuple[1]; + while (true) { + if (!(prec >= prec1)) { break; } + while (true) { + if (!(true)) { break; } + _tuple$1 = p.tokPrec(); op = _tuple$1[0]; oprec = _tuple$1[1]; + if (!((oprec === prec))) { + break; + } + pos = p.expect(op); + if (lhs) { + p.resolve(x); + lhs = false; + } + y = p.parseBinaryExpr(false, prec + 1 >> 0); + x = new ast.BinaryExpr.ptr(p.checkExpr(x), pos, op, p.checkExpr(y)); + } + prec = prec - (1) >> 0; + } + return x; + /* */ } catch(err) { $err = err; return $ifaceNil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseBinaryExpr = function(lhs, prec1) { return this.$val.parseBinaryExpr(lhs, prec1); }; + parser.ptr.prototype.parseExpr = function(lhs) { + var $deferred = [], $err = null, lhs, p; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "Expression")]]); + } + return p.parseBinaryExpr(lhs, 1); + /* */ } catch(err) { $err = err; return $ifaceNil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseExpr = function(lhs) { return this.$val.parseExpr(lhs); }; + parser.ptr.prototype.parseRhs = function() { + var old, p, x; + p = this; + old = p.inRhs; + p.inRhs = true; + x = p.checkExpr(p.parseExpr(false)); + p.inRhs = old; + return x; + }; + parser.prototype.parseRhs = function() { return this.$val.parseRhs(); }; + parser.ptr.prototype.parseRhsOrType = function() { + var old, p, x; + p = this; + old = p.inRhs; + p.inRhs = true; + x = p.checkExprOrType(p.parseExpr(false)); + p.inRhs = old; + return x; + }; + parser.prototype.parseRhsOrType = function() { return this.$val.parseRhsOrType(); }; + parser.ptr.prototype.parseSimpleStmt = function(mode) { + var $deferred = [], $err = null, _ref, _ref$1, _tmp, _tmp$1, _tuple, arrow, as, colon, isIdent, isRange, label, mode, p, pos, pos$1, s, stmt, tok, x, y, y$1; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "SimpleStmt")]]); + } + x = p.parseLhsList(); + _ref = p.tok; + if (_ref === 47 || _ref === 42 || _ref === 23 || _ref === 24 || _ref === 25 || _ref === 26 || _ref === 27 || _ref === 28 || _ref === 29 || _ref === 30 || _ref === 31 || _ref === 32 || _ref === 33) { + _tmp = p.pos; _tmp$1 = p.tok; pos = _tmp; tok = _tmp$1; + p.next(); + y = sliceType$8.nil; + isRange = false; + if ((mode === 2) && (p.tok === 79) && ((tok === 47) || (tok === 42))) { + pos$1 = p.pos; + p.next(); + y = new sliceType$8([new ast.UnaryExpr.ptr(pos$1, 79, p.parseRhs())]); + isRange = true; + } else { + y = p.parseRhsList(); + } + as = new ast.AssignStmt.ptr(x, pos, tok, y); + if (tok === 47) { + p.shortVarDecl(as, x); + } + return [as, isRange]; + } + if (x.$length > 1) { + p.errorExpected(((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0]).Pos(), "1 expression"); + } + _ref$1 = p.tok; + if (_ref$1 === 58) { + colon = p.pos; + p.next(); + _tuple = $assertType(((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0]), ptrType$3, true); label = _tuple[0]; isIdent = _tuple[1]; + if ((mode === 1) && isIdent) { + stmt = new ast.LabeledStmt.ptr(label, colon, p.parseStmt()); + p.declare(stmt, $ifaceNil, p.labelScope, 6, new sliceType$3([label])); + return [stmt, false]; + } + p.error(colon, "illegal label declaration"); + return [new ast.BadStmt.ptr(((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0]).Pos(), colon + 1 >> 0), false]; + } else if (_ref$1 === 36) { + arrow = p.pos; + p.next(); + y$1 = p.parseRhs(); + return [new ast.SendStmt.ptr(((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0]), arrow, y$1), false]; + } else if (_ref$1 === 37 || _ref$1 === 38) { + s = new ast.IncDecStmt.ptr(((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0]), p.pos, p.tok); + p.next(); + return [s, false]; + } + return [new ast.ExprStmt.ptr(((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])), false]; + /* */ } catch(err) { $err = err; return [$ifaceNil, false]; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseSimpleStmt = function(mode) { return this.$val.parseSimpleStmt(mode); }; + parser.ptr.prototype.parseCallExpr = function(callType) { + var _tuple, _tuple$1, call, callType, isBad, isCall, p, x; + p = this; + x = p.parseRhsOrType(); + _tuple = $assertType(x, ptrType$21, true); call = _tuple[0]; isCall = _tuple[1]; + if (isCall) { + return call; + } + _tuple$1 = $assertType(x, ptrType$10, true); isBad = _tuple$1[1]; + if (!isBad) { + p.error(p.safePos(x.End()), fmt.Sprintf("function must be invoked in %s statement", new sliceType$6([new $String(callType)]))); + } + return ptrType$21.nil; + }; + parser.prototype.parseCallExpr = function(callType) { return this.$val.parseCallExpr(callType); }; + parser.ptr.prototype.parseGoStmt = function() { + var $deferred = [], $err = null, call, p, pos; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "GoStmt")]]); + } + pos = p.expect(72); + call = p.parseCallExpr("go"); + p.expectSemi(); + if (call === ptrType$21.nil) { + return new ast.BadStmt.ptr(pos, pos + 2 >> 0); + } + return new ast.GoStmt.ptr(pos, call); + /* */ } catch(err) { $err = err; return $ifaceNil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseGoStmt = function() { return this.$val.parseGoStmt(); }; + parser.ptr.prototype.parseDeferStmt = function() { + var $deferred = [], $err = null, call, p, pos; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "DeferStmt")]]); + } + pos = p.expect(67); + call = p.parseCallExpr("defer"); + p.expectSemi(); + if (call === ptrType$21.nil) { + return new ast.BadStmt.ptr(pos, pos + 5 >> 0); + } + return new ast.DeferStmt.ptr(pos, call); + /* */ } catch(err) { $err = err; return $ifaceNil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseDeferStmt = function() { return this.$val.parseDeferStmt(); }; + parser.ptr.prototype.parseReturnStmt = function() { + var $deferred = [], $err = null, p, pos, x; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "ReturnStmt")]]); + } + pos = p.pos; + p.expect(80); + x = sliceType$8.nil; + if (!((p.tok === 57)) && !((p.tok === 56))) { + x = p.parseRhsList(); + } + p.expectSemi(); + return new ast.ReturnStmt.ptr(pos, x); + /* */ } catch(err) { $err = err; return ptrType$33.nil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseReturnStmt = function() { return this.$val.parseReturnStmt(); }; + parser.ptr.prototype.parseBranchStmt = function(tok) { + var $deferred = [], $err = null, label, n, p, pos, tok, x, x$1; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "BranchStmt")]]); + } + pos = p.expect(tok); + label = ptrType$3.nil; + if (!((tok === 69)) && (p.tok === 4)) { + label = p.parseIdent(); + n = p.targetStack.$length - 1 >> 0; + (x$1 = p.targetStack, (n < 0 || n >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + n] = $append((x = p.targetStack, ((n < 0 || n >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + n])), label)); + } + p.expectSemi(); + return new ast.BranchStmt.ptr(pos, tok, label); + /* */ } catch(err) { $err = err; return ptrType$34.nil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseBranchStmt = function(tok) { return this.$val.parseBranchStmt(tok); }; + parser.ptr.prototype.makeExpr = function(s, kind) { + var _tuple, es, isExpr, kind, p, s; + p = this; + if ($interfaceIsEqual(s, $ifaceNil)) { + return $ifaceNil; + } + _tuple = $assertType(s, ptrType$35, true); es = _tuple[0]; isExpr = _tuple[1]; + if (isExpr) { + return p.checkExpr(es.X); + } + p.error(s.Pos(), fmt.Sprintf("expected %s, found simple statement (missing parentheses around composite literal?)", new sliceType$6([new $String(kind)]))); + return new ast.BadExpr.ptr(s.Pos(), p.safePos(s.End())); + }; + parser.prototype.makeExpr = function(s, kind) { return this.$val.makeExpr(s, kind); }; + parser.ptr.prototype.parseIfStmt = function() { + var $deferred = [], $err = null, _tuple, body, else_, p, pos, prevLev, s, x; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "IfStmt")]]); + } + pos = p.expect(74); + p.openScope(); + $deferred.push([$methodVal(p, "closeScope"), []]); + s = $ifaceNil; + x = $ifaceNil; + prevLev = p.exprLev; + p.exprLev = -1; + if (p.tok === 57) { + p.next(); + x = p.parseRhs(); + } else { + _tuple = p.parseSimpleStmt(0); s = _tuple[0]; + if (p.tok === 57) { + p.next(); + x = p.parseRhs(); + } else { + x = p.makeExpr(s, "boolean expression"); + s = $ifaceNil; + } + } + p.exprLev = prevLev; + body = p.parseBlockStmt(); + else_ = $ifaceNil; + if (p.tok === 68) { + p.next(); + else_ = p.parseStmt(); + } else { + p.expectSemi(); + } + return new ast.IfStmt.ptr(pos, s, x, body, else_); + /* */ } catch(err) { $err = err; return ptrType$36.nil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseIfStmt = function() { return this.$val.parseIfStmt(); }; + parser.ptr.prototype.parseTypeList = function() { + var $deferred = [], $err = null, list = sliceType$8.nil, p; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "TypeList")]]); + } + list = $append(list, p.parseType()); + while (true) { + if (!(p.tok === 52)) { break; } + p.next(); + list = $append(list, p.parseType()); + } + return list; + /* */ } catch(err) { $err = err; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); return list; } + }; + parser.prototype.parseTypeList = function() { return this.$val.parseTypeList(); }; + parser.ptr.prototype.parseCaseClause = function(typeSwitch) { + var $deferred = [], $err = null, body, colon, list, p, pos, typeSwitch; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "CaseClause")]]); + } + pos = p.pos; + list = sliceType$8.nil; + if (p.tok === 62) { + p.next(); + if (typeSwitch) { + list = p.parseTypeList(); + } else { + list = p.parseRhsList(); + } + } else { + p.expect(66); + } + colon = p.expect(58); + p.openScope(); + body = p.parseStmtList(); + p.closeScope(); + return new ast.CaseClause.ptr(pos, list, colon, body); + /* */ } catch(err) { $err = err; return ptrType$37.nil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseCaseClause = function(typeSwitch) { return this.$val.parseCaseClause(typeSwitch); }; + isTypeSwitchAssert = function(x) { + var _tuple, a, ok, x; + _tuple = $assertType(x, ptrType$28, true); a = _tuple[0]; ok = _tuple[1]; + return ok && $interfaceIsEqual(a.Type, $ifaceNil); + }; + isTypeSwitchGuard = function(s) { + var _ref, s, t, x; + _ref = s; + if ($assertType(_ref, ptrType$35, true)[1]) { + t = _ref.$val; + return isTypeSwitchAssert(t.X); + } else if ($assertType(_ref, ptrType$38, true)[1]) { + t = _ref.$val; + return (t.Lhs.$length === 1) && (t.Tok === 47) && (t.Rhs.$length === 1) && isTypeSwitchAssert((x = t.Rhs, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0]))); + } + return false; + }; + parser.ptr.prototype.parseSwitchStmt = function() { + var $deferred = [], $err = null, _tmp, _tmp$1, _tuple, _tuple$1, body, lbrace, list, p, pos, prevLev, rbrace, s1, s2, typeSwitch; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "SwitchStmt")]]); + } + pos = p.expect(83); + p.openScope(); + $deferred.push([$methodVal(p, "closeScope"), []]); + _tmp = $ifaceNil; _tmp$1 = $ifaceNil; s1 = _tmp; s2 = _tmp$1; + if (!((p.tok === 51))) { + prevLev = p.exprLev; + p.exprLev = -1; + if (!((p.tok === 57))) { + _tuple = p.parseSimpleStmt(0); s2 = _tuple[0]; + } + if (p.tok === 57) { + p.next(); + s1 = s2; + s2 = $ifaceNil; + if (!((p.tok === 51))) { + p.openScope(); + $deferred.push([$methodVal(p, "closeScope"), []]); + _tuple$1 = p.parseSimpleStmt(0); s2 = _tuple$1[0]; + } + } + p.exprLev = prevLev; + } + typeSwitch = isTypeSwitchGuard(s2); + lbrace = p.expect(51); + list = sliceType$10.nil; + while (true) { + if (!((p.tok === 62) || (p.tok === 66))) { break; } + list = $append(list, p.parseCaseClause(typeSwitch)); + } + rbrace = p.expect(56); + p.expectSemi(); + body = new ast.BlockStmt.ptr(lbrace, list, rbrace); + if (typeSwitch) { + return new ast.TypeSwitchStmt.ptr(pos, s1, s2, body); + } + return new ast.SwitchStmt.ptr(pos, s1, p.makeExpr(s2, "switch expression"), body); + /* */ } catch(err) { $err = err; return $ifaceNil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseSwitchStmt = function() { return this.$val.parseSwitchStmt(); }; + parser.ptr.prototype.parseCommClause = function() { + var $deferred = [], $err = null, arrow, as, body, colon, comm, lhs, p, pos, pos$1, rhs, rhs$1, tok; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "CommClause")]]); + } + p.openScope(); + pos = p.pos; + comm = $ifaceNil; + if (p.tok === 62) { + p.next(); + lhs = p.parseLhsList(); + if (p.tok === 36) { + if (lhs.$length > 1) { + p.errorExpected(((0 < 0 || 0 >= lhs.$length) ? $throwRuntimeError("index out of range") : lhs.$array[lhs.$offset + 0]).Pos(), "1 expression"); + } + arrow = p.pos; + p.next(); + rhs = p.parseRhs(); + comm = new ast.SendStmt.ptr(((0 < 0 || 0 >= lhs.$length) ? $throwRuntimeError("index out of range") : lhs.$array[lhs.$offset + 0]), arrow, rhs); + } else { + tok = p.tok; + if ((tok === 42) || (tok === 47)) { + if (lhs.$length > 2) { + p.errorExpected(((0 < 0 || 0 >= lhs.$length) ? $throwRuntimeError("index out of range") : lhs.$array[lhs.$offset + 0]).Pos(), "1 or 2 expressions"); + lhs = $subslice(lhs, 0, 2); + } + pos$1 = p.pos; + p.next(); + rhs$1 = p.parseRhs(); + as = new ast.AssignStmt.ptr(lhs, pos$1, tok, new sliceType$8([rhs$1])); + if (tok === 47) { + p.shortVarDecl(as, lhs); + } + comm = as; + } else { + if (lhs.$length > 1) { + p.errorExpected(((0 < 0 || 0 >= lhs.$length) ? $throwRuntimeError("index out of range") : lhs.$array[lhs.$offset + 0]).Pos(), "1 expression"); + } + comm = new ast.ExprStmt.ptr(((0 < 0 || 0 >= lhs.$length) ? $throwRuntimeError("index out of range") : lhs.$array[lhs.$offset + 0])); + } + } + } else { + p.expect(66); + } + colon = p.expect(58); + body = p.parseStmtList(); + p.closeScope(); + return new ast.CommClause.ptr(pos, comm, colon, body); + /* */ } catch(err) { $err = err; return ptrType$39.nil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseCommClause = function() { return this.$val.parseCommClause(); }; + parser.ptr.prototype.parseSelectStmt = function() { + var $deferred = [], $err = null, body, lbrace, list, p, pos, rbrace; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "SelectStmt")]]); + } + pos = p.expect(81); + lbrace = p.expect(51); + list = sliceType$10.nil; + while (true) { + if (!((p.tok === 62) || (p.tok === 66))) { break; } + list = $append(list, p.parseCommClause()); + } + rbrace = p.expect(56); + p.expectSemi(); + body = new ast.BlockStmt.ptr(lbrace, list, rbrace); + return new ast.SelectStmt.ptr(pos, body); + /* */ } catch(err) { $err = err; return ptrType$40.nil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseSelectStmt = function() { return this.$val.parseSelectStmt(); }; + parser.ptr.prototype.parseForStmt = function() { + var $deferred = [], $err = null, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tuple, _tuple$1, _tuple$2, as, body, isRange, key, p, pos, pos$1, prevLev, s1, s2, s3, value, x, x$1, x$2, x$3, x$4, x$5, x$6, y; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "ForStmt")]]); + } + pos = p.expect(70); + p.openScope(); + $deferred.push([$methodVal(p, "closeScope"), []]); + _tmp = $ifaceNil; _tmp$1 = $ifaceNil; _tmp$2 = $ifaceNil; s1 = _tmp; s2 = _tmp$1; s3 = _tmp$2; + isRange = false; + if (!((p.tok === 51))) { + prevLev = p.exprLev; + p.exprLev = -1; + if (!((p.tok === 57))) { + if (p.tok === 79) { + pos$1 = p.pos; + p.next(); + y = new sliceType$8([new ast.UnaryExpr.ptr(pos$1, 79, p.parseRhs())]); + s2 = new ast.AssignStmt.ptr(sliceType$8.nil, 0, 0, y); + isRange = true; + } else { + _tuple = p.parseSimpleStmt(2); s2 = _tuple[0]; isRange = _tuple[1]; + } + } + if (!isRange && (p.tok === 57)) { + p.next(); + s1 = s2; + s2 = $ifaceNil; + if (!((p.tok === 57))) { + _tuple$1 = p.parseSimpleStmt(0); s2 = _tuple$1[0]; + } + p.expectSemi(); + if (!((p.tok === 51))) { + _tuple$2 = p.parseSimpleStmt(0); s3 = _tuple$2[0]; + } + } + p.exprLev = prevLev; + } + body = p.parseBlockStmt(); + p.expectSemi(); + if (isRange) { + as = $assertType(s2, ptrType$38); + _tmp$3 = $ifaceNil; _tmp$4 = $ifaceNil; key = _tmp$3; value = _tmp$4; + _ref = as.Lhs.$length; + if (_ref === 0) { + } else if (_ref === 1) { + key = (x = as.Lhs, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])); + } else if (_ref === 2) { + _tmp$5 = (x$1 = as.Lhs, ((0 < 0 || 0 >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + 0])); _tmp$6 = (x$2 = as.Lhs, ((1 < 0 || 1 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + 1])); key = _tmp$5; value = _tmp$6; + } else { + p.errorExpected((x$3 = as.Lhs, x$4 = as.Lhs.$length - 1 >> 0, ((x$4 < 0 || x$4 >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + x$4])).Pos(), "at most 2 expressions"); + return new ast.BadStmt.ptr(pos, p.safePos(body.End())); + } + x$6 = $assertType((x$5 = as.Rhs, ((0 < 0 || 0 >= x$5.$length) ? $throwRuntimeError("index out of range") : x$5.$array[x$5.$offset + 0])), ptrType$29).X; + return new ast.RangeStmt.ptr(pos, key, value, as.TokPos, as.Tok, x$6, body); + } + return new ast.ForStmt.ptr(pos, s1, p.makeExpr(s2, "boolean or range expression"), s3, body); + /* */ } catch(err) { $err = err; return $ifaceNil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseForStmt = function() { return this.$val.parseForStmt(); }; + parser.ptr.prototype.parseStmt = function() { + var $deferred = [], $err = null, _ref, _tuple, _tuple$1, isLabeledStmt, p, pos, s = $ifaceNil; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "Statement")]]); + } + _ref = p.tok; + if (_ref === 64 || _ref === 84 || _ref === 85) { + s = new ast.DeclStmt.ptr(p.parseDecl(syncStmt)); + } else if (_ref === 4 || _ref === 5 || _ref === 6 || _ref === 7 || _ref === 8 || _ref === 9 || _ref === 71 || _ref === 49 || _ref === 50 || _ref === 82 || _ref === 12 || _ref === 13 || _ref === 14 || _ref === 17 || _ref === 19 || _ref === 36 || _ref === 43) { + _tuple = p.parseSimpleStmt(1); s = _tuple[0]; + _tuple$1 = $assertType(s, ptrType$41, true); isLabeledStmt = _tuple$1[1]; + if (!isLabeledStmt) { + p.expectSemi(); + } + } else if (_ref === 72) { + s = p.parseGoStmt(); + } else if (_ref === 67) { + s = p.parseDeferStmt(); + } else if (_ref === 80) { + s = p.parseReturnStmt(); + } else if (_ref === 61 || _ref === 65 || _ref === 73 || _ref === 69) { + s = p.parseBranchStmt(p.tok); + } else if (_ref === 51) { + s = p.parseBlockStmt(); + p.expectSemi(); + } else if (_ref === 74) { + s = p.parseIfStmt(); + } else if (_ref === 83) { + s = p.parseSwitchStmt(); + } else if (_ref === 81) { + s = p.parseSelectStmt(); + } else if (_ref === 70) { + s = p.parseForStmt(); + } else if (_ref === 57) { + s = new ast.EmptyStmt.ptr(p.pos); + p.next(); + } else if (_ref === 56) { + s = new ast.EmptyStmt.ptr(p.pos); + } else { + pos = p.pos; + p.errorExpected(pos, "statement"); + syncStmt(p); + s = new ast.BadStmt.ptr(pos, p.pos); + } + return s; + /* */ } catch(err) { $err = err; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); return s; } + }; + parser.prototype.parseStmt = function() { return this.$val.parseStmt(); }; + isValidImport = function(lit) { + var _i, _ref, _rune, _tuple, lit, r, s; + _tuple = strconv.Unquote(lit); s = _tuple[0]; + _ref = s; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + r = _rune[0]; + if (!unicode.IsGraphic(r) || unicode.IsSpace(r) || strings.ContainsRune("!\"#$%&'()*,:;<=>?[\\]^{|}`\xEF\xBF\xBD", r)) { + return false; + } + _i += _rune[1]; + } + return !(s === ""); + }; + parser.ptr.prototype.parseImportSpec = function(doc, param, param$1) { + var $deferred = [], $err = null, _ref, doc, ident, p, param, param$1, path, pos, spec; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "ImportSpec")]]); + } + ident = ptrType$3.nil; + _ref = p.tok; + if (_ref === 53) { + ident = new ast.Ident.ptr(p.pos, ".", ptrType$8.nil); + p.next(); + } else if (_ref === 4) { + ident = p.parseIdent(); + } + pos = p.pos; + path = ""; + if (p.tok === 9) { + path = p.lit; + if (!isValidImport(path)) { + p.error(pos, "invalid import path: " + path); + } + p.next(); + } else { + p.expect(9); + } + p.expectSemi(); + spec = new ast.ImportSpec.ptr(doc, ident, new ast.BasicLit.ptr(pos, 9, path), p.lineComment, 0); + p.imports = $append(p.imports, spec); + return spec; + /* */ } catch(err) { $err = err; return $ifaceNil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseImportSpec = function(doc, param, param$1) { return this.$val.parseImportSpec(doc, param, param$1); }; + parser.ptr.prototype.parseValueSpec = function(doc, keyword, iota) { + var $deferred = [], $err = null, doc, idents, iota, keyword, kind, p, spec, typ, values; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, new token.Token(keyword).String() + "Spec")]]); + } + idents = p.parseIdentList(); + typ = p.tryType(); + values = sliceType$8.nil; + if (p.tok === 42) { + p.next(); + values = p.parseRhsList(); + } + p.expectSemi(); + spec = new ast.ValueSpec.ptr(doc, idents, typ, values, p.lineComment); + kind = 2; + if (keyword === 85) { + kind = 4; + } + p.declare(spec, new $Int(iota), p.topScope, kind, idents); + return spec; + /* */ } catch(err) { $err = err; return $ifaceNil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseValueSpec = function(doc, keyword, iota) { return this.$val.parseValueSpec(doc, keyword, iota); }; + parser.ptr.prototype.parseTypeSpec = function(doc, param, param$1) { + var $deferred = [], $err = null, doc, ident, p, param, param$1, spec; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "TypeSpec")]]); + } + ident = p.parseIdent(); + spec = new ast.TypeSpec.ptr(doc, ident, $ifaceNil, ptrType$2.nil); + p.declare(spec, $ifaceNil, p.topScope, 3, new sliceType$3([ident])); + spec.Type = p.parseType(); + p.expectSemi(); + spec.Comment = p.lineComment; + return spec; + /* */ } catch(err) { $err = err; return $ifaceNil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseTypeSpec = function(doc, param, param$1) { return this.$val.parseTypeSpec(doc, param, param$1); }; + parser.ptr.prototype.parseGenDecl = function(keyword, f) { + var $deferred = [], $err = null, _tmp, _tmp$1, doc, f, iota, keyword, list, lparen, p, pos, rparen; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "GenDecl(" + new token.Token(keyword).String() + ")")]]); + } + doc = p.leadComment; + pos = p.expect(keyword); + _tmp = 0; _tmp$1 = 0; lparen = _tmp; rparen = _tmp$1; + list = sliceType$11.nil; + if (p.tok === 49) { + lparen = p.pos; + p.next(); + iota = 0; + while (true) { + if (!(!((p.tok === 54)) && !((p.tok === 1)))) { break; } + list = $append(list, f(p.leadComment, keyword, iota)); + iota = iota + (1) >> 0; + } + rparen = p.expect(54); + p.expectSemi(); + } else { + list = $append(list, f(ptrType$2.nil, keyword, 0)); + } + return new ast.GenDecl.ptr(doc, pos, keyword, lparen, list, rparen); + /* */ } catch(err) { $err = err; return ptrType$42.nil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseGenDecl = function(keyword, f) { return this.$val.parseGenDecl(keyword, f); }; + parser.ptr.prototype.parseFuncDecl = function() { + var $deferred = [], $err = null, _tuple, body, decl, doc, ident, p, params, pos, recv, results, scope; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "FunctionDecl")]]); + } + doc = p.leadComment; + pos = p.expect(71); + scope = ast.NewScope(p.topScope); + recv = ptrType$14.nil; + if (p.tok === 49) { + recv = p.parseParameters(scope, false); + } + ident = p.parseIdent(); + _tuple = p.parseSignature(scope); params = _tuple[0]; results = _tuple[1]; + body = ptrType$20.nil; + if (p.tok === 51) { + body = p.parseBody(scope); + } + p.expectSemi(); + decl = new ast.FuncDecl.ptr(doc, recv, ident, new ast.FuncType.ptr(pos, params, results), body); + if (recv === ptrType$14.nil) { + if (!(ident.Name === "init")) { + p.declare(decl, $ifaceNil, p.pkgScope, 5, new sliceType$3([ident])); + } + } + return decl; + /* */ } catch(err) { $err = err; return ptrType$43.nil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseFuncDecl = function() { return this.$val.parseFuncDecl(); }; + parser.ptr.prototype.parseDecl = function(sync) { + var $deferred = [], $err = null, _ref, f, p, pos, sync; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "Declaration")]]); + } + f = $throwNilPointerError; + _ref = p.tok; + if (_ref === 64 || _ref === 85) { + f = $methodVal(p, "parseValueSpec"); + } else if (_ref === 84) { + f = $methodVal(p, "parseTypeSpec"); + } else if (_ref === 71) { + return p.parseFuncDecl(); + } else { + pos = p.pos; + p.errorExpected(pos, "declaration"); + sync(p); + return new ast.BadDecl.ptr(pos, p.pos); + } + return p.parseGenDecl(p.tok, f); + /* */ } catch(err) { $err = err; return $ifaceNil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseDecl = function(sync) { return this.$val.parseDecl(sync); }; + parser.ptr.prototype.parseFile = function() { + var $deferred = [], $err = null, _i, _ref, decls, doc, i, ident, ident$1, p, pos, x; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.trace) { + $deferred.push([un, [trace(p, "File")]]); + } + if (!((p.errors.Len() === 0))) { + return ptrType$1.nil; + } + doc = p.leadComment; + pos = p.expect(78); + ident = p.parseIdent(); + if (ident.Name === "_" && !((((p.mode & 16) >>> 0) === 0))) { + p.error(p.pos, "invalid package name _"); + } + p.expectSemi(); + if (!((p.errors.Len() === 0))) { + return ptrType$1.nil; + } + p.openScope(); + p.pkgScope = p.topScope; + decls = sliceType$1.nil; + if (((p.mode & 1) >>> 0) === 0) { + while (true) { + if (!(p.tok === 75)) { break; } + decls = $append(decls, p.parseGenDecl(75, $methodVal(p, "parseImportSpec"))); + } + if (((p.mode & 2) >>> 0) === 0) { + while (true) { + if (!(!((p.tok === 1)))) { break; } + decls = $append(decls, p.parseDecl(syncDecl)); + } + } + } + p.closeScope(); + assert(p.topScope === ptrType$4.nil, "unbalanced scopes"); + assert(p.labelScope === ptrType$4.nil, "unbalanced label scopes"); + i = 0; + _ref = p.unresolved; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + ident$1 = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + assert(ident$1.Obj === unresolved, "object already resolved"); + ident$1.Obj = p.pkgScope.Lookup(ident$1.Name); + if (ident$1.Obj === ptrType$8.nil) { + (x = p.unresolved, (i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i] = ident$1); + i = i + (1) >> 0; + } + _i++; + } + return new ast.File.ptr(doc, pos, ident, decls, p.pkgScope, p.imports, $subslice(p.unresolved, 0, i), p.comments); + /* */ } catch(err) { $err = err; return ptrType$1.nil; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + parser.prototype.parseFile = function() { return this.$val.parseFile(); }; + ptrType$46.methods = [{prop: "init", name: "init", pkg: "go/parser", typ: $funcType([ptrType$45, $String, sliceType, Mode], [], false)}, {prop: "openScope", name: "openScope", pkg: "go/parser", typ: $funcType([], [], false)}, {prop: "closeScope", name: "closeScope", pkg: "go/parser", typ: $funcType([], [], false)}, {prop: "openLabelScope", name: "openLabelScope", pkg: "go/parser", typ: $funcType([], [], false)}, {prop: "closeLabelScope", name: "closeLabelScope", pkg: "go/parser", typ: $funcType([], [], false)}, {prop: "declare", name: "declare", pkg: "go/parser", typ: $funcType([$emptyInterface, $emptyInterface, ptrType$4, ast.ObjKind, sliceType$3], [], true)}, {prop: "shortVarDecl", name: "shortVarDecl", pkg: "go/parser", typ: $funcType([ptrType$38, sliceType$8], [], false)}, {prop: "tryResolve", name: "tryResolve", pkg: "go/parser", typ: $funcType([ast.Expr, $Bool], [], false)}, {prop: "resolve", name: "resolve", pkg: "go/parser", typ: $funcType([ast.Expr], [], false)}, {prop: "printTrace", name: "printTrace", pkg: "go/parser", typ: $funcType([sliceType$6], [], true)}, {prop: "next0", name: "next0", pkg: "go/parser", typ: $funcType([], [], false)}, {prop: "consumeComment", name: "consumeComment", pkg: "go/parser", typ: $funcType([], [ptrType$9, $Int], false)}, {prop: "consumeCommentGroup", name: "consumeCommentGroup", pkg: "go/parser", typ: $funcType([$Int], [ptrType$2, $Int], false)}, {prop: "next", name: "next", pkg: "go/parser", typ: $funcType([], [], false)}, {prop: "error", name: "error", pkg: "go/parser", typ: $funcType([token.Pos, $String], [], false)}, {prop: "errorExpected", name: "errorExpected", pkg: "go/parser", typ: $funcType([token.Pos, $String], [], false)}, {prop: "expect", name: "expect", pkg: "go/parser", typ: $funcType([token.Token], [token.Pos], false)}, {prop: "expectClosing", name: "expectClosing", pkg: "go/parser", typ: $funcType([token.Token, $String], [token.Pos], false)}, {prop: "expectSemi", name: "expectSemi", pkg: "go/parser", typ: $funcType([], [], false)}, {prop: "atComma", name: "atComma", pkg: "go/parser", typ: $funcType([$String], [$Bool], false)}, {prop: "safePos", name: "safePos", pkg: "go/parser", typ: $funcType([token.Pos], [token.Pos], false)}, {prop: "parseIdent", name: "parseIdent", pkg: "go/parser", typ: $funcType([], [ptrType$3], false)}, {prop: "parseIdentList", name: "parseIdentList", pkg: "go/parser", typ: $funcType([], [sliceType$3], false)}, {prop: "parseExprList", name: "parseExprList", pkg: "go/parser", typ: $funcType([$Bool], [sliceType$8], false)}, {prop: "parseLhsList", name: "parseLhsList", pkg: "go/parser", typ: $funcType([], [sliceType$8], false)}, {prop: "parseRhsList", name: "parseRhsList", pkg: "go/parser", typ: $funcType([], [sliceType$8], false)}, {prop: "parseType", name: "parseType", pkg: "go/parser", typ: $funcType([], [ast.Expr], false)}, {prop: "parseTypeName", name: "parseTypeName", pkg: "go/parser", typ: $funcType([], [ast.Expr], false)}, {prop: "parseArrayType", name: "parseArrayType", pkg: "go/parser", typ: $funcType([], [ast.Expr], false)}, {prop: "makeIdentList", name: "makeIdentList", pkg: "go/parser", typ: $funcType([sliceType$8], [sliceType$3], false)}, {prop: "parseFieldDecl", name: "parseFieldDecl", pkg: "go/parser", typ: $funcType([ptrType$4], [ptrType$11], false)}, {prop: "parseStructType", name: "parseStructType", pkg: "go/parser", typ: $funcType([], [ptrType$13], false)}, {prop: "parsePointerType", name: "parsePointerType", pkg: "go/parser", typ: $funcType([], [ptrType$15], false)}, {prop: "tryVarType", name: "tryVarType", pkg: "go/parser", typ: $funcType([$Bool], [ast.Expr], false)}, {prop: "parseVarType", name: "parseVarType", pkg: "go/parser", typ: $funcType([$Bool], [ast.Expr], false)}, {prop: "parseVarList", name: "parseVarList", pkg: "go/parser", typ: $funcType([$Bool], [sliceType$8, ast.Expr], false)}, {prop: "parseParameterList", name: "parseParameterList", pkg: "go/parser", typ: $funcType([ptrType$4, $Bool], [sliceType$9], false)}, {prop: "parseParameters", name: "parseParameters", pkg: "go/parser", typ: $funcType([ptrType$4, $Bool], [ptrType$14], false)}, {prop: "parseResult", name: "parseResult", pkg: "go/parser", typ: $funcType([ptrType$4], [ptrType$14], false)}, {prop: "parseSignature", name: "parseSignature", pkg: "go/parser", typ: $funcType([ptrType$4], [ptrType$14, ptrType$14], false)}, {prop: "parseFuncType", name: "parseFuncType", pkg: "go/parser", typ: $funcType([], [ptrType$16, ptrType$4], false)}, {prop: "parseMethodSpec", name: "parseMethodSpec", pkg: "go/parser", typ: $funcType([ptrType$4], [ptrType$11], false)}, {prop: "parseInterfaceType", name: "parseInterfaceType", pkg: "go/parser", typ: $funcType([], [ptrType$17], false)}, {prop: "parseMapType", name: "parseMapType", pkg: "go/parser", typ: $funcType([], [ptrType$18], false)}, {prop: "parseChanType", name: "parseChanType", pkg: "go/parser", typ: $funcType([], [ptrType$19], false)}, {prop: "tryIdentOrType", name: "tryIdentOrType", pkg: "go/parser", typ: $funcType([], [ast.Expr], false)}, {prop: "tryType", name: "tryType", pkg: "go/parser", typ: $funcType([], [ast.Expr], false)}, {prop: "parseStmtList", name: "parseStmtList", pkg: "go/parser", typ: $funcType([], [sliceType$10], false)}, {prop: "parseBody", name: "parseBody", pkg: "go/parser", typ: $funcType([ptrType$4], [ptrType$20], false)}, {prop: "parseBlockStmt", name: "parseBlockStmt", pkg: "go/parser", typ: $funcType([], [ptrType$20], false)}, {prop: "parseFuncTypeOrLit", name: "parseFuncTypeOrLit", pkg: "go/parser", typ: $funcType([], [ast.Expr], false)}, {prop: "parseOperand", name: "parseOperand", pkg: "go/parser", typ: $funcType([$Bool], [ast.Expr], false)}, {prop: "parseSelector", name: "parseSelector", pkg: "go/parser", typ: $funcType([ast.Expr], [ast.Expr], false)}, {prop: "parseTypeAssertion", name: "parseTypeAssertion", pkg: "go/parser", typ: $funcType([ast.Expr], [ast.Expr], false)}, {prop: "parseIndexOrSlice", name: "parseIndexOrSlice", pkg: "go/parser", typ: $funcType([ast.Expr], [ast.Expr], false)}, {prop: "parseCallOrConversion", name: "parseCallOrConversion", pkg: "go/parser", typ: $funcType([ast.Expr], [ptrType$21], false)}, {prop: "parseElement", name: "parseElement", pkg: "go/parser", typ: $funcType([$Bool], [ast.Expr], false)}, {prop: "parseElementList", name: "parseElementList", pkg: "go/parser", typ: $funcType([], [sliceType$8], false)}, {prop: "parseLiteralValue", name: "parseLiteralValue", pkg: "go/parser", typ: $funcType([ast.Expr], [ast.Expr], false)}, {prop: "checkExpr", name: "checkExpr", pkg: "go/parser", typ: $funcType([ast.Expr], [ast.Expr], false)}, {prop: "checkExprOrType", name: "checkExprOrType", pkg: "go/parser", typ: $funcType([ast.Expr], [ast.Expr], false)}, {prop: "parsePrimaryExpr", name: "parsePrimaryExpr", pkg: "go/parser", typ: $funcType([$Bool], [ast.Expr], false)}, {prop: "parseUnaryExpr", name: "parseUnaryExpr", pkg: "go/parser", typ: $funcType([$Bool], [ast.Expr], false)}, {prop: "tokPrec", name: "tokPrec", pkg: "go/parser", typ: $funcType([], [token.Token, $Int], false)}, {prop: "parseBinaryExpr", name: "parseBinaryExpr", pkg: "go/parser", typ: $funcType([$Bool, $Int], [ast.Expr], false)}, {prop: "parseExpr", name: "parseExpr", pkg: "go/parser", typ: $funcType([$Bool], [ast.Expr], false)}, {prop: "parseRhs", name: "parseRhs", pkg: "go/parser", typ: $funcType([], [ast.Expr], false)}, {prop: "parseRhsOrType", name: "parseRhsOrType", pkg: "go/parser", typ: $funcType([], [ast.Expr], false)}, {prop: "parseSimpleStmt", name: "parseSimpleStmt", pkg: "go/parser", typ: $funcType([$Int], [ast.Stmt, $Bool], false)}, {prop: "parseCallExpr", name: "parseCallExpr", pkg: "go/parser", typ: $funcType([$String], [ptrType$21], false)}, {prop: "parseGoStmt", name: "parseGoStmt", pkg: "go/parser", typ: $funcType([], [ast.Stmt], false)}, {prop: "parseDeferStmt", name: "parseDeferStmt", pkg: "go/parser", typ: $funcType([], [ast.Stmt], false)}, {prop: "parseReturnStmt", name: "parseReturnStmt", pkg: "go/parser", typ: $funcType([], [ptrType$33], false)}, {prop: "parseBranchStmt", name: "parseBranchStmt", pkg: "go/parser", typ: $funcType([token.Token], [ptrType$34], false)}, {prop: "makeExpr", name: "makeExpr", pkg: "go/parser", typ: $funcType([ast.Stmt, $String], [ast.Expr], false)}, {prop: "parseIfStmt", name: "parseIfStmt", pkg: "go/parser", typ: $funcType([], [ptrType$36], false)}, {prop: "parseTypeList", name: "parseTypeList", pkg: "go/parser", typ: $funcType([], [sliceType$8], false)}, {prop: "parseCaseClause", name: "parseCaseClause", pkg: "go/parser", typ: $funcType([$Bool], [ptrType$37], false)}, {prop: "parseSwitchStmt", name: "parseSwitchStmt", pkg: "go/parser", typ: $funcType([], [ast.Stmt], false)}, {prop: "parseCommClause", name: "parseCommClause", pkg: "go/parser", typ: $funcType([], [ptrType$39], false)}, {prop: "parseSelectStmt", name: "parseSelectStmt", pkg: "go/parser", typ: $funcType([], [ptrType$40], false)}, {prop: "parseForStmt", name: "parseForStmt", pkg: "go/parser", typ: $funcType([], [ast.Stmt], false)}, {prop: "parseStmt", name: "parseStmt", pkg: "go/parser", typ: $funcType([], [ast.Stmt], false)}, {prop: "parseImportSpec", name: "parseImportSpec", pkg: "go/parser", typ: $funcType([ptrType$2, token.Token, $Int], [ast.Spec], false)}, {prop: "parseValueSpec", name: "parseValueSpec", pkg: "go/parser", typ: $funcType([ptrType$2, token.Token, $Int], [ast.Spec], false)}, {prop: "parseTypeSpec", name: "parseTypeSpec", pkg: "go/parser", typ: $funcType([ptrType$2, token.Token, $Int], [ast.Spec], false)}, {prop: "parseGenDecl", name: "parseGenDecl", pkg: "go/parser", typ: $funcType([token.Token, parseSpecFunction], [ptrType$42], false)}, {prop: "parseFuncDecl", name: "parseFuncDecl", pkg: "go/parser", typ: $funcType([], [ptrType$43], false)}, {prop: "parseDecl", name: "parseDecl", pkg: "go/parser", typ: $funcType([funcType], [ast.Decl], false)}, {prop: "parseFile", name: "parseFile", pkg: "go/parser", typ: $funcType([], [ptrType$1], false)}]; + parser.init([{prop: "file", name: "file", pkg: "go/parser", typ: ptrType$44, tag: ""}, {prop: "errors", name: "errors", pkg: "go/parser", typ: scanner.ErrorList, tag: ""}, {prop: "scanner", name: "scanner", pkg: "go/parser", typ: scanner.Scanner, tag: ""}, {prop: "mode", name: "mode", pkg: "go/parser", typ: Mode, tag: ""}, {prop: "trace", name: "trace", pkg: "go/parser", typ: $Bool, tag: ""}, {prop: "indent", name: "indent", pkg: "go/parser", typ: $Int, tag: ""}, {prop: "comments", name: "comments", pkg: "go/parser", typ: sliceType$4, tag: ""}, {prop: "leadComment", name: "leadComment", pkg: "go/parser", typ: ptrType$2, tag: ""}, {prop: "lineComment", name: "lineComment", pkg: "go/parser", typ: ptrType$2, tag: ""}, {prop: "pos", name: "pos", pkg: "go/parser", typ: token.Pos, tag: ""}, {prop: "tok", name: "tok", pkg: "go/parser", typ: token.Token, tag: ""}, {prop: "lit", name: "lit", pkg: "go/parser", typ: $String, tag: ""}, {prop: "syncPos", name: "syncPos", pkg: "go/parser", typ: token.Pos, tag: ""}, {prop: "syncCnt", name: "syncCnt", pkg: "go/parser", typ: $Int, tag: ""}, {prop: "exprLev", name: "exprLev", pkg: "go/parser", typ: $Int, tag: ""}, {prop: "inRhs", name: "inRhs", pkg: "go/parser", typ: $Bool, tag: ""}, {prop: "pkgScope", name: "pkgScope", pkg: "go/parser", typ: ptrType$4, tag: ""}, {prop: "topScope", name: "topScope", pkg: "go/parser", typ: ptrType$4, tag: ""}, {prop: "unresolved", name: "unresolved", pkg: "go/parser", typ: sliceType$3, tag: ""}, {prop: "imports", name: "imports", pkg: "go/parser", typ: sliceType$2, tag: ""}, {prop: "labelScope", name: "labelScope", pkg: "go/parser", typ: ptrType$4, tag: ""}, {prop: "targetStack", name: "targetStack", pkg: "go/parser", typ: sliceType$12, tag: ""}]); + bailout.init([]); + parseSpecFunction.init([ptrType$2, token.Token, $Int], [ast.Spec], false); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_parser = function() { while (true) { switch ($s) { case 0: + $r = bytes.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = errors.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = fmt.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = ast.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = scanner.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + $r = token.$init($BLOCKING); /* */ $s = 6; case 6: if ($r && $r.$blocking) { $r = $r(); } + $r = io.$init($BLOCKING); /* */ $s = 7; case 7: if ($r && $r.$blocking) { $r = $r(); } + $r = ioutil.$init($BLOCKING); /* */ $s = 8; case 8: if ($r && $r.$blocking) { $r = $r(); } + $r = os.$init($BLOCKING); /* */ $s = 9; case 9: if ($r && $r.$blocking) { $r = $r(); } + $r = filepath.$init($BLOCKING); /* */ $s = 10; case 10: if ($r && $r.$blocking) { $r = $r(); } + $r = strconv.$init($BLOCKING); /* */ $s = 11; case 11: if ($r && $r.$blocking) { $r = $r(); } + $r = strings.$init($BLOCKING); /* */ $s = 12; case 12: if ($r && $r.$blocking) { $r = $r(); } + $r = unicode.$init($BLOCKING); /* */ $s = 13; case 13: if ($r && $r.$blocking) { $r = $r(); } + unresolved = new ast.Object.ptr(); + /* */ } return; } }; $init_parser.$blocking = true; return $init_parser; + }; + return $pkg; +})(); +$packages["text/tabwriter"] = (function() { + var $pkg = {}, bytes, io, utf8, cell, Writer, osError, sliceType, sliceType$1, ptrType, ptrType$1, arrayType, sliceType$2, sliceType$3, ptrType$2, newline, tabs, vbar, hbar, handlePanic, NewWriter; + bytes = $packages["bytes"]; + io = $packages["io"]; + utf8 = $packages["unicode/utf8"]; + cell = $pkg.cell = $newType(0, $kindStruct, "tabwriter.cell", "cell", "text/tabwriter", function(size_, width_, htab_) { + this.$val = this; + this.size = size_ !== undefined ? size_ : 0; + this.width = width_ !== undefined ? width_ : 0; + this.htab = htab_ !== undefined ? htab_ : false; + }); + Writer = $pkg.Writer = $newType(0, $kindStruct, "tabwriter.Writer", "Writer", "text/tabwriter", function(output_, minwidth_, tabwidth_, padding_, padbytes_, flags_, buf_, pos_, cell_, endChar_, lines_, widths_) { + this.$val = this; + this.output = output_ !== undefined ? output_ : $ifaceNil; + this.minwidth = minwidth_ !== undefined ? minwidth_ : 0; + this.tabwidth = tabwidth_ !== undefined ? tabwidth_ : 0; + this.padding = padding_ !== undefined ? padding_ : 0; + this.padbytes = padbytes_ !== undefined ? padbytes_ : arrayType.zero(); + this.flags = flags_ !== undefined ? flags_ : 0; + this.buf = buf_ !== undefined ? buf_ : new bytes.Buffer.ptr(); + this.pos = pos_ !== undefined ? pos_ : 0; + this.cell = cell_ !== undefined ? cell_ : new cell.ptr(); + this.endChar = endChar_ !== undefined ? endChar_ : 0; + this.lines = lines_ !== undefined ? lines_ : sliceType$2.nil; + this.widths = widths_ !== undefined ? widths_ : sliceType$3.nil; + }); + osError = $pkg.osError = $newType(0, $kindStruct, "tabwriter.osError", "osError", "text/tabwriter", function(err_) { + this.$val = this; + this.err = err_ !== undefined ? err_ : $ifaceNil; + }); + sliceType = $sliceType($Uint8); + sliceType$1 = $sliceType(cell); + ptrType = $ptrType(sliceType$1); + ptrType$1 = $ptrType($error); + arrayType = $arrayType($Uint8, 8); + sliceType$2 = $sliceType(sliceType$1); + sliceType$3 = $sliceType($Int); + ptrType$2 = $ptrType(Writer); + Writer.ptr.prototype.addLine = function() { + var b; + b = this; + b.lines = $append(b.lines, new sliceType$1([])); + }; + Writer.prototype.addLine = function() { return this.$val.addLine(); }; + Writer.ptr.prototype.reset = function() { + var b; + b = this; + b.buf.Reset(); + b.pos = 0; + $copy(b.cell, new cell.ptr(0, 0, false), cell); + b.endChar = 0; + b.lines = $subslice(b.lines, 0, 0); + b.widths = $subslice(b.widths, 0, 0); + b.addLine(); + }; + Writer.prototype.reset = function() { return this.$val.reset(); }; + Writer.ptr.prototype.Init = function(output, minwidth, tabwidth, padding, padchar, flags) { + var _i, _ref, b, flags, i, minwidth, output, padchar, padding, tabwidth, x; + b = this; + if (minwidth < 0 || tabwidth < 0 || padding < 0) { + $panic(new $String("negative minwidth, tabwidth, or padding")); + } + b.output = output; + b.minwidth = minwidth; + b.tabwidth = tabwidth; + b.padding = padding; + _ref = b.padbytes; + _i = 0; + while (true) { + if (!(_i < 8)) { break; } + i = _i; + (x = b.padbytes, (i < 0 || i >= x.length) ? $throwRuntimeError("index out of range") : x[i] = padchar); + _i++; + } + if (padchar === 9) { + flags = flags & ~(4); + } + b.flags = flags; + b.reset(); + return b; + }; + Writer.prototype.Init = function(output, minwidth, tabwidth, padding, padchar, flags) { return this.$val.Init(output, minwidth, tabwidth, padding, padchar, flags); }; + Writer.ptr.prototype.write0 = function(buf) { + var _tuple, b, buf, err, n, x; + b = this; + _tuple = b.output.Write(buf); n = _tuple[0]; err = _tuple[1]; + if (!((n === buf.$length)) && $interfaceIsEqual(err, $ifaceNil)) { + err = io.ErrShortWrite; + } + if (!($interfaceIsEqual(err, $ifaceNil))) { + $panic((x = new osError.ptr(err), new x.constructor.elem(x))); + } + }; + Writer.prototype.write0 = function(buf) { return this.$val.write0(buf); }; + Writer.ptr.prototype.writeN = function(src, n) { + var b, n, src; + b = this; + while (true) { + if (!(n > src.$length)) { break; } + b.write0(src); + n = n - (src.$length) >> 0; + } + b.write0($subslice(src, 0, n)); + }; + Writer.prototype.writeN = function(src, n) { return this.$val.writeN(src, n); }; + Writer.ptr.prototype.writePadding = function(textw, cellw, useTabs) { + var _q, _q$1, b, cellw, n, textw, useTabs; + b = this; + if ((b.padbytes[0] === 9) || useTabs) { + if (b.tabwidth === 0) { + return; + } + cellw = (_q = (((cellw + b.tabwidth >> 0) - 1 >> 0)) / b.tabwidth, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) * b.tabwidth >> 0; + n = cellw - textw >> 0; + if (n < 0) { + $panic(new $String("internal error")); + } + b.writeN(tabs, (_q$1 = (((n + b.tabwidth >> 0) - 1 >> 0)) / b.tabwidth, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))); + return; + } + b.writeN($subslice(new sliceType(b.padbytes), 0), cellw - textw >> 0); + }; + Writer.prototype.writePadding = function(textw, cellw, useTabs) { return this.$val.writePadding(textw, cellw, useTabs); }; + Writer.ptr.prototype.writeLines = function(pos0, line0, line1) { + var _i, _ref, b, c, i, j, line, line0, line1, pos = 0, pos0, useTabs, x, x$1, x$2, x$3; + b = this; + pos = pos0; + i = line0; + while (true) { + if (!(i < line1)) { break; } + line = (x = b.lines, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + useTabs = !((((b.flags & 16) >>> 0) === 0)); + _ref = line; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + j = _i; + c = $clone(((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]), cell); + if (j > 0 && !((((b.flags & 32) >>> 0) === 0))) { + b.write0(vbar); + } + if (c.size === 0) { + if (j < b.widths.$length) { + b.writePadding(c.width, (x$1 = b.widths, ((j < 0 || j >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + j])), useTabs); + } + } else { + useTabs = false; + if (((b.flags & 4) >>> 0) === 0) { + b.write0($subslice(b.buf.Bytes(), pos, (pos + c.size >> 0))); + pos = pos + (c.size) >> 0; + if (j < b.widths.$length) { + b.writePadding(c.width, (x$2 = b.widths, ((j < 0 || j >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + j])), false); + } + } else { + if (j < b.widths.$length) { + b.writePadding(c.width, (x$3 = b.widths, ((j < 0 || j >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + j])), false); + } + b.write0($subslice(b.buf.Bytes(), pos, (pos + c.size >> 0))); + pos = pos + (c.size) >> 0; + } + } + _i++; + } + if ((i + 1 >> 0) === b.lines.$length) { + b.write0($subslice(b.buf.Bytes(), pos, (pos + b.cell.size >> 0))); + pos = pos + (b.cell.size) >> 0; + } else { + b.write0(newline); + } + i = i + (1) >> 0; + } + return pos; + }; + Writer.prototype.writeLines = function(pos0, line0, line1) { return this.$val.writeLines(pos0, line0, line1); }; + Writer.ptr.prototype.format = function(pos0, line0, line1) { + var b, c, column, discardable, line, line0, line1, pos = 0, pos0, this$1, w, width, x, x$1; + b = this; + pos = pos0; + column = b.widths.$length; + this$1 = line0; + while (true) { + if (!(this$1 < line1)) { break; } + line = (x = b.lines, ((this$1 < 0 || this$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + this$1])); + if (column < (line.$length - 1 >> 0)) { + pos = b.writeLines(pos, line0, this$1); + line0 = this$1; + width = b.minwidth; + discardable = true; + while (true) { + if (!(this$1 < line1)) { break; } + line = (x$1 = b.lines, ((this$1 < 0 || this$1 >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + this$1])); + if (column < (line.$length - 1 >> 0)) { + c = $clone(((column < 0 || column >= line.$length) ? $throwRuntimeError("index out of range") : line.$array[line.$offset + column]), cell); + w = c.width + b.padding >> 0; + if (w > width) { + width = w; + } + if (c.width > 0 || c.htab) { + discardable = false; + } + } else { + break; + } + this$1 = this$1 + (1) >> 0; + } + if (discardable && !((((b.flags & 8) >>> 0) === 0))) { + width = 0; + } + b.widths = $append(b.widths, width); + pos = b.format(pos, line0, this$1); + b.widths = $subslice(b.widths, 0, (b.widths.$length - 1 >> 0)); + line0 = this$1; + } + this$1 = this$1 + (1) >> 0; + } + pos = b.writeLines(pos, line0, line1); + return pos; + }; + Writer.prototype.format = function(pos0, line0, line1) { return this.$val.format(pos0, line0, line1); }; + Writer.ptr.prototype.append = function(text) { + var b, text; + b = this; + b.buf.Write(text); + b.cell.size = b.cell.size + (text.$length) >> 0; + }; + Writer.prototype.append = function(text) { return this.$val.append(text); }; + Writer.ptr.prototype.updateWidth = function() { + var b; + b = this; + b.cell.width = b.cell.width + (utf8.RuneCount($subslice(b.buf.Bytes(), b.pos, b.buf.Len()))) >> 0; + b.pos = b.buf.Len(); + }; + Writer.prototype.updateWidth = function() { return this.$val.updateWidth(); }; + Writer.ptr.prototype.startEscape = function(ch) { + var _ref, b, ch; + b = this; + _ref = ch; + if (_ref === 255) { + b.endChar = 255; + } else if (_ref === 60) { + b.endChar = 62; + } else if (_ref === 38) { + b.endChar = 59; + } + }; + Writer.prototype.startEscape = function(ch) { return this.$val.startEscape(ch); }; + Writer.ptr.prototype.endEscape = function() { + var _ref, b; + b = this; + _ref = b.endChar; + if (_ref === 255) { + b.updateWidth(); + if (((b.flags & 2) >>> 0) === 0) { + b.cell.width = b.cell.width - (2) >> 0; + } + } else if (_ref === 62) { + } else if (_ref === 59) { + b.cell.width = b.cell.width + (1) >> 0; + } + b.pos = b.buf.Len(); + b.endChar = 0; + }; + Writer.prototype.endEscape = function() { return this.$val.endEscape(); }; + Writer.ptr.prototype.terminateCell = function(htab) { + var b, htab, line, x, x$1; + b = this; + b.cell.htab = htab; + line = new ptrType(function() { return (x$1 = b.lines.$length - 1 >> 0, ((x$1 < 0 || x$1 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + x$1])); }, function($v) { (x = b.lines.$length - 1 >> 0, (x < 0 || x >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + x] = $v); }, b.lines); + line.$set($append(line.$get(), b.cell)); + $copy(b.cell, new cell.ptr(0, 0, false), cell); + return line.$get().$length; + }; + Writer.prototype.terminateCell = function(htab) { return this.$val.terminateCell(htab); }; + handlePanic = function(err, op) { + var _tuple, e, err, nerr, ok, op; + e = $recover(); + if (!($interfaceIsEqual(e, $ifaceNil))) { + _tuple = $assertType(e, osError, true); nerr = $clone(_tuple[0], osError); ok = _tuple[1]; + if (ok) { + err.$set(nerr.err); + return; + } + $panic(new $String("tabwriter: panic during " + op)); + } + }; + Writer.ptr.prototype.Flush = function() { + var $deferred = [], $err = null, b, err = $ifaceNil; + /* */ try { $deferFrames.push($deferred); + b = this; + $deferred.push([$methodVal(b, "reset"), []]); + $deferred.push([handlePanic, [new ptrType$1(function() { return err; }, function($v) { err = $v; }), "Flush"]]); + if (b.cell.size > 0) { + if (!((b.endChar === 0))) { + b.endEscape(); + } + b.terminateCell(false); + } + b.format(0, 0, b.lines.$length); + return err; + /* */ } catch(err) { $err = err; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); return err; } + }; + Writer.prototype.Flush = function() { return this.$val.Flush(); }; + Writer.ptr.prototype.Write = function(buf) { + var $deferred = [], $err = null, _i, _ref, _ref$1, b, buf, ch, err = $ifaceNil, i, j, n = 0, ncells; + /* */ try { $deferFrames.push($deferred); + b = this; + $deferred.push([handlePanic, [new ptrType$1(function() { return err; }, function($v) { err = $v; }), "Write"]]); + n = 0; + _ref = buf; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + ch = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (b.endChar === 0) { + _ref$1 = ch; + if (_ref$1 === 9 || _ref$1 === 11 || _ref$1 === 10 || _ref$1 === 12) { + b.append($subslice(buf, n, i)); + b.updateWidth(); + n = i + 1 >> 0; + ncells = b.terminateCell(ch === 9); + if ((ch === 10) || (ch === 12)) { + b.addLine(); + if ((ch === 12) || (ncells === 1)) { + err = b.Flush(); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [n, err]; + } + if ((ch === 12) && !((((b.flags & 32) >>> 0) === 0))) { + b.write0(hbar); + } + } + } + } else if (_ref$1 === 255) { + b.append($subslice(buf, n, i)); + b.updateWidth(); + n = i; + if (!((((b.flags & 2) >>> 0) === 0))) { + n = n + (1) >> 0; + } + b.startEscape(255); + } else if (_ref$1 === 60 || _ref$1 === 38) { + if (!((((b.flags & 1) >>> 0) === 0))) { + b.append($subslice(buf, n, i)); + b.updateWidth(); + n = i; + b.startEscape(ch); + } + } + } else { + if (ch === b.endChar) { + j = i + 1 >> 0; + if ((ch === 255) && !((((b.flags & 2) >>> 0) === 0))) { + j = i; + } + b.append($subslice(buf, n, j)); + n = i + 1 >> 0; + b.endEscape(); + } + } + _i++; + } + b.append($subslice(buf, n)); + n = buf.$length; + return [n, err]; + /* */ } catch(err) { $err = err; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); return [n, err]; } + }; + Writer.prototype.Write = function(buf) { return this.$val.Write(buf); }; + NewWriter = $pkg.NewWriter = function(output, minwidth, tabwidth, padding, padchar, flags) { + var flags, minwidth, output, padchar, padding, tabwidth; + return new Writer.ptr().Init(output, minwidth, tabwidth, padding, padchar, flags); + }; + ptrType$2.methods = [{prop: "addLine", name: "addLine", pkg: "text/tabwriter", typ: $funcType([], [], false)}, {prop: "reset", name: "reset", pkg: "text/tabwriter", typ: $funcType([], [], false)}, {prop: "Init", name: "Init", pkg: "", typ: $funcType([io.Writer, $Int, $Int, $Int, $Uint8, $Uint], [ptrType$2], false)}, {prop: "dump", name: "dump", pkg: "text/tabwriter", typ: $funcType([], [], false)}, {prop: "write0", name: "write0", pkg: "text/tabwriter", typ: $funcType([sliceType], [], false)}, {prop: "writeN", name: "writeN", pkg: "text/tabwriter", typ: $funcType([sliceType, $Int], [], false)}, {prop: "writePadding", name: "writePadding", pkg: "text/tabwriter", typ: $funcType([$Int, $Int, $Bool], [], false)}, {prop: "writeLines", name: "writeLines", pkg: "text/tabwriter", typ: $funcType([$Int, $Int, $Int], [$Int], false)}, {prop: "format", name: "format", pkg: "text/tabwriter", typ: $funcType([$Int, $Int, $Int], [$Int], false)}, {prop: "append", name: "append", pkg: "text/tabwriter", typ: $funcType([sliceType], [], false)}, {prop: "updateWidth", name: "updateWidth", pkg: "text/tabwriter", typ: $funcType([], [], false)}, {prop: "startEscape", name: "startEscape", pkg: "text/tabwriter", typ: $funcType([$Uint8], [], false)}, {prop: "endEscape", name: "endEscape", pkg: "text/tabwriter", typ: $funcType([], [], false)}, {prop: "terminateCell", name: "terminateCell", pkg: "text/tabwriter", typ: $funcType([$Bool], [$Int], false)}, {prop: "Flush", name: "Flush", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}]; + cell.init([{prop: "size", name: "size", pkg: "text/tabwriter", typ: $Int, tag: ""}, {prop: "width", name: "width", pkg: "text/tabwriter", typ: $Int, tag: ""}, {prop: "htab", name: "htab", pkg: "text/tabwriter", typ: $Bool, tag: ""}]); + Writer.init([{prop: "output", name: "output", pkg: "text/tabwriter", typ: io.Writer, tag: ""}, {prop: "minwidth", name: "minwidth", pkg: "text/tabwriter", typ: $Int, tag: ""}, {prop: "tabwidth", name: "tabwidth", pkg: "text/tabwriter", typ: $Int, tag: ""}, {prop: "padding", name: "padding", pkg: "text/tabwriter", typ: $Int, tag: ""}, {prop: "padbytes", name: "padbytes", pkg: "text/tabwriter", typ: arrayType, tag: ""}, {prop: "flags", name: "flags", pkg: "text/tabwriter", typ: $Uint, tag: ""}, {prop: "buf", name: "buf", pkg: "text/tabwriter", typ: bytes.Buffer, tag: ""}, {prop: "pos", name: "pos", pkg: "text/tabwriter", typ: $Int, tag: ""}, {prop: "cell", name: "cell", pkg: "text/tabwriter", typ: cell, tag: ""}, {prop: "endChar", name: "endChar", pkg: "text/tabwriter", typ: $Uint8, tag: ""}, {prop: "lines", name: "lines", pkg: "text/tabwriter", typ: sliceType$2, tag: ""}, {prop: "widths", name: "widths", pkg: "text/tabwriter", typ: sliceType$3, tag: ""}]); + osError.init([{prop: "err", name: "err", pkg: "text/tabwriter", typ: $error, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_tabwriter = function() { while (true) { switch ($s) { case 0: + $r = bytes.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = io.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = utf8.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + newline = new sliceType([10]); + tabs = new sliceType($stringToBytes("\t\t\t\t\t\t\t\t")); + vbar = new sliceType([124]); + hbar = new sliceType($stringToBytes("---\n")); + /* */ } return; } }; $init_tabwriter.$blocking = true; return $init_tabwriter; + }; + return $pkg; +})(); +$packages["go/printer"] = (function() { + var $pkg = {}, bytes, fmt, ast, token, io, os, strconv, strings, testing, tabwriter, unicode, utf8, exprListMode, whiteSpace, pmode, commentInfo, printer, trimmer, Mode, Config, CommentedNode, sliceType, sliceType$1, ptrType, sliceType$2, sliceType$3, ptrType$1, ptrType$2, ptrType$3, sliceType$4, ptrType$4, ptrType$5, sliceType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$9, ptrType$10, ptrType$11, ptrType$12, ptrType$13, ptrType$14, ptrType$15, ptrType$16, ptrType$17, ptrType$18, ptrType$19, ptrType$20, ptrType$21, ptrType$22, ptrType$23, ptrType$24, ptrType$25, ptrType$26, ptrType$27, ptrType$28, ptrType$29, ptrType$30, ptrType$31, ptrType$32, ptrType$33, ptrType$34, ptrType$35, ptrType$36, ptrType$37, ptrType$38, ptrType$39, ptrType$40, ptrType$41, ptrType$42, ptrType$43, ptrType$44, ptrType$45, ptrType$46, sliceType$6, ptrType$47, ptrType$48, ptrType$49, ptrType$50, ptrType$51, ptrType$52, sliceType$7, ptrType$53, ptrType$54, ptrType$55, sliceType$8, sliceType$9, ptrType$56, ptrType$57, sliceType$10, ptrType$58, mapType, ptrType$59, ptrType$60, aNewline, identListSize, walkBinary, cutoff, diffPrec, reduceDepth, isBinary, isTypeName, stripParens, stripParensAlways, keepTypeColumn, declToken, isBlank, commonPrefix, trimRight, stripCommonPrefix, nlimit, mayCombine, getDoc; + bytes = $packages["bytes"]; + fmt = $packages["fmt"]; + ast = $packages["go/ast"]; + token = $packages["go/token"]; + io = $packages["io"]; + os = $packages["os"]; + strconv = $packages["strconv"]; + strings = $packages["strings"]; + testing = $packages["testing"]; + tabwriter = $packages["text/tabwriter"]; + unicode = $packages["unicode"]; + utf8 = $packages["unicode/utf8"]; + exprListMode = $pkg.exprListMode = $newType(4, $kindUint, "printer.exprListMode", "exprListMode", "go/printer", null); + whiteSpace = $pkg.whiteSpace = $newType(1, $kindUint8, "printer.whiteSpace", "whiteSpace", "go/printer", null); + pmode = $pkg.pmode = $newType(4, $kindInt, "printer.pmode", "pmode", "go/printer", null); + commentInfo = $pkg.commentInfo = $newType(0, $kindStruct, "printer.commentInfo", "commentInfo", "go/printer", function(cindex_, comment_, commentOffset_, commentNewline_) { + this.$val = this; + this.cindex = cindex_ !== undefined ? cindex_ : 0; + this.comment = comment_ !== undefined ? comment_ : ptrType.nil; + this.commentOffset = commentOffset_ !== undefined ? commentOffset_ : 0; + this.commentNewline = commentNewline_ !== undefined ? commentNewline_ : false; + }); + printer = $pkg.printer = $newType(0, $kindStruct, "printer.printer", "printer", "go/printer", function(Config_, fset_, output_, indent_, mode_, impliedSemi_, lastTok_, prevOpen_, wsbuf_, pos_, out_, last_, linePtr_, comments_, useNodeComments_, commentInfo_, nodeSizes_, cachedPos_, cachedLine_) { + this.$val = this; + this.Config = Config_ !== undefined ? Config_ : new Config.ptr(); + this.fset = fset_ !== undefined ? fset_ : ptrType$57.nil; + this.output = output_ !== undefined ? output_ : sliceType.nil; + this.indent = indent_ !== undefined ? indent_ : 0; + this.mode = mode_ !== undefined ? mode_ : 0; + this.impliedSemi = impliedSemi_ !== undefined ? impliedSemi_ : false; + this.lastTok = lastTok_ !== undefined ? lastTok_ : 0; + this.prevOpen = prevOpen_ !== undefined ? prevOpen_ : 0; + this.wsbuf = wsbuf_ !== undefined ? wsbuf_ : sliceType$7.nil; + this.pos = pos_ !== undefined ? pos_ : new token.Position.ptr(); + this.out = out_ !== undefined ? out_ : new token.Position.ptr(); + this.last = last_ !== undefined ? last_ : new token.Position.ptr(); + this.linePtr = linePtr_ !== undefined ? linePtr_ : ptrType$6.nil; + this.comments = comments_ !== undefined ? comments_ : sliceType$2.nil; + this.useNodeComments = useNodeComments_ !== undefined ? useNodeComments_ : false; + this.commentInfo = commentInfo_ !== undefined ? commentInfo_ : new commentInfo.ptr(); + this.nodeSizes = nodeSizes_ !== undefined ? nodeSizes_ : false; + this.cachedPos = cachedPos_ !== undefined ? cachedPos_ : 0; + this.cachedLine = cachedLine_ !== undefined ? cachedLine_ : 0; + }); + trimmer = $pkg.trimmer = $newType(0, $kindStruct, "printer.trimmer", "trimmer", "go/printer", function(output_, state_, space_) { + this.$val = this; + this.output = output_ !== undefined ? output_ : $ifaceNil; + this.state = state_ !== undefined ? state_ : 0; + this.space = space_ !== undefined ? space_ : sliceType.nil; + }); + Mode = $pkg.Mode = $newType(4, $kindUint, "printer.Mode", "Mode", "go/printer", null); + Config = $pkg.Config = $newType(0, $kindStruct, "printer.Config", "Config", "go/printer", function(Mode_, Tabwidth_, Indent_) { + this.$val = this; + this.Mode = Mode_ !== undefined ? Mode_ : 0; + this.Tabwidth = Tabwidth_ !== undefined ? Tabwidth_ : 0; + this.Indent = Indent_ !== undefined ? Indent_ : 0; + }); + CommentedNode = $pkg.CommentedNode = $newType(0, $kindStruct, "printer.CommentedNode", "CommentedNode", "go/printer", function(Node_, Comments_) { + this.$val = this; + this.Node = Node_ !== undefined ? Node_ : $ifaceNil; + this.Comments = Comments_ !== undefined ? Comments_ : sliceType$2.nil; + }); + sliceType = $sliceType($Uint8); + sliceType$1 = $sliceType($emptyInterface); + ptrType = $ptrType(ast.CommentGroup); + sliceType$2 = $sliceType(ptrType); + sliceType$3 = $sliceType(ast.Expr); + ptrType$1 = $ptrType(ast.KeyValueExpr); + ptrType$2 = $ptrType(ast.FieldList); + ptrType$3 = $ptrType(ast.Ident); + sliceType$4 = $sliceType(ptrType$3); + ptrType$4 = $ptrType(ast.BasicLit); + ptrType$5 = $ptrType(ast.Comment); + sliceType$5 = $sliceType(ptrType$5); + ptrType$6 = $ptrType($Int); + ptrType$7 = $ptrType(ast.FuncType); + ptrType$8 = $ptrType(ast.BinaryExpr); + ptrType$9 = $ptrType(ast.StarExpr); + ptrType$10 = $ptrType(ast.UnaryExpr); + ptrType$11 = $ptrType(ast.BadExpr); + ptrType$12 = $ptrType(ast.FuncLit); + ptrType$13 = $ptrType(ast.ParenExpr); + ptrType$14 = $ptrType(ast.SelectorExpr); + ptrType$15 = $ptrType(ast.TypeAssertExpr); + ptrType$16 = $ptrType(ast.IndexExpr); + ptrType$17 = $ptrType(ast.SliceExpr); + ptrType$18 = $ptrType(ast.CallExpr); + ptrType$19 = $ptrType(ast.CompositeLit); + ptrType$20 = $ptrType(ast.Ellipsis); + ptrType$21 = $ptrType(ast.ArrayType); + ptrType$22 = $ptrType(ast.StructType); + ptrType$23 = $ptrType(ast.InterfaceType); + ptrType$24 = $ptrType(ast.MapType); + ptrType$25 = $ptrType(ast.ChanType); + ptrType$26 = $ptrType(ast.EmptyStmt); + ptrType$27 = $ptrType(ast.LabeledStmt); + ptrType$28 = $ptrType(ast.BadStmt); + ptrType$29 = $ptrType(ast.DeclStmt); + ptrType$30 = $ptrType(ast.ExprStmt); + ptrType$31 = $ptrType(ast.SendStmt); + ptrType$32 = $ptrType(ast.IncDecStmt); + ptrType$33 = $ptrType(ast.AssignStmt); + ptrType$34 = $ptrType(ast.GoStmt); + ptrType$35 = $ptrType(ast.DeferStmt); + ptrType$36 = $ptrType(ast.ReturnStmt); + ptrType$37 = $ptrType(ast.BranchStmt); + ptrType$38 = $ptrType(ast.BlockStmt); + ptrType$39 = $ptrType(ast.IfStmt); + ptrType$40 = $ptrType(ast.CaseClause); + ptrType$41 = $ptrType(ast.SwitchStmt); + ptrType$42 = $ptrType(ast.TypeSwitchStmt); + ptrType$43 = $ptrType(ast.CommClause); + ptrType$44 = $ptrType(ast.SelectStmt); + ptrType$45 = $ptrType(ast.ForStmt); + ptrType$46 = $ptrType(ast.RangeStmt); + sliceType$6 = $sliceType($Bool); + ptrType$47 = $ptrType(ast.ValueSpec); + ptrType$48 = $ptrType(ast.ImportSpec); + ptrType$49 = $ptrType(ast.TypeSpec); + ptrType$50 = $ptrType(ast.BadDecl); + ptrType$51 = $ptrType(ast.GenDecl); + ptrType$52 = $ptrType(ast.FuncDecl); + sliceType$7 = $sliceType(whiteSpace); + ptrType$53 = $ptrType(ast.Field); + ptrType$54 = $ptrType(ast.File); + ptrType$55 = $ptrType(CommentedNode); + sliceType$8 = $sliceType(ast.Stmt); + sliceType$9 = $sliceType(ast.Decl); + ptrType$56 = $ptrType(tabwriter.Writer); + ptrType$57 = $ptrType(token.FileSet); + sliceType$10 = $sliceType(ptrType$53); + ptrType$58 = $ptrType(Config); + mapType = $mapType(ast.Node, $Int); + ptrType$59 = $ptrType(printer); + ptrType$60 = $ptrType(trimmer); + printer.ptr.prototype.linebreak = function(line, min, ws, newSection) { + var line, min, n, newSection, p, printedBreak = false, ws; + p = this; + n = nlimit(line - p.pos.Line >> 0); + if (n < min) { + n = min; + } + if (n > 0) { + p.print(new sliceType$1([new whiteSpace(ws)])); + if (newSection) { + p.print(new sliceType$1([new whiteSpace(12)])); + n = n - (1) >> 0; + } + while (true) { + if (!(n > 0)) { break; } + p.print(new sliceType$1([new whiteSpace(10)])); + n = n - (1) >> 0; + } + printedBreak = true; + } + return printedBreak; + }; + printer.prototype.linebreak = function(line, min, ws, newSection) { return this.$val.linebreak(line, min, ws, newSection); }; + printer.ptr.prototype.setComment = function(g) { + var g, p, x, x$1; + p = this; + if (g === ptrType.nil || !p.useNodeComments) { + return; + } + if (p.comments === sliceType$2.nil) { + p.comments = $makeSlice(sliceType$2, 1); + } else if (p.commentInfo.cindex < p.comments.$length) { + p.flush(p.posFor((x = g.List, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])).Pos()), 0); + p.comments = $subslice(p.comments, 0, 1); + p.internalError(new sliceType$1([new $String("setComment found pending comments")])); + } + (x$1 = p.comments, (0 < 0 || 0 >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + 0] = g); + p.commentInfo.cindex = 0; + if (p.commentInfo.commentOffset === 1073741824) { + p.nextComment(); + } + }; + printer.prototype.setComment = function(g) { return this.$val.setComment(g); }; + printer.ptr.prototype.identList = function(list, indent) { + var _i, _ref, i, indent, list, mode, p, x, xlist; + p = this; + xlist = $makeSlice(sliceType$3, list.$length); + _ref = list; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + x = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + (i < 0 || i >= xlist.$length) ? $throwRuntimeError("index out of range") : xlist.$array[xlist.$offset + i] = x; + _i++; + } + mode = 0; + if (!indent) { + mode = 2; + } + p.exprList(0, xlist, 1, mode, 0); + }; + printer.prototype.identList = function(list, indent) { return this.$val.identList(list, indent); }; + printer.ptr.prototype.exprList = function(prev0, list, depth, mode, next0) { + var _i, _i$1, _ref, _ref$1, _tuple, depth, endLine, i, i$1, isPair, line, list, mode, needsBlank, needsLinebreak, next, next0, p, pair, prev, prev0, prevBreak, prevLine, prevSize, ratio, size, useFF, ws, x, x$1, x$2; + p = this; + if (list.$length === 0) { + return; + } + prev = $clone(p.posFor(prev0), token.Position); + next = $clone(p.posFor(next0), token.Position); + line = p.lineFor(((0 < 0 || 0 >= list.$length) ? $throwRuntimeError("index out of range") : list.$array[list.$offset + 0]).Pos()); + endLine = p.lineFor((x = list.$length - 1 >> 0, ((x < 0 || x >= list.$length) ? $throwRuntimeError("index out of range") : list.$array[list.$offset + x])).End()); + if (prev.IsValid() && (prev.Line === line) && (line === endLine)) { + _ref = list; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + x$1 = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (i > 0) { + p.print(new sliceType$1([new token.Pos(x$1.Pos()), new token.Token(52), new whiteSpace(32)])); + } + p.expr0(x$1, depth); + _i++; + } + return; + } + ws = 0; + if (((mode & 2) >>> 0) === 0) { + ws = 62; + } + prevBreak = -1; + if (prev.IsValid() && prev.Line < line && p.linebreak(line, 0, ws, true)) { + ws = 0; + prevBreak = 0; + } + size = 0; + prevLine = prev.Line; + _ref$1 = list; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i$1 = _i$1; + x$2 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i$1]); + line = p.lineFor(x$2.Pos()); + useFF = true; + prevSize = size; + size = p.nodeSize(x$2, 1000000); + _tuple = $assertType(x$2, ptrType$1, true); pair = _tuple[0]; isPair = _tuple[1]; + if (size <= 1000000 && prev.IsValid() && next.IsValid()) { + if (isPair) { + size = p.nodeSize(pair.Key, 1000000); + } + } else { + size = 0; + } + if (prevSize > 0 && size > 0) { + if (prevSize <= 20 && size <= 20) { + useFF = false; + } else { + ratio = size / prevSize; + useFF = ratio <= 0.25 || 4 <= ratio; + } + } + needsLinebreak = 0 < prevLine && prevLine < line; + if (i$1 > 0) { + if (!needsLinebreak) { + p.print(new sliceType$1([new token.Pos(x$2.Pos())])); + } + p.print(new sliceType$1([new token.Token(52)])); + needsBlank = true; + if (needsLinebreak) { + if (p.linebreak(line, 0, ws, useFF || (prevBreak + 1 >> 0) < i$1)) { + ws = 0; + prevBreak = i$1; + needsBlank = false; + } + } + if (needsBlank) { + p.print(new sliceType$1([new whiteSpace(32)])); + } + } + if (list.$length > 1 && isPair && size > 0 && needsLinebreak) { + p.expr(pair.Key); + p.print(new sliceType$1([new token.Pos(pair.Colon), new token.Token(58), new whiteSpace(11)])); + p.expr(pair.Value); + } else { + p.expr0(x$2, depth); + } + prevLine = line; + _i$1++; + } + if (!((((mode & 1) >>> 0) === 0)) && next.IsValid() && p.pos.Line < next.Line) { + p.print(new sliceType$1([new token.Token(52)])); + if ((ws === 0) && (((mode & 2) >>> 0) === 0)) { + p.print(new sliceType$1([new whiteSpace(60)])); + } + p.print(new sliceType$1([new whiteSpace(12)])); + return; + } + if ((ws === 0) && (((mode & 2) >>> 0) === 0)) { + p.print(new sliceType$1([new whiteSpace(60)])); + } + }; + printer.prototype.exprList = function(prev0, list, depth, mode, next0) { return this.$val.exprList(prev0, list, depth, mode, next0); }; + printer.ptr.prototype.parameters = function(fields) { + var _i, _ref, closing, fields, i, needsLinebreak, p, par, parLineBeg, parLineEnd, prevLine, ws, x; + p = this; + p.print(new sliceType$1([new token.Pos(fields.Opening), new token.Token(49)])); + if (fields.List.$length > 0) { + prevLine = p.lineFor(fields.Opening); + ws = 62; + _ref = fields.List; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + par = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + parLineBeg = 0; + if (par.Names.$length > 0) { + parLineBeg = p.lineFor((x = par.Names, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])).Pos()); + } else { + parLineBeg = p.lineFor(par.Type.Pos()); + } + parLineEnd = p.lineFor(par.Type.End()); + needsLinebreak = 0 < prevLine && prevLine < parLineBeg; + if (i > 0) { + if (!needsLinebreak) { + p.print(new sliceType$1([new token.Pos(par.Pos())])); + } + p.print(new sliceType$1([new token.Token(52)])); + } + if (needsLinebreak && p.linebreak(parLineBeg, 0, ws, true)) { + ws = 0; + } else if (i > 0) { + p.print(new sliceType$1([new whiteSpace(32)])); + } + if (par.Names.$length > 0) { + p.identList(par.Names, ws === 62); + p.print(new sliceType$1([new whiteSpace(32)])); + } + p.expr(stripParensAlways(par.Type)); + prevLine = parLineEnd; + _i++; + } + closing = p.lineFor(fields.Closing); + if (0 < prevLine && prevLine < closing) { + p.print(new sliceType$1([new token.Token(52)])); + p.linebreak(closing, 0, 0, true); + } + if (ws === 0) { + p.print(new sliceType$1([new whiteSpace(60)])); + } + } + p.print(new sliceType$1([new token.Pos(fields.Closing), new token.Token(54)])); + }; + printer.prototype.parameters = function(fields) { return this.$val.parameters(fields); }; + printer.ptr.prototype.signature = function(params, result) { + var n, p, params, result, x, x$1; + p = this; + if (!(params === ptrType$2.nil)) { + p.parameters(params); + } else { + p.print(new sliceType$1([new token.Token(49), new token.Token(54)])); + } + n = result.NumFields(); + if (n > 0) { + p.print(new sliceType$1([new whiteSpace(32)])); + if ((n === 1) && (x = result.List, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])).Names === sliceType$4.nil) { + p.expr(stripParensAlways((x$1 = result.List, ((0 < 0 || 0 >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + 0])).Type)); + return; + } + p.parameters(result); + } + }; + printer.prototype.signature = function(params, result) { return this.$val.signature(params, result); }; + identListSize = function(list, maxSize) { + var _i, _ref, i, list, maxSize, size = 0, x; + _ref = list; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + x = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (i > 0) { + size = size + (2) >> 0; + } + size = size + (utf8.RuneCountInString(x.Name)) >> 0; + if (size >= maxSize) { + break; + } + _i++; + } + return size; + }; + printer.ptr.prototype.isOneLineFieldList = function(list) { + var f, list, namesSize, p, typeSize; + p = this; + if (!((list.$length === 1))) { + return false; + } + f = ((0 < 0 || 0 >= list.$length) ? $throwRuntimeError("index out of range") : list.$array[list.$offset + 0]); + if (!(f.Tag === ptrType$4.nil) || !(f.Comment === ptrType.nil)) { + return false; + } + namesSize = identListSize(f.Names, 30); + if (namesSize > 0) { + namesSize = 1; + } + typeSize = p.nodeSize(f.Type, 30); + return (namesSize + typeSize >> 0) <= 30; + }; + printer.prototype.isOneLineFieldList = function(list) { return this.$val.isOneLineFieldList(list); }; + printer.ptr.prototype.setLineComment = function(text) { + var p, text; + p = this; + p.setComment(new ast.CommentGroup.ptr(new sliceType$5([new ast.Comment.ptr(0, text)]))); + }; + printer.prototype.setLineComment = function(text) { return this.$val.setLineComment(text); }; + printer.ptr.prototype.fieldList = function(fields, isStruct, isIncomplete) { + var _i, _i$1, _i$2, _ref, _ref$1, _ref$2, _tuple, extraTabs, f, f$1, f$2, fields, ftyp, hasComments, i, i$1, i$2, isFtyp, isIncomplete, isStruct, lbrace, line, line$1, list, p, rbrace, sep, srcIsOneLine, x, x$1; + p = this; + lbrace = fields.Opening; + list = fields.List; + rbrace = fields.Closing; + hasComments = isIncomplete || p.commentBefore(p.posFor(rbrace)); + srcIsOneLine = new token.Pos(lbrace).IsValid() && new token.Pos(rbrace).IsValid() && (p.lineFor(lbrace) === p.lineFor(rbrace)); + if (!hasComments && srcIsOneLine) { + if (list.$length === 0) { + p.print(new sliceType$1([new token.Pos(lbrace), new token.Token(51), new token.Pos(rbrace), new token.Token(56)])); + return; + } else if (isStruct && p.isOneLineFieldList(list)) { + p.print(new sliceType$1([new token.Pos(lbrace), new token.Token(51), new whiteSpace(32)])); + f = ((0 < 0 || 0 >= list.$length) ? $throwRuntimeError("index out of range") : list.$array[list.$offset + 0]); + _ref = f.Names; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + x = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (i > 0) { + p.print(new sliceType$1([new token.Token(52), new whiteSpace(32)])); + } + p.expr(x); + _i++; + } + if (f.Names.$length > 0) { + p.print(new sliceType$1([new whiteSpace(32)])); + } + p.expr(f.Type); + p.print(new sliceType$1([new whiteSpace(32), new token.Pos(rbrace), new token.Token(56)])); + return; + } + } + p.print(new sliceType$1([new whiteSpace(32), new token.Pos(lbrace), new token.Token(51), new whiteSpace(62)])); + if (hasComments || list.$length > 0) { + p.print(new sliceType$1([new whiteSpace(12)])); + } + if (isStruct) { + sep = 11; + if (list.$length === 1) { + sep = 32; + } + line = 0; + _ref$1 = list; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i$1 = _i$1; + f$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i$1]); + if (i$1 > 0) { + p.linebreak(p.lineFor(f$1.Pos()), 1, 0, p.linesFrom(line) > 0); + } + extraTabs = 0; + p.setComment(f$1.Doc); + p.recordLine(new ptrType$6(function() { return line; }, function($v) { line = $v; })); + if (f$1.Names.$length > 0) { + p.identList(f$1.Names, false); + p.print(new sliceType$1([new whiteSpace(sep)])); + p.expr(f$1.Type); + extraTabs = 1; + } else { + p.expr(f$1.Type); + extraTabs = 2; + } + if (!(f$1.Tag === ptrType$4.nil)) { + if (f$1.Names.$length > 0 && (sep === 11)) { + p.print(new sliceType$1([new whiteSpace(sep)])); + } + p.print(new sliceType$1([new whiteSpace(sep)])); + p.expr(f$1.Tag); + extraTabs = 0; + } + if (!(f$1.Comment === ptrType.nil)) { + while (true) { + if (!(extraTabs > 0)) { break; } + p.print(new sliceType$1([new whiteSpace(sep)])); + extraTabs = extraTabs - (1) >> 0; + } + p.setComment(f$1.Comment); + } + _i$1++; + } + if (isIncomplete) { + if (list.$length > 0) { + p.print(new sliceType$1([new whiteSpace(12)])); + } + p.flush(p.posFor(rbrace), 56); + p.setLineComment("// contains filtered or unexported fields"); + } + } else { + line$1 = 0; + _ref$2 = list; + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$2.$length)) { break; } + i$2 = _i$2; + f$2 = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? $throwRuntimeError("index out of range") : _ref$2.$array[_ref$2.$offset + _i$2]); + if (i$2 > 0) { + p.linebreak(p.lineFor(f$2.Pos()), 1, 0, p.linesFrom(line$1) > 0); + } + p.setComment(f$2.Doc); + p.recordLine(new ptrType$6(function() { return line$1; }, function($v) { line$1 = $v; })); + _tuple = $assertType(f$2.Type, ptrType$7, true); ftyp = _tuple[0]; isFtyp = _tuple[1]; + if (isFtyp) { + p.expr((x$1 = f$2.Names, ((0 < 0 || 0 >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + 0]))); + p.signature(ftyp.Params, ftyp.Results); + } else { + p.expr(f$2.Type); + } + p.setComment(f$2.Comment); + _i$2++; + } + if (isIncomplete) { + if (list.$length > 0) { + p.print(new sliceType$1([new whiteSpace(12)])); + } + p.flush(p.posFor(rbrace), 56); + p.setLineComment("// contains filtered or unexported methods"); + } + } + p.print(new sliceType$1([new whiteSpace(60), new whiteSpace(12), new token.Pos(rbrace), new token.Token(56)])); + }; + printer.prototype.fieldList = function(fields, isStruct, isIncomplete) { return this.$val.fieldList(fields, isStruct, isIncomplete); }; + walkBinary = function(e) { + var _ref, _ref$1, _ref$2, _ref$3, _tuple, _tuple$1, e, h4, h4$1, h5, h5$1, has4 = false, has5 = false, l, maxProblem = 0, mp, mp$1, r; + _ref = new token.Token(e.Op).Precedence(); + if (_ref === 4) { + has4 = true; + } else if (_ref === 5) { + has5 = true; + } + _ref$1 = e.X; + switch (0) { default: if ($assertType(_ref$1, ptrType$8, true)[1]) { + l = _ref$1.$val; + if (new token.Token(l.Op).Precedence() < new token.Token(e.Op).Precedence()) { + break; + } + _tuple = walkBinary(l); h4 = _tuple[0]; h5 = _tuple[1]; mp = _tuple[2]; + has4 = has4 || h4; + has5 = has5 || h5; + if (maxProblem < mp) { + maxProblem = mp; + } + } } + _ref$2 = e.Y; + switch (0) { default: if ($assertType(_ref$2, ptrType$8, true)[1]) { + r = _ref$2.$val; + if (new token.Token(r.Op).Precedence() <= new token.Token(e.Op).Precedence()) { + break; + } + _tuple$1 = walkBinary(r); h4$1 = _tuple$1[0]; h5$1 = _tuple$1[1]; mp$1 = _tuple$1[2]; + has4 = has4 || h4$1; + has5 = has5 || h5$1; + if (maxProblem < mp$1) { + maxProblem = mp$1; + } + } else if ($assertType(_ref$2, ptrType$9, true)[1]) { + r = _ref$2.$val; + if (e.Op === 15) { + maxProblem = 5; + } + } else if ($assertType(_ref$2, ptrType$10, true)[1]) { + r = _ref$2.$val; + _ref$3 = new token.Token(e.Op).String() + new token.Token(r.Op).String(); + if (_ref$3 === "/*" || _ref$3 === "&&" || _ref$3 === "&^") { + maxProblem = 5; + } else if (_ref$3 === "++" || _ref$3 === "--") { + if (maxProblem < 4) { + maxProblem = 4; + } + } + } } + return [has4, has5, maxProblem]; + }; + cutoff = function(e, depth) { + var _tuple, depth, e, has4, has5, maxProblem; + _tuple = walkBinary(e); has4 = _tuple[0]; has5 = _tuple[1]; maxProblem = _tuple[2]; + if (maxProblem > 0) { + return maxProblem + 1 >> 0; + } + if (has4 && has5) { + if (depth === 1) { + return 5; + } + return 4; + } + if (depth === 1) { + return 6; + } + return 4; + }; + diffPrec = function(expr, prec) { + var _tuple, expr, ok, prec, x; + _tuple = $assertType(expr, ptrType$8, true); x = _tuple[0]; ok = _tuple[1]; + if (!ok || !((prec === new token.Token(x.Op).Precedence()))) { + return 1; + } + return 0; + }; + reduceDepth = function(depth) { + var depth; + depth = depth - (1) >> 0; + if (depth < 1) { + depth = 1; + } + return depth; + }; + printer.ptr.prototype.binaryExpr = function(x, prec1, cutoff$1, depth) { + var cutoff$1, depth, p, prec, prec1, printBlank, ws, x, xline, yline; + p = this; + prec = new token.Token(x.Op).Precedence(); + if (prec < prec1) { + p.print(new sliceType$1([new token.Token(49)])); + p.expr0(x, reduceDepth(depth)); + p.print(new sliceType$1([new token.Token(54)])); + return; + } + printBlank = prec < cutoff$1; + ws = 62; + p.expr1(x.X, prec, depth + diffPrec(x.X, prec) >> 0); + if (printBlank) { + p.print(new sliceType$1([new whiteSpace(32)])); + } + xline = p.pos.Line; + yline = p.lineFor(x.Y.Pos()); + p.print(new sliceType$1([new token.Pos(x.OpPos), new token.Token(x.Op)])); + if (!((xline === yline)) && xline > 0 && yline > 0) { + if (p.linebreak(yline, 1, ws, true)) { + ws = 0; + printBlank = false; + } + } + if (printBlank) { + p.print(new sliceType$1([new whiteSpace(32)])); + } + p.expr1(x.Y, prec + 1 >> 0, depth + 1 >> 0); + if (ws === 0) { + p.print(new sliceType$1([new whiteSpace(60)])); + } + }; + printer.prototype.binaryExpr = function(x, prec1, cutoff$1, depth) { return this.$val.binaryExpr(x, prec1, cutoff$1, depth); }; + isBinary = function(expr) { + var _tuple, expr, ok; + _tuple = $assertType(expr, ptrType$8, true); ok = _tuple[1]; + return ok; + }; + printer.ptr.prototype.expr1 = function(expr, prec1, depth) { + var _i, _ref, _ref$1, _ref$2, _tuple, _tuple$1, depth, expr, hasParens, i, indices, line, mode, ok, p, prec1, x, x$1, x$2, y; + p = this; + p.print(new sliceType$1([new token.Pos(expr.Pos())])); + _ref = expr; + if ($assertType(_ref, ptrType$11, true)[1]) { + x = _ref.$val; + p.print(new sliceType$1([new $String("BadExpr")])); + } else if ($assertType(_ref, ptrType$3, true)[1]) { + x = _ref.$val; + p.print(new sliceType$1([x])); + } else if ($assertType(_ref, ptrType$8, true)[1]) { + x = _ref.$val; + if (depth < 1) { + p.internalError(new sliceType$1([new $String("depth < 1:"), new $Int(depth)])); + depth = 1; + } + p.binaryExpr(x, prec1, cutoff(x, depth), depth); + } else if ($assertType(_ref, ptrType$1, true)[1]) { + x = _ref.$val; + p.expr(x.Key); + p.print(new sliceType$1([new token.Pos(x.Colon), new token.Token(58), new whiteSpace(32)])); + p.expr(x.Value); + } else if ($assertType(_ref, ptrType$9, true)[1]) { + x = _ref.$val; + if (6 < prec1) { + p.print(new sliceType$1([new token.Token(49)])); + p.print(new sliceType$1([new token.Token(14)])); + p.expr(x.X); + p.print(new sliceType$1([new token.Token(54)])); + } else { + p.print(new sliceType$1([new token.Token(14)])); + p.expr(x.X); + } + } else if ($assertType(_ref, ptrType$10, true)[1]) { + x = _ref.$val; + if (6 < prec1) { + p.print(new sliceType$1([new token.Token(49)])); + p.expr(x); + p.print(new sliceType$1([new token.Token(54)])); + } else { + p.print(new sliceType$1([new token.Token(x.Op)])); + if (x.Op === 79) { + p.print(new sliceType$1([new whiteSpace(32)])); + } + p.expr1(x.X, 6, depth); + } + } else if ($assertType(_ref, ptrType$4, true)[1]) { + x = _ref.$val; + p.print(new sliceType$1([x])); + } else if ($assertType(_ref, ptrType$12, true)[1]) { + x = _ref.$val; + p.expr(x.Type); + p.adjBlock(p.distanceFrom(x.Type.Pos()), 32, x.Body); + } else if ($assertType(_ref, ptrType$13, true)[1]) { + x = _ref.$val; + _tuple = $assertType(x.X, ptrType$13, true); hasParens = _tuple[1]; + if (hasParens) { + p.expr0(x.X, depth); + } else { + p.print(new sliceType$1([new token.Token(49)])); + p.expr0(x.X, reduceDepth(depth)); + p.print(new sliceType$1([new token.Pos(x.Rparen), new token.Token(54)])); + } + } else if ($assertType(_ref, ptrType$14, true)[1]) { + x = _ref.$val; + p.expr1(x.X, 7, depth); + p.print(new sliceType$1([new token.Token(53)])); + line = p.lineFor(x.Sel.Pos()); + if (p.pos.IsValid() && p.pos.Line < line) { + p.print(new sliceType$1([new whiteSpace(62), new whiteSpace(10), new token.Pos(x.Sel.Pos()), x.Sel, new whiteSpace(60)])); + } else { + p.print(new sliceType$1([new token.Pos(x.Sel.Pos()), x.Sel])); + } + } else if ($assertType(_ref, ptrType$15, true)[1]) { + x = _ref.$val; + p.expr1(x.X, 7, depth); + p.print(new sliceType$1([new token.Token(53), new token.Pos(x.Lparen), new token.Token(49)])); + if (!($interfaceIsEqual(x.Type, $ifaceNil))) { + p.expr(x.Type); + } else { + p.print(new sliceType$1([new token.Token(84)])); + } + p.print(new sliceType$1([new token.Pos(x.Rparen), new token.Token(54)])); + } else if ($assertType(_ref, ptrType$16, true)[1]) { + x = _ref.$val; + p.expr1(x.X, 7, 1); + p.print(new sliceType$1([new token.Pos(x.Lbrack), new token.Token(50)])); + p.expr0(x.Index, depth + 1 >> 0); + p.print(new sliceType$1([new token.Pos(x.Rbrack), new token.Token(55)])); + } else if ($assertType(_ref, ptrType$17, true)[1]) { + x = _ref.$val; + p.expr1(x.X, 7, 1); + p.print(new sliceType$1([new token.Pos(x.Lbrack), new token.Token(50)])); + indices = new sliceType$3([x.Low, x.High]); + if (!($interfaceIsEqual(x.Max, $ifaceNil))) { + indices = $append(indices, x.Max); + } + _ref$1 = indices; + _i = 0; + while (true) { + if (!(_i < _ref$1.$length)) { break; } + i = _i; + y = ((_i < 0 || _i >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i]); + if (i > 0) { + x$2 = (x$1 = i - 1 >> 0, ((x$1 < 0 || x$1 >= indices.$length) ? $throwRuntimeError("index out of range") : indices.$array[indices.$offset + x$1])); + if (depth <= 1 && !($interfaceIsEqual(x$2, $ifaceNil)) && !($interfaceIsEqual(y, $ifaceNil)) && (isBinary(x$2) || isBinary(y))) { + p.print(new sliceType$1([new whiteSpace(32), new token.Token(58), new whiteSpace(32)])); + } else { + p.print(new sliceType$1([new token.Token(58)])); + } + } + if (!($interfaceIsEqual(y, $ifaceNil))) { + p.expr0(y, depth + 1 >> 0); + } + _i++; + } + p.print(new sliceType$1([new token.Pos(x.Rbrack), new token.Token(55)])); + } else if ($assertType(_ref, ptrType$18, true)[1]) { + x = _ref.$val; + if (x.Args.$length > 1) { + depth = depth + (1) >> 0; + } + _tuple$1 = $assertType(x.Fun, ptrType$7, true); ok = _tuple$1[1]; + if (ok) { + p.print(new sliceType$1([new token.Token(49)])); + p.expr1(x.Fun, 7, depth); + p.print(new sliceType$1([new token.Token(54)])); + } else { + p.expr1(x.Fun, 7, depth); + } + p.print(new sliceType$1([new token.Pos(x.Lparen), new token.Token(49)])); + if (new token.Pos(x.Ellipsis).IsValid()) { + p.exprList(x.Lparen, x.Args, depth, 0, x.Ellipsis); + p.print(new sliceType$1([new token.Pos(x.Ellipsis), new token.Token(48)])); + if (new token.Pos(x.Rparen).IsValid() && p.lineFor(x.Ellipsis) < p.lineFor(x.Rparen)) { + p.print(new sliceType$1([new token.Token(52), new whiteSpace(12)])); + } + } else { + p.exprList(x.Lparen, x.Args, depth, 1, x.Rparen); + } + p.print(new sliceType$1([new token.Pos(x.Rparen), new token.Token(54)])); + } else if ($assertType(_ref, ptrType$19, true)[1]) { + x = _ref.$val; + if (!($interfaceIsEqual(x.Type, $ifaceNil))) { + p.expr1(x.Type, 7, depth); + } + p.print(new sliceType$1([new token.Pos(x.Lbrace), new token.Token(51)])); + p.exprList(x.Lbrace, x.Elts, 1, 1, x.Rbrace); + mode = 2; + if (x.Elts.$length > 0) { + mode = mode | (1); + } + p.print(new sliceType$1([new pmode(mode), new token.Pos(x.Rbrace), new token.Token(56), new pmode(mode)])); + } else if ($assertType(_ref, ptrType$20, true)[1]) { + x = _ref.$val; + p.print(new sliceType$1([new token.Token(48)])); + if (!($interfaceIsEqual(x.Elt, $ifaceNil))) { + p.expr(x.Elt); + } + } else if ($assertType(_ref, ptrType$21, true)[1]) { + x = _ref.$val; + p.print(new sliceType$1([new token.Token(50)])); + if (!($interfaceIsEqual(x.Len, $ifaceNil))) { + p.expr(x.Len); + } + p.print(new sliceType$1([new token.Token(55)])); + p.expr(x.Elt); + } else if ($assertType(_ref, ptrType$22, true)[1]) { + x = _ref.$val; + p.print(new sliceType$1([new token.Token(82)])); + p.fieldList(x.Fields, true, x.Incomplete); + } else if ($assertType(_ref, ptrType$7, true)[1]) { + x = _ref.$val; + p.print(new sliceType$1([new token.Token(71)])); + p.signature(x.Params, x.Results); + } else if ($assertType(_ref, ptrType$23, true)[1]) { + x = _ref.$val; + p.print(new sliceType$1([new token.Token(76)])); + p.fieldList(x.Methods, false, x.Incomplete); + } else if ($assertType(_ref, ptrType$24, true)[1]) { + x = _ref.$val; + p.print(new sliceType$1([new token.Token(77), new token.Token(50)])); + p.expr(x.Key); + p.print(new sliceType$1([new token.Token(55)])); + p.expr(x.Value); + } else if ($assertType(_ref, ptrType$25, true)[1]) { + x = _ref.$val; + _ref$2 = x.Dir; + if (_ref$2 === 3) { + p.print(new sliceType$1([new token.Token(63)])); + } else if (_ref$2 === 2) { + p.print(new sliceType$1([new token.Token(36), new token.Token(63)])); + } else if (_ref$2 === 1) { + p.print(new sliceType$1([new token.Token(63), new token.Pos(x.Arrow), new token.Token(36)])); + } + p.print(new sliceType$1([new whiteSpace(32)])); + p.expr(x.Value); + } else { + x = _ref; + $panic(new $String("unreachable")); + } + return; + }; + printer.prototype.expr1 = function(expr, prec1, depth) { return this.$val.expr1(expr, prec1, depth); }; + printer.ptr.prototype.expr0 = function(x, depth) { + var depth, p, x; + p = this; + p.expr1(x, 0, depth); + }; + printer.prototype.expr0 = function(x, depth) { return this.$val.expr0(x, depth); }; + printer.ptr.prototype.expr = function(x) { + var p, x; + p = this; + p.expr1(x, 0, 1); + }; + printer.prototype.expr = function(x) { return this.$val.expr(x); }; + printer.ptr.prototype.stmtList = function(list, nindent, nextIsRBrace) { + var _i, _ref, _tuple, _tuple$1, i, isEmpty, line, list, lt, nextIsRBrace, nindent, p, s, t; + p = this; + if (nindent > 0) { + p.print(new sliceType$1([new whiteSpace(62)])); + } + line = 0; + i = 0; + _ref = list; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + s = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + _tuple = $assertType(s, ptrType$26, true); isEmpty = _tuple[1]; + if (!isEmpty) { + if (p.output.$length > 0) { + p.linebreak(p.lineFor(s.Pos()), 1, 0, (i === 0) || (nindent === 0) || p.linesFrom(line) > 0); + } + p.recordLine(new ptrType$6(function() { return line; }, function($v) { line = $v; })); + p.stmt(s, nextIsRBrace && (i === (list.$length - 1 >> 0))); + t = s; + while (true) { + if (!(true)) { break; } + _tuple$1 = $assertType(t, ptrType$27, true); lt = _tuple$1[0]; + if (lt === ptrType$27.nil) { + break; + } + line = line + (1) >> 0; + t = lt.Stmt; + } + i = i + (1) >> 0; + } + _i++; + } + if (nindent > 0) { + p.print(new sliceType$1([new whiteSpace(60)])); + } + }; + printer.prototype.stmtList = function(list, nindent, nextIsRBrace) { return this.$val.stmtList(list, nindent, nextIsRBrace); }; + printer.ptr.prototype.block = function(b, nindent) { + var b, nindent, p; + p = this; + p.print(new sliceType$1([new token.Pos(b.Lbrace), new token.Token(51)])); + p.stmtList(b.List, nindent, true); + p.linebreak(p.lineFor(b.Rbrace), 1, 0, true); + p.print(new sliceType$1([new token.Pos(b.Rbrace), new token.Token(56)])); + }; + printer.prototype.block = function(b, nindent) { return this.$val.block(b, nindent); }; + isTypeName = function(x) { + var _ref, t, x; + _ref = x; + if ($assertType(_ref, ptrType$3, true)[1]) { + t = _ref.$val; + return true; + } else if ($assertType(_ref, ptrType$14, true)[1]) { + t = _ref.$val; + return isTypeName(t.X); + } + return false; + }; + stripParens = function(x) { + var _tuple, px, strip, x; + _tuple = $assertType(x, ptrType$13, true); px = _tuple[0]; strip = _tuple[1]; + if (strip) { + ast.Inspect(px.X, (function(node) { + var _ref, node, x$1; + _ref = node; + if ($assertType(_ref, ptrType$13, true)[1]) { + x$1 = _ref.$val; + return false; + } else if ($assertType(_ref, ptrType$19, true)[1]) { + x$1 = _ref.$val; + if (isTypeName(x$1.Type)) { + strip = false; + } + return false; + } + return true; + })); + if (strip) { + return stripParens(px.X); + } + } + return x; + }; + stripParensAlways = function(x) { + var _tuple, ok, x, x$1; + _tuple = $assertType(x, ptrType$13, true); x$1 = _tuple[0]; ok = _tuple[1]; + if (ok) { + return stripParensAlways(x$1.X); + } + return x; + }; + printer.ptr.prototype.controlClause = function(isForStmt, init, expr, post) { + var expr, init, isForStmt, needsBlank, p, post; + p = this; + p.print(new sliceType$1([new whiteSpace(32)])); + needsBlank = false; + if ($interfaceIsEqual(init, $ifaceNil) && $interfaceIsEqual(post, $ifaceNil)) { + if (!($interfaceIsEqual(expr, $ifaceNil))) { + p.expr(stripParens(expr)); + needsBlank = true; + } + } else { + if (!($interfaceIsEqual(init, $ifaceNil))) { + p.stmt(init, false); + } + p.print(new sliceType$1([new token.Token(57), new whiteSpace(32)])); + if (!($interfaceIsEqual(expr, $ifaceNil))) { + p.expr(stripParens(expr)); + needsBlank = true; + } + if (isForStmt) { + p.print(new sliceType$1([new token.Token(57), new whiteSpace(32)])); + needsBlank = false; + if (!($interfaceIsEqual(post, $ifaceNil))) { + p.stmt(post, false); + needsBlank = true; + } + } + } + if (needsBlank) { + p.print(new sliceType$1([new whiteSpace(32)])); + } + }; + printer.prototype.controlClause = function(isForStmt, init, expr, post) { return this.$val.controlClause(isForStmt, init, expr, post); }; + printer.ptr.prototype.indentList = function(list) { + var _i, _ref, b, e, line, list, n, p, x, x$1, xb, xe; + p = this; + if (list.$length >= 2) { + b = p.lineFor(((0 < 0 || 0 >= list.$length) ? $throwRuntimeError("index out of range") : list.$array[list.$offset + 0]).Pos()); + e = p.lineFor((x = list.$length - 1 >> 0, ((x < 0 || x >= list.$length) ? $throwRuntimeError("index out of range") : list.$array[list.$offset + x])).End()); + if (0 < b && b < e) { + n = 0; + line = b; + _ref = list; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + x$1 = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + xb = p.lineFor(x$1.Pos()); + xe = p.lineFor(x$1.End()); + if (line < xb) { + return true; + } + if (xb < xe) { + n = n + (1) >> 0; + } + line = xe; + _i++; + } + return n > 1; + } + } + return false; + }; + printer.prototype.indentList = function(list) { return this.$val.indentList(list); }; + printer.ptr.prototype.stmt = function(stmt, nextIsRBrace) { + var _ref, _ref$1, _tuple, body, depth, e, isEmpty, nextIsRBrace, p, s, stmt; + p = this; + p.print(new sliceType$1([new token.Pos(stmt.Pos())])); + _ref = stmt; + switch (0) { default: if ($assertType(_ref, ptrType$28, true)[1]) { + s = _ref.$val; + p.print(new sliceType$1([new $String("BadStmt")])); + } else if ($assertType(_ref, ptrType$29, true)[1]) { + s = _ref.$val; + p.decl(s.Decl); + } else if ($assertType(_ref, ptrType$26, true)[1]) { + s = _ref.$val; + } else if ($assertType(_ref, ptrType$27, true)[1]) { + s = _ref.$val; + p.print(new sliceType$1([new whiteSpace(60)])); + p.expr(s.Label); + p.print(new sliceType$1([new token.Pos(s.Colon), new token.Token(58), new whiteSpace(62)])); + _tuple = $assertType(s.Stmt, ptrType$26, true); e = _tuple[0]; isEmpty = _tuple[1]; + if (isEmpty) { + if (!nextIsRBrace) { + p.print(new sliceType$1([new whiteSpace(10), new token.Pos(e.Pos()), new token.Token(57)])); + break; + } + } else { + p.linebreak(p.lineFor(s.Stmt.Pos()), 1, 0, true); + } + p.stmt(s.Stmt, nextIsRBrace); + } else if ($assertType(_ref, ptrType$30, true)[1]) { + s = _ref.$val; + p.expr0(s.X, 1); + } else if ($assertType(_ref, ptrType$31, true)[1]) { + s = _ref.$val; + p.expr0(s.Chan, 1); + p.print(new sliceType$1([new whiteSpace(32), new token.Pos(s.Arrow), new token.Token(36), new whiteSpace(32)])); + p.expr0(s.Value, 1); + } else if ($assertType(_ref, ptrType$32, true)[1]) { + s = _ref.$val; + p.expr0(s.X, 2); + p.print(new sliceType$1([new token.Pos(s.TokPos), new token.Token(s.Tok)])); + } else if ($assertType(_ref, ptrType$33, true)[1]) { + s = _ref.$val; + depth = 1; + if (s.Lhs.$length > 1 && s.Rhs.$length > 1) { + depth = depth + (1) >> 0; + } + p.exprList(s.Pos(), s.Lhs, depth, 0, s.TokPos); + p.print(new sliceType$1([new whiteSpace(32), new token.Pos(s.TokPos), new token.Token(s.Tok), new whiteSpace(32)])); + p.exprList(s.TokPos, s.Rhs, depth, 0, 0); + } else if ($assertType(_ref, ptrType$34, true)[1]) { + s = _ref.$val; + p.print(new sliceType$1([new token.Token(72), new whiteSpace(32)])); + p.expr(s.Call); + } else if ($assertType(_ref, ptrType$35, true)[1]) { + s = _ref.$val; + p.print(new sliceType$1([new token.Token(67), new whiteSpace(32)])); + p.expr(s.Call); + } else if ($assertType(_ref, ptrType$36, true)[1]) { + s = _ref.$val; + p.print(new sliceType$1([new token.Token(80)])); + if (!(s.Results === sliceType$3.nil)) { + p.print(new sliceType$1([new whiteSpace(32)])); + if (p.indentList(s.Results)) { + p.print(new sliceType$1([new whiteSpace(62)])); + p.exprList(s.Pos(), s.Results, 1, 2, 0); + p.print(new sliceType$1([new whiteSpace(60)])); + } else { + p.exprList(s.Pos(), s.Results, 1, 0, 0); + } + } + } else if ($assertType(_ref, ptrType$37, true)[1]) { + s = _ref.$val; + p.print(new sliceType$1([new token.Token(s.Tok)])); + if (!(s.Label === ptrType$3.nil)) { + p.print(new sliceType$1([new whiteSpace(32)])); + p.expr(s.Label); + } + } else if ($assertType(_ref, ptrType$38, true)[1]) { + s = _ref.$val; + p.block(s, 1); + } else if ($assertType(_ref, ptrType$39, true)[1]) { + s = _ref.$val; + p.print(new sliceType$1([new token.Token(74)])); + p.controlClause(false, s.Init, s.Cond, $ifaceNil); + p.block(s.Body, 1); + if (!($interfaceIsEqual(s.Else, $ifaceNil))) { + p.print(new sliceType$1([new whiteSpace(32), new token.Token(68), new whiteSpace(32)])); + _ref$1 = s.Else; + if ($assertType(_ref$1, ptrType$38, true)[1] || $assertType(_ref$1, ptrType$39, true)[1]) { + p.stmt(s.Else, nextIsRBrace); + } else { + p.print(new sliceType$1([new token.Token(51), new whiteSpace(62), new whiteSpace(12)])); + p.stmt(s.Else, true); + p.print(new sliceType$1([new whiteSpace(60), new whiteSpace(12), new token.Token(56)])); + } + } + } else if ($assertType(_ref, ptrType$40, true)[1]) { + s = _ref.$val; + if (!(s.List === sliceType$3.nil)) { + p.print(new sliceType$1([new token.Token(62), new whiteSpace(32)])); + p.exprList(s.Pos(), s.List, 1, 0, s.Colon); + } else { + p.print(new sliceType$1([new token.Token(66)])); + } + p.print(new sliceType$1([new token.Pos(s.Colon), new token.Token(58)])); + p.stmtList(s.Body, 1, nextIsRBrace); + } else if ($assertType(_ref, ptrType$41, true)[1]) { + s = _ref.$val; + p.print(new sliceType$1([new token.Token(83)])); + p.controlClause(false, s.Init, s.Tag, $ifaceNil); + p.block(s.Body, 0); + } else if ($assertType(_ref, ptrType$42, true)[1]) { + s = _ref.$val; + p.print(new sliceType$1([new token.Token(83)])); + if (!($interfaceIsEqual(s.Init, $ifaceNil))) { + p.print(new sliceType$1([new whiteSpace(32)])); + p.stmt(s.Init, false); + p.print(new sliceType$1([new token.Token(57)])); + } + p.print(new sliceType$1([new whiteSpace(32)])); + p.stmt(s.Assign, false); + p.print(new sliceType$1([new whiteSpace(32)])); + p.block(s.Body, 0); + } else if ($assertType(_ref, ptrType$43, true)[1]) { + s = _ref.$val; + if (!($interfaceIsEqual(s.Comm, $ifaceNil))) { + p.print(new sliceType$1([new token.Token(62), new whiteSpace(32)])); + p.stmt(s.Comm, false); + } else { + p.print(new sliceType$1([new token.Token(66)])); + } + p.print(new sliceType$1([new token.Pos(s.Colon), new token.Token(58)])); + p.stmtList(s.Body, 1, nextIsRBrace); + } else if ($assertType(_ref, ptrType$44, true)[1]) { + s = _ref.$val; + p.print(new sliceType$1([new token.Token(81), new whiteSpace(32)])); + body = s.Body; + if ((body.List.$length === 0) && !p.commentBefore(p.posFor(body.Rbrace))) { + p.print(new sliceType$1([new token.Pos(body.Lbrace), new token.Token(51), new token.Pos(body.Rbrace), new token.Token(56)])); + } else { + p.block(body, 0); + } + } else if ($assertType(_ref, ptrType$45, true)[1]) { + s = _ref.$val; + p.print(new sliceType$1([new token.Token(70)])); + p.controlClause(true, s.Init, s.Cond, s.Post); + p.block(s.Body, 1); + } else if ($assertType(_ref, ptrType$46, true)[1]) { + s = _ref.$val; + p.print(new sliceType$1([new token.Token(70), new whiteSpace(32)])); + if (!($interfaceIsEqual(s.Key, $ifaceNil))) { + p.expr(s.Key); + if (!($interfaceIsEqual(s.Value, $ifaceNil))) { + p.print(new sliceType$1([new token.Pos(s.Value.Pos()), new token.Token(52), new whiteSpace(32)])); + p.expr(s.Value); + } + p.print(new sliceType$1([new whiteSpace(32), new token.Pos(s.TokPos), new token.Token(s.Tok), new whiteSpace(32)])); + } + p.print(new sliceType$1([new token.Token(79), new whiteSpace(32)])); + p.expr(stripParens(s.X)); + p.print(new sliceType$1([new whiteSpace(32)])); + p.block(s.Body, 1); + } else { + s = _ref; + $panic(new $String("unreachable")); + } } + return; + }; + printer.prototype.stmt = function(stmt, nextIsRBrace) { return this.$val.stmt(stmt, nextIsRBrace); }; + keepTypeColumn = function(specs) { + var _i, _ref, i, i0, keepType, m, populate, s, specs, t; + m = $makeSlice(sliceType$6, specs.$length); + populate = (function(i, j, keepType) { + var i, j, keepType; + if (keepType) { + while (true) { + if (!(i < j)) { break; } + (i < 0 || i >= m.$length) ? $throwRuntimeError("index out of range") : m.$array[m.$offset + i] = true; + i = i + (1) >> 0; + } + } + }); + i0 = -1; + keepType = false; + _ref = specs; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + s = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + t = $assertType(s, ptrType$47); + if (!(t.Values === sliceType$3.nil)) { + if (i0 < 0) { + i0 = i; + keepType = false; + } + } else { + if (i0 >= 0) { + populate(i0, i, keepType); + i0 = -1; + } + } + if (!($interfaceIsEqual(t.Type, $ifaceNil))) { + keepType = true; + } + _i++; + } + if (i0 >= 0) { + populate(i0, specs.$length, keepType); + } + return m; + }; + printer.ptr.prototype.valueSpec = function(s, keepType) { + var extraTabs, keepType, p, s; + p = this; + p.setComment(s.Doc); + p.identList(s.Names, false); + extraTabs = 3; + if (!($interfaceIsEqual(s.Type, $ifaceNil)) || keepType) { + p.print(new sliceType$1([new whiteSpace(11)])); + extraTabs = extraTabs - (1) >> 0; + } + if (!($interfaceIsEqual(s.Type, $ifaceNil))) { + p.expr(s.Type); + } + if (!(s.Values === sliceType$3.nil)) { + p.print(new sliceType$1([new whiteSpace(11), new token.Token(42), new whiteSpace(32)])); + p.exprList(0, s.Values, 1, 0, 0); + extraTabs = extraTabs - (1) >> 0; + } + if (!(s.Comment === ptrType.nil)) { + while (true) { + if (!(extraTabs > 0)) { break; } + p.print(new sliceType$1([new whiteSpace(11)])); + extraTabs = extraTabs - (1) >> 0; + } + p.setComment(s.Comment); + } + }; + printer.prototype.valueSpec = function(s, keepType) { return this.$val.valueSpec(s, keepType); }; + printer.ptr.prototype.spec = function(spec, n, doIndent) { + var _ref, doIndent, n, p, s, spec; + p = this; + _ref = spec; + if ($assertType(_ref, ptrType$48, true)[1]) { + s = _ref.$val; + p.setComment(s.Doc); + if (!(s.Name === ptrType$3.nil)) { + p.expr(s.Name); + p.print(new sliceType$1([new whiteSpace(32)])); + } + p.expr(s.Path); + p.setComment(s.Comment); + p.print(new sliceType$1([new token.Pos(s.EndPos)])); + } else if ($assertType(_ref, ptrType$47, true)[1]) { + s = _ref.$val; + if (!((n === 1))) { + p.internalError(new sliceType$1([new $String("expected n = 1; got"), new $Int(n)])); + } + p.setComment(s.Doc); + p.identList(s.Names, doIndent); + if (!($interfaceIsEqual(s.Type, $ifaceNil))) { + p.print(new sliceType$1([new whiteSpace(32)])); + p.expr(s.Type); + } + if (!(s.Values === sliceType$3.nil)) { + p.print(new sliceType$1([new whiteSpace(32), new token.Token(42), new whiteSpace(32)])); + p.exprList(0, s.Values, 1, 0, 0); + } + p.setComment(s.Comment); + } else if ($assertType(_ref, ptrType$49, true)[1]) { + s = _ref.$val; + p.setComment(s.Doc); + p.expr(s.Name); + if (n === 1) { + p.print(new sliceType$1([new whiteSpace(32)])); + } else { + p.print(new sliceType$1([new whiteSpace(11)])); + } + p.expr(s.Type); + p.setComment(s.Comment); + } else { + s = _ref; + $panic(new $String("unreachable")); + } + }; + printer.prototype.spec = function(spec, n, doIndent) { return this.$val.spec(spec, n, doIndent); }; + printer.ptr.prototype.genDecl = function(d) { + var _i, _i$1, _ref, _ref$1, d, i, i$1, keepType, line, line$1, n, p, s, s$1, x; + p = this; + p.setComment(d.Doc); + p.print(new sliceType$1([new token.Pos(d.Pos()), new token.Token(d.Tok), new whiteSpace(32)])); + if (new token.Pos(d.Lparen).IsValid()) { + p.print(new sliceType$1([new token.Pos(d.Lparen), new token.Token(49)])); + n = d.Specs.$length; + if (n > 0) { + p.print(new sliceType$1([new whiteSpace(62), new whiteSpace(12)])); + if (n > 1 && ((d.Tok === 64) || (d.Tok === 85))) { + keepType = keepTypeColumn(d.Specs); + line = 0; + _ref = d.Specs; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + s = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (i > 0) { + p.linebreak(p.lineFor(s.Pos()), 1, 0, p.linesFrom(line) > 0); + } + p.recordLine(new ptrType$6(function() { return line; }, function($v) { line = $v; })); + p.valueSpec($assertType(s, ptrType$47), ((i < 0 || i >= keepType.$length) ? $throwRuntimeError("index out of range") : keepType.$array[keepType.$offset + i])); + _i++; + } + } else { + line$1 = 0; + _ref$1 = d.Specs; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i$1 = _i$1; + s$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i$1]); + if (i$1 > 0) { + p.linebreak(p.lineFor(s$1.Pos()), 1, 0, p.linesFrom(line$1) > 0); + } + p.recordLine(new ptrType$6(function() { return line$1; }, function($v) { line$1 = $v; })); + p.spec(s$1, n, false); + _i$1++; + } + } + p.print(new sliceType$1([new whiteSpace(60), new whiteSpace(12)])); + } + p.print(new sliceType$1([new token.Pos(d.Rparen), new token.Token(54)])); + } else { + p.spec((x = d.Specs, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])), 1, true); + } + }; + printer.prototype.genDecl = function(d) { return this.$val.genDecl(d); }; + printer.ptr.prototype.nodeSize = function(n, maxSize) { + var _entry, _i, _key, _key$1, _ref, _tuple, buf, cfg, ch, err, found, maxSize, n, p, size = 0, size$1; + p = this; + _tuple = (_entry = p.nodeSizes[n.$key()], _entry !== undefined ? [_entry.v, true] : [0, false]); size$1 = _tuple[0]; found = _tuple[1]; + if (found) { + size = size$1; + return size; + } + size = maxSize + 1 >> 0; + _key = n; (p.nodeSizes || $throwRuntimeError("assignment to entry in nil map"))[_key.$key()] = { k: _key, v: size }; + cfg = new Config.ptr(1, 0, 0); + buf = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + err = cfg.fprint(buf, p.fset, n, p.nodeSizes); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return size; + } + if (buf.Len() <= maxSize) { + _ref = buf.Bytes(); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + ch = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (ch < 32) { + return size; + } + _i++; + } + size = buf.Len(); + _key$1 = n; (p.nodeSizes || $throwRuntimeError("assignment to entry in nil map"))[_key$1.$key()] = { k: _key$1, v: size }; + } + return size; + }; + printer.prototype.nodeSize = function(n, maxSize) { return this.$val.nodeSize(n, maxSize); }; + printer.ptr.prototype.bodySize = function(b, maxSize) { + var _i, _ref, b, bodySize, i, maxSize, p, pos1, pos2, s; + p = this; + pos1 = b.Pos(); + pos2 = b.Rbrace; + if (new token.Pos(pos1).IsValid() && new token.Pos(pos2).IsValid() && !((p.lineFor(pos1) === p.lineFor(pos2)))) { + return maxSize + 1 >> 0; + } + if (b.List.$length > 5) { + return maxSize + 1 >> 0; + } + bodySize = p.commentSizeBefore(p.posFor(pos2)); + _ref = b.List; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + s = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (bodySize > maxSize) { + break; + } + if (i > 0) { + bodySize = bodySize + (2) >> 0; + } + bodySize = bodySize + (p.nodeSize(s, maxSize)) >> 0; + _i++; + } + return bodySize; + }; + printer.prototype.bodySize = function(b, maxSize) { return this.$val.bodySize(b, maxSize); }; + printer.ptr.prototype.adjBlock = function(headerSize, sep, b) { + var _i, _ref, b, headerSize, i, p, s, sep; + p = this; + if (b === ptrType$38.nil) { + return; + } + if ((headerSize + p.bodySize(b, 100) >> 0) <= 100) { + p.print(new sliceType$1([new whiteSpace(sep), new token.Pos(b.Lbrace), new token.Token(51)])); + if (b.List.$length > 0) { + p.print(new sliceType$1([new whiteSpace(32)])); + _ref = b.List; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + s = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (i > 0) { + p.print(new sliceType$1([new token.Token(57), new whiteSpace(32)])); + } + p.stmt(s, i === (b.List.$length - 1 >> 0)); + _i++; + } + p.print(new sliceType$1([new whiteSpace(32)])); + } + p.print(new sliceType$1([new pmode(2), new token.Pos(b.Rbrace), new token.Token(56), new pmode(2)])); + return; + } + if (!((sep === 0))) { + p.print(new sliceType$1([new whiteSpace(32)])); + } + p.block(b, 1); + }; + printer.prototype.adjBlock = function(headerSize, sep, b) { return this.$val.adjBlock(headerSize, sep, b); }; + printer.ptr.prototype.distanceFrom = function(from) { + var f, from, p; + p = this; + if (new token.Pos(from).IsValid() && p.pos.IsValid()) { + f = $clone(p.posFor(from), token.Position); + if (f.Line === p.pos.Line) { + return p.pos.Column - f.Column >> 0; + } + } + return 1073741824; + }; + printer.prototype.distanceFrom = function(from) { return this.$val.distanceFrom(from); }; + printer.ptr.prototype.funcDecl = function(d) { + var d, p; + p = this; + p.setComment(d.Doc); + p.print(new sliceType$1([new token.Pos(d.Pos()), new token.Token(71), new whiteSpace(32)])); + if (!(d.Recv === ptrType$2.nil)) { + p.parameters(d.Recv); + p.print(new sliceType$1([new whiteSpace(32)])); + } + p.expr(d.Name); + p.signature(d.Type.Params, d.Type.Results); + p.adjBlock(p.distanceFrom(d.Pos()), 11, d.Body); + }; + printer.prototype.funcDecl = function(d) { return this.$val.funcDecl(d); }; + printer.ptr.prototype.decl = function(decl) { + var _ref, d, decl, p; + p = this; + _ref = decl; + if ($assertType(_ref, ptrType$50, true)[1]) { + d = _ref.$val; + p.print(new sliceType$1([new token.Pos(d.Pos()), new $String("BadDecl")])); + } else if ($assertType(_ref, ptrType$51, true)[1]) { + d = _ref.$val; + p.genDecl(d); + } else if ($assertType(_ref, ptrType$52, true)[1]) { + d = _ref.$val; + p.funcDecl(d); + } else { + d = _ref; + $panic(new $String("unreachable")); + } + }; + printer.prototype.decl = function(decl) { return this.$val.decl(decl); }; + declToken = function(decl) { + var _ref, d, decl, tok = 0; + tok = 0; + _ref = decl; + if ($assertType(_ref, ptrType$51, true)[1]) { + d = _ref.$val; + tok = d.Tok; + } else if ($assertType(_ref, ptrType$52, true)[1]) { + d = _ref.$val; + tok = 71; + } + return tok; + }; + printer.ptr.prototype.declList = function(list) { + var _i, _ref, d, list, min, p, prev, tok; + p = this; + tok = 0; + _ref = list; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + d = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + prev = tok; + tok = declToken(d); + if (p.output.$length > 0) { + min = 1; + if (!((prev === tok)) || !(getDoc(d) === ptrType.nil)) { + min = 2; + } + p.linebreak(p.lineFor(d.Pos()), min, 0, false); + } + p.decl(d); + _i++; + } + }; + printer.prototype.declList = function(list) { return this.$val.declList(list); }; + printer.ptr.prototype.file = function(src) { + var p, src; + p = this; + p.setComment(src.Doc); + p.print(new sliceType$1([new token.Pos(src.Pos()), new token.Token(78), new whiteSpace(32)])); + p.expr(src.Name); + p.declList(src.Decls); + p.print(new sliceType$1([new whiteSpace(10)])); + }; + printer.prototype.file = function(src) { return this.$val.file(src); }; + printer.ptr.prototype.init = function(cfg, fset, nodeSizes) { + var cfg, fset, nodeSizes, p; + p = this; + $copy(p.Config, cfg, Config); + p.fset = fset; + $copy(p.pos, new token.Position.ptr("", 0, 1, 1), token.Position); + $copy(p.out, new token.Position.ptr("", 0, 1, 1), token.Position); + p.wsbuf = $makeSlice(sliceType$7, 0, 16); + p.nodeSizes = nodeSizes; + p.cachedPos = -1; + }; + printer.prototype.init = function(cfg, fset, nodeSizes) { return this.$val.init(cfg, fset, nodeSizes); }; + printer.ptr.prototype.internalError = function(msg) { + var msg, p; + p = this; + }; + printer.prototype.internalError = function(msg) { return this.$val.internalError(msg); }; + printer.ptr.prototype.commentsHaveNewline = function(list) { + var _i, _ref, c, i, line, list, p, t; + p = this; + line = p.lineFor(((0 < 0 || 0 >= list.$length) ? $throwRuntimeError("index out of range") : list.$array[list.$offset + 0]).Pos()); + _ref = list; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + c = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (i > 0 && !((p.lineFor(((i < 0 || i >= list.$length) ? $throwRuntimeError("index out of range") : list.$array[list.$offset + i]).Pos()) === line))) { + return true; + } + t = c.Text; + if (t.length >= 2 && ((t.charCodeAt(1) === 47) || strings.Contains(t, "\n"))) { + return true; + } + _i++; + } + return false; + }; + printer.prototype.commentsHaveNewline = function(list) { return this.$val.commentsHaveNewline(list); }; + printer.ptr.prototype.nextComment = function() { + var c, list, p, x, x$1; + p = this; + while (true) { + if (!(p.commentInfo.cindex < p.comments.$length)) { break; } + c = (x = p.comments, x$1 = p.commentInfo.cindex, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])); + p.commentInfo.cindex = p.commentInfo.cindex + (1) >> 0; + list = c.List; + if (list.$length > 0) { + p.commentInfo.comment = c; + p.commentInfo.commentOffset = p.posFor(((0 < 0 || 0 >= list.$length) ? $throwRuntimeError("index out of range") : list.$array[list.$offset + 0]).Pos()).Offset; + p.commentInfo.commentNewline = p.commentsHaveNewline(list); + return; + } + } + p.commentInfo.commentOffset = 1073741824; + }; + printer.prototype.nextComment = function() { return this.$val.nextComment(); }; + printer.ptr.prototype.commentBefore = function(next) { + var next, p; + p = this; + next = $clone(next, token.Position); + return p.commentInfo.commentOffset < next.Offset && (!p.impliedSemi || !p.commentInfo.commentNewline); + }; + printer.prototype.commentBefore = function(next) { return this.$val.commentBefore(next); }; + printer.ptr.prototype.commentSizeBefore = function(next) { + var $deferred = [], $err = null, _i, _ref, c, next, p, size; + /* */ try { $deferFrames.push($deferred); + p = this; + next = $clone(next, token.Position); + $deferred.push([(function(info) { + var info; + $copy(p.commentInfo, info, commentInfo); + }), [$clone(p.commentInfo, commentInfo)]]); + size = 0; + while (true) { + if (!(p.commentBefore(next))) { break; } + _ref = p.commentInfo.comment.List; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + c = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + size = size + (c.Text.length) >> 0; + _i++; + } + p.nextComment(); + } + return size; + /* */ } catch(err) { $err = err; return 0; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + printer.prototype.commentSizeBefore = function(next) { return this.$val.commentSizeBefore(next); }; + printer.ptr.prototype.recordLine = function(linePtr) { + var linePtr, p; + p = this; + p.linePtr = linePtr; + }; + printer.prototype.recordLine = function(linePtr) { return this.$val.recordLine(linePtr); }; + printer.ptr.prototype.linesFrom = function(line) { + var line, p; + p = this; + return p.out.Line - line >> 0; + }; + printer.prototype.linesFrom = function(line) { return this.$val.linesFrom(line); }; + printer.ptr.prototype.posFor = function(pos) { + var p, pos; + p = this; + return p.fset.Position(pos); + }; + printer.prototype.posFor = function(pos) { return this.$val.posFor(pos); }; + printer.ptr.prototype.lineFor = function(pos) { + var p, pos; + p = this; + if (!((pos === p.cachedPos))) { + p.cachedPos = pos; + p.cachedLine = p.fset.Position(pos).Line; + } + return p.cachedLine; + }; + printer.prototype.lineFor = function(pos) { return this.$val.lineFor(pos); }; + printer.ptr.prototype.atLineBegin = function(pos) { + var i, n, p, pos; + p = this; + pos = $clone(pos, token.Position); + if (!((((p.Config.Mode & 8) >>> 0) === 0)) && pos.IsValid() && (!((p.out.Line === pos.Line)) || !(p.out.Filename === pos.Filename))) { + p.output = $append(p.output, 255); + p.output = $appendSlice(p.output, new sliceType($stringToBytes(fmt.Sprintf("//line %s:%d\n", new sliceType$1([new $String(pos.Filename), new $Int(pos.Line)]))))); + p.output = $append(p.output, 255); + p.out.Filename = pos.Filename; + p.out.Line = pos.Line; + } + n = p.Config.Indent + p.indent >> 0; + i = 0; + while (true) { + if (!(i < n)) { break; } + p.output = $append(p.output, 9); + i = i + (1) >> 0; + } + p.pos.Offset = p.pos.Offset + (n) >> 0; + p.pos.Column = p.pos.Column + (n) >> 0; + p.out.Column = p.out.Column + (n) >> 0; + }; + printer.prototype.atLineBegin = function(pos) { return this.$val.atLineBegin(pos); }; + printer.ptr.prototype.writeByte = function(ch, n) { + var ch, i, n, p; + p = this; + if (p.out.Column === 1) { + p.atLineBegin(p.pos); + } + i = 0; + while (true) { + if (!(i < n)) { break; } + p.output = $append(p.output, ch); + i = i + (1) >> 0; + } + p.pos.Offset = p.pos.Offset + (n) >> 0; + if ((ch === 10) || (ch === 12)) { + p.pos.Line = p.pos.Line + (n) >> 0; + p.out.Line = p.out.Line + (n) >> 0; + p.pos.Column = 1; + p.out.Column = 1; + return; + } + p.pos.Column = p.pos.Column + (n) >> 0; + p.out.Column = p.out.Column + (n) >> 0; + }; + printer.prototype.writeByte = function(ch, n) { return this.$val.writeByte(ch, n); }; + printer.ptr.prototype.writeString = function(pos, s, isLit) { + var c, i, isLit, li, nlines, p, pos, s; + p = this; + pos = $clone(pos, token.Position); + if (p.out.Column === 1) { + p.atLineBegin(pos); + } + if (pos.IsValid()) { + $copy(p.pos, pos, token.Position); + } + if (isLit) { + p.output = $append(p.output, 255); + } + p.output = $appendSlice(p.output, new sliceType($stringToBytes(s))); + nlines = 0; + li = 0; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + if (s.charCodeAt(i) === 10) { + nlines = nlines + (1) >> 0; + li = i; + } + i = i + (1) >> 0; + } + p.pos.Offset = p.pos.Offset + (s.length) >> 0; + if (nlines > 0) { + p.pos.Line = p.pos.Line + (nlines) >> 0; + p.out.Line = p.out.Line + (nlines) >> 0; + c = s.length - li >> 0; + p.pos.Column = c; + p.out.Column = c; + } else { + p.pos.Column = p.pos.Column + (s.length) >> 0; + p.out.Column = p.out.Column + (s.length) >> 0; + } + if (isLit) { + p.output = $append(p.output, 255); + } + $copy(p.last, p.pos, token.Position); + }; + printer.prototype.writeString = function(pos, s, isLit) { return this.$val.writeString(pos, s, isLit); }; + printer.ptr.prototype.writeCommentPrefix = function(pos, next, prev, comment, tok) { + var _i, _i$1, _ref, _ref$1, _ref$2, _ref$3, ch, ch$1, comment, droppedLinebreak, hasSep, i, i$1, j, j$1, n, next, p, pos, prev, sep, tok, x, x$1, x$2, x$3, x$4; + p = this; + next = $clone(next, token.Position); + pos = $clone(pos, token.Position); + if (p.output.$length === 0) { + return; + } + if (pos.IsValid() && !(pos.Filename === p.last.Filename)) { + p.writeByte(12, 2); + return; + } + if ((pos.Line === p.last.Line) && (prev === ptrType$5.nil || !((prev.Text.charCodeAt(1) === 47)))) { + hasSep = false; + if (prev === ptrType$5.nil) { + j = 0; + _ref = p.wsbuf; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + ch = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + _ref$1 = ch; + if (_ref$1 === 32) { + (x = p.wsbuf, (i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i] = 0); + _i++; + continue; + } else if (_ref$1 === 11) { + hasSep = true; + _i++; + continue; + } else if (_ref$1 === 62) { + _i++; + continue; + } + j = i; + break; + } + p.writeWhitespace(j); + } + if (!hasSep) { + sep = 9; + if (pos.Line === next.Line) { + sep = 32; + } + p.writeByte(sep, 1); + } + } else { + droppedLinebreak = false; + j$1 = 0; + _ref$2 = p.wsbuf; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$2.$length)) { break; } + i$1 = _i$1; + ch$1 = ((_i$1 < 0 || _i$1 >= _ref$2.$length) ? $throwRuntimeError("index out of range") : _ref$2.$array[_ref$2.$offset + _i$1]); + _ref$3 = ch$1; + if (_ref$3 === 32 || _ref$3 === 11) { + (x$1 = p.wsbuf, (i$1 < 0 || i$1 >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + i$1] = 0); + _i$1++; + continue; + } else if (_ref$3 === 62) { + _i$1++; + continue; + } else if (_ref$3 === 60) { + if ((i$1 + 1 >> 0) < p.wsbuf.$length && ((x$2 = p.wsbuf, x$3 = i$1 + 1 >> 0, ((x$3 < 0 || x$3 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + x$3])) === 60)) { + _i$1++; + continue; + } + if (!((tok === 56)) && (pos.Column === next.Column)) { + _i$1++; + continue; + } + } else if (_ref$3 === 10 || _ref$3 === 12) { + (x$4 = p.wsbuf, (i$1 < 0 || i$1 >= x$4.$length) ? $throwRuntimeError("index out of range") : x$4.$array[x$4.$offset + i$1] = 0); + droppedLinebreak = prev === ptrType$5.nil; + } + j$1 = i$1; + break; + } + p.writeWhitespace(j$1); + n = 0; + if (pos.IsValid() && p.last.IsValid()) { + n = pos.Line - p.last.Line >> 0; + if (n < 0) { + n = 0; + } + } + if ((p.indent === 0) && droppedLinebreak) { + n = n + (1) >> 0; + } + if ((n === 0) && !(prev === ptrType$5.nil) && (prev.Text.charCodeAt(1) === 47)) { + n = 1; + } + if (n > 0) { + p.writeByte(12, nlimit(n)); + } + } + }; + printer.prototype.writeCommentPrefix = function(pos, next, prev, comment, tok) { return this.$val.writeCommentPrefix(pos, next, prev, comment, tok); }; + isBlank = function(s) { + var i, s; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + if (s.charCodeAt(i) > 32) { + return false; + } + i = i + (1) >> 0; + } + return true; + }; + commonPrefix = function(a, b) { + var a, b, i; + i = 0; + while (true) { + if (!(i < a.length && i < b.length && (a.charCodeAt(i) === b.charCodeAt(i)) && (a.charCodeAt(i) <= 32 || (a.charCodeAt(i) === 42)))) { break; } + i = i + (1) >> 0; + } + return a.substring(0, i); + }; + trimRight = function(s) { + var s; + return strings.TrimRightFunc(s, unicode.IsSpace); + }; + stripCommonPrefix = function(lines) { + var _i, _i$1, _ref, _ref$1, _tmp, _tmp$1, closing, first, first$1, i, i$1, i$2, i$3, i$4, last, line, line$1, line$2, lineOfStars, lines, n, n$1, prefix, suffix, x, x$1, x$2; + if (lines.$length <= 1) { + return; + } + prefix = ""; + if (lines.$length > 2) { + first = true; + _ref = $subslice(lines, 1, (lines.$length - 1 >> 0)); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + line = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (isBlank(line)) { + (x = 1 + i >> 0, (x < 0 || x >= lines.$length) ? $throwRuntimeError("index out of range") : lines.$array[lines.$offset + x] = ""); + } else if (first) { + prefix = commonPrefix(line, line); + first = false; + } else { + prefix = commonPrefix(prefix, line); + } + _i++; + } + } else { + line$1 = ((1 < 0 || 1 >= lines.$length) ? $throwRuntimeError("index out of range") : lines.$array[lines.$offset + 1]); + prefix = commonPrefix(line$1, line$1); + } + lineOfStars = false; + i$1 = strings.Index(prefix, "*"); + if (i$1 >= 0) { + if (i$1 > 0 && (prefix.charCodeAt((i$1 - 1 >> 0)) === 32)) { + i$1 = i$1 - (1) >> 0; + } + prefix = prefix.substring(0, i$1); + lineOfStars = true; + } else { + first$1 = ((0 < 0 || 0 >= lines.$length) ? $throwRuntimeError("index out of range") : lines.$array[lines.$offset + 0]); + if (isBlank(first$1.substring(2))) { + i$2 = prefix.length; + n = 0; + while (true) { + if (!(n < 3 && i$2 > 0 && (prefix.charCodeAt((i$2 - 1 >> 0)) === 32))) { break; } + i$2 = i$2 - (1) >> 0; + n = n + (1) >> 0; + } + if ((i$2 === prefix.length) && i$2 > 0 && (prefix.charCodeAt((i$2 - 1 >> 0)) === 9)) { + i$2 = i$2 - (1) >> 0; + } + prefix = prefix.substring(0, i$2); + } else { + suffix = $makeSlice(sliceType, first$1.length); + n$1 = 2; + while (true) { + if (!(n$1 < first$1.length && first$1.charCodeAt(n$1) <= 32)) { break; } + (n$1 < 0 || n$1 >= suffix.$length) ? $throwRuntimeError("index out of range") : suffix.$array[suffix.$offset + n$1] = first$1.charCodeAt(n$1); + n$1 = n$1 + (1) >> 0; + } + if (n$1 > 2 && (((2 < 0 || 2 >= suffix.$length) ? $throwRuntimeError("index out of range") : suffix.$array[suffix.$offset + 2]) === 9)) { + suffix = $subslice(suffix, 2, n$1); + } else { + _tmp = 32; _tmp$1 = 32; (0 < 0 || 0 >= suffix.$length) ? $throwRuntimeError("index out of range") : suffix.$array[suffix.$offset + 0] = _tmp; (1 < 0 || 1 >= suffix.$length) ? $throwRuntimeError("index out of range") : suffix.$array[suffix.$offset + 1] = _tmp$1; + suffix = $subslice(suffix, 0, n$1); + } + prefix = strings.TrimSuffix(prefix, $bytesToString(suffix)); + } + } + last = (x$1 = lines.$length - 1 >> 0, ((x$1 < 0 || x$1 >= lines.$length) ? $throwRuntimeError("index out of range") : lines.$array[lines.$offset + x$1])); + closing = "*/"; + i$3 = strings.Index(last, closing); + if (isBlank(last.substring(0, i$3))) { + if (lineOfStars) { + closing = " */"; + } + (x$2 = lines.$length - 1 >> 0, (x$2 < 0 || x$2 >= lines.$length) ? $throwRuntimeError("index out of range") : lines.$array[lines.$offset + x$2] = prefix + closing); + } else { + prefix = commonPrefix(prefix, last); + } + _ref$1 = lines; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i$4 = _i$1; + line$2 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i$1]); + if (i$4 > 0 && !(line$2 === "")) { + (i$4 < 0 || i$4 >= lines.$length) ? $throwRuntimeError("index out of range") : lines.$array[lines.$offset + i$4] = line$2.substring(prefix.length); + } + _i$1++; + } + }; + printer.ptr.prototype.writeComment = function(comment) { + var $deferred = [], $err = null, _i, _i$1, _ref, _ref$1, _tuple, comment, err, i, i$1, i$2, indent, ldir, line, line$1, line$2, lines, p, pos, text, x; + /* */ try { $deferFrames.push($deferred); + p = this; + text = comment.Text; + pos = $clone(p.posFor(comment.Pos()), token.Position); + if (strings.HasPrefix(text, "//line ") && (!pos.IsValid() || (pos.Column === 1))) { + ldir = strings.TrimSpace(text.substring(7)); + i = strings.LastIndex(ldir, ":"); + if (i >= 0) { + _tuple = strconv.Atoi(ldir.substring((i + 1 >> 0))); line = _tuple[0]; err = _tuple[1]; + if ($interfaceIsEqual(err, $ifaceNil) && line > 0) { + indent = p.indent; + p.indent = 0; + $deferred.push([(function() { + p.pos.Filename = ldir.substring(0, i); + p.pos.Line = line; + p.pos.Column = 1; + p.indent = indent; + }), []]); + } + } + } + if (text.charCodeAt(1) === 47) { + p.writeString(pos, trimRight(text), true); + return; + } + lines = strings.Split(text, "\n"); + if (pos.IsValid() && (pos.Column === 1) && p.indent > 0) { + _ref = $subslice(lines, 1); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i$1 = _i; + line$1 = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + (x = 1 + i$1 >> 0, (x < 0 || x >= lines.$length) ? $throwRuntimeError("index out of range") : lines.$array[lines.$offset + x] = " " + line$1); + _i++; + } + } + stripCommonPrefix(lines); + _ref$1 = lines; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i$2 = _i$1; + line$2 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i$1]); + if (i$2 > 0) { + p.writeByte(12, 1); + $copy(pos, p.pos, token.Position); + } + if (line$2.length > 0) { + p.writeString(pos, trimRight(line$2), true); + } + _i$1++; + } + /* */ } catch(err) { $err = err; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + printer.prototype.writeComment = function(comment) { return this.$val.writeComment(comment); }; + printer.ptr.prototype.writeCommentSuffix = function(needsLinebreak) { + var _i, _ref, _ref$1, ch, droppedFF = false, i, needsLinebreak, p, wroteNewline = false, x, x$1; + p = this; + _ref = p.wsbuf; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + ch = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + _ref$1 = ch; + if (_ref$1 === 32 || _ref$1 === 11) { + (x = p.wsbuf, (i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i] = 0); + } else if (_ref$1 === 62 || _ref$1 === 60) { + } else if (_ref$1 === 10 || _ref$1 === 12) { + if (needsLinebreak) { + needsLinebreak = false; + wroteNewline = true; + } else { + if (ch === 12) { + droppedFF = true; + } + (x$1 = p.wsbuf, (i < 0 || i >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + i] = 0); + } + } + _i++; + } + p.writeWhitespace(p.wsbuf.$length); + if (needsLinebreak) { + p.writeByte(10, 1); + wroteNewline = true; + } + return [wroteNewline, droppedFF]; + }; + printer.prototype.writeCommentSuffix = function(needsLinebreak) { return this.$val.writeCommentSuffix(needsLinebreak); }; + printer.ptr.prototype.intersperseComments = function(next, tok) { + var _i, _ref, _tuple, c, droppedFF = false, last, needsLinebreak, next, p, tok, wroteNewline = false; + p = this; + next = $clone(next, token.Position); + last = ptrType$5.nil; + while (true) { + if (!(p.commentBefore(next))) { break; } + _ref = p.commentInfo.comment.List; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + c = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + p.writeCommentPrefix(p.posFor(c.Pos()), next, last, c, tok); + p.writeComment(c); + last = c; + _i++; + } + p.nextComment(); + } + if (!(last === ptrType$5.nil)) { + if (((p.mode & 1) === 0) && (last.Text.charCodeAt(1) === 42) && (p.lineFor(last.Pos()) === next.Line) && !((tok === 52)) && (!((tok === 54)) || (p.prevOpen === 49)) && (!((tok === 55)) || (p.prevOpen === 50))) { + p.writeByte(32, 1); + } + needsLinebreak = (last.Text.charCodeAt(1) === 47) || (tok === 56) && ((p.mode & 2) === 0) || (tok === 1); + _tuple = p.writeCommentSuffix(needsLinebreak); wroteNewline = _tuple[0]; droppedFF = _tuple[1]; + return [wroteNewline, droppedFF]; + } + p.internalError(new sliceType$1([new $String("intersperseComments called without pending comments")])); + return [wroteNewline, droppedFF]; + }; + printer.prototype.intersperseComments = function(next, tok) { return this.$val.intersperseComments(next, tok); }; + printer.ptr.prototype.writeWhitespace = function(n) { + var _ref, _tmp, _tmp$1, ch, i, l, n, p, x, x$1, x$2, x$3, x$4, x$5; + p = this; + i = 0; + while (true) { + if (!(i < n)) { break; } + ch = (x = p.wsbuf, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + _ref = ch; + if (_ref === 0) { + } else if (_ref === 62) { + p.indent = p.indent + (1) >> 0; + } else if (_ref === 60) { + p.indent = p.indent - (1) >> 0; + if (p.indent < 0) { + p.internalError(new sliceType$1([new $String("negative indentation:"), new $Int(p.indent)])); + p.indent = 0; + } + } else if (_ref === 10 || _ref === 12) { + if ((i + 1 >> 0) < n && ((x$1 = p.wsbuf, x$2 = i + 1 >> 0, ((x$2 < 0 || x$2 >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + x$2])) === 60)) { + _tmp = 60; _tmp$1 = 12; (x$3 = p.wsbuf, (i < 0 || i >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + i] = _tmp); (x$4 = p.wsbuf, x$5 = i + 1 >> 0, (x$5 < 0 || x$5 >= x$4.$length) ? $throwRuntimeError("index out of range") : x$4.$array[x$4.$offset + x$5] = _tmp$1); + i = i - (1) >> 0; + i = i + (1) >> 0; + continue; + } + p.writeByte((ch << 24 >>> 24), 1); + } else { + p.writeByte((ch << 24 >>> 24), 1); + } + i = i + (1) >> 0; + } + l = $copySlice(p.wsbuf, $subslice(p.wsbuf, n)); + p.wsbuf = $subslice(p.wsbuf, 0, l); + }; + printer.prototype.writeWhitespace = function(n) { return this.$val.writeWhitespace(n); }; + nlimit = function(n) { + var n; + if (n > 2) { + n = 2; + } + return n; + }; + mayCombine = function(prev, next) { + var _ref, b = false, next, prev; + _ref = prev; + if (_ref === 5) { + b = next === 46; + } else if (_ref === 12) { + b = next === 43; + } else if (_ref === 13) { + b = next === 45; + } else if (_ref === 15) { + b = next === 42; + } else if (_ref === 40) { + b = (next === 45) || (next === 60); + } else if (_ref === 17) { + b = (next === 38) || (next === 94); + } + return b; + }; + printer.ptr.prototype.print = function(args) { + var _i, _ref, _ref$1, _ref$2, _ref$3, _tuple, arg, args, ch, data, droppedFF, i, impliedSemi, isLit, n, next, p, s, wroteNewline, x, x$1, x$2; + p = this; + _ref = args; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + arg = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + data = ""; + isLit = false; + impliedSemi = false; + _ref$1 = p.lastTok; + if (_ref$1 === 0) { + } else if (_ref$1 === 49 || _ref$1 === 50) { + p.prevOpen = p.lastTok; + } else { + p.prevOpen = 0; + } + _ref$2 = arg; + if ($assertType(_ref$2, pmode, true)[1]) { + x = _ref$2.$val; + p.mode = (p.mode ^ (x)) >> 0; + _i++; + continue; + } else if ($assertType(_ref$2, whiteSpace, true)[1]) { + x = _ref$2.$val; + if (x === 0) { + _i++; + continue; + } + i = p.wsbuf.$length; + if (i === p.wsbuf.$capacity) { + p.writeWhitespace(i); + i = 0; + } + p.wsbuf = $subslice(p.wsbuf, 0, (i + 1 >> 0)); + (x$1 = p.wsbuf, (i < 0 || i >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + i] = x); + if ((x === 10) || (x === 12)) { + p.impliedSemi = false; + } + p.lastTok = 0; + _i++; + continue; + } else if ($assertType(_ref$2, ptrType$3, true)[1]) { + x = _ref$2.$val; + data = x.Name; + impliedSemi = true; + p.lastTok = 4; + } else if ($assertType(_ref$2, ptrType$4, true)[1]) { + x = _ref$2.$val; + data = x.Value; + isLit = true; + impliedSemi = true; + p.lastTok = x.Kind; + } else if ($assertType(_ref$2, token.Token, true)[1]) { + x = _ref$2.$val; + s = new token.Token(x).String(); + if (mayCombine(p.lastTok, s.charCodeAt(0))) { + if (!((p.wsbuf.$length === 0))) { + p.internalError(new sliceType$1([new $String("whitespace buffer not empty")])); + } + p.wsbuf = $subslice(p.wsbuf, 0, 1); + (x$2 = p.wsbuf, (0 < 0 || 0 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + 0] = 32); + } + data = s; + _ref$3 = x; + if (_ref$3 === 61 || _ref$3 === 65 || _ref$3 === 69 || _ref$3 === 80 || _ref$3 === 37 || _ref$3 === 38 || _ref$3 === 54 || _ref$3 === 55 || _ref$3 === 56) { + impliedSemi = true; + } + p.lastTok = x; + } else if ($assertType(_ref$2, token.Pos, true)[1]) { + x = _ref$2.$val; + if (new token.Pos(x).IsValid()) { + $copy(p.pos, p.posFor(x), token.Position); + } + _i++; + continue; + } else if ($assertType(_ref$2, $String, true)[1]) { + x = _ref$2.$val; + data = x; + isLit = true; + impliedSemi = true; + p.lastTok = 9; + } else { + x = _ref$2; + fmt.Fprintf(os.Stderr, "print: unsupported argument %v (%T)\n", new sliceType$1([arg, arg])); + $panic(new $String("go/printer type")); + } + next = $clone(p.pos, token.Position); + _tuple = p.flush(next, p.lastTok); wroteNewline = _tuple[0]; droppedFF = _tuple[1]; + if (!p.impliedSemi) { + n = nlimit(next.Line - p.pos.Line >> 0); + if (wroteNewline && (n === 2)) { + n = 1; + } + if (n > 0) { + ch = 10; + if (droppedFF) { + ch = 12; + } + p.writeByte(ch, n); + impliedSemi = false; + } + } + if (!($pointerIsEqual(p.linePtr, ptrType$6.nil))) { + p.linePtr.$set(p.out.Line); + p.linePtr = ptrType$6.nil; + } + p.writeString(next, data, isLit); + p.impliedSemi = impliedSemi; + _i++; + } + }; + printer.prototype.print = function(args) { return this.$val.print(args); }; + printer.ptr.prototype.flush = function(next, tok) { + var _tuple, droppedFF = false, next, p, tok, wroteNewline = false; + p = this; + next = $clone(next, token.Position); + if (p.commentBefore(next)) { + _tuple = p.intersperseComments(next, tok); wroteNewline = _tuple[0]; droppedFF = _tuple[1]; + } else { + p.writeWhitespace(p.wsbuf.$length); + } + return [wroteNewline, droppedFF]; + }; + printer.prototype.flush = function(next, tok) { return this.$val.flush(next, tok); }; + getDoc = function(n) { + var _ref, n, n$1; + _ref = n; + if ($assertType(_ref, ptrType$53, true)[1]) { + n$1 = _ref.$val; + return n$1.Doc; + } else if ($assertType(_ref, ptrType$48, true)[1]) { + n$1 = _ref.$val; + return n$1.Doc; + } else if ($assertType(_ref, ptrType$47, true)[1]) { + n$1 = _ref.$val; + return n$1.Doc; + } else if ($assertType(_ref, ptrType$49, true)[1]) { + n$1 = _ref.$val; + return n$1.Doc; + } else if ($assertType(_ref, ptrType$51, true)[1]) { + n$1 = _ref.$val; + return n$1.Doc; + } else if ($assertType(_ref, ptrType$52, true)[1]) { + n$1 = _ref.$val; + return n$1.Doc; + } else if ($assertType(_ref, ptrType$54, true)[1]) { + n$1 = _ref.$val; + return n$1.Doc; + } + return ptrType.nil; + }; + printer.ptr.prototype.printNode = function(node) { + var $args = arguments, $s = 0, $this = this, _i, _ref, _ref$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, beg, cnode, comments, doc, end, i, j, n, n$1, n$2, ok, ok$1, ok$2, ok$3, ok$4, p, s; + /* */ s: while (true) { switch ($s) { case 0: + p = $this; + comments = sliceType$2.nil; + _tuple = $assertType(node, ptrType$55, true); cnode = _tuple[0]; ok = _tuple[1]; + if (ok) { + node = cnode.Node; + comments = cnode.Comments; + } + /* if (!(comments === sliceType$2.nil)) { */ if (!(comments === sliceType$2.nil)) {} else { $s = 1; continue; } + _tuple$1 = $assertType(node, ast.Node, true); n = _tuple$1[0]; ok$1 = _tuple$1[1]; + /* if (!ok$1) { */ if (!ok$1) {} else { $s = 3; continue; } + /* goto unsupported */ $s = 4; continue; + /* } */ case 3: + beg = n.Pos(); + end = n.End(); + doc = getDoc(n); + if (!(doc === ptrType.nil)) { + beg = doc.Pos(); + } + i = 0; + while (true) { + if (!(i < comments.$length && ((i < 0 || i >= comments.$length) ? $throwRuntimeError("index out of range") : comments.$array[comments.$offset + i]).End() < beg)) { break; } + i = i + (1) >> 0; + } + j = i; + while (true) { + if (!(j < comments.$length && ((j < 0 || j >= comments.$length) ? $throwRuntimeError("index out of range") : comments.$array[comments.$offset + j]).Pos() < end)) { break; } + j = j + (1) >> 0; + } + if (i < j) { + p.comments = $subslice(comments, i, j); + } + /* } else { */ $s = 2; continue; case 1: + _tuple$2 = $assertType(node, ptrType$54, true); n$1 = _tuple$2[0]; ok$2 = _tuple$2[1]; + if (ok$2) { + p.comments = n$1.Comments; + } + /* } */ case 2: + p.useNodeComments = p.comments === sliceType$2.nil; + p.nextComment(); + _ref = node; + /* if ($assertType(_ref, ast.Expr, true)[1]) { */ if ($assertType(_ref, ast.Expr, true)[1]) {} else if ($assertType(_ref, ast.Stmt, true)[1]) { $s = 5; continue; } else if ($assertType(_ref, ast.Decl, true)[1]) { $s = 6; continue; } else if ($assertType(_ref, ast.Spec, true)[1]) { $s = 7; continue; } else if ($assertType(_ref, sliceType$8, true)[1]) { $s = 8; continue; } else if ($assertType(_ref, sliceType$9, true)[1]) { $s = 9; continue; } else if ($assertType(_ref, ptrType$54, true)[1]) { $s = 10; continue; } else { $s = 11; continue; } + n$2 = _ref; + p.expr(n$2); + /* } else if ($assertType(_ref, ast.Stmt, true)[1]) { */ $s = 12; continue; case 5: + n$2 = _ref; + _tuple$3 = $assertType(n$2, ptrType$27, true); ok$3 = _tuple$3[1]; + if (ok$3) { + p.indent = 1; + } + p.stmt(n$2, false); + /* } else if ($assertType(_ref, ast.Decl, true)[1]) { */ $s = 12; continue; case 6: + n$2 = _ref; + p.decl(n$2); + /* } else if ($assertType(_ref, ast.Spec, true)[1]) { */ $s = 12; continue; case 7: + n$2 = _ref; + p.spec(n$2, 1, false); + /* } else if ($assertType(_ref, sliceType$8, true)[1]) { */ $s = 12; continue; case 8: + n$2 = _ref.$val; + _ref$1 = n$2; + _i = 0; + while (true) { + if (!(_i < _ref$1.$length)) { break; } + s = ((_i < 0 || _i >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i]); + _tuple$4 = $assertType(s, ptrType$27, true); ok$4 = _tuple$4[1]; + if (ok$4) { + p.indent = 1; + } + _i++; + } + p.stmtList(n$2, 0, false); + /* } else if ($assertType(_ref, sliceType$9, true)[1]) { */ $s = 12; continue; case 9: + n$2 = _ref.$val; + p.declList(n$2); + /* } else if ($assertType(_ref, ptrType$54, true)[1]) { */ $s = 12; continue; case 10: + n$2 = _ref.$val; + p.file(n$2); + /* } else { */ $s = 12; continue; case 11: + n$2 = _ref; + /* goto unsupported */ $s = 4; continue; + /* } */ case 12: + return $ifaceNil; + /* unsupported: */ case 4: + return fmt.Errorf("go/printer: unsupported node type %T", new sliceType$1([node])); + /* */ case -1: } return; } + }; + printer.prototype.printNode = function(node) { return this.$val.printNode(node); }; + trimmer.ptr.prototype.resetSpace = function() { + var p; + p = this; + p.state = 0; + p.space = $subslice(p.space, 0, 0); + }; + trimmer.prototype.resetSpace = function() { return this.$val.resetSpace(); }; + trimmer.ptr.prototype.Write = function(data) { + var _i, _ref, _ref$1, _ref$2, _ref$3, _ref$4, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, b, data, err = $ifaceNil, m, n = 0, p; + p = this; + m = 0; + b = 0; + _ref = data; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + n = _i; + b = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (b === 11) { + b = 9; + } + _ref$1 = p.state; + if (_ref$1 === 0) { + _ref$2 = b; + if (_ref$2 === 9 || _ref$2 === 32) { + p.space = $append(p.space, b); + } else if (_ref$2 === 10 || _ref$2 === 12) { + p.resetSpace(); + _tuple = p.output.Write(aNewline); err = _tuple[1]; + } else if (_ref$2 === 255) { + _tuple$1 = p.output.Write(p.space); err = _tuple$1[1]; + p.state = 1; + m = n + 1 >> 0; + } else { + _tuple$2 = p.output.Write(p.space); err = _tuple$2[1]; + p.state = 2; + m = n; + } + } else if (_ref$1 === 1) { + if (b === 255) { + _tuple$3 = p.output.Write($subslice(data, m, n)); err = _tuple$3[1]; + p.resetSpace(); + } + } else if (_ref$1 === 2) { + _ref$3 = b; + if (_ref$3 === 9 || _ref$3 === 32) { + _tuple$4 = p.output.Write($subslice(data, m, n)); err = _tuple$4[1]; + p.resetSpace(); + p.space = $append(p.space, b); + } else if (_ref$3 === 10 || _ref$3 === 12) { + _tuple$5 = p.output.Write($subslice(data, m, n)); err = _tuple$5[1]; + p.resetSpace(); + _tuple$6 = p.output.Write(aNewline); err = _tuple$6[1]; + } else if (_ref$3 === 255) { + _tuple$7 = p.output.Write($subslice(data, m, n)); err = _tuple$7[1]; + p.state = 1; + m = n + 1 >> 0; + } + } else { + $panic(new $String("unreachable")); + } + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [n, err]; + } + _i++; + } + n = data.$length; + _ref$4 = p.state; + if (_ref$4 === 1 || _ref$4 === 2) { + _tuple$8 = p.output.Write($subslice(data, m, n)); err = _tuple$8[1]; + p.resetSpace(); + } + return [n, err]; + }; + trimmer.prototype.Write = function(data) { return this.$val.Write(data); }; + Config.ptr.prototype.fprint = function(output, fset, node, nodeSizes) { + var _tuple, _tuple$1, cfg, err = $ifaceNil, fset, minwidth, node, nodeSizes, output, p, padchar, tw, twmode; + cfg = this; + p = $clone(new printer.ptr(), printer); + p.init(cfg, fset, nodeSizes); + err = p.printNode(node); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + p.impliedSemi = false; + p.flush(new token.Position.ptr("", 1073741824, 1073741824, 0), 1); + output = new trimmer.ptr(output, 0, sliceType.nil); + if (((cfg.Mode & 1) >>> 0) === 0) { + minwidth = cfg.Tabwidth; + padchar = 9; + if (!((((cfg.Mode & 4) >>> 0) === 0))) { + padchar = 32; + } + twmode = 8; + if (!((((cfg.Mode & 2) >>> 0) === 0))) { + minwidth = 0; + twmode = (twmode | (16)) >>> 0; + } + output = tabwriter.NewWriter(output, minwidth, cfg.Tabwidth, 1, padchar, twmode); + } + _tuple = output.Write(p.output); err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + _tuple$1 = $assertType(output, ptrType$56, true); tw = _tuple$1[0]; + if (!(tw === ptrType$56.nil)) { + err = tw.Flush(); + } + return err; + }; + Config.prototype.fprint = function(output, fset, node, nodeSizes) { return this.$val.fprint(output, fset, node, nodeSizes); }; + Config.ptr.prototype.Fprint = function(output, fset, node) { + var cfg, fset, node, output; + cfg = this; + return cfg.fprint(output, fset, node, new $Map()); + }; + Config.prototype.Fprint = function(output, fset, node) { return this.$val.Fprint(output, fset, node); }; + ptrType$59.methods = [{prop: "linebreak", name: "linebreak", pkg: "go/printer", typ: $funcType([$Int, $Int, whiteSpace, $Bool], [$Bool], false)}, {prop: "setComment", name: "setComment", pkg: "go/printer", typ: $funcType([ptrType], [], false)}, {prop: "identList", name: "identList", pkg: "go/printer", typ: $funcType([sliceType$4, $Bool], [], false)}, {prop: "exprList", name: "exprList", pkg: "go/printer", typ: $funcType([token.Pos, sliceType$3, $Int, exprListMode, token.Pos], [], false)}, {prop: "parameters", name: "parameters", pkg: "go/printer", typ: $funcType([ptrType$2], [], false)}, {prop: "signature", name: "signature", pkg: "go/printer", typ: $funcType([ptrType$2, ptrType$2], [], false)}, {prop: "isOneLineFieldList", name: "isOneLineFieldList", pkg: "go/printer", typ: $funcType([sliceType$10], [$Bool], false)}, {prop: "setLineComment", name: "setLineComment", pkg: "go/printer", typ: $funcType([$String], [], false)}, {prop: "fieldList", name: "fieldList", pkg: "go/printer", typ: $funcType([ptrType$2, $Bool, $Bool], [], false)}, {prop: "binaryExpr", name: "binaryExpr", pkg: "go/printer", typ: $funcType([ptrType$8, $Int, $Int, $Int], [], false)}, {prop: "expr1", name: "expr1", pkg: "go/printer", typ: $funcType([ast.Expr, $Int, $Int], [], false)}, {prop: "expr0", name: "expr0", pkg: "go/printer", typ: $funcType([ast.Expr, $Int], [], false)}, {prop: "expr", name: "expr", pkg: "go/printer", typ: $funcType([ast.Expr], [], false)}, {prop: "stmtList", name: "stmtList", pkg: "go/printer", typ: $funcType([sliceType$8, $Int, $Bool], [], false)}, {prop: "block", name: "block", pkg: "go/printer", typ: $funcType([ptrType$38, $Int], [], false)}, {prop: "controlClause", name: "controlClause", pkg: "go/printer", typ: $funcType([$Bool, ast.Stmt, ast.Expr, ast.Stmt], [], false)}, {prop: "indentList", name: "indentList", pkg: "go/printer", typ: $funcType([sliceType$3], [$Bool], false)}, {prop: "stmt", name: "stmt", pkg: "go/printer", typ: $funcType([ast.Stmt, $Bool], [], false)}, {prop: "valueSpec", name: "valueSpec", pkg: "go/printer", typ: $funcType([ptrType$47, $Bool], [], false)}, {prop: "spec", name: "spec", pkg: "go/printer", typ: $funcType([ast.Spec, $Int, $Bool], [], false)}, {prop: "genDecl", name: "genDecl", pkg: "go/printer", typ: $funcType([ptrType$51], [], false)}, {prop: "nodeSize", name: "nodeSize", pkg: "go/printer", typ: $funcType([ast.Node, $Int], [$Int], false)}, {prop: "bodySize", name: "bodySize", pkg: "go/printer", typ: $funcType([ptrType$38, $Int], [$Int], false)}, {prop: "adjBlock", name: "adjBlock", pkg: "go/printer", typ: $funcType([$Int, whiteSpace, ptrType$38], [], false)}, {prop: "distanceFrom", name: "distanceFrom", pkg: "go/printer", typ: $funcType([token.Pos], [$Int], false)}, {prop: "funcDecl", name: "funcDecl", pkg: "go/printer", typ: $funcType([ptrType$52], [], false)}, {prop: "decl", name: "decl", pkg: "go/printer", typ: $funcType([ast.Decl], [], false)}, {prop: "declList", name: "declList", pkg: "go/printer", typ: $funcType([sliceType$9], [], false)}, {prop: "file", name: "file", pkg: "go/printer", typ: $funcType([ptrType$54], [], false)}, {prop: "init", name: "init", pkg: "go/printer", typ: $funcType([ptrType$58, ptrType$57, mapType], [], false)}, {prop: "internalError", name: "internalError", pkg: "go/printer", typ: $funcType([sliceType$1], [], true)}, {prop: "commentsHaveNewline", name: "commentsHaveNewline", pkg: "go/printer", typ: $funcType([sliceType$5], [$Bool], false)}, {prop: "nextComment", name: "nextComment", pkg: "go/printer", typ: $funcType([], [], false)}, {prop: "commentBefore", name: "commentBefore", pkg: "go/printer", typ: $funcType([token.Position], [$Bool], false)}, {prop: "commentSizeBefore", name: "commentSizeBefore", pkg: "go/printer", typ: $funcType([token.Position], [$Int], false)}, {prop: "recordLine", name: "recordLine", pkg: "go/printer", typ: $funcType([ptrType$6], [], false)}, {prop: "linesFrom", name: "linesFrom", pkg: "go/printer", typ: $funcType([$Int], [$Int], false)}, {prop: "posFor", name: "posFor", pkg: "go/printer", typ: $funcType([token.Pos], [token.Position], false)}, {prop: "lineFor", name: "lineFor", pkg: "go/printer", typ: $funcType([token.Pos], [$Int], false)}, {prop: "atLineBegin", name: "atLineBegin", pkg: "go/printer", typ: $funcType([token.Position], [], false)}, {prop: "writeByte", name: "writeByte", pkg: "go/printer", typ: $funcType([$Uint8, $Int], [], false)}, {prop: "writeString", name: "writeString", pkg: "go/printer", typ: $funcType([token.Position, $String, $Bool], [], false)}, {prop: "writeCommentPrefix", name: "writeCommentPrefix", pkg: "go/printer", typ: $funcType([token.Position, token.Position, ptrType$5, ptrType$5, token.Token], [], false)}, {prop: "writeComment", name: "writeComment", pkg: "go/printer", typ: $funcType([ptrType$5], [], false)}, {prop: "writeCommentSuffix", name: "writeCommentSuffix", pkg: "go/printer", typ: $funcType([$Bool], [$Bool, $Bool], false)}, {prop: "intersperseComments", name: "intersperseComments", pkg: "go/printer", typ: $funcType([token.Position, token.Token], [$Bool, $Bool], false)}, {prop: "writeWhitespace", name: "writeWhitespace", pkg: "go/printer", typ: $funcType([$Int], [], false)}, {prop: "print", name: "print", pkg: "go/printer", typ: $funcType([sliceType$1], [], true)}, {prop: "flush", name: "flush", pkg: "go/printer", typ: $funcType([token.Position, token.Token], [$Bool, $Bool], false)}, {prop: "printNode", name: "printNode", pkg: "go/printer", typ: $funcType([$emptyInterface], [$error], false)}]; + ptrType$60.methods = [{prop: "resetSpace", name: "resetSpace", pkg: "go/printer", typ: $funcType([], [], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}]; + ptrType$58.methods = [{prop: "fprint", name: "fprint", pkg: "go/printer", typ: $funcType([io.Writer, ptrType$57, $emptyInterface, mapType], [$error], false)}, {prop: "Fprint", name: "Fprint", pkg: "", typ: $funcType([io.Writer, ptrType$57, $emptyInterface], [$error], false)}]; + commentInfo.init([{prop: "cindex", name: "cindex", pkg: "go/printer", typ: $Int, tag: ""}, {prop: "comment", name: "comment", pkg: "go/printer", typ: ptrType, tag: ""}, {prop: "commentOffset", name: "commentOffset", pkg: "go/printer", typ: $Int, tag: ""}, {prop: "commentNewline", name: "commentNewline", pkg: "go/printer", typ: $Bool, tag: ""}]); + printer.init([{prop: "Config", name: "", pkg: "", typ: Config, tag: ""}, {prop: "fset", name: "fset", pkg: "go/printer", typ: ptrType$57, tag: ""}, {prop: "output", name: "output", pkg: "go/printer", typ: sliceType, tag: ""}, {prop: "indent", name: "indent", pkg: "go/printer", typ: $Int, tag: ""}, {prop: "mode", name: "mode", pkg: "go/printer", typ: pmode, tag: ""}, {prop: "impliedSemi", name: "impliedSemi", pkg: "go/printer", typ: $Bool, tag: ""}, {prop: "lastTok", name: "lastTok", pkg: "go/printer", typ: token.Token, tag: ""}, {prop: "prevOpen", name: "prevOpen", pkg: "go/printer", typ: token.Token, tag: ""}, {prop: "wsbuf", name: "wsbuf", pkg: "go/printer", typ: sliceType$7, tag: ""}, {prop: "pos", name: "pos", pkg: "go/printer", typ: token.Position, tag: ""}, {prop: "out", name: "out", pkg: "go/printer", typ: token.Position, tag: ""}, {prop: "last", name: "last", pkg: "go/printer", typ: token.Position, tag: ""}, {prop: "linePtr", name: "linePtr", pkg: "go/printer", typ: ptrType$6, tag: ""}, {prop: "comments", name: "comments", pkg: "go/printer", typ: sliceType$2, tag: ""}, {prop: "useNodeComments", name: "useNodeComments", pkg: "go/printer", typ: $Bool, tag: ""}, {prop: "commentInfo", name: "", pkg: "go/printer", typ: commentInfo, tag: ""}, {prop: "nodeSizes", name: "nodeSizes", pkg: "go/printer", typ: mapType, tag: ""}, {prop: "cachedPos", name: "cachedPos", pkg: "go/printer", typ: token.Pos, tag: ""}, {prop: "cachedLine", name: "cachedLine", pkg: "go/printer", typ: $Int, tag: ""}]); + trimmer.init([{prop: "output", name: "output", pkg: "go/printer", typ: io.Writer, tag: ""}, {prop: "state", name: "state", pkg: "go/printer", typ: $Int, tag: ""}, {prop: "space", name: "space", pkg: "go/printer", typ: sliceType, tag: ""}]); + Config.init([{prop: "Mode", name: "Mode", pkg: "", typ: Mode, tag: ""}, {prop: "Tabwidth", name: "Tabwidth", pkg: "", typ: $Int, tag: ""}, {prop: "Indent", name: "Indent", pkg: "", typ: $Int, tag: ""}]); + CommentedNode.init([{prop: "Node", name: "Node", pkg: "", typ: $emptyInterface, tag: ""}, {prop: "Comments", name: "Comments", pkg: "", typ: sliceType$2, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_printer = function() { while (true) { switch ($s) { case 0: + $r = bytes.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = fmt.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = ast.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = token.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = io.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + $r = os.$init($BLOCKING); /* */ $s = 6; case 6: if ($r && $r.$blocking) { $r = $r(); } + $r = strconv.$init($BLOCKING); /* */ $s = 7; case 7: if ($r && $r.$blocking) { $r = $r(); } + $r = strings.$init($BLOCKING); /* */ $s = 8; case 8: if ($r && $r.$blocking) { $r = $r(); } + $r = testing.$init($BLOCKING); /* */ $s = 9; case 9: if ($r && $r.$blocking) { $r = $r(); } + $r = tabwriter.$init($BLOCKING); /* */ $s = 10; case 10: if ($r && $r.$blocking) { $r = $r(); } + $r = unicode.$init($BLOCKING); /* */ $s = 11; case 11: if ($r && $r.$blocking) { $r = $r(); } + $r = utf8.$init($BLOCKING); /* */ $s = 12; case 12: if ($r && $r.$blocking) { $r = $r(); } + aNewline = new sliceType($stringToBytes("\n")); + /* */ } return; } }; $init_printer.$blocking = true; return $init_printer; + }; + return $pkg; +})(); +$packages["go/format"] = (function() { + var $pkg = {}, bytes, fmt, ast, parser, printer, token, io, strings, ptrType, sliceType$2, config, Source, parse, format, isSpace; + bytes = $packages["bytes"]; + fmt = $packages["fmt"]; + ast = $packages["go/ast"]; + parser = $packages["go/parser"]; + printer = $packages["go/printer"]; + token = $packages["go/token"]; + io = $packages["io"]; + strings = $packages["strings"]; + ptrType = $ptrType(ast.File); + sliceType$2 = $sliceType($Uint8); + Source = $pkg.Source = function(src) { + var _tuple, err, file, fset, indentAdj, sourceAdj, src; + fset = token.NewFileSet(); + _tuple = parse(fset, "", src, true); file = _tuple[0]; sourceAdj = _tuple[1]; indentAdj = _tuple[2]; err = _tuple[3]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [sliceType$2.nil, err]; + } + if (sourceAdj === $throwNilPointerError) { + ast.SortImports(fset, file); + } + return format(fset, file, sourceAdj, indentAdj, src, config); + }; + parse = function(fset, filename, src, fragmentOk) { + var _tuple, _tuple$1, _tuple$2, err = $ifaceNil, file = ptrType.nil, filename, fragmentOk, fset, fsrc, indentAdj = 0, psrc, sourceAdj = $throwNilPointerError, src; + _tuple = parser.ParseFile(fset, filename, src, 4); file = _tuple[0]; err = _tuple[1]; + if ($interfaceIsEqual(err, $ifaceNil) || !fragmentOk || !strings.Contains(err.Error(), "expected 'package'")) { + return [file, sourceAdj, indentAdj, err]; + } + psrc = $appendSlice(new sliceType$2($stringToBytes("package p;")), src); + _tuple$1 = parser.ParseFile(fset, filename, psrc, 4); file = _tuple$1[0]; err = _tuple$1[1]; + if ($interfaceIsEqual(err, $ifaceNil)) { + sourceAdj = (function(src$1, indent) { + var indent, src$1; + src$1 = $subslice(src$1, (indent + 10 >> 0)); + return bytes.TrimSpace(src$1); + }); + return [file, sourceAdj, indentAdj, err]; + } + if (!strings.Contains(err.Error(), "expected declaration")) { + return [file, sourceAdj, indentAdj, err]; + } + fsrc = $append($appendSlice(new sliceType$2($stringToBytes("package p; func _() {")), src), 10, 125); + _tuple$2 = parser.ParseFile(fset, filename, fsrc, 4); file = _tuple$2[0]; err = _tuple$2[1]; + if ($interfaceIsEqual(err, $ifaceNil)) { + sourceAdj = (function(src$1, indent) { + var indent, src$1; + if (indent < 0) { + indent = 0; + } + src$1 = $subslice(src$1, ((2 * indent >> 0) + 21 >> 0)); + src$1 = $subslice(src$1, 0, (src$1.$length - ((indent + 3 >> 0)) >> 0)); + return bytes.TrimSpace(src$1); + }); + indentAdj = -1; + } + return [file, sourceAdj, indentAdj, err]; + }; + format = function(fset, file, sourceAdj, indentAdj, src, cfg) { + var _i, _ref, _ref$1, _tmp, _tmp$1, b, buf, buf$1, cfg, err, err$1, file, fset, hasSpace, i, i$1, indent, indentAdj, j, res, sourceAdj, src, x; + cfg = $clone(cfg, printer.Config); + if (sourceAdj === $throwNilPointerError) { + buf = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + err = cfg.Fprint(buf, fset, file); + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [sliceType$2.nil, err]; + } + return [buf.Bytes(), $ifaceNil]; + } + _tmp = 0; _tmp$1 = 0; i = _tmp; j = _tmp$1; + while (true) { + if (!(j < src.$length && isSpace(((j < 0 || j >= src.$length) ? $throwRuntimeError("index out of range") : src.$array[src.$offset + j])))) { break; } + if (((j < 0 || j >= src.$length) ? $throwRuntimeError("index out of range") : src.$array[src.$offset + j]) === 10) { + i = j + 1 >> 0; + } + j = j + (1) >> 0; + } + res = sliceType$2.nil; + res = $appendSlice(res, $subslice(src, 0, i)); + indent = 0; + hasSpace = false; + _ref = $subslice(src, i, j); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + b = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + _ref$1 = b; + if (_ref$1 === 32) { + hasSpace = true; + } else if (_ref$1 === 9) { + indent = indent + (1) >> 0; + } + _i++; + } + if ((indent === 0) && hasSpace) { + indent = 1; + } + i$1 = 0; + while (true) { + if (!(i$1 < indent)) { break; } + res = $append(res, 9); + i$1 = i$1 + (1) >> 0; + } + cfg.Indent = indent + indentAdj >> 0; + buf$1 = $clone(new bytes.Buffer.ptr(), bytes.Buffer); + err$1 = cfg.Fprint(buf$1, fset, file); + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + return [sliceType$2.nil, err$1]; + } + res = $appendSlice(res, sourceAdj(buf$1.Bytes(), cfg.Indent)); + i = src.$length; + while (true) { + if (!(i > 0 && isSpace((x = i - 1 >> 0, ((x < 0 || x >= src.$length) ? $throwRuntimeError("index out of range") : src.$array[src.$offset + x]))))) { break; } + i = i - (1) >> 0; + } + return [$appendSlice(res, $subslice(src, i)), $ifaceNil]; + }; + isSpace = function(b) { + var b; + return (b === 32) || (b === 9) || (b === 10) || (b === 13); + }; + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_format = function() { while (true) { switch ($s) { case 0: + $r = bytes.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = fmt.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = ast.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = parser.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = printer.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + $r = token.$init($BLOCKING); /* */ $s = 6; case 6: if ($r && $r.$blocking) { $r = $r(); } + $r = io.$init($BLOCKING); /* */ $s = 7; case 7: if ($r && $r.$blocking) { $r = $r(); } + $r = strings.$init($BLOCKING); /* */ $s = 8; case 8: if ($r && $r.$blocking) { $r = $r(); } + config = new printer.Config.ptr(6, 8, 0); + /* */ } return; } }; $init_format.$blocking = true; return $init_format; + }; + return $pkg; +})(); +$packages["github.com/shurcooL/markdownfmt/markdown"] = (function() { + var $pkg = {}, bytes, fmt, runewidth, blackfriday, indentwriter, format, ioutil, strings, markdownRenderer, Options, sliceType, sliceType$1, sliceType$2, sliceType$3, ptrType, funcType, ptrType$1, mapType, mapType$1, mapType$2, formatCode, isNumber, needsEscaping, cleanWithoutTrim, doubleSpace, NewRenderer, Process, readSource; + bytes = $packages["bytes"]; + fmt = $packages["fmt"]; + runewidth = $packages["github.com/mattn/go-runewidth"]; + blackfriday = $packages["github.com/russross/blackfriday"]; + indentwriter = $packages["github.com/shurcooL/go/indentwriter"]; + format = $packages["go/format"]; + ioutil = $packages["io/ioutil"]; + strings = $packages["strings"]; + markdownRenderer = $pkg.markdownRenderer = $newType(0, $kindStruct, "markdown.markdownRenderer", "markdownRenderer", "github.com/shurcooL/markdownfmt/markdown", function(normalTextMarker_, orderedListCounter_, paragraph_, listDepth_, lastNormalText_, headers_, columnAligns_, columnWidths_, cells_) { + this.$val = this; + this.normalTextMarker = normalTextMarker_ !== undefined ? normalTextMarker_ : false; + this.orderedListCounter = orderedListCounter_ !== undefined ? orderedListCounter_ : false; + this.paragraph = paragraph_ !== undefined ? paragraph_ : false; + this.listDepth = listDepth_ !== undefined ? listDepth_ : 0; + this.lastNormalText = lastNormalText_ !== undefined ? lastNormalText_ : ""; + this.headers = headers_ !== undefined ? headers_ : sliceType$2.nil; + this.columnAligns = columnAligns_ !== undefined ? columnAligns_ : sliceType$3.nil; + this.columnWidths = columnWidths_ !== undefined ? columnWidths_ : sliceType$3.nil; + this.cells = cells_ !== undefined ? cells_ : sliceType$2.nil; + }); + Options = $pkg.Options = $newType(0, $kindStruct, "markdown.Options", "Options", "github.com/shurcooL/markdownfmt/markdown", function() { + this.$val = this; + }); + sliceType = $sliceType($Uint8); + sliceType$1 = $sliceType($emptyInterface); + sliceType$2 = $sliceType($String); + sliceType$3 = $sliceType($Int); + ptrType = $ptrType(bytes.Buffer); + funcType = $funcType([], [$Bool], false); + ptrType$1 = $ptrType(markdownRenderer); + mapType = $mapType(ptrType, $Int); + mapType$1 = $mapType($Int, $Int); + mapType$2 = $mapType($Int, $Bool); + formatCode = function(lang, text) { + var _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, err, formattedCode = sliceType.nil, gofmt, lang, ok = false, text; + _ref = lang; + if (_ref === "Go" || _ref === "go") { + _tuple = format.Source(text); gofmt = _tuple[0]; err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = sliceType.nil; _tmp$1 = false; formattedCode = _tmp; ok = _tmp$1; + return [formattedCode, ok]; + } + _tmp$2 = gofmt; _tmp$3 = true; formattedCode = _tmp$2; ok = _tmp$3; + return [formattedCode, ok]; + } else { + _tmp$4 = sliceType.nil; _tmp$5 = false; formattedCode = _tmp$4; ok = _tmp$5; + return [formattedCode, ok]; + } + }; + markdownRenderer.ptr.prototype.BlockCode = function(out, text, lang) { + var _i, _ref, _tuple, count, elt, formattedCode, lang, ok, out, text; + doubleSpace(out); + count = 0; + _ref = strings.Fields(lang); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + elt = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (elt.charCodeAt(0) === 46) { + elt = elt.substring(1); + } + if (elt.length === 0) { + _i++; + continue; + } + out.WriteString("```"); + out.WriteString(elt); + count = count + (1) >> 0; + break; + } + if (count === 0) { + out.WriteString("```"); + } + out.WriteString("\n"); + _tuple = formatCode(lang, text); formattedCode = _tuple[0]; ok = _tuple[1]; + if (ok) { + out.Write(formattedCode); + } else { + out.Write(text); + } + out.WriteString("```\n"); + }; + markdownRenderer.prototype.BlockCode = function(out, text, lang) { return this.$val.BlockCode(out, text, lang); }; + markdownRenderer.ptr.prototype.BlockQuote = function(out, text) { + var _i, _ref, i, line, lines, out, text; + doubleSpace(out); + lines = bytes.Split(text, new sliceType($stringToBytes("\n"))); + _ref = lines; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + line = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (i === (lines.$length - 1 >> 0)) { + _i++; + continue; + } + out.WriteString(">"); + if (!((line.$length === 0))) { + out.WriteString(" "); + out.Write(line); + } + out.WriteString("\n"); + _i++; + } + }; + markdownRenderer.prototype.BlockQuote = function(out, text) { return this.$val.BlockQuote(out, text); }; + markdownRenderer.ptr.prototype.BlockHtml = function(out, text) { + var out, text; + doubleSpace(out); + out.Write(text); + out.WriteByte(10); + }; + markdownRenderer.prototype.BlockHtml = function(out, text) { return this.$val.BlockHtml(out, text); }; + markdownRenderer.ptr.prototype.TitleBlock = function(out, text) { + var out, text; + }; + markdownRenderer.prototype.TitleBlock = function(out, text) { return this.$val.TitleBlock(out, text); }; + markdownRenderer.ptr.prototype.Header = function(out, text, level, id) { + var _ref, id, len, len$1, level, marker, out, text, textMarker; + marker = out.Len(); + doubleSpace(out); + if (level >= 3) { + fmt.Fprint(out, new sliceType$1([new $String(strings.Repeat("#", level)), new $String(" ")])); + } + textMarker = out.Len(); + if (!text()) { + out.Truncate(marker); + return; + } + _ref = level; + if (_ref === 1) { + len = runewidth.StringWidth(out.String().substring(textMarker)); + fmt.Fprint(out, new sliceType$1([new $String("\n"), new $String(strings.Repeat("=", len))])); + } else if (_ref === 2) { + len$1 = runewidth.StringWidth(out.String().substring(textMarker)); + fmt.Fprint(out, new sliceType$1([new $String("\n"), new $String(strings.Repeat("-", len$1))])); + } + out.WriteString("\n"); + }; + markdownRenderer.prototype.Header = function(out, text, level, id) { return this.$val.Header(out, text, level, id); }; + markdownRenderer.ptr.prototype.HRule = function(out) { + var out; + doubleSpace(out); + out.WriteString("---\n"); + }; + markdownRenderer.prototype.HRule = function(out) { return this.$val.HRule(out); }; + markdownRenderer.ptr.prototype.List = function(out, text, flags) { + var $deferred = [], $err = null, _key, flags, marker, mr, out, text; + /* */ try { $deferFrames.push($deferred); + mr = this; + marker = out.Len(); + doubleSpace(out); + mr.listDepth = mr.listDepth + (1) >> 0; + $deferred.push([(function() { + mr.listDepth = mr.listDepth - (1) >> 0; + }), []]); + if (!(((flags & 1) === 0))) { + _key = mr.listDepth; (mr.orderedListCounter || $throwRuntimeError("assignment to entry in nil map"))[_key] = { k: _key, v: 1 }; + } + if (!text()) { + out.Truncate(marker); + return; + } + /* */ } catch(err) { $err = err; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + markdownRenderer.prototype.List = function(out, text, flags) { return this.$val.List(out, text, flags); }; + markdownRenderer.ptr.prototype.ListItem = function(out, text, flags) { + var _entry, _entry$1, _entry$2, _key, _key$1, flags, mr, out, text; + mr = this; + if (!(((flags & 1) === 0))) { + fmt.Fprintf(out, "%d.", new sliceType$1([new $Int((_entry = mr.orderedListCounter[mr.listDepth], _entry !== undefined ? _entry.v : 0))])); + indentwriter.New(out, 1).Write(text); + _key = mr.listDepth; (mr.orderedListCounter || $throwRuntimeError("assignment to entry in nil map"))[_key] = { k: _key, v: (_entry$1 = mr.orderedListCounter[mr.listDepth], _entry$1 !== undefined ? _entry$1.v : 0) + (1) >> 0 }; + } else { + out.WriteString("-"); + indentwriter.New(out, 1).Write(text); + } + out.WriteString("\n"); + if ((_entry$2 = mr.paragraph[mr.listDepth], _entry$2 !== undefined ? _entry$2.v : false)) { + if ((flags & 8) === 0) { + out.WriteString("\n"); + } + _key$1 = mr.listDepth; (mr.paragraph || $throwRuntimeError("assignment to entry in nil map"))[_key$1] = { k: _key$1, v: false }; + } + }; + markdownRenderer.prototype.ListItem = function(out, text, flags) { return this.$val.ListItem(out, text, flags); }; + markdownRenderer.ptr.prototype.Paragraph = function(out, text) { + var _key, marker, mr, out, text; + mr = this; + marker = out.Len(); + doubleSpace(out); + _key = mr.listDepth; (mr.paragraph || $throwRuntimeError("assignment to entry in nil map"))[_key] = { k: _key, v: true }; + if (!text()) { + out.Truncate(marker); + return; + } + out.WriteString("\n"); + }; + markdownRenderer.prototype.Paragraph = function(out, text) { return this.$val.Paragraph(out, text); }; + markdownRenderer.ptr.prototype.Table = function(out, header, body, columnData) { + var _i, _i$1, _i$2, _q, _q$1, _ref, _ref$1, _ref$2, _ref$3, body, cell, cell$1, column, column$1, column$2, columnData, header, i, i$1, i$2, i$3, i$4, i$5, mr, out, spaces, width, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8; + mr = this; + doubleSpace(out); + _ref = mr.headers; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + column = _i; + cell = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + out.WriteByte(124); + out.WriteByte(32); + out.WriteString(cell); + i = runewidth.StringWidth(cell); + while (true) { + if (!(i < (x = mr.columnWidths, ((column < 0 || column >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + column])))) { break; } + out.WriteByte(32); + i = i + (1) >> 0; + } + out.WriteByte(32); + _i++; + } + out.WriteString("|\n"); + _ref$1 = mr.columnWidths; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + column$1 = _i$1; + width = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i$1]); + out.WriteByte(124); + if (!((((x$1 = mr.columnAligns, ((column$1 < 0 || column$1 >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + column$1])) & 1) === 0))) { + out.WriteByte(58); + } else { + out.WriteByte(45); + } + while (true) { + if (!(width > 0)) { break; } + out.WriteByte(45); + width = width - (1) >> 0; + } + if (!((((x$2 = mr.columnAligns, ((column$1 < 0 || column$1 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + column$1])) & 2) === 0))) { + out.WriteByte(58); + } else { + out.WriteByte(45); + } + _i$1++; + } + out.WriteString("|\n"); + i$1 = 0; + while (true) { + if (!(i$1 < mr.cells.$length)) { break; } + _ref$2 = mr.headers; + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$2.$length)) { break; } + column$2 = _i$2; + cell$1 = new sliceType($stringToBytes((x$3 = mr.cells, ((i$1 < 0 || i$1 >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + i$1])))); + i$1 = i$1 + (1) >> 0; + out.WriteByte(124); + out.WriteByte(32); + _ref$3 = (x$4 = mr.columnAligns, ((column$2 < 0 || column$2 >= x$4.$length) ? $throwRuntimeError("index out of range") : x$4.$array[x$4.$offset + column$2])); + if (_ref$3 === 1) { + out.Write(cell$1); + i$2 = runewidth.StringWidth($bytesToString(cell$1)); + while (true) { + if (!(i$2 < (x$5 = mr.columnWidths, ((column$2 < 0 || column$2 >= x$5.$length) ? $throwRuntimeError("index out of range") : x$5.$array[x$5.$offset + column$2])))) { break; } + out.WriteByte(32); + i$2 = i$2 + (1) >> 0; + } + } else if (_ref$3 === 3) { + spaces = (x$6 = mr.columnWidths, ((column$2 < 0 || column$2 >= x$6.$length) ? $throwRuntimeError("index out of range") : x$6.$array[x$6.$offset + column$2])) - runewidth.StringWidth($bytesToString(cell$1)) >> 0; + i$3 = 0; + while (true) { + if (!(i$3 < (_q = spaces / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")))) { break; } + out.WriteByte(32); + i$3 = i$3 + (1) >> 0; + } + out.Write(cell$1); + i$4 = 0; + while (true) { + if (!(i$4 < (spaces - ((_q$1 = spaces / 2, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))) >> 0))) { break; } + out.WriteByte(32); + i$4 = i$4 + (1) >> 0; + } + } else if (_ref$3 === 2) { + i$5 = runewidth.StringWidth($bytesToString(cell$1)); + while (true) { + if (!(i$5 < (x$7 = mr.columnWidths, ((column$2 < 0 || column$2 >= x$7.$length) ? $throwRuntimeError("index out of range") : x$7.$array[x$7.$offset + column$2])))) { break; } + out.WriteByte(32); + i$5 = i$5 + (1) >> 0; + } + out.Write(cell$1); + } else { + out.Write(cell$1); + i$2 = runewidth.StringWidth($bytesToString(cell$1)); + while (true) { + if (!(i$2 < (x$8 = mr.columnWidths, ((column$2 < 0 || column$2 >= x$8.$length) ? $throwRuntimeError("index out of range") : x$8.$array[x$8.$offset + column$2])))) { break; } + out.WriteByte(32); + i$2 = i$2 + (1) >> 0; + } + } + out.WriteByte(32); + _i$2++; + } + out.WriteString("|\n"); + } + mr.headers = sliceType$2.nil; + mr.columnAligns = sliceType$3.nil; + mr.columnWidths = sliceType$3.nil; + mr.cells = sliceType$2.nil; + }; + markdownRenderer.prototype.Table = function(out, header, body, columnData) { return this.$val.Table(out, header, body, columnData); }; + markdownRenderer.ptr.prototype.TableRow = function(out, text) { + var out, text; + }; + markdownRenderer.prototype.TableRow = function(out, text) { return this.$val.TableRow(out, text); }; + markdownRenderer.ptr.prototype.TableHeaderCell = function(out, text, align) { + var align, columnWidth, mr, out, text; + mr = this; + mr.columnAligns = $append(mr.columnAligns, align); + columnWidth = runewidth.StringWidth($bytesToString(text)); + mr.columnWidths = $append(mr.columnWidths, columnWidth); + mr.headers = $append(mr.headers, $bytesToString(text)); + }; + markdownRenderer.prototype.TableHeaderCell = function(out, text, align) { return this.$val.TableHeaderCell(out, text, align); }; + markdownRenderer.ptr.prototype.TableCell = function(out, text, align) { + var _r, align, column, columnWidth, mr, out, text, x, x$1; + mr = this; + columnWidth = runewidth.StringWidth($bytesToString(text)); + column = (_r = mr.cells.$length % mr.headers.$length, _r === _r ? _r : $throwRuntimeError("integer divide by zero")); + if (columnWidth > (x = mr.columnWidths, ((column < 0 || column >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + column]))) { + (x$1 = mr.columnWidths, (column < 0 || column >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + column] = columnWidth); + } + mr.cells = $append(mr.cells, $bytesToString(text)); + }; + markdownRenderer.prototype.TableCell = function(out, text, align) { return this.$val.TableCell(out, text, align); }; + markdownRenderer.ptr.prototype.Footnotes = function(out, text) { + var out, text; + out.WriteString(""); + }; + markdownRenderer.prototype.Footnotes = function(out, text) { return this.$val.Footnotes(out, text); }; + markdownRenderer.ptr.prototype.FootnoteItem = function(out, name, text, flags) { + var flags, name, out, text; + out.WriteString(""); + }; + markdownRenderer.prototype.FootnoteItem = function(out, name, text, flags) { return this.$val.FootnoteItem(out, name, text, flags); }; + markdownRenderer.ptr.prototype.AutoLink = function(out, link, kind) { + var kind, link, out; + out.Write(link); + }; + markdownRenderer.prototype.AutoLink = function(out, link, kind) { return this.$val.AutoLink(out, link, kind); }; + markdownRenderer.ptr.prototype.CodeSpan = function(out, text) { + var out, text; + out.WriteByte(96); + out.Write(text); + out.WriteByte(96); + }; + markdownRenderer.prototype.CodeSpan = function(out, text) { return this.$val.CodeSpan(out, text); }; + markdownRenderer.ptr.prototype.DoubleEmphasis = function(out, text) { + var out, text; + out.WriteString("**"); + out.Write(text); + out.WriteString("**"); + }; + markdownRenderer.prototype.DoubleEmphasis = function(out, text) { return this.$val.DoubleEmphasis(out, text); }; + markdownRenderer.ptr.prototype.Emphasis = function(out, text) { + var out, text; + if (text.$length === 0) { + return; + } + out.WriteByte(42); + out.Write(text); + out.WriteByte(42); + }; + markdownRenderer.prototype.Emphasis = function(out, text) { return this.$val.Emphasis(out, text); }; + markdownRenderer.ptr.prototype.Image = function(out, link, title, alt) { + var alt, link, out, title; + out.WriteString("!["); + out.Write(alt); + out.WriteString("]("); + out.Write(link); + out.WriteString(")"); + }; + markdownRenderer.prototype.Image = function(out, link, title, alt) { return this.$val.Image(out, link, title, alt); }; + markdownRenderer.ptr.prototype.LineBreak = function(out) { + var out; + out.WriteString(" \n"); + }; + markdownRenderer.prototype.LineBreak = function(out) { return this.$val.LineBreak(out); }; + markdownRenderer.ptr.prototype.Link = function(out, link, title, content) { + var content, link, out, title; + out.WriteString("["); + out.Write(content); + out.WriteString("]("); + out.Write(link); + out.WriteString(")"); + }; + markdownRenderer.prototype.Link = function(out, link, title, content) { return this.$val.Link(out, link, title, content); }; + markdownRenderer.ptr.prototype.RawHtmlTag = function(out, tag) { + var out, tag; + out.Write(tag); + }; + markdownRenderer.prototype.RawHtmlTag = function(out, tag) { return this.$val.RawHtmlTag(out, tag); }; + markdownRenderer.ptr.prototype.TripleEmphasis = function(out, text) { + var out, text; + out.WriteString("***"); + out.Write(text); + out.WriteString("***"); + }; + markdownRenderer.prototype.TripleEmphasis = function(out, text) { return this.$val.TripleEmphasis(out, text); }; + markdownRenderer.ptr.prototype.StrikeThrough = function(out, text) { + var out, text; + out.WriteString("~~"); + out.Write(text); + out.WriteString("~~"); + }; + markdownRenderer.prototype.StrikeThrough = function(out, text) { return this.$val.StrikeThrough(out, text); }; + markdownRenderer.ptr.prototype.FootnoteRef = function(out, ref, id) { + var id, out, ref; + out.WriteString(""); + }; + markdownRenderer.prototype.FootnoteRef = function(out, ref, id) { return this.$val.FootnoteRef(out, ref, id); }; + isNumber = function(data) { + var _i, _ref, b, data; + _ref = data; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + b = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (b < 48 || b > 57) { + return false; + } + _i++; + } + return true; + }; + needsEscaping = function(text, lastNormalText) { + var _ref, lastNormalText, text; + _ref = $bytesToString(text); + if (_ref === "\\" || _ref === "`" || _ref === "*" || _ref === "_" || _ref === "{" || _ref === "}" || _ref === "[" || _ref === "]" || _ref === "(" || _ref === ")" || _ref === "#" || _ref === "+" || _ref === "-") { + return true; + } else if (_ref === "!") { + return false; + } else if (_ref === ".") { + return isNumber(new sliceType($stringToBytes(lastNormalText))); + } else if (_ref === "<" || _ref === ">") { + return true; + } else { + return false; + } + }; + markdownRenderer.ptr.prototype.Entity = function(out, entity) { + var entity, out; + out.Write(entity); + }; + markdownRenderer.prototype.Entity = function(out, entity) { return this.$val.Entity(out, entity); }; + markdownRenderer.ptr.prototype.NormalText = function(out, text) { + var _key, cleanString, mr, normalText, out, text; + mr = this; + normalText = $bytesToString(text); + if (needsEscaping(text, mr.lastNormalText)) { + text = $appendSlice(new sliceType($stringToBytes("\\")), text); + } + mr.lastNormalText = normalText; + if ($bytesToString(text) === "\n") { + return; + } + cleanString = cleanWithoutTrim($bytesToString(text)); + if (cleanString === "") { + return; + } + if (mr.skipSpaceIfNeededNormalText(out, cleanString)) { + cleanString = cleanString.substring(1); + } + out.WriteString(cleanString); + if (cleanString.length >= 1 && (cleanString.charCodeAt((cleanString.length - 1 >> 0)) === 32)) { + _key = out; (mr.normalTextMarker || $throwRuntimeError("assignment to entry in nil map"))[_key.$key()] = { k: _key, v: out.Len() }; + } + }; + markdownRenderer.prototype.NormalText = function(out, text) { return this.$val.NormalText(out, text); }; + markdownRenderer.ptr.prototype.DocumentHeader = function(out) { + var out; + }; + markdownRenderer.prototype.DocumentHeader = function(out) { return this.$val.DocumentHeader(out); }; + markdownRenderer.ptr.prototype.DocumentFooter = function(out) { + var out; + }; + markdownRenderer.prototype.DocumentFooter = function(out) { return this.$val.DocumentFooter(out); }; + markdownRenderer.ptr.prototype.GetFlags = function() { + return 0; + }; + markdownRenderer.prototype.GetFlags = function() { return this.$val.GetFlags(); }; + markdownRenderer.ptr.prototype.skipSpaceIfNeededNormalText = function(out, cleanString) { + var _entry, _entry$1, _key, _tuple, cleanString, mr, ok, out; + mr = this; + if (!((cleanString.charCodeAt(0) === 32))) { + return false; + } + _tuple = (_entry = mr.normalTextMarker[out.$key()], _entry !== undefined ? [_entry.v, true] : [0, false]); ok = _tuple[1]; + if (!ok) { + _key = out; (mr.normalTextMarker || $throwRuntimeError("assignment to entry in nil map"))[_key.$key()] = { k: _key, v: -1 }; + } + return (_entry$1 = mr.normalTextMarker[out.$key()], _entry$1 !== undefined ? _entry$1.v : 0) === out.Len(); + }; + markdownRenderer.prototype.skipSpaceIfNeededNormalText = function(out, cleanString) { return this.$val.skipSpaceIfNeededNormalText(out, cleanString); }; + cleanWithoutTrim = function(s) { + var b, i, p, q, s; + b = sliceType.nil; + p = 0; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + q = s.charCodeAt(i); + if ((q === 10) || (q === 13) || (q === 9)) { + q = 32; + } + if (!((q === 32)) || !((p === 32))) { + b = $append(b, q); + p = q; + } + i = i + (1) >> 0; + } + return $bytesToString(b); + }; + doubleSpace = function(out) { + var out; + if (out.Len() > 0) { + out.WriteByte(10); + } + }; + NewRenderer = $pkg.NewRenderer = function() { + return new markdownRenderer.ptr(new $Map(), new $Map(), new $Map(), 0, "", sliceType$2.nil, sliceType$3.nil, sliceType$3.nil, sliceType$2.nil); + }; + Process = $pkg.Process = function(filename, src, opt) { + var _tuple, err, extensions, filename, opt, output, src, text; + _tuple = readSource(filename, src); text = _tuple[0]; err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [sliceType.nil, err]; + } + extensions = 0; + extensions = extensions | (1); + extensions = extensions | (2); + extensions = extensions | (4); + extensions = extensions | (8); + extensions = extensions | (16); + extensions = extensions | (64); + output = blackfriday.Markdown(text, NewRenderer(), extensions); + return [output, $ifaceNil]; + }; + readSource = function(filename, src) { + var filename, src; + if (!(src === sliceType.nil)) { + return [src, $ifaceNil]; + } + return ioutil.ReadFile(filename); + }; + ptrType$1.methods = [{prop: "BlockCode", name: "BlockCode", pkg: "", typ: $funcType([ptrType, sliceType, $String], [], false)}, {prop: "BlockQuote", name: "BlockQuote", pkg: "", typ: $funcType([ptrType, sliceType], [], false)}, {prop: "BlockHtml", name: "BlockHtml", pkg: "", typ: $funcType([ptrType, sliceType], [], false)}, {prop: "TitleBlock", name: "TitleBlock", pkg: "", typ: $funcType([ptrType, sliceType], [], false)}, {prop: "Header", name: "Header", pkg: "", typ: $funcType([ptrType, funcType, $Int, $String], [], false)}, {prop: "HRule", name: "HRule", pkg: "", typ: $funcType([ptrType], [], false)}, {prop: "List", name: "List", pkg: "", typ: $funcType([ptrType, funcType, $Int], [], false)}, {prop: "ListItem", name: "ListItem", pkg: "", typ: $funcType([ptrType, sliceType, $Int], [], false)}, {prop: "Paragraph", name: "Paragraph", pkg: "", typ: $funcType([ptrType, funcType], [], false)}, {prop: "Table", name: "Table", pkg: "", typ: $funcType([ptrType, sliceType, sliceType, sliceType$3], [], false)}, {prop: "TableRow", name: "TableRow", pkg: "", typ: $funcType([ptrType, sliceType], [], false)}, {prop: "TableHeaderCell", name: "TableHeaderCell", pkg: "", typ: $funcType([ptrType, sliceType, $Int], [], false)}, {prop: "TableCell", name: "TableCell", pkg: "", typ: $funcType([ptrType, sliceType, $Int], [], false)}, {prop: "Footnotes", name: "Footnotes", pkg: "", typ: $funcType([ptrType, funcType], [], false)}, {prop: "FootnoteItem", name: "FootnoteItem", pkg: "", typ: $funcType([ptrType, sliceType, sliceType, $Int], [], false)}, {prop: "AutoLink", name: "AutoLink", pkg: "", typ: $funcType([ptrType, sliceType, $Int], [], false)}, {prop: "CodeSpan", name: "CodeSpan", pkg: "", typ: $funcType([ptrType, sliceType], [], false)}, {prop: "DoubleEmphasis", name: "DoubleEmphasis", pkg: "", typ: $funcType([ptrType, sliceType], [], false)}, {prop: "Emphasis", name: "Emphasis", pkg: "", typ: $funcType([ptrType, sliceType], [], false)}, {prop: "Image", name: "Image", pkg: "", typ: $funcType([ptrType, sliceType, sliceType, sliceType], [], false)}, {prop: "LineBreak", name: "LineBreak", pkg: "", typ: $funcType([ptrType], [], false)}, {prop: "Link", name: "Link", pkg: "", typ: $funcType([ptrType, sliceType, sliceType, sliceType], [], false)}, {prop: "RawHtmlTag", name: "RawHtmlTag", pkg: "", typ: $funcType([ptrType, sliceType], [], false)}, {prop: "TripleEmphasis", name: "TripleEmphasis", pkg: "", typ: $funcType([ptrType, sliceType], [], false)}, {prop: "StrikeThrough", name: "StrikeThrough", pkg: "", typ: $funcType([ptrType, sliceType], [], false)}, {prop: "FootnoteRef", name: "FootnoteRef", pkg: "", typ: $funcType([ptrType, sliceType, $Int], [], false)}, {prop: "Entity", name: "Entity", pkg: "", typ: $funcType([ptrType, sliceType], [], false)}, {prop: "NormalText", name: "NormalText", pkg: "", typ: $funcType([ptrType, sliceType], [], false)}, {prop: "DocumentHeader", name: "DocumentHeader", pkg: "", typ: $funcType([ptrType], [], false)}, {prop: "DocumentFooter", name: "DocumentFooter", pkg: "", typ: $funcType([ptrType], [], false)}, {prop: "GetFlags", name: "GetFlags", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "skipSpaceIfNeededNormalText", name: "skipSpaceIfNeededNormalText", pkg: "github.com/shurcooL/markdownfmt/markdown", typ: $funcType([ptrType, $String], [$Bool], false)}]; + markdownRenderer.init([{prop: "normalTextMarker", name: "normalTextMarker", pkg: "github.com/shurcooL/markdownfmt/markdown", typ: mapType, tag: ""}, {prop: "orderedListCounter", name: "orderedListCounter", pkg: "github.com/shurcooL/markdownfmt/markdown", typ: mapType$1, tag: ""}, {prop: "paragraph", name: "paragraph", pkg: "github.com/shurcooL/markdownfmt/markdown", typ: mapType$2, tag: ""}, {prop: "listDepth", name: "listDepth", pkg: "github.com/shurcooL/markdownfmt/markdown", typ: $Int, tag: ""}, {prop: "lastNormalText", name: "lastNormalText", pkg: "github.com/shurcooL/markdownfmt/markdown", typ: $String, tag: ""}, {prop: "headers", name: "headers", pkg: "github.com/shurcooL/markdownfmt/markdown", typ: sliceType$2, tag: ""}, {prop: "columnAligns", name: "columnAligns", pkg: "github.com/shurcooL/markdownfmt/markdown", typ: sliceType$3, tag: ""}, {prop: "columnWidths", name: "columnWidths", pkg: "github.com/shurcooL/markdownfmt/markdown", typ: sliceType$3, tag: ""}, {prop: "cells", name: "cells", pkg: "github.com/shurcooL/markdownfmt/markdown", typ: sliceType$2, tag: ""}]); + Options.init([]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_markdown = function() { while (true) { switch ($s) { case 0: + $r = bytes.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = fmt.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = runewidth.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = blackfriday.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = indentwriter.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + $r = format.$init($BLOCKING); /* */ $s = 6; case 6: if ($r && $r.$blocking) { $r = $r(); } + $r = ioutil.$init($BLOCKING); /* */ $s = 7; case 7: if ($r && $r.$blocking) { $r = $r(); } + $r = strings.$init($BLOCKING); /* */ $s = 8; case 8: if ($r && $r.$blocking) { $r = $r(); } + /* */ } return; } }; $init_markdown.$blocking = true; return $init_markdown; + }; + return $pkg; +})(); +$packages["main"] = (function() { + var $pkg = {}, fmt, markdown, sliceType, ptrType, sliceType$1, main; + fmt = $packages["fmt"]; + markdown = $packages["github.com/shurcooL/markdownfmt/markdown"]; + sliceType = $sliceType($Uint8); + ptrType = $ptrType(markdown.Options); + sliceType$1 = $sliceType($emptyInterface); + main = function() { + var _tuple, err, input, output; + input = new sliceType($stringToBytes("Title\n=\n\nThis is a new paragraph. I wonder if I have too many spaces.\nWhat about new paragraph.\nBut the next one...\n\n Is really new.\n\n1. Item one.\n1. Item TWO.\n\n\nFinal paragraph.\n")); + _tuple = markdown.Process("", input, ptrType.nil); output = _tuple[0]; err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + $panic(err); + } + fmt.Println(new sliceType$1([new $String($bytesToString(output))])); + }; + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_main = function() { while (true) { switch ($s) { case 0: + $r = fmt.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = markdown.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + main(); + /* */ } return; } }; $init_main.$blocking = true; return $init_main; + }; + return $pkg; +})(); +$synthesizeMethods(); +$packages["runtime"].$init()(); +$go($packages["main"].$init, [], true); +$flushConsole(); + +}).call(this); +//# sourceMappingURL=markdownfmt.js.map diff --git a/104/build/markdownfmt.js.gz b/104/build/markdownfmt.js.gz new file mode 100644 index 0000000..8764fbd Binary files /dev/null and b/104/build/markdownfmt.js.gz differ diff --git a/104/build/markdownfmt_min.js b/104/build/markdownfmt_min.js new file mode 100644 index 0000000..0f110c3 --- /dev/null +++ b/104/build/markdownfmt_min.js @@ -0,0 +1,51 @@ +"use strict"; +(function() { + +Error.stackTraceLimit=Infinity;var $global,$module;if(typeof window!=="undefined"){$global=window;}else if(typeof self!=="undefined"){$global=self;}else if(typeof global!=="undefined"){$global=global;$global.require=require;}else{$global=this;}if($global===undefined||$global.Array===undefined){throw new Error("no global object found");}if(typeof module!=="undefined"){$module=module;}var $packages={},$idCounter=0;var $keys=function(m){return m?Object.keys(m):[];};var $min=Math.min;var $mod=function(x,y){return x%y;};var $parseInt=parseInt;var $parseFloat=function(f){if(f!==undefined&&f!==null&&f.constructor===Number){return f;}return parseFloat(f);};var $flushConsole=function(){};var $throwRuntimeError;var $throwNilPointerError=function(){$throwRuntimeError("invalid memory address or nil pointer dereference");};var $mapArray=function(array,f){var newArray=new array.constructor(array.length);for(var i=0;islice.$capacity||max>slice.$capacity){$throwRuntimeError("slice bounds out of range");}var s=new slice.constructor(slice.$array);s.$offset=slice.$offset+low;s.$length=slice.$length-low;s.$capacity=slice.$capacity-low;if(high!==undefined){s.$length=high-low;}if(max!==undefined){s.$capacity=max-low;}return s;};var $sliceToArray=function(slice){if(slice.$length===0){return[];}if(slice.$array.constructor!==Array){return slice.$array.subarray(slice.$offset,slice.$offset+slice.$length);}return slice.$array.slice(slice.$offset,slice.$offset+slice.$length);};var $decodeRune=function(str,pos){var c0=str.charCodeAt(pos);if(c0<0x80){return[c0,1];}if(c0!==c0||c0<0xC0){return[0xFFFD,1];}var c1=str.charCodeAt(pos+1);if(c1!==c1||c1<0x80||0xC0<=c1){return[0xFFFD,1];}if(c0<0xE0){var r=(c0&0x1F)<<6|(c1&0x3F);if(r<=0x7F){return[0xFFFD,1];}return[r,2];}var c2=str.charCodeAt(pos+2);if(c2!==c2||c2<0x80||0xC0<=c2){return[0xFFFD,1];}if(c0<0xF0){var r=(c0&0x0F)<<12|(c1&0x3F)<<6|(c2&0x3F);if(r<=0x7FF){return[0xFFFD,1];}if(0xD800<=r&&r<=0xDFFF){return[0xFFFD,1];}return[r,3];}var c3=str.charCodeAt(pos+3);if(c3!==c3||c3<0x80||0xC0<=c3){return[0xFFFD,1];}if(c0<0xF8){var r=(c0&0x07)<<18|(c1&0x3F)<<12|(c2&0x3F)<<6|(c3&0x3F);if(r<=0xFFFF||0x10FFFF0x10FFFF||(0xD800<=r&&r<=0xDFFF)){r=0xFFFD;}if(r<=0x7F){return String.fromCharCode(r);}if(r<=0x7FF){return String.fromCharCode(0xC0|r>>6,0x80|(r&0x3F));}if(r<=0xFFFF){return String.fromCharCode(0xE0|r>>12,0x80|(r>>6&0x3F),0x80|(r&0x3F));}return String.fromCharCode(0xF0|r>>18,0x80|(r>>12&0x3F),0x80|(r>>6&0x3F),0x80|(r&0x3F));};var $stringToBytes=function(str){var array=new Uint8Array(str.length);for(var i=0;isrcOffset){for(var i=n-1;i>=0;i--){$copy(dst[dstOffset+i],src[srcOffset+i],elem);}return;}for(var i=0;isrcOffset){for(var i=n-1;i>=0;i--){dst[dstOffset+i]=src[srcOffset+i];}return;}for(var i=0;inewCapacity){newOffset=0;newCapacity=Math.max(newLength,slice.$capacity<1024?slice.$capacity*2:Math.floor(slice.$capacity*5/4));if(slice.$array.constructor===Array){newArray=slice.$array.slice(slice.$offset,slice.$offset+slice.$length);newArray.length=newCapacity;var zero=slice.constructor.elem.zero;for(var i=slice.$length;i>0;this.$low=low>>>0;this.$val=this;};typ.prototype.$key=function(){return string+"$"+this.$high+"$"+this.$low;};break;case $kindUint64:typ=function(high,low){this.$high=(high+Math.floor(Math.ceil(low)/4294967296))>>>0;this.$low=low>>>0;this.$val=this;};typ.prototype.$key=function(){return string+"$"+this.$high+"$"+this.$low;};break;case $kindComplex64:case $kindComplex128:typ=function(real,imag){this.$real=real;this.$imag=imag;this.$val=this;};typ.prototype.$key=function(){return string+"$"+this.$real+"$"+this.$imag;};break;case $kindArray:typ=function(v){this.$val=v;};typ.ptr=$newType(4,$kindPtr,"*"+string,"","",function(array){this.$get=function(){return array;};this.$set=function(v){$copy(this,v,typ);};this.$val=array;});typ.init=function(elem,len){typ.elem=elem;typ.len=len;typ.comparable=elem.comparable;typ.prototype.$key=function(){return string+"$"+Array.prototype.join.call($mapArray(this.$val,function(e){var key=e.$key?e.$key():String(e);return key.replace(/\\/g,"\\\\").replace(/\$/g,"\\$");}),"$");};typ.ptr.init(typ);Object.defineProperty(typ.ptr.nil,"nilCheck",{get:$throwNilPointerError});};break;case $kindChan:typ=function(capacity){this.$val=this;this.$capacity=capacity;this.$buffer=[];this.$sendQueue=[];this.$recvQueue=[];this.$closed=false;};typ.prototype.$key=function(){if(this.$id===undefined){$idCounter++;this.$id=$idCounter;}return String(this.$id);};typ.init=function(elem,sendOnly,recvOnly){typ.elem=elem;typ.sendOnly=sendOnly;typ.recvOnly=recvOnly;typ.nil=new typ(0);typ.nil.$sendQueue=typ.nil.$recvQueue={length:0,push:function(){},shift:function(){return undefined;},indexOf:function(){return-1;}};};break;case $kindFunc:typ=function(v){this.$val=v;};typ.init=function(params,results,variadic){typ.params=params;typ.results=results;typ.variadic=variadic;typ.comparable=false;};break;case $kindInterface:typ={implementedBy:{},missingMethodFor:{}};typ.init=function(methods){typ.methods=methods;methods.forEach(function(m){$ifaceNil[m.prop]=$throwNilPointerError;});};break;case $kindMap:typ=function(v){this.$val=v;};typ.init=function(key,elem){typ.key=key;typ.elem=elem;typ.comparable=false;};break;case $kindPtr:typ=constructor||function(getter,setter,target){this.$get=getter;this.$set=setter;this.$target=target;this.$val=this;};typ.prototype.$key=function(){if(this.$id===undefined){$idCounter++;this.$id=$idCounter;}return String(this.$id);};typ.init=function(elem){typ.elem=elem;typ.nil=new typ($throwNilPointerError,$throwNilPointerError);};break;case $kindSlice:typ=function(array){if(array.constructor!==typ.nativeArray){array=new typ.nativeArray(array);}this.$array=array;this.$offset=0;this.$length=array.length;this.$capacity=array.length;this.$val=this;};typ.init=function(elem){typ.elem=elem;typ.comparable=false;typ.nativeArray=$nativeArray(elem.kind);typ.nil=new typ([]);};break;case $kindStruct:typ=function(v){this.$val=v;};typ.ptr=$newType(4,$kindPtr,"*"+string,"","",constructor);typ.ptr.elem=typ;typ.ptr.prototype.$get=function(){return this;};typ.ptr.prototype.$set=function(v){$copy(this,v,typ);};typ.init=function(fields){typ.fields=fields;fields.forEach(function(f){if(!f.typ.comparable){typ.comparable=false;}});typ.prototype.$key=function(){var val=this.$val;return string+"$"+$mapArray(fields,function(f){var e=val[f.prop];var key=e.$key?e.$key():String(e);return key.replace(/\\/g,"\\\\").replace(/\$/g,"\\$");}).join("$");};var properties={};fields.forEach(function(f){properties[f.prop]={get:$throwNilPointerError,set:$throwNilPointerError};});typ.ptr.nil=Object.create(constructor.prototype,properties);typ.ptr.nil.$val=typ.ptr.nil;$addMethodSynthesizer(function(){var synthesizeMethod=function(target,m,f){if(target.prototype[m.prop]!==undefined){return;}target.prototype[m.prop]=function(){var v=this.$val[f.prop];if(f.typ===$js.Object){v=new $js.container.ptr(v);}if(v.$val===undefined){v=new f.typ(v);}return v[m.prop].apply(v,arguments);};};fields.forEach(function(f){if(f.name===""){$methodSet(f.typ).forEach(function(m){synthesizeMethod(typ,m,f);synthesizeMethod(typ.ptr,m,f);});$methodSet($ptrType(f.typ)).forEach(function(m){synthesizeMethod(typ.ptr,m,f);});}});});};break;default:$panic(new $String("invalid kind: "+kind));}switch(kind){case $kindBool:case $kindMap:typ.zero=function(){return false;};break;case $kindInt:case $kindInt8:case $kindInt16:case $kindInt32:case $kindUint:case $kindUint8:case $kindUint16:case $kindUint32:case $kindUintptr:case $kindUnsafePointer:case $kindFloat32:case $kindFloat64:typ.zero=function(){return 0;};break;case $kindString:typ.zero=function(){return"";};break;case $kindInt64:case $kindUint64:case $kindComplex64:case $kindComplex128:var zero=new typ(0,0);typ.zero=function(){return zero;};break;case $kindChan:case $kindPtr:case $kindSlice:typ.zero=function(){return typ.nil;};break;case $kindFunc:typ.zero=function(){return $throwNilPointerError;};break;case $kindInterface:typ.zero=function(){return $ifaceNil;};break;case $kindArray:typ.zero=function(){var arrayClass=$nativeArray(typ.elem.kind);if(arrayClass!==Array){return new arrayClass(typ.len);}var array=new Array(typ.len);for(var i=0;i0){var next=[];var mset=[];current.forEach(function(e){if(seen[e.typ.string]){return;}seen[e.typ.string]=true;if(e.typ.typeName!==""){mset=mset.concat(e.typ.methods);if(e.indirect){mset=mset.concat($ptrType(e.typ).methods);}}switch(e.typ.kind){case $kindStruct:e.typ.fields.forEach(function(f){if(f.name===""){var fTyp=f.typ;var fIsPtr=(fTyp.kind===$kindPtr);next.push({typ:fIsPtr?fTyp.elem:fTyp,indirect:e.indirect||fIsPtr});}});break;case $kindInterface:mset=mset.concat(e.typ.methods);break;}});mset.forEach(function(m){if(base[m.name]===undefined){base[m.name]=m;}});current=next;}typ.methodSetCache=[];Object.keys(base).sort().forEach(function(name){typ.methodSetCache.push(base[name]);});return typ.methodSetCache;};var $Bool=$newType(1,$kindBool,"bool","bool","",null);var $Int=$newType(4,$kindInt,"int","int","",null);var $Int8=$newType(1,$kindInt8,"int8","int8","",null);var $Int16=$newType(2,$kindInt16,"int16","int16","",null);var $Int32=$newType(4,$kindInt32,"int32","int32","",null);var $Int64=$newType(8,$kindInt64,"int64","int64","",null);var $Uint=$newType(4,$kindUint,"uint","uint","",null);var $Uint8=$newType(1,$kindUint8,"uint8","uint8","",null);var $Uint16=$newType(2,$kindUint16,"uint16","uint16","",null);var $Uint32=$newType(4,$kindUint32,"uint32","uint32","",null);var $Uint64=$newType(8,$kindUint64,"uint64","uint64","",null);var $Uintptr=$newType(4,$kindUintptr,"uintptr","uintptr","",null);var $Float32=$newType(4,$kindFloat32,"float32","float32","",null);var $Float64=$newType(8,$kindFloat64,"float64","float64","",null);var $Complex64=$newType(8,$kindComplex64,"complex64","complex64","",null);var $Complex128=$newType(16,$kindComplex128,"complex128","complex128","",null);var $String=$newType(8,$kindString,"string","string","",null);var $UnsafePointer=$newType(4,$kindUnsafePointer,"unsafe.Pointer","Pointer","",null);var $nativeArray=function(elemKind){switch(elemKind){case $kindInt:return Int32Array;case $kindInt8:return Int8Array;case $kindInt16:return Int16Array;case $kindInt32:return Int32Array;case $kindUint:return Uint32Array;case $kindUint8:return Uint8Array;case $kindUint16:return Uint16Array;case $kindUint32:return Uint32Array;case $kindUintptr:return Uint32Array;case $kindFloat32:return Float32Array;case $kindFloat64:return Float64Array;default:return Array;}};var $toNativeArray=function(elemKind,array){var nativeArray=$nativeArray(elemKind);if(nativeArray===Array){return array;}return new nativeArray(array);};var $arrayTypes={};var $arrayType=function(elem,len){var string="["+len+"]"+elem.string;var typ=$arrayTypes[string];if(typ===undefined){typ=$newType(12,$kindArray,string,"","",null);$arrayTypes[string]=typ;typ.init(elem,len);}return typ;};var $chanType=function(elem,sendOnly,recvOnly){var string=(recvOnly?"<-":"")+"chan"+(sendOnly?"<- ":" ")+elem.string;var field=sendOnly?"SendChan":(recvOnly?"RecvChan":"Chan");var typ=elem[field];if(typ===undefined){typ=$newType(4,$kindChan,string,"","",null);elem[field]=typ;typ.init(elem,sendOnly,recvOnly);}return typ;};var $funcTypes={};var $funcType=function(params,results,variadic){var paramTypes=$mapArray(params,function(p){return p.string;});if(variadic){paramTypes[paramTypes.length-1]="..."+paramTypes[paramTypes.length-1].substr(2);}var string="func("+paramTypes.join(", ")+")";if(results.length===1){string+=" "+results[0].string;}else if(results.length>1){string+=" ("+$mapArray(results,function(r){return r.string;}).join(", ")+")";}var typ=$funcTypes[string];if(typ===undefined){typ=$newType(4,$kindFunc,string,"","",null);$funcTypes[string]=typ;typ.init(params,results,variadic);}return typ;};var $interfaceTypes={};var $interfaceType=function(methods){var string="interface {}";if(methods.length!==0){string="interface { "+$mapArray(methods,function(m){return(m.pkg!==""?m.pkg+".":"")+m.name+m.typ.string.substr(4);}).join("; ")+" }";}var typ=$interfaceTypes[string];if(typ===undefined){typ=$newType(8,$kindInterface,string,"","",null);$interfaceTypes[string]=typ;typ.init(methods);}return typ;};var $emptyInterface=$interfaceType([]);var $ifaceNil={$key:function(){return"nil";}};var $error=$newType(8,$kindInterface,"error","error","",null);$error.init([{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}]);var $Map=function(){};(function(){var names=Object.getOwnPropertyNames(Object.prototype);for(var i=0;i>>(32-y),(x.$low<>>0);}if(y<64){return new x.constructor(x.$low<<(y-32),0);}return new x.constructor(0,0);};var $shiftRightInt64=function(x,y){if(y===0){return x;}if(y<32){return new x.constructor(x.$high>>y,(x.$low>>>y|x.$high<<(32-y))>>>0);}if(y<64){return new x.constructor(x.$high>>31,(x.$high>>(y-32))>>>0);}if(x.$high<0){return new x.constructor(-1,4294967295);}return new x.constructor(0,0);};var $shiftRightUint64=function(x,y){if(y===0){return x;}if(y<32){return new x.constructor(x.$high>>>y,(x.$low>>>y|x.$high<<(32-y))>>>0);}if(y<64){return new x.constructor(0,x.$high>>>(y-32));}return new x.constructor(0,0);};var $mul64=function(x,y){var high=0,low=0;if((y.$low&1)!==0){high=x.$high;low=x.$low;}for(var i=1;i<32;i++){if((y.$low&1<>>(32-i);low+=(x.$low<>>0;}}for(var i=0;i<32;i++){if((y.$high&1<yHigh)||(xHigh===yHigh&&xLow>yLow))){yHigh=(yHigh<<1|yLow>>>31)>>>0;yLow=(yLow<<1)>>>0;n++;}for(var i=0;i<=n;i++){high=high<<1|low>>>31;low=(low<<1)>>>0;if((xHigh>yHigh)||(xHigh===yHigh&&xLow>=yLow)){xHigh=xHigh-yHigh;xLow=xLow-yLow;if(xLow<0){xHigh--;xLow+=4294967296;}low++;if(low===4294967296){high++;low=0;}}yLow=(yLow>>>1|yHigh<<(32-1))>>>0;yHigh=yHigh>>>1;}if(returnRemainder){return new x.constructor(xHigh*rs,xLow*rs);}return new x.constructor(high*s,low*s);};var $divComplex=function(n,d){var ninf=n.$real===1/0||n.$real===-1/0||n.$imag===1/0||n.$imag===-1/0;var dinf=d.$real===1/0||d.$real===-1/0||d.$imag===1/0||d.$imag===-1/0;var nnan=!ninf&&(n.$real!==n.$real||n.$imag!==n.$imag);var dnan=!dinf&&(d.$real!==d.$real||d.$imag!==d.$imag);if(nnan||dnan){return new n.constructor(0/0,0/0);}if(ninf&&!dinf){return new n.constructor(1/0,1/0);}if(!ninf&&dinf){return new n.constructor(0,0);}if(d.$real===0&&d.$imag===0){if(n.$real===0&&n.$imag===0){return new n.constructor(0/0,0/0);}return new n.constructor(1/0,1/0);}var a=Math.abs(d.$real);var b=Math.abs(d.$imag);if(a<=b){var ratio=d.$real/d.$imag;var denom=d.$real*ratio+d.$imag;return new n.constructor((n.$real*ratio+n.$imag)/denom,(n.$imag*ratio-n.$real)/denom);}var ratio=d.$imag/d.$real;var denom=d.$imag*ratio+d.$real;return new n.constructor((n.$imag*ratio+n.$real)/denom,(n.$imag-n.$real*ratio)/denom);};var $stackDepthOffset=0;var $getStackDepth=function(){var err=new Error();if(err.stack===undefined){return undefined;}return $stackDepthOffset+err.stack.split("\n").length;};var $deferFrames=[],$skippedDeferFrames=0,$jumpToDefer=false,$panicStackDepth=null,$panicValue;var $callDeferred=function(deferred,jsErr){if($skippedDeferFrames!==0){$skippedDeferFrames--;throw jsErr;}if($jumpToDefer){$jumpToDefer=false;throw jsErr;}if(jsErr){var newErr=null;try{$deferFrames.push(deferred);$panic(new $js.Error.ptr(jsErr));}catch(err){newErr=err;}$deferFrames.pop();$callDeferred(deferred,newErr);return;}$stackDepthOffset--;var outerPanicStackDepth=$panicStackDepth;var outerPanicValue=$panicValue;var localPanicValue=$curGoroutine.panicStack.pop();if(localPanicValue!==undefined){$panicStackDepth=$getStackDepth();$panicValue=localPanicValue;}var call,localSkippedDeferFrames=0;try{while(true){if(deferred===null){deferred=$deferFrames[$deferFrames.length-1-localSkippedDeferFrames];if(deferred===undefined){if(localPanicValue.Object instanceof Error){throw localPanicValue.Object;}var msg;if(localPanicValue.constructor===$String){msg=localPanicValue.$val;}else if(localPanicValue.Error!==undefined){msg=localPanicValue.Error();}else if(localPanicValue.String!==undefined){msg=localPanicValue.String();}else{msg=localPanicValue;}throw new Error(msg);}}var call=deferred.pop();if(call===undefined){if(localPanicValue!==undefined){localSkippedDeferFrames++;deferred=null;continue;}return;}var r=call[0].apply(undefined,call[1]);if(r&&r.$blocking){deferred.push([r,[]]);}if(localPanicValue!==undefined&&$panicStackDepth===null){throw null;}}}finally{$skippedDeferFrames+=localSkippedDeferFrames;if($curGoroutine.asleep){deferred.push(call);$jumpToDefer=true;}if(localPanicValue!==undefined){if($panicStackDepth!==null){$curGoroutine.panicStack.push(localPanicValue);}$panicStackDepth=outerPanicStackDepth;$panicValue=outerPanicValue;}$stackDepthOffset++;}};var $panic=function(value){$curGoroutine.panicStack.push(value);$callDeferred(null,null);};var $recover=function(){if($panicStackDepth===null||($panicStackDepth!==undefined&&$panicStackDepth!==$getStackDepth()-2)){return $ifaceNil;}$panicStackDepth=null;return $panicValue;};var $throw=function(err){throw err;};var $BLOCKING=new Object();var $nonblockingCall=function(){$panic(new $packages["runtime"].NotSupportedError.ptr("non-blocking call to blocking function, see https://github.com/gopherjs/gopherjs#goroutines"));};var $dummyGoroutine={asleep:false,exit:false,panicStack:[]};var $curGoroutine=$dummyGoroutine,$totalGoroutines=0,$awakeGoroutines=0,$checkForDeadlock=true;var $go=function(fun,args,direct){$totalGoroutines++;$awakeGoroutines++;args.push($BLOCKING);var goroutine=function(){var rescheduled=false;try{$curGoroutine=goroutine;$skippedDeferFrames=0;$jumpToDefer=false;var r=fun.apply(undefined,args);if(r&&r.$blocking){fun=r;args=[];$schedule(goroutine,direct);rescheduled=true;return;}goroutine.exit=true;}catch(err){if(!$curGoroutine.asleep){goroutine.exit=true;throw err;}}finally{$curGoroutine=$dummyGoroutine;if(goroutine.exit&&!rescheduled){$totalGoroutines--;goroutine.asleep=true;}if(goroutine.asleep&&!rescheduled){$awakeGoroutines--;if($awakeGoroutines===0&&$totalGoroutines!==0&&$checkForDeadlock){console.error("fatal error: all goroutines are asleep - deadlock!");}}}};goroutine.asleep=false;goroutine.exit=false;goroutine.panicStack=[];$schedule(goroutine,direct);};var $scheduled=[],$schedulerLoopActive=false;var $schedule=function(goroutine,direct){if(goroutine.asleep){goroutine.asleep=false;$awakeGoroutines++;}if(direct){goroutine();return;}$scheduled.push(goroutine);if(!$schedulerLoopActive){$schedulerLoopActive=true;setTimeout(function(){while(true){var r=$scheduled.shift();if(r===undefined){$schedulerLoopActive=false;break;}r();};},0);}};var $send=function(chan,value){if(chan.$closed){$throwRuntimeError("send on closed channel");}var queuedRecv=chan.$recvQueue.shift();if(queuedRecv!==undefined){queuedRecv([value,true]);return;}if(chan.$buffer.length>24;case $kindInt16:return parseInt(v)<<16>>16;case $kindInt32:return parseInt(v)>>0;case $kindUint:return parseInt(v);case $kindUint8:return parseInt(v)<<24>>>24;case $kindUint16:return parseInt(v)<<16>>>16;case $kindUint32:case $kindUintptr:return parseInt(v)>>>0;case $kindInt64:case $kindUint64:return new t(0,v);case $kindFloat32:case $kindFloat64:return parseFloat(v);case $kindArray:if(v.length!==t.len){$throwRuntimeError("got array with wrong size from JavaScript native");}return $mapArray(v,function(e){return $internalize(e,t.elem);});case $kindFunc:return function(){var args=[];for(var i=0;i>0;};B.prototype.Int=function(){return this.$val.Int();};B.ptr.prototype.Int64=function(){var a;a=this;return $internalize(a.Object,$Int64);};B.prototype.Int64=function(){return this.$val.Int64();};B.ptr.prototype.Uint64=function(){var a;a=this;return $internalize(a.Object,$Uint64);};B.prototype.Uint64=function(){return this.$val.Uint64();};B.ptr.prototype.Float=function(){var a;a=this;return $parseFloat(a.Object);};B.prototype.Float=function(){return this.$val.Float();};B.ptr.prototype.Interface=function(){var a;a=this;return $internalize(a.Object,$emptyInterface);};B.prototype.Interface=function(){return this.$val.Interface();};B.ptr.prototype.Unsafe=function(){var a;a=this;return a.Object;};B.prototype.Unsafe=function(){return this.$val.Unsafe();};C.ptr.prototype.Error=function(){var a;a=this;return"JavaScript error: "+$internalize(a.Object.message,$String);};C.prototype.Error=function(){return this.$val.Error();};C.ptr.prototype.Stack=function(){var a;a=this;return $internalize(a.Object.stack,$String);};C.prototype.Stack=function(){return this.$val.Stack();};K=function(){var a,b,c,d;a=new B.ptr(null);b=new C.ptr(null);};P.methods=[{prop:"Get",name:"Get",pkg:"",typ:$funcType([$String],[A],false)},{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String,$emptyInterface],[],false)},{prop:"Delete",name:"Delete",pkg:"",typ:$funcType([$String],[],false)},{prop:"Length",name:"Length",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Index",name:"Index",pkg:"",typ:$funcType([$Int],[A],false)},{prop:"SetIndex",name:"SetIndex",pkg:"",typ:$funcType([$Int,$emptyInterface],[],false)},{prop:"Call",name:"Call",pkg:"",typ:$funcType([$String,M],[A],true)},{prop:"Invoke",name:"Invoke",pkg:"",typ:$funcType([M],[A],true)},{prop:"New",name:"New",pkg:"",typ:$funcType([M],[A],true)},{prop:"Bool",name:"Bool",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Int",name:"Int",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Int64",name:"Int64",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Uint64",name:"Uint64",pkg:"",typ:$funcType([],[$Uint64],false)},{prop:"Float",name:"Float",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Interface",name:"Interface",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"Unsafe",name:"Unsafe",pkg:"",typ:$funcType([],[$Uintptr],false)}];Q.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)},{prop:"Stack",name:"Stack",pkg:"",typ:$funcType([],[$String],false)}];A.init([{prop:"Bool",name:"Bool",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Call",name:"Call",pkg:"",typ:$funcType([$String,M],[A],true)},{prop:"Delete",name:"Delete",pkg:"",typ:$funcType([$String],[],false)},{prop:"Float",name:"Float",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Get",name:"Get",pkg:"",typ:$funcType([$String],[A],false)},{prop:"Index",name:"Index",pkg:"",typ:$funcType([$Int],[A],false)},{prop:"Int",name:"Int",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Int64",name:"Int64",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Interface",name:"Interface",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"Invoke",name:"Invoke",pkg:"",typ:$funcType([M],[A],true)},{prop:"Length",name:"Length",pkg:"",typ:$funcType([],[$Int],false)},{prop:"New",name:"New",pkg:"",typ:$funcType([M],[A],true)},{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String,$emptyInterface],[],false)},{prop:"SetIndex",name:"SetIndex",pkg:"",typ:$funcType([$Int,$emptyInterface],[],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Uint64",name:"Uint64",pkg:"",typ:$funcType([],[$Uint64],false)},{prop:"Unsafe",name:"Unsafe",pkg:"",typ:$funcType([],[$Uintptr],false)}]);B.init([{prop:"Object",name:"",pkg:"",typ:A,tag:""}]);C.init([{prop:"Object",name:"",pkg:"",typ:A,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_js=function(){while(true){switch($s){case 0:K();}return;}};$init_js.$blocking=true;return $init_js;};return $pkg;})(); +$packages["runtime"]=(function(){var $pkg={},A,C,X,Z,AO,AS,D,E,J,P;A=$packages["github.com/gopherjs/gopherjs/js"];C=$pkg.NotSupportedError=$newType(0,$kindStruct,"runtime.NotSupportedError","NotSupportedError","runtime",function(Feature_){this.$val=this;this.Feature=Feature_!==undefined?Feature_:"";});X=$pkg.TypeAssertionError=$newType(0,$kindStruct,"runtime.TypeAssertionError","TypeAssertionError","runtime",function(interfaceString_,concreteString_,assertedString_,missingMethod_){this.$val=this;this.interfaceString=interfaceString_!==undefined?interfaceString_:"";this.concreteString=concreteString_!==undefined?concreteString_:"";this.assertedString=assertedString_!==undefined?assertedString_:"";this.missingMethod=missingMethod_!==undefined?missingMethod_:"";});Z=$pkg.errorString=$newType(8,$kindString,"runtime.errorString","errorString","runtime",null);AO=$ptrType(C);AS=$ptrType(X);C.ptr.prototype.Error=function(){var a;a=this;return"not supported by GopherJS: "+a.Feature;};C.prototype.Error=function(){return this.$val.Error();};D=function(){var a;$js=$packages[$externalize("github.com/gopherjs/gopherjs/js",$String)];$throwRuntimeError=(function(a){var a;$panic(new Z(a));});a=$ifaceNil;a=new X.ptr("","","","");a=new C.ptr("");};E=$pkg.GOROOT=function(){var a,b;a=$global.process;if(a===undefined){return"/";}b=a.env.GOROOT;if(!(b===undefined)){return $internalize(b,$String);}return"/usr/local/go";};J=$pkg.GOMAXPROCS=function(a){var a;if(a>1){$panic(new C.ptr("GOMAXPROCS > 1"));}return 1;};P=$pkg.SetFinalizer=function(a,b){var a,b;};X.ptr.prototype.RuntimeError=function(){};X.prototype.RuntimeError=function(){return this.$val.RuntimeError();};X.ptr.prototype.Error=function(){var a,b;a=this;b=a.interfaceString;if(b===""){b="interface";}if(a.concreteString===""){return"interface conversion: "+b+" is nil, not "+a.assertedString;}if(a.missingMethod===""){return"interface conversion: "+b+" is "+a.concreteString+", not "+a.assertedString;}return"interface conversion: "+a.concreteString+" is not "+a.assertedString+": missing method "+a.missingMethod;};X.prototype.Error=function(){return this.$val.Error();};Z.prototype.RuntimeError=function(){var a;a=this.$val;};$ptrType(Z).prototype.RuntimeError=function(){return new Z(this.$get()).RuntimeError();};Z.prototype.Error=function(){var a;a=this.$val;return"runtime error: "+a;};$ptrType(Z).prototype.Error=function(){return new Z(this.$get()).Error();};AO.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];AS.methods=[{prop:"RuntimeError",name:"RuntimeError",pkg:"",typ:$funcType([],[],false)},{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];Z.methods=[{prop:"RuntimeError",name:"RuntimeError",pkg:"",typ:$funcType([],[],false)},{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];C.init([{prop:"Feature",name:"Feature",pkg:"",typ:$String,tag:""}]);X.init([{prop:"interfaceString",name:"interfaceString",pkg:"runtime",typ:$String,tag:""},{prop:"concreteString",name:"concreteString",pkg:"runtime",typ:$String,tag:""},{prop:"assertedString",name:"assertedString",pkg:"runtime",typ:$String,tag:""},{prop:"missingMethod",name:"missingMethod",pkg:"runtime",typ:$String,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_runtime=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}D();}return;}};$init_runtime.$blocking=true;return $init_runtime;};return $pkg;})(); +$packages["errors"]=(function(){var $pkg={},B,C,A;B=$pkg.errorString=$newType(0,$kindStruct,"errors.errorString","errorString","errors",function(s_){this.$val=this;this.s=s_!==undefined?s_:"";});C=$ptrType(B);A=$pkg.New=function(a){var a;return new B.ptr(a);};B.ptr.prototype.Error=function(){var a;a=this;return a.s;};B.prototype.Error=function(){return this.$val.Error();};C.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];B.init([{prop:"s",name:"s",pkg:"errors",typ:$String,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_errors=function(){while(true){switch($s){case 0:}return;}};$init_errors.$blocking=true;return $init_errors;};return $pkg;})(); +$packages["sync/atomic"]=(function(){var $pkg={},A,H,N,U,Y,AA;A=$packages["github.com/gopherjs/gopherjs/js"];H=$pkg.CompareAndSwapInt32=function(ad,ae,af){var ad,ae,af;if(ad.$get()===ae){ad.$set(af);return true;}return false;};N=$pkg.AddInt32=function(ad,ae){var ad,ae,af;af=ad.$get()+ae>>0;ad.$set(af);return af;};U=$pkg.LoadUint32=function(ad){var ad;return ad.$get();};Y=$pkg.StoreInt32=function(ad,ae){var ad,ae;ad.$set(ae);};AA=$pkg.StoreUint32=function(ad,ae){var ad,ae;ad.$set(ae);};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_atomic=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}}return;}};$init_atomic.$blocking=true;return $init_atomic;};return $pkg;})(); +$packages["sync"]=(function(){var $pkg={},B,A,C,L,M,N,O,AD,AH,AI,AK,AL,AM,AN,AO,AQ,AR,AT,AW,AX,AY,AZ,BB,BC,BD,BE,E,R,D,F,G,H,P,S,T,AA,AG;B=$packages["runtime"];A=$packages["sync/atomic"];C=$pkg.Pool=$newType(0,$kindStruct,"sync.Pool","Pool","sync",function(local_,localSize_,store_,New_){this.$val=this;this.local=local_!==undefined?local_:0;this.localSize=localSize_!==undefined?localSize_:0;this.store=store_!==undefined?store_:AW.nil;this.New=New_!==undefined?New_:$throwNilPointerError;});L=$pkg.Mutex=$newType(0,$kindStruct,"sync.Mutex","Mutex","sync",function(state_,sema_){this.$val=this;this.state=state_!==undefined?state_:0;this.sema=sema_!==undefined?sema_:0;});M=$pkg.Locker=$newType(8,$kindInterface,"sync.Locker","Locker","sync",null);N=$pkg.Once=$newType(0,$kindStruct,"sync.Once","Once","sync",function(m_,done_){this.$val=this;this.m=m_!==undefined?m_:new L.ptr();this.done=done_!==undefined?done_:0;});O=$pkg.poolLocal=$newType(0,$kindStruct,"sync.poolLocal","poolLocal","sync",function(private$0_,shared_,Mutex_,pad_){this.$val=this;this.private$0=private$0_!==undefined?private$0_:$ifaceNil;this.shared=shared_!==undefined?shared_:AW.nil;this.Mutex=Mutex_!==undefined?Mutex_:new L.ptr();this.pad=pad_!==undefined?pad_:BE.zero();});AD=$pkg.syncSema=$newType(0,$kindStruct,"sync.syncSema","syncSema","sync",function(lock_,head_,tail_){this.$val=this;this.lock=lock_!==undefined?lock_:0;this.head=head_!==undefined?head_:0;this.tail=tail_!==undefined?tail_:0;});AH=$pkg.RWMutex=$newType(0,$kindStruct,"sync.RWMutex","RWMutex","sync",function(w_,writerSem_,readerSem_,readerCount_,readerWait_){this.$val=this;this.w=w_!==undefined?w_:new L.ptr();this.writerSem=writerSem_!==undefined?writerSem_:0;this.readerSem=readerSem_!==undefined?readerSem_:0;this.readerCount=readerCount_!==undefined?readerCount_:0;this.readerWait=readerWait_!==undefined?readerWait_:0;});AI=$pkg.rlocker=$newType(0,$kindStruct,"sync.rlocker","rlocker","sync",function(w_,writerSem_,readerSem_,readerCount_,readerWait_){this.$val=this;this.w=w_!==undefined?w_:new L.ptr();this.writerSem=writerSem_!==undefined?writerSem_:0;this.readerSem=readerSem_!==undefined?readerSem_:0;this.readerCount=readerCount_!==undefined?readerCount_:0;this.readerWait=readerWait_!==undefined?readerWait_:0;});AK=$ptrType(C);AL=$sliceType(AK);AM=$structType([]);AN=$chanType(AM,false,false);AO=$sliceType(AN);AQ=$ptrType($Uint32);AR=$ptrType($Int32);AT=$ptrType(O);AW=$sliceType($emptyInterface);AX=$ptrType(AI);AY=$ptrType(AH);AZ=$funcType([],[$emptyInterface],false);BB=$ptrType(L);BC=$funcType([],[],false);BD=$ptrType(N);BE=$arrayType($Uint8,128);C.ptr.prototype.Get=function(){var f,g,h,i;f=this;if(f.store.$length===0){if(!(f.New===$throwNilPointerError)){return f.New();}return $ifaceNil;}i=(g=f.store,h=f.store.$length-1>>0,((h<0||h>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]));f.store=$subslice(f.store,0,(f.store.$length-1>>0));return i;};C.prototype.Get=function(){return this.$val.Get();};C.ptr.prototype.Put=function(f){var f,g;g=this;if($interfaceIsEqual(f,$ifaceNil)){return;}g.store=$append(g.store,f);};C.prototype.Put=function(f){return this.$val.Put(f);};D=function(f){var f;};F=function(f,$b){var $args=arguments,$r,$s=0,$this=this,g,h,i,j;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:if(f.$get()===0){}else{$s=1;continue;}g=new AN(0);h=f;(E||$throwRuntimeError("assignment to entry in nil map"))[h.$key()]={k:h,v:$append((i=E[f.$key()],i!==undefined?i.v:AO.nil),g)};j=$recv(g,$BLOCKING);$s=2;case 2:if(j&&j.$blocking){j=j();}j[0];case 1:f.$set(f.$get()-(1)>>>0);case-1:}return;}};$f.$blocking=true;return $f;};G=function(f,$b){var $args=arguments,$r,$s=0,$this=this,g,h,i,j;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:f.$set(f.$get()+(1)>>>0);h=(g=E[f.$key()],g!==undefined?g.v:AO.nil);if(h.$length===0){return;}i=((0<0||0>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+0]);h=$subslice(h,1);j=f;(E||$throwRuntimeError("assignment to entry in nil map"))[j.$key()]={k:j,v:h};if(h.$length===0){delete E[f.$key()];}$r=$send(i,new AM.ptr(),$BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}case-1:}return;}};$f.$blocking=true;return $f;};H=function(f){var f;};L.ptr.prototype.Lock=function($b){var $args=arguments,$r,$s=0,$this=this,f,g,h,i;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:f=$this;if(A.CompareAndSwapInt32(new AR(function(){return this.$target.state;},function($v){this.$target.state=$v;},f),0,1)){return;}g=false;case 1:if(!(true)){$s=2;continue;}h=f.state;i=h|1;if(!(((h&1)===0))){i=h+4>>0;}if(g){i=i&~(2);}if(A.CompareAndSwapInt32(new AR(function(){return this.$target.state;},function($v){this.$target.state=$v;},f),h,i)){}else{$s=3;continue;}if((h&1)===0){$s=2;continue;}$r=F(new AQ(function(){return this.$target.sema;},function($v){this.$target.sema=$v;},f),$BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}g=true;case 3:$s=1;continue;case 2:case-1:}return;}};$f.$blocking=true;return $f;};L.prototype.Lock=function($b){return this.$val.Lock($b);};L.ptr.prototype.Unlock=function($b){var $args=arguments,$r,$s=0,$this=this,f,g,h;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:f=$this;g=A.AddInt32(new AR(function(){return this.$target.state;},function($v){this.$target.state=$v;},f),-1);if((((g+1>>0))&1)===0){$panic(new $String("sync: unlock of unlocked mutex"));}h=g;case 1:if(!(true)){$s=2;continue;}if(((h>>2>>0)===0)||!(((h&3)===0))){return;}g=((h-4>>0))|2;if(A.CompareAndSwapInt32(new AR(function(){return this.$target.state;},function($v){this.$target.state=$v;},f),h,g)){}else{$s=3;continue;}$r=G(new AQ(function(){return this.$target.sema;},function($v){this.$target.sema=$v;},f),$BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}return;case 3:h=f.state;$s=1;continue;case 2:case-1:}return;}};$f.$blocking=true;return $f;};L.prototype.Unlock=function($b){return this.$val.Unlock($b);};N.ptr.prototype.Do=function(f,$b){var $args=arguments,$deferred=[],$err=null,$r,$s=0,$this=this,g;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){try{$deferFrames.push($deferred);s:while(true){switch($s){case 0:g=$this;if(A.LoadUint32(new AQ(function(){return this.$target.done;},function($v){this.$target.done=$v;},g))===1){return;}$r=g.m.Lock($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$deferred.push([$methodVal(g.m,"Unlock"),[$BLOCKING]]);if(g.done===0){$deferred.push([A.StoreUint32,[new AQ(function(){return this.$target.done;},function($v){this.$target.done=$v;},g),1,$BLOCKING]]);f();}case-1:}return;}}catch(err){$err=err;}finally{$deferFrames.pop();if($curGoroutine.asleep&&!$jumpToDefer){throw null;}$s=-1;$callDeferred($deferred,$err);}};$f.$blocking=true;return $f;};N.prototype.Do=function(f,$b){return this.$val.Do(f,$b);};P=function(){var f,g,h,i,j,k,l,m,n,o;f=R;g=0;while(true){if(!(g=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]);(h<0||h>=R.$length)?$throwRuntimeError("index out of range"):R.$array[R.$offset+h]=AK.nil;j=0;while(true){if(!(j<(i.localSize>>0))){break;}k=T(i.local,j);k.private$0=$ifaceNil;l=k.shared;m=0;while(true){if(!(m=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+n]=$ifaceNil);m++;}k.shared=AW.nil;j=j+(1)>>0;}i.local=0;i.localSize=0;g++;}R=new AL([]);};S=function(){D(P);};T=function(f,g){var f,g,h;return(h=f,(h.nilCheck,((g<0||g>=h.length)?$throwRuntimeError("index out of range"):h[g])));};AA=function(){};AG=function(){var f;f=$clone(new AD.ptr(),AD);H(12);};AH.ptr.prototype.RLock=function($b){var $args=arguments,$r,$s=0,$this=this,f;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:f=$this;if(A.AddInt32(new AR(function(){return this.$target.readerCount;},function($v){this.$target.readerCount=$v;},f),1)<0){}else{$s=1;continue;}$r=F(new AQ(function(){return this.$target.readerSem;},function($v){this.$target.readerSem=$v;},f),$BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}case 1:case-1:}return;}};$f.$blocking=true;return $f;};AH.prototype.RLock=function($b){return this.$val.RLock($b);};AH.ptr.prototype.RUnlock=function($b){var $args=arguments,$r,$s=0,$this=this,f,g;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:f=$this;g=A.AddInt32(new AR(function(){return this.$target.readerCount;},function($v){this.$target.readerCount=$v;},f),-1);if(g<0){}else{$s=1;continue;}if(((g+1>>0)===0)||((g+1>>0)===-1073741824)){AA();$panic(new $String("sync: RUnlock of unlocked RWMutex"));}if(A.AddInt32(new AR(function(){return this.$target.readerWait;},function($v){this.$target.readerWait=$v;},f),-1)===0){}else{$s=2;continue;}$r=G(new AQ(function(){return this.$target.writerSem;},function($v){this.$target.writerSem=$v;},f),$BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}case 2:case 1:case-1:}return;}};$f.$blocking=true;return $f;};AH.prototype.RUnlock=function($b){return this.$val.RUnlock($b);};AH.ptr.prototype.Lock=function($b){var $args=arguments,$r,$s=0,$this=this,f,g;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:f=$this;$r=f.w.Lock($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}g=A.AddInt32(new AR(function(){return this.$target.readerCount;},function($v){this.$target.readerCount=$v;},f),-1073741824)+1073741824>>0;if(!((g===0))&&!((A.AddInt32(new AR(function(){return this.$target.readerWait;},function($v){this.$target.readerWait=$v;},f),g)===0))){}else{$s=2;continue;}$r=F(new AQ(function(){return this.$target.writerSem;},function($v){this.$target.writerSem=$v;},f),$BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}case 2:case-1:}return;}};$f.$blocking=true;return $f;};AH.prototype.Lock=function($b){return this.$val.Lock($b);};AH.ptr.prototype.Unlock=function($b){var $args=arguments,$r,$s=0,$this=this,f,g,h;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:f=$this;g=A.AddInt32(new AR(function(){return this.$target.readerCount;},function($v){this.$target.readerCount=$v;},f),1073741824);if(g>=1073741824){AA();$panic(new $String("sync: Unlock of unlocked RWMutex"));}h=0;case 1:if(!(h<(g>>0))){$s=2;continue;}$r=G(new AQ(function(){return this.$target.readerSem;},function($v){this.$target.readerSem=$v;},f),$BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}h=h+(1)>>0;$s=1;continue;case 2:$r=f.w.Unlock($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}case-1:}return;}};$f.$blocking=true;return $f;};AH.prototype.Unlock=function($b){return this.$val.Unlock($b);};AH.ptr.prototype.RLocker=function(){var f;f=this;return $pointerOfStructConversion(f,AX);};AH.prototype.RLocker=function(){return this.$val.RLocker();};AI.ptr.prototype.Lock=function($b){var $args=arguments,$r,$s=0,$this=this,f;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:f=$this;$r=$pointerOfStructConversion(f,AY).RLock($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}case-1:}return;}};$f.$blocking=true;return $f;};AI.prototype.Lock=function($b){return this.$val.Lock($b);};AI.ptr.prototype.Unlock=function($b){var $args=arguments,$r,$s=0,$this=this,f;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:f=$this;$r=$pointerOfStructConversion(f,AY).RUnlock($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}case-1:}return;}};$f.$blocking=true;return $f;};AI.prototype.Unlock=function($b){return this.$val.Unlock($b);};AK.methods=[{prop:"Get",name:"Get",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"Put",name:"Put",pkg:"",typ:$funcType([$emptyInterface],[],false)},{prop:"getSlow",name:"getSlow",pkg:"sync",typ:$funcType([],[$emptyInterface],false)},{prop:"pin",name:"pin",pkg:"sync",typ:$funcType([],[AT],false)},{prop:"pinSlow",name:"pinSlow",pkg:"sync",typ:$funcType([],[AT],false)}];BB.methods=[{prop:"Lock",name:"Lock",pkg:"",typ:$funcType([],[],false)},{prop:"Unlock",name:"Unlock",pkg:"",typ:$funcType([],[],false)}];BD.methods=[{prop:"Do",name:"Do",pkg:"",typ:$funcType([BC],[],false)}];AY.methods=[{prop:"RLock",name:"RLock",pkg:"",typ:$funcType([],[],false)},{prop:"RUnlock",name:"RUnlock",pkg:"",typ:$funcType([],[],false)},{prop:"Lock",name:"Lock",pkg:"",typ:$funcType([],[],false)},{prop:"Unlock",name:"Unlock",pkg:"",typ:$funcType([],[],false)},{prop:"RLocker",name:"RLocker",pkg:"",typ:$funcType([],[M],false)}];AX.methods=[{prop:"Lock",name:"Lock",pkg:"",typ:$funcType([],[],false)},{prop:"Unlock",name:"Unlock",pkg:"",typ:$funcType([],[],false)}];C.init([{prop:"local",name:"local",pkg:"sync",typ:$UnsafePointer,tag:""},{prop:"localSize",name:"localSize",pkg:"sync",typ:$Uintptr,tag:""},{prop:"store",name:"store",pkg:"sync",typ:AW,tag:""},{prop:"New",name:"New",pkg:"",typ:AZ,tag:""}]);L.init([{prop:"state",name:"state",pkg:"sync",typ:$Int32,tag:""},{prop:"sema",name:"sema",pkg:"sync",typ:$Uint32,tag:""}]);M.init([{prop:"Lock",name:"Lock",pkg:"",typ:$funcType([],[],false)},{prop:"Unlock",name:"Unlock",pkg:"",typ:$funcType([],[],false)}]);N.init([{prop:"m",name:"m",pkg:"sync",typ:L,tag:""},{prop:"done",name:"done",pkg:"sync",typ:$Uint32,tag:""}]);O.init([{prop:"private$0",name:"private",pkg:"sync",typ:$emptyInterface,tag:""},{prop:"shared",name:"shared",pkg:"sync",typ:AW,tag:""},{prop:"Mutex",name:"",pkg:"",typ:L,tag:""},{prop:"pad",name:"pad",pkg:"sync",typ:BE,tag:""}]);AD.init([{prop:"lock",name:"lock",pkg:"sync",typ:$Uintptr,tag:""},{prop:"head",name:"head",pkg:"sync",typ:$UnsafePointer,tag:""},{prop:"tail",name:"tail",pkg:"sync",typ:$UnsafePointer,tag:""}]);AH.init([{prop:"w",name:"w",pkg:"sync",typ:L,tag:""},{prop:"writerSem",name:"writerSem",pkg:"sync",typ:$Uint32,tag:""},{prop:"readerSem",name:"readerSem",pkg:"sync",typ:$Uint32,tag:""},{prop:"readerCount",name:"readerCount",pkg:"sync",typ:$Int32,tag:""},{prop:"readerWait",name:"readerWait",pkg:"sync",typ:$Int32,tag:""}]);AI.init([{prop:"w",name:"w",pkg:"sync",typ:L,tag:""},{prop:"writerSem",name:"writerSem",pkg:"sync",typ:$Uint32,tag:""},{prop:"readerSem",name:"readerSem",pkg:"sync",typ:$Uint32,tag:""},{prop:"readerCount",name:"readerCount",pkg:"sync",typ:$Int32,tag:""},{prop:"readerWait",name:"readerWait",pkg:"sync",typ:$Int32,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_sync=function(){while(true){switch($s){case 0:$r=B.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}R=AL.nil;E=new $Map();S();AG();}return;}};$init_sync.$blocking=true;return $init_sync;};return $pkg;})(); +$packages["io"]=(function(){var $pkg={},B,A,C,E,F,P,Q,W,AW,AI,AJ,AD;B=$packages["errors"];A=$packages["runtime"];C=$packages["sync"];E=$pkg.Reader=$newType(8,$kindInterface,"io.Reader","Reader","io",null);F=$pkg.Writer=$newType(8,$kindInterface,"io.Writer","Writer","io",null);P=$pkg.ReaderFrom=$newType(8,$kindInterface,"io.ReaderFrom","ReaderFrom","io",null);Q=$pkg.WriterTo=$newType(8,$kindInterface,"io.WriterTo","WriterTo","io",null);W=$pkg.RuneReader=$newType(8,$kindInterface,"io.RuneReader","RuneReader","io",null);AW=$sliceType($Uint8);AD=$pkg.Copy=function(b,c){var b,c,d=new $Int64(0,0),e=$ifaceNil,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;f=$assertType(c,Q,true);g=f[0];h=f[1];if(h){i=g.WriteTo(b);d=i[0];e=i[1];return[d,e];}j=$assertType(b,P,true);k=j[0];l=j[1];if(l){m=k.ReadFrom(c);d=m[0];e=m[1];return[d,e];}n=$makeSlice(AW,32768);while(true){if(!(true)){break;}o=c.Read(n);p=o[0];q=o[1];if(p>0){r=b.Write($subslice(n,0,p));s=r[0];t=r[1];if(s>0){d=(u=new $Int64(0,s),new $Int64(d.$high+u.$high,d.$low+u.$low));}if(!($interfaceIsEqual(t,$ifaceNil))){e=t;break;}if(!((p===s))){e=$pkg.ErrShortWrite;break;}}if($interfaceIsEqual(q,$pkg.EOF)){break;}if(!($interfaceIsEqual(q,$ifaceNil))){e=q;break;}}v=d;w=e;d=v;e=w;return[d,e];};E.init([{prop:"Read",name:"Read",pkg:"",typ:$funcType([AW],[$Int,$error],false)}]);F.init([{prop:"Write",name:"Write",pkg:"",typ:$funcType([AW],[$Int,$error],false)}]);P.init([{prop:"ReadFrom",name:"ReadFrom",pkg:"",typ:$funcType([E],[$Int64,$error],false)}]);Q.init([{prop:"WriteTo",name:"WriteTo",pkg:"",typ:$funcType([F],[$Int64,$error],false)}]);W.init([{prop:"ReadRune",name:"ReadRune",pkg:"",typ:$funcType([],[$Int32,$Int,$error],false)}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_io=function(){while(true){switch($s){case 0:$r=B.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$pkg.ErrShortWrite=B.New("short write");$pkg.ErrShortBuffer=B.New("short buffer");$pkg.EOF=B.New("EOF");$pkg.ErrUnexpectedEOF=B.New("unexpected EOF");$pkg.ErrNoProgress=B.New("multiple Read calls return no data or error");AI=B.New("Seek: invalid whence");AJ=B.New("Seek: invalid offset");$pkg.ErrClosedPipe=B.New("io: read/write on closed pipe");}return;}};$init_io.$blocking=true;return $init_io;};return $pkg;})(); +$packages["math"]=(function(){var $pkg={},A,FG,B,C,D,E,F,EN,G,W,X,Z,AI,AR,AS,AT,AU,EP;A=$packages["github.com/gopherjs/gopherjs/js"];FG=$arrayType($Float64,70);G=function(){AR(0);AS(0);};W=$pkg.Inf=function(ao){var ao;if(ao>=0){return D;}else{return E;}};X=$pkg.IsInf=function(ao,ap){var ao,ap;if(ao===D){return ap>=0;}if(ao===E){return ap<=0;}return false;};Z=$pkg.Ldexp=function(ao,ap){var ao,ap;if(ao===0){return ao;}if(ap>=1024){return ao*$parseFloat(B.pow(2,1023))*$parseFloat(B.pow(2,ap-1023>>0));}if(ap<=-1024){return ao*$parseFloat(B.pow(2,-1023))*$parseFloat(B.pow(2,ap+1023>>0));}return ao*$parseFloat(B.pow(2,ap));};AI=$pkg.NaN=function(){return F;};AR=$pkg.Float32bits=function(ao){var ao,ap,aq,ar;if(ao===0){if(1/ao===E){return 2147483648;}return 0;}if(!(ao===ao)){return 2143289344;}ap=0;if(ao<0){ap=2147483648;ao=-ao;}aq=150;while(true){if(!(ao>=1.6777216e+07)){break;}ao=ao/(2);aq=aq+(1)>>>0;if(aq===255){if(ao>=8.388608e+06){ao=D;}break;}}while(true){if(!(ao<8.388608e+06)){break;}aq=aq-(1)>>>0;if(aq===0){break;}ao=ao*(2);}ar=$parseFloat($mod(ao,2));if((ar>0.5&&ar<1)||ar>=1.5){ao=ao+(1);}return(((ap|(aq<<23>>>0))>>>0)|(((ao>>0)&~8388608)))>>>0;};AS=$pkg.Float32frombits=function(ao){var ao,ap,aq,ar;ap=1;if(!((((ao&2147483648)>>>0)===0))){ap=-1;}aq=(((ao>>>23>>>0))&255)>>>0;ar=(ao&8388607)>>>0;if(aq===255){if(ar===0){return ap/0;}return F;}if(!((aq===0))){ar=ar+(8388608)>>>0;}if(aq===0){aq=1;}return Z(ar,((aq>>0)-127>>0)-23>>0)*ap;};AT=$pkg.Float64bits=function(ao){var ao,ap,aq,ar,as,at,au;if(ao===0){if(1/ao===E){return new $Uint64(2147483648,0);}return new $Uint64(0,0);}if(!((ao===ao))){return new $Uint64(2146959360,1);}ap=new $Uint64(0,0);if(ao<0){ap=new $Uint64(2147483648,0);ao=-ao;}aq=1075;while(true){if(!(ao>=9.007199254740992e+15)){break;}ao=ao/(2);aq=aq+(1)>>>0;if(aq===2047){break;}}while(true){if(!(ao<4.503599627370496e+15)){break;}aq=aq-(1)>>>0;if(aq===0){break;}ao=ao*(2);}return(ar=(as=$shiftLeft64(new $Uint64(0,aq),52),new $Uint64(ap.$high|as.$high,(ap.$low|as.$low)>>>0)),at=(au=new $Uint64(0,ao),new $Uint64(au.$high&~1048576,(au.$low&~0)>>>0)),new $Uint64(ar.$high|at.$high,(ar.$low|at.$low)>>>0));};AU=$pkg.Float64frombits=function(ao){var ao,ap,aq,ar,as,at,au;ap=1;if(!((aq=new $Uint64(ao.$high&2147483648,(ao.$low&0)>>>0),(aq.$high===0&&aq.$low===0)))){ap=-1;}as=(ar=$shiftRightUint64(ao,52),new $Uint64(ar.$high&0,(ar.$low&2047)>>>0));at=new $Uint64(ao.$high&1048575,(ao.$low&4294967295)>>>0);if((as.$high===0&&as.$low===2047)){if((at.$high===0&&at.$low===0)){return ap/0;}return F;}if(!((as.$high===0&&as.$low===0))){at=(au=new $Uint64(1048576,0),new $Uint64(at.$high+au.$high,at.$low+au.$low));}if((as.$high===0&&as.$low===0)){as=new $Uint64(0,1);}return Z($flatten64(at),((as.$low>>0)-1023>>0)-52>>0)*ap;};EP=function(){var ao,ap,aq,ar;EN[0]=1;EN[1]=10;ao=2;while(true){if(!(ao<70)){break;}aq=(ap=ao/2,(ap===ap&&ap!==1/0&&ap!==-1/0)?ap>>0:$throwRuntimeError("integer divide by zero"));(ao<0||ao>=EN.length)?$throwRuntimeError("index out of range"):EN[ao]=((aq<0||aq>=EN.length)?$throwRuntimeError("index out of range"):EN[aq])*(ar=ao-aq>>0,((ar<0||ar>=EN.length)?$throwRuntimeError("index out of range"):EN[ar]));ao=ao+(1)>>0;}};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_math=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}EN=FG.zero();B=$global.Math;C=0;D=1/C;E=-1/C;F=0/C;G();EP();}return;}};$init_math.$blocking=true;return $init_math;};return $pkg;})(); +$packages["unicode"]=(function(){var $pkg={},O,P,Q,R,T,AF,IE,IF,IG,IH,II,IJ,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR,AS,AT,AU,AV,AW,AX,AY,AZ,BA,BB,BC,BD,BE,BF,BG,BH,BI,BJ,BK,BL,BM,BN,BO,BP,BQ,BR,BS,BT,BU,BV,BW,BX,BY,BZ,CA,CB,CC,CD,CE,CF,CG,CH,CI,CJ,CK,CL,CM,CN,CO,CP,CQ,CR,CS,CT,CU,CV,CW,CX,CY,CZ,DA,DB,DC,DD,DE,DF,DG,DH,DI,DJ,DK,DL,DM,DN,DO,DP,DQ,DR,DS,DT,DU,DV,DW,DX,DY,DZ,EA,EB,EC,ED,EE,EF,EG,EH,EI,EJ,EK,EL,EM,EN,EO,EP,EQ,ER,ES,ET,EU,EV,EW,EX,EY,EZ,FA,FB,FC,FD,FE,FF,FG,FH,FI,FJ,FK,FL,FM,FN,FO,FP,FQ,FR,FS,FT,FU,FV,FW,FX,FY,FZ,GA,GB,GC,GD,GE,GF,GG,GH,GI,GJ,GK,GL,HR,HS,HT,HU,HV,HW,HX,HY,HZ,IA,IB,IC,ID,b,c,d,e,h,i,j,k,A,C,D,E,G,I,K,M,U,V,W,X,Y,AB,AC,AD,AG;O=$pkg.RangeTable=$newType(0,$kindStruct,"unicode.RangeTable","RangeTable","unicode",function(R16_,R32_,LatinOffset_){this.$val=this;this.R16=R16_!==undefined?R16_:IE.nil;this.R32=R32_!==undefined?R32_:IF.nil;this.LatinOffset=LatinOffset_!==undefined?LatinOffset_:0;});P=$pkg.Range16=$newType(0,$kindStruct,"unicode.Range16","Range16","unicode",function(Lo_,Hi_,Stride_){this.$val=this;this.Lo=Lo_!==undefined?Lo_:0;this.Hi=Hi_!==undefined?Hi_:0;this.Stride=Stride_!==undefined?Stride_:0;});Q=$pkg.Range32=$newType(0,$kindStruct,"unicode.Range32","Range32","unicode",function(Lo_,Hi_,Stride_){this.$val=this;this.Lo=Lo_!==undefined?Lo_:0;this.Hi=Hi_!==undefined?Hi_:0;this.Stride=Stride_!==undefined?Stride_:0;});R=$pkg.CaseRange=$newType(0,$kindStruct,"unicode.CaseRange","CaseRange","unicode",function(Lo_,Hi_,Delta_){this.$val=this;this.Lo=Lo_!==undefined?Lo_:0;this.Hi=Hi_!==undefined?Hi_:0;this.Delta=Delta_!==undefined?Delta_:T.zero();});T=$pkg.d=$newType(12,$kindArray,"unicode.d","d","unicode",null);AF=$pkg.foldPair=$newType(0,$kindStruct,"unicode.foldPair","foldPair","unicode",function(From_,To_){this.$val=this;this.From=From_!==undefined?From_:0;this.To=To_!==undefined?To_:0;});IE=$sliceType(P);IF=$sliceType(Q);IG=$ptrType(O);IH=$sliceType(IG);II=$sliceType(R);IJ=$sliceType(AF);A=function(l,m,n){var l,m,n,o,p,q,r,s,t,u;if(l<0||3<=l){return 65533;}o=0;p=n.$length;while(true){if(!(o>0))/2,(q===q&&q!==1/0&&q!==-1/0)?q>>0:$throwRuntimeError("integer divide by zero"))>>0;s=((r<0||r>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+r]);if((s.Lo>>0)<=m&&m<=(s.Hi>>0)){u=(t=s.Delta,((l<0||l>=t.length)?$throwRuntimeError("index out of range"):t[l]));if(u>1114111){return(s.Lo>>0)+(((((m-(s.Lo>>0)>>0))&~1)|((l&1)>>0)))>>0;}return m+u>>0;}if(m<(s.Lo>>0)){p=r;}else{o=r+1>>0;}}return m;};C=$pkg.IsDigit=function(l){var l;if(l<=255){return 48<=l&&l<=57;}return X($pkg.Digit,l);};D=$pkg.IsGraphic=function(l){var l,m;if((l>>>0)<=255){return!(((((m=(l<<24>>>24),((m<0||m>=HT.length)?$throwRuntimeError("index out of range"):HT[m]))&144)>>>0)===0));}return G(l,$pkg.GraphicRanges);};E=$pkg.IsPrint=function(l){var l,m;if((l>>>0)<=255){return!(((((m=(l<<24>>>24),((m<0||m>=HT.length)?$throwRuntimeError("index out of range"):HT[m]))&128)>>>0)===0));}return G(l,$pkg.PrintRanges);};G=$pkg.In=function(l,m){var l,m,n,o,p;n=m;o=0;while(true){if(!(o=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+o]);if(W(p,l)){return true;}o++;}return false;};I=$pkg.IsLetter=function(l){var l,m;if((l>>>0)<=255){return!(((((m=(l<<24>>>24),((m<0||m>=HT.length)?$throwRuntimeError("index out of range"):HT[m]))&96)>>>0)===0));}return X($pkg.Letter,l);};K=$pkg.IsNumber=function(l){var l,m;if((l>>>0)<=255){return!(((((m=(l<<24>>>24),((m<0||m>=HT.length)?$throwRuntimeError("index out of range"):HT[m]))&4)>>>0)===0));}return X($pkg.Number,l);};M=$pkg.IsSpace=function(l){var l,m;if((l>>>0)<=255){m=l;if(m===9||m===10||m===11||m===12||m===13||m===32||m===133||m===160){return true;}return false;}return X($pkg.White_Space,l);};U=function(l,m){var l,m,n,o,p,q,r,s,t,u,v,w,x;if(l.$length<=18||m<=255){n=l;o=0;while(true){if(!(o=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+p]);if(m>>16))%q.Stride,r===r?r:$throwRuntimeError("integer divide by zero"))===0;}o++;}return false;}s=0;t=l.$length;while(true){if(!(s>0))/2,(u===u&&u!==1/0&&u!==-1/0)?u>>0:$throwRuntimeError("integer divide by zero"))>>0;w=((v<0||v>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+v]);if(w.Lo<=m&&m<=w.Hi){return(x=((m-w.Lo<<16>>>16))%w.Stride,x===x?x:$throwRuntimeError("integer divide by zero"))===0;}if(m>0;}}return false;};V=function(l,m){var l,m,n,o,p,q,r,s,t,u,v,w,x;if(l.$length<=18){n=l;o=0;while(true){if(!(o=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+p]);if(m>>0))%q.Stride,r===r?r:$throwRuntimeError("integer divide by zero"))===0;}o++;}return false;}s=0;t=l.$length;while(true){if(!(s>0))/2,(u===u&&u!==1/0&&u!==-1/0)?u>>0:$throwRuntimeError("integer divide by zero"))>>0;w=$clone(((v<0||v>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+v]),Q);if(w.Lo<=m&&m<=w.Hi){return(x=((m-w.Lo>>>0))%w.Stride,x===x?x:$throwRuntimeError("integer divide by zero"))===0;}if(m>0;}}return false;};W=$pkg.Is=function(l,m){var l,m,n,o,p;n=l.R16;if(n.$length>0&&m<=((o=n.$length-1>>0,((o<0||o>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+o])).Hi>>0)){return U(n,(m<<16>>>16));}p=l.R32;if(p.$length>0&&m>=(((0<0||0>=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+0]).Lo>>0)){return V(p,(m>>>0));}return false;};X=function(l,m){var l,m,n,o,p,q;n=l.R16;o=l.LatinOffset;if(n.$length>o&&m<=((p=n.$length-1>>0,((p<0||p>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+p])).Hi>>0)){return U($subslice(n,o),(m<<16>>>16));}q=l.R32;if(q.$length>0&&m>=(((0<0||0>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+0]).Lo>>0)){return V(q,(m>>>0));}return false;};Y=$pkg.IsUpper=function(l){var l,m;if((l>>>0)<=255){return(((m=(l<<24>>>24),((m<0||m>=HT.length)?$throwRuntimeError("index out of range"):HT[m]))&96)>>>0)===32;}return X($pkg.Upper,l);};AB=$pkg.To=function(l,m){var l,m;return A(l,m,$pkg.CaseRanges);};AC=$pkg.ToUpper=function(l){var l;if(l<=127){if(97<=l&&l<=122){l=l-(32)>>0;}return l;}return AB(0,l);};AD=$pkg.ToLower=function(l){var l;if(l<=127){if(65<=l&&l<=90){l=l+(32)>>0;}return l;}return AB(1,l);};AG=$pkg.SimpleFold=function(l){var l,m,n,o,p,q;m=0;n=HU.$length;while(true){if(!(m>0))/2,(o===o&&o!==1/0&&o!==-1/0)?o>>0:$throwRuntimeError("integer divide by zero"))>>0;if((((p<0||p>=HU.$length)?$throwRuntimeError("index out of range"):HU.$array[HU.$offset+p]).From>>0)>0;}else{n=p;}}if(m=HU.$length)?$throwRuntimeError("index out of range"):HU.$array[HU.$offset+m]).From>>0)===l)){return(((m<0||m>=HU.$length)?$throwRuntimeError("index out of range"):HU.$array[HU.$offset+m]).To>>0);}q=AD(l);if(!((q===l))){return q;}return AC(l);};O.init([{prop:"R16",name:"R16",pkg:"",typ:IE,tag:""},{prop:"R32",name:"R32",pkg:"",typ:IF,tag:""},{prop:"LatinOffset",name:"LatinOffset",pkg:"",typ:$Int,tag:""}]);P.init([{prop:"Lo",name:"Lo",pkg:"",typ:$Uint16,tag:""},{prop:"Hi",name:"Hi",pkg:"",typ:$Uint16,tag:""},{prop:"Stride",name:"Stride",pkg:"",typ:$Uint16,tag:""}]);Q.init([{prop:"Lo",name:"Lo",pkg:"",typ:$Uint32,tag:""},{prop:"Hi",name:"Hi",pkg:"",typ:$Uint32,tag:""},{prop:"Stride",name:"Stride",pkg:"",typ:$Uint32,tag:""}]);R.init([{prop:"Lo",name:"Lo",pkg:"",typ:$Uint32,tag:""},{prop:"Hi",name:"Hi",pkg:"",typ:$Uint32,tag:""},{prop:"Delta",name:"Delta",pkg:"",typ:T,tag:""}]);T.init($Int32,3);AF.init([{prop:"From",name:"From",pkg:"",typ:$Uint16,tag:""},{prop:"To",name:"To",pkg:"",typ:$Uint16,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_unicode=function(){while(true){switch($s){case 0:AH=new O.ptr(new IE([new P.ptr(1,31,1),new P.ptr(127,159,1),new P.ptr(173,1536,1363),new P.ptr(1537,1541,1),new P.ptr(1564,1757,193),new P.ptr(1807,6158,4351),new P.ptr(8203,8207,1),new P.ptr(8234,8238,1),new P.ptr(8288,8292,1),new P.ptr(8294,8303,1),new P.ptr(55296,63743,1),new P.ptr(65279,65529,250),new P.ptr(65530,65531,1)]),new IF([new Q.ptr(69821,113824,44003),new Q.ptr(113825,113827,1),new Q.ptr(119155,119162,1),new Q.ptr(917505,917536,31),new Q.ptr(917537,917631,1),new Q.ptr(983040,1048573,1),new Q.ptr(1048576,1114109,1)]),2);AI=new O.ptr(new IE([new P.ptr(1,31,1),new P.ptr(127,159,1)]),IF.nil,2);AJ=new O.ptr(new IE([new P.ptr(173,1536,1363),new P.ptr(1537,1541,1),new P.ptr(1564,1757,193),new P.ptr(1807,6158,4351),new P.ptr(8203,8207,1),new P.ptr(8234,8238,1),new P.ptr(8288,8292,1),new P.ptr(8294,8303,1),new P.ptr(65279,65529,250),new P.ptr(65530,65531,1)]),new IF([new Q.ptr(69821,113824,44003),new Q.ptr(113825,113827,1),new Q.ptr(119155,119162,1),new Q.ptr(917505,917536,31),new Q.ptr(917537,917631,1)]),0);AK=new O.ptr(new IE([new P.ptr(57344,63743,1)]),new IF([new Q.ptr(983040,1048573,1),new Q.ptr(1048576,1114109,1)]),0);AL=new O.ptr(new IE([new P.ptr(55296,57343,1)]),IF.nil,0);AM=new O.ptr(new IE([new P.ptr(65,90,1),new P.ptr(97,122,1),new P.ptr(170,181,11),new P.ptr(186,192,6),new P.ptr(193,214,1),new P.ptr(216,246,1),new P.ptr(248,705,1),new P.ptr(710,721,1),new P.ptr(736,740,1),new P.ptr(748,750,2),new P.ptr(880,884,1),new P.ptr(886,887,1),new P.ptr(890,893,1),new P.ptr(895,902,7),new P.ptr(904,906,1),new P.ptr(908,910,2),new P.ptr(911,929,1),new P.ptr(931,1013,1),new P.ptr(1015,1153,1),new P.ptr(1162,1327,1),new P.ptr(1329,1366,1),new P.ptr(1369,1377,8),new P.ptr(1378,1415,1),new P.ptr(1488,1514,1),new P.ptr(1520,1522,1),new P.ptr(1568,1610,1),new P.ptr(1646,1647,1),new P.ptr(1649,1747,1),new P.ptr(1749,1765,16),new P.ptr(1766,1774,8),new P.ptr(1775,1786,11),new P.ptr(1787,1788,1),new P.ptr(1791,1808,17),new P.ptr(1810,1839,1),new P.ptr(1869,1957,1),new P.ptr(1969,1994,25),new P.ptr(1995,2026,1),new P.ptr(2036,2037,1),new P.ptr(2042,2048,6),new P.ptr(2049,2069,1),new P.ptr(2074,2084,10),new P.ptr(2088,2112,24),new P.ptr(2113,2136,1),new P.ptr(2208,2226,1),new P.ptr(2308,2361,1),new P.ptr(2365,2384,19),new P.ptr(2392,2401,1),new P.ptr(2417,2432,1),new P.ptr(2437,2444,1),new P.ptr(2447,2448,1),new P.ptr(2451,2472,1),new P.ptr(2474,2480,1),new P.ptr(2482,2486,4),new P.ptr(2487,2489,1),new P.ptr(2493,2510,17),new P.ptr(2524,2525,1),new P.ptr(2527,2529,1),new P.ptr(2544,2545,1),new P.ptr(2565,2570,1),new P.ptr(2575,2576,1),new P.ptr(2579,2600,1),new P.ptr(2602,2608,1),new P.ptr(2610,2611,1),new P.ptr(2613,2614,1),new P.ptr(2616,2617,1),new P.ptr(2649,2652,1),new P.ptr(2654,2674,20),new P.ptr(2675,2676,1),new P.ptr(2693,2701,1),new P.ptr(2703,2705,1),new P.ptr(2707,2728,1),new P.ptr(2730,2736,1),new P.ptr(2738,2739,1),new P.ptr(2741,2745,1),new P.ptr(2749,2768,19),new P.ptr(2784,2785,1),new P.ptr(2821,2828,1),new P.ptr(2831,2832,1),new P.ptr(2835,2856,1),new P.ptr(2858,2864,1),new P.ptr(2866,2867,1),new P.ptr(2869,2873,1),new P.ptr(2877,2908,31),new P.ptr(2909,2911,2),new P.ptr(2912,2913,1),new P.ptr(2929,2947,18),new P.ptr(2949,2954,1),new P.ptr(2958,2960,1),new P.ptr(2962,2965,1),new P.ptr(2969,2970,1),new P.ptr(2972,2974,2),new P.ptr(2975,2979,4),new P.ptr(2980,2984,4),new P.ptr(2985,2986,1),new P.ptr(2990,3001,1),new P.ptr(3024,3077,53),new P.ptr(3078,3084,1),new P.ptr(3086,3088,1),new P.ptr(3090,3112,1),new P.ptr(3114,3129,1),new P.ptr(3133,3160,27),new P.ptr(3161,3168,7),new P.ptr(3169,3205,36),new P.ptr(3206,3212,1),new P.ptr(3214,3216,1),new P.ptr(3218,3240,1),new P.ptr(3242,3251,1),new P.ptr(3253,3257,1),new P.ptr(3261,3294,33),new P.ptr(3296,3297,1),new P.ptr(3313,3314,1),new P.ptr(3333,3340,1),new P.ptr(3342,3344,1),new P.ptr(3346,3386,1),new P.ptr(3389,3406,17),new P.ptr(3424,3425,1),new P.ptr(3450,3455,1),new P.ptr(3461,3478,1),new P.ptr(3482,3505,1),new P.ptr(3507,3515,1),new P.ptr(3517,3520,3),new P.ptr(3521,3526,1),new P.ptr(3585,3632,1),new P.ptr(3634,3635,1),new P.ptr(3648,3654,1),new P.ptr(3713,3714,1),new P.ptr(3716,3719,3),new P.ptr(3720,3722,2),new P.ptr(3725,3732,7),new P.ptr(3733,3735,1),new P.ptr(3737,3743,1),new P.ptr(3745,3747,1),new P.ptr(3749,3751,2),new P.ptr(3754,3755,1),new P.ptr(3757,3760,1),new P.ptr(3762,3763,1),new P.ptr(3773,3776,3),new P.ptr(3777,3780,1),new P.ptr(3782,3804,22),new P.ptr(3805,3807,1),new P.ptr(3840,3904,64),new P.ptr(3905,3911,1),new P.ptr(3913,3948,1),new P.ptr(3976,3980,1),new P.ptr(4096,4138,1),new P.ptr(4159,4176,17),new P.ptr(4177,4181,1),new P.ptr(4186,4189,1),new P.ptr(4193,4197,4),new P.ptr(4198,4206,8),new P.ptr(4207,4208,1),new P.ptr(4213,4225,1),new P.ptr(4238,4256,18),new P.ptr(4257,4293,1),new P.ptr(4295,4301,6),new P.ptr(4304,4346,1),new P.ptr(4348,4680,1),new P.ptr(4682,4685,1),new P.ptr(4688,4694,1),new P.ptr(4696,4698,2),new P.ptr(4699,4701,1),new P.ptr(4704,4744,1),new P.ptr(4746,4749,1),new P.ptr(4752,4784,1),new P.ptr(4786,4789,1),new P.ptr(4792,4798,1),new P.ptr(4800,4802,2),new P.ptr(4803,4805,1),new P.ptr(4808,4822,1),new P.ptr(4824,4880,1),new P.ptr(4882,4885,1),new P.ptr(4888,4954,1),new P.ptr(4992,5007,1),new P.ptr(5024,5108,1),new P.ptr(5121,5740,1),new P.ptr(5743,5759,1),new P.ptr(5761,5786,1),new P.ptr(5792,5866,1),new P.ptr(5873,5880,1),new P.ptr(5888,5900,1),new P.ptr(5902,5905,1),new P.ptr(5920,5937,1),new P.ptr(5952,5969,1),new P.ptr(5984,5996,1),new P.ptr(5998,6000,1),new P.ptr(6016,6067,1),new P.ptr(6103,6108,5),new P.ptr(6176,6263,1),new P.ptr(6272,6312,1),new P.ptr(6314,6320,6),new P.ptr(6321,6389,1),new P.ptr(6400,6430,1),new P.ptr(6480,6509,1),new P.ptr(6512,6516,1),new P.ptr(6528,6571,1),new P.ptr(6593,6599,1),new P.ptr(6656,6678,1),new P.ptr(6688,6740,1),new P.ptr(6823,6917,94),new P.ptr(6918,6963,1),new P.ptr(6981,6987,1),new P.ptr(7043,7072,1),new P.ptr(7086,7087,1),new P.ptr(7098,7141,1),new P.ptr(7168,7203,1),new P.ptr(7245,7247,1),new P.ptr(7258,7293,1),new P.ptr(7401,7404,1),new P.ptr(7406,7409,1),new P.ptr(7413,7414,1),new P.ptr(7424,7615,1),new P.ptr(7680,7957,1),new P.ptr(7960,7965,1),new P.ptr(7968,8005,1),new P.ptr(8008,8013,1),new P.ptr(8016,8023,1),new P.ptr(8025,8031,2),new P.ptr(8032,8061,1),new P.ptr(8064,8116,1),new P.ptr(8118,8124,1),new P.ptr(8126,8130,4),new P.ptr(8131,8132,1),new P.ptr(8134,8140,1),new P.ptr(8144,8147,1),new P.ptr(8150,8155,1),new P.ptr(8160,8172,1),new P.ptr(8178,8180,1),new P.ptr(8182,8188,1),new P.ptr(8305,8319,14),new P.ptr(8336,8348,1),new P.ptr(8450,8455,5),new P.ptr(8458,8467,1),new P.ptr(8469,8473,4),new P.ptr(8474,8477,1),new P.ptr(8484,8490,2),new P.ptr(8491,8493,1),new P.ptr(8495,8505,1),new P.ptr(8508,8511,1),new P.ptr(8517,8521,1),new P.ptr(8526,8579,53),new P.ptr(8580,11264,2684),new P.ptr(11265,11310,1),new P.ptr(11312,11358,1),new P.ptr(11360,11492,1),new P.ptr(11499,11502,1),new P.ptr(11506,11507,1),new P.ptr(11520,11557,1),new P.ptr(11559,11565,6),new P.ptr(11568,11623,1),new P.ptr(11631,11648,17),new P.ptr(11649,11670,1),new P.ptr(11680,11686,1),new P.ptr(11688,11694,1),new P.ptr(11696,11702,1),new P.ptr(11704,11710,1),new P.ptr(11712,11718,1),new P.ptr(11720,11726,1),new P.ptr(11728,11734,1),new P.ptr(11736,11742,1),new P.ptr(11823,12293,470),new P.ptr(12294,12337,43),new P.ptr(12338,12341,1),new P.ptr(12347,12348,1),new P.ptr(12353,12438,1),new P.ptr(12445,12447,1),new P.ptr(12449,12538,1),new P.ptr(12540,12543,1),new P.ptr(12549,12589,1),new P.ptr(12593,12686,1),new P.ptr(12704,12730,1),new P.ptr(12784,12799,1),new P.ptr(13312,19893,1),new P.ptr(19968,40908,1),new P.ptr(40960,42124,1),new P.ptr(42192,42237,1),new P.ptr(42240,42508,1),new P.ptr(42512,42527,1),new P.ptr(42538,42539,1),new P.ptr(42560,42606,1),new P.ptr(42623,42653,1),new P.ptr(42656,42725,1),new P.ptr(42775,42783,1),new P.ptr(42786,42888,1),new P.ptr(42891,42894,1),new P.ptr(42896,42925,1),new P.ptr(42928,42929,1),new P.ptr(42999,43009,1),new P.ptr(43011,43013,1),new P.ptr(43015,43018,1),new P.ptr(43020,43042,1),new P.ptr(43072,43123,1),new P.ptr(43138,43187,1),new P.ptr(43250,43255,1),new P.ptr(43259,43274,15),new P.ptr(43275,43301,1),new P.ptr(43312,43334,1),new P.ptr(43360,43388,1),new P.ptr(43396,43442,1),new P.ptr(43471,43488,17),new P.ptr(43489,43492,1),new P.ptr(43494,43503,1),new P.ptr(43514,43518,1),new P.ptr(43520,43560,1),new P.ptr(43584,43586,1),new P.ptr(43588,43595,1),new P.ptr(43616,43638,1),new P.ptr(43642,43646,4),new P.ptr(43647,43695,1),new P.ptr(43697,43701,4),new P.ptr(43702,43705,3),new P.ptr(43706,43709,1),new P.ptr(43712,43714,2),new P.ptr(43739,43741,1),new P.ptr(43744,43754,1),new P.ptr(43762,43764,1),new P.ptr(43777,43782,1),new P.ptr(43785,43790,1),new P.ptr(43793,43798,1),new P.ptr(43808,43814,1),new P.ptr(43816,43822,1),new P.ptr(43824,43866,1),new P.ptr(43868,43871,1),new P.ptr(43876,43877,1),new P.ptr(43968,44002,1),new P.ptr(44032,55203,1),new P.ptr(55216,55238,1),new P.ptr(55243,55291,1),new P.ptr(63744,64109,1),new P.ptr(64112,64217,1),new P.ptr(64256,64262,1),new P.ptr(64275,64279,1),new P.ptr(64285,64287,2),new P.ptr(64288,64296,1),new P.ptr(64298,64310,1),new P.ptr(64312,64316,1),new P.ptr(64318,64320,2),new P.ptr(64321,64323,2),new P.ptr(64324,64326,2),new P.ptr(64327,64433,1),new P.ptr(64467,64829,1),new P.ptr(64848,64911,1),new P.ptr(64914,64967,1),new P.ptr(65008,65019,1),new P.ptr(65136,65140,1),new P.ptr(65142,65276,1),new P.ptr(65313,65338,1),new P.ptr(65345,65370,1),new P.ptr(65382,65470,1),new P.ptr(65474,65479,1),new P.ptr(65482,65487,1),new P.ptr(65490,65495,1),new P.ptr(65498,65500,1)]),new IF([new Q.ptr(65536,65547,1),new Q.ptr(65549,65574,1),new Q.ptr(65576,65594,1),new Q.ptr(65596,65597,1),new Q.ptr(65599,65613,1),new Q.ptr(65616,65629,1),new Q.ptr(65664,65786,1),new Q.ptr(66176,66204,1),new Q.ptr(66208,66256,1),new Q.ptr(66304,66335,1),new Q.ptr(66352,66368,1),new Q.ptr(66370,66377,1),new Q.ptr(66384,66421,1),new Q.ptr(66432,66461,1),new Q.ptr(66464,66499,1),new Q.ptr(66504,66511,1),new Q.ptr(66560,66717,1),new Q.ptr(66816,66855,1),new Q.ptr(66864,66915,1),new Q.ptr(67072,67382,1),new Q.ptr(67392,67413,1),new Q.ptr(67424,67431,1),new Q.ptr(67584,67589,1),new Q.ptr(67592,67594,2),new Q.ptr(67595,67637,1),new Q.ptr(67639,67640,1),new Q.ptr(67644,67647,3),new Q.ptr(67648,67669,1),new Q.ptr(67680,67702,1),new Q.ptr(67712,67742,1),new Q.ptr(67840,67861,1),new Q.ptr(67872,67897,1),new Q.ptr(67968,68023,1),new Q.ptr(68030,68031,1),new Q.ptr(68096,68112,16),new Q.ptr(68113,68115,1),new Q.ptr(68117,68119,1),new Q.ptr(68121,68147,1),new Q.ptr(68192,68220,1),new Q.ptr(68224,68252,1),new Q.ptr(68288,68295,1),new Q.ptr(68297,68324,1),new Q.ptr(68352,68405,1),new Q.ptr(68416,68437,1),new Q.ptr(68448,68466,1),new Q.ptr(68480,68497,1),new Q.ptr(68608,68680,1),new Q.ptr(69635,69687,1),new Q.ptr(69763,69807,1),new Q.ptr(69840,69864,1),new Q.ptr(69891,69926,1),new Q.ptr(69968,70002,1),new Q.ptr(70006,70019,13),new Q.ptr(70020,70066,1),new Q.ptr(70081,70084,1),new Q.ptr(70106,70144,38),new Q.ptr(70145,70161,1),new Q.ptr(70163,70187,1),new Q.ptr(70320,70366,1),new Q.ptr(70405,70412,1),new Q.ptr(70415,70416,1),new Q.ptr(70419,70440,1),new Q.ptr(70442,70448,1),new Q.ptr(70450,70451,1),new Q.ptr(70453,70457,1),new Q.ptr(70461,70493,32),new Q.ptr(70494,70497,1),new Q.ptr(70784,70831,1),new Q.ptr(70852,70853,1),new Q.ptr(70855,71040,185),new Q.ptr(71041,71086,1),new Q.ptr(71168,71215,1),new Q.ptr(71236,71296,60),new Q.ptr(71297,71338,1),new Q.ptr(71840,71903,1),new Q.ptr(71935,72384,449),new Q.ptr(72385,72440,1),new Q.ptr(73728,74648,1),new Q.ptr(77824,78894,1),new Q.ptr(92160,92728,1),new Q.ptr(92736,92766,1),new Q.ptr(92880,92909,1),new Q.ptr(92928,92975,1),new Q.ptr(92992,92995,1),new Q.ptr(93027,93047,1),new Q.ptr(93053,93071,1),new Q.ptr(93952,94020,1),new Q.ptr(94032,94099,67),new Q.ptr(94100,94111,1),new Q.ptr(110592,110593,1),new Q.ptr(113664,113770,1),new Q.ptr(113776,113788,1),new Q.ptr(113792,113800,1),new Q.ptr(113808,113817,1),new Q.ptr(119808,119892,1),new Q.ptr(119894,119964,1),new Q.ptr(119966,119967,1),new Q.ptr(119970,119973,3),new Q.ptr(119974,119977,3),new Q.ptr(119978,119980,1),new Q.ptr(119982,119993,1),new Q.ptr(119995,119997,2),new Q.ptr(119998,120003,1),new Q.ptr(120005,120069,1),new Q.ptr(120071,120074,1),new Q.ptr(120077,120084,1),new Q.ptr(120086,120092,1),new Q.ptr(120094,120121,1),new Q.ptr(120123,120126,1),new Q.ptr(120128,120132,1),new Q.ptr(120134,120138,4),new Q.ptr(120139,120144,1),new Q.ptr(120146,120485,1),new Q.ptr(120488,120512,1),new Q.ptr(120514,120538,1),new Q.ptr(120540,120570,1),new Q.ptr(120572,120596,1),new Q.ptr(120598,120628,1),new Q.ptr(120630,120654,1),new Q.ptr(120656,120686,1),new Q.ptr(120688,120712,1),new Q.ptr(120714,120744,1),new Q.ptr(120746,120770,1),new Q.ptr(120772,120779,1),new Q.ptr(124928,125124,1),new Q.ptr(126464,126467,1),new Q.ptr(126469,126495,1),new Q.ptr(126497,126498,1),new Q.ptr(126500,126503,3),new Q.ptr(126505,126514,1),new Q.ptr(126516,126519,1),new Q.ptr(126521,126523,2),new Q.ptr(126530,126535,5),new Q.ptr(126537,126541,2),new Q.ptr(126542,126543,1),new Q.ptr(126545,126546,1),new Q.ptr(126548,126551,3),new Q.ptr(126553,126561,2),new Q.ptr(126562,126564,2),new Q.ptr(126567,126570,1),new Q.ptr(126572,126578,1),new Q.ptr(126580,126583,1),new Q.ptr(126585,126588,1),new Q.ptr(126590,126592,2),new Q.ptr(126593,126601,1),new Q.ptr(126603,126619,1),new Q.ptr(126625,126627,1),new Q.ptr(126629,126633,1),new Q.ptr(126635,126651,1),new Q.ptr(131072,173782,1),new Q.ptr(173824,177972,1),new Q.ptr(177984,178205,1),new Q.ptr(194560,195101,1)]),6);AN=new O.ptr(new IE([new P.ptr(97,122,1),new P.ptr(181,223,42),new P.ptr(224,246,1),new P.ptr(248,255,1),new P.ptr(257,311,2),new P.ptr(312,328,2),new P.ptr(329,375,2),new P.ptr(378,382,2),new P.ptr(383,384,1),new P.ptr(387,389,2),new P.ptr(392,396,4),new P.ptr(397,402,5),new P.ptr(405,409,4),new P.ptr(410,411,1),new P.ptr(414,417,3),new P.ptr(419,421,2),new P.ptr(424,426,2),new P.ptr(427,429,2),new P.ptr(432,436,4),new P.ptr(438,441,3),new P.ptr(442,445,3),new P.ptr(446,447,1),new P.ptr(454,460,3),new P.ptr(462,476,2),new P.ptr(477,495,2),new P.ptr(496,499,3),new P.ptr(501,505,4),new P.ptr(507,563,2),new P.ptr(564,569,1),new P.ptr(572,575,3),new P.ptr(576,578,2),new P.ptr(583,591,2),new P.ptr(592,659,1),new P.ptr(661,687,1),new P.ptr(881,883,2),new P.ptr(887,891,4),new P.ptr(892,893,1),new P.ptr(912,940,28),new P.ptr(941,974,1),new P.ptr(976,977,1),new P.ptr(981,983,1),new P.ptr(985,1007,2),new P.ptr(1008,1011,1),new P.ptr(1013,1019,3),new P.ptr(1020,1072,52),new P.ptr(1073,1119,1),new P.ptr(1121,1153,2),new P.ptr(1163,1215,2),new P.ptr(1218,1230,2),new P.ptr(1231,1327,2),new P.ptr(1377,1415,1),new P.ptr(7424,7467,1),new P.ptr(7531,7543,1),new P.ptr(7545,7578,1),new P.ptr(7681,7829,2),new P.ptr(7830,7837,1),new P.ptr(7839,7935,2),new P.ptr(7936,7943,1),new P.ptr(7952,7957,1),new P.ptr(7968,7975,1),new P.ptr(7984,7991,1),new P.ptr(8000,8005,1),new P.ptr(8016,8023,1),new P.ptr(8032,8039,1),new P.ptr(8048,8061,1),new P.ptr(8064,8071,1),new P.ptr(8080,8087,1),new P.ptr(8096,8103,1),new P.ptr(8112,8116,1),new P.ptr(8118,8119,1),new P.ptr(8126,8130,4),new P.ptr(8131,8132,1),new P.ptr(8134,8135,1),new P.ptr(8144,8147,1),new P.ptr(8150,8151,1),new P.ptr(8160,8167,1),new P.ptr(8178,8180,1),new P.ptr(8182,8183,1),new P.ptr(8458,8462,4),new P.ptr(8463,8467,4),new P.ptr(8495,8505,5),new P.ptr(8508,8509,1),new P.ptr(8518,8521,1),new P.ptr(8526,8580,54),new P.ptr(11312,11358,1),new P.ptr(11361,11365,4),new P.ptr(11366,11372,2),new P.ptr(11377,11379,2),new P.ptr(11380,11382,2),new P.ptr(11383,11387,1),new P.ptr(11393,11491,2),new P.ptr(11492,11500,8),new P.ptr(11502,11507,5),new P.ptr(11520,11557,1),new P.ptr(11559,11565,6),new P.ptr(42561,42605,2),new P.ptr(42625,42651,2),new P.ptr(42787,42799,2),new P.ptr(42800,42801,1),new P.ptr(42803,42865,2),new P.ptr(42866,42872,1),new P.ptr(42874,42876,2),new P.ptr(42879,42887,2),new P.ptr(42892,42894,2),new P.ptr(42897,42899,2),new P.ptr(42900,42901,1),new P.ptr(42903,42921,2),new P.ptr(43002,43824,822),new P.ptr(43825,43866,1),new P.ptr(43876,43877,1),new P.ptr(64256,64262,1),new P.ptr(64275,64279,1),new P.ptr(65345,65370,1)]),new IF([new Q.ptr(66600,66639,1),new Q.ptr(71872,71903,1),new Q.ptr(119834,119859,1),new Q.ptr(119886,119892,1),new Q.ptr(119894,119911,1),new Q.ptr(119938,119963,1),new Q.ptr(119990,119993,1),new Q.ptr(119995,119997,2),new Q.ptr(119998,120003,1),new Q.ptr(120005,120015,1),new Q.ptr(120042,120067,1),new Q.ptr(120094,120119,1),new Q.ptr(120146,120171,1),new Q.ptr(120198,120223,1),new Q.ptr(120250,120275,1),new Q.ptr(120302,120327,1),new Q.ptr(120354,120379,1),new Q.ptr(120406,120431,1),new Q.ptr(120458,120485,1),new Q.ptr(120514,120538,1),new Q.ptr(120540,120545,1),new Q.ptr(120572,120596,1),new Q.ptr(120598,120603,1),new Q.ptr(120630,120654,1),new Q.ptr(120656,120661,1),new Q.ptr(120688,120712,1),new Q.ptr(120714,120719,1),new Q.ptr(120746,120770,1),new Q.ptr(120772,120777,1),new Q.ptr(120779,120779,1)]),4);AO=new O.ptr(new IE([new P.ptr(688,705,1),new P.ptr(710,721,1),new P.ptr(736,740,1),new P.ptr(748,750,2),new P.ptr(884,890,6),new P.ptr(1369,1600,231),new P.ptr(1765,1766,1),new P.ptr(2036,2037,1),new P.ptr(2042,2074,32),new P.ptr(2084,2088,4),new P.ptr(2417,3654,1237),new P.ptr(3782,4348,566),new P.ptr(6103,6211,108),new P.ptr(6823,7288,465),new P.ptr(7289,7293,1),new P.ptr(7468,7530,1),new P.ptr(7544,7579,35),new P.ptr(7580,7615,1),new P.ptr(8305,8319,14),new P.ptr(8336,8348,1),new P.ptr(11388,11389,1),new P.ptr(11631,11823,192),new P.ptr(12293,12337,44),new P.ptr(12338,12341,1),new P.ptr(12347,12445,98),new P.ptr(12446,12540,94),new P.ptr(12541,12542,1),new P.ptr(40981,42232,1251),new P.ptr(42233,42237,1),new P.ptr(42508,42623,115),new P.ptr(42652,42653,1),new P.ptr(42775,42783,1),new P.ptr(42864,42888,24),new P.ptr(43000,43001,1),new P.ptr(43471,43494,23),new P.ptr(43632,43741,109),new P.ptr(43763,43764,1),new P.ptr(43868,43871,1),new P.ptr(65392,65438,46),new P.ptr(65439,65439,1)]),new IF([new Q.ptr(92992,92992,1),new Q.ptr(92993,92995,1),new Q.ptr(94099,94111,1)]),0);AP=new O.ptr(new IE([new P.ptr(170,186,16),new P.ptr(443,448,5),new P.ptr(449,451,1),new P.ptr(660,1488,828),new P.ptr(1489,1514,1),new P.ptr(1520,1522,1),new P.ptr(1568,1599,1),new P.ptr(1601,1610,1),new P.ptr(1646,1647,1),new P.ptr(1649,1747,1),new P.ptr(1749,1774,25),new P.ptr(1775,1786,11),new P.ptr(1787,1788,1),new P.ptr(1791,1808,17),new P.ptr(1810,1839,1),new P.ptr(1869,1957,1),new P.ptr(1969,1994,25),new P.ptr(1995,2026,1),new P.ptr(2048,2069,1),new P.ptr(2112,2136,1),new P.ptr(2208,2226,1),new P.ptr(2308,2361,1),new P.ptr(2365,2384,19),new P.ptr(2392,2401,1),new P.ptr(2418,2432,1),new P.ptr(2437,2444,1),new P.ptr(2447,2448,1),new P.ptr(2451,2472,1),new P.ptr(2474,2480,1),new P.ptr(2482,2486,4),new P.ptr(2487,2489,1),new P.ptr(2493,2510,17),new P.ptr(2524,2525,1),new P.ptr(2527,2529,1),new P.ptr(2544,2545,1),new P.ptr(2565,2570,1),new P.ptr(2575,2576,1),new P.ptr(2579,2600,1),new P.ptr(2602,2608,1),new P.ptr(2610,2611,1),new P.ptr(2613,2614,1),new P.ptr(2616,2617,1),new P.ptr(2649,2652,1),new P.ptr(2654,2674,20),new P.ptr(2675,2676,1),new P.ptr(2693,2701,1),new P.ptr(2703,2705,1),new P.ptr(2707,2728,1),new P.ptr(2730,2736,1),new P.ptr(2738,2739,1),new P.ptr(2741,2745,1),new P.ptr(2749,2768,19),new P.ptr(2784,2785,1),new P.ptr(2821,2828,1),new P.ptr(2831,2832,1),new P.ptr(2835,2856,1),new P.ptr(2858,2864,1),new P.ptr(2866,2867,1),new P.ptr(2869,2873,1),new P.ptr(2877,2908,31),new P.ptr(2909,2911,2),new P.ptr(2912,2913,1),new P.ptr(2929,2947,18),new P.ptr(2949,2954,1),new P.ptr(2958,2960,1),new P.ptr(2962,2965,1),new P.ptr(2969,2970,1),new P.ptr(2972,2974,2),new P.ptr(2975,2979,4),new P.ptr(2980,2984,4),new P.ptr(2985,2986,1),new P.ptr(2990,3001,1),new P.ptr(3024,3077,53),new P.ptr(3078,3084,1),new P.ptr(3086,3088,1),new P.ptr(3090,3112,1),new P.ptr(3114,3129,1),new P.ptr(3133,3160,27),new P.ptr(3161,3168,7),new P.ptr(3169,3205,36),new P.ptr(3206,3212,1),new P.ptr(3214,3216,1),new P.ptr(3218,3240,1),new P.ptr(3242,3251,1),new P.ptr(3253,3257,1),new P.ptr(3261,3294,33),new P.ptr(3296,3297,1),new P.ptr(3313,3314,1),new P.ptr(3333,3340,1),new P.ptr(3342,3344,1),new P.ptr(3346,3386,1),new P.ptr(3389,3406,17),new P.ptr(3424,3425,1),new P.ptr(3450,3455,1),new P.ptr(3461,3478,1),new P.ptr(3482,3505,1),new P.ptr(3507,3515,1),new P.ptr(3517,3520,3),new P.ptr(3521,3526,1),new P.ptr(3585,3632,1),new P.ptr(3634,3635,1),new P.ptr(3648,3653,1),new P.ptr(3713,3714,1),new P.ptr(3716,3719,3),new P.ptr(3720,3722,2),new P.ptr(3725,3732,7),new P.ptr(3733,3735,1),new P.ptr(3737,3743,1),new P.ptr(3745,3747,1),new P.ptr(3749,3751,2),new P.ptr(3754,3755,1),new P.ptr(3757,3760,1),new P.ptr(3762,3763,1),new P.ptr(3773,3776,3),new P.ptr(3777,3780,1),new P.ptr(3804,3807,1),new P.ptr(3840,3904,64),new P.ptr(3905,3911,1),new P.ptr(3913,3948,1),new P.ptr(3976,3980,1),new P.ptr(4096,4138,1),new P.ptr(4159,4176,17),new P.ptr(4177,4181,1),new P.ptr(4186,4189,1),new P.ptr(4193,4197,4),new P.ptr(4198,4206,8),new P.ptr(4207,4208,1),new P.ptr(4213,4225,1),new P.ptr(4238,4304,66),new P.ptr(4305,4346,1),new P.ptr(4349,4680,1),new P.ptr(4682,4685,1),new P.ptr(4688,4694,1),new P.ptr(4696,4698,2),new P.ptr(4699,4701,1),new P.ptr(4704,4744,1),new P.ptr(4746,4749,1),new P.ptr(4752,4784,1),new P.ptr(4786,4789,1),new P.ptr(4792,4798,1),new P.ptr(4800,4802,2),new P.ptr(4803,4805,1),new P.ptr(4808,4822,1),new P.ptr(4824,4880,1),new P.ptr(4882,4885,1),new P.ptr(4888,4954,1),new P.ptr(4992,5007,1),new P.ptr(5024,5108,1),new P.ptr(5121,5740,1),new P.ptr(5743,5759,1),new P.ptr(5761,5786,1),new P.ptr(5792,5866,1),new P.ptr(5873,5880,1),new P.ptr(5888,5900,1),new P.ptr(5902,5905,1),new P.ptr(5920,5937,1),new P.ptr(5952,5969,1),new P.ptr(5984,5996,1),new P.ptr(5998,6000,1),new P.ptr(6016,6067,1),new P.ptr(6108,6176,68),new P.ptr(6177,6210,1),new P.ptr(6212,6263,1),new P.ptr(6272,6312,1),new P.ptr(6314,6320,6),new P.ptr(6321,6389,1),new P.ptr(6400,6430,1),new P.ptr(6480,6509,1),new P.ptr(6512,6516,1),new P.ptr(6528,6571,1),new P.ptr(6593,6599,1),new P.ptr(6656,6678,1),new P.ptr(6688,6740,1),new P.ptr(6917,6963,1),new P.ptr(6981,6987,1),new P.ptr(7043,7072,1),new P.ptr(7086,7087,1),new P.ptr(7098,7141,1),new P.ptr(7168,7203,1),new P.ptr(7245,7247,1),new P.ptr(7258,7287,1),new P.ptr(7401,7404,1),new P.ptr(7406,7409,1),new P.ptr(7413,7414,1),new P.ptr(8501,8504,1),new P.ptr(11568,11623,1),new P.ptr(11648,11670,1),new P.ptr(11680,11686,1),new P.ptr(11688,11694,1),new P.ptr(11696,11702,1),new P.ptr(11704,11710,1),new P.ptr(11712,11718,1),new P.ptr(11720,11726,1),new P.ptr(11728,11734,1),new P.ptr(11736,11742,1),new P.ptr(12294,12348,54),new P.ptr(12353,12438,1),new P.ptr(12447,12449,2),new P.ptr(12450,12538,1),new P.ptr(12543,12549,6),new P.ptr(12550,12589,1),new P.ptr(12593,12686,1),new P.ptr(12704,12730,1),new P.ptr(12784,12799,1),new P.ptr(13312,19893,1),new P.ptr(19968,40908,1),new P.ptr(40960,40980,1),new P.ptr(40982,42124,1),new P.ptr(42192,42231,1),new P.ptr(42240,42507,1),new P.ptr(42512,42527,1),new P.ptr(42538,42539,1),new P.ptr(42606,42656,50),new P.ptr(42657,42725,1),new P.ptr(42999,43003,4),new P.ptr(43004,43009,1),new P.ptr(43011,43013,1),new P.ptr(43015,43018,1),new P.ptr(43020,43042,1),new P.ptr(43072,43123,1),new P.ptr(43138,43187,1),new P.ptr(43250,43255,1),new P.ptr(43259,43274,15),new P.ptr(43275,43301,1),new P.ptr(43312,43334,1),new P.ptr(43360,43388,1),new P.ptr(43396,43442,1),new P.ptr(43488,43492,1),new P.ptr(43495,43503,1),new P.ptr(43514,43518,1),new P.ptr(43520,43560,1),new P.ptr(43584,43586,1),new P.ptr(43588,43595,1),new P.ptr(43616,43631,1),new P.ptr(43633,43638,1),new P.ptr(43642,43646,4),new P.ptr(43647,43695,1),new P.ptr(43697,43701,4),new P.ptr(43702,43705,3),new P.ptr(43706,43709,1),new P.ptr(43712,43714,2),new P.ptr(43739,43740,1),new P.ptr(43744,43754,1),new P.ptr(43762,43777,15),new P.ptr(43778,43782,1),new P.ptr(43785,43790,1),new P.ptr(43793,43798,1),new P.ptr(43808,43814,1),new P.ptr(43816,43822,1),new P.ptr(43968,44002,1),new P.ptr(44032,55203,1),new P.ptr(55216,55238,1),new P.ptr(55243,55291,1),new P.ptr(63744,64109,1),new P.ptr(64112,64217,1),new P.ptr(64285,64287,2),new P.ptr(64288,64296,1),new P.ptr(64298,64310,1),new P.ptr(64312,64316,1),new P.ptr(64318,64320,2),new P.ptr(64321,64323,2),new P.ptr(64324,64326,2),new P.ptr(64327,64433,1),new P.ptr(64467,64829,1),new P.ptr(64848,64911,1),new P.ptr(64914,64967,1),new P.ptr(65008,65019,1),new P.ptr(65136,65140,1),new P.ptr(65142,65276,1),new P.ptr(65382,65391,1),new P.ptr(65393,65437,1),new P.ptr(65440,65470,1),new P.ptr(65474,65479,1),new P.ptr(65482,65487,1),new P.ptr(65490,65495,1),new P.ptr(65498,65500,1)]),new IF([new Q.ptr(65536,65547,1),new Q.ptr(65549,65574,1),new Q.ptr(65576,65594,1),new Q.ptr(65596,65597,1),new Q.ptr(65599,65613,1),new Q.ptr(65616,65629,1),new Q.ptr(65664,65786,1),new Q.ptr(66176,66204,1),new Q.ptr(66208,66256,1),new Q.ptr(66304,66335,1),new Q.ptr(66352,66368,1),new Q.ptr(66370,66377,1),new Q.ptr(66384,66421,1),new Q.ptr(66432,66461,1),new Q.ptr(66464,66499,1),new Q.ptr(66504,66511,1),new Q.ptr(66640,66717,1),new Q.ptr(66816,66855,1),new Q.ptr(66864,66915,1),new Q.ptr(67072,67382,1),new Q.ptr(67392,67413,1),new Q.ptr(67424,67431,1),new Q.ptr(67584,67589,1),new Q.ptr(67592,67594,2),new Q.ptr(67595,67637,1),new Q.ptr(67639,67640,1),new Q.ptr(67644,67647,3),new Q.ptr(67648,67669,1),new Q.ptr(67680,67702,1),new Q.ptr(67712,67742,1),new Q.ptr(67840,67861,1),new Q.ptr(67872,67897,1),new Q.ptr(67968,68023,1),new Q.ptr(68030,68031,1),new Q.ptr(68096,68112,16),new Q.ptr(68113,68115,1),new Q.ptr(68117,68119,1),new Q.ptr(68121,68147,1),new Q.ptr(68192,68220,1),new Q.ptr(68224,68252,1),new Q.ptr(68288,68295,1),new Q.ptr(68297,68324,1),new Q.ptr(68352,68405,1),new Q.ptr(68416,68437,1),new Q.ptr(68448,68466,1),new Q.ptr(68480,68497,1),new Q.ptr(68608,68680,1),new Q.ptr(69635,69687,1),new Q.ptr(69763,69807,1),new Q.ptr(69840,69864,1),new Q.ptr(69891,69926,1),new Q.ptr(69968,70002,1),new Q.ptr(70006,70019,13),new Q.ptr(70020,70066,1),new Q.ptr(70081,70084,1),new Q.ptr(70106,70144,38),new Q.ptr(70145,70161,1),new Q.ptr(70163,70187,1),new Q.ptr(70320,70366,1),new Q.ptr(70405,70412,1),new Q.ptr(70415,70416,1),new Q.ptr(70419,70440,1),new Q.ptr(70442,70448,1),new Q.ptr(70450,70451,1),new Q.ptr(70453,70457,1),new Q.ptr(70461,70493,32),new Q.ptr(70494,70497,1),new Q.ptr(70784,70831,1),new Q.ptr(70852,70853,1),new Q.ptr(70855,71040,185),new Q.ptr(71041,71086,1),new Q.ptr(71168,71215,1),new Q.ptr(71236,71296,60),new Q.ptr(71297,71338,1),new Q.ptr(71935,72384,449),new Q.ptr(72385,72440,1),new Q.ptr(73728,74648,1),new Q.ptr(77824,78894,1),new Q.ptr(92160,92728,1),new Q.ptr(92736,92766,1),new Q.ptr(92880,92909,1),new Q.ptr(92928,92975,1),new Q.ptr(93027,93047,1),new Q.ptr(93053,93071,1),new Q.ptr(93952,94020,1),new Q.ptr(94032,110592,16560),new Q.ptr(110593,113664,3071),new Q.ptr(113665,113770,1),new Q.ptr(113776,113788,1),new Q.ptr(113792,113800,1),new Q.ptr(113808,113817,1),new Q.ptr(124928,125124,1),new Q.ptr(126464,126467,1),new Q.ptr(126469,126495,1),new Q.ptr(126497,126498,1),new Q.ptr(126500,126503,3),new Q.ptr(126505,126514,1),new Q.ptr(126516,126519,1),new Q.ptr(126521,126523,2),new Q.ptr(126530,126535,5),new Q.ptr(126537,126541,2),new Q.ptr(126542,126543,1),new Q.ptr(126545,126546,1),new Q.ptr(126548,126551,3),new Q.ptr(126553,126561,2),new Q.ptr(126562,126564,2),new Q.ptr(126567,126570,1),new Q.ptr(126572,126578,1),new Q.ptr(126580,126583,1),new Q.ptr(126585,126588,1),new Q.ptr(126590,126592,2),new Q.ptr(126593,126601,1),new Q.ptr(126603,126619,1),new Q.ptr(126625,126627,1),new Q.ptr(126629,126633,1),new Q.ptr(126635,126651,1),new Q.ptr(131072,173782,1),new Q.ptr(173824,177972,1),new Q.ptr(177984,178205,1),new Q.ptr(194560,195101,1)]),1);AQ=new O.ptr(new IE([new P.ptr(453,459,3),new P.ptr(498,8072,7574),new P.ptr(8073,8079,1),new P.ptr(8088,8095,1),new P.ptr(8104,8111,1),new P.ptr(8124,8140,16),new P.ptr(8188,8188,1)]),IF.nil,0);AR=new O.ptr(new IE([new P.ptr(65,90,1),new P.ptr(192,214,1),new P.ptr(216,222,1),new P.ptr(256,310,2),new P.ptr(313,327,2),new P.ptr(330,376,2),new P.ptr(377,381,2),new P.ptr(385,386,1),new P.ptr(388,390,2),new P.ptr(391,393,2),new P.ptr(394,395,1),new P.ptr(398,401,1),new P.ptr(403,404,1),new P.ptr(406,408,1),new P.ptr(412,413,1),new P.ptr(415,416,1),new P.ptr(418,422,2),new P.ptr(423,425,2),new P.ptr(428,430,2),new P.ptr(431,433,2),new P.ptr(434,435,1),new P.ptr(437,439,2),new P.ptr(440,444,4),new P.ptr(452,461,3),new P.ptr(463,475,2),new P.ptr(478,494,2),new P.ptr(497,500,3),new P.ptr(502,504,1),new P.ptr(506,562,2),new P.ptr(570,571,1),new P.ptr(573,574,1),new P.ptr(577,579,2),new P.ptr(580,582,1),new P.ptr(584,590,2),new P.ptr(880,882,2),new P.ptr(886,895,9),new P.ptr(902,904,2),new P.ptr(905,906,1),new P.ptr(908,910,2),new P.ptr(911,913,2),new P.ptr(914,929,1),new P.ptr(931,939,1),new P.ptr(975,978,3),new P.ptr(979,980,1),new P.ptr(984,1006,2),new P.ptr(1012,1015,3),new P.ptr(1017,1018,1),new P.ptr(1021,1071,1),new P.ptr(1120,1152,2),new P.ptr(1162,1216,2),new P.ptr(1217,1229,2),new P.ptr(1232,1326,2),new P.ptr(1329,1366,1),new P.ptr(4256,4293,1),new P.ptr(4295,4301,6),new P.ptr(7680,7828,2),new P.ptr(7838,7934,2),new P.ptr(7944,7951,1),new P.ptr(7960,7965,1),new P.ptr(7976,7983,1),new P.ptr(7992,7999,1),new P.ptr(8008,8013,1),new P.ptr(8025,8031,2),new P.ptr(8040,8047,1),new P.ptr(8120,8123,1),new P.ptr(8136,8139,1),new P.ptr(8152,8155,1),new P.ptr(8168,8172,1),new P.ptr(8184,8187,1),new P.ptr(8450,8455,5),new P.ptr(8459,8461,1),new P.ptr(8464,8466,1),new P.ptr(8469,8473,4),new P.ptr(8474,8477,1),new P.ptr(8484,8490,2),new P.ptr(8491,8493,1),new P.ptr(8496,8499,1),new P.ptr(8510,8511,1),new P.ptr(8517,8579,62),new P.ptr(11264,11310,1),new P.ptr(11360,11362,2),new P.ptr(11363,11364,1),new P.ptr(11367,11373,2),new P.ptr(11374,11376,1),new P.ptr(11378,11381,3),new P.ptr(11390,11392,1),new P.ptr(11394,11490,2),new P.ptr(11499,11501,2),new P.ptr(11506,42560,31054),new P.ptr(42562,42604,2),new P.ptr(42624,42650,2),new P.ptr(42786,42798,2),new P.ptr(42802,42862,2),new P.ptr(42873,42877,2),new P.ptr(42878,42886,2),new P.ptr(42891,42893,2),new P.ptr(42896,42898,2),new P.ptr(42902,42922,2),new P.ptr(42923,42925,1),new P.ptr(42928,42929,1),new P.ptr(65313,65338,1)]),new IF([new Q.ptr(66560,66599,1),new Q.ptr(71840,71871,1),new Q.ptr(119808,119833,1),new Q.ptr(119860,119885,1),new Q.ptr(119912,119937,1),new Q.ptr(119964,119966,2),new Q.ptr(119967,119973,3),new Q.ptr(119974,119977,3),new Q.ptr(119978,119980,1),new Q.ptr(119982,119989,1),new Q.ptr(120016,120041,1),new Q.ptr(120068,120069,1),new Q.ptr(120071,120074,1),new Q.ptr(120077,120084,1),new Q.ptr(120086,120092,1),new Q.ptr(120120,120121,1),new Q.ptr(120123,120126,1),new Q.ptr(120128,120132,1),new Q.ptr(120134,120138,4),new Q.ptr(120139,120144,1),new Q.ptr(120172,120197,1),new Q.ptr(120224,120249,1),new Q.ptr(120276,120301,1),new Q.ptr(120328,120353,1),new Q.ptr(120380,120405,1),new Q.ptr(120432,120457,1),new Q.ptr(120488,120512,1),new Q.ptr(120546,120570,1),new Q.ptr(120604,120628,1),new Q.ptr(120662,120686,1),new Q.ptr(120720,120744,1),new Q.ptr(120778,120778,1)]),3);AS=new O.ptr(new IE([new P.ptr(768,879,1),new P.ptr(1155,1161,1),new P.ptr(1425,1469,1),new P.ptr(1471,1473,2),new P.ptr(1474,1476,2),new P.ptr(1477,1479,2),new P.ptr(1552,1562,1),new P.ptr(1611,1631,1),new P.ptr(1648,1750,102),new P.ptr(1751,1756,1),new P.ptr(1759,1764,1),new P.ptr(1767,1768,1),new P.ptr(1770,1773,1),new P.ptr(1809,1840,31),new P.ptr(1841,1866,1),new P.ptr(1958,1968,1),new P.ptr(2027,2035,1),new P.ptr(2070,2073,1),new P.ptr(2075,2083,1),new P.ptr(2085,2087,1),new P.ptr(2089,2093,1),new P.ptr(2137,2139,1),new P.ptr(2276,2307,1),new P.ptr(2362,2364,1),new P.ptr(2366,2383,1),new P.ptr(2385,2391,1),new P.ptr(2402,2403,1),new P.ptr(2433,2435,1),new P.ptr(2492,2494,2),new P.ptr(2495,2500,1),new P.ptr(2503,2504,1),new P.ptr(2507,2509,1),new P.ptr(2519,2530,11),new P.ptr(2531,2561,30),new P.ptr(2562,2563,1),new P.ptr(2620,2622,2),new P.ptr(2623,2626,1),new P.ptr(2631,2632,1),new P.ptr(2635,2637,1),new P.ptr(2641,2672,31),new P.ptr(2673,2677,4),new P.ptr(2689,2691,1),new P.ptr(2748,2750,2),new P.ptr(2751,2757,1),new P.ptr(2759,2761,1),new P.ptr(2763,2765,1),new P.ptr(2786,2787,1),new P.ptr(2817,2819,1),new P.ptr(2876,2878,2),new P.ptr(2879,2884,1),new P.ptr(2887,2888,1),new P.ptr(2891,2893,1),new P.ptr(2902,2903,1),new P.ptr(2914,2915,1),new P.ptr(2946,3006,60),new P.ptr(3007,3010,1),new P.ptr(3014,3016,1),new P.ptr(3018,3021,1),new P.ptr(3031,3072,41),new P.ptr(3073,3075,1),new P.ptr(3134,3140,1),new P.ptr(3142,3144,1),new P.ptr(3146,3149,1),new P.ptr(3157,3158,1),new P.ptr(3170,3171,1),new P.ptr(3201,3203,1),new P.ptr(3260,3262,2),new P.ptr(3263,3268,1),new P.ptr(3270,3272,1),new P.ptr(3274,3277,1),new P.ptr(3285,3286,1),new P.ptr(3298,3299,1),new P.ptr(3329,3331,1),new P.ptr(3390,3396,1),new P.ptr(3398,3400,1),new P.ptr(3402,3405,1),new P.ptr(3415,3426,11),new P.ptr(3427,3458,31),new P.ptr(3459,3530,71),new P.ptr(3535,3540,1),new P.ptr(3542,3544,2),new P.ptr(3545,3551,1),new P.ptr(3570,3571,1),new P.ptr(3633,3636,3),new P.ptr(3637,3642,1),new P.ptr(3655,3662,1),new P.ptr(3761,3764,3),new P.ptr(3765,3769,1),new P.ptr(3771,3772,1),new P.ptr(3784,3789,1),new P.ptr(3864,3865,1),new P.ptr(3893,3897,2),new P.ptr(3902,3903,1),new P.ptr(3953,3972,1),new P.ptr(3974,3975,1),new P.ptr(3981,3991,1),new P.ptr(3993,4028,1),new P.ptr(4038,4139,101),new P.ptr(4140,4158,1),new P.ptr(4182,4185,1),new P.ptr(4190,4192,1),new P.ptr(4194,4196,1),new P.ptr(4199,4205,1),new P.ptr(4209,4212,1),new P.ptr(4226,4237,1),new P.ptr(4239,4250,11),new P.ptr(4251,4253,1),new P.ptr(4957,4959,1),new P.ptr(5906,5908,1),new P.ptr(5938,5940,1),new P.ptr(5970,5971,1),new P.ptr(6002,6003,1),new P.ptr(6068,6099,1),new P.ptr(6109,6155,46),new P.ptr(6156,6157,1),new P.ptr(6313,6432,119),new P.ptr(6433,6443,1),new P.ptr(6448,6459,1),new P.ptr(6576,6592,1),new P.ptr(6600,6601,1),new P.ptr(6679,6683,1),new P.ptr(6741,6750,1),new P.ptr(6752,6780,1),new P.ptr(6783,6832,49),new P.ptr(6833,6846,1),new P.ptr(6912,6916,1),new P.ptr(6964,6980,1),new P.ptr(7019,7027,1),new P.ptr(7040,7042,1),new P.ptr(7073,7085,1),new P.ptr(7142,7155,1),new P.ptr(7204,7223,1),new P.ptr(7376,7378,1),new P.ptr(7380,7400,1),new P.ptr(7405,7410,5),new P.ptr(7411,7412,1),new P.ptr(7416,7417,1),new P.ptr(7616,7669,1),new P.ptr(7676,7679,1),new P.ptr(8400,8432,1),new P.ptr(11503,11505,1),new P.ptr(11647,11744,97),new P.ptr(11745,11775,1),new P.ptr(12330,12335,1),new P.ptr(12441,12442,1),new P.ptr(42607,42610,1),new P.ptr(42612,42621,1),new P.ptr(42655,42736,81),new P.ptr(42737,43010,273),new P.ptr(43014,43019,5),new P.ptr(43043,43047,1),new P.ptr(43136,43137,1),new P.ptr(43188,43204,1),new P.ptr(43232,43249,1),new P.ptr(43302,43309,1),new P.ptr(43335,43347,1),new P.ptr(43392,43395,1),new P.ptr(43443,43456,1),new P.ptr(43493,43561,68),new P.ptr(43562,43574,1),new P.ptr(43587,43596,9),new P.ptr(43597,43643,46),new P.ptr(43644,43645,1),new P.ptr(43696,43698,2),new P.ptr(43699,43700,1),new P.ptr(43703,43704,1),new P.ptr(43710,43711,1),new P.ptr(43713,43755,42),new P.ptr(43756,43759,1),new P.ptr(43765,43766,1),new P.ptr(44003,44010,1),new P.ptr(44012,44013,1),new P.ptr(64286,65024,738),new P.ptr(65025,65039,1),new P.ptr(65056,65069,1)]),new IF([new Q.ptr(66045,66272,227),new Q.ptr(66422,66426,1),new Q.ptr(68097,68099,1),new Q.ptr(68101,68102,1),new Q.ptr(68108,68111,1),new Q.ptr(68152,68154,1),new Q.ptr(68159,68325,166),new Q.ptr(68326,69632,1306),new Q.ptr(69633,69634,1),new Q.ptr(69688,69702,1),new Q.ptr(69759,69762,1),new Q.ptr(69808,69818,1),new Q.ptr(69888,69890,1),new Q.ptr(69927,69940,1),new Q.ptr(70003,70016,13),new Q.ptr(70017,70018,1),new Q.ptr(70067,70080,1),new Q.ptr(70188,70199,1),new Q.ptr(70367,70378,1),new Q.ptr(70401,70403,1),new Q.ptr(70460,70462,2),new Q.ptr(70463,70468,1),new Q.ptr(70471,70472,1),new Q.ptr(70475,70477,1),new Q.ptr(70487,70498,11),new Q.ptr(70499,70502,3),new Q.ptr(70503,70508,1),new Q.ptr(70512,70516,1),new Q.ptr(70832,70851,1),new Q.ptr(71087,71093,1),new Q.ptr(71096,71104,1),new Q.ptr(71216,71232,1),new Q.ptr(71339,71351,1),new Q.ptr(92912,92916,1),new Q.ptr(92976,92982,1),new Q.ptr(94033,94078,1),new Q.ptr(94095,94098,1),new Q.ptr(113821,113822,1),new Q.ptr(119141,119145,1),new Q.ptr(119149,119154,1),new Q.ptr(119163,119170,1),new Q.ptr(119173,119179,1),new Q.ptr(119210,119213,1),new Q.ptr(119362,119364,1),new Q.ptr(125136,125142,1),new Q.ptr(917760,917999,1)]),0);AT=new O.ptr(new IE([new P.ptr(2307,2363,56),new P.ptr(2366,2368,1),new P.ptr(2377,2380,1),new P.ptr(2382,2383,1),new P.ptr(2434,2435,1),new P.ptr(2494,2496,1),new P.ptr(2503,2504,1),new P.ptr(2507,2508,1),new P.ptr(2519,2563,44),new P.ptr(2622,2624,1),new P.ptr(2691,2750,59),new P.ptr(2751,2752,1),new P.ptr(2761,2763,2),new P.ptr(2764,2818,54),new P.ptr(2819,2878,59),new P.ptr(2880,2887,7),new P.ptr(2888,2891,3),new P.ptr(2892,2903,11),new P.ptr(3006,3007,1),new P.ptr(3009,3010,1),new P.ptr(3014,3016,1),new P.ptr(3018,3020,1),new P.ptr(3031,3073,42),new P.ptr(3074,3075,1),new P.ptr(3137,3140,1),new P.ptr(3202,3203,1),new P.ptr(3262,3264,2),new P.ptr(3265,3268,1),new P.ptr(3271,3272,1),new P.ptr(3274,3275,1),new P.ptr(3285,3286,1),new P.ptr(3330,3331,1),new P.ptr(3390,3392,1),new P.ptr(3398,3400,1),new P.ptr(3402,3404,1),new P.ptr(3415,3458,43),new P.ptr(3459,3535,76),new P.ptr(3536,3537,1),new P.ptr(3544,3551,1),new P.ptr(3570,3571,1),new P.ptr(3902,3903,1),new P.ptr(3967,4139,172),new P.ptr(4140,4145,5),new P.ptr(4152,4155,3),new P.ptr(4156,4182,26),new P.ptr(4183,4194,11),new P.ptr(4195,4196,1),new P.ptr(4199,4205,1),new P.ptr(4227,4228,1),new P.ptr(4231,4236,1),new P.ptr(4239,4250,11),new P.ptr(4251,4252,1),new P.ptr(6070,6078,8),new P.ptr(6079,6085,1),new P.ptr(6087,6088,1),new P.ptr(6435,6438,1),new P.ptr(6441,6443,1),new P.ptr(6448,6449,1),new P.ptr(6451,6456,1),new P.ptr(6576,6592,1),new P.ptr(6600,6601,1),new P.ptr(6681,6682,1),new P.ptr(6741,6743,2),new P.ptr(6753,6755,2),new P.ptr(6756,6765,9),new P.ptr(6766,6770,1),new P.ptr(6916,6965,49),new P.ptr(6971,6973,2),new P.ptr(6974,6977,1),new P.ptr(6979,6980,1),new P.ptr(7042,7073,31),new P.ptr(7078,7079,1),new P.ptr(7082,7143,61),new P.ptr(7146,7148,1),new P.ptr(7150,7154,4),new P.ptr(7155,7204,49),new P.ptr(7205,7211,1),new P.ptr(7220,7221,1),new P.ptr(7393,7410,17),new P.ptr(7411,12334,4923),new P.ptr(12335,43043,30708),new P.ptr(43044,43047,3),new P.ptr(43136,43137,1),new P.ptr(43188,43203,1),new P.ptr(43346,43347,1),new P.ptr(43395,43444,49),new P.ptr(43445,43450,5),new P.ptr(43451,43453,2),new P.ptr(43454,43456,1),new P.ptr(43567,43568,1),new P.ptr(43571,43572,1),new P.ptr(43597,43643,46),new P.ptr(43645,43755,110),new P.ptr(43758,43759,1),new P.ptr(43765,44003,238),new P.ptr(44004,44006,2),new P.ptr(44007,44009,2),new P.ptr(44010,44012,2)]),new IF([new Q.ptr(69632,69634,2),new Q.ptr(69762,69808,46),new Q.ptr(69809,69810,1),new Q.ptr(69815,69816,1),new Q.ptr(69932,70018,86),new Q.ptr(70067,70069,1),new Q.ptr(70079,70080,1),new Q.ptr(70188,70190,1),new Q.ptr(70194,70195,1),new Q.ptr(70197,70368,171),new Q.ptr(70369,70370,1),new Q.ptr(70402,70403,1),new Q.ptr(70462,70463,1),new Q.ptr(70465,70468,1),new Q.ptr(70471,70472,1),new Q.ptr(70475,70477,1),new Q.ptr(70487,70498,11),new Q.ptr(70499,70832,333),new Q.ptr(70833,70834,1),new Q.ptr(70841,70843,2),new Q.ptr(70844,70846,1),new Q.ptr(70849,71087,238),new Q.ptr(71088,71089,1),new Q.ptr(71096,71099,1),new Q.ptr(71102,71216,114),new Q.ptr(71217,71218,1),new Q.ptr(71227,71228,1),new Q.ptr(71230,71340,110),new Q.ptr(71342,71343,1),new Q.ptr(71350,94033,22683),new Q.ptr(94034,94078,1),new Q.ptr(119141,119142,1),new Q.ptr(119149,119154,1)]),0);AU=new O.ptr(new IE([new P.ptr(1160,1161,1),new P.ptr(6846,8413,1567),new P.ptr(8414,8416,1),new P.ptr(8418,8420,1),new P.ptr(42608,42610,1)]),IF.nil,0);AV=new O.ptr(new IE([new P.ptr(768,879,1),new P.ptr(1155,1159,1),new P.ptr(1425,1469,1),new P.ptr(1471,1473,2),new P.ptr(1474,1476,2),new P.ptr(1477,1479,2),new P.ptr(1552,1562,1),new P.ptr(1611,1631,1),new P.ptr(1648,1750,102),new P.ptr(1751,1756,1),new P.ptr(1759,1764,1),new P.ptr(1767,1768,1),new P.ptr(1770,1773,1),new P.ptr(1809,1840,31),new P.ptr(1841,1866,1),new P.ptr(1958,1968,1),new P.ptr(2027,2035,1),new P.ptr(2070,2073,1),new P.ptr(2075,2083,1),new P.ptr(2085,2087,1),new P.ptr(2089,2093,1),new P.ptr(2137,2139,1),new P.ptr(2276,2306,1),new P.ptr(2362,2364,2),new P.ptr(2369,2376,1),new P.ptr(2381,2385,4),new P.ptr(2386,2391,1),new P.ptr(2402,2403,1),new P.ptr(2433,2492,59),new P.ptr(2497,2500,1),new P.ptr(2509,2530,21),new P.ptr(2531,2561,30),new P.ptr(2562,2620,58),new P.ptr(2625,2626,1),new P.ptr(2631,2632,1),new P.ptr(2635,2637,1),new P.ptr(2641,2672,31),new P.ptr(2673,2677,4),new P.ptr(2689,2690,1),new P.ptr(2748,2753,5),new P.ptr(2754,2757,1),new P.ptr(2759,2760,1),new P.ptr(2765,2786,21),new P.ptr(2787,2817,30),new P.ptr(2876,2879,3),new P.ptr(2881,2884,1),new P.ptr(2893,2902,9),new P.ptr(2914,2915,1),new P.ptr(2946,3008,62),new P.ptr(3021,3072,51),new P.ptr(3134,3136,1),new P.ptr(3142,3144,1),new P.ptr(3146,3149,1),new P.ptr(3157,3158,1),new P.ptr(3170,3171,1),new P.ptr(3201,3260,59),new P.ptr(3263,3270,7),new P.ptr(3276,3277,1),new P.ptr(3298,3299,1),new P.ptr(3329,3393,64),new P.ptr(3394,3396,1),new P.ptr(3405,3426,21),new P.ptr(3427,3530,103),new P.ptr(3538,3540,1),new P.ptr(3542,3633,91),new P.ptr(3636,3642,1),new P.ptr(3655,3662,1),new P.ptr(3761,3764,3),new P.ptr(3765,3769,1),new P.ptr(3771,3772,1),new P.ptr(3784,3789,1),new P.ptr(3864,3865,1),new P.ptr(3893,3897,2),new P.ptr(3953,3966,1),new P.ptr(3968,3972,1),new P.ptr(3974,3975,1),new P.ptr(3981,3991,1),new P.ptr(3993,4028,1),new P.ptr(4038,4141,103),new P.ptr(4142,4144,1),new P.ptr(4146,4151,1),new P.ptr(4153,4154,1),new P.ptr(4157,4158,1),new P.ptr(4184,4185,1),new P.ptr(4190,4192,1),new P.ptr(4209,4212,1),new P.ptr(4226,4229,3),new P.ptr(4230,4237,7),new P.ptr(4253,4957,704),new P.ptr(4958,4959,1),new P.ptr(5906,5908,1),new P.ptr(5938,5940,1),new P.ptr(5970,5971,1),new P.ptr(6002,6003,1),new P.ptr(6068,6069,1),new P.ptr(6071,6077,1),new P.ptr(6086,6089,3),new P.ptr(6090,6099,1),new P.ptr(6109,6155,46),new P.ptr(6156,6157,1),new P.ptr(6313,6432,119),new P.ptr(6433,6434,1),new P.ptr(6439,6440,1),new P.ptr(6450,6457,7),new P.ptr(6458,6459,1),new P.ptr(6679,6680,1),new P.ptr(6683,6742,59),new P.ptr(6744,6750,1),new P.ptr(6752,6754,2),new P.ptr(6757,6764,1),new P.ptr(6771,6780,1),new P.ptr(6783,6832,49),new P.ptr(6833,6845,1),new P.ptr(6912,6915,1),new P.ptr(6964,6966,2),new P.ptr(6967,6970,1),new P.ptr(6972,6978,6),new P.ptr(7019,7027,1),new P.ptr(7040,7041,1),new P.ptr(7074,7077,1),new P.ptr(7080,7081,1),new P.ptr(7083,7085,1),new P.ptr(7142,7144,2),new P.ptr(7145,7149,4),new P.ptr(7151,7153,1),new P.ptr(7212,7219,1),new P.ptr(7222,7223,1),new P.ptr(7376,7378,1),new P.ptr(7380,7392,1),new P.ptr(7394,7400,1),new P.ptr(7405,7412,7),new P.ptr(7416,7417,1),new P.ptr(7616,7669,1),new P.ptr(7676,7679,1),new P.ptr(8400,8412,1),new P.ptr(8417,8421,4),new P.ptr(8422,8432,1),new P.ptr(11503,11505,1),new P.ptr(11647,11744,97),new P.ptr(11745,11775,1),new P.ptr(12330,12333,1),new P.ptr(12441,12442,1),new P.ptr(42607,42612,5),new P.ptr(42613,42621,1),new P.ptr(42655,42736,81),new P.ptr(42737,43010,273),new P.ptr(43014,43019,5),new P.ptr(43045,43046,1),new P.ptr(43204,43232,28),new P.ptr(43233,43249,1),new P.ptr(43302,43309,1),new P.ptr(43335,43345,1),new P.ptr(43392,43394,1),new P.ptr(43443,43446,3),new P.ptr(43447,43449,1),new P.ptr(43452,43493,41),new P.ptr(43561,43566,1),new P.ptr(43569,43570,1),new P.ptr(43573,43574,1),new P.ptr(43587,43596,9),new P.ptr(43644,43696,52),new P.ptr(43698,43700,1),new P.ptr(43703,43704,1),new P.ptr(43710,43711,1),new P.ptr(43713,43756,43),new P.ptr(43757,43766,9),new P.ptr(44005,44008,3),new P.ptr(44013,64286,20273),new P.ptr(65024,65039,1),new P.ptr(65056,65069,1)]),new IF([new Q.ptr(66045,66272,227),new Q.ptr(66422,66426,1),new Q.ptr(68097,68099,1),new Q.ptr(68101,68102,1),new Q.ptr(68108,68111,1),new Q.ptr(68152,68154,1),new Q.ptr(68159,68325,166),new Q.ptr(68326,69633,1307),new Q.ptr(69688,69702,1),new Q.ptr(69759,69761,1),new Q.ptr(69811,69814,1),new Q.ptr(69817,69818,1),new Q.ptr(69888,69890,1),new Q.ptr(69927,69931,1),new Q.ptr(69933,69940,1),new Q.ptr(70003,70016,13),new Q.ptr(70017,70070,53),new Q.ptr(70071,70078,1),new Q.ptr(70191,70193,1),new Q.ptr(70196,70198,2),new Q.ptr(70199,70367,168),new Q.ptr(70371,70378,1),new Q.ptr(70401,70460,59),new Q.ptr(70464,70502,38),new Q.ptr(70503,70508,1),new Q.ptr(70512,70516,1),new Q.ptr(70835,70840,1),new Q.ptr(70842,70847,5),new Q.ptr(70848,70850,2),new Q.ptr(70851,71090,239),new Q.ptr(71091,71093,1),new Q.ptr(71100,71101,1),new Q.ptr(71103,71104,1),new Q.ptr(71219,71226,1),new Q.ptr(71229,71231,2),new Q.ptr(71232,71339,107),new Q.ptr(71341,71344,3),new Q.ptr(71345,71349,1),new Q.ptr(71351,92912,21561),new Q.ptr(92913,92916,1),new Q.ptr(92976,92982,1),new Q.ptr(94095,94098,1),new Q.ptr(113821,113822,1),new Q.ptr(119143,119145,1),new Q.ptr(119163,119170,1),new Q.ptr(119173,119179,1),new Q.ptr(119210,119213,1),new Q.ptr(119362,119364,1),new Q.ptr(125136,125142,1),new Q.ptr(917760,917999,1)]),0);AW=new O.ptr(new IE([new P.ptr(48,57,1),new P.ptr(178,179,1),new P.ptr(185,188,3),new P.ptr(189,190,1),new P.ptr(1632,1641,1),new P.ptr(1776,1785,1),new P.ptr(1984,1993,1),new P.ptr(2406,2415,1),new P.ptr(2534,2543,1),new P.ptr(2548,2553,1),new P.ptr(2662,2671,1),new P.ptr(2790,2799,1),new P.ptr(2918,2927,1),new P.ptr(2930,2935,1),new P.ptr(3046,3058,1),new P.ptr(3174,3183,1),new P.ptr(3192,3198,1),new P.ptr(3302,3311,1),new P.ptr(3430,3445,1),new P.ptr(3558,3567,1),new P.ptr(3664,3673,1),new P.ptr(3792,3801,1),new P.ptr(3872,3891,1),new P.ptr(4160,4169,1),new P.ptr(4240,4249,1),new P.ptr(4969,4988,1),new P.ptr(5870,5872,1),new P.ptr(6112,6121,1),new P.ptr(6128,6137,1),new P.ptr(6160,6169,1),new P.ptr(6470,6479,1),new P.ptr(6608,6618,1),new P.ptr(6784,6793,1),new P.ptr(6800,6809,1),new P.ptr(6992,7001,1),new P.ptr(7088,7097,1),new P.ptr(7232,7241,1),new P.ptr(7248,7257,1),new P.ptr(8304,8308,4),new P.ptr(8309,8313,1),new P.ptr(8320,8329,1),new P.ptr(8528,8578,1),new P.ptr(8581,8585,1),new P.ptr(9312,9371,1),new P.ptr(9450,9471,1),new P.ptr(10102,10131,1),new P.ptr(11517,12295,778),new P.ptr(12321,12329,1),new P.ptr(12344,12346,1),new P.ptr(12690,12693,1),new P.ptr(12832,12841,1),new P.ptr(12872,12879,1),new P.ptr(12881,12895,1),new P.ptr(12928,12937,1),new P.ptr(12977,12991,1),new P.ptr(42528,42537,1),new P.ptr(42726,42735,1),new P.ptr(43056,43061,1),new P.ptr(43216,43225,1),new P.ptr(43264,43273,1),new P.ptr(43472,43481,1),new P.ptr(43504,43513,1),new P.ptr(43600,43609,1),new P.ptr(44016,44025,1),new P.ptr(65296,65305,1)]),new IF([new Q.ptr(65799,65843,1),new Q.ptr(65856,65912,1),new Q.ptr(65930,65931,1),new Q.ptr(66273,66299,1),new Q.ptr(66336,66339,1),new Q.ptr(66369,66378,9),new Q.ptr(66513,66517,1),new Q.ptr(66720,66729,1),new Q.ptr(67672,67679,1),new Q.ptr(67705,67711,1),new Q.ptr(67751,67759,1),new Q.ptr(67862,67867,1),new Q.ptr(68160,68167,1),new Q.ptr(68221,68222,1),new Q.ptr(68253,68255,1),new Q.ptr(68331,68335,1),new Q.ptr(68440,68447,1),new Q.ptr(68472,68479,1),new Q.ptr(68521,68527,1),new Q.ptr(69216,69246,1),new Q.ptr(69714,69743,1),new Q.ptr(69872,69881,1),new Q.ptr(69942,69951,1),new Q.ptr(70096,70105,1),new Q.ptr(70113,70132,1),new Q.ptr(70384,70393,1),new Q.ptr(70864,70873,1),new Q.ptr(71248,71257,1),new Q.ptr(71360,71369,1),new Q.ptr(71904,71922,1),new Q.ptr(74752,74862,1),new Q.ptr(92768,92777,1),new Q.ptr(93008,93017,1),new Q.ptr(93019,93025,1),new Q.ptr(119648,119665,1),new Q.ptr(120782,120831,1),new Q.ptr(125127,125135,1),new Q.ptr(127232,127244,1)]),4);AX=new O.ptr(new IE([new P.ptr(48,57,1),new P.ptr(1632,1641,1),new P.ptr(1776,1785,1),new P.ptr(1984,1993,1),new P.ptr(2406,2415,1),new P.ptr(2534,2543,1),new P.ptr(2662,2671,1),new P.ptr(2790,2799,1),new P.ptr(2918,2927,1),new P.ptr(3046,3055,1),new P.ptr(3174,3183,1),new P.ptr(3302,3311,1),new P.ptr(3430,3439,1),new P.ptr(3558,3567,1),new P.ptr(3664,3673,1),new P.ptr(3792,3801,1),new P.ptr(3872,3881,1),new P.ptr(4160,4169,1),new P.ptr(4240,4249,1),new P.ptr(6112,6121,1),new P.ptr(6160,6169,1),new P.ptr(6470,6479,1),new P.ptr(6608,6617,1),new P.ptr(6784,6793,1),new P.ptr(6800,6809,1),new P.ptr(6992,7001,1),new P.ptr(7088,7097,1),new P.ptr(7232,7241,1),new P.ptr(7248,7257,1),new P.ptr(42528,42537,1),new P.ptr(43216,43225,1),new P.ptr(43264,43273,1),new P.ptr(43472,43481,1),new P.ptr(43504,43513,1),new P.ptr(43600,43609,1),new P.ptr(44016,44025,1),new P.ptr(65296,65305,1)]),new IF([new Q.ptr(66720,66729,1),new Q.ptr(69734,69743,1),new Q.ptr(69872,69881,1),new Q.ptr(69942,69951,1),new Q.ptr(70096,70105,1),new Q.ptr(70384,70393,1),new Q.ptr(70864,70873,1),new Q.ptr(71248,71257,1),new Q.ptr(71360,71369,1),new Q.ptr(71904,71913,1),new Q.ptr(92768,92777,1),new Q.ptr(93008,93017,1),new Q.ptr(120782,120831,1)]),1);AY=new O.ptr(new IE([new P.ptr(5870,5872,1),new P.ptr(8544,8578,1),new P.ptr(8581,8584,1),new P.ptr(12295,12321,26),new P.ptr(12322,12329,1),new P.ptr(12344,12346,1),new P.ptr(42726,42735,1)]),new IF([new Q.ptr(65856,65908,1),new Q.ptr(66369,66378,9),new Q.ptr(66513,66517,1),new Q.ptr(74752,74862,1)]),0);AZ=new O.ptr(new IE([new P.ptr(178,179,1),new P.ptr(185,188,3),new P.ptr(189,190,1),new P.ptr(2548,2553,1),new P.ptr(2930,2935,1),new P.ptr(3056,3058,1),new P.ptr(3192,3198,1),new P.ptr(3440,3445,1),new P.ptr(3882,3891,1),new P.ptr(4969,4988,1),new P.ptr(6128,6137,1),new P.ptr(6618,8304,1686),new P.ptr(8308,8313,1),new P.ptr(8320,8329,1),new P.ptr(8528,8543,1),new P.ptr(8585,9312,727),new P.ptr(9313,9371,1),new P.ptr(9450,9471,1),new P.ptr(10102,10131,1),new P.ptr(11517,12690,1173),new P.ptr(12691,12693,1),new P.ptr(12832,12841,1),new P.ptr(12872,12879,1),new P.ptr(12881,12895,1),new P.ptr(12928,12937,1),new P.ptr(12977,12991,1),new P.ptr(43056,43061,1)]),new IF([new Q.ptr(65799,65843,1),new Q.ptr(65909,65912,1),new Q.ptr(65930,65931,1),new Q.ptr(66273,66299,1),new Q.ptr(66336,66339,1),new Q.ptr(67672,67679,1),new Q.ptr(67705,67711,1),new Q.ptr(67751,67759,1),new Q.ptr(67862,67867,1),new Q.ptr(68160,68167,1),new Q.ptr(68221,68222,1),new Q.ptr(68253,68255,1),new Q.ptr(68331,68335,1),new Q.ptr(68440,68447,1),new Q.ptr(68472,68479,1),new Q.ptr(68521,68527,1),new Q.ptr(69216,69246,1),new Q.ptr(69714,69733,1),new Q.ptr(70113,70132,1),new Q.ptr(71914,71922,1),new Q.ptr(93019,93025,1),new Q.ptr(119648,119665,1),new Q.ptr(125127,125135,1),new Q.ptr(127232,127244,1)]),3);BA=new O.ptr(new IE([new P.ptr(33,35,1),new P.ptr(37,42,1),new P.ptr(44,47,1),new P.ptr(58,59,1),new P.ptr(63,64,1),new P.ptr(91,93,1),new P.ptr(95,123,28),new P.ptr(125,161,36),new P.ptr(167,171,4),new P.ptr(182,183,1),new P.ptr(187,191,4),new P.ptr(894,903,9),new P.ptr(1370,1375,1),new P.ptr(1417,1418,1),new P.ptr(1470,1472,2),new P.ptr(1475,1478,3),new P.ptr(1523,1524,1),new P.ptr(1545,1546,1),new P.ptr(1548,1549,1),new P.ptr(1563,1566,3),new P.ptr(1567,1642,75),new P.ptr(1643,1645,1),new P.ptr(1748,1792,44),new P.ptr(1793,1805,1),new P.ptr(2039,2041,1),new P.ptr(2096,2110,1),new P.ptr(2142,2404,262),new P.ptr(2405,2416,11),new P.ptr(2800,3572,772),new P.ptr(3663,3674,11),new P.ptr(3675,3844,169),new P.ptr(3845,3858,1),new P.ptr(3860,3898,38),new P.ptr(3899,3901,1),new P.ptr(3973,4048,75),new P.ptr(4049,4052,1),new P.ptr(4057,4058,1),new P.ptr(4170,4175,1),new P.ptr(4347,4960,613),new P.ptr(4961,4968,1),new P.ptr(5120,5741,621),new P.ptr(5742,5787,45),new P.ptr(5788,5867,79),new P.ptr(5868,5869,1),new P.ptr(5941,5942,1),new P.ptr(6100,6102,1),new P.ptr(6104,6106,1),new P.ptr(6144,6154,1),new P.ptr(6468,6469,1),new P.ptr(6686,6687,1),new P.ptr(6816,6822,1),new P.ptr(6824,6829,1),new P.ptr(7002,7008,1),new P.ptr(7164,7167,1),new P.ptr(7227,7231,1),new P.ptr(7294,7295,1),new P.ptr(7360,7367,1),new P.ptr(7379,8208,829),new P.ptr(8209,8231,1),new P.ptr(8240,8259,1),new P.ptr(8261,8273,1),new P.ptr(8275,8286,1),new P.ptr(8317,8318,1),new P.ptr(8333,8334,1),new P.ptr(8968,8971,1),new P.ptr(9001,9002,1),new P.ptr(10088,10101,1),new P.ptr(10181,10182,1),new P.ptr(10214,10223,1),new P.ptr(10627,10648,1),new P.ptr(10712,10715,1),new P.ptr(10748,10749,1),new P.ptr(11513,11516,1),new P.ptr(11518,11519,1),new P.ptr(11632,11776,144),new P.ptr(11777,11822,1),new P.ptr(11824,11842,1),new P.ptr(12289,12291,1),new P.ptr(12296,12305,1),new P.ptr(12308,12319,1),new P.ptr(12336,12349,13),new P.ptr(12448,12539,91),new P.ptr(42238,42239,1),new P.ptr(42509,42511,1),new P.ptr(42611,42622,11),new P.ptr(42738,42743,1),new P.ptr(43124,43127,1),new P.ptr(43214,43215,1),new P.ptr(43256,43258,1),new P.ptr(43310,43311,1),new P.ptr(43359,43457,98),new P.ptr(43458,43469,1),new P.ptr(43486,43487,1),new P.ptr(43612,43615,1),new P.ptr(43742,43743,1),new P.ptr(43760,43761,1),new P.ptr(44011,64830,20819),new P.ptr(64831,65040,209),new P.ptr(65041,65049,1),new P.ptr(65072,65106,1),new P.ptr(65108,65121,1),new P.ptr(65123,65128,5),new P.ptr(65130,65131,1),new P.ptr(65281,65283,1),new P.ptr(65285,65290,1),new P.ptr(65292,65295,1),new P.ptr(65306,65307,1),new P.ptr(65311,65312,1),new P.ptr(65339,65341,1),new P.ptr(65343,65371,28),new P.ptr(65373,65375,2),new P.ptr(65376,65381,1)]),new IF([new Q.ptr(65792,65794,1),new Q.ptr(66463,66512,49),new Q.ptr(66927,67671,744),new Q.ptr(67871,67903,32),new Q.ptr(68176,68184,1),new Q.ptr(68223,68336,113),new Q.ptr(68337,68342,1),new Q.ptr(68409,68415,1),new Q.ptr(68505,68508,1),new Q.ptr(69703,69709,1),new Q.ptr(69819,69820,1),new Q.ptr(69822,69825,1),new Q.ptr(69952,69955,1),new Q.ptr(70004,70005,1),new Q.ptr(70085,70088,1),new Q.ptr(70093,70200,107),new Q.ptr(70201,70205,1),new Q.ptr(70854,71105,251),new Q.ptr(71106,71113,1),new Q.ptr(71233,71235,1),new Q.ptr(74864,74868,1),new Q.ptr(92782,92783,1),new Q.ptr(92917,92983,66),new Q.ptr(92984,92987,1),new Q.ptr(92996,113823,20827)]),11);BB=new O.ptr(new IE([new P.ptr(95,8255,8160),new P.ptr(8256,8276,20),new P.ptr(65075,65076,1),new P.ptr(65101,65103,1),new P.ptr(65343,65343,1)]),IF.nil,0);BC=new O.ptr(new IE([new P.ptr(45,1418,1373),new P.ptr(1470,5120,3650),new P.ptr(6150,8208,2058),new P.ptr(8209,8213,1),new P.ptr(11799,11802,3),new P.ptr(11834,11835,1),new P.ptr(11840,12316,476),new P.ptr(12336,12448,112),new P.ptr(65073,65074,1),new P.ptr(65112,65123,11),new P.ptr(65293,65293,1)]),IF.nil,0);BD=new O.ptr(new IE([new P.ptr(41,93,52),new P.ptr(125,3899,3774),new P.ptr(3901,5788,1887),new P.ptr(8262,8318,56),new P.ptr(8334,8969,635),new P.ptr(8971,9002,31),new P.ptr(10089,10101,2),new P.ptr(10182,10215,33),new P.ptr(10217,10223,2),new P.ptr(10628,10648,2),new P.ptr(10713,10715,2),new P.ptr(10749,11811,1062),new P.ptr(11813,11817,2),new P.ptr(12297,12305,2),new P.ptr(12309,12315,2),new P.ptr(12318,12319,1),new P.ptr(64830,65048,218),new P.ptr(65078,65092,2),new P.ptr(65096,65114,18),new P.ptr(65116,65118,2),new P.ptr(65289,65341,52),new P.ptr(65373,65379,3)]),IF.nil,1);BE=new O.ptr(new IE([new P.ptr(187,8217,8030),new P.ptr(8221,8250,29),new P.ptr(11779,11781,2),new P.ptr(11786,11789,3),new P.ptr(11805,11809,4)]),IF.nil,0);BF=new O.ptr(new IE([new P.ptr(171,8216,8045),new P.ptr(8219,8220,1),new P.ptr(8223,8249,26),new P.ptr(11778,11780,2),new P.ptr(11785,11788,3),new P.ptr(11804,11808,4)]),IF.nil,0);BG=new O.ptr(new IE([new P.ptr(33,35,1),new P.ptr(37,39,1),new P.ptr(42,46,2),new P.ptr(47,58,11),new P.ptr(59,63,4),new P.ptr(64,92,28),new P.ptr(161,167,6),new P.ptr(182,183,1),new P.ptr(191,894,703),new P.ptr(903,1370,467),new P.ptr(1371,1375,1),new P.ptr(1417,1472,55),new P.ptr(1475,1478,3),new P.ptr(1523,1524,1),new P.ptr(1545,1546,1),new P.ptr(1548,1549,1),new P.ptr(1563,1566,3),new P.ptr(1567,1642,75),new P.ptr(1643,1645,1),new P.ptr(1748,1792,44),new P.ptr(1793,1805,1),new P.ptr(2039,2041,1),new P.ptr(2096,2110,1),new P.ptr(2142,2404,262),new P.ptr(2405,2416,11),new P.ptr(2800,3572,772),new P.ptr(3663,3674,11),new P.ptr(3675,3844,169),new P.ptr(3845,3858,1),new P.ptr(3860,3973,113),new P.ptr(4048,4052,1),new P.ptr(4057,4058,1),new P.ptr(4170,4175,1),new P.ptr(4347,4960,613),new P.ptr(4961,4968,1),new P.ptr(5741,5742,1),new P.ptr(5867,5869,1),new P.ptr(5941,5942,1),new P.ptr(6100,6102,1),new P.ptr(6104,6106,1),new P.ptr(6144,6149,1),new P.ptr(6151,6154,1),new P.ptr(6468,6469,1),new P.ptr(6686,6687,1),new P.ptr(6816,6822,1),new P.ptr(6824,6829,1),new P.ptr(7002,7008,1),new P.ptr(7164,7167,1),new P.ptr(7227,7231,1),new P.ptr(7294,7295,1),new P.ptr(7360,7367,1),new P.ptr(7379,8214,835),new P.ptr(8215,8224,9),new P.ptr(8225,8231,1),new P.ptr(8240,8248,1),new P.ptr(8251,8254,1),new P.ptr(8257,8259,1),new P.ptr(8263,8273,1),new P.ptr(8275,8277,2),new P.ptr(8278,8286,1),new P.ptr(11513,11516,1),new P.ptr(11518,11519,1),new P.ptr(11632,11776,144),new P.ptr(11777,11782,5),new P.ptr(11783,11784,1),new P.ptr(11787,11790,3),new P.ptr(11791,11798,1),new P.ptr(11800,11801,1),new P.ptr(11803,11806,3),new P.ptr(11807,11818,11),new P.ptr(11819,11822,1),new P.ptr(11824,11833,1),new P.ptr(11836,11839,1),new P.ptr(11841,12289,448),new P.ptr(12290,12291,1),new P.ptr(12349,12539,190),new P.ptr(42238,42239,1),new P.ptr(42509,42511,1),new P.ptr(42611,42622,11),new P.ptr(42738,42743,1),new P.ptr(43124,43127,1),new P.ptr(43214,43215,1),new P.ptr(43256,43258,1),new P.ptr(43310,43311,1),new P.ptr(43359,43457,98),new P.ptr(43458,43469,1),new P.ptr(43486,43487,1),new P.ptr(43612,43615,1),new P.ptr(43742,43743,1),new P.ptr(43760,43761,1),new P.ptr(44011,65040,21029),new P.ptr(65041,65046,1),new P.ptr(65049,65072,23),new P.ptr(65093,65094,1),new P.ptr(65097,65100,1),new P.ptr(65104,65106,1),new P.ptr(65108,65111,1),new P.ptr(65119,65121,1),new P.ptr(65128,65130,2),new P.ptr(65131,65281,150),new P.ptr(65282,65283,1),new P.ptr(65285,65287,1),new P.ptr(65290,65294,2),new P.ptr(65295,65306,11),new P.ptr(65307,65311,4),new P.ptr(65312,65340,28),new P.ptr(65377,65380,3),new P.ptr(65381,65381,1)]),new IF([new Q.ptr(65792,65792,1),new Q.ptr(65793,65794,1),new Q.ptr(66463,66512,49),new Q.ptr(66927,67671,744),new Q.ptr(67871,67903,32),new Q.ptr(68176,68184,1),new Q.ptr(68223,68336,113),new Q.ptr(68337,68342,1),new Q.ptr(68409,68415,1),new Q.ptr(68505,68508,1),new Q.ptr(69703,69709,1),new Q.ptr(69819,69820,1),new Q.ptr(69822,69825,1),new Q.ptr(69952,69955,1),new Q.ptr(70004,70005,1),new Q.ptr(70085,70088,1),new Q.ptr(70093,70200,107),new Q.ptr(70201,70205,1),new Q.ptr(70854,71105,251),new Q.ptr(71106,71113,1),new Q.ptr(71233,71235,1),new Q.ptr(74864,74868,1),new Q.ptr(92782,92783,1),new Q.ptr(92917,92983,66),new Q.ptr(92984,92987,1),new Q.ptr(92996,113823,20827)]),8);BH=new O.ptr(new IE([new P.ptr(40,91,51),new P.ptr(123,3898,3775),new P.ptr(3900,5787,1887),new P.ptr(8218,8222,4),new P.ptr(8261,8317,56),new P.ptr(8333,8968,635),new P.ptr(8970,9001,31),new P.ptr(10088,10100,2),new P.ptr(10181,10214,33),new P.ptr(10216,10222,2),new P.ptr(10627,10647,2),new P.ptr(10712,10714,2),new P.ptr(10748,11810,1062),new P.ptr(11812,11816,2),new P.ptr(11842,12296,454),new P.ptr(12298,12304,2),new P.ptr(12308,12314,2),new P.ptr(12317,64831,52514),new P.ptr(65047,65077,30),new P.ptr(65079,65091,2),new P.ptr(65095,65113,18),new P.ptr(65115,65117,2),new P.ptr(65288,65339,51),new P.ptr(65371,65375,4),new P.ptr(65378,65378,1)]),IF.nil,1);BI=new O.ptr(new IE([new P.ptr(36,43,7),new P.ptr(60,62,1),new P.ptr(94,96,2),new P.ptr(124,126,2),new P.ptr(162,166,1),new P.ptr(168,169,1),new P.ptr(172,174,2),new P.ptr(175,177,1),new P.ptr(180,184,4),new P.ptr(215,247,32),new P.ptr(706,709,1),new P.ptr(722,735,1),new P.ptr(741,747,1),new P.ptr(749,751,2),new P.ptr(752,767,1),new P.ptr(885,900,15),new P.ptr(901,1014,113),new P.ptr(1154,1421,267),new P.ptr(1422,1423,1),new P.ptr(1542,1544,1),new P.ptr(1547,1550,3),new P.ptr(1551,1758,207),new P.ptr(1769,1789,20),new P.ptr(1790,2038,248),new P.ptr(2546,2547,1),new P.ptr(2554,2555,1),new P.ptr(2801,2928,127),new P.ptr(3059,3066,1),new P.ptr(3199,3449,250),new P.ptr(3647,3841,194),new P.ptr(3842,3843,1),new P.ptr(3859,3861,2),new P.ptr(3862,3863,1),new P.ptr(3866,3871,1),new P.ptr(3892,3896,2),new P.ptr(4030,4037,1),new P.ptr(4039,4044,1),new P.ptr(4046,4047,1),new P.ptr(4053,4056,1),new P.ptr(4254,4255,1),new P.ptr(5008,5017,1),new P.ptr(6107,6464,357),new P.ptr(6622,6655,1),new P.ptr(7009,7018,1),new P.ptr(7028,7036,1),new P.ptr(8125,8127,2),new P.ptr(8128,8129,1),new P.ptr(8141,8143,1),new P.ptr(8157,8159,1),new P.ptr(8173,8175,1),new P.ptr(8189,8190,1),new P.ptr(8260,8274,14),new P.ptr(8314,8316,1),new P.ptr(8330,8332,1),new P.ptr(8352,8381,1),new P.ptr(8448,8449,1),new P.ptr(8451,8454,1),new P.ptr(8456,8457,1),new P.ptr(8468,8470,2),new P.ptr(8471,8472,1),new P.ptr(8478,8483,1),new P.ptr(8485,8489,2),new P.ptr(8494,8506,12),new P.ptr(8507,8512,5),new P.ptr(8513,8516,1),new P.ptr(8522,8525,1),new P.ptr(8527,8592,65),new P.ptr(8593,8967,1),new P.ptr(8972,9000,1),new P.ptr(9003,9210,1),new P.ptr(9216,9254,1),new P.ptr(9280,9290,1),new P.ptr(9372,9449,1),new P.ptr(9472,10087,1),new P.ptr(10132,10180,1),new P.ptr(10183,10213,1),new P.ptr(10224,10626,1),new P.ptr(10649,10711,1),new P.ptr(10716,10747,1),new P.ptr(10750,11123,1),new P.ptr(11126,11157,1),new P.ptr(11160,11193,1),new P.ptr(11197,11208,1),new P.ptr(11210,11217,1),new P.ptr(11493,11498,1),new P.ptr(11904,11929,1),new P.ptr(11931,12019,1),new P.ptr(12032,12245,1),new P.ptr(12272,12283,1),new P.ptr(12292,12306,14),new P.ptr(12307,12320,13),new P.ptr(12342,12343,1),new P.ptr(12350,12351,1),new P.ptr(12443,12444,1),new P.ptr(12688,12689,1),new P.ptr(12694,12703,1),new P.ptr(12736,12771,1),new P.ptr(12800,12830,1),new P.ptr(12842,12871,1),new P.ptr(12880,12896,16),new P.ptr(12897,12927,1),new P.ptr(12938,12976,1),new P.ptr(12992,13054,1),new P.ptr(13056,13311,1),new P.ptr(19904,19967,1),new P.ptr(42128,42182,1),new P.ptr(42752,42774,1),new P.ptr(42784,42785,1),new P.ptr(42889,42890,1),new P.ptr(43048,43051,1),new P.ptr(43062,43065,1),new P.ptr(43639,43641,1),new P.ptr(43867,64297,20430),new P.ptr(64434,64449,1),new P.ptr(65020,65021,1),new P.ptr(65122,65124,2),new P.ptr(65125,65126,1),new P.ptr(65129,65284,155),new P.ptr(65291,65308,17),new P.ptr(65309,65310,1),new P.ptr(65342,65344,2),new P.ptr(65372,65374,2),new P.ptr(65504,65510,1),new P.ptr(65512,65518,1),new P.ptr(65532,65533,1)]),new IF([new Q.ptr(65847,65855,1),new Q.ptr(65913,65929,1),new Q.ptr(65932,65936,4),new Q.ptr(65937,65947,1),new Q.ptr(65952,66000,48),new Q.ptr(66001,66044,1),new Q.ptr(67703,67704,1),new Q.ptr(68296,92988,24692),new Q.ptr(92989,92991,1),new Q.ptr(92997,113820,20823),new Q.ptr(118784,119029,1),new Q.ptr(119040,119078,1),new Q.ptr(119081,119140,1),new Q.ptr(119146,119148,1),new Q.ptr(119171,119172,1),new Q.ptr(119180,119209,1),new Q.ptr(119214,119261,1),new Q.ptr(119296,119361,1),new Q.ptr(119365,119552,187),new Q.ptr(119553,119638,1),new Q.ptr(120513,120539,26),new Q.ptr(120571,120597,26),new Q.ptr(120629,120655,26),new Q.ptr(120687,120713,26),new Q.ptr(120745,120771,26),new Q.ptr(126704,126705,1),new Q.ptr(126976,127019,1),new Q.ptr(127024,127123,1),new Q.ptr(127136,127150,1),new Q.ptr(127153,127167,1),new Q.ptr(127169,127183,1),new Q.ptr(127185,127221,1),new Q.ptr(127248,127278,1),new Q.ptr(127280,127339,1),new Q.ptr(127344,127386,1),new Q.ptr(127462,127490,1),new Q.ptr(127504,127546,1),new Q.ptr(127552,127560,1),new Q.ptr(127568,127569,1),new Q.ptr(127744,127788,1),new Q.ptr(127792,127869,1),new Q.ptr(127872,127950,1),new Q.ptr(127956,127991,1),new Q.ptr(128000,128254,1),new Q.ptr(128256,128330,1),new Q.ptr(128336,128377,1),new Q.ptr(128379,128419,1),new Q.ptr(128421,128578,1),new Q.ptr(128581,128719,1),new Q.ptr(128736,128748,1),new Q.ptr(128752,128755,1),new Q.ptr(128768,128883,1),new Q.ptr(128896,128980,1),new Q.ptr(129024,129035,1),new Q.ptr(129040,129095,1),new Q.ptr(129104,129113,1),new Q.ptr(129120,129159,1),new Q.ptr(129168,129197,1)]),10);BJ=new O.ptr(new IE([new P.ptr(36,162,126),new P.ptr(163,165,1),new P.ptr(1423,1547,124),new P.ptr(2546,2547,1),new P.ptr(2555,2801,246),new P.ptr(3065,3647,582),new P.ptr(6107,8352,2245),new P.ptr(8353,8381,1),new P.ptr(43064,65020,21956),new P.ptr(65129,65284,155),new P.ptr(65504,65505,1),new P.ptr(65509,65510,1)]),IF.nil,2);BK=new O.ptr(new IE([new P.ptr(94,96,2),new P.ptr(168,175,7),new P.ptr(180,184,4),new P.ptr(706,709,1),new P.ptr(722,735,1),new P.ptr(741,747,1),new P.ptr(749,751,2),new P.ptr(752,767,1),new P.ptr(885,900,15),new P.ptr(901,8125,7224),new P.ptr(8127,8129,1),new P.ptr(8141,8143,1),new P.ptr(8157,8159,1),new P.ptr(8173,8175,1),new P.ptr(8189,8190,1),new P.ptr(12443,12444,1),new P.ptr(42752,42774,1),new P.ptr(42784,42785,1),new P.ptr(42889,42890,1),new P.ptr(43867,64434,20567),new P.ptr(64435,64449,1),new P.ptr(65342,65344,2),new P.ptr(65507,65507,1)]),IF.nil,3);BL=new O.ptr(new IE([new P.ptr(43,60,17),new P.ptr(61,62,1),new P.ptr(124,126,2),new P.ptr(172,177,5),new P.ptr(215,247,32),new P.ptr(1014,1542,528),new P.ptr(1543,1544,1),new P.ptr(8260,8274,14),new P.ptr(8314,8316,1),new P.ptr(8330,8332,1),new P.ptr(8472,8512,40),new P.ptr(8513,8516,1),new P.ptr(8523,8592,69),new P.ptr(8593,8596,1),new P.ptr(8602,8603,1),new P.ptr(8608,8614,3),new P.ptr(8622,8654,32),new P.ptr(8655,8658,3),new P.ptr(8660,8692,32),new P.ptr(8693,8959,1),new P.ptr(8992,8993,1),new P.ptr(9084,9115,31),new P.ptr(9116,9139,1),new P.ptr(9180,9185,1),new P.ptr(9655,9665,10),new P.ptr(9720,9727,1),new P.ptr(9839,10176,337),new P.ptr(10177,10180,1),new P.ptr(10183,10213,1),new P.ptr(10224,10239,1),new P.ptr(10496,10626,1),new P.ptr(10649,10711,1),new P.ptr(10716,10747,1),new P.ptr(10750,11007,1),new P.ptr(11056,11076,1),new P.ptr(11079,11084,1),new P.ptr(64297,65122,825),new P.ptr(65124,65126,1),new P.ptr(65291,65308,17),new P.ptr(65309,65310,1),new P.ptr(65372,65374,2),new P.ptr(65506,65513,7),new P.ptr(65514,65516,1)]),new IF([new Q.ptr(120513,120539,26),new Q.ptr(120571,120597,26),new Q.ptr(120629,120655,26),new Q.ptr(120687,120713,26),new Q.ptr(120745,120771,26),new Q.ptr(126704,126705,1)]),5);BM=new O.ptr(new IE([new P.ptr(166,169,3),new P.ptr(174,176,2),new P.ptr(1154,1421,267),new P.ptr(1422,1550,128),new P.ptr(1551,1758,207),new P.ptr(1769,1789,20),new P.ptr(1790,2038,248),new P.ptr(2554,2928,374),new P.ptr(3059,3064,1),new P.ptr(3066,3199,133),new P.ptr(3449,3841,392),new P.ptr(3842,3843,1),new P.ptr(3859,3861,2),new P.ptr(3862,3863,1),new P.ptr(3866,3871,1),new P.ptr(3892,3896,2),new P.ptr(4030,4037,1),new P.ptr(4039,4044,1),new P.ptr(4046,4047,1),new P.ptr(4053,4056,1),new P.ptr(4254,4255,1),new P.ptr(5008,5017,1),new P.ptr(6464,6622,158),new P.ptr(6623,6655,1),new P.ptr(7009,7018,1),new P.ptr(7028,7036,1),new P.ptr(8448,8449,1),new P.ptr(8451,8454,1),new P.ptr(8456,8457,1),new P.ptr(8468,8470,2),new P.ptr(8471,8478,7),new P.ptr(8479,8483,1),new P.ptr(8485,8489,2),new P.ptr(8494,8506,12),new P.ptr(8507,8522,15),new P.ptr(8524,8525,1),new P.ptr(8527,8597,70),new P.ptr(8598,8601,1),new P.ptr(8604,8607,1),new P.ptr(8609,8610,1),new P.ptr(8612,8613,1),new P.ptr(8615,8621,1),new P.ptr(8623,8653,1),new P.ptr(8656,8657,1),new P.ptr(8659,8661,2),new P.ptr(8662,8691,1),new P.ptr(8960,8967,1),new P.ptr(8972,8991,1),new P.ptr(8994,9000,1),new P.ptr(9003,9083,1),new P.ptr(9085,9114,1),new P.ptr(9140,9179,1),new P.ptr(9186,9210,1),new P.ptr(9216,9254,1),new P.ptr(9280,9290,1),new P.ptr(9372,9449,1),new P.ptr(9472,9654,1),new P.ptr(9656,9664,1),new P.ptr(9666,9719,1),new P.ptr(9728,9838,1),new P.ptr(9840,10087,1),new P.ptr(10132,10175,1),new P.ptr(10240,10495,1),new P.ptr(11008,11055,1),new P.ptr(11077,11078,1),new P.ptr(11085,11123,1),new P.ptr(11126,11157,1),new P.ptr(11160,11193,1),new P.ptr(11197,11208,1),new P.ptr(11210,11217,1),new P.ptr(11493,11498,1),new P.ptr(11904,11929,1),new P.ptr(11931,12019,1),new P.ptr(12032,12245,1),new P.ptr(12272,12283,1),new P.ptr(12292,12306,14),new P.ptr(12307,12320,13),new P.ptr(12342,12343,1),new P.ptr(12350,12351,1),new P.ptr(12688,12689,1),new P.ptr(12694,12703,1),new P.ptr(12736,12771,1),new P.ptr(12800,12830,1),new P.ptr(12842,12871,1),new P.ptr(12880,12896,16),new P.ptr(12897,12927,1),new P.ptr(12938,12976,1),new P.ptr(12992,13054,1),new P.ptr(13056,13311,1),new P.ptr(19904,19967,1),new P.ptr(42128,42182,1),new P.ptr(43048,43051,1),new P.ptr(43062,43063,1),new P.ptr(43065,43639,574),new P.ptr(43640,43641,1),new P.ptr(65021,65508,487),new P.ptr(65512,65517,5),new P.ptr(65518,65532,14),new P.ptr(65533,65533,1)]),new IF([new Q.ptr(65847,65847,1),new Q.ptr(65848,65855,1),new Q.ptr(65913,65929,1),new Q.ptr(65932,65936,4),new Q.ptr(65937,65947,1),new Q.ptr(65952,66000,48),new Q.ptr(66001,66044,1),new Q.ptr(67703,67704,1),new Q.ptr(68296,92988,24692),new Q.ptr(92989,92991,1),new Q.ptr(92997,113820,20823),new Q.ptr(118784,119029,1),new Q.ptr(119040,119078,1),new Q.ptr(119081,119140,1),new Q.ptr(119146,119148,1),new Q.ptr(119171,119172,1),new Q.ptr(119180,119209,1),new Q.ptr(119214,119261,1),new Q.ptr(119296,119361,1),new Q.ptr(119365,119552,187),new Q.ptr(119553,119638,1),new Q.ptr(126976,127019,1),new Q.ptr(127024,127123,1),new Q.ptr(127136,127150,1),new Q.ptr(127153,127167,1),new Q.ptr(127169,127183,1),new Q.ptr(127185,127221,1),new Q.ptr(127248,127278,1),new Q.ptr(127280,127339,1),new Q.ptr(127344,127386,1),new Q.ptr(127462,127490,1),new Q.ptr(127504,127546,1),new Q.ptr(127552,127560,1),new Q.ptr(127568,127569,1),new Q.ptr(127744,127788,1),new Q.ptr(127792,127869,1),new Q.ptr(127872,127950,1),new Q.ptr(127956,127991,1),new Q.ptr(128000,128254,1),new Q.ptr(128256,128330,1),new Q.ptr(128336,128377,1),new Q.ptr(128379,128419,1),new Q.ptr(128421,128578,1),new Q.ptr(128581,128719,1),new Q.ptr(128736,128748,1),new Q.ptr(128752,128755,1),new Q.ptr(128768,128883,1),new Q.ptr(128896,128980,1),new Q.ptr(129024,129035,1),new Q.ptr(129040,129095,1),new Q.ptr(129104,129113,1),new Q.ptr(129120,129159,1),new Q.ptr(129168,129197,1)]),2);BN=new O.ptr(new IE([new P.ptr(32,160,128),new P.ptr(5760,8192,2432),new P.ptr(8193,8202,1),new P.ptr(8232,8233,1),new P.ptr(8239,8287,48),new P.ptr(12288,12288,1)]),IF.nil,1);BO=new O.ptr(new IE([new P.ptr(8232,8232,1)]),IF.nil,0);BP=new O.ptr(new IE([new P.ptr(8233,8233,1)]),IF.nil,0);BQ=new O.ptr(new IE([new P.ptr(32,160,128),new P.ptr(5760,8192,2432),new P.ptr(8193,8202,1),new P.ptr(8239,8287,48),new P.ptr(12288,12288,1)]),IF.nil,1);$pkg.Cc=AI;$pkg.Cf=AJ;$pkg.Co=AK;$pkg.Cs=AL;$pkg.Digit=AX;$pkg.Nd=AX;$pkg.Letter=AM;$pkg.L=AM;$pkg.Lm=AO;$pkg.Lo=AP;$pkg.Ll=AN;$pkg.M=AS;$pkg.Mc=AT;$pkg.Me=AU;$pkg.Mn=AV;$pkg.Nl=AY;$pkg.No=AZ;$pkg.Number=AW;$pkg.N=AW;$pkg.C=AH;$pkg.Pc=BB;$pkg.Pd=BC;$pkg.Pe=BD;$pkg.Pf=BE;$pkg.Pi=BF;$pkg.Po=BG;$pkg.Ps=BH;$pkg.P=BA;$pkg.Sc=BJ;$pkg.Sk=BK;$pkg.Sm=BL;$pkg.So=BM;$pkg.Z=BN;$pkg.S=BI;$pkg.PrintRanges=new IH([$pkg.L,$pkg.M,$pkg.N,$pkg.P,$pkg.S]);$pkg.Lt=AQ;$pkg.Upper=AR;$pkg.Lu=AR;$pkg.Zl=BO;$pkg.Zp=BP;$pkg.Zs=BQ;$pkg.GraphicRanges=new IH([$pkg.L,$pkg.M,$pkg.N,$pkg.P,$pkg.S,$pkg.Zs]);$pkg.Categories=(b=new $Map(),c="C",b[c]={k:c,v:$pkg.C},c="Cc",b[c]={k:c,v:$pkg.Cc},c="Cf",b[c]={k:c,v:$pkg.Cf},c="Co",b[c]={k:c,v:$pkg.Co},c="Cs",b[c]={k:c,v:$pkg.Cs},c="L",b[c]={k:c,v:$pkg.L},c="Ll",b[c]={k:c,v:$pkg.Ll},c="Lm",b[c]={k:c,v:$pkg.Lm},c="Lo",b[c]={k:c,v:$pkg.Lo},c="Lt",b[c]={k:c,v:$pkg.Lt},c="Lu",b[c]={k:c,v:$pkg.Lu},c="M",b[c]={k:c,v:$pkg.M},c="Mc",b[c]={k:c,v:$pkg.Mc},c="Me",b[c]={k:c,v:$pkg.Me},c="Mn",b[c]={k:c,v:$pkg.Mn},c="N",b[c]={k:c,v:$pkg.N},c="Nd",b[c]={k:c,v:$pkg.Nd},c="Nl",b[c]={k:c,v:$pkg.Nl},c="No",b[c]={k:c,v:$pkg.No},c="P",b[c]={k:c,v:$pkg.P},c="Pc",b[c]={k:c,v:$pkg.Pc},c="Pd",b[c]={k:c,v:$pkg.Pd},c="Pe",b[c]={k:c,v:$pkg.Pe},c="Pf",b[c]={k:c,v:$pkg.Pf},c="Pi",b[c]={k:c,v:$pkg.Pi},c="Po",b[c]={k:c,v:$pkg.Po},c="Ps",b[c]={k:c,v:$pkg.Ps},c="S",b[c]={k:c,v:$pkg.S},c="Sc",b[c]={k:c,v:$pkg.Sc},c="Sk",b[c]={k:c,v:$pkg.Sk},c="Sm",b[c]={k:c,v:$pkg.Sm},c="So",b[c]={k:c,v:$pkg.So},c="Z",b[c]={k:c,v:$pkg.Z},c="Zl",b[c]={k:c,v:$pkg.Zl},c="Zp",b[c]={k:c,v:$pkg.Zp},c="Zs",b[c]={k:c,v:$pkg.Zs},b);BR=new O.ptr(new IE([new P.ptr(1536,1540,1),new P.ptr(1542,1547,1),new P.ptr(1549,1562,1),new P.ptr(1566,1566,1),new P.ptr(1568,1599,1),new P.ptr(1601,1610,1),new P.ptr(1622,1631,1),new P.ptr(1642,1647,1),new P.ptr(1649,1756,1),new P.ptr(1758,1791,1),new P.ptr(1872,1919,1),new P.ptr(2208,2226,1),new P.ptr(2276,2303,1),new P.ptr(64336,64449,1),new P.ptr(64467,64829,1),new P.ptr(64848,64911,1),new P.ptr(64914,64967,1),new P.ptr(65008,65021,1),new P.ptr(65136,65140,1),new P.ptr(65142,65276,1)]),new IF([new Q.ptr(69216,69246,1),new Q.ptr(126464,126467,1),new Q.ptr(126469,126495,1),new Q.ptr(126497,126498,1),new Q.ptr(126500,126500,1),new Q.ptr(126503,126503,1),new Q.ptr(126505,126514,1),new Q.ptr(126516,126519,1),new Q.ptr(126521,126521,1),new Q.ptr(126523,126523,1),new Q.ptr(126530,126530,1),new Q.ptr(126535,126535,1),new Q.ptr(126537,126537,1),new Q.ptr(126539,126539,1),new Q.ptr(126541,126543,1),new Q.ptr(126545,126546,1),new Q.ptr(126548,126548,1),new Q.ptr(126551,126551,1),new Q.ptr(126553,126553,1),new Q.ptr(126555,126555,1),new Q.ptr(126557,126557,1),new Q.ptr(126559,126559,1),new Q.ptr(126561,126562,1),new Q.ptr(126564,126564,1),new Q.ptr(126567,126570,1),new Q.ptr(126572,126578,1),new Q.ptr(126580,126583,1),new Q.ptr(126585,126588,1),new Q.ptr(126590,126590,1),new Q.ptr(126592,126601,1),new Q.ptr(126603,126619,1),new Q.ptr(126625,126627,1),new Q.ptr(126629,126633,1),new Q.ptr(126635,126651,1),new Q.ptr(126704,126705,1)]),0);BS=new O.ptr(new IE([new P.ptr(1329,1366,1),new P.ptr(1369,1375,1),new P.ptr(1377,1415,1),new P.ptr(1418,1418,1),new P.ptr(1421,1423,1),new P.ptr(64275,64279,1)]),IF.nil,0);BT=new O.ptr(new IE([]),new IF([new Q.ptr(68352,68405,1),new Q.ptr(68409,68415,1)]),0);BU=new O.ptr(new IE([new P.ptr(6912,6987,1),new P.ptr(6992,7036,1)]),IF.nil,0);BV=new O.ptr(new IE([new P.ptr(42656,42743,1)]),new IF([new Q.ptr(92160,92728,1)]),0);BW=new O.ptr(new IE([]),new IF([new Q.ptr(92880,92909,1),new Q.ptr(92912,92917,1)]),0);BX=new O.ptr(new IE([new P.ptr(7104,7155,1),new P.ptr(7164,7167,1)]),IF.nil,0);BY=new O.ptr(new IE([new P.ptr(2432,2435,1),new P.ptr(2437,2444,1),new P.ptr(2447,2448,1),new P.ptr(2451,2472,1),new P.ptr(2474,2480,1),new P.ptr(2482,2482,1),new P.ptr(2486,2489,1),new P.ptr(2492,2500,1),new P.ptr(2503,2504,1),new P.ptr(2507,2510,1),new P.ptr(2519,2519,1),new P.ptr(2524,2525,1),new P.ptr(2527,2531,1),new P.ptr(2534,2555,1)]),IF.nil,0);BZ=new O.ptr(new IE([new P.ptr(746,747,1),new P.ptr(12549,12589,1),new P.ptr(12704,12730,1)]),IF.nil,0);CA=new O.ptr(new IE([]),new IF([new Q.ptr(69632,69709,1),new Q.ptr(69714,69743,1),new Q.ptr(69759,69759,1)]),0);CB=new O.ptr(new IE([new P.ptr(10240,10495,1)]),IF.nil,0);CC=new O.ptr(new IE([new P.ptr(6656,6683,1),new P.ptr(6686,6687,1)]),IF.nil,0);CD=new O.ptr(new IE([new P.ptr(5952,5971,1)]),IF.nil,0);CE=new O.ptr(new IE([new P.ptr(5120,5759,1),new P.ptr(6320,6389,1)]),IF.nil,0);CF=new O.ptr(new IE([]),new IF([new Q.ptr(66208,66256,1)]),0);CG=new O.ptr(new IE([]),new IF([new Q.ptr(66864,66915,1),new Q.ptr(66927,66927,1)]),0);CH=new O.ptr(new IE([]),new IF([new Q.ptr(69888,69940,1),new Q.ptr(69942,69955,1)]),0);CI=new O.ptr(new IE([new P.ptr(43520,43574,1),new P.ptr(43584,43597,1),new P.ptr(43600,43609,1),new P.ptr(43612,43615,1)]),IF.nil,0);CJ=new O.ptr(new IE([new P.ptr(5024,5108,1)]),IF.nil,0);CK=new O.ptr(new IE([new P.ptr(0,64,1),new P.ptr(91,96,1),new P.ptr(123,169,1),new P.ptr(171,185,1),new P.ptr(187,191,1),new P.ptr(215,215,1),new P.ptr(247,247,1),new P.ptr(697,735,1),new P.ptr(741,745,1),new P.ptr(748,767,1),new P.ptr(884,884,1),new P.ptr(894,894,1),new P.ptr(901,901,1),new P.ptr(903,903,1),new P.ptr(1417,1417,1),new P.ptr(1541,1541,1),new P.ptr(1548,1548,1),new P.ptr(1563,1564,1),new P.ptr(1567,1567,1),new P.ptr(1600,1600,1),new P.ptr(1632,1641,1),new P.ptr(1757,1757,1),new P.ptr(2404,2405,1),new P.ptr(3647,3647,1),new P.ptr(4053,4056,1),new P.ptr(4347,4347,1),new P.ptr(5867,5869,1),new P.ptr(5941,5942,1),new P.ptr(6146,6147,1),new P.ptr(6149,6149,1),new P.ptr(7379,7379,1),new P.ptr(7393,7393,1),new P.ptr(7401,7404,1),new P.ptr(7406,7411,1),new P.ptr(7413,7414,1),new P.ptr(8192,8203,1),new P.ptr(8206,8292,1),new P.ptr(8294,8304,1),new P.ptr(8308,8318,1),new P.ptr(8320,8334,1),new P.ptr(8352,8381,1),new P.ptr(8448,8485,1),new P.ptr(8487,8489,1),new P.ptr(8492,8497,1),new P.ptr(8499,8525,1),new P.ptr(8527,8543,1),new P.ptr(8585,8585,1),new P.ptr(8592,9210,1),new P.ptr(9216,9254,1),new P.ptr(9280,9290,1),new P.ptr(9312,10239,1),new P.ptr(10496,11123,1),new P.ptr(11126,11157,1),new P.ptr(11160,11193,1),new P.ptr(11197,11208,1),new P.ptr(11210,11217,1),new P.ptr(11776,11842,1),new P.ptr(12272,12283,1),new P.ptr(12288,12292,1),new P.ptr(12294,12294,1),new P.ptr(12296,12320,1),new P.ptr(12336,12343,1),new P.ptr(12348,12351,1),new P.ptr(12443,12444,1),new P.ptr(12448,12448,1),new P.ptr(12539,12540,1),new P.ptr(12688,12703,1),new P.ptr(12736,12771,1),new P.ptr(12832,12895,1),new P.ptr(12927,13007,1),new P.ptr(13144,13311,1),new P.ptr(19904,19967,1),new P.ptr(42752,42785,1),new P.ptr(42888,42890,1),new P.ptr(43056,43065,1),new P.ptr(43310,43310,1),new P.ptr(43471,43471,1),new P.ptr(43867,43867,1),new P.ptr(64830,64831,1),new P.ptr(65040,65049,1),new P.ptr(65072,65106,1),new P.ptr(65108,65126,1),new P.ptr(65128,65131,1),new P.ptr(65279,65279,1),new P.ptr(65281,65312,1),new P.ptr(65339,65344,1),new P.ptr(65371,65381,1),new P.ptr(65392,65392,1),new P.ptr(65438,65439,1),new P.ptr(65504,65510,1),new P.ptr(65512,65518,1),new P.ptr(65529,65533,1)]),new IF([new Q.ptr(65792,65794,1),new Q.ptr(65799,65843,1),new Q.ptr(65847,65855,1),new Q.ptr(65936,65947,1),new Q.ptr(66000,66044,1),new Q.ptr(66273,66299,1),new Q.ptr(113824,113827,1),new Q.ptr(118784,119029,1),new Q.ptr(119040,119078,1),new Q.ptr(119081,119142,1),new Q.ptr(119146,119162,1),new Q.ptr(119171,119172,1),new Q.ptr(119180,119209,1),new Q.ptr(119214,119261,1),new Q.ptr(119552,119638,1),new Q.ptr(119648,119665,1),new Q.ptr(119808,119892,1),new Q.ptr(119894,119964,1),new Q.ptr(119966,119967,1),new Q.ptr(119970,119970,1),new Q.ptr(119973,119974,1),new Q.ptr(119977,119980,1),new Q.ptr(119982,119993,1),new Q.ptr(119995,119995,1),new Q.ptr(119997,120003,1),new Q.ptr(120005,120069,1),new Q.ptr(120071,120074,1),new Q.ptr(120077,120084,1),new Q.ptr(120086,120092,1),new Q.ptr(120094,120121,1),new Q.ptr(120123,120126,1),new Q.ptr(120128,120132,1),new Q.ptr(120134,120134,1),new Q.ptr(120138,120144,1),new Q.ptr(120146,120485,1),new Q.ptr(120488,120779,1),new Q.ptr(120782,120831,1),new Q.ptr(126976,127019,1),new Q.ptr(127024,127123,1),new Q.ptr(127136,127150,1),new Q.ptr(127153,127167,1),new Q.ptr(127169,127183,1),new Q.ptr(127185,127221,1),new Q.ptr(127232,127244,1),new Q.ptr(127248,127278,1),new Q.ptr(127280,127339,1),new Q.ptr(127344,127386,1),new Q.ptr(127462,127487,1),new Q.ptr(127489,127490,1),new Q.ptr(127504,127546,1),new Q.ptr(127552,127560,1),new Q.ptr(127568,127569,1),new Q.ptr(127744,127788,1),new Q.ptr(127792,127869,1),new Q.ptr(127872,127950,1),new Q.ptr(127956,127991,1),new Q.ptr(128000,128254,1),new Q.ptr(128256,128330,1),new Q.ptr(128336,128377,1),new Q.ptr(128379,128419,1),new Q.ptr(128421,128578,1),new Q.ptr(128581,128719,1),new Q.ptr(128736,128748,1),new Q.ptr(128752,128755,1),new Q.ptr(128768,128883,1),new Q.ptr(128896,128980,1),new Q.ptr(129024,129035,1),new Q.ptr(129040,129095,1),new Q.ptr(129104,129113,1),new Q.ptr(129120,129159,1),new Q.ptr(129168,129197,1),new Q.ptr(917505,917505,1),new Q.ptr(917536,917631,1)]),7);CL=new O.ptr(new IE([new P.ptr(994,1007,1),new P.ptr(11392,11507,1),new P.ptr(11513,11519,1)]),IF.nil,0);CM=new O.ptr(new IE([]),new IF([new Q.ptr(73728,74648,1),new Q.ptr(74752,74862,1),new Q.ptr(74864,74868,1)]),0);CN=new O.ptr(new IE([]),new IF([new Q.ptr(67584,67589,1),new Q.ptr(67592,67592,1),new Q.ptr(67594,67637,1),new Q.ptr(67639,67640,1),new Q.ptr(67644,67644,1),new Q.ptr(67647,67647,1)]),0);CO=new O.ptr(new IE([new P.ptr(1024,1156,1),new P.ptr(1159,1327,1),new P.ptr(7467,7467,1),new P.ptr(7544,7544,1),new P.ptr(11744,11775,1),new P.ptr(42560,42653,1),new P.ptr(42655,42655,1)]),IF.nil,0);CP=new O.ptr(new IE([]),new IF([new Q.ptr(66560,66639,1)]),0);CQ=new O.ptr(new IE([new P.ptr(2304,2384,1),new P.ptr(2387,2403,1),new P.ptr(2406,2431,1),new P.ptr(43232,43259,1)]),IF.nil,0);CR=new O.ptr(new IE([]),new IF([new Q.ptr(113664,113770,1),new Q.ptr(113776,113788,1),new Q.ptr(113792,113800,1),new Q.ptr(113808,113817,1),new Q.ptr(113820,113823,1)]),0);CS=new O.ptr(new IE([]),new IF([new Q.ptr(77824,78894,1)]),0);CT=new O.ptr(new IE([]),new IF([new Q.ptr(66816,66855,1)]),0);CU=new O.ptr(new IE([new P.ptr(4608,4680,1),new P.ptr(4682,4685,1),new P.ptr(4688,4694,1),new P.ptr(4696,4696,1),new P.ptr(4698,4701,1),new P.ptr(4704,4744,1),new P.ptr(4746,4749,1),new P.ptr(4752,4784,1),new P.ptr(4786,4789,1),new P.ptr(4792,4798,1),new P.ptr(4800,4800,1),new P.ptr(4802,4805,1),new P.ptr(4808,4822,1),new P.ptr(4824,4880,1),new P.ptr(4882,4885,1),new P.ptr(4888,4954,1),new P.ptr(4957,4988,1),new P.ptr(4992,5017,1),new P.ptr(11648,11670,1),new P.ptr(11680,11686,1),new P.ptr(11688,11694,1),new P.ptr(11696,11702,1),new P.ptr(11704,11710,1),new P.ptr(11712,11718,1),new P.ptr(11720,11726,1),new P.ptr(11728,11734,1),new P.ptr(11736,11742,1),new P.ptr(43777,43782,1),new P.ptr(43785,43790,1),new P.ptr(43793,43798,1),new P.ptr(43808,43814,1),new P.ptr(43816,43822,1)]),IF.nil,0);CV=new O.ptr(new IE([new P.ptr(4256,4293,1),new P.ptr(4295,4295,1),new P.ptr(4301,4301,1),new P.ptr(4304,4346,1),new P.ptr(4348,4351,1),new P.ptr(11520,11557,1),new P.ptr(11559,11559,1),new P.ptr(11565,11565,1)]),IF.nil,0);CW=new O.ptr(new IE([new P.ptr(11264,11310,1),new P.ptr(11312,11358,1)]),IF.nil,0);CX=new O.ptr(new IE([]),new IF([new Q.ptr(66352,66378,1)]),0);CY=new O.ptr(new IE([]),new IF([new Q.ptr(70401,70403,1),new Q.ptr(70405,70412,1),new Q.ptr(70415,70416,1),new Q.ptr(70419,70440,1),new Q.ptr(70442,70448,1),new Q.ptr(70450,70451,1),new Q.ptr(70453,70457,1),new Q.ptr(70460,70468,1),new Q.ptr(70471,70472,1),new Q.ptr(70475,70477,1),new Q.ptr(70487,70487,1),new Q.ptr(70493,70499,1),new Q.ptr(70502,70508,1),new Q.ptr(70512,70516,1)]),0);CZ=new O.ptr(new IE([new P.ptr(880,883,1),new P.ptr(885,887,1),new P.ptr(890,893,1),new P.ptr(895,895,1),new P.ptr(900,900,1),new P.ptr(902,902,1),new P.ptr(904,906,1),new P.ptr(908,908,1),new P.ptr(910,929,1),new P.ptr(931,993,1),new P.ptr(1008,1023,1),new P.ptr(7462,7466,1),new P.ptr(7517,7521,1),new P.ptr(7526,7530,1),new P.ptr(7615,7615,1),new P.ptr(7936,7957,1),new P.ptr(7960,7965,1),new P.ptr(7968,8005,1),new P.ptr(8008,8013,1),new P.ptr(8016,8023,1),new P.ptr(8025,8025,1),new P.ptr(8027,8027,1),new P.ptr(8029,8029,1),new P.ptr(8031,8061,1),new P.ptr(8064,8116,1),new P.ptr(8118,8132,1),new P.ptr(8134,8147,1),new P.ptr(8150,8155,1),new P.ptr(8157,8175,1),new P.ptr(8178,8180,1),new P.ptr(8182,8190,1),new P.ptr(8486,8486,1),new P.ptr(43877,43877,1)]),new IF([new Q.ptr(65856,65932,1),new Q.ptr(65952,65952,1),new Q.ptr(119296,119365,1)]),0);DA=new O.ptr(new IE([new P.ptr(2689,2691,1),new P.ptr(2693,2701,1),new P.ptr(2703,2705,1),new P.ptr(2707,2728,1),new P.ptr(2730,2736,1),new P.ptr(2738,2739,1),new P.ptr(2741,2745,1),new P.ptr(2748,2757,1),new P.ptr(2759,2761,1),new P.ptr(2763,2765,1),new P.ptr(2768,2768,1),new P.ptr(2784,2787,1),new P.ptr(2790,2801,1)]),IF.nil,0);DB=new O.ptr(new IE([new P.ptr(2561,2563,1),new P.ptr(2565,2570,1),new P.ptr(2575,2576,1),new P.ptr(2579,2600,1),new P.ptr(2602,2608,1),new P.ptr(2610,2611,1),new P.ptr(2613,2614,1),new P.ptr(2616,2617,1),new P.ptr(2620,2620,1),new P.ptr(2622,2626,1),new P.ptr(2631,2632,1),new P.ptr(2635,2637,1),new P.ptr(2641,2641,1),new P.ptr(2649,2652,1),new P.ptr(2654,2654,1),new P.ptr(2662,2677,1)]),IF.nil,0);DC=new O.ptr(new IE([new P.ptr(11904,11929,1),new P.ptr(11931,12019,1),new P.ptr(12032,12245,1),new P.ptr(12293,12293,1),new P.ptr(12295,12295,1),new P.ptr(12321,12329,1),new P.ptr(12344,12347,1),new P.ptr(13312,19893,1),new P.ptr(19968,40908,1),new P.ptr(63744,64109,1),new P.ptr(64112,64217,1)]),new IF([new Q.ptr(131072,173782,1),new Q.ptr(173824,177972,1),new Q.ptr(177984,178205,1),new Q.ptr(194560,195101,1)]),0);DD=new O.ptr(new IE([new P.ptr(4352,4607,1),new P.ptr(12334,12335,1),new P.ptr(12593,12686,1),new P.ptr(12800,12830,1),new P.ptr(12896,12926,1),new P.ptr(43360,43388,1),new P.ptr(44032,55203,1),new P.ptr(55216,55238,1),new P.ptr(55243,55291,1),new P.ptr(65440,65470,1),new P.ptr(65474,65479,1),new P.ptr(65482,65487,1),new P.ptr(65490,65495,1),new P.ptr(65498,65500,1)]),IF.nil,0);DE=new O.ptr(new IE([new P.ptr(5920,5940,1)]),IF.nil,0);DF=new O.ptr(new IE([new P.ptr(1425,1479,1),new P.ptr(1488,1514,1),new P.ptr(1520,1524,1),new P.ptr(64285,64310,1),new P.ptr(64312,64316,1),new P.ptr(64318,64318,1),new P.ptr(64320,64321,1),new P.ptr(64323,64324,1),new P.ptr(64326,64335,1)]),IF.nil,0);DG=new O.ptr(new IE([new P.ptr(12353,12438,1),new P.ptr(12445,12447,1)]),new IF([new Q.ptr(110593,110593,1),new Q.ptr(127488,127488,1)]),0);DH=new O.ptr(new IE([]),new IF([new Q.ptr(67648,67669,1),new Q.ptr(67671,67679,1)]),0);DI=new O.ptr(new IE([new P.ptr(768,879,1),new P.ptr(1157,1158,1),new P.ptr(1611,1621,1),new P.ptr(1648,1648,1),new P.ptr(2385,2386,1),new P.ptr(6832,6846,1),new P.ptr(7376,7378,1),new P.ptr(7380,7392,1),new P.ptr(7394,7400,1),new P.ptr(7405,7405,1),new P.ptr(7412,7412,1),new P.ptr(7416,7417,1),new P.ptr(7616,7669,1),new P.ptr(7676,7679,1),new P.ptr(8204,8205,1),new P.ptr(8400,8432,1),new P.ptr(12330,12333,1),new P.ptr(12441,12442,1),new P.ptr(65024,65039,1),new P.ptr(65056,65069,1)]),new IF([new Q.ptr(66045,66045,1),new Q.ptr(66272,66272,1),new Q.ptr(119143,119145,1),new Q.ptr(119163,119170,1),new Q.ptr(119173,119179,1),new Q.ptr(119210,119213,1),new Q.ptr(917760,917999,1)]),0);DJ=new O.ptr(new IE([]),new IF([new Q.ptr(68448,68466,1),new Q.ptr(68472,68479,1)]),0);DK=new O.ptr(new IE([]),new IF([new Q.ptr(68416,68437,1),new Q.ptr(68440,68447,1)]),0);DL=new O.ptr(new IE([new P.ptr(43392,43469,1),new P.ptr(43472,43481,1),new P.ptr(43486,43487,1)]),IF.nil,0);DM=new O.ptr(new IE([]),new IF([new Q.ptr(69760,69825,1)]),0);DN=new O.ptr(new IE([new P.ptr(3201,3203,1),new P.ptr(3205,3212,1),new P.ptr(3214,3216,1),new P.ptr(3218,3240,1),new P.ptr(3242,3251,1),new P.ptr(3253,3257,1),new P.ptr(3260,3268,1),new P.ptr(3270,3272,1),new P.ptr(3274,3277,1),new P.ptr(3285,3286,1),new P.ptr(3294,3294,1),new P.ptr(3296,3299,1),new P.ptr(3302,3311,1),new P.ptr(3313,3314,1)]),IF.nil,0);DO=new O.ptr(new IE([new P.ptr(12449,12538,1),new P.ptr(12541,12543,1),new P.ptr(12784,12799,1),new P.ptr(13008,13054,1),new P.ptr(13056,13143,1),new P.ptr(65382,65391,1),new P.ptr(65393,65437,1)]),new IF([new Q.ptr(110592,110592,1)]),0);DP=new O.ptr(new IE([new P.ptr(43264,43309,1),new P.ptr(43311,43311,1)]),IF.nil,0);DQ=new O.ptr(new IE([]),new IF([new Q.ptr(68096,68099,1),new Q.ptr(68101,68102,1),new Q.ptr(68108,68115,1),new Q.ptr(68117,68119,1),new Q.ptr(68121,68147,1),new Q.ptr(68152,68154,1),new Q.ptr(68159,68167,1),new Q.ptr(68176,68184,1)]),0);DR=new O.ptr(new IE([new P.ptr(6016,6109,1),new P.ptr(6112,6121,1),new P.ptr(6128,6137,1),new P.ptr(6624,6655,1)]),IF.nil,0);DS=new O.ptr(new IE([]),new IF([new Q.ptr(70144,70161,1),new Q.ptr(70163,70205,1)]),0);DT=new O.ptr(new IE([]),new IF([new Q.ptr(70320,70378,1),new Q.ptr(70384,70393,1)]),0);DU=new O.ptr(new IE([new P.ptr(3713,3714,1),new P.ptr(3716,3716,1),new P.ptr(3719,3720,1),new P.ptr(3722,3722,1),new P.ptr(3725,3725,1),new P.ptr(3732,3735,1),new P.ptr(3737,3743,1),new P.ptr(3745,3747,1),new P.ptr(3749,3749,1),new P.ptr(3751,3751,1),new P.ptr(3754,3755,1),new P.ptr(3757,3769,1),new P.ptr(3771,3773,1),new P.ptr(3776,3780,1),new P.ptr(3782,3782,1),new P.ptr(3784,3789,1),new P.ptr(3792,3801,1),new P.ptr(3804,3807,1)]),IF.nil,0);DV=new O.ptr(new IE([new P.ptr(65,90,1),new P.ptr(97,122,1),new P.ptr(170,170,1),new P.ptr(186,186,1),new P.ptr(192,214,1),new P.ptr(216,246,1),new P.ptr(248,696,1),new P.ptr(736,740,1),new P.ptr(7424,7461,1),new P.ptr(7468,7516,1),new P.ptr(7522,7525,1),new P.ptr(7531,7543,1),new P.ptr(7545,7614,1),new P.ptr(7680,7935,1),new P.ptr(8305,8305,1),new P.ptr(8319,8319,1),new P.ptr(8336,8348,1),new P.ptr(8490,8491,1),new P.ptr(8498,8498,1),new P.ptr(8526,8526,1),new P.ptr(8544,8584,1),new P.ptr(11360,11391,1),new P.ptr(42786,42887,1),new P.ptr(42891,42894,1),new P.ptr(42896,42925,1),new P.ptr(42928,42929,1),new P.ptr(42999,43007,1),new P.ptr(43824,43866,1),new P.ptr(43868,43871,1),new P.ptr(43876,43876,1),new P.ptr(64256,64262,1),new P.ptr(65313,65338,1),new P.ptr(65345,65370,1)]),IF.nil,6);DW=new O.ptr(new IE([new P.ptr(7168,7223,1),new P.ptr(7227,7241,1),new P.ptr(7245,7247,1)]),IF.nil,0);DX=new O.ptr(new IE([new P.ptr(6400,6430,1),new P.ptr(6432,6443,1),new P.ptr(6448,6459,1),new P.ptr(6464,6464,1),new P.ptr(6468,6479,1)]),IF.nil,0);DY=new O.ptr(new IE([]),new IF([new Q.ptr(67072,67382,1),new Q.ptr(67392,67413,1),new Q.ptr(67424,67431,1)]),0);DZ=new O.ptr(new IE([]),new IF([new Q.ptr(65536,65547,1),new Q.ptr(65549,65574,1),new Q.ptr(65576,65594,1),new Q.ptr(65596,65597,1),new Q.ptr(65599,65613,1),new Q.ptr(65616,65629,1),new Q.ptr(65664,65786,1)]),0);EA=new O.ptr(new IE([new P.ptr(42192,42239,1)]),IF.nil,0);EB=new O.ptr(new IE([]),new IF([new Q.ptr(66176,66204,1)]),0);EC=new O.ptr(new IE([]),new IF([new Q.ptr(67872,67897,1),new Q.ptr(67903,67903,1)]),0);ED=new O.ptr(new IE([]),new IF([new Q.ptr(69968,70006,1)]),0);EE=new O.ptr(new IE([new P.ptr(3329,3331,1),new P.ptr(3333,3340,1),new P.ptr(3342,3344,1),new P.ptr(3346,3386,1),new P.ptr(3389,3396,1),new P.ptr(3398,3400,1),new P.ptr(3402,3406,1),new P.ptr(3415,3415,1),new P.ptr(3424,3427,1),new P.ptr(3430,3445,1),new P.ptr(3449,3455,1)]),IF.nil,0);EF=new O.ptr(new IE([new P.ptr(2112,2139,1),new P.ptr(2142,2142,1)]),IF.nil,0);EG=new O.ptr(new IE([]),new IF([new Q.ptr(68288,68326,1),new Q.ptr(68331,68342,1)]),0);EH=new O.ptr(new IE([new P.ptr(43744,43766,1),new P.ptr(43968,44013,1),new P.ptr(44016,44025,1)]),IF.nil,0);EI=new O.ptr(new IE([]),new IF([new Q.ptr(124928,125124,1),new Q.ptr(125127,125142,1)]),0);EJ=new O.ptr(new IE([]),new IF([new Q.ptr(68000,68023,1),new Q.ptr(68030,68031,1)]),0);EK=new O.ptr(new IE([]),new IF([new Q.ptr(67968,67999,1)]),0);EL=new O.ptr(new IE([]),new IF([new Q.ptr(93952,94020,1),new Q.ptr(94032,94078,1),new Q.ptr(94095,94111,1)]),0);EM=new O.ptr(new IE([]),new IF([new Q.ptr(71168,71236,1),new Q.ptr(71248,71257,1)]),0);EN=new O.ptr(new IE([new P.ptr(6144,6145,1),new P.ptr(6148,6148,1),new P.ptr(6150,6158,1),new P.ptr(6160,6169,1),new P.ptr(6176,6263,1),new P.ptr(6272,6314,1)]),IF.nil,0);EO=new O.ptr(new IE([]),new IF([new Q.ptr(92736,92766,1),new Q.ptr(92768,92777,1),new Q.ptr(92782,92783,1)]),0);EP=new O.ptr(new IE([new P.ptr(4096,4255,1),new P.ptr(43488,43518,1),new P.ptr(43616,43647,1)]),IF.nil,0);EQ=new O.ptr(new IE([]),new IF([new Q.ptr(67712,67742,1),new Q.ptr(67751,67759,1)]),0);ER=new O.ptr(new IE([new P.ptr(6528,6571,1),new P.ptr(6576,6601,1),new P.ptr(6608,6618,1),new P.ptr(6622,6623,1)]),IF.nil,0);ES=new O.ptr(new IE([new P.ptr(1984,2042,1)]),IF.nil,0);ET=new O.ptr(new IE([new P.ptr(5760,5788,1)]),IF.nil,0);EU=new O.ptr(new IE([new P.ptr(7248,7295,1)]),IF.nil,0);EV=new O.ptr(new IE([]),new IF([new Q.ptr(66304,66339,1)]),0);EW=new O.ptr(new IE([]),new IF([new Q.ptr(68224,68255,1)]),0);EX=new O.ptr(new IE([]),new IF([new Q.ptr(66384,66426,1)]),0);EY=new O.ptr(new IE([]),new IF([new Q.ptr(66464,66499,1),new Q.ptr(66504,66517,1)]),0);EZ=new O.ptr(new IE([]),new IF([new Q.ptr(68192,68223,1)]),0);FA=new O.ptr(new IE([]),new IF([new Q.ptr(68608,68680,1)]),0);FB=new O.ptr(new IE([new P.ptr(2817,2819,1),new P.ptr(2821,2828,1),new P.ptr(2831,2832,1),new P.ptr(2835,2856,1),new P.ptr(2858,2864,1),new P.ptr(2866,2867,1),new P.ptr(2869,2873,1),new P.ptr(2876,2884,1),new P.ptr(2887,2888,1),new P.ptr(2891,2893,1),new P.ptr(2902,2903,1),new P.ptr(2908,2909,1),new P.ptr(2911,2915,1),new P.ptr(2918,2935,1)]),IF.nil,0);FC=new O.ptr(new IE([]),new IF([new Q.ptr(66688,66717,1),new Q.ptr(66720,66729,1)]),0);FD=new O.ptr(new IE([]),new IF([new Q.ptr(92928,92997,1),new Q.ptr(93008,93017,1),new Q.ptr(93019,93025,1),new Q.ptr(93027,93047,1),new Q.ptr(93053,93071,1)]),0);FE=new O.ptr(new IE([]),new IF([new Q.ptr(67680,67711,1)]),0);FF=new O.ptr(new IE([]),new IF([new Q.ptr(72384,72440,1)]),0);FG=new O.ptr(new IE([new P.ptr(43072,43127,1)]),IF.nil,0);FH=new O.ptr(new IE([]),new IF([new Q.ptr(67840,67867,1),new Q.ptr(67871,67871,1)]),0);FI=new O.ptr(new IE([]),new IF([new Q.ptr(68480,68497,1),new Q.ptr(68505,68508,1),new Q.ptr(68521,68527,1)]),0);FJ=new O.ptr(new IE([new P.ptr(43312,43347,1),new P.ptr(43359,43359,1)]),IF.nil,0);FK=new O.ptr(new IE([new P.ptr(5792,5866,1),new P.ptr(5870,5880,1)]),IF.nil,0);FL=new O.ptr(new IE([new P.ptr(2048,2093,1),new P.ptr(2096,2110,1)]),IF.nil,0);FM=new O.ptr(new IE([new P.ptr(43136,43204,1),new P.ptr(43214,43225,1)]),IF.nil,0);FN=new O.ptr(new IE([]),new IF([new Q.ptr(70016,70088,1),new Q.ptr(70093,70093,1),new Q.ptr(70096,70106,1)]),0);FO=new O.ptr(new IE([]),new IF([new Q.ptr(66640,66687,1)]),0);FP=new O.ptr(new IE([]),new IF([new Q.ptr(71040,71093,1),new Q.ptr(71096,71113,1)]),0);FQ=new O.ptr(new IE([new P.ptr(3458,3459,1),new P.ptr(3461,3478,1),new P.ptr(3482,3505,1),new P.ptr(3507,3515,1),new P.ptr(3517,3517,1),new P.ptr(3520,3526,1),new P.ptr(3530,3530,1),new P.ptr(3535,3540,1),new P.ptr(3542,3542,1),new P.ptr(3544,3551,1),new P.ptr(3558,3567,1),new P.ptr(3570,3572,1)]),new IF([new Q.ptr(70113,70132,1)]),0);FR=new O.ptr(new IE([]),new IF([new Q.ptr(69840,69864,1),new Q.ptr(69872,69881,1)]),0);FS=new O.ptr(new IE([new P.ptr(7040,7103,1),new P.ptr(7360,7367,1)]),IF.nil,0);FT=new O.ptr(new IE([new P.ptr(43008,43051,1)]),IF.nil,0);FU=new O.ptr(new IE([new P.ptr(1792,1805,1),new P.ptr(1807,1866,1),new P.ptr(1869,1871,1)]),IF.nil,0);FV=new O.ptr(new IE([new P.ptr(5888,5900,1),new P.ptr(5902,5908,1)]),IF.nil,0);FW=new O.ptr(new IE([new P.ptr(5984,5996,1),new P.ptr(5998,6000,1),new P.ptr(6002,6003,1)]),IF.nil,0);FX=new O.ptr(new IE([new P.ptr(6480,6509,1),new P.ptr(6512,6516,1)]),IF.nil,0);FY=new O.ptr(new IE([new P.ptr(6688,6750,1),new P.ptr(6752,6780,1),new P.ptr(6783,6793,1),new P.ptr(6800,6809,1),new P.ptr(6816,6829,1)]),IF.nil,0);FZ=new O.ptr(new IE([new P.ptr(43648,43714,1),new P.ptr(43739,43743,1)]),IF.nil,0);GA=new O.ptr(new IE([]),new IF([new Q.ptr(71296,71351,1),new Q.ptr(71360,71369,1)]),0);GB=new O.ptr(new IE([new P.ptr(2946,2947,1),new P.ptr(2949,2954,1),new P.ptr(2958,2960,1),new P.ptr(2962,2965,1),new P.ptr(2969,2970,1),new P.ptr(2972,2972,1),new P.ptr(2974,2975,1),new P.ptr(2979,2980,1),new P.ptr(2984,2986,1),new P.ptr(2990,3001,1),new P.ptr(3006,3010,1),new P.ptr(3014,3016,1),new P.ptr(3018,3021,1),new P.ptr(3024,3024,1),new P.ptr(3031,3031,1),new P.ptr(3046,3066,1)]),IF.nil,0);GC=new O.ptr(new IE([new P.ptr(3072,3075,1),new P.ptr(3077,3084,1),new P.ptr(3086,3088,1),new P.ptr(3090,3112,1),new P.ptr(3114,3129,1),new P.ptr(3133,3140,1),new P.ptr(3142,3144,1),new P.ptr(3146,3149,1),new P.ptr(3157,3158,1),new P.ptr(3160,3161,1),new P.ptr(3168,3171,1),new P.ptr(3174,3183,1),new P.ptr(3192,3199,1)]),IF.nil,0);GD=new O.ptr(new IE([new P.ptr(1920,1969,1)]),IF.nil,0);GE=new O.ptr(new IE([new P.ptr(3585,3642,1),new P.ptr(3648,3675,1)]),IF.nil,0);GF=new O.ptr(new IE([new P.ptr(3840,3911,1),new P.ptr(3913,3948,1),new P.ptr(3953,3991,1),new P.ptr(3993,4028,1),new P.ptr(4030,4044,1),new P.ptr(4046,4052,1),new P.ptr(4057,4058,1)]),IF.nil,0);GG=new O.ptr(new IE([new P.ptr(11568,11623,1),new P.ptr(11631,11632,1),new P.ptr(11647,11647,1)]),IF.nil,0);GH=new O.ptr(new IE([]),new IF([new Q.ptr(70784,70855,1),new Q.ptr(70864,70873,1)]),0);GI=new O.ptr(new IE([]),new IF([new Q.ptr(66432,66461,1),new Q.ptr(66463,66463,1)]),0);GJ=new O.ptr(new IE([new P.ptr(42240,42539,1)]),IF.nil,0);GK=new O.ptr(new IE([]),new IF([new Q.ptr(71840,71922,1),new Q.ptr(71935,71935,1)]),0);GL=new O.ptr(new IE([new P.ptr(40960,42124,1),new P.ptr(42128,42182,1)]),IF.nil,0);$pkg.Arabic=BR;$pkg.Armenian=BS;$pkg.Avestan=BT;$pkg.Balinese=BU;$pkg.Bamum=BV;$pkg.Bassa_Vah=BW;$pkg.Batak=BX;$pkg.Bengali=BY;$pkg.Bopomofo=BZ;$pkg.Brahmi=CA;$pkg.Braille=CB;$pkg.Buginese=CC;$pkg.Buhid=CD;$pkg.Canadian_Aboriginal=CE;$pkg.Carian=CF;$pkg.Caucasian_Albanian=CG;$pkg.Chakma=CH;$pkg.Cham=CI;$pkg.Cherokee=CJ;$pkg.Common=CK;$pkg.Coptic=CL;$pkg.Cuneiform=CM;$pkg.Cypriot=CN;$pkg.Cyrillic=CO;$pkg.Deseret=CP;$pkg.Devanagari=CQ;$pkg.Duployan=CR;$pkg.Egyptian_Hieroglyphs=CS;$pkg.Elbasan=CT;$pkg.Ethiopic=CU;$pkg.Georgian=CV;$pkg.Glagolitic=CW;$pkg.Gothic=CX;$pkg.Grantha=CY;$pkg.Greek=CZ;$pkg.Gujarati=DA;$pkg.Gurmukhi=DB;$pkg.Han=DC;$pkg.Hangul=DD;$pkg.Hanunoo=DE;$pkg.Hebrew=DF;$pkg.Hiragana=DG;$pkg.Imperial_Aramaic=DH;$pkg.Inherited=DI;$pkg.Inscriptional_Pahlavi=DJ;$pkg.Inscriptional_Parthian=DK;$pkg.Javanese=DL;$pkg.Kaithi=DM;$pkg.Kannada=DN;$pkg.Katakana=DO;$pkg.Kayah_Li=DP;$pkg.Kharoshthi=DQ;$pkg.Khmer=DR;$pkg.Khojki=DS;$pkg.Khudawadi=DT;$pkg.Lao=DU;$pkg.Latin=DV;$pkg.Lepcha=DW;$pkg.Limbu=DX;$pkg.Linear_A=DY;$pkg.Linear_B=DZ;$pkg.Lisu=EA;$pkg.Lycian=EB;$pkg.Lydian=EC;$pkg.Mahajani=ED;$pkg.Malayalam=EE;$pkg.Mandaic=EF;$pkg.Manichaean=EG;$pkg.Meetei_Mayek=EH;$pkg.Mende_Kikakui=EI;$pkg.Meroitic_Cursive=EJ;$pkg.Meroitic_Hieroglyphs=EK;$pkg.Miao=EL;$pkg.Modi=EM;$pkg.Mongolian=EN;$pkg.Mro=EO;$pkg.Myanmar=EP;$pkg.Nabataean=EQ;$pkg.New_Tai_Lue=ER;$pkg.Nko=ES;$pkg.Ogham=ET;$pkg.Ol_Chiki=EU;$pkg.Old_Italic=EV;$pkg.Old_North_Arabian=EW;$pkg.Old_Permic=EX;$pkg.Old_Persian=EY;$pkg.Old_South_Arabian=EZ;$pkg.Old_Turkic=FA;$pkg.Oriya=FB;$pkg.Osmanya=FC;$pkg.Pahawh_Hmong=FD;$pkg.Palmyrene=FE;$pkg.Pau_Cin_Hau=FF;$pkg.Phags_Pa=FG;$pkg.Phoenician=FH;$pkg.Psalter_Pahlavi=FI;$pkg.Rejang=FJ;$pkg.Runic=FK;$pkg.Samaritan=FL;$pkg.Saurashtra=FM;$pkg.Sharada=FN;$pkg.Shavian=FO;$pkg.Siddham=FP;$pkg.Sinhala=FQ;$pkg.Sora_Sompeng=FR;$pkg.Sundanese=FS;$pkg.Syloti_Nagri=FT;$pkg.Syriac=FU;$pkg.Tagalog=FV;$pkg.Tagbanwa=FW;$pkg.Tai_Le=FX;$pkg.Tai_Tham=FY;$pkg.Tai_Viet=FZ;$pkg.Takri=GA;$pkg.Tamil=GB;$pkg.Telugu=GC;$pkg.Thaana=GD;$pkg.Thai=GE;$pkg.Tibetan=GF;$pkg.Tifinagh=GG;$pkg.Tirhuta=GH;$pkg.Ugaritic=GI;$pkg.Vai=GJ;$pkg.Warang_Citi=GK;$pkg.Yi=GL;$pkg.Scripts=(d=new $Map(),e="Arabic",d[e]={k:e,v:$pkg.Arabic},e="Armenian",d[e]={k:e,v:$pkg.Armenian},e="Avestan",d[e]={k:e,v:$pkg.Avestan},e="Balinese",d[e]={k:e,v:$pkg.Balinese},e="Bamum",d[e]={k:e,v:$pkg.Bamum},e="Bassa_Vah",d[e]={k:e,v:$pkg.Bassa_Vah},e="Batak",d[e]={k:e,v:$pkg.Batak},e="Bengali",d[e]={k:e,v:$pkg.Bengali},e="Bopomofo",d[e]={k:e,v:$pkg.Bopomofo},e="Brahmi",d[e]={k:e,v:$pkg.Brahmi},e="Braille",d[e]={k:e,v:$pkg.Braille},e="Buginese",d[e]={k:e,v:$pkg.Buginese},e="Buhid",d[e]={k:e,v:$pkg.Buhid},e="Canadian_Aboriginal",d[e]={k:e,v:$pkg.Canadian_Aboriginal},e="Carian",d[e]={k:e,v:$pkg.Carian},e="Caucasian_Albanian",d[e]={k:e,v:$pkg.Caucasian_Albanian},e="Chakma",d[e]={k:e,v:$pkg.Chakma},e="Cham",d[e]={k:e,v:$pkg.Cham},e="Cherokee",d[e]={k:e,v:$pkg.Cherokee},e="Common",d[e]={k:e,v:$pkg.Common},e="Coptic",d[e]={k:e,v:$pkg.Coptic},e="Cuneiform",d[e]={k:e,v:$pkg.Cuneiform},e="Cypriot",d[e]={k:e,v:$pkg.Cypriot},e="Cyrillic",d[e]={k:e,v:$pkg.Cyrillic},e="Deseret",d[e]={k:e,v:$pkg.Deseret},e="Devanagari",d[e]={k:e,v:$pkg.Devanagari},e="Duployan",d[e]={k:e,v:$pkg.Duployan},e="Egyptian_Hieroglyphs",d[e]={k:e,v:$pkg.Egyptian_Hieroglyphs},e="Elbasan",d[e]={k:e,v:$pkg.Elbasan},e="Ethiopic",d[e]={k:e,v:$pkg.Ethiopic},e="Georgian",d[e]={k:e,v:$pkg.Georgian},e="Glagolitic",d[e]={k:e,v:$pkg.Glagolitic},e="Gothic",d[e]={k:e,v:$pkg.Gothic},e="Grantha",d[e]={k:e,v:$pkg.Grantha},e="Greek",d[e]={k:e,v:$pkg.Greek},e="Gujarati",d[e]={k:e,v:$pkg.Gujarati},e="Gurmukhi",d[e]={k:e,v:$pkg.Gurmukhi},e="Han",d[e]={k:e,v:$pkg.Han},e="Hangul",d[e]={k:e,v:$pkg.Hangul},e="Hanunoo",d[e]={k:e,v:$pkg.Hanunoo},e="Hebrew",d[e]={k:e,v:$pkg.Hebrew},e="Hiragana",d[e]={k:e,v:$pkg.Hiragana},e="Imperial_Aramaic",d[e]={k:e,v:$pkg.Imperial_Aramaic},e="Inherited",d[e]={k:e,v:$pkg.Inherited},e="Inscriptional_Pahlavi",d[e]={k:e,v:$pkg.Inscriptional_Pahlavi},e="Inscriptional_Parthian",d[e]={k:e,v:$pkg.Inscriptional_Parthian},e="Javanese",d[e]={k:e,v:$pkg.Javanese},e="Kaithi",d[e]={k:e,v:$pkg.Kaithi},e="Kannada",d[e]={k:e,v:$pkg.Kannada},e="Katakana",d[e]={k:e,v:$pkg.Katakana},e="Kayah_Li",d[e]={k:e,v:$pkg.Kayah_Li},e="Kharoshthi",d[e]={k:e,v:$pkg.Kharoshthi},e="Khmer",d[e]={k:e,v:$pkg.Khmer},e="Khojki",d[e]={k:e,v:$pkg.Khojki},e="Khudawadi",d[e]={k:e,v:$pkg.Khudawadi},e="Lao",d[e]={k:e,v:$pkg.Lao},e="Latin",d[e]={k:e,v:$pkg.Latin},e="Lepcha",d[e]={k:e,v:$pkg.Lepcha},e="Limbu",d[e]={k:e,v:$pkg.Limbu},e="Linear_A",d[e]={k:e,v:$pkg.Linear_A},e="Linear_B",d[e]={k:e,v:$pkg.Linear_B},e="Lisu",d[e]={k:e,v:$pkg.Lisu},e="Lycian",d[e]={k:e,v:$pkg.Lycian},e="Lydian",d[e]={k:e,v:$pkg.Lydian},e="Mahajani",d[e]={k:e,v:$pkg.Mahajani},e="Malayalam",d[e]={k:e,v:$pkg.Malayalam},e="Mandaic",d[e]={k:e,v:$pkg.Mandaic},e="Manichaean",d[e]={k:e,v:$pkg.Manichaean},e="Meetei_Mayek",d[e]={k:e,v:$pkg.Meetei_Mayek},e="Mende_Kikakui",d[e]={k:e,v:$pkg.Mende_Kikakui},e="Meroitic_Cursive",d[e]={k:e,v:$pkg.Meroitic_Cursive},e="Meroitic_Hieroglyphs",d[e]={k:e,v:$pkg.Meroitic_Hieroglyphs},e="Miao",d[e]={k:e,v:$pkg.Miao},e="Modi",d[e]={k:e,v:$pkg.Modi},e="Mongolian",d[e]={k:e,v:$pkg.Mongolian},e="Mro",d[e]={k:e,v:$pkg.Mro},e="Myanmar",d[e]={k:e,v:$pkg.Myanmar},e="Nabataean",d[e]={k:e,v:$pkg.Nabataean},e="New_Tai_Lue",d[e]={k:e,v:$pkg.New_Tai_Lue},e="Nko",d[e]={k:e,v:$pkg.Nko},e="Ogham",d[e]={k:e,v:$pkg.Ogham},e="Ol_Chiki",d[e]={k:e,v:$pkg.Ol_Chiki},e="Old_Italic",d[e]={k:e,v:$pkg.Old_Italic},e="Old_North_Arabian",d[e]={k:e,v:$pkg.Old_North_Arabian},e="Old_Permic",d[e]={k:e,v:$pkg.Old_Permic},e="Old_Persian",d[e]={k:e,v:$pkg.Old_Persian},e="Old_South_Arabian",d[e]={k:e,v:$pkg.Old_South_Arabian},e="Old_Turkic",d[e]={k:e,v:$pkg.Old_Turkic},e="Oriya",d[e]={k:e,v:$pkg.Oriya},e="Osmanya",d[e]={k:e,v:$pkg.Osmanya},e="Pahawh_Hmong",d[e]={k:e,v:$pkg.Pahawh_Hmong},e="Palmyrene",d[e]={k:e,v:$pkg.Palmyrene},e="Pau_Cin_Hau",d[e]={k:e,v:$pkg.Pau_Cin_Hau},e="Phags_Pa",d[e]={k:e,v:$pkg.Phags_Pa},e="Phoenician",d[e]={k:e,v:$pkg.Phoenician},e="Psalter_Pahlavi",d[e]={k:e,v:$pkg.Psalter_Pahlavi},e="Rejang",d[e]={k:e,v:$pkg.Rejang},e="Runic",d[e]={k:e,v:$pkg.Runic},e="Samaritan",d[e]={k:e,v:$pkg.Samaritan},e="Saurashtra",d[e]={k:e,v:$pkg.Saurashtra},e="Sharada",d[e]={k:e,v:$pkg.Sharada},e="Shavian",d[e]={k:e,v:$pkg.Shavian},e="Siddham",d[e]={k:e,v:$pkg.Siddham},e="Sinhala",d[e]={k:e,v:$pkg.Sinhala},e="Sora_Sompeng",d[e]={k:e,v:$pkg.Sora_Sompeng},e="Sundanese",d[e]={k:e,v:$pkg.Sundanese},e="Syloti_Nagri",d[e]={k:e,v:$pkg.Syloti_Nagri},e="Syriac",d[e]={k:e,v:$pkg.Syriac},e="Tagalog",d[e]={k:e,v:$pkg.Tagalog},e="Tagbanwa",d[e]={k:e,v:$pkg.Tagbanwa},e="Tai_Le",d[e]={k:e,v:$pkg.Tai_Le},e="Tai_Tham",d[e]={k:e,v:$pkg.Tai_Tham},e="Tai_Viet",d[e]={k:e,v:$pkg.Tai_Viet},e="Takri",d[e]={k:e,v:$pkg.Takri},e="Tamil",d[e]={k:e,v:$pkg.Tamil},e="Telugu",d[e]={k:e,v:$pkg.Telugu},e="Thaana",d[e]={k:e,v:$pkg.Thaana},e="Thai",d[e]={k:e,v:$pkg.Thai},e="Tibetan",d[e]={k:e,v:$pkg.Tibetan},e="Tifinagh",d[e]={k:e,v:$pkg.Tifinagh},e="Tirhuta",d[e]={k:e,v:$pkg.Tirhuta},e="Ugaritic",d[e]={k:e,v:$pkg.Ugaritic},e="Vai",d[e]={k:e,v:$pkg.Vai},e="Warang_Citi",d[e]={k:e,v:$pkg.Warang_Citi},e="Yi",d[e]={k:e,v:$pkg.Yi},d);HR=new O.ptr(new IE([new P.ptr(9,13,1),new P.ptr(32,32,1),new P.ptr(133,133,1),new P.ptr(160,160,1),new P.ptr(5760,5760,1),new P.ptr(8192,8202,1),new P.ptr(8232,8233,1),new P.ptr(8239,8239,1),new P.ptr(8287,8287,1),new P.ptr(12288,12288,1)]),IF.nil,4);$pkg.White_Space=HR;HS=new II([new R.ptr(65,90,$toNativeArray($kindInt32,[0,32,0])),new R.ptr(97,122,$toNativeArray($kindInt32,[-32,0,-32])),new R.ptr(181,181,$toNativeArray($kindInt32,[743,0,743])),new R.ptr(192,214,$toNativeArray($kindInt32,[0,32,0])),new R.ptr(216,222,$toNativeArray($kindInt32,[0,32,0])),new R.ptr(224,246,$toNativeArray($kindInt32,[-32,0,-32])),new R.ptr(248,254,$toNativeArray($kindInt32,[-32,0,-32])),new R.ptr(255,255,$toNativeArray($kindInt32,[121,0,121])),new R.ptr(256,303,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(304,304,$toNativeArray($kindInt32,[0,-199,0])),new R.ptr(305,305,$toNativeArray($kindInt32,[-232,0,-232])),new R.ptr(306,311,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(313,328,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(330,375,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(376,376,$toNativeArray($kindInt32,[0,-121,0])),new R.ptr(377,382,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(383,383,$toNativeArray($kindInt32,[-300,0,-300])),new R.ptr(384,384,$toNativeArray($kindInt32,[195,0,195])),new R.ptr(385,385,$toNativeArray($kindInt32,[0,210,0])),new R.ptr(386,389,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(390,390,$toNativeArray($kindInt32,[0,206,0])),new R.ptr(391,392,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(393,394,$toNativeArray($kindInt32,[0,205,0])),new R.ptr(395,396,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(398,398,$toNativeArray($kindInt32,[0,79,0])),new R.ptr(399,399,$toNativeArray($kindInt32,[0,202,0])),new R.ptr(400,400,$toNativeArray($kindInt32,[0,203,0])),new R.ptr(401,402,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(403,403,$toNativeArray($kindInt32,[0,205,0])),new R.ptr(404,404,$toNativeArray($kindInt32,[0,207,0])),new R.ptr(405,405,$toNativeArray($kindInt32,[97,0,97])),new R.ptr(406,406,$toNativeArray($kindInt32,[0,211,0])),new R.ptr(407,407,$toNativeArray($kindInt32,[0,209,0])),new R.ptr(408,409,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(410,410,$toNativeArray($kindInt32,[163,0,163])),new R.ptr(412,412,$toNativeArray($kindInt32,[0,211,0])),new R.ptr(413,413,$toNativeArray($kindInt32,[0,213,0])),new R.ptr(414,414,$toNativeArray($kindInt32,[130,0,130])),new R.ptr(415,415,$toNativeArray($kindInt32,[0,214,0])),new R.ptr(416,421,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(422,422,$toNativeArray($kindInt32,[0,218,0])),new R.ptr(423,424,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(425,425,$toNativeArray($kindInt32,[0,218,0])),new R.ptr(428,429,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(430,430,$toNativeArray($kindInt32,[0,218,0])),new R.ptr(431,432,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(433,434,$toNativeArray($kindInt32,[0,217,0])),new R.ptr(435,438,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(439,439,$toNativeArray($kindInt32,[0,219,0])),new R.ptr(440,441,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(444,445,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(447,447,$toNativeArray($kindInt32,[56,0,56])),new R.ptr(452,452,$toNativeArray($kindInt32,[0,2,1])),new R.ptr(453,453,$toNativeArray($kindInt32,[-1,1,0])),new R.ptr(454,454,$toNativeArray($kindInt32,[-2,0,-1])),new R.ptr(455,455,$toNativeArray($kindInt32,[0,2,1])),new R.ptr(456,456,$toNativeArray($kindInt32,[-1,1,0])),new R.ptr(457,457,$toNativeArray($kindInt32,[-2,0,-1])),new R.ptr(458,458,$toNativeArray($kindInt32,[0,2,1])),new R.ptr(459,459,$toNativeArray($kindInt32,[-1,1,0])),new R.ptr(460,460,$toNativeArray($kindInt32,[-2,0,-1])),new R.ptr(461,476,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(477,477,$toNativeArray($kindInt32,[-79,0,-79])),new R.ptr(478,495,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(497,497,$toNativeArray($kindInt32,[0,2,1])),new R.ptr(498,498,$toNativeArray($kindInt32,[-1,1,0])),new R.ptr(499,499,$toNativeArray($kindInt32,[-2,0,-1])),new R.ptr(500,501,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(502,502,$toNativeArray($kindInt32,[0,-97,0])),new R.ptr(503,503,$toNativeArray($kindInt32,[0,-56,0])),new R.ptr(504,543,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(544,544,$toNativeArray($kindInt32,[0,-130,0])),new R.ptr(546,563,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(570,570,$toNativeArray($kindInt32,[0,10795,0])),new R.ptr(571,572,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(573,573,$toNativeArray($kindInt32,[0,-163,0])),new R.ptr(574,574,$toNativeArray($kindInt32,[0,10792,0])),new R.ptr(575,576,$toNativeArray($kindInt32,[10815,0,10815])),new R.ptr(577,578,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(579,579,$toNativeArray($kindInt32,[0,-195,0])),new R.ptr(580,580,$toNativeArray($kindInt32,[0,69,0])),new R.ptr(581,581,$toNativeArray($kindInt32,[0,71,0])),new R.ptr(582,591,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(592,592,$toNativeArray($kindInt32,[10783,0,10783])),new R.ptr(593,593,$toNativeArray($kindInt32,[10780,0,10780])),new R.ptr(594,594,$toNativeArray($kindInt32,[10782,0,10782])),new R.ptr(595,595,$toNativeArray($kindInt32,[-210,0,-210])),new R.ptr(596,596,$toNativeArray($kindInt32,[-206,0,-206])),new R.ptr(598,599,$toNativeArray($kindInt32,[-205,0,-205])),new R.ptr(601,601,$toNativeArray($kindInt32,[-202,0,-202])),new R.ptr(603,603,$toNativeArray($kindInt32,[-203,0,-203])),new R.ptr(604,604,$toNativeArray($kindInt32,[42319,0,42319])),new R.ptr(608,608,$toNativeArray($kindInt32,[-205,0,-205])),new R.ptr(609,609,$toNativeArray($kindInt32,[42315,0,42315])),new R.ptr(611,611,$toNativeArray($kindInt32,[-207,0,-207])),new R.ptr(613,613,$toNativeArray($kindInt32,[42280,0,42280])),new R.ptr(614,614,$toNativeArray($kindInt32,[42308,0,42308])),new R.ptr(616,616,$toNativeArray($kindInt32,[-209,0,-209])),new R.ptr(617,617,$toNativeArray($kindInt32,[-211,0,-211])),new R.ptr(619,619,$toNativeArray($kindInt32,[10743,0,10743])),new R.ptr(620,620,$toNativeArray($kindInt32,[42305,0,42305])),new R.ptr(623,623,$toNativeArray($kindInt32,[-211,0,-211])),new R.ptr(625,625,$toNativeArray($kindInt32,[10749,0,10749])),new R.ptr(626,626,$toNativeArray($kindInt32,[-213,0,-213])),new R.ptr(629,629,$toNativeArray($kindInt32,[-214,0,-214])),new R.ptr(637,637,$toNativeArray($kindInt32,[10727,0,10727])),new R.ptr(640,640,$toNativeArray($kindInt32,[-218,0,-218])),new R.ptr(643,643,$toNativeArray($kindInt32,[-218,0,-218])),new R.ptr(647,647,$toNativeArray($kindInt32,[42282,0,42282])),new R.ptr(648,648,$toNativeArray($kindInt32,[-218,0,-218])),new R.ptr(649,649,$toNativeArray($kindInt32,[-69,0,-69])),new R.ptr(650,651,$toNativeArray($kindInt32,[-217,0,-217])),new R.ptr(652,652,$toNativeArray($kindInt32,[-71,0,-71])),new R.ptr(658,658,$toNativeArray($kindInt32,[-219,0,-219])),new R.ptr(670,670,$toNativeArray($kindInt32,[42258,0,42258])),new R.ptr(837,837,$toNativeArray($kindInt32,[84,0,84])),new R.ptr(880,883,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(886,887,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(891,893,$toNativeArray($kindInt32,[130,0,130])),new R.ptr(895,895,$toNativeArray($kindInt32,[0,116,0])),new R.ptr(902,902,$toNativeArray($kindInt32,[0,38,0])),new R.ptr(904,906,$toNativeArray($kindInt32,[0,37,0])),new R.ptr(908,908,$toNativeArray($kindInt32,[0,64,0])),new R.ptr(910,911,$toNativeArray($kindInt32,[0,63,0])),new R.ptr(913,929,$toNativeArray($kindInt32,[0,32,0])),new R.ptr(931,939,$toNativeArray($kindInt32,[0,32,0])),new R.ptr(940,940,$toNativeArray($kindInt32,[-38,0,-38])),new R.ptr(941,943,$toNativeArray($kindInt32,[-37,0,-37])),new R.ptr(945,961,$toNativeArray($kindInt32,[-32,0,-32])),new R.ptr(962,962,$toNativeArray($kindInt32,[-31,0,-31])),new R.ptr(963,971,$toNativeArray($kindInt32,[-32,0,-32])),new R.ptr(972,972,$toNativeArray($kindInt32,[-64,0,-64])),new R.ptr(973,974,$toNativeArray($kindInt32,[-63,0,-63])),new R.ptr(975,975,$toNativeArray($kindInt32,[0,8,0])),new R.ptr(976,976,$toNativeArray($kindInt32,[-62,0,-62])),new R.ptr(977,977,$toNativeArray($kindInt32,[-57,0,-57])),new R.ptr(981,981,$toNativeArray($kindInt32,[-47,0,-47])),new R.ptr(982,982,$toNativeArray($kindInt32,[-54,0,-54])),new R.ptr(983,983,$toNativeArray($kindInt32,[-8,0,-8])),new R.ptr(984,1007,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(1008,1008,$toNativeArray($kindInt32,[-86,0,-86])),new R.ptr(1009,1009,$toNativeArray($kindInt32,[-80,0,-80])),new R.ptr(1010,1010,$toNativeArray($kindInt32,[7,0,7])),new R.ptr(1011,1011,$toNativeArray($kindInt32,[-116,0,-116])),new R.ptr(1012,1012,$toNativeArray($kindInt32,[0,-60,0])),new R.ptr(1013,1013,$toNativeArray($kindInt32,[-96,0,-96])),new R.ptr(1015,1016,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(1017,1017,$toNativeArray($kindInt32,[0,-7,0])),new R.ptr(1018,1019,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(1021,1023,$toNativeArray($kindInt32,[0,-130,0])),new R.ptr(1024,1039,$toNativeArray($kindInt32,[0,80,0])),new R.ptr(1040,1071,$toNativeArray($kindInt32,[0,32,0])),new R.ptr(1072,1103,$toNativeArray($kindInt32,[-32,0,-32])),new R.ptr(1104,1119,$toNativeArray($kindInt32,[-80,0,-80])),new R.ptr(1120,1153,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(1162,1215,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(1216,1216,$toNativeArray($kindInt32,[0,15,0])),new R.ptr(1217,1230,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(1231,1231,$toNativeArray($kindInt32,[-15,0,-15])),new R.ptr(1232,1327,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(1329,1366,$toNativeArray($kindInt32,[0,48,0])),new R.ptr(1377,1414,$toNativeArray($kindInt32,[-48,0,-48])),new R.ptr(4256,4293,$toNativeArray($kindInt32,[0,7264,0])),new R.ptr(4295,4295,$toNativeArray($kindInt32,[0,7264,0])),new R.ptr(4301,4301,$toNativeArray($kindInt32,[0,7264,0])),new R.ptr(7545,7545,$toNativeArray($kindInt32,[35332,0,35332])),new R.ptr(7549,7549,$toNativeArray($kindInt32,[3814,0,3814])),new R.ptr(7680,7829,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(7835,7835,$toNativeArray($kindInt32,[-59,0,-59])),new R.ptr(7838,7838,$toNativeArray($kindInt32,[0,-7615,0])),new R.ptr(7840,7935,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(7936,7943,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(7944,7951,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(7952,7957,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(7960,7965,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(7968,7975,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(7976,7983,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(7984,7991,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(7992,7999,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(8000,8005,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(8008,8013,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(8017,8017,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(8019,8019,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(8021,8021,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(8023,8023,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(8025,8025,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(8027,8027,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(8029,8029,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(8031,8031,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(8032,8039,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(8040,8047,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(8048,8049,$toNativeArray($kindInt32,[74,0,74])),new R.ptr(8050,8053,$toNativeArray($kindInt32,[86,0,86])),new R.ptr(8054,8055,$toNativeArray($kindInt32,[100,0,100])),new R.ptr(8056,8057,$toNativeArray($kindInt32,[128,0,128])),new R.ptr(8058,8059,$toNativeArray($kindInt32,[112,0,112])),new R.ptr(8060,8061,$toNativeArray($kindInt32,[126,0,126])),new R.ptr(8064,8071,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(8072,8079,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(8080,8087,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(8088,8095,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(8096,8103,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(8104,8111,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(8112,8113,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(8115,8115,$toNativeArray($kindInt32,[9,0,9])),new R.ptr(8120,8121,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(8122,8123,$toNativeArray($kindInt32,[0,-74,0])),new R.ptr(8124,8124,$toNativeArray($kindInt32,[0,-9,0])),new R.ptr(8126,8126,$toNativeArray($kindInt32,[-7205,0,-7205])),new R.ptr(8131,8131,$toNativeArray($kindInt32,[9,0,9])),new R.ptr(8136,8139,$toNativeArray($kindInt32,[0,-86,0])),new R.ptr(8140,8140,$toNativeArray($kindInt32,[0,-9,0])),new R.ptr(8144,8145,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(8152,8153,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(8154,8155,$toNativeArray($kindInt32,[0,-100,0])),new R.ptr(8160,8161,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(8165,8165,$toNativeArray($kindInt32,[7,0,7])),new R.ptr(8168,8169,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(8170,8171,$toNativeArray($kindInt32,[0,-112,0])),new R.ptr(8172,8172,$toNativeArray($kindInt32,[0,-7,0])),new R.ptr(8179,8179,$toNativeArray($kindInt32,[9,0,9])),new R.ptr(8184,8185,$toNativeArray($kindInt32,[0,-128,0])),new R.ptr(8186,8187,$toNativeArray($kindInt32,[0,-126,0])),new R.ptr(8188,8188,$toNativeArray($kindInt32,[0,-9,0])),new R.ptr(8486,8486,$toNativeArray($kindInt32,[0,-7517,0])),new R.ptr(8490,8490,$toNativeArray($kindInt32,[0,-8383,0])),new R.ptr(8491,8491,$toNativeArray($kindInt32,[0,-8262,0])),new R.ptr(8498,8498,$toNativeArray($kindInt32,[0,28,0])),new R.ptr(8526,8526,$toNativeArray($kindInt32,[-28,0,-28])),new R.ptr(8544,8559,$toNativeArray($kindInt32,[0,16,0])),new R.ptr(8560,8575,$toNativeArray($kindInt32,[-16,0,-16])),new R.ptr(8579,8580,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(9398,9423,$toNativeArray($kindInt32,[0,26,0])),new R.ptr(9424,9449,$toNativeArray($kindInt32,[-26,0,-26])),new R.ptr(11264,11310,$toNativeArray($kindInt32,[0,48,0])),new R.ptr(11312,11358,$toNativeArray($kindInt32,[-48,0,-48])),new R.ptr(11360,11361,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(11362,11362,$toNativeArray($kindInt32,[0,-10743,0])),new R.ptr(11363,11363,$toNativeArray($kindInt32,[0,-3814,0])),new R.ptr(11364,11364,$toNativeArray($kindInt32,[0,-10727,0])),new R.ptr(11365,11365,$toNativeArray($kindInt32,[-10795,0,-10795])),new R.ptr(11366,11366,$toNativeArray($kindInt32,[-10792,0,-10792])),new R.ptr(11367,11372,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(11373,11373,$toNativeArray($kindInt32,[0,-10780,0])),new R.ptr(11374,11374,$toNativeArray($kindInt32,[0,-10749,0])),new R.ptr(11375,11375,$toNativeArray($kindInt32,[0,-10783,0])),new R.ptr(11376,11376,$toNativeArray($kindInt32,[0,-10782,0])),new R.ptr(11378,11379,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(11381,11382,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(11390,11391,$toNativeArray($kindInt32,[0,-10815,0])),new R.ptr(11392,11491,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(11499,11502,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(11506,11507,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(11520,11557,$toNativeArray($kindInt32,[-7264,0,-7264])),new R.ptr(11559,11559,$toNativeArray($kindInt32,[-7264,0,-7264])),new R.ptr(11565,11565,$toNativeArray($kindInt32,[-7264,0,-7264])),new R.ptr(42560,42605,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(42624,42651,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(42786,42799,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(42802,42863,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(42873,42876,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(42877,42877,$toNativeArray($kindInt32,[0,-35332,0])),new R.ptr(42878,42887,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(42891,42892,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(42893,42893,$toNativeArray($kindInt32,[0,-42280,0])),new R.ptr(42896,42899,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(42902,42921,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(42922,42922,$toNativeArray($kindInt32,[0,-42308,0])),new R.ptr(42923,42923,$toNativeArray($kindInt32,[0,-42319,0])),new R.ptr(42924,42924,$toNativeArray($kindInt32,[0,-42315,0])),new R.ptr(42925,42925,$toNativeArray($kindInt32,[0,-42305,0])),new R.ptr(42928,42928,$toNativeArray($kindInt32,[0,-42258,0])),new R.ptr(42929,42929,$toNativeArray($kindInt32,[0,-42282,0])),new R.ptr(65313,65338,$toNativeArray($kindInt32,[0,32,0])),new R.ptr(65345,65370,$toNativeArray($kindInt32,[-32,0,-32])),new R.ptr(66560,66599,$toNativeArray($kindInt32,[0,40,0])),new R.ptr(66600,66639,$toNativeArray($kindInt32,[-40,0,-40])),new R.ptr(71840,71871,$toNativeArray($kindInt32,[0,32,0])),new R.ptr(71872,71903,$toNativeArray($kindInt32,[-32,0,-32]))]);$pkg.CaseRanges=HS;HT=$toNativeArray($kindUint8,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,144,130,130,130,136,130,130,130,130,130,130,136,130,130,130,130,132,132,132,132,132,132,132,132,132,132,130,130,136,136,136,130,130,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,130,130,130,136,130,136,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,130,136,130,136,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,16,130,136,136,136,136,136,130,136,136,224,130,136,0,136,136,136,136,132,132,136,192,130,130,136,132,224,130,132,132,132,130,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,136,160,160,160,160,160,160,160,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,136,192,192,192,192,192,192,192,192]);HU=new IJ([new AF.ptr(75,107),new AF.ptr(83,115),new AF.ptr(107,8490),new AF.ptr(115,383),new AF.ptr(181,924),new AF.ptr(197,229),new AF.ptr(223,7838),new AF.ptr(229,8491),new AF.ptr(304,304),new AF.ptr(305,305),new AF.ptr(383,83),new AF.ptr(452,453),new AF.ptr(453,454),new AF.ptr(454,452),new AF.ptr(455,456),new AF.ptr(456,457),new AF.ptr(457,455),new AF.ptr(458,459),new AF.ptr(459,460),new AF.ptr(460,458),new AF.ptr(497,498),new AF.ptr(498,499),new AF.ptr(499,497),new AF.ptr(837,921),new AF.ptr(914,946),new AF.ptr(917,949),new AF.ptr(920,952),new AF.ptr(921,953),new AF.ptr(922,954),new AF.ptr(924,956),new AF.ptr(928,960),new AF.ptr(929,961),new AF.ptr(931,962),new AF.ptr(934,966),new AF.ptr(937,969),new AF.ptr(946,976),new AF.ptr(949,1013),new AF.ptr(952,977),new AF.ptr(953,8126),new AF.ptr(954,1008),new AF.ptr(956,181),new AF.ptr(960,982),new AF.ptr(961,1009),new AF.ptr(962,963),new AF.ptr(963,931),new AF.ptr(966,981),new AF.ptr(969,8486),new AF.ptr(976,914),new AF.ptr(977,1012),new AF.ptr(981,934),new AF.ptr(982,928),new AF.ptr(1008,922),new AF.ptr(1009,929),new AF.ptr(1012,920),new AF.ptr(1013,917),new AF.ptr(7776,7777),new AF.ptr(7777,7835),new AF.ptr(7835,7776),new AF.ptr(7838,223),new AF.ptr(8126,837),new AF.ptr(8486,937),new AF.ptr(8490,75),new AF.ptr(8491,197)]);HV=new O.ptr(new IE([new P.ptr(924,956,32)]),IF.nil,0);HW=new O.ptr(new IE([new P.ptr(181,837,656)]),IF.nil,0);HX=new O.ptr(new IE([new P.ptr(921,953,32),new P.ptr(8126,8126,1)]),IF.nil,0);HY=new O.ptr(new IE([new P.ptr(837,837,1)]),IF.nil,0);HZ=new O.ptr(new IE([new P.ptr(65,90,1),new P.ptr(192,214,1),new P.ptr(216,222,1),new P.ptr(256,302,2),new P.ptr(306,310,2),new P.ptr(313,327,2),new P.ptr(330,376,2),new P.ptr(377,381,2),new P.ptr(385,386,1),new P.ptr(388,390,2),new P.ptr(391,393,2),new P.ptr(394,395,1),new P.ptr(398,401,1),new P.ptr(403,404,1),new P.ptr(406,408,1),new P.ptr(412,413,1),new P.ptr(415,416,1),new P.ptr(418,422,2),new P.ptr(423,425,2),new P.ptr(428,430,2),new P.ptr(431,433,2),new P.ptr(434,435,1),new P.ptr(437,439,2),new P.ptr(440,444,4),new P.ptr(452,453,1),new P.ptr(455,456,1),new P.ptr(458,459,1),new P.ptr(461,475,2),new P.ptr(478,494,2),new P.ptr(497,498,1),new P.ptr(500,502,2),new P.ptr(503,504,1),new P.ptr(506,562,2),new P.ptr(570,571,1),new P.ptr(573,574,1),new P.ptr(577,579,2),new P.ptr(580,582,1),new P.ptr(584,590,2),new P.ptr(837,880,43),new P.ptr(882,886,4),new P.ptr(895,902,7),new P.ptr(904,906,1),new P.ptr(908,910,2),new P.ptr(911,913,2),new P.ptr(914,929,1),new P.ptr(931,939,1),new P.ptr(975,984,9),new P.ptr(986,1006,2),new P.ptr(1012,1015,3),new P.ptr(1017,1018,1),new P.ptr(1021,1071,1),new P.ptr(1120,1152,2),new P.ptr(1162,1216,2),new P.ptr(1217,1229,2),new P.ptr(1232,1326,2),new P.ptr(1329,1366,1),new P.ptr(4256,4293,1),new P.ptr(4295,4301,6),new P.ptr(7680,7828,2),new P.ptr(7838,7934,2),new P.ptr(7944,7951,1),new P.ptr(7960,7965,1),new P.ptr(7976,7983,1),new P.ptr(7992,7999,1),new P.ptr(8008,8013,1),new P.ptr(8025,8031,2),new P.ptr(8040,8047,1),new P.ptr(8072,8079,1),new P.ptr(8088,8095,1),new P.ptr(8104,8111,1),new P.ptr(8120,8124,1),new P.ptr(8136,8140,1),new P.ptr(8152,8155,1),new P.ptr(8168,8172,1),new P.ptr(8184,8188,1),new P.ptr(8486,8490,4),new P.ptr(8491,8498,7),new P.ptr(8579,11264,2685),new P.ptr(11265,11310,1),new P.ptr(11360,11362,2),new P.ptr(11363,11364,1),new P.ptr(11367,11373,2),new P.ptr(11374,11376,1),new P.ptr(11378,11381,3),new P.ptr(11390,11392,1),new P.ptr(11394,11490,2),new P.ptr(11499,11501,2),new P.ptr(11506,42560,31054),new P.ptr(42562,42604,2),new P.ptr(42624,42650,2),new P.ptr(42786,42798,2),new P.ptr(42802,42862,2),new P.ptr(42873,42877,2),new P.ptr(42878,42886,2),new P.ptr(42891,42893,2),new P.ptr(42896,42898,2),new P.ptr(42902,42922,2),new P.ptr(42923,42925,1),new P.ptr(42928,42929,1),new P.ptr(65313,65338,1)]),new IF([new Q.ptr(66560,66599,1),new Q.ptr(71840,71871,1)]),3);IA=new O.ptr(new IE([new P.ptr(452,454,2),new P.ptr(455,457,2),new P.ptr(458,460,2),new P.ptr(497,499,2),new P.ptr(8064,8071,1),new P.ptr(8080,8087,1),new P.ptr(8096,8103,1),new P.ptr(8115,8131,16),new P.ptr(8179,8179,1)]),IF.nil,0);IB=new O.ptr(new IE([new P.ptr(97,122,1),new P.ptr(181,223,42),new P.ptr(224,246,1),new P.ptr(248,255,1),new P.ptr(257,303,2),new P.ptr(307,311,2),new P.ptr(314,328,2),new P.ptr(331,375,2),new P.ptr(378,382,2),new P.ptr(383,384,1),new P.ptr(387,389,2),new P.ptr(392,396,4),new P.ptr(402,405,3),new P.ptr(409,410,1),new P.ptr(414,417,3),new P.ptr(419,421,2),new P.ptr(424,429,5),new P.ptr(432,436,4),new P.ptr(438,441,3),new P.ptr(445,447,2),new P.ptr(453,454,1),new P.ptr(456,457,1),new P.ptr(459,460,1),new P.ptr(462,476,2),new P.ptr(477,495,2),new P.ptr(498,499,1),new P.ptr(501,505,4),new P.ptr(507,543,2),new P.ptr(547,563,2),new P.ptr(572,575,3),new P.ptr(576,578,2),new P.ptr(583,591,2),new P.ptr(592,596,1),new P.ptr(598,599,1),new P.ptr(601,603,2),new P.ptr(604,608,4),new P.ptr(609,613,2),new P.ptr(614,616,2),new P.ptr(617,619,2),new P.ptr(620,623,3),new P.ptr(625,626,1),new P.ptr(629,637,8),new P.ptr(640,643,3),new P.ptr(647,652,1),new P.ptr(658,670,12),new P.ptr(837,881,44),new P.ptr(883,891,4),new P.ptr(892,893,1),new P.ptr(940,943,1),new P.ptr(945,974,1),new P.ptr(976,977,1),new P.ptr(981,983,1),new P.ptr(985,1007,2),new P.ptr(1008,1011,1),new P.ptr(1013,1019,3),new P.ptr(1072,1119,1),new P.ptr(1121,1153,2),new P.ptr(1163,1215,2),new P.ptr(1218,1230,2),new P.ptr(1231,1327,2),new P.ptr(1377,1414,1),new P.ptr(7545,7549,4),new P.ptr(7681,7829,2),new P.ptr(7835,7841,6),new P.ptr(7843,7935,2),new P.ptr(7936,7943,1),new P.ptr(7952,7957,1),new P.ptr(7968,7975,1),new P.ptr(7984,7991,1),new P.ptr(8000,8005,1),new P.ptr(8017,8023,2),new P.ptr(8032,8039,1),new P.ptr(8048,8061,1),new P.ptr(8112,8113,1),new P.ptr(8126,8144,18),new P.ptr(8145,8160,15),new P.ptr(8161,8165,4),new P.ptr(8526,8580,54),new P.ptr(11312,11358,1),new P.ptr(11361,11365,4),new P.ptr(11366,11372,2),new P.ptr(11379,11382,3),new P.ptr(11393,11491,2),new P.ptr(11500,11502,2),new P.ptr(11507,11520,13),new P.ptr(11521,11557,1),new P.ptr(11559,11565,6),new P.ptr(42561,42605,2),new P.ptr(42625,42651,2),new P.ptr(42787,42799,2),new P.ptr(42803,42863,2),new P.ptr(42874,42876,2),new P.ptr(42879,42887,2),new P.ptr(42892,42897,5),new P.ptr(42899,42903,4),new P.ptr(42905,42921,2),new P.ptr(65345,65370,1)]),new IF([new Q.ptr(66600,66639,1),new Q.ptr(71872,71903,1)]),4);IC=new O.ptr(new IE([new P.ptr(921,953,32),new P.ptr(8126,8126,1)]),IF.nil,0);ID=new O.ptr(new IE([new P.ptr(921,953,32),new P.ptr(8126,8126,1)]),IF.nil,0);$pkg.FoldCategory=(h=new $Map(),i="Common",h[i]={k:i,v:HV},i="Greek",h[i]={k:i,v:HW},i="Inherited",h[i]={k:i,v:HX},i="L",h[i]={k:i,v:HY},i="Ll",h[i]={k:i,v:HZ},i="Lt",h[i]={k:i,v:IA},i="Lu",h[i]={k:i,v:IB},i="M",h[i]={k:i,v:IC},i="Mn",h[i]={k:i,v:ID},h);$pkg.FoldScript=(j=new $Map(),j);}return;}};$init_unicode.$blocking=true;return $init_unicode;};return $pkg;})(); +$packages["unicode/utf8"]=(function(){var $pkg={},A,B,E,F,G,H,I,J,K,L,M;A=function(a){var a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b=0,ba,bb,bc,bd,be,bf,bg,bh,c=0,d=false,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;e=a.$length;if(e<1){f=65533;g=0;h=true;b=f;c=g;d=h;return[b,c,d];}i=((0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]);if(i<128){j=(i>>0);k=1;l=false;b=j;c=k;d=l;return[b,c,d];}if(i<192){m=65533;n=1;o=false;b=m;c=n;d=o;return[b,c,d];}if(e<2){p=65533;q=1;r=true;b=p;c=q;d=r;return[b,c,d];}s=((1<0||1>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+1]);if(s<128||192<=s){t=65533;u=1;v=false;b=t;c=u;d=v;return[b,c,d];}if(i<224){b=((((i&31)>>>0)>>0)<<6>>0)|(((s&63)>>>0)>>0);if(b<=127){w=65533;x=1;y=false;b=w;c=x;d=y;return[b,c,d];}z=b;aa=2;ab=false;b=z;c=aa;d=ab;return[b,c,d];}if(e<3){ac=65533;ad=1;ae=true;b=ac;c=ad;d=ae;return[b,c,d];}af=((2<0||2>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+2]);if(af<128||192<=af){ag=65533;ah=1;ai=false;b=ag;c=ah;d=ai;return[b,c,d];}if(i<240){b=(((((i&15)>>>0)>>0)<<12>>0)|((((s&63)>>>0)>>0)<<6>>0))|(((af&63)>>>0)>>0);if(b<=2047){aj=65533;ak=1;al=false;b=aj;c=ak;d=al;return[b,c,d];}if(55296<=b&&b<=57343){am=65533;an=1;ao=false;b=am;c=an;d=ao;return[b,c,d];}ap=b;aq=3;ar=false;b=ap;c=aq;d=ar;return[b,c,d];}if(e<4){as=65533;at=1;au=true;b=as;c=at;d=au;return[b,c,d];}av=((3<0||3>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+3]);if(av<128||192<=av){aw=65533;ax=1;ay=false;b=aw;c=ax;d=ay;return[b,c,d];}if(i<248){b=((((((i&7)>>>0)>>0)<<18>>0)|((((s&63)>>>0)>>0)<<12>>0))|((((af&63)>>>0)>>0)<<6>>0))|(((av&63)>>>0)>>0);if(b<=65535||1114111>0);k=1;l=false;b=j;c=k;d=l;return[b,c,d];}if(i<192){m=65533;n=1;o=false;b=m;c=n;d=o;return[b,c,d];}if(e<2){p=65533;q=1;r=true;b=p;c=q;d=r;return[b,c,d];}s=a.charCodeAt(1);if(s<128||192<=s){t=65533;u=1;v=false;b=t;c=u;d=v;return[b,c,d];}if(i<224){b=((((i&31)>>>0)>>0)<<6>>0)|(((s&63)>>>0)>>0);if(b<=127){w=65533;x=1;y=false;b=w;c=x;d=y;return[b,c,d];}z=b;aa=2;ab=false;b=z;c=aa;d=ab;return[b,c,d];}if(e<3){ac=65533;ad=1;ae=true;b=ac;c=ad;d=ae;return[b,c,d];}af=a.charCodeAt(2);if(af<128||192<=af){ag=65533;ah=1;ai=false;b=ag;c=ah;d=ai;return[b,c,d];}if(i<240){b=(((((i&15)>>>0)>>0)<<12>>0)|((((s&63)>>>0)>>0)<<6>>0))|(((af&63)>>>0)>>0);if(b<=2047){aj=65533;ak=1;al=false;b=aj;c=ak;d=al;return[b,c,d];}if(55296<=b&&b<=57343){am=65533;an=1;ao=false;b=am;c=an;d=ao;return[b,c,d];}ap=b;aq=3;ar=false;b=ap;c=aq;d=ar;return[b,c,d];}if(e<4){as=65533;at=1;au=true;b=as;c=at;d=au;return[b,c,d];}av=a.charCodeAt(3);if(av<128||192<=av){aw=65533;ax=1;ay=false;b=aw;c=ax;d=ay;return[b,c,d];}if(i<248){b=((((((i&7)>>>0)>>0)<<18>>0)|((((s&63)>>>0)>>0)<<12>>0))|((((af&63)>>>0)>>0)<<6>>0))|(((av&63)>>>0)>>0);if(b<=65535||1114111>0;b=(((g<0||g>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+g])>>0);if(b<128){h=b;i=1;b=h;c=i;return[b,c];}j=d-4>>0;if(j<0){j=0;}g=g-(1)>>0;while(true){if(!(g>=j)){break;}if(M(((g<0||g>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+g]))){break;}g=g-(1)>>0;}if(g<0){g=0;}k=E($subslice(a,g,d));b=k[0];c=k[1];if(!(((g+c>>0)===d))){l=65533;m=1;b=l;c=m;return[b,c];}n=b;o=c;b=n;c=o;return[b,c];};H=$pkg.DecodeLastRuneInString=function(a){var a,b=0,c=0,d,e,f,g,h,i,j,k,l,m,n,o;d=a.length;if(d===0){e=65533;f=0;b=e;c=f;return[b,c];}g=d-1>>0;b=(a.charCodeAt(g)>>0);if(b<128){h=b;i=1;b=h;c=i;return[b,c];}j=d-4>>0;if(j<0){j=0;}g=g-(1)>>0;while(true){if(!(g>=j)){break;}if(M(a.charCodeAt(g))){break;}g=g-(1)>>0;}if(g<0){g=0;}k=F(a.substring(g,d));b=k[0];c=k[1];if(!(((g+c>>0)===d))){l=65533;m=1;b=l;c=m;return[b,c];}n=b;o=c;b=n;c=o;return[b,c];};I=$pkg.RuneLen=function(a){var a;if(a<0){return-1;}else if(a<=127){return 1;}else if(a<=2047){return 2;}else if(55296<=a&&a<=57343){return-1;}else if(a<=65535){return 3;}else if(a<=1114111){return 4;}return-1;};J=$pkg.EncodeRune=function(a,b){var a,b,c;c=(b>>>0);if(c<=127){(0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]=(b<<24>>>24);return 1;}else if(c<=2047){(0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]=(192|((b>>6>>0)<<24>>>24))>>>0;(1<0||1>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+1]=(128|(((b<<24>>>24)&63)>>>0))>>>0;return 2;}else if(c>1114111||55296<=c&&c<=57343){b=65533;(0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]=(224|((b>>12>>0)<<24>>>24))>>>0;(1<0||1>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+1]=(128|((((b>>6>>0)<<24>>>24)&63)>>>0))>>>0;(2<0||2>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+2]=(128|(((b<<24>>>24)&63)>>>0))>>>0;return 3;}else if(c<=65535){(0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]=(224|((b>>12>>0)<<24>>>24))>>>0;(1<0||1>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+1]=(128|((((b>>6>>0)<<24>>>24)&63)>>>0))>>>0;(2<0||2>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+2]=(128|(((b<<24>>>24)&63)>>>0))>>>0;return 3;}else{(0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]=(240|((b>>18>>0)<<24>>>24))>>>0;(1<0||1>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+1]=(128|((((b>>12>>0)<<24>>>24)&63)>>>0))>>>0;(2<0||2>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+2]=(128|((((b>>6>>0)<<24>>>24)&63)>>>0))>>>0;(3<0||3>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+3]=(128|(((b<<24>>>24)&63)>>>0))>>>0;return 4;}};K=$pkg.RuneCount=function(a){var a,b,c,d,e;b=0;c=0;c=0;while(true){if(!(b=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+b])<128){b=b+(1)>>0;}else{d=E($subslice(a,b));e=d[1];b=b+(e)>>0;}c=c+(1)>>0;}return c;};L=$pkg.RuneCountInString=function(a){var a,b=0,c,d,e;c=a;d=0;while(true){if(!(d>0;d+=e[1];}return b;};M=$pkg.RuneStart=function(a){var a;return!((((a&192)>>>0)===128));};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_utf8=function(){while(true){switch($s){case 0:}return;}};$init_utf8.$blocking=true;return $init_utf8;};return $pkg;})(); +$packages["bytes"]=(function(){var $pkg={},A,B,D,C,H,I,BJ,BK,BL,BM,BN,E,F,J,K,N,O,Q,S,W,Z,AD,AE,AG,AJ,AQ,AR,AS,AX,AY,BD;A=$packages["errors"];B=$packages["io"];D=$packages["unicode"];C=$packages["unicode/utf8"];H=$pkg.Buffer=$newType(0,$kindStruct,"bytes.Buffer","Buffer","bytes",function(buf_,off_,runeBytes_,bootstrap_,lastRead_){this.$val=this;this.buf=buf_!==undefined?buf_:BK.nil;this.off=off_!==undefined?off_:0;this.runeBytes=runeBytes_!==undefined?runeBytes_:BL.zero();this.bootstrap=bootstrap_!==undefined?bootstrap_:BM.zero();this.lastRead=lastRead_!==undefined?lastRead_:0;});I=$pkg.readOp=$newType(4,$kindInt,"bytes.readOp","readOp","bytes",null);BJ=$ptrType(H);BK=$sliceType($Uint8);BL=$arrayType($Uint8,4);BM=$arrayType($Uint8,64);BN=$sliceType(BK);E=$pkg.IndexByte=function(d,e){var d,e,f,g,h,i;f=d;g=0;while(true){if(!(g=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]);if(i===e){return h;}g++;}return-1;};F=$pkg.Equal=function(d,e){var d,e,f,g,h,i;if(!((d.$length===e.$length))){return false;}f=d;g=0;while(true){if(!(g=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]);if(!((i===((h<0||h>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+h])))){return false;}g++;}return true;};H.ptr.prototype.Bytes=function(){var d;d=this;return $subslice(d.buf,d.off);};H.prototype.Bytes=function(){return this.$val.Bytes();};H.ptr.prototype.String=function(){var d;d=this;if(d===BJ.nil){return"";}return $bytesToString($subslice(d.buf,d.off));};H.prototype.String=function(){return this.$val.String();};H.ptr.prototype.Len=function(){var d;d=this;return d.buf.$length-d.off>>0;};H.prototype.Len=function(){return this.$val.Len();};H.ptr.prototype.Truncate=function(d){var d,e;e=this;e.lastRead=0;if(d<0||d>e.Len()){$panic(new $String("bytes.Buffer: truncation out of range"));}else if(d===0){e.off=0;}e.buf=$subslice(e.buf,0,(e.off+d>>0));};H.prototype.Truncate=function(d){return this.$val.Truncate(d);};H.ptr.prototype.Reset=function(){var d;d=this;d.Truncate(0);};H.prototype.Reset=function(){return this.$val.Reset();};H.ptr.prototype.grow=function(d){var d,e,f,g,h;e=this;f=e.Len();if((f===0)&&!((e.off===0))){e.Truncate(0);}if((e.buf.$length+d>>0)>e.buf.$capacity){g=BK.nil;if(e.buf===BK.nil&&d<=64){g=$subslice(new BK(e.bootstrap),0);}else if((f+d>>0)<=(h=e.buf.$capacity/2,(h===h&&h!==1/0&&h!==-1/0)?h>>0:$throwRuntimeError("integer divide by zero"))){$copySlice(e.buf,$subslice(e.buf,e.off));g=$subslice(e.buf,0,f);}else{g=J((2*e.buf.$capacity>>0)+d>>0);$copySlice(g,$subslice(e.buf,e.off));}e.buf=g;e.off=0;}e.buf=$subslice(e.buf,0,((e.off+f>>0)+d>>0));return e.off+f>>0;};H.prototype.grow=function(d){return this.$val.grow(d);};H.ptr.prototype.Grow=function(d){var d,e,f;e=this;if(d<0){$panic(new $String("bytes.Buffer.Grow: negative count"));}f=e.grow(d);e.buf=$subslice(e.buf,0,f);};H.prototype.Grow=function(d){return this.$val.Grow(d);};H.ptr.prototype.Write=function(d){var d,e=0,f=$ifaceNil,g,h,i,j;g=this;g.lastRead=0;h=g.grow(d.$length);i=$copySlice($subslice(g.buf,h),d);j=$ifaceNil;e=i;f=j;return[e,f];};H.prototype.Write=function(d){return this.$val.Write(d);};H.ptr.prototype.WriteString=function(d){var d,e=0,f=$ifaceNil,g,h,i,j;g=this;g.lastRead=0;h=g.grow(d.length);i=$copyString($subslice(g.buf,h),d);j=$ifaceNil;e=i;f=j;return[e,f];};H.prototype.WriteString=function(d){return this.$val.WriteString(d);};H.ptr.prototype.ReadFrom=function(d){var d,e=new $Int64(0,0),f=$ifaceNil,g,h,i,j,k,l,m,n,o,p,q;g=this;g.lastRead=0;if(g.off>=g.buf.$length){g.Truncate(0);}while(true){if(!(true)){break;}h=g.buf.$capacity-g.buf.$length>>0;if(h<512){i=g.buf;if((g.off+h>>0)<512){i=J((2*g.buf.$capacity>>0)+512>>0);}$copySlice(i,$subslice(g.buf,g.off));g.buf=$subslice(i,0,(g.buf.$length-g.off>>0));g.off=0;}j=d.Read($subslice(g.buf,g.buf.$length,g.buf.$capacity));k=j[0];l=j[1];g.buf=$subslice(g.buf,0,(g.buf.$length+k>>0));e=(m=new $Int64(0,k),new $Int64(e.$high+m.$high,e.$low+m.$low));if($interfaceIsEqual(l,B.EOF)){break;}if(!($interfaceIsEqual(l,$ifaceNil))){n=e;o=l;e=n;f=o;return[e,f];}}p=e;q=$ifaceNil;e=p;f=q;return[e,f];};H.prototype.ReadFrom=function(d){return this.$val.ReadFrom(d);};J=function(d){var $deferred=[],$err=null,d;try{$deferFrames.push($deferred);$deferred.push([(function(){if(!($interfaceIsEqual($recover(),$ifaceNil))){$panic($pkg.ErrTooLarge);}}),[]]);return $makeSlice(BK,d);}catch(err){$err=err;return BK.nil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};H.ptr.prototype.WriteTo=function(d){var d,e=new $Int64(0,0),f=$ifaceNil,g,h,i,j,k,l,m,n,o;g=this;g.lastRead=0;if(g.offh){$panic(new $String("bytes.Buffer.WriteTo: invalid Write count"));}g.off=g.off+(j)>>0;e=new $Int64(0,j);if(!($interfaceIsEqual(k,$ifaceNil))){l=e;m=k;e=l;f=m;return[e,f];}if(!((j===h))){n=e;o=B.ErrShortWrite;e=n;f=o;return[e,f];}}g.Truncate(0);return[e,f];};H.prototype.WriteTo=function(d){return this.$val.WriteTo(d);};H.ptr.prototype.WriteByte=function(d){var d,e,f,g;e=this;e.lastRead=0;f=e.grow(1);(g=e.buf,(f<0||f>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+f]=d);return $ifaceNil;};H.prototype.WriteByte=function(d){return this.$val.WriteByte(d);};H.ptr.prototype.WriteRune=function(d){var d,e=0,f=$ifaceNil,g,h,i,j,k;g=this;if(d<128){g.WriteByte((d<<24>>>24));h=1;i=$ifaceNil;e=h;f=i;return[e,f];}e=C.EncodeRune($subslice(new BK(g.runeBytes),0),d);g.Write($subslice(new BK(g.runeBytes),0,e));j=e;k=$ifaceNil;e=j;f=k;return[e,f];};H.prototype.WriteRune=function(d){return this.$val.WriteRune(d);};H.ptr.prototype.Read=function(d){var d,e=0,f=$ifaceNil,g,h,i;g=this;g.lastRead=0;if(g.off>=g.buf.$length){g.Truncate(0);if(d.$length===0){return[e,f];}h=0;i=B.EOF;e=h;f=i;return[e,f];}e=$copySlice(d,$subslice(g.buf,g.off));g.off=g.off+(e)>>0;if(e>0){g.lastRead=2;}return[e,f];};H.prototype.Read=function(d){return this.$val.Read(d);};H.ptr.prototype.Next=function(d){var d,e,f,g;e=this;e.lastRead=0;f=e.Len();if(d>f){d=f;}g=$subslice(e.buf,e.off,(e.off+d>>0));e.off=e.off+(d)>>0;if(d>0){e.lastRead=2;}return g;};H.prototype.Next=function(d){return this.$val.Next(d);};H.ptr.prototype.ReadByte=function(){var d=0,e=$ifaceNil,f,g,h,i,j,k,l;f=this;f.lastRead=0;if(f.off>=f.buf.$length){f.Truncate(0);g=0;h=B.EOF;d=g;e=h;return[d,e];}d=(i=f.buf,j=f.off,((j<0||j>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]));f.off=f.off+(1)>>0;f.lastRead=2;k=d;l=$ifaceNil;d=k;e=l;return[d,e];};H.prototype.ReadByte=function(){return this.$val.ReadByte();};H.ptr.prototype.ReadRune=function(){var d=0,e=0,f=$ifaceNil,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;g=this;g.lastRead=0;if(g.off>=g.buf.$length){g.Truncate(0);h=0;i=0;j=B.EOF;d=h;e=i;f=j;return[d,e,f];}g.lastRead=1;m=(k=g.buf,l=g.off,((l<0||l>=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+l]));if(m<128){g.off=g.off+(1)>>0;n=(m>>0);o=1;p=$ifaceNil;d=n;e=o;f=p;return[d,e,f];}q=C.DecodeRune($subslice(g.buf,g.off));d=q[0];r=q[1];g.off=g.off+(r)>>0;s=d;t=r;u=$ifaceNil;d=s;e=t;f=u;return[d,e,f];};H.prototype.ReadRune=function(){return this.$val.ReadRune();};H.ptr.prototype.UnreadRune=function(){var d,e,f;d=this;if(!((d.lastRead===1))){return A.New("bytes.Buffer: UnreadRune: previous operation was not ReadRune");}d.lastRead=0;if(d.off>0){e=C.DecodeLastRune($subslice(d.buf,0,d.off));f=e[1];d.off=d.off-(f)>>0;}return $ifaceNil;};H.prototype.UnreadRune=function(){return this.$val.UnreadRune();};H.ptr.prototype.UnreadByte=function(){var d;d=this;if(!((d.lastRead===1))&&!((d.lastRead===2))){return A.New("bytes.Buffer: UnreadByte: previous operation was not a read");}d.lastRead=0;if(d.off>0){d.off=d.off-(1)>>0;}return $ifaceNil;};H.prototype.UnreadByte=function(){return this.$val.UnreadByte();};H.ptr.prototype.ReadBytes=function(d){var d,e=BK.nil,f=$ifaceNil,g,h,i;g=this;h=g.readSlice(d);i=h[0];f=h[1];e=$appendSlice(e,i);return[e,f];};H.prototype.ReadBytes=function(d){return this.$val.ReadBytes(d);};H.ptr.prototype.readSlice=function(d){var d,e=BK.nil,f=$ifaceNil,g,h,i,j,k;g=this;h=E($subslice(g.buf,g.off),d);i=(g.off+h>>0)+1>>0;if(h<0){i=g.buf.$length;f=B.EOF;}e=$subslice(g.buf,g.off,i);g.off=i;g.lastRead=2;j=e;k=f;e=j;f=k;return[e,f];};H.prototype.readSlice=function(d){return this.$val.readSlice(d);};H.ptr.prototype.ReadString=function(d){var d,e="",f=$ifaceNil,g,h,i,j,k;g=this;h=g.readSlice(d);i=h[0];f=h[1];j=$bytesToString(i);k=f;e=j;f=k;return[e,f];};H.prototype.ReadString=function(d){return this.$val.ReadString(d);};K=$pkg.NewBuffer=function(d){var d;return new H.ptr(d,0,BL.zero(),BM.zero(),0);};N=function(d,e){var d,e,f,g,h,i;if(e<=0){e=d.$length;}f=$makeSlice(BN,e);g=0;h=0;while(true){if(!(d.$length>0)){break;}if((h+1>>0)>=e){(h<0||h>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+h]=d;h=h+(1)>>0;break;}i=C.DecodeRune(d);g=i[1];(h<0||h>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+h]=$subslice(d,0,g);d=$subslice(d,g);h=h+(1)>>0;}return $subslice(f,0,h);};O=$pkg.Count=function(d,e){var d,e,f,g,h,i,j,k;f=e.$length;if(f===0){return C.RuneCount(d)+1>>0;}if(f>d.$length){return 0;}g=0;h=((0<0||0>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]);i=0;j=$subslice(d,0,((d.$length-f>>0)+1>>0));while(true){if(!(i=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+i])===h))){k=E($subslice(j,i),h);if(k<0){break;}i=i+(k)>>0;}if((f===1)||F($subslice(d,i,(i+f>>0)),e)){g=g+(1)>>0;i=i+(f)>>0;continue;}i=i+(1)>>0;}return g;};Q=$pkg.Index=function(d,e){var d,e,f,g,h,i,j;f=e.$length;if(f===0){return 0;}if(f>d.$length){return-1;}g=((0<0||0>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]);if(f===1){return E(d,g);}h=0;i=$subslice(d,0,((d.$length-f>>0)+1>>0));while(true){if(!(h=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+h])===g))){j=E($subslice(i,h),g);if(j<0){break;}h=h+(j)>>0;}if(F($subslice(d,h,(h+f>>0)),e)){return h;}h=h+(1)>>0;}return-1;};S=$pkg.LastIndex=function(d,e){var d,e,f,g,h;f=e.$length;if(f===0){return d.$length;}g=((0<0||0>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]);h=d.$length-f>>0;while(true){if(!(h>=0)){break;}if((((h<0||h>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+h])===g)&&((f===1)||F($subslice(d,h,(h+f>>0)),e))){return h;}h=h-(1)>>0;}return-1;};W=function(d,e,f,g){var d,e,f,g,h,i,j,k,l;if(g===0){return BN.nil;}if(e.$length===0){return N(d,g);}if(g<0){g=O(d,e)+1>>0;}h=((0<0||0>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]);i=0;j=$makeSlice(BN,g);k=0;l=0;while(true){if(!((l+e.$length>>0)<=d.$length&&(k+1>>0)=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+l])===h)&&((e.$length===1)||F($subslice(d,l,(l+e.$length>>0)),e))){(k<0||k>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+k]=$subslice(d,i,(l+f>>0));k=k+(1)>>0;i=l+e.$length>>0;l=l+((e.$length-1>>0))>>0;}l=l+(1)>>0;}(k<0||k>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+k]=$subslice(d,i);return $subslice(j,0,(k+1>>0));};Z=$pkg.Split=function(d,e){var d,e;return W(d,e,0,-1);};AD=$pkg.Join=function(d,e){var d,e,f,g,h,i,j,k,l,m,n;if(d.$length===0){return new BK([]);}if(d.$length===1){return $appendSlice(BK.nil,((0<0||0>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+0]));}f=e.$length*((d.$length-1>>0))>>0;g=d;h=0;while(true){if(!(h=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]);f=f+(i.$length)>>0;h++;}j=$makeSlice(BK,f);k=$copySlice(j,((0<0||0>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+0]));l=$subslice(d,1);m=0;while(true){if(!(m=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+m]);k=k+($copySlice($subslice(j,k),e))>>0;k=k+($copySlice($subslice(j,k),n))>>0;m++;}return j;};AE=$pkg.HasPrefix=function(d,e){var d,e;return d.$length>=e.$length&&F($subslice(d,0,e.$length),e);};AG=$pkg.Map=function(d,e){var d,e,f,g,h,i,j,k,l,m,n;f=e.$length;g=0;h=$makeSlice(BK,f);i=0;while(true){if(!(i=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+i])>>0);if(k>=128){l=C.DecodeRune($subslice(e,i));k=l[0];j=l[1];}k=d(k);if(k>=0){m=C.RuneLen(k);if(m<0){m=3;}if((g+m>>0)>f){f=(f*2>>0)+4>>0;n=$makeSlice(BK,f);$copySlice(n,$subslice(h,0,g));h=n;}g=g+(C.EncodeRune($subslice(h,g,f),k))>>0;}i=i+(j)>>0;}return $subslice(h,0,g);};AJ=$pkg.ToLower=function(d){var d;return AG(D.ToLower,d);};AQ=$pkg.TrimLeftFunc=function(d,e){var d,e,f;f=AX(d,e,false);if(f===-1){return BK.nil;}return $subslice(d,f);};AR=$pkg.TrimRightFunc=function(d,e){var d,e,f,g,h;f=AY(d,e,false);if(f>=0&&((f<0||f>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+f])>=128){g=C.DecodeRune($subslice(d,f));h=g[1];f=f+(h)>>0;}else{f=f+(1)>>0;}return $subslice(d,0,f);};AS=$pkg.TrimFunc=function(d,e){var d,e;return AR(AQ(d,e),e);};AX=function(d,e,f){var d,e,f,g,h,i,j;g=0;while(true){if(!(g=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+g])>>0);if(i>=128){j=C.DecodeRune($subslice(d,g));i=j[0];h=j[1];}if(e(i)===f){return g;}g=g+(h)>>0;}return-1;};AY=function(d,e,f){var d,e,f,g,h,i,j,k,l,m;g=d.$length;while(true){if(!(g>0)){break;}h=((i=g-1>>0,((i<0||i>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+i]))>>0);j=1;k=h;l=j;if(k>=128){m=C.DecodeLastRune($subslice(d,0,g));k=m[0];l=m[1];}g=g-(l)>>0;if(e(k)===f){return g;}}return-1;};BD=$pkg.TrimSpace=function(d){var d;return AS(d,D.IsSpace);};BJ.methods=[{prop:"Bytes",name:"Bytes",pkg:"",typ:$funcType([],[BK],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Truncate",name:"Truncate",pkg:"",typ:$funcType([$Int],[],false)},{prop:"Reset",name:"Reset",pkg:"",typ:$funcType([],[],false)},{prop:"grow",name:"grow",pkg:"bytes",typ:$funcType([$Int],[$Int],false)},{prop:"Grow",name:"Grow",pkg:"",typ:$funcType([$Int],[],false)},{prop:"Write",name:"Write",pkg:"",typ:$funcType([BK],[$Int,$error],false)},{prop:"WriteString",name:"WriteString",pkg:"",typ:$funcType([$String],[$Int,$error],false)},{prop:"ReadFrom",name:"ReadFrom",pkg:"",typ:$funcType([B.Reader],[$Int64,$error],false)},{prop:"WriteTo",name:"WriteTo",pkg:"",typ:$funcType([B.Writer],[$Int64,$error],false)},{prop:"WriteByte",name:"WriteByte",pkg:"",typ:$funcType([$Uint8],[$error],false)},{prop:"WriteRune",name:"WriteRune",pkg:"",typ:$funcType([$Int32],[$Int,$error],false)},{prop:"Read",name:"Read",pkg:"",typ:$funcType([BK],[$Int,$error],false)},{prop:"Next",name:"Next",pkg:"",typ:$funcType([$Int],[BK],false)},{prop:"ReadByte",name:"ReadByte",pkg:"",typ:$funcType([],[$Uint8,$error],false)},{prop:"ReadRune",name:"ReadRune",pkg:"",typ:$funcType([],[$Int32,$Int,$error],false)},{prop:"UnreadRune",name:"UnreadRune",pkg:"",typ:$funcType([],[$error],false)},{prop:"UnreadByte",name:"UnreadByte",pkg:"",typ:$funcType([],[$error],false)},{prop:"ReadBytes",name:"ReadBytes",pkg:"",typ:$funcType([$Uint8],[BK,$error],false)},{prop:"readSlice",name:"readSlice",pkg:"bytes",typ:$funcType([$Uint8],[BK,$error],false)},{prop:"ReadString",name:"ReadString",pkg:"",typ:$funcType([$Uint8],[$String,$error],false)}];H.init([{prop:"buf",name:"buf",pkg:"bytes",typ:BK,tag:""},{prop:"off",name:"off",pkg:"bytes",typ:$Int,tag:""},{prop:"runeBytes",name:"runeBytes",pkg:"bytes",typ:BL,tag:""},{prop:"bootstrap",name:"bootstrap",pkg:"bytes",typ:BM,tag:""},{prop:"lastRead",name:"lastRead",pkg:"bytes",typ:I,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_bytes=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$pkg.ErrTooLarge=A.New("bytes.Buffer: too large");}return;}};$init_bytes.$blocking=true;return $init_bytes;};return $pkg;})(); +$packages["syscall"]=(function(){var $pkg={},A,E,B,D,C,EQ,ER,KF,KI,KO,KW,MD,ME,MF,MS,MT,MZ,NE,NG,NH,NK,NX,NY,NZ,OA,OE,OF,OH,OJ,F,G,N,O,P,AP,AQ,AR,AS,DT,FS,H,I,J,K,L,Q,R,S,V,AU,AW,BH,CQ,CR,CT,CY,DO,DY,DZ,ET,EU,GM,GP,HA,HE,HF,HH,HI,HL,HN,HO,HP,II,IR,IT,IU,IV,JA,JY,JZ,KA;A=$packages["bytes"];E=$packages["errors"];B=$packages["github.com/gopherjs/gopherjs/js"];D=$packages["runtime"];C=$packages["sync"];EQ=$pkg.mmapper=$newType(0,$kindStruct,"syscall.mmapper","mmapper","syscall",function(Mutex_,active_,mmap_,munmap_){this.$val=this;this.Mutex=Mutex_!==undefined?Mutex_:new C.Mutex.ptr();this.active=active_!==undefined?active_:false;this.mmap=mmap_!==undefined?mmap_:$throwNilPointerError;this.munmap=munmap_!==undefined?munmap_:$throwNilPointerError;});ER=$pkg.Errno=$newType(4,$kindUintptr,"syscall.Errno","Errno","syscall",null);KF=$pkg._C_int=$newType(4,$kindInt32,"syscall._C_int","_C_int","syscall",null);KI=$pkg.Timespec=$newType(0,$kindStruct,"syscall.Timespec","Timespec","syscall",function(Sec_,Nsec_){this.$val=this;this.Sec=Sec_!==undefined?Sec_:new $Int64(0,0);this.Nsec=Nsec_!==undefined?Nsec_:new $Int64(0,0);});KO=$pkg.Stat_t=$newType(0,$kindStruct,"syscall.Stat_t","Stat_t","syscall",function(Dev_,Mode_,Nlink_,Ino_,Uid_,Gid_,Rdev_,Pad_cgo_0_,Atimespec_,Mtimespec_,Ctimespec_,Birthtimespec_,Size_,Blocks_,Blksize_,Flags_,Gen_,Lspare_,Qspare_){this.$val=this;this.Dev=Dev_!==undefined?Dev_:0;this.Mode=Mode_!==undefined?Mode_:0;this.Nlink=Nlink_!==undefined?Nlink_:0;this.Ino=Ino_!==undefined?Ino_:new $Uint64(0,0);this.Uid=Uid_!==undefined?Uid_:0;this.Gid=Gid_!==undefined?Gid_:0;this.Rdev=Rdev_!==undefined?Rdev_:0;this.Pad_cgo_0=Pad_cgo_0_!==undefined?Pad_cgo_0_:NG.zero();this.Atimespec=Atimespec_!==undefined?Atimespec_:new KI.ptr();this.Mtimespec=Mtimespec_!==undefined?Mtimespec_:new KI.ptr();this.Ctimespec=Ctimespec_!==undefined?Ctimespec_:new KI.ptr();this.Birthtimespec=Birthtimespec_!==undefined?Birthtimespec_:new KI.ptr();this.Size=Size_!==undefined?Size_:new $Int64(0,0);this.Blocks=Blocks_!==undefined?Blocks_:new $Int64(0,0);this.Blksize=Blksize_!==undefined?Blksize_:0;this.Flags=Flags_!==undefined?Flags_:0;this.Gen=Gen_!==undefined?Gen_:0;this.Lspare=Lspare_!==undefined?Lspare_:0;this.Qspare=Qspare_!==undefined?Qspare_:OF.zero();});KW=$pkg.Dirent=$newType(0,$kindStruct,"syscall.Dirent","Dirent","syscall",function(Ino_,Seekoff_,Reclen_,Namlen_,Type_,Name_,Pad_cgo_0_){this.$val=this;this.Ino=Ino_!==undefined?Ino_:new $Uint64(0,0);this.Seekoff=Seekoff_!==undefined?Seekoff_:new $Uint64(0,0);this.Reclen=Reclen_!==undefined?Reclen_:0;this.Namlen=Namlen_!==undefined?Namlen_:0;this.Type=Type_!==undefined?Type_:0;this.Name=Name_!==undefined?Name_:OH.zero();this.Pad_cgo_0=Pad_cgo_0_!==undefined?Pad_cgo_0_:OJ.zero();});MD=$sliceType($Uint8);ME=$sliceType($String);MF=$ptrType($Uint8);MS=$sliceType(KF);MT=$ptrType($Uintptr);MZ=$arrayType($Uint8,32);NE=$sliceType($Uint8);NG=$arrayType($Uint8,4);NH=$arrayType(KF,14);NK=$structType([{prop:"addr",name:"addr",pkg:"syscall",typ:$Uintptr,tag:""},{prop:"len",name:"len",pkg:"syscall",typ:$Int,tag:""},{prop:"cap",name:"cap",pkg:"syscall",typ:$Int,tag:""}]);NX=$ptrType(EQ);NY=$mapType(MF,MD);NZ=$funcType([$Uintptr,$Uintptr,$Int,$Int,$Int,$Int64],[$Uintptr,$error],false);OA=$funcType([$Uintptr,$Uintptr],[$error],false);OE=$ptrType(KI);OF=$arrayType($Int64,2);OH=$arrayType($Int8,1024);OJ=$arrayType($Uint8,3);H=function(){$flushConsole=(function(){if(!((G.$length===0))){$global.console.log($externalize($bytesToString(G),$String));G=MD.nil;}});};I=function(){if(!F){console.log("warning: system calls not available, see https://github.com/gopherjs/gopherjs/blob/master/doc/syscalls.md");}F=true;};J=function(i){var i,j,k;j=$global.goPrintToConsole;if(!(j===undefined)){j(i);return;}G=$appendSlice(G,i);while(true){if(!(true)){break;}k=A.IndexByte(G,10);if(k===-1){break;}$global.console.log($externalize($bytesToString($subslice(G,0,k)),$String));G=$subslice(G,(k+1>>0));}};K=function(i){var i;};L=function(){var i,j,k,l,m,n;i=$global.process;if(i===undefined){return ME.nil;}j=i.env;k=$global.Object.keys(j);l=$makeSlice(ME,$parseInt(k.length));m=0;while(true){if(!(m<$parseInt(k.length))){break;}n=$internalize(k[m],$String);(m<0||m>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+m]=n+"="+$internalize(j[$externalize(n,$String)],$String);m=m+(1)>>0;}return l;};Q=function(i){var $deferred=[],$err=null,i,j;try{$deferFrames.push($deferred);$deferred.push([(function(){$recover();}),[]]);if(N===null){if(O){return null;}O=true;j=$global.require;if(j===undefined){$panic(new $String(""));}N=j($externalize("syscall",$String));}return N[$externalize(i,$String)];}catch(err){$err=err;return null;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};R=$pkg.Syscall=function(i,j,k,l){var aa,ab,i,j,k,l,m=0,n=0,o=0,p,q,r,s,t,u,v,w,x,y,z;p=Q("Syscall");if(!(p===null)){q=p(i,j,k,l);r=(($parseInt(q[0])>>0)>>>0);s=(($parseInt(q[1])>>0)>>>0);t=(($parseInt(q[2])>>0)>>>0);m=r;n=s;o=t;return[m,n,o];}if((i===4)&&((j===1)||(j===2))){u=k;v=$makeSlice(MD,$parseInt(u.length));v.$array=u;J(v);w=($parseInt(u.length)>>>0);x=0;y=0;m=w;n=x;o=y;return[m,n,o];}I();z=(P>>>0);aa=0;ab=13;m=z;n=aa;o=ab;return[m,n,o];};S=$pkg.Syscall6=function(i,j,k,l,m,n,o){var i,j,k,l,m,n,o,p=0,q=0,r=0,s,t,u,v,w,x,y,z;s=Q("Syscall6");if(!(s===null)){t=s(i,j,k,l,m,n,o);u=(($parseInt(t[0])>>0)>>>0);v=(($parseInt(t[1])>>0)>>>0);w=(($parseInt(t[2])>>0)>>>0);p=u;q=v;r=w;return[p,q,r];}if(!((i===202))){I();}x=(P>>>0);y=0;z=13;p=x;q=y;r=z;return[p,q,r];};V=$pkg.BytePtrFromString=function(i){var i,j,k,l,m,n;j=new($global.Uint8Array)(i.length+1>>0);k=new MD($stringToBytes(i));l=0;while(true){if(!(l=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+l]);if(n===0){return[MF.nil,new ER(22)];}j[m]=n;l++;}j[i.length]=0;return[j,$ifaceNil];};AU=function(){var i,j,k,l,m,n,o,p,q,r;AR=new $Map();i=AS;j=0;while(true){if(!(j=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]);m=0;while(true){if(!(m=AS.$length)?$throwRuntimeError("index out of range"):AS.$array[AS.$offset+k]="";}break;}m=m+(1)>>0;}j++;}};AW=$pkg.Getenv=function(i,$b){var $args=arguments,$deferred=[],$err=null,$r,$s=0,$this=this,j="",k=false,l,m,n,o,p,q,r,s,t,u,v,w,x,y;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){try{$deferFrames.push($deferred);s:while(true){switch($s){case 0:$r=AP.Do(AU,$BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}if(i.length===0){l="";m=false;j=l;k=m;return[j,k];}$r=AQ.RLock($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$deferred.push([$methodVal(AQ,"RUnlock"),[$BLOCKING]]);n=(o=AR[i],o!==undefined?[o.v,true]:[0,false]);p=n[0];q=n[1];if(!q){r="";s=false;j=r;k=s;return[j,k];}t=((p<0||p>=AS.$length)?$throwRuntimeError("index out of range"):AS.$array[AS.$offset+p]);u=0;while(true){if(!(u>0));w=true;j=v;k=w;return[j,k];}u=u+(1)>>0;}x="";y=false;j=x;k=y;return[j,k];case-1:}return;}}catch(err){$err=err;}finally{$deferFrames.pop();if($curGoroutine.asleep&&!$jumpToDefer){throw null;}$s=-1;$callDeferred($deferred,$err);return[j,k];}};$f.$blocking=true;return $f;};BH=$pkg.CloseOnExec=function(i){var i;GP(i,2,1);};CQ=function(i){var i;if(i<0){return"-"+CR((-i>>>0));}return CR((i>>>0));};CR=function(i){var i,j,k,l,m;j=$clone(MZ.zero(),MZ);k=31;while(true){if(!(i>=10)){break;}(k<0||k>=j.length)?$throwRuntimeError("index out of range"):j[k]=(((l=i%10,l===l?l:$throwRuntimeError("integer divide by zero"))+48>>>0)<<24>>>24);k=k-(1)>>0;i=(m=i/(10),(m===m&&m!==1/0&&m!==-1/0)?m>>>0:$throwRuntimeError("integer divide by zero"));}(k<0||k>=j.length)?$throwRuntimeError("index out of range"):j[k]=((i+48>>>0)<<24>>>24);return $bytesToString($subslice(new MD(j),k));};CT=$pkg.ByteSliceFromString=function(i){var i,j,k;j=0;while(true){if(!(j>0;}k=$makeSlice(MD,(i.length+1>>0));$copyString(k,i);return[k,$ifaceNil];};KI.ptr.prototype.Unix=function(){var i=new $Int64(0,0),j=new $Int64(0,0),k,l,m;k=this;l=k.Sec;m=k.Nsec;i=l;j=m;return[i,j];};KI.prototype.Unix=function(){return this.$val.Unix();};KI.ptr.prototype.Nano=function(){var i,j,k;i=this;return(j=$mul64(i.Sec,new $Int64(0,1000000000)),k=i.Nsec,new $Int64(j.$high+k.$high,j.$low+k.$low));};KI.prototype.Nano=function(){return this.$val.Nano();};CY=$pkg.ReadDirent=function(i,j){var i,j,k=0,l=$ifaceNil,m,n;m=new Uint8Array(8);n=HP(i,j,m);k=n[0];l=n[1];if(true&&($interfaceIsEqual(l,new ER(22))||$interfaceIsEqual(l,new ER(2)))){l=$ifaceNil;}return[k,l];};DO=$pkg.Sysctl=function(i){var i,j="",k=$ifaceNil,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;l=DY(i);m=l[0];k=l[1];if(!($interfaceIsEqual(k,$ifaceNil))){n="";o=k;j=n;k=o;return[j,k];}p=0;k=GM(m,MF.nil,new MT(function(){return p;},function($v){p=$v;}),MF.nil,0);if(!($interfaceIsEqual(k,$ifaceNil))){q="";r=k;j=q;k=r;return[j,k];}if(p===0){s="";t=$ifaceNil;j=s;k=t;return[j,k];}u=$makeSlice(MD,p);k=GM(m,new MF(function(){return((0<0||0>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+0]);},function($v){(0<0||0>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+0]=$v;},u),new MT(function(){return p;},function($v){p=$v;}),MF.nil,0);if(!($interfaceIsEqual(k,$ifaceNil))){v="";w=k;j=v;k=w;return[j,k];}if(p>0&&((x=p-1>>>0,((x<0||x>=u.$length)?$throwRuntimeError("index out of range"):u.$array[u.$offset+x]))===0)){p=p-(1)>>>0;}y=$bytesToString($subslice(u,0,p));z=$ifaceNil;j=y;k=z;return[j,k];};DY=function(i){var i,j=MS.nil,k=$ifaceNil,l,m,n,o,p,q,r,s,t,u,v,w;l=$clone(NH.zero(),NH);m=48;n=$sliceToArray(new NE(l));o=CT(i);p=o[0];k=o[1];if(!($interfaceIsEqual(k,$ifaceNil))){q=MS.nil;r=k;j=q;k=r;return[j,k];}k=GM(new MS([0,3]),n,new MT(function(){return m;},function($v){m=$v;}),new MF(function(){return((0<0||0>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+0]);},function($v){(0<0||0>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+0]=$v;},p),(i.length>>>0));if(!($interfaceIsEqual(k,$ifaceNil))){s=MS.nil;t=k;j=s;k=t;return[j,k];}u=$subslice(new MS(l),0,(v=m/4,(v===v&&v!==1/0&&v!==-1/0)?v>>>0:$throwRuntimeError("integer divide by zero")));w=$ifaceNil;j=u;k=w;return[j,k];};DZ=$pkg.ParseDirent=function(i,j,k){var i,j,k,l=0,m=0,n=ME.nil,o,p,q,r,s,t,u,v,w,x,y;o=i.$length;while(true){if(!(!((j===0))&&i.$length>0)){break;}p=[undefined];p[0]=(q=$sliceToArray(i),r=new KW.ptr(),s=new DataView(q.buffer,q.byteOffset),r.Ino=new $Uint64(s.getUint32(4,true),s.getUint32(0,true)),r.Seekoff=new $Uint64(s.getUint32(12,true),s.getUint32(8,true)),r.Reclen=s.getUint16(16,true),r.Namlen=s.getUint16(18,true),r.Type=s.getUint8(20,true),r.Name=new($nativeArray($kindInt8))(q.buffer,$min(q.byteOffset+21,q.buffer.byteLength)),r.Pad_cgo_0=new($nativeArray($kindUint8))(q.buffer,$min(q.byteOffset+1045,q.buffer.byteLength)),r);if(p[0].Reclen===0){i=MD.nil;break;}i=$subslice(i,p[0].Reclen);if((t=p[0].Ino,(t.$high===0&&t.$low===0))){continue;}u=$sliceToArray(new NE(p[0].Name));v=$bytesToString($subslice(new MD(u),0,p[0].Namlen));if(v==="."||v===".."){continue;}j=j-(1)>>0;m=m+(1)>>0;k=$append(k,v);}w=o-i.$length>>0;x=m;y=k;l=w;m=x;n=y;return[l,m,n];};EQ.ptr.prototype.Mmap=function(i,j,k,l,m,$b){var $args=arguments,$deferred=[],$err=null,$r,$s=0,$this=this,aa,ab,ac,ad,ae,n=MD.nil,o=$ifaceNil,p,q,r,s,t,u,v,w,x,y,z;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){try{$deferFrames.push($deferred);s:while(true){switch($s){case 0:p=$this;if(k<=0){q=MD.nil;r=new ER(22);n=q;o=r;return[n,o];}s=p.mmap(0,(k>>>0),l,m,i,j);t=s[0];u=s[1];if(!($interfaceIsEqual(u,$ifaceNil))){v=MD.nil;w=u;n=v;o=w;return[n,o];}x=new NK.ptr(t,k,k);y=x;ab=new MF(function(){return(aa=y.$capacity-1>>0,((aa<0||aa>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+aa]));},function($v){(z=y.$capacity-1>>0,(z<0||z>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+z]=$v);},y);$r=p.Mutex.Lock($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$deferred.push([$methodVal(p.Mutex,"Unlock"),[$BLOCKING]]);ac=ab;(p.active||$throwRuntimeError("assignment to entry in nil map"))[ac.$key()]={k:ac,v:y};ad=y;ae=$ifaceNil;n=ad;o=ae;return[n,o];case-1:}return;}}catch(err){$err=err;}finally{$deferFrames.pop();if($curGoroutine.asleep&&!$jumpToDefer){throw null;}$s=-1;$callDeferred($deferred,$err);return[n,o];}};$f.$blocking=true;return $f;};EQ.prototype.Mmap=function(i,j,k,l,m,$b){return this.$val.Mmap(i,j,k,l,m,$b);};EQ.ptr.prototype.Munmap=function(i,$b){var $args=arguments,$deferred=[],$err=null,$r,$s=0,$this=this,j=$ifaceNil,k,l,m,n,o,p,q;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){try{$deferFrames.push($deferred);s:while(true){switch($s){case 0:k=$this;if((i.$length===0)||!((i.$length===i.$capacity))){j=new ER(22);return j;}n=new MF(function(){return(m=i.$capacity-1>>0,((m<0||m>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+m]));},function($v){(l=i.$capacity-1>>0,(l<0||l>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+l]=$v);},i);$r=k.Mutex.Lock($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$deferred.push([$methodVal(k.Mutex,"Unlock"),[$BLOCKING]]);p=(o=k.active[n.$key()],o!==undefined?o.v:MD.nil);if(p===MD.nil||!($pointerIsEqual(new MF(function(){return((0<0||0>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+0]);},function($v){(0<0||0>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+0]=$v;},p),new MF(function(){return((0<0||0>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+0]);},function($v){(0<0||0>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+0]=$v;},i)))){j=new ER(22);return j;}q=k.munmap($sliceToArray(p),(p.$length>>>0));if(!($interfaceIsEqual(q,$ifaceNil))){j=q;return j;}delete k.active[n.$key()];j=$ifaceNil;return j;case-1:}return;}}catch(err){$err=err;}finally{$deferFrames.pop();if($curGoroutine.asleep&&!$jumpToDefer){throw null;}$s=-1;$callDeferred($deferred,$err);return j;}};$f.$blocking=true;return $f;};EQ.prototype.Munmap=function(i,$b){return this.$val.Munmap(i,$b);};ER.prototype.Error=function(){var i,j;i=this.$val;if(0<=(i>>0)&&(i>>0)<106){j=((i<0||i>=FS.length)?$throwRuntimeError("index out of range"):FS[i]);if(!(j==="")){return j;}}return"errno "+CQ((i>>0));};$ptrType(ER).prototype.Error=function(){return new ER(this.$get()).Error();};ER.prototype.Temporary=function(){var i;i=this.$val;return(i===4)||(i===24)||(i===54)||(i===53)||new ER(i).Timeout();};$ptrType(ER).prototype.Temporary=function(){return new ER(this.$get()).Temporary();};ER.prototype.Timeout=function(){var i;i=this.$val;return(i===35)||(i===35)||(i===60);};$ptrType(ER).prototype.Timeout=function(){return new ER(this.$get()).Timeout();};ET=$pkg.Read=function(i,j){var i,j,k=0,l=$ifaceNil,m;m=IV(i,j);k=m[0];l=m[1];return[k,l];};EU=$pkg.Write=function(i,j){var i,j,k=0,l=$ifaceNil,m;m=JY(i,j);k=m[0];l=m[1];return[k,l];};GM=function(i,j,k,l,m){var i,j,k,l,m,n=$ifaceNil,o,p,q;o=0;if(i.$length>0){o=$sliceToArray(i);}else{o=new Uint8Array(0);}p=S(202,o,(i.$length>>>0),j,k,l,m);q=p[2];if(!((q===0))){n=new ER(q);}return n;};GP=function(i,j,k){var i,j,k,l=0,m=$ifaceNil,n,o,p;n=R(92,(i>>>0),(j>>>0),(k>>>0));o=n[0];p=n[2];l=(o>>0);if(!((p===0))){m=new ER(p);}return[l,m];};HA=$pkg.Close=function(i){var i,j=$ifaceNil,k,l;k=R(6,(i>>>0),0,0);l=k[2];if(!((l===0))){j=new ER(l);}return j;};HE=$pkg.Exit=function(i){var i;R(1,(i>>>0),0,0);return;};HF=$pkg.Fchdir=function(i){var i,j=$ifaceNil,k,l;k=R(13,(i>>>0),0,0);l=k[2];if(!((l===0))){j=new ER(l);}return j;};HH=$pkg.Fchmod=function(i,j){var i,j,k=$ifaceNil,l,m;l=R(124,(i>>>0),(j>>>0),0);m=l[2];if(!((m===0))){k=new ER(m);}return k;};HI=$pkg.Fchown=function(i,j,k){var i,j,k,l=$ifaceNil,m,n;m=R(123,(i>>>0),(j>>>0),(k>>>0));n=m[2];if(!((n===0))){l=new ER(n);}return l;};HL=$pkg.Fstat=function(i,j){var i,j,k=$ifaceNil,l,m,n,o,p;m=new Uint8Array(144);l=R(339,(i>>>0),m,0);p=l[2];n=j,o=new DataView(m.buffer,m.byteOffset),n.Dev=o.getInt32(0,true),n.Mode=o.getUint16(4,true),n.Nlink=o.getUint16(6,true),n.Ino=new $Uint64(o.getUint32(12,true),o.getUint32(8,true)),n.Uid=o.getUint32(16,true),n.Gid=o.getUint32(20,true),n.Rdev=o.getInt32(24,true),n.Pad_cgo_0=new($nativeArray($kindUint8))(m.buffer,$min(m.byteOffset+28,m.buffer.byteLength)),n.Atimespec.Sec=new $Int64(o.getUint32(36,true),o.getUint32(32,true)),n.Atimespec.Nsec=new $Int64(o.getUint32(44,true),o.getUint32(40,true)),n.Mtimespec.Sec=new $Int64(o.getUint32(52,true),o.getUint32(48,true)),n.Mtimespec.Nsec=new $Int64(o.getUint32(60,true),o.getUint32(56,true)),n.Ctimespec.Sec=new $Int64(o.getUint32(68,true),o.getUint32(64,true)),n.Ctimespec.Nsec=new $Int64(o.getUint32(76,true),o.getUint32(72,true)),n.Birthtimespec.Sec=new $Int64(o.getUint32(84,true),o.getUint32(80,true)),n.Birthtimespec.Nsec=new $Int64(o.getUint32(92,true),o.getUint32(88,true)),n.Size=new $Int64(o.getUint32(100,true),o.getUint32(96,true)),n.Blocks=new $Int64(o.getUint32(108,true),o.getUint32(104,true)),n.Blksize=o.getInt32(112,true),n.Flags=o.getUint32(116,true),n.Gen=o.getUint32(120,true),n.Lspare=o.getInt32(124,true),n.Qspare=new($nativeArray($kindInt64))(m.buffer,$min(m.byteOffset+128,m.buffer.byteLength));if(!((p===0))){k=new ER(p);}return k;};HN=$pkg.Fsync=function(i){var i,j=$ifaceNil,k,l;k=R(95,(i>>>0),0,0);l=k[2];if(!((l===0))){j=new ER(l);}return j;};HO=$pkg.Ftruncate=function(i,j){var i,j,k=$ifaceNil,l,m;l=R(201,(i>>>0),(j.$low>>>0),0);m=l[2];if(!((m===0))){k=new ER(m);}return k;};HP=$pkg.Getdirentries=function(i,j,k){var i,j,k,l=0,m=$ifaceNil,n,o,p,q;n=0;if(j.$length>0){n=$sliceToArray(j);}else{n=new Uint8Array(0);}o=S(344,(i>>>0),n,(j.$length>>>0),k,0,0);p=o[0];q=o[2];l=(p>>0);if(!((q===0))){m=new ER(q);}return[l,m];};II=$pkg.Lstat=function(i,j){var i,j,k=$ifaceNil,l,m,n,o,p,q,r;l=MF.nil;m=V(i);l=m[0];k=m[1];if(!($interfaceIsEqual(k,$ifaceNil))){return k;}o=new Uint8Array(144);n=R(340,l,o,0);r=n[2];p=j,q=new DataView(o.buffer,o.byteOffset),p.Dev=q.getInt32(0,true),p.Mode=q.getUint16(4,true),p.Nlink=q.getUint16(6,true),p.Ino=new $Uint64(q.getUint32(12,true),q.getUint32(8,true)),p.Uid=q.getUint32(16,true),p.Gid=q.getUint32(20,true),p.Rdev=q.getInt32(24,true),p.Pad_cgo_0=new($nativeArray($kindUint8))(o.buffer,$min(o.byteOffset+28,o.buffer.byteLength)),p.Atimespec.Sec=new $Int64(q.getUint32(36,true),q.getUint32(32,true)),p.Atimespec.Nsec=new $Int64(q.getUint32(44,true),q.getUint32(40,true)),p.Mtimespec.Sec=new $Int64(q.getUint32(52,true),q.getUint32(48,true)),p.Mtimespec.Nsec=new $Int64(q.getUint32(60,true),q.getUint32(56,true)),p.Ctimespec.Sec=new $Int64(q.getUint32(68,true),q.getUint32(64,true)),p.Ctimespec.Nsec=new $Int64(q.getUint32(76,true),q.getUint32(72,true)),p.Birthtimespec.Sec=new $Int64(q.getUint32(84,true),q.getUint32(80,true)),p.Birthtimespec.Nsec=new $Int64(q.getUint32(92,true),q.getUint32(88,true)),p.Size=new $Int64(q.getUint32(100,true),q.getUint32(96,true)),p.Blocks=new $Int64(q.getUint32(108,true),q.getUint32(104,true)),p.Blksize=q.getInt32(112,true),p.Flags=q.getUint32(116,true),p.Gen=q.getUint32(120,true),p.Lspare=q.getInt32(124,true),p.Qspare=new($nativeArray($kindInt64))(o.buffer,$min(o.byteOffset+128,o.buffer.byteLength));K(l);if(!((r===0))){k=new ER(r);}return k;};IR=$pkg.Open=function(i,j,k){var i,j,k,l=0,m=$ifaceNil,n,o,p,q,r;n=MF.nil;o=V(i);n=o[0];m=o[1];if(!($interfaceIsEqual(m,$ifaceNil))){return[l,m];}p=R(5,n,(j>>>0),(k>>>0));q=p[0];r=p[2];K(n);l=(q>>0);if(!((r===0))){m=new ER(r);}return[l,m];};IT=$pkg.Pread=function(i,j,k){var i,j,k,l=0,m=$ifaceNil,n,o,p,q;n=0;if(j.$length>0){n=$sliceToArray(j);}else{n=new Uint8Array(0);}o=S(153,(i>>>0),n,(j.$length>>>0),(k.$low>>>0),0,0);p=o[0];q=o[2];l=(p>>0);if(!((q===0))){m=new ER(q);}return[l,m];};IU=$pkg.Pwrite=function(i,j,k){var i,j,k,l=0,m=$ifaceNil,n,o,p,q;n=0;if(j.$length>0){n=$sliceToArray(j);}else{n=new Uint8Array(0);}o=S(154,(i>>>0),n,(j.$length>>>0),(k.$low>>>0),0,0);p=o[0];q=o[2];l=(p>>0);if(!((q===0))){m=new ER(q);}return[l,m];};IV=function(i,j){var i,j,k=0,l=$ifaceNil,m,n,o,p;m=0;if(j.$length>0){m=$sliceToArray(j);}else{m=new Uint8Array(0);}n=R(3,(i>>>0),m,(j.$length>>>0));o=n[0];p=n[2];k=(o>>0);if(!((p===0))){l=new ER(p);}return[k,l];};JA=$pkg.Seek=function(i,j,k){var i,j,k,l=new $Int64(0,0),m=$ifaceNil,n,o,p;n=R(199,(i>>>0),(j.$low>>>0),(k>>>0));o=n[0];p=n[2];l=new $Int64(0,o.constructor===Number?o:1);if(!((p===0))){m=new ER(p);}return[l,m];};JY=function(i,j){var i,j,k=0,l=$ifaceNil,m,n,o,p;m=0;if(j.$length>0){m=$sliceToArray(j);}else{m=new Uint8Array(0);}n=R(4,(i>>>0),m,(j.$length>>>0));o=n[0];p=n[2];k=(o>>0);if(!((p===0))){l=new ER(p);}return[k,l];};JZ=function(i,j,k,l,m,n){var i,j,k,l,m,n,o=0,p=$ifaceNil,q,r,s;q=S(197,i,j,(k>>>0),(l>>>0),(m>>>0),(n.$low>>>0));r=q[0];s=q[2];o=r;if(!((s===0))){p=new ER(s);}return[o,p];};KA=function(i,j){var i,j,k=$ifaceNil,l,m;l=R(73,i,j,0);m=l[2];if(!((m===0))){k=new ER(m);}return k;};NX.methods=[{prop:"Mmap",name:"Mmap",pkg:"",typ:$funcType([$Int,$Int64,$Int,$Int,$Int],[MD,$error],false)},{prop:"Munmap",name:"Munmap",pkg:"",typ:$funcType([MD],[$error],false)}];ER.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)},{prop:"Temporary",name:"Temporary",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Timeout",name:"Timeout",pkg:"",typ:$funcType([],[$Bool],false)}];OE.methods=[{prop:"Unix",name:"Unix",pkg:"",typ:$funcType([],[$Int64,$Int64],false)},{prop:"Nano",name:"Nano",pkg:"",typ:$funcType([],[$Int64],false)}];EQ.init([{prop:"Mutex",name:"",pkg:"",typ:C.Mutex,tag:""},{prop:"active",name:"active",pkg:"syscall",typ:NY,tag:""},{prop:"mmap",name:"mmap",pkg:"syscall",typ:NZ,tag:""},{prop:"munmap",name:"munmap",pkg:"syscall",typ:OA,tag:""}]);KI.init([{prop:"Sec",name:"Sec",pkg:"",typ:$Int64,tag:""},{prop:"Nsec",name:"Nsec",pkg:"",typ:$Int64,tag:""}]);KO.init([{prop:"Dev",name:"Dev",pkg:"",typ:$Int32,tag:""},{prop:"Mode",name:"Mode",pkg:"",typ:$Uint16,tag:""},{prop:"Nlink",name:"Nlink",pkg:"",typ:$Uint16,tag:""},{prop:"Ino",name:"Ino",pkg:"",typ:$Uint64,tag:""},{prop:"Uid",name:"Uid",pkg:"",typ:$Uint32,tag:""},{prop:"Gid",name:"Gid",pkg:"",typ:$Uint32,tag:""},{prop:"Rdev",name:"Rdev",pkg:"",typ:$Int32,tag:""},{prop:"Pad_cgo_0",name:"Pad_cgo_0",pkg:"",typ:NG,tag:""},{prop:"Atimespec",name:"Atimespec",pkg:"",typ:KI,tag:""},{prop:"Mtimespec",name:"Mtimespec",pkg:"",typ:KI,tag:""},{prop:"Ctimespec",name:"Ctimespec",pkg:"",typ:KI,tag:""},{prop:"Birthtimespec",name:"Birthtimespec",pkg:"",typ:KI,tag:""},{prop:"Size",name:"Size",pkg:"",typ:$Int64,tag:""},{prop:"Blocks",name:"Blocks",pkg:"",typ:$Int64,tag:""},{prop:"Blksize",name:"Blksize",pkg:"",typ:$Int32,tag:""},{prop:"Flags",name:"Flags",pkg:"",typ:$Uint32,tag:""},{prop:"Gen",name:"Gen",pkg:"",typ:$Uint32,tag:""},{prop:"Lspare",name:"Lspare",pkg:"",typ:$Int32,tag:""},{prop:"Qspare",name:"Qspare",pkg:"",typ:OF,tag:""}]);KW.init([{prop:"Ino",name:"Ino",pkg:"",typ:$Uint64,tag:""},{prop:"Seekoff",name:"Seekoff",pkg:"",typ:$Uint64,tag:""},{prop:"Reclen",name:"Reclen",pkg:"",typ:$Uint16,tag:""},{prop:"Namlen",name:"Namlen",pkg:"",typ:$Uint16,tag:""},{prop:"Type",name:"Type",pkg:"",typ:$Uint8,tag:""},{prop:"Name",name:"Name",pkg:"",typ:OH,tag:""},{prop:"Pad_cgo_0",name:"Pad_cgo_0",pkg:"",typ:OJ,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_syscall=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}G=MD.nil;AP=new C.Once.ptr();AQ=new C.RWMutex.ptr();AR=false;F=false;N=null;O=false;P=-1;AS=L();$pkg.Stdin=0;$pkg.Stdout=1;$pkg.Stderr=2;FS=$toNativeArray($kindString,["","operation not permitted","no such file or directory","no such process","interrupted system call","input/output error","device not configured","argument list too long","exec format error","bad file descriptor","no child processes","resource deadlock avoided","cannot allocate memory","permission denied","bad address","block device required","resource busy","file exists","cross-device link","operation not supported by device","not a directory","is a directory","invalid argument","too many open files in system","too many open files","inappropriate ioctl for device","text file busy","file too large","no space left on device","illegal seek","read-only file system","too many links","broken pipe","numerical argument out of domain","result too large","resource temporarily unavailable","operation now in progress","operation already in progress","socket operation on non-socket","destination address required","message too long","protocol wrong type for socket","protocol not available","protocol not supported","socket type not supported","operation not supported","protocol family not supported","address family not supported by protocol family","address already in use","can't assign requested address","network is down","network is unreachable","network dropped connection on reset","software caused connection abort","connection reset by peer","no buffer space available","socket is already connected","socket is not connected","can't send after socket shutdown","too many references: can't splice","operation timed out","connection refused","too many levels of symbolic links","file name too long","host is down","no route to host","directory not empty","too many processes","too many users","disc quota exceeded","stale NFS file handle","too many levels of remote in path","RPC struct is bad","RPC version wrong","RPC prog. not avail","program version wrong","bad procedure for program","no locks available","function not implemented","inappropriate file type or format","authentication error","need authenticator","device power is off","device error","value too large to be stored in data type","bad executable (or shared library)","bad CPU type in executable","shared library version mismatch","malformed Mach-o file","operation canceled","identifier removed","no message of desired type","illegal byte sequence","attribute not found","bad message","EMULTIHOP (Reserved)","no message available on STREAM","ENOLINK (Reserved)","no STREAM resources","not a STREAM","protocol error","STREAM ioctl timeout","operation not supported on socket","policy not found","state not recoverable","previous owner died"]);DT=new EQ.ptr(new C.Mutex.ptr(),new $Map(),JZ,KA);H();}return;}};$init_syscall.$blocking=true;return $init_syscall;};return $pkg;})(); +$packages["github.com/gopherjs/gopherjs/nosync"]=(function(){var $pkg={},A,B,D,F,G,I,J;A=$pkg.Mutex=$newType(0,$kindStruct,"nosync.Mutex","Mutex","github.com/gopherjs/gopherjs/nosync",function(locked_){this.$val=this;this.locked=locked_!==undefined?locked_:false;});B=$pkg.RWMutex=$newType(0,$kindStruct,"nosync.RWMutex","RWMutex","github.com/gopherjs/gopherjs/nosync",function(writeLocked_,readLockCounter_){this.$val=this;this.writeLocked=writeLocked_!==undefined?writeLocked_:false;this.readLockCounter=readLockCounter_!==undefined?readLockCounter_:0;});D=$pkg.Once=$newType(0,$kindStruct,"nosync.Once","Once","github.com/gopherjs/gopherjs/nosync",function(doing_,done_){this.$val=this;this.doing=doing_!==undefined?doing_:false;this.done=done_!==undefined?done_:false;});F=$ptrType(A);G=$ptrType(B);I=$funcType([],[],false);J=$ptrType(D);A.ptr.prototype.Lock=function(){var a;a=this;if(a.locked){$panic(new $String("nosync: mutex is already locked"));}a.locked=true;};A.prototype.Lock=function(){return this.$val.Lock();};A.ptr.prototype.Unlock=function(){var a;a=this;if(!a.locked){$panic(new $String("nosync: unlock of unlocked mutex"));}a.locked=false;};A.prototype.Unlock=function(){return this.$val.Unlock();};B.ptr.prototype.Lock=function(){var a;a=this;if(!((a.readLockCounter===0))||a.writeLocked){$panic(new $String("nosync: mutex is already locked"));}a.writeLocked=true;};B.prototype.Lock=function(){return this.$val.Lock();};B.ptr.prototype.Unlock=function(){var a;a=this;if(!a.writeLocked){$panic(new $String("nosync: unlock of unlocked mutex"));}a.writeLocked=false;};B.prototype.Unlock=function(){return this.$val.Unlock();};B.ptr.prototype.RLock=function(){var a;a=this;if(a.writeLocked){$panic(new $String("nosync: mutex is already locked"));}a.readLockCounter=a.readLockCounter+(1)>>0;};B.prototype.RLock=function(){return this.$val.RLock();};B.ptr.prototype.RUnlock=function(){var a;a=this;if(a.readLockCounter===0){$panic(new $String("nosync: unlock of unlocked mutex"));}a.readLockCounter=a.readLockCounter-(1)>>0;};B.prototype.RUnlock=function(){return this.$val.RUnlock();};D.ptr.prototype.Do=function(a){var $deferred=[],$err=null,a,b;try{$deferFrames.push($deferred);b=this;if(b.done){return;}if(b.doing){$panic(new $String("nosync: Do called within f"));}b.doing=true;$deferred.push([(function(){b.doing=false;b.done=true;}),[]]);a();}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};D.prototype.Do=function(a){return this.$val.Do(a);};F.methods=[{prop:"Lock",name:"Lock",pkg:"",typ:$funcType([],[],false)},{prop:"Unlock",name:"Unlock",pkg:"",typ:$funcType([],[],false)}];G.methods=[{prop:"Lock",name:"Lock",pkg:"",typ:$funcType([],[],false)},{prop:"Unlock",name:"Unlock",pkg:"",typ:$funcType([],[],false)},{prop:"RLock",name:"RLock",pkg:"",typ:$funcType([],[],false)},{prop:"RUnlock",name:"RUnlock",pkg:"",typ:$funcType([],[],false)}];J.methods=[{prop:"Do",name:"Do",pkg:"",typ:$funcType([I],[],false)}];A.init([{prop:"locked",name:"locked",pkg:"github.com/gopherjs/gopherjs/nosync",typ:$Bool,tag:""}]);B.init([{prop:"writeLocked",name:"writeLocked",pkg:"github.com/gopherjs/gopherjs/nosync",typ:$Bool,tag:""},{prop:"readLockCounter",name:"readLockCounter",pkg:"github.com/gopherjs/gopherjs/nosync",typ:$Int,tag:""}]);D.init([{prop:"doing",name:"doing",pkg:"github.com/gopherjs/gopherjs/nosync",typ:$Bool,tag:""},{prop:"done",name:"done",pkg:"github.com/gopherjs/gopherjs/nosync",typ:$Bool,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_nosync=function(){while(true){switch($s){case 0:}return;}};$init_nosync.$blocking=true;return $init_nosync;};return $pkg;})(); +$packages["strings"]=(function(){var $pkg={},B,A,C,E,D,BY,CH,F,AA,AB,AC,AD,AE,AG,AH,AI,AJ,AM,AP,AR,AS,AT,AU,AV,AW,AX,AZ,BG,BH,BI,BL,BM,BR,BT,BU;B=$packages["errors"];A=$packages["github.com/gopherjs/gopherjs/js"];C=$packages["io"];E=$packages["unicode"];D=$packages["unicode/utf8"];BY=$sliceType($Uint8);CH=$sliceType($String);F=$pkg.IndexByte=function(b,c){var b,c;return $parseInt(b.indexOf($global.String.fromCharCode(c)))>>0;};AA=function(b,c){var b,c,d,e,f,g,h,i,j,k,l;if(c===0){return CH.nil;}d=D.RuneCountInString(b);if(c<=0||c>d){c=d;}e=$makeSlice(CH,c);f=0;g=0;h=0;i=0;j=h;k=i;while(true){if(!((j+1>>0)=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+j]="\xEF\xBF\xBD";}else{(j<0||j>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+j]=b.substring(k,(k+f>>0));}k=k+(f)>>0;j=j+(1)>>0;}if(k=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+j]=b.substring(k);}return e;};AB=function(b){var b,c,d,e,f,g,h,i,j,k;c=0;d=0;while(true){if(!(d>>16<<16)*16777619>>>0)+(c<<16>>>16)*16777619)>>>0)+(b.charCodeAt(d)>>>0)>>>0;d=d+(1)>>0;}e=1;f=16777619;g=e;h=f;i=b.length;while(true){if(!(i>0)){break;}if(!(((i&1)===0))){g=(j=h,(((g>>>16<<16)*j>>>0)+(g<<16>>>16)*j)>>>0);}h=(k=h,(((h>>>16<<16)*k>>>0)+(h<<16>>>16)*k)>>>0);i=(i>>$min((1),31))>>0;}return[c,g];};AC=function(b){var b,c,d,e,f,g,h,i,j,k;c=0;d=b.length-1>>0;while(true){if(!(d>=0)){break;}c=((((c>>>16<<16)*16777619>>>0)+(c<<16>>>16)*16777619)>>>0)+(b.charCodeAt(d)>>>0)>>>0;d=d-(1)>>0;}e=1;f=16777619;g=e;h=f;i=b.length;while(true){if(!(i>0)){break;}if(!(((i&1)===0))){g=(j=h,(((g>>>16<<16)*j>>>0)+(g<<16>>>16)*j)>>>0);}h=(k=h,(((h>>>16<<16)*k>>>0)+(h<<16>>>16)*k)>>>0);i=(i>>$min((1),31))>>0;}return[c,g];};AD=$pkg.Count=function(b,c){var b,c,d,e,f,g,h,i,j,k,l,m,n,o;d=0;if(c.length===0){return D.RuneCountInString(b)+1>>0;}else if(c.length===1){e=c.charCodeAt(0);f=0;while(true){if(!(f>0;}f=f+(1)>>0;}return d;}else if(c.length>b.length){return 0;}else if(c.length===b.length){if(c===b){return 1;}return 0;}g=AB(c);h=g[0];i=g[1];j=0;k=0;while(true){if(!(k>>16<<16)*16777619>>>0)+(j<<16>>>16)*16777619)>>>0)+(b.charCodeAt(k)>>>0)>>>0;k=k+(1)>>0;}l=0;if((j===h)&&b.substring(0,c.length)===c){d=d+(1)>>0;l=c.length;}m=c.length;while(true){if(!(m>>16<<16)*n>>>0)+(j<<16>>>16)*n)>>>0);j=j+((b.charCodeAt(m)>>>0))>>>0;j=j-((o=(b.charCodeAt((m-c.length>>0))>>>0),(((i>>>16<<16)*o>>>0)+(i<<16>>>16)*o)>>>0))>>>0;m=m+(1)>>0;if((j===h)&&l<=(m-c.length>>0)&&b.substring((m-c.length>>0),m)===c){d=d+(1)>>0;l=m;}}return d;};AE=$pkg.Contains=function(b,c){var b,c;return AH(b,c)>=0;};AG=$pkg.ContainsRune=function(b,c){var b,c;return AJ(b,c)>=0;};AH=$pkg.Index=function(b,c){var b,c,d,e,f,g,h,i,j,k,l;d=c.length;if(d===0){return 0;}else if(d===1){return F(b,c.charCodeAt(0));}else if(d===b.length){if(c===b){return 0;}return-1;}else if(d>b.length){return-1;}e=AB(c);f=e[0];g=e[1];h=0;i=0;while(true){if(!(i>>16<<16)*16777619>>>0)+(h<<16>>>16)*16777619)>>>0)+(b.charCodeAt(i)>>>0)>>>0;i=i+(1)>>0;}if((h===f)&&b.substring(0,d)===c){return 0;}j=d;while(true){if(!(j>>16<<16)*k>>>0)+(h<<16>>>16)*k)>>>0);h=h+((b.charCodeAt(j)>>>0))>>>0;h=h-((l=(b.charCodeAt((j-d>>0))>>>0),(((g>>>16<<16)*l>>>0)+(g<<16>>>16)*l)>>>0))>>>0;j=j+(1)>>0;if((h===f)&&b.substring((j-d>>0),j)===c){return j-d>>0;}}return-1;};AI=$pkg.LastIndex=function(b,c){var b,c,d,e,f,g,h,i,j,k,l,m,n,o;d=c.length;if(d===0){return b.length;}else if(d===1){e=c.charCodeAt(0);f=b.length-1>>0;while(true){if(!(f>=0)){break;}if(b.charCodeAt(f)===e){return f;}f=f-(1)>>0;}return-1;}else if(d===b.length){if(c===b){return 0;}return-1;}else if(d>b.length){return-1;}g=AC(c);h=g[0];i=g[1];j=b.length-d>>0;k=0;l=b.length-1>>0;while(true){if(!(l>=j)){break;}k=((((k>>>16<<16)*16777619>>>0)+(k<<16>>>16)*16777619)>>>0)+(b.charCodeAt(l)>>>0)>>>0;l=l-(1)>>0;}if((k===h)&&b.substring(j)===c){return j;}m=j-1>>0;while(true){if(!(m>=0)){break;}k=(n=16777619,(((k>>>16<<16)*n>>>0)+(k<<16>>>16)*n)>>>0);k=k+((b.charCodeAt(m)>>>0))>>>0;k=k-((o=(b.charCodeAt((m+d>>0))>>>0),(((i>>>16<<16)*o>>>0)+(i<<16>>>16)*o)>>>0))>>>0;if((k===h)&&b.substring(m,(m+d>>0))===c){return m;}m=m-(1)>>0;}return-1;};AJ=$pkg.IndexRune=function(b,c){var b,c,d,e,f,g,h;if(c<128){return F(b,(c<<24>>>24));}else{d=b;e=0;while(true){if(!(e>0;}f=c.charCodeAt(0);g=0;h=$makeSlice(CH,e);i=0;j=0;while(true){if(!((j+c.length>>0)<=b.length&&(i+1>>0)>0))===c)){(i<0||i>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i]=b.substring(g,(j+d>>0));i=i+(1)>>0;g=j+c.length>>0;j=j+((c.length-1>>0))>>0;}j=j+(1)>>0;}(i<0||i>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i]=b.substring(g);return $subslice(h,0,(i+1>>0));};AP=$pkg.Split=function(b,c){var b,c;return AM(b,c,0,-1);};AR=$pkg.Fields=function(b){var b;return AS(b,E.IsSpace);};AS=$pkg.FieldsFunc=function(b,c){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;d=0;e=false;f=b;g=0;while(true){if(!(g>0;}g+=h[1];}k=$makeSlice(CH,d);l=0;m=-1;n=b;o=0;while(true){if(!(o=0){(l<0||l>=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+l]=b.substring(m,q);l=l+(1)>>0;m=-1;}}else if(m===-1){m=q;}o+=p[1];}if(m>=0){(l<0||l>=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+l]=b.substring(m);}return k;};AT=$pkg.Join=function(b,c){var b,c,d,e,f,g,h,i,j;if(b.$length===0){return"";}if(b.$length===1){return((0<0||0>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+0]);}d=c.length*((b.$length-1>>0))>>0;e=0;while(true){if(!(e=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+e]).length)>>0;e=e+(1)>>0;}f=$makeSlice(BY,d);g=$copyString(f,((0<0||0>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+0]));h=$subslice(b,1);i=0;while(true){if(!(i=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i]);g=g+($copyString($subslice(f,g),c))>>0;g=g+($copyString($subslice(f,g),j))>>0;i++;}return $bytesToString(f);};AU=$pkg.HasPrefix=function(b,c){var b,c;return b.length>=c.length&&b.substring(0,c.length)===c;};AV=$pkg.HasSuffix=function(b,c){var b,c;return b.length>=c.length&&b.substring((b.length-c.length>>0))===c;};AW=$pkg.Map=function(b,c){var b,c,d,e,f,g,h,i,j,k,l,m,n;d=c.length;e=0;f=BY.nil;g=c;h=0;while(true){if(!(h=0){m=1;if(l>=128){m=D.RuneLen(l);}if((e+m>>0)>d){d=(d*2>>0)+4>>0;n=$makeSlice(BY,d);$copySlice(n,$subslice(f,0,e));f=n;}e=e+(D.EncodeRune($subslice(f,e,d),l))>>0;}h+=i[1];}if(f===BY.nil){return c;}return $bytesToString($subslice(f,0,e));};AX=$pkg.Repeat=function(b,c){var b,c,d,e;d=$makeSlice(BY,(b.length*c>>0));e=$copyString(d,b);while(true){if(!(e>0;}return $bytesToString(d);};AZ=$pkg.ToLower=function(b){var b;return AW(E.ToLower,b);};BG=$pkg.TrimLeftFunc=function(b,c){var b,c,d;d=BL(b,c,false);if(d===-1){return"";}return b.substring(d);};BH=$pkg.TrimRightFunc=function(b,c){var b,c,d,e,f;d=BM(b,c,false);if(d>=0&&b.charCodeAt(d)>=128){e=D.DecodeRuneInString(b.substring(d));f=e[1];d=d+(f)>>0;}else{d=d+(1)>>0;}return b.substring(0,d);};BI=$pkg.TrimFunc=function(b,c){var b,c;return BH(BG(b,c),c);};BL=function(b,c,d){var b,c,d,e,f,g,h;e=0;while(true){if(!(e>0);if(g>=128){h=D.DecodeRuneInString(b.substring(e));g=h[0];f=h[1];}if(c(g)===d){return e;}e=e+(f)>>0;}return-1;};BM=function(b,c,d){var b,c,d,e,f,g,h;e=b.length;while(true){if(!(e>0)){break;}f=D.DecodeLastRuneInString(b.substring(0,e));g=f[0];h=f[1];e=e-(h)>>0;if(c(g)===d){return e;}}return-1;};BR=$pkg.TrimSpace=function(b){var b;return BI(b,E.IsSpace);};BT=$pkg.TrimSuffix=function(b,c){var b,c;if(AV(b,c)){return b.substring(0,(b.length-c.length>>0));}return b;};BU=$pkg.Replace=function(b,c,d,e){var b,c,d,e,f,g,h,i,j,k,l,m;if(c===d||(e===0)){return b;}f=AD(b,c);if(f===0){return b;}else if(e<0||f>0))>>0)>>0));h=0;i=0;j=0;while(true){if(!(j0){l=D.DecodeRuneInString(b.substring(i));m=l[1];k=k+(m)>>0;}}else{k=k+(AH(b.substring(i),c))>>0;}h=h+($copyString($subslice(g,h),b.substring(i,k)))>>0;h=h+($copyString($subslice(g,h),d))>>0;i=k+c.length>>0;j=j+(1)>>0;}h=h+($copyString($subslice(g,h),b.substring(i)))>>0;return $bytesToString($subslice(g,0,h));};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_strings=function(){while(true){switch($s){case 0:$r=B.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}}return;}};$init_strings.$blocking=true;return $init_strings;};return $pkg;})(); +$packages["time"]=(function(){var $pkg={},C,B,E,F,A,D,AB,BG,BH,BJ,BN,CA,CB,CC,CW,CX,CY,CZ,DD,DE,DF,DG,DH,DN,DQ,N,Q,R,S,T,X,AA,AN,AP,BI,BK,BS,CD,CE,CF,CH,CL,CS,h,i,j,k,H,O,P,U,V,W,Y,Z,AC,AD,AE,AF,AG,AH,AJ,AK,AL,AM,AO,AQ,BL,BM,BO,BP,BR,BV,BW,BX,BY,BZ,CG;C=$packages["errors"];B=$packages["github.com/gopherjs/gopherjs/js"];E=$packages["github.com/gopherjs/gopherjs/nosync"];F=$packages["runtime"];A=$packages["strings"];D=$packages["syscall"];AB=$pkg.ParseError=$newType(0,$kindStruct,"time.ParseError","ParseError","time",function(Layout_,Value_,LayoutElem_,ValueElem_,Message_){this.$val=this;this.Layout=Layout_!==undefined?Layout_:"";this.Value=Value_!==undefined?Value_:"";this.LayoutElem=LayoutElem_!==undefined?LayoutElem_:"";this.ValueElem=ValueElem_!==undefined?ValueElem_:"";this.Message=Message_!==undefined?Message_:"";});BG=$pkg.Time=$newType(0,$kindStruct,"time.Time","Time","time",function(sec_,nsec_,loc_){this.$val=this;this.sec=sec_!==undefined?sec_:new $Int64(0,0);this.nsec=nsec_!==undefined?nsec_:0;this.loc=loc_!==undefined?loc_:DH.nil;});BH=$pkg.Month=$newType(4,$kindInt,"time.Month","Month","time",null);BJ=$pkg.Weekday=$newType(4,$kindInt,"time.Weekday","Weekday","time",null);BN=$pkg.Duration=$newType(8,$kindInt64,"time.Duration","Duration","time",null);CA=$pkg.Location=$newType(0,$kindStruct,"time.Location","Location","time",function(name_,zone_,tx_,cacheStart_,cacheEnd_,cacheZone_){this.$val=this;this.name=name_!==undefined?name_:"";this.zone=zone_!==undefined?zone_:CX.nil;this.tx=tx_!==undefined?tx_:CY.nil;this.cacheStart=cacheStart_!==undefined?cacheStart_:new $Int64(0,0);this.cacheEnd=cacheEnd_!==undefined?cacheEnd_:new $Int64(0,0);this.cacheZone=cacheZone_!==undefined?cacheZone_:CZ.nil;});CB=$pkg.zone=$newType(0,$kindStruct,"time.zone","zone","time",function(name_,offset_,isDST_){this.$val=this;this.name=name_!==undefined?name_:"";this.offset=offset_!==undefined?offset_:0;this.isDST=isDST_!==undefined?isDST_:false;});CC=$pkg.zoneTrans=$newType(0,$kindStruct,"time.zoneTrans","zoneTrans","time",function(when_,index_,isstd_,isutc_){this.$val=this;this.when=when_!==undefined?when_:new $Int64(0,0);this.index=index_!==undefined?index_:0;this.isstd=isstd_!==undefined?isstd_:false;this.isutc=isutc_!==undefined?isutc_:false;});CW=$sliceType($String);CX=$sliceType(CB);CY=$sliceType(CC);CZ=$ptrType(CB);DD=$arrayType($Uint8,32);DE=$sliceType($Uint8);DF=$arrayType($Uint8,9);DG=$arrayType($Uint8,64);DH=$ptrType(CA);DN=$ptrType(AB);DQ=$ptrType(BG);H=function(){var l,m,n,o;l=new($global.Date)();m=$internalize(l,$String);n=A.IndexByte(m,40);o=A.IndexByte(m,41);if((n===-1)||(o===-1)){CE.name="UTC";return;}CE.name=m.substring((n+1>>0),o);CE.zone=new CX([new CB.ptr(CE.name,($parseInt(l.getTimezoneOffset())>>0)*-60>>0,false)]);};O=function(l){var l,m;if(l.length===0){return false;}m=l.charCodeAt(0);return 97<=m&&m<=122;};P=function(l){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,cw,cx,cy,l,m="",n=0,o="",p,q,r,s,t,u,v,w,x,y,z;p=0;while(true){if(!(p>0);r=q;if(r===74){if(l.length>=(p+3>>0)&&l.substring(p,(p+3>>0))==="Jan"){if(l.length>=(p+7>>0)&&l.substring(p,(p+7>>0))==="January"){s=l.substring(0,p);t=257;u=l.substring((p+7>>0));m=s;n=t;o=u;return[m,n,o];}if(!O(l.substring((p+3>>0)))){v=l.substring(0,p);w=258;x=l.substring((p+3>>0));m=v;n=w;o=x;return[m,n,o];}}}else if(r===77){if(l.length>=(p+3>>0)){if(l.substring(p,(p+3>>0))==="Mon"){if(l.length>=(p+6>>0)&&l.substring(p,(p+6>>0))==="Monday"){y=l.substring(0,p);z=261;aa=l.substring((p+6>>0));m=y;n=z;o=aa;return[m,n,o];}if(!O(l.substring((p+3>>0)))){ab=l.substring(0,p);ac=262;ad=l.substring((p+3>>0));m=ab;n=ac;o=ad;return[m,n,o];}}if(l.substring(p,(p+3>>0))==="MST"){ae=l.substring(0,p);af=21;ag=l.substring((p+3>>0));m=ae;n=af;o=ag;return[m,n,o];}}}else if(r===48){if(l.length>=(p+2>>0)&&49<=l.charCodeAt((p+1>>0))&&l.charCodeAt((p+1>>0))<=54){ah=l.substring(0,p);ai=(aj=l.charCodeAt((p+1>>0))-49<<24>>>24,((aj<0||aj>=N.length)?$throwRuntimeError("index out of range"):N[aj]));ak=l.substring((p+2>>0));m=ah;n=ai;o=ak;return[m,n,o];}}else if(r===49){if(l.length>=(p+2>>0)&&(l.charCodeAt((p+1>>0))===53)){al=l.substring(0,p);am=522;an=l.substring((p+2>>0));m=al;n=am;o=an;return[m,n,o];}ao=l.substring(0,p);ap=259;aq=l.substring((p+1>>0));m=ao;n=ap;o=aq;return[m,n,o];}else if(r===50){if(l.length>=(p+4>>0)&&l.substring(p,(p+4>>0))==="2006"){ar=l.substring(0,p);as=273;at=l.substring((p+4>>0));m=ar;n=as;o=at;return[m,n,o];}au=l.substring(0,p);av=263;aw=l.substring((p+1>>0));m=au;n=av;o=aw;return[m,n,o];}else if(r===95){if(l.length>=(p+2>>0)&&(l.charCodeAt((p+1>>0))===50)){ax=l.substring(0,p);ay=264;az=l.substring((p+2>>0));m=ax;n=ay;o=az;return[m,n,o];}}else if(r===51){ba=l.substring(0,p);bb=523;bc=l.substring((p+1>>0));m=ba;n=bb;o=bc;return[m,n,o];}else if(r===52){bd=l.substring(0,p);be=525;bf=l.substring((p+1>>0));m=bd;n=be;o=bf;return[m,n,o];}else if(r===53){bg=l.substring(0,p);bh=527;bi=l.substring((p+1>>0));m=bg;n=bh;o=bi;return[m,n,o];}else if(r===80){if(l.length>=(p+2>>0)&&(l.charCodeAt((p+1>>0))===77)){bj=l.substring(0,p);bk=531;bl=l.substring((p+2>>0));m=bj;n=bk;o=bl;return[m,n,o];}}else if(r===112){if(l.length>=(p+2>>0)&&(l.charCodeAt((p+1>>0))===109)){bm=l.substring(0,p);bn=532;bo=l.substring((p+2>>0));m=bm;n=bn;o=bo;return[m,n,o];}}else if(r===45){if(l.length>=(p+7>>0)&&l.substring(p,(p+7>>0))==="-070000"){bp=l.substring(0,p);bq=27;br=l.substring((p+7>>0));m=bp;n=bq;o=br;return[m,n,o];}if(l.length>=(p+9>>0)&&l.substring(p,(p+9>>0))==="-07:00:00"){bs=l.substring(0,p);bt=30;bu=l.substring((p+9>>0));m=bs;n=bt;o=bu;return[m,n,o];}if(l.length>=(p+5>>0)&&l.substring(p,(p+5>>0))==="-0700"){bv=l.substring(0,p);bw=26;bx=l.substring((p+5>>0));m=bv;n=bw;o=bx;return[m,n,o];}if(l.length>=(p+6>>0)&&l.substring(p,(p+6>>0))==="-07:00"){by=l.substring(0,p);bz=29;ca=l.substring((p+6>>0));m=by;n=bz;o=ca;return[m,n,o];}if(l.length>=(p+3>>0)&&l.substring(p,(p+3>>0))==="-07"){cb=l.substring(0,p);cc=28;cd=l.substring((p+3>>0));m=cb;n=cc;o=cd;return[m,n,o];}}else if(r===90){if(l.length>=(p+7>>0)&&l.substring(p,(p+7>>0))==="Z070000"){ce=l.substring(0,p);cf=23;cg=l.substring((p+7>>0));m=ce;n=cf;o=cg;return[m,n,o];}if(l.length>=(p+9>>0)&&l.substring(p,(p+9>>0))==="Z07:00:00"){ch=l.substring(0,p);ci=25;cj=l.substring((p+9>>0));m=ch;n=ci;o=cj;return[m,n,o];}if(l.length>=(p+5>>0)&&l.substring(p,(p+5>>0))==="Z0700"){ck=l.substring(0,p);cl=22;cm=l.substring((p+5>>0));m=ck;n=cl;o=cm;return[m,n,o];}if(l.length>=(p+6>>0)&&l.substring(p,(p+6>>0))==="Z07:00"){cn=l.substring(0,p);co=24;cp=l.substring((p+6>>0));m=cn;n=co;o=cp;return[m,n,o];}}else if(r===46){if((p+1>>0)>0))===48)||(l.charCodeAt((p+1>>0))===57))){cq=l.charCodeAt((p+1>>0));cr=p+1>>0;while(true){if(!(cr>0;}if(!AD(l,cr)){cs=31;if(l.charCodeAt((p+1>>0))===57){cs=32;}cs=cs|((((cr-((p+1>>0))>>0))<<16>>0));ct=l.substring(0,p);cu=cs;cv=l.substring(cr);m=ct;n=cu;o=cv;return[m,n,o];}}}p=p+(1)>>0;}cw=l;cx=0;cy="";m=cw;n=cx;o=cy;return[m,n,o];};U=function(l,m){var l,m,n,o,p;n=0;while(true){if(!(n>>0;p=(p|(32))>>>0;if(!((o===p))||o<97||o>122){return false;}}n=n+(1)>>0;}return true;};V=function(l,m){var l,m,n,o,p,q;n=l;o=0;while(true){if(!(o=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+o]);if(m.length>=q.length&&U(m.substring(0,q.length),q)){return[p,m.substring(q.length),$ifaceNil];}o++;}return[-1,m,AA];};W=function(l,m,n){var l,m,n,o,p,q,r,s,t;if(m<10){if(!((n===0))){l=$append(l,n);}return $append(l,((48+m>>>0)<<24>>>24));}if(m<100){l=$append(l,((48+(o=m/10,(o===o&&o!==1/0&&o!==-1/0)?o>>>0:$throwRuntimeError("integer divide by zero"))>>>0)<<24>>>24));l=$append(l,((48+(p=m%10,p===p?p:$throwRuntimeError("integer divide by zero"))>>>0)<<24>>>24));return l;}q=$clone(DD.zero(),DD);r=32;if(m===0){return $append(l,48);}while(true){if(!(m>=10)){break;}r=r-(1)>>0;(r<0||r>=q.length)?$throwRuntimeError("index out of range"):q[r]=(((s=m%10,s===s?s:$throwRuntimeError("integer divide by zero"))+48>>>0)<<24>>>24);m=(t=m/(10),(t===t&&t!==1/0&&t!==-1/0)?t>>>0:$throwRuntimeError("integer divide by zero"));}r=r-(1)>>0;(r<0||r>=q.length)?$throwRuntimeError("index out of range"):q[r]=((m+48>>>0)<<24>>>24);return $appendSlice(l,$subslice(new DE(q),r));};Y=function(l){var l,m=0,n=$ifaceNil,o,p,q,r,s,t,u,v;o=false;if(!(l==="")&&((l.charCodeAt(0)===45)||(l.charCodeAt(0)===43))){o=l.charCodeAt(0)===45;l=l.substring(1);}p=AO(l);q=p[0];r=p[1];n=p[2];m=((q.$low+((q.$high>>31)*4294967296))>>0);if(!($interfaceIsEqual(n,$ifaceNil))||!(r==="")){s=0;t=X;m=s;n=t;return[m,n];}if(o){m=-m;}u=m;v=$ifaceNil;m=u;n=v;return[m,n];};Z=function(l,m,n,o){var l,m,n,o,p,q,r,s,t,u;p=m;q=$clone(DF.zero(),DF);r=9;while(true){if(!(r>0)){break;}r=r-(1)>>0;(r<0||r>=q.length)?$throwRuntimeError("index out of range"):q[r]=(((s=p%10,s===s?s:$throwRuntimeError("integer divide by zero"))+48>>>0)<<24>>>24);p=(t=p/(10),(t===t&&t!==1/0&&t!==-1/0)?t>>>0:$throwRuntimeError("integer divide by zero"));}if(n>9){n=9;}if(o){while(true){if(!(n>0&&((u=n-1>>0,((u<0||u>=q.length)?$throwRuntimeError("index out of range"):q[u]))===48))){break;}n=n-(1)>>0;}if(n===0){return l;}}l=$append(l,46);return $appendSlice(l,$subslice(new DE(q),0,n));};BG.ptr.prototype.String=function(){var l;l=$clone(this,BG);return l.Format("2006-01-02 15:04:05.999999999 -0700 MST");};BG.prototype.String=function(){return this.$val.String();};BG.ptr.prototype.Format=function(l){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;m=$clone(this,BG);n=m.locabs();o=n[0];p=n[1];q=n[2];r=-1;s=0;t=0;u=-1;v=0;w=0;x=DE.nil;y=$clone(DG.zero(),DG);z=l.length+10>>0;if(z<=64){x=$subslice(new DE(y),0,0);}else{x=$makeSlice(DE,0,z);}while(true){if(!(!(l===""))){break;}aa=P(l);ab=aa[0];ac=aa[1];ad=aa[2];if(!(ab==="")){x=$appendSlice(x,new DE($stringToBytes(ab)));}if(ac===0){break;}l=ad;if(r<0&&!(((ac&256)===0))){ae=BR(q,true);r=ae[0];s=ae[1];t=ae[2];}if(u<0&&!(((ac&512)===0))){af=BM(q);u=af[0];v=af[1];w=af[2];}ag=ac&65535;switch(0){default:if(ag===274){ah=r;if(ah<0){ah=-ah;}x=W(x,((ai=ah%100,ai===ai?ai:$throwRuntimeError("integer divide by zero"))>>>0),48);}else if(ag===273){aj=r;if(r<=-1000){x=$append(x,45);aj=-aj;}else if(r<=-100){x=$appendSlice(x,new DE($stringToBytes("-0")));aj=-aj;}else if(r<=-10){x=$appendSlice(x,new DE($stringToBytes("-00")));aj=-aj;}else if(r<0){x=$appendSlice(x,new DE($stringToBytes("-000")));aj=-aj;}else if(r<10){x=$appendSlice(x,new DE($stringToBytes("000")));}else if(r<100){x=$appendSlice(x,new DE($stringToBytes("00")));}else if(r<1000){x=$append(x,48);}x=W(x,(aj>>>0),0);}else if(ag===258){x=$appendSlice(x,new DE($stringToBytes(new BH(s).String().substring(0,3))));}else if(ag===257){ak=new BH(s).String();x=$appendSlice(x,new DE($stringToBytes(ak)));}else if(ag===259){x=W(x,(s>>>0),0);}else if(ag===260){x=W(x,(s>>>0),48);}else if(ag===262){x=$appendSlice(x,new DE($stringToBytes(new BJ(BL(q)).String().substring(0,3))));}else if(ag===261){al=new BJ(BL(q)).String();x=$appendSlice(x,new DE($stringToBytes(al)));}else if(ag===263){x=W(x,(t>>>0),0);}else if(ag===264){x=W(x,(t>>>0),32);}else if(ag===265){x=W(x,(t>>>0),48);}else if(ag===522){x=W(x,(u>>>0),48);}else if(ag===523){an=(am=u%12,am===am?am:$throwRuntimeError("integer divide by zero"));if(an===0){an=12;}x=W(x,(an>>>0),0);}else if(ag===524){ap=(ao=u%12,ao===ao?ao:$throwRuntimeError("integer divide by zero"));if(ap===0){ap=12;}x=W(x,(ap>>>0),48);}else if(ag===525){x=W(x,(v>>>0),0);}else if(ag===526){x=W(x,(v>>>0),48);}else if(ag===527){x=W(x,(w>>>0),0);}else if(ag===528){x=W(x,(w>>>0),48);}else if(ag===531){if(u>=12){x=$appendSlice(x,new DE($stringToBytes("PM")));}else{x=$appendSlice(x,new DE($stringToBytes("AM")));}}else if(ag===532){if(u>=12){x=$appendSlice(x,new DE($stringToBytes("pm")));}else{x=$appendSlice(x,new DE($stringToBytes("am")));}}else if(ag===22||ag===24||ag===23||ag===25||ag===26||ag===29||ag===27||ag===30){if((p===0)&&((ac===22)||(ac===24)||(ac===23)||(ac===25))){x=$append(x,90);break;}ar=(aq=p/60,(aq===aq&&aq!==1/0&&aq!==-1/0)?aq>>0:$throwRuntimeError("integer divide by zero"));as=p;if(ar<0){x=$append(x,45);ar=-ar;as=-as;}else{x=$append(x,43);}x=W(x,((at=ar/60,(at===at&&at!==1/0&&at!==-1/0)?at>>0:$throwRuntimeError("integer divide by zero"))>>>0),48);if((ac===24)||(ac===29)||(ac===25)||(ac===30)){x=$append(x,58);}x=W(x,((au=ar%60,au===au?au:$throwRuntimeError("integer divide by zero"))>>>0),48);if((ac===23)||(ac===27)||(ac===30)||(ac===25)){if((ac===30)||(ac===25)){x=$append(x,58);}x=W(x,((av=as%60,av===av?av:$throwRuntimeError("integer divide by zero"))>>>0),48);}}else if(ag===21){if(!(o==="")){x=$appendSlice(x,new DE($stringToBytes(o)));break;}ax=(aw=p/60,(aw===aw&&aw!==1/0&&aw!==-1/0)?aw>>0:$throwRuntimeError("integer divide by zero"));if(ax<0){x=$append(x,45);ax=-ax;}else{x=$append(x,43);}x=W(x,((ay=ax/60,(ay===ay&&ay!==1/0&&ay!==-1/0)?ay>>0:$throwRuntimeError("integer divide by zero"))>>>0),48);x=W(x,((az=ax%60,az===az?az:$throwRuntimeError("integer divide by zero"))>>>0),48);}else if(ag===31||ag===32){x=Z(x,(m.Nanosecond()>>>0),ac>>16>>0,(ac&65535)===32);}}}return $bytesToString(x);};BG.prototype.Format=function(l){return this.$val.Format(l);};AC=function(l){var l;return"\""+l+"\"";};AB.ptr.prototype.Error=function(){var l;l=this;if(l.Message===""){return"parsing time "+AC(l.Value)+" as "+AC(l.Layout)+": cannot parse "+AC(l.ValueElem)+" as "+AC(l.LayoutElem);}return"parsing time "+AC(l.Value)+l.Message;};AB.prototype.Error=function(){return this.$val.Error();};AD=function(l,m){var l,m,n;if(l.length<=m){return false;}n=l.charCodeAt(m);return 48<=n&&n<=57;};AE=function(l,m){var l,m;if(!AD(l,0)){return[0,l,AA];}if(!AD(l,1)){if(m){return[0,l,AA];}return[((l.charCodeAt(0)-48<<24>>>24)>>0),l.substring(1),$ifaceNil];}return[(((l.charCodeAt(0)-48<<24>>>24)>>0)*10>>0)+((l.charCodeAt(1)-48<<24>>>24)>>0)>>0,l.substring(2),$ifaceNil];};AF=function(l){var l;while(true){if(!(l.length>0&&(l.charCodeAt(0)===32))){break;}l=l.substring(1);}return l;};AG=function(l,m){var l,m;while(true){if(!(m.length>0)){break;}if(m.charCodeAt(0)===32){if(l.length>0&&!((l.charCodeAt(0)===32))){return[l,AA];}m=AF(m);l=AF(l);continue;}if((l.length===0)||!((l.charCodeAt(0)===m.charCodeAt(0)))){return[l,AA];}m=m.substring(1);l=l.substring(1);}return[l,$ifaceNil];};AH=$pkg.Parse=function(l,m){var l,m;return AJ(l,m,$pkg.UTC,$pkg.Local);};AJ=function(l,m,n,o){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,cw,cx,cy,cz,da,db,dc,dd,de,df,dg,dh,di,dj,dk,dl,dm,dn,dp,dq,dr,ds,dt,du,dv,dw,dx,dy,dz,ea,eb,ec,ed,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;p=l;q=m;r=p;s=q;t="";u=false;v=false;w=0;x=1;y=1;z=0;aa=0;ab=0;ac=0;ad=DH.nil;ae=-1;af="";while(true){if(!(true)){break;}ag=$ifaceNil;ah=P(l);ai=ah[0];aj=ah[1];ak=ah[2];al=l.substring(ai.length,(l.length-ak.length>>0));am=AG(m,ai);m=am[0];ag=am[1];if(!($interfaceIsEqual(ag,$ifaceNil))){return[new BG.ptr(new $Int64(0,0),0,DH.nil),new AB.ptr(r,s,ai,m,"")];}if(aj===0){if(!((m.length===0))){return[new BG.ptr(new $Int64(0,0),0,DH.nil),new AB.ptr(r,s,"",m,": extra text: "+m)];}break;}l=ak;an="";ao=aj&65535;switch(0){default:if(ao===274){if(m.length<2){ag=AA;break;}ap=m.substring(0,2);aq=m.substring(2);an=ap;m=aq;ar=Y(an);w=ar[0];ag=ar[1];if(w>=69){w=w+(1900)>>0;}else{w=w+(2000)>>0;}}else if(ao===273){if(m.length<4||!AD(m,0)){ag=AA;break;}as=m.substring(0,4);at=m.substring(4);an=as;m=at;au=Y(an);w=au[0];ag=au[1];}else if(ao===258){av=V(S,m);x=av[0];m=av[1];ag=av[2];}else if(ao===257){aw=V(T,m);x=aw[0];m=aw[1];ag=aw[2];}else if(ao===259||ao===260){ax=AE(m,aj===260);x=ax[0];m=ax[1];ag=ax[2];if(x<=0||120&&(m.charCodeAt(0)===32)){m=m.substring(1);}ba=AE(m,aj===265);y=ba[0];m=ba[1];ag=ba[2];if(y<0||31=2&&(m.charCodeAt(0)===46)&&AD(m,1)){bf=P(l);aj=bf[1];aj=aj&(65535);if((aj===31)||(aj===32)){break;}bg=2;while(true){if(!(bg>0;}bh=AM(m,bg);ac=bh[0];t=bh[1];ag=bh[2];m=m.substring(bg);}}else if(ao===531){if(m.length<2){ag=AA;break;}bi=m.substring(0,2);bj=m.substring(2);an=bi;m=bj;bk=an;if(bk==="PM"){v=true;}else if(bk==="AM"){u=true;}else{ag=AA;}}else if(ao===532){if(m.length<2){ag=AA;break;}bl=m.substring(0,2);bm=m.substring(2);an=bl;m=bm;bn=an;if(bn==="pm"){v=true;}else if(bn==="am"){u=true;}else{ag=AA;}}else if(ao===22||ao===24||ao===23||ao===25||ao===26||ao===28||ao===29||ao===27||ao===30){if(((aj===22)||(aj===24))&&m.length>=1&&(m.charCodeAt(0)===90)){m=m.substring(1);ad=$pkg.UTC;break;}bo="";bp="";bq="";br="";bs=bo;bt=bp;bu=bq;bv=br;if((aj===24)||(aj===29)){if(m.length<6){ag=AA;break;}if(!((m.charCodeAt(3)===58))){ag=AA;break;}bw=m.substring(0,1);bx=m.substring(1,3);by=m.substring(4,6);bz="00";ca=m.substring(6);bs=bw;bt=bx;bu=by;bv=bz;m=ca;}else if(aj===28){if(m.length<3){ag=AA;break;}cb=m.substring(0,1);cc=m.substring(1,3);cd="00";ce="00";cf=m.substring(3);bs=cb;bt=cc;bu=cd;bv=ce;m=cf;}else if((aj===25)||(aj===30)){if(m.length<9){ag=AA;break;}if(!((m.charCodeAt(3)===58))||!((m.charCodeAt(6)===58))){ag=AA;break;}cg=m.substring(0,1);ch=m.substring(1,3);ci=m.substring(4,6);cj=m.substring(7,9);ck=m.substring(9);bs=cg;bt=ch;bu=ci;bv=cj;m=ck;}else if((aj===23)||(aj===27)){if(m.length<7){ag=AA;break;}cl=m.substring(0,1);cm=m.substring(1,3);cn=m.substring(3,5);co=m.substring(5,7);cp=m.substring(7);bs=cl;bt=cm;bu=cn;bv=co;m=cp;}else{if(m.length<5){ag=AA;break;}cq=m.substring(0,1);cr=m.substring(1,3);cs=m.substring(3,5);ct="00";cu=m.substring(5);bs=cq;bt=cr;bu=cs;bv=ct;m=cu;}cv=0;cw=0;cx=0;cy=cv;cz=cw;da=cx;db=Y(bt);cy=db[0];ag=db[1];if($interfaceIsEqual(ag,$ifaceNil)){dc=Y(bu);cz=dc[0];ag=dc[1];}if($interfaceIsEqual(ag,$ifaceNil)){dd=Y(bv);da=dd[0];ag=dd[1];}ae=((((cy*60>>0)+cz>>0))*60>>0)+da>>0;de=bs.charCodeAt(0);if(de===43){}else if(de===45){ae=-ae;}else{ag=AA;}}else if(ao===21){if(m.length>=3&&m.substring(0,3)==="UTC"){ad=$pkg.UTC;m=m.substring(3);break;}df=AK(m);dg=df[0];dh=df[1];if(!dh){ag=AA;break;}di=m.substring(0,dg);dj=m.substring(dg);af=di;m=dj;}else if(ao===31){dk=1+((aj>>16>>0))>>0;if(m.length>0)>0))&&m.charCodeAt((dm+1>>0))<=57)){break;}dm=dm+(1)>>0;}dn=AM(m,1+dm>>0);ac=dn[0];t=dn[1];ag=dn[2];m=m.substring((1+dm>>0));}}if(!(t==="")){return[new BG.ptr(new $Int64(0,0),0,DH.nil),new AB.ptr(r,s,al,m,": "+t+" out of range")];}if(!($interfaceIsEqual(ag,$ifaceNil))){return[new BG.ptr(new $Int64(0,0),0,DH.nil),new AB.ptr(r,s,al,m,"")];}}if(v&&z<12){z=z+(12)>>0;}else if(u&&(z===12)){z=0;}if(!(ad===DH.nil)){return[BY(w,(x>>0),y,z,aa,ab,ac,ad),$ifaceNil];}if(!((ae===-1))){dp=$clone(BY(w,(x>>0),y,z,aa,ab,ac,$pkg.UTC),BG);dp.sec=(dq=dp.sec,dr=new $Int64(0,ae),new $Int64(dq.$high-dr.$high,dq.$low-dr.$low));ds=o.lookup((dt=dp.sec,new $Int64(dt.$high+-15,dt.$low+2288912640)));du=ds[0];dv=ds[1];if((dv===ae)&&(af===""||du===af)){dp.loc=o;return[dp,$ifaceNil];}dp.loc=CG(af,ae);return[dp,$ifaceNil];}if(!(af==="")){dw=$clone(BY(w,(x>>0),y,z,aa,ab,ac,$pkg.UTC),BG);dx=o.lookupName(af,(dy=dw.sec,new $Int64(dy.$high+-15,dy.$low+2288912640)));dz=dx[0];ea=dx[2];if(ea){dw.sec=(eb=dw.sec,ec=new $Int64(0,dz),new $Int64(eb.$high-ec.$high,eb.$low-ec.$low));dw.loc=o;return[dw,$ifaceNil];}if(af.length>3&&af.substring(0,3)==="GMT"){ed=Y(af.substring(3));dz=ed[0];dz=dz*(3600)>>0;}dw.loc=CG(af,dz);return[dw,$ifaceNil];}return[BY(w,(x>>0),y,z,aa,ab,ac,n),$ifaceNil];};AK=function(l){var aa,ab,ac,ad,ae,af,ag,l,m=0,n=false,o,p,q,r,s,t,u,v,w,x,y,z;if(l.length<3){o=0;p=false;m=o;n=p;return[m,n];}if(l.length>=4&&(l.substring(0,4)==="ChST"||l.substring(0,4)==="MeST")){q=4;r=true;m=q;n=r;return[m,n];}if(l.substring(0,3)==="GMT"){m=AL(l);s=m;t=true;m=s;n=t;return[m,n];}u=0;u=0;while(true){if(!(u<6)){break;}if(u>=l.length){break;}v=l.charCodeAt(u);if(v<65||90>0;}w=u;if(w===0||w===1||w===2||w===6){x=0;y=false;m=x;n=y;return[m,n];}else if(w===5){if(l.charCodeAt(4)===84){z=5;aa=true;m=z;n=aa;return[m,n];}}else if(w===4){if(l.charCodeAt(3)===84){ab=4;ac=true;m=ab;n=ac;return[m,n];}}else if(w===3){ad=3;ae=true;m=ad;n=ae;return[m,n];}af=0;ag=false;m=af;n=ag;return[m,n];};AL=function(l){var l,m,n,o,p,q;l=l.substring(3);if(l.length===0){return 3;}m=l.charCodeAt(0);if(!((m===45))&&!((m===43))){return 3;}n=AO(l.substring(1));o=n[0];p=n[1];q=n[2];if(!($interfaceIsEqual(q,$ifaceNil))){return 3;}if(m===45){o=new $Int64(-o.$high,-o.$low);}if((o.$high===0&&o.$low===0)||(o.$high<-1||(o.$high===-1&&o.$low<4294967282))||(0>0)-p.length>>0;};AM=function(l,m){var l,m,n=0,o="",p=$ifaceNil,q,r,s;if(!((l.charCodeAt(0)===46))){p=AA;return[n,o,p];}q=Y(l.substring(1,m));n=q[0];p=q[1];if(!($interfaceIsEqual(p,$ifaceNil))){return[n,o,p];}if(n<0||1000000000<=n){o="fractional second";return[n,o,p];}r=10-m>>0;s=0;while(true){if(!(s>0;s=s+(1)>>0;}return[n,o,p];};AO=function(l){var l,m=new $Int64(0,0),n="",o=$ifaceNil,p,q,r,s,t,u,v,w,x,y,z;p=0;while(true){if(!(p57){break;}if((m.$high>214748364||(m.$high===214748364&&m.$low>=3435973835))){r=new $Int64(0,0);s="";t=AN;m=r;n=s;o=t;return[m,n,o];}m=(u=(v=$mul64(m,new $Int64(0,10)),w=new $Int64(0,q),new $Int64(v.$high+w.$high,v.$low+w.$low)),new $Int64(u.$high-0,u.$low-48));p=p+(1)>>0;}x=m;y=l.substring(p);z=$ifaceNil;m=x;n=y;o=z;return[m,n,o];};AQ=$pkg.ParseDuration=function(l){var aa,ab,ac,ad,ae,af,ag,ah,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;m=l;n=0;o=false;if(!(l==="")){p=l.charCodeAt(0);if((p===45)||(p===43)){o=p===45;l=l.substring(1);}}if(l==="0"){return[new BN(0,0),$ifaceNil];}if(l===""){return[new BN(0,0),C.New("time: invalid duration "+m)];}while(true){if(!(!(l===""))){break;}q=0;r=new $Int64(0,0);s=$ifaceNil;if(!((l.charCodeAt(0)===46)||(48<=l.charCodeAt(0)&&l.charCodeAt(0)<=57))){return[new BN(0,0),C.New("time: invalid duration "+m)];}t=l.length;u=AO(l);r=u[0];l=u[1];s=u[2];if(!($interfaceIsEqual(s,$ifaceNil))){return[new BN(0,0),C.New("time: invalid duration "+m)];}q=$flatten64(r);v=!((t===l.length));w=false;if(!(l==="")&&(l.charCodeAt(0)===46)){l=l.substring(1);x=l.length;y=AO(l);r=y[0];l=y[1];s=y[2];if(!($interfaceIsEqual(s,$ifaceNil))){return[new BN(0,0),C.New("time: invalid duration "+m)];}z=1;aa=x-l.length>>0;while(true){if(!(aa>0)){break;}z=z*(10);aa=aa-(1)>>0;}q=q+($flatten64(r)/z);w=!((x===l.length));}if(!v&&!w){return[new BN(0,0),C.New("time: invalid duration "+m)];}ab=0;while(true){if(!(ab>0;}if(ab===0){return[new BN(0,0),C.New("time: missing unit in duration "+m)];}ad=l.substring(0,ab);l=l.substring(ab);ae=(af=AP[ad],af!==undefined?[af.v,true]:[0,false]);ag=ae[0];ah=ae[1];if(!ah){return[new BN(0,0),C.New("time: unknown unit "+ad+" in duration "+m)];}n=n+(q*ag);}if(o){n=-n;}if(n<-9.223372036854776e+18||n>9.223372036854776e+18){return[new BN(0,0),C.New("time: overflow parsing duration")];}return[new BN(0,n),$ifaceNil];};BG.ptr.prototype.After=function(l){var l,m,n,o,p,q;m=$clone(this,BG);l=$clone(l,BG);return(n=m.sec,o=l.sec,(n.$high>o.$high||(n.$high===o.$high&&n.$low>o.$low)))||(p=m.sec,q=l.sec,(p.$high===q.$high&&p.$low===q.$low))&&m.nsec>l.nsec;};BG.prototype.After=function(l){return this.$val.After(l);};BG.ptr.prototype.Before=function(l){var l,m,n,o,p,q;m=$clone(this,BG);l=$clone(l,BG);return(n=m.sec,o=l.sec,(n.$high>0,((m<0||m>=BI.length)?$throwRuntimeError("index out of range"):BI[m]));};$ptrType(BH).prototype.String=function(){return new BH(this.$get()).String();};BJ.prototype.String=function(){var l;l=this.$val;return((l<0||l>=BK.length)?$throwRuntimeError("index out of range"):BK[l]);};$ptrType(BJ).prototype.String=function(){return new BJ(this.$get()).String();};BG.ptr.prototype.IsZero=function(){var l,m;l=$clone(this,BG);return(m=l.sec,(m.$high===0&&m.$low===0))&&(l.nsec===0);};BG.prototype.IsZero=function(){return this.$val.IsZero();};BG.ptr.prototype.abs=function(){var l,m,n,o,p,q,r,s,t,u,v;l=$clone(this,BG);m=l.loc;if(m===DH.nil||m===CE){m=m.get();}o=(n=l.sec,new $Int64(n.$high+-15,n.$low+2288912640));if(!(m===CD)){if(!(m.cacheZone===CZ.nil)&&(p=m.cacheStart,(p.$high>0)/86400,(n===n&&n!==1/0&&n!==-1/0)?n>>0:$throwRuntimeError("integer divide by zero"))>>0);};BG.ptr.prototype.ISOWeek=function(){var l=0,m=0,n,o,p,q,r,s,t,u,v,w,x,y;n=$clone(this,BG);o=n.date(true);l=o[0];p=o[1];q=o[2];r=o[3];t=(s=((n.Weekday()+6>>0)>>0)%7,s===s?s:$throwRuntimeError("integer divide by zero"));m=(u=(((r-t>>0)+7>>0))/7,(u===u&&u!==1/0&&u!==-1/0)?u>>0:$throwRuntimeError("integer divide by zero"));w=(v=(((t-r>>0)+371>>0))%7,v===v?v:$throwRuntimeError("integer divide by zero"));if(1<=w&&w<=3){m=m+(1)>>0;}if(m===0){l=l-(1)>>0;m=52;if((w===4)||((w===5)&&BW(l))){m=m+(1)>>0;}}if((p===12)&&q>=29&&t<3){y=(x=(((t+31>>0)-q>>0))%7,x===x?x:$throwRuntimeError("integer divide by zero"));if(0<=y&&y<=2){l=l+(1)>>0;m=1;}}return[l,m];};BG.prototype.ISOWeek=function(){return this.$val.ISOWeek();};BG.ptr.prototype.Clock=function(){var l=0,m=0,n=0,o,p;o=$clone(this,BG);p=BM(o.abs());l=p[0];m=p[1];n=p[2];return[l,m,n];};BG.prototype.Clock=function(){return this.$val.Clock();};BM=function(l){var l,m=0,n=0,o=0,p,q;o=($div64(l,new $Uint64(0,86400),true).$low>>0);m=(p=o/3600,(p===p&&p!==1/0&&p!==-1/0)?p>>0:$throwRuntimeError("integer divide by zero"));o=o-((m*3600>>0))>>0;n=(q=o/60,(q===q&&q!==1/0&&q!==-1/0)?q>>0:$throwRuntimeError("integer divide by zero"));o=o-((n*60>>0))>>0;return[m,n,o];};BG.ptr.prototype.Hour=function(){var l,m;l=$clone(this,BG);return(m=($div64(l.abs(),new $Uint64(0,86400),true).$low>>0)/3600,(m===m&&m!==1/0&&m!==-1/0)?m>>0:$throwRuntimeError("integer divide by zero"));};BG.prototype.Hour=function(){return this.$val.Hour();};BG.ptr.prototype.Minute=function(){var l,m;l=$clone(this,BG);return(m=($div64(l.abs(),new $Uint64(0,3600),true).$low>>0)/60,(m===m&&m!==1/0&&m!==-1/0)?m>>0:$throwRuntimeError("integer divide by zero"));};BG.prototype.Minute=function(){return this.$val.Minute();};BG.ptr.prototype.Second=function(){var l;l=$clone(this,BG);return($div64(l.abs(),new $Uint64(0,60),true).$low>>0);};BG.prototype.Second=function(){return this.$val.Second();};BG.ptr.prototype.Nanosecond=function(){var l;l=$clone(this,BG);return(l.nsec>>0);};BG.prototype.Nanosecond=function(){return this.$val.Nanosecond();};BG.ptr.prototype.YearDay=function(){var l,m,n;l=$clone(this,BG);m=l.date(false);n=m[3];return n+1>>0;};BG.prototype.YearDay=function(){return this.$val.YearDay();};BN.prototype.String=function(){var l,m,n,o,p,q,r,s;l=this;m=$clone(DD.zero(),DD);n=32;o=new $Uint64(l.$high,l.$low);p=(l.$high<0||(l.$high===0&&l.$low<0));if(p){o=new $Uint64(-o.$high,-o.$low);}if((o.$high<0||(o.$high===0&&o.$low<1000000000))){q=0;n=n-(1)>>0;(n<0||n>=m.length)?$throwRuntimeError("index out of range"):m[n]=115;n=n-(1)>>0;if((o.$high===0&&o.$low===0)){return"0";}else if((o.$high<0||(o.$high===0&&o.$low<1000))){q=0;(n<0||n>=m.length)?$throwRuntimeError("index out of range"):m[n]=110;}else if((o.$high<0||(o.$high===0&&o.$low<1000000))){q=3;n=n-(1)>>0;$copyString($subslice(new DE(m),n),"\xC2\xB5");}else{q=6;(n<0||n>=m.length)?$throwRuntimeError("index out of range"):m[n]=109;}r=BO($subslice(new DE(m),0,n),o,q);n=r[0];o=r[1];n=BP($subslice(new DE(m),0,n),o);}else{n=n-(1)>>0;(n<0||n>=m.length)?$throwRuntimeError("index out of range"):m[n]=115;s=BO($subslice(new DE(m),0,n),o,9);n=s[0];o=s[1];n=BP($subslice(new DE(m),0,n),$div64(o,new $Uint64(0,60),true));o=$div64(o,(new $Uint64(0,60)),false);if((o.$high>0||(o.$high===0&&o.$low>0))){n=n-(1)>>0;(n<0||n>=m.length)?$throwRuntimeError("index out of range"):m[n]=109;n=BP($subslice(new DE(m),0,n),$div64(o,new $Uint64(0,60),true));o=$div64(o,(new $Uint64(0,60)),false);if((o.$high>0||(o.$high===0&&o.$low>0))){n=n-(1)>>0;(n<0||n>=m.length)?$throwRuntimeError("index out of range"):m[n]=104;n=BP($subslice(new DE(m),0,n),o);}}}if(p){n=n-(1)>>0;(n<0||n>=m.length)?$throwRuntimeError("index out of range"):m[n]=45;}return $bytesToString($subslice(new DE(m),n));};$ptrType(BN).prototype.String=function(){return this.$get().String();};BO=function(l,m,n){var l,m,n,o=0,p=new $Uint64(0,0),q,r,s,t,u,v;q=l.$length;r=false;s=0;while(true){if(!(s>0;(q<0||q>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+q]=(t.$low<<24>>>24)+48<<24>>>24;}m=$div64(m,(new $Uint64(0,10)),false);s=s+(1)>>0;}if(r){q=q-(1)>>0;(q<0||q>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+q]=46;}u=q;v=m;o=u;p=v;return[o,p];};BP=function(l,m){var l,m,n;n=l.$length;if((m.$high===0&&m.$low===0)){n=n-(1)>>0;(n<0||n>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+n]=48;}else{while(true){if(!((m.$high>0||(m.$high===0&&m.$low>0)))){break;}n=n-(1)>>0;(n<0||n>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+n]=($div64(m,new $Uint64(0,10),true).$low<<24>>>24)+48<<24>>>24;m=$div64(m,(new $Uint64(0,10)),false);}}return n;};BN.prototype.Nanoseconds=function(){var l;l=this;return new $Int64(l.$high,l.$low);};$ptrType(BN).prototype.Nanoseconds=function(){return this.$get().Nanoseconds();};BN.prototype.Seconds=function(){var l,m,n;l=this;m=$div64(l,new BN(0,1000000000),false);n=$div64(l,new BN(0,1000000000),true);return $flatten64(m)+$flatten64(n)*1e-09;};$ptrType(BN).prototype.Seconds=function(){return this.$get().Seconds();};BN.prototype.Minutes=function(){var l,m,n;l=this;m=$div64(l,new BN(13,4165425152),false);n=$div64(l,new BN(13,4165425152),true);return $flatten64(m)+$flatten64(n)*1.6666666666666667e-11;};$ptrType(BN).prototype.Minutes=function(){return this.$get().Minutes();};BN.prototype.Hours=function(){var l,m,n;l=this;m=$div64(l,new BN(838,817405952),false);n=$div64(l,new BN(838,817405952),true);return $flatten64(m)+$flatten64(n)*2.777777777777778e-13;};$ptrType(BN).prototype.Hours=function(){return this.$get().Hours();};BG.ptr.prototype.Add=function(l){var l,m,n,o,p,q,r,s,t,u,v;m=$clone(this,BG);m.sec=(n=m.sec,o=(p=$div64(l,new BN(0,1000000000),false),new $Int64(p.$high,p.$low)),new $Int64(n.$high+o.$high,n.$low+o.$low));r=m.nsec+((q=$div64(l,new BN(0,1000000000),true),q.$low+((q.$high>>31)*4294967296))>>0)>>0;if(r>=1000000000){m.sec=(s=m.sec,t=new $Int64(0,1),new $Int64(s.$high+t.$high,s.$low+t.$low));r=r-(1000000000)>>0;}else if(r<0){m.sec=(u=m.sec,v=new $Int64(0,1),new $Int64(u.$high-v.$high,u.$low-v.$low));r=r+(1000000000)>>0;}m.nsec=r;return m;};BG.prototype.Add=function(l){return this.$val.Add(l);};BG.ptr.prototype.Sub=function(l){var l,m,n,o,p,q,r,s;m=$clone(this,BG);l=$clone(l,BG);s=(n=$mul64((o=(p=m.sec,q=l.sec,new $Int64(p.$high-q.$high,p.$low-q.$low)),new BN(o.$high,o.$low)),new BN(0,1000000000)),r=new BN(0,(m.nsec-l.nsec>>0)),new BN(n.$high+r.$high,n.$low+r.$low));if(l.Add(s).Equal(m)){return s;}else if(m.Before(l)){return new BN(-2147483648,0);}else{return new BN(2147483647,4294967295);}};BG.prototype.Sub=function(l){return this.$val.Sub(l);};BG.ptr.prototype.AddDate=function(l,m,n){var l,m,n,o,p,q,r,s,t,u,v,w;o=$clone(this,BG);p=o.Date();q=p[0];r=p[1];s=p[2];t=o.Clock();u=t[0];v=t[1];w=t[2];return BY(q+l>>0,r+(m>>0)>>0,s+n>>0,u,v,w,(o.nsec>>0),o.loc);};BG.prototype.AddDate=function(l,m,n){return this.$val.AddDate(l,m,n);};BG.ptr.prototype.date=function(l){var l,m=0,n=0,o=0,p=0,q,r;q=$clone(this,BG);r=BR(q.abs(),l);m=r[0];n=r[1];o=r[2];p=r[3];return[m,n,o,p];};BG.prototype.date=function(l){return this.$val.date(l);};BR=function(l,m){var aa,ab,ac,ad,ae,af,ag,ah,ai,l,m,n=0,o=0,p=0,q=0,r,s,t,u,v,w,x,y,z;r=$div64(l,new $Uint64(0,86400),false);s=$div64(r,new $Uint64(0,146097),false);t=$mul64(new $Uint64(0,400),s);r=(u=$mul64(new $Uint64(0,146097),s),new $Uint64(r.$high-u.$high,r.$low-u.$low));s=$div64(r,new $Uint64(0,36524),false);s=(v=$shiftRightUint64(s,2),new $Uint64(s.$high-v.$high,s.$low-v.$low));t=(w=$mul64(new $Uint64(0,100),s),new $Uint64(t.$high+w.$high,t.$low+w.$low));r=(x=$mul64(new $Uint64(0,36524),s),new $Uint64(r.$high-x.$high,r.$low-x.$low));s=$div64(r,new $Uint64(0,1461),false);t=(y=$mul64(new $Uint64(0,4),s),new $Uint64(t.$high+y.$high,t.$low+y.$low));r=(z=$mul64(new $Uint64(0,1461),s),new $Uint64(r.$high-z.$high,r.$low-z.$low));s=$div64(r,new $Uint64(0,365),false);s=(aa=$shiftRightUint64(s,2),new $Uint64(s.$high-aa.$high,s.$low-aa.$low));t=(ab=s,new $Uint64(t.$high+ab.$high,t.$low+ab.$low));r=(ac=$mul64(new $Uint64(0,365),s),new $Uint64(r.$high-ac.$high,r.$low-ac.$low));n=((ad=(ae=new $Int64(t.$high,t.$low),new $Int64(ae.$high+-69,ae.$low+4075721025)),ad.$low+((ad.$high>>31)*4294967296))>>0);q=(r.$low>>0);if(!m){return[n,o,p,q];}p=q;if(BW(n)){if(p>59){p=p-(1)>>0;}else if(p===59){o=2;p=29;return[n,o,p,q];}}o=((af=p/31,(af===af&&af!==1/0&&af!==-1/0)?af>>0:$throwRuntimeError("integer divide by zero"))>>0);ah=((ag=o+1>>0,((ag<0||ag>=BS.length)?$throwRuntimeError("index out of range"):BS[ag]))>>0);ai=0;if(p>=ah){o=o+(1)>>0;ai=ah;}else{ai=(((o<0||o>=BS.length)?$throwRuntimeError("index out of range"):BS[o])>>0);}o=o+(1)>>0;p=(p-ai>>0)+1>>0;return[n,o,p,q];};BG.ptr.prototype.UTC=function(){var l;l=$clone(this,BG);l.loc=$pkg.UTC;return l;};BG.prototype.UTC=function(){return this.$val.UTC();};BG.ptr.prototype.Local=function(){var l;l=$clone(this,BG);l.loc=$pkg.Local;return l;};BG.prototype.Local=function(){return this.$val.Local();};BG.ptr.prototype.In=function(l){var l,m;m=$clone(this,BG);if(l===DH.nil){$panic(new $String("time: missing Location in call to Time.In"));}m.loc=l;return m;};BG.prototype.In=function(l){return this.$val.In(l);};BG.ptr.prototype.Location=function(){var l,m;l=$clone(this,BG);m=l.loc;if(m===DH.nil){m=$pkg.UTC;}return m;};BG.prototype.Location=function(){return this.$val.Location();};BG.ptr.prototype.Zone=function(){var l="",m=0,n,o,p;n=$clone(this,BG);o=n.loc.lookup((p=n.sec,new $Int64(p.$high+-15,p.$low+2288912640)));l=o[0];m=o[1];return[l,m];};BG.prototype.Zone=function(){return this.$val.Zone();};BG.ptr.prototype.Unix=function(){var l,m;l=$clone(this,BG);return(m=l.sec,new $Int64(m.$high+-15,m.$low+2288912640));};BG.prototype.Unix=function(){return this.$val.Unix();};BG.ptr.prototype.UnixNano=function(){var l,m,n,o;l=$clone(this,BG);return(m=$mul64(((n=l.sec,new $Int64(n.$high+-15,n.$low+2288912640))),new $Int64(0,1000000000)),o=new $Int64(0,l.nsec),new $Int64(m.$high+o.$high,m.$low+o.$low));};BG.prototype.UnixNano=function(){return this.$val.UnixNano();};BG.ptr.prototype.MarshalBinary=function(){var l,m,n,o,p,q,r;l=$clone(this,BG);m=0;if(l.Location()===CD){m=-1;}else{n=l.Zone();o=n[1];if(!(((p=o%60,p===p?p:$throwRuntimeError("integer divide by zero"))===0))){return[DE.nil,C.New("Time.MarshalBinary: zone offset has fractional minute")];}o=(q=o/(60),(q===q&&q!==1/0&&q!==-1/0)?q>>0:$throwRuntimeError("integer divide by zero"));if(o<-32768||(o===-1)||o>32767){return[DE.nil,C.New("Time.MarshalBinary: unexpected zone offset")];}m=(o<<16>>16);}r=new DE([1,($shiftRightInt64(l.sec,56).$low<<24>>>24),($shiftRightInt64(l.sec,48).$low<<24>>>24),($shiftRightInt64(l.sec,40).$low<<24>>>24),($shiftRightInt64(l.sec,32).$low<<24>>>24),($shiftRightInt64(l.sec,24).$low<<24>>>24),($shiftRightInt64(l.sec,16).$low<<24>>>24),($shiftRightInt64(l.sec,8).$low<<24>>>24),(l.sec.$low<<24>>>24),((l.nsec>>24>>0)<<24>>>24),((l.nsec>>16>>0)<<24>>>24),((l.nsec>>8>>0)<<24>>>24),(l.nsec<<24>>>24),((m>>8<<16>>16)<<24>>>24),(m<<24>>>24)]);return[r,$ifaceNil];};BG.prototype.MarshalBinary=function(){return this.$val.MarshalBinary();};BG.ptr.prototype.UnmarshalBinary=function(l){var aa,ab,ac,ad,ae,af,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;m=this;n=l;if(n.$length===0){return C.New("Time.UnmarshalBinary: no data");}if(!((((0<0||0>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+0])===1))){return C.New("Time.UnmarshalBinary: unsupported version");}if(!((n.$length===15))){return C.New("Time.UnmarshalBinary: invalid length");}n=$subslice(n,1);m.sec=(o=(p=(q=(r=(s=(t=(u=new $Int64(0,((7<0||7>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+7])),v=$shiftLeft64(new $Int64(0,((6<0||6>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+6])),8),new $Int64(u.$high|v.$high,(u.$low|v.$low)>>>0)),w=$shiftLeft64(new $Int64(0,((5<0||5>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+5])),16),new $Int64(t.$high|w.$high,(t.$low|w.$low)>>>0)),x=$shiftLeft64(new $Int64(0,((4<0||4>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+4])),24),new $Int64(s.$high|x.$high,(s.$low|x.$low)>>>0)),y=$shiftLeft64(new $Int64(0,((3<0||3>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+3])),32),new $Int64(r.$high|y.$high,(r.$low|y.$low)>>>0)),z=$shiftLeft64(new $Int64(0,((2<0||2>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+2])),40),new $Int64(q.$high|z.$high,(q.$low|z.$low)>>>0)),aa=$shiftLeft64(new $Int64(0,((1<0||1>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+1])),48),new $Int64(p.$high|aa.$high,(p.$low|aa.$low)>>>0)),ab=$shiftLeft64(new $Int64(0,((0<0||0>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+0])),56),new $Int64(o.$high|ab.$high,(o.$low|ab.$low)>>>0));n=$subslice(n,8);m.nsec=(((((3<0||3>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+3])>>0)|((((2<0||2>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+2])>>0)<<8>>0))|((((1<0||1>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+1])>>0)<<16>>0))|((((0<0||0>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+0])>>0)<<24>>0);n=$subslice(n,4);ac=(((((1<0||1>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+1])<<16>>16)|((((0<0||0>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+0])<<16>>16)<<8<<16>>16))>>0)*60>>0;if(ac===-60){m.loc=CD;}else{ad=$pkg.Local.lookup((ae=m.sec,new $Int64(ae.$high+-15,ae.$low+2288912640)));af=ad[1];if(ac===af){m.loc=$pkg.Local;}else{m.loc=CG("",ac);}}return $ifaceNil;};BG.prototype.UnmarshalBinary=function(l){return this.$val.UnmarshalBinary(l);};BG.ptr.prototype.GobEncode=function(){var l;l=$clone(this,BG);return l.MarshalBinary();};BG.prototype.GobEncode=function(){return this.$val.GobEncode();};BG.ptr.prototype.GobDecode=function(l){var l,m;m=this;return m.UnmarshalBinary(l);};BG.prototype.GobDecode=function(l){return this.$val.GobDecode(l);};BG.ptr.prototype.MarshalJSON=function(){var l,m;l=$clone(this,BG);m=l.Year();if(m<0||m>=10000){return[DE.nil,C.New("Time.MarshalJSON: year outside of range [0,9999]")];}return[new DE($stringToBytes(l.Format("\"2006-01-02T15:04:05.999999999Z07:00\""))),$ifaceNil];};BG.prototype.MarshalJSON=function(){return this.$val.MarshalJSON();};BG.ptr.prototype.UnmarshalJSON=function(l){var l,m=$ifaceNil,n,o;n=this;o=AH("\"2006-01-02T15:04:05Z07:00\"",$bytesToString(l));$copy(n,o[0],BG);m=o[1];return m;};BG.prototype.UnmarshalJSON=function(l){return this.$val.UnmarshalJSON(l);};BG.ptr.prototype.MarshalText=function(){var l,m;l=$clone(this,BG);m=l.Year();if(m<0||m>=10000){return[DE.nil,C.New("Time.MarshalText: year outside of range [0,9999]")];}return[new DE($stringToBytes(l.Format("2006-01-02T15:04:05.999999999Z07:00"))),$ifaceNil];};BG.prototype.MarshalText=function(){return this.$val.MarshalText();};BG.ptr.prototype.UnmarshalText=function(l){var l,m=$ifaceNil,n,o;n=this;o=AH("2006-01-02T15:04:05Z07:00",$bytesToString(l));$copy(n,o[0],BG);m=o[1];return m;};BG.prototype.UnmarshalText=function(l){return this.$val.UnmarshalText(l);};BV=$pkg.Unix=function(l,m){var l,m,n,o,p,q,r;if((m.$high<0||(m.$high===0&&m.$low<0))||(m.$high>0||(m.$high===0&&m.$low>=1000000000))){n=$div64(m,new $Int64(0,1000000000),false);l=(o=n,new $Int64(l.$high+o.$high,l.$low+o.$low));m=(p=$mul64(n,new $Int64(0,1000000000)),new $Int64(m.$high-p.$high,m.$low-p.$low));if((m.$high<0||(m.$high===0&&m.$low<0))){m=(q=new $Int64(0,1000000000),new $Int64(m.$high+q.$high,m.$low+q.$low));l=(r=new $Int64(0,1),new $Int64(l.$high-r.$high,l.$low-r.$low));}}return new BG.ptr(new $Int64(l.$high+14,l.$low+2006054656),((m.$low+((m.$high>>31)*4294967296))>>0),$pkg.Local);};BW=function(l){var l,m,n,o;return((m=l%4,m===m?m:$throwRuntimeError("integer divide by zero"))===0)&&(!(((n=l%100,n===n?n:$throwRuntimeError("integer divide by zero"))===0))||((o=l%400,o===o?o:$throwRuntimeError("integer divide by zero"))===0));};BX=function(l,m,n){var l,m,n,o=0,p=0,q,r,s,t,u,v;if(m<0){r=(q=((-m-1>>0))/n,(q===q&&q!==1/0&&q!==-1/0)?q>>0:$throwRuntimeError("integer divide by zero"))+1>>0;l=l-(r)>>0;m=m+((r*n>>0))>>0;}if(m>=n){t=(s=m/n,(s===s&&s!==1/0&&s!==-1/0)?s>>0:$throwRuntimeError("integer divide by zero"));l=l+(t)>>0;m=m-((t*n>>0))>>0;}u=l;v=m;o=u;p=v;return[o,p];};BY=$pkg.Date=function(l,m,n,o,p,q,r,s){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;if(s===DH.nil){$panic(new $String("time: missing Location in call to Date"));}t=(m>>0)-1>>0;u=BX(l,t,12);l=u[0];t=u[1];m=(t>>0)+1>>0;v=BX(q,r,1000000000);q=v[0];r=v[1];w=BX(p,q,60);p=w[0];q=w[1];x=BX(o,p,60);o=x[0];p=x[1];y=BX(n,o,24);n=y[0];o=y[1];ab=(z=(aa=new $Int64(0,l),new $Int64(aa.$high- -69,aa.$low-4075721025)),new $Uint64(z.$high,z.$low));ac=$div64(ab,new $Uint64(0,400),false);ab=(ad=$mul64(new $Uint64(0,400),ac),new $Uint64(ab.$high-ad.$high,ab.$low-ad.$low));ae=$mul64(new $Uint64(0,146097),ac);ac=$div64(ab,new $Uint64(0,100),false);ab=(af=$mul64(new $Uint64(0,100),ac),new $Uint64(ab.$high-af.$high,ab.$low-af.$low));ae=(ag=$mul64(new $Uint64(0,36524),ac),new $Uint64(ae.$high+ag.$high,ae.$low+ag.$low));ac=$div64(ab,new $Uint64(0,4),false);ab=(ah=$mul64(new $Uint64(0,4),ac),new $Uint64(ab.$high-ah.$high,ab.$low-ah.$low));ae=(ai=$mul64(new $Uint64(0,1461),ac),new $Uint64(ae.$high+ai.$high,ae.$low+ai.$low));ac=ab;ae=(aj=$mul64(new $Uint64(0,365),ac),new $Uint64(ae.$high+aj.$high,ae.$low+aj.$low));ae=(ak=new $Uint64(0,(al=m-1>>0,((al<0||al>=BS.length)?$throwRuntimeError("index out of range"):BS[al]))),new $Uint64(ae.$high+ak.$high,ae.$low+ak.$low));if(BW(l)&&m>=3){ae=(am=new $Uint64(0,1),new $Uint64(ae.$high+am.$high,ae.$low+am.$low));}ae=(an=new $Uint64(0,(n-1>>0)),new $Uint64(ae.$high+an.$high,ae.$low+an.$low));ao=$mul64(ae,new $Uint64(0,86400));ao=(ap=new $Uint64(0,(((o*3600>>0)+(p*60>>0)>>0)+q>>0)),new $Uint64(ao.$high+ap.$high,ao.$low+ap.$low));ar=(aq=new $Int64(ao.$high,ao.$low),new $Int64(aq.$high+-2147483647,aq.$low+3844486912));as=s.lookup(ar);at=as[1];au=as[3];av=as[4];if(!((at===0))){ax=(aw=new $Int64(0,at),new $Int64(ar.$high-aw.$high,ar.$low-aw.$low));if((ax.$highav.$high||(ax.$high===av.$high&&ax.$low>=av.$low))){az=s.lookup(av);at=az[1];}ar=(ba=new $Int64(0,at),new $Int64(ar.$high-ba.$high,ar.$low-ba.$low));}return new BG.ptr(new $Int64(ar.$high+14,ar.$low+2006054656),(r>>0),s);};BG.ptr.prototype.Truncate=function(l){var l,m,n,o;m=$clone(this,BG);if((l.$high<0||(l.$high===0&&l.$low<=0))){return m;}n=BZ(m,l);o=n[1];return m.Add(new BN(-o.$high,-o.$low));};BG.prototype.Truncate=function(l){return this.$val.Truncate(l);};BG.ptr.prototype.Round=function(l){var l,m,n,o,p;m=$clone(this,BG);if((l.$high<0||(l.$high===0&&l.$low<=0))){return m;}n=BZ(m,l);o=n[1];if((p=new BN(o.$high+o.$high,o.$low+o.$low),(p.$high>0;l.sec=(t=l.sec,u=new $Int64(0,1),new $Int64(t.$high-u.$high,t.$low-u.$low));}}if((m.$high<0||(m.$high===0&&m.$low<1000000000))&&(v=$div64(new BN(0,1000000000),(new BN(m.$high+m.$high,m.$low+m.$low)),true),(v.$high===0&&v.$low===0))){n=((x=q/((m.$low+((m.$high>>31)*4294967296))>>0),(x===x&&x!==1/0&&x!==-1/0)?x>>0:$throwRuntimeError("integer divide by zero"))>>0)&1;o=new BN(0,(y=q%((m.$low+((m.$high>>31)*4294967296))>>0),y===y?y:$throwRuntimeError("integer divide by zero")));}else if((w=$div64(m,new BN(0,1000000000),true),(w.$high===0&&w.$low===0))){aa=(z=$div64(m,new BN(0,1000000000),false),new $Int64(z.$high,z.$low));n=((ab=$div64(l.sec,aa,false),ab.$low+((ab.$high>>31)*4294967296))>>0)&1;o=(ac=$mul64((ad=$div64(l.sec,aa,true),new BN(ad.$high,ad.$low)),new BN(0,1000000000)),ae=new BN(0,q),new BN(ac.$high+ae.$high,ac.$low+ae.$low));}else{ag=(af=l.sec,new $Uint64(af.$high,af.$low));ah=$mul64(($shiftRightUint64(ag,32)),new $Uint64(0,1000000000));ai=$shiftRightUint64(ah,32);aj=$shiftLeft64(ah,32);ah=$mul64(new $Uint64(ag.$high&0,(ag.$low&4294967295)>>>0),new $Uint64(0,1000000000));ak=aj;al=new $Uint64(aj.$high+ah.$high,aj.$low+ah.$low);am=ak;aj=al;if((aj.$highas.$high||(ai.$high===as.$high&&ai.$low>as.$low))||(ai.$high===as.$high&&ai.$low===as.$low)&&(aj.$high>au.$high||(aj.$high===au.$high&&aj.$low>=au.$low))){n=1;av=aj;aw=new $Uint64(aj.$high-au.$high,aj.$low-au.$low);am=av;aj=aw;if((aj.$high>am.$high||(aj.$high===am.$high&&aj.$low>am.$low))){ai=(ax=new $Uint64(0,1),new $Uint64(ai.$high-ax.$high,ai.$low-ax.$low));}ai=(ay=as,new $Uint64(ai.$high-ay.$high,ai.$low-ay.$low));}if((as.$high===0&&as.$low===0)&&(az=new $Uint64(m.$high,m.$low),(au.$high===az.$high&&au.$low===az.$low))){break;}au=$shiftRightUint64(au,(1));au=(ba=$shiftLeft64((new $Uint64(as.$high&0,(as.$low&1)>>>0)),63),new $Uint64(au.$high|ba.$high,(au.$low|ba.$low)>>>0));as=$shiftRightUint64(as,(1));}o=new BN(aj.$high,aj.$low);}if(p&&!((o.$high===0&&o.$low===0))){n=(n^(1))>>0;o=new BN(m.$high-o.$high,m.$low-o.$low);}return[n,o];};CA.ptr.prototype.get=function(){var l;l=this;if(l===DH.nil){return CD;}if(l===CE){CF.Do(H);}return l;};CA.prototype.get=function(){return this.$val.get();};CA.ptr.prototype.String=function(){var l;l=this;return l.get().name;};CA.prototype.String=function(){return this.$val.String();};CG=$pkg.FixedZone=function(l,m){var l,m,n,o;n=new CA.ptr(l,new CX([new CB.ptr(l,m,false)]),new CY([new CC.ptr(new $Int64(-2147483648,0),0,false,false)]),new $Int64(-2147483648,0),new $Int64(2147483647,4294967295),CZ.nil);n.cacheZone=(o=n.zone,((0<0||0>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+0]));return n;};CA.ptr.prototype.lookup=function(l){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,l,m="",n=0,o=false,p=new $Int64(0,0),q=new $Int64(0,0),r,s,t,u,v,w,x,y,z;r=this;r=r.get();if(r.zone.$length===0){m="UTC";n=0;o=false;p=new $Int64(-2147483648,0);q=new $Int64(2147483647,4294967295);return[m,n,o,p,q];}s=r.cacheZone;if(!(s===CZ.nil)&&(t=r.cacheStart,(t.$high=w.$length)?$throwRuntimeError("index out of range"):w.$array[w.$offset+0])).when,(l.$high=x.$length)?$throwRuntimeError("index out of range"):x.$array[x.$offset+y]));m=z.name;n=z.offset;o=z.isDST;p=new $Int64(-2147483648,0);if(r.tx.$length>0){q=(aa=r.tx,((0<0||0>=aa.$length)?$throwRuntimeError("index out of range"):aa.$array[aa.$offset+0])).when;}else{q=new $Int64(2147483647,4294967295);}return[m,n,o,p,q];}ab=r.tx;q=new $Int64(2147483647,4294967295);ac=0;ad=ab.$length;while(true){if(!((ad-ac>>0)>1)){break;}af=ac+(ae=((ad-ac>>0))/2,(ae===ae&&ae!==1/0&&ae!==-1/0)?ae>>0:$throwRuntimeError("integer divide by zero"))>>0;ag=((af<0||af>=ab.$length)?$throwRuntimeError("index out of range"):ab.$array[ab.$offset+af]).when;if((l.$high=ab.$length)?$throwRuntimeError("index out of range"):ab.$array[ab.$offset+ac]).index,((ai<0||ai>=ah.$length)?$throwRuntimeError("index out of range"):ah.$array[ah.$offset+ai]));m=aj.name;n=aj.offset;o=aj.isDST;p=((ac<0||ac>=ab.$length)?$throwRuntimeError("index out of range"):ab.$array[ab.$offset+ac]).when;return[m,n,o,p,q];};CA.prototype.lookup=function(l){return this.$val.lookup(l);};CA.ptr.prototype.lookupFirstZone=function(){var l,m,n,o,p,q,r,s,t,u,v;l=this;if(!l.firstZoneUsed()){return 0;}if(l.tx.$length>0&&(m=l.zone,n=(o=l.tx,((0<0||0>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+0])).index,((n<0||n>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+n])).isDST){q=((p=l.tx,((0<0||0>=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+0])).index>>0)-1>>0;while(true){if(!(q>=0)){break;}if(!(r=l.zone,((q<0||q>=r.$length)?$throwRuntimeError("index out of range"):r.$array[r.$offset+q])).isDST){return q;}q=q-(1)>>0;}}s=l.zone;t=0;while(true){if(!(t=v.$length)?$throwRuntimeError("index out of range"):v.$array[v.$offset+u])).isDST){return u;}t++;}return 0;};CA.prototype.lookupFirstZone=function(){return this.$val.lookupFirstZone();};CA.ptr.prototype.firstZoneUsed=function(){var l,m,n,o;l=this;m=l.tx;n=0;while(true){if(!(n=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+n]),CC);if(o.index===0){return true;}n++;}return false;};CA.prototype.firstZoneUsed=function(){return this.$val.firstZoneUsed();};CA.ptr.prototype.lookupName=function(l,m){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,l,m,n=0,o=false,p=false,q,r,s,t,u,v,w,x,y,z;q=this;q=q.get();r=q.zone;s=0;while(true){if(!(s=u.$length)?$throwRuntimeError("index out of range"):u.$array[u.$offset+t]));if(v.name===l){w=q.lookup((x=new $Int64(0,v.offset),new $Int64(m.$high-x.$high,m.$low-x.$low)));y=w[0];z=w[1];aa=w[2];if(y===v.name){ab=z;ac=aa;ad=true;n=ab;o=ac;p=ad;return[n,o,p];}}s++;}ae=q.zone;af=0;while(true){if(!(af=ah.$length)?$throwRuntimeError("index out of range"):ah.$array[ah.$offset+ag]));if(ai.name===l){aj=ai.offset;ak=ai.isDST;al=true;n=aj;o=ak;p=al;return[n,o,p];}af++;}return[n,o,p];};CA.prototype.lookupName=function(l,m){return this.$val.lookupName(l,m);};DN.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];BG.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Format",name:"Format",pkg:"",typ:$funcType([$String],[$String],false)},{prop:"After",name:"After",pkg:"",typ:$funcType([BG],[$Bool],false)},{prop:"Before",name:"Before",pkg:"",typ:$funcType([BG],[$Bool],false)},{prop:"Equal",name:"Equal",pkg:"",typ:$funcType([BG],[$Bool],false)},{prop:"IsZero",name:"IsZero",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"abs",name:"abs",pkg:"time",typ:$funcType([],[$Uint64],false)},{prop:"locabs",name:"locabs",pkg:"time",typ:$funcType([],[$String,$Int,$Uint64],false)},{prop:"Date",name:"Date",pkg:"",typ:$funcType([],[$Int,BH,$Int],false)},{prop:"Year",name:"Year",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Month",name:"Month",pkg:"",typ:$funcType([],[BH],false)},{prop:"Day",name:"Day",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Weekday",name:"Weekday",pkg:"",typ:$funcType([],[BJ],false)},{prop:"ISOWeek",name:"ISOWeek",pkg:"",typ:$funcType([],[$Int,$Int],false)},{prop:"Clock",name:"Clock",pkg:"",typ:$funcType([],[$Int,$Int,$Int],false)},{prop:"Hour",name:"Hour",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Minute",name:"Minute",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Second",name:"Second",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Nanosecond",name:"Nanosecond",pkg:"",typ:$funcType([],[$Int],false)},{prop:"YearDay",name:"YearDay",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Add",name:"Add",pkg:"",typ:$funcType([BN],[BG],false)},{prop:"Sub",name:"Sub",pkg:"",typ:$funcType([BG],[BN],false)},{prop:"AddDate",name:"AddDate",pkg:"",typ:$funcType([$Int,$Int,$Int],[BG],false)},{prop:"date",name:"date",pkg:"time",typ:$funcType([$Bool],[$Int,BH,$Int,$Int],false)},{prop:"UTC",name:"UTC",pkg:"",typ:$funcType([],[BG],false)},{prop:"Local",name:"Local",pkg:"",typ:$funcType([],[BG],false)},{prop:"In",name:"In",pkg:"",typ:$funcType([DH],[BG],false)},{prop:"Location",name:"Location",pkg:"",typ:$funcType([],[DH],false)},{prop:"Zone",name:"Zone",pkg:"",typ:$funcType([],[$String,$Int],false)},{prop:"Unix",name:"Unix",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"UnixNano",name:"UnixNano",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"MarshalBinary",name:"MarshalBinary",pkg:"",typ:$funcType([],[DE,$error],false)},{prop:"GobEncode",name:"GobEncode",pkg:"",typ:$funcType([],[DE,$error],false)},{prop:"MarshalJSON",name:"MarshalJSON",pkg:"",typ:$funcType([],[DE,$error],false)},{prop:"MarshalText",name:"MarshalText",pkg:"",typ:$funcType([],[DE,$error],false)},{prop:"Truncate",name:"Truncate",pkg:"",typ:$funcType([BN],[BG],false)},{prop:"Round",name:"Round",pkg:"",typ:$funcType([BN],[BG],false)}];DQ.methods=[{prop:"UnmarshalBinary",name:"UnmarshalBinary",pkg:"",typ:$funcType([DE],[$error],false)},{prop:"GobDecode",name:"GobDecode",pkg:"",typ:$funcType([DE],[$error],false)},{prop:"UnmarshalJSON",name:"UnmarshalJSON",pkg:"",typ:$funcType([DE],[$error],false)},{prop:"UnmarshalText",name:"UnmarshalText",pkg:"",typ:$funcType([DE],[$error],false)}];BH.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];BJ.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];BN.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Nanoseconds",name:"Nanoseconds",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Seconds",name:"Seconds",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Minutes",name:"Minutes",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Hours",name:"Hours",pkg:"",typ:$funcType([],[$Float64],false)}];DH.methods=[{prop:"get",name:"get",pkg:"time",typ:$funcType([],[DH],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"lookup",name:"lookup",pkg:"time",typ:$funcType([$Int64],[$String,$Int,$Bool,$Int64,$Int64],false)},{prop:"lookupFirstZone",name:"lookupFirstZone",pkg:"time",typ:$funcType([],[$Int],false)},{prop:"firstZoneUsed",name:"firstZoneUsed",pkg:"time",typ:$funcType([],[$Bool],false)},{prop:"lookupName",name:"lookupName",pkg:"time",typ:$funcType([$String,$Int64],[$Int,$Bool,$Bool],false)}];AB.init([{prop:"Layout",name:"Layout",pkg:"",typ:$String,tag:""},{prop:"Value",name:"Value",pkg:"",typ:$String,tag:""},{prop:"LayoutElem",name:"LayoutElem",pkg:"",typ:$String,tag:""},{prop:"ValueElem",name:"ValueElem",pkg:"",typ:$String,tag:""},{prop:"Message",name:"Message",pkg:"",typ:$String,tag:""}]);BG.init([{prop:"sec",name:"sec",pkg:"time",typ:$Int64,tag:""},{prop:"nsec",name:"nsec",pkg:"time",typ:$Int32,tag:""},{prop:"loc",name:"loc",pkg:"time",typ:DH,tag:""}]);CA.init([{prop:"name",name:"name",pkg:"time",typ:$String,tag:""},{prop:"zone",name:"zone",pkg:"time",typ:CX,tag:""},{prop:"tx",name:"tx",pkg:"time",typ:CY,tag:""},{prop:"cacheStart",name:"cacheStart",pkg:"time",typ:$Int64,tag:""},{prop:"cacheEnd",name:"cacheEnd",pkg:"time",typ:$Int64,tag:""},{prop:"cacheZone",name:"cacheZone",pkg:"time",typ:CZ,tag:""}]);CB.init([{prop:"name",name:"name",pkg:"time",typ:$String,tag:""},{prop:"offset",name:"offset",pkg:"time",typ:$Int,tag:""},{prop:"isDST",name:"isDST",pkg:"time",typ:$Bool,tag:""}]);CC.init([{prop:"when",name:"when",pkg:"time",typ:$Int64,tag:""},{prop:"index",name:"index",pkg:"time",typ:$Uint8,tag:""},{prop:"isstd",name:"isstd",pkg:"time",typ:$Bool,tag:""},{prop:"isutc",name:"isutc",pkg:"time",typ:$Bool,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_time=function(){while(true){switch($s){case 0:$r=C.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=F.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=6;case 6:if($r&&$r.$blocking){$r=$r();}CE=new CA.ptr();CF=new E.Once.ptr();N=$toNativeArray($kindInt,[260,265,524,526,528,274]);Q=new CW(["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]);R=new CW(["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]);S=new CW(["---","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]);T=new CW(["---","January","February","March","April","May","June","July","August","September","October","November","December"]);X=C.New("time: invalid number");AA=C.New("bad value for field");AN=C.New("time: bad [0-9]*");BI=$toNativeArray($kindString,["January","February","March","April","May","June","July","August","September","October","November","December"]);BK=$toNativeArray($kindString,["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]);AP=(h=new $Map(),i="ns",h[i]={k:i,v:1},i="us",h[i]={k:i,v:1000},i="\xC2\xB5s",h[i]={k:i,v:1000},i="\xCE\xBCs",h[i]={k:i,v:1000},i="ms",h[i]={k:i,v:1e+06},i="s",h[i]={k:i,v:1e+09},i="m",h[i]={k:i,v:6e+10},i="h",h[i]={k:i,v:3.6e+12},h);BS=$toNativeArray($kindInt32,[0,31,59,90,120,151,181,212,243,273,304,334,365]);CD=new CA.ptr("UTC",CX.nil,CY.nil,new $Int64(0,0),new $Int64(0,0),CZ.nil);$pkg.UTC=CD;$pkg.Local=CE;k=D.Getenv("ZONEINFO",$BLOCKING);$s=7;case 7:if(k&&k.$blocking){k=k();}j=k;CH=j[0];CL=C.New("malformed time zone information");CS=new CW(["/usr/share/zoneinfo/","/usr/share/lib/zoneinfo/","/usr/lib/locale/TZ/",F.GOROOT()+"/lib/time/zoneinfo.zip"]);}return;}};$init_time.$blocking=true;return $init_time;};return $pkg;})(); +$packages["os"]=(function(){var $pkg={},E,A,B,F,H,G,C,D,X,Y,AR,BH,BI,BK,CT,CU,CW,CY,CZ,DA,DC,DD,DE,DF,DL,DR,DS,DT,DX,DY,AP,AW,BW,CQ,I,J,S,Z,AB,AE,AU,AY,AZ,BC,BJ,BL,BM,BO,BR,BY,BZ,CC,CE,CK,CM,CN,CR;E=$packages["errors"];A=$packages["github.com/gopherjs/gopherjs/js"];B=$packages["io"];F=$packages["runtime"];H=$packages["sync"];G=$packages["sync/atomic"];C=$packages["syscall"];D=$packages["time"];X=$pkg.PathError=$newType(0,$kindStruct,"os.PathError","PathError","os",function(Op_,Path_,Err_){this.$val=this;this.Op=Op_!==undefined?Op_:"";this.Path=Path_!==undefined?Path_:"";this.Err=Err_!==undefined?Err_:$ifaceNil;});Y=$pkg.SyscallError=$newType(0,$kindStruct,"os.SyscallError","SyscallError","os",function(Syscall_,Err_){this.$val=this;this.Syscall=Syscall_!==undefined?Syscall_:"";this.Err=Err_!==undefined?Err_:$ifaceNil;});AR=$pkg.LinkError=$newType(0,$kindStruct,"os.LinkError","LinkError","os",function(Op_,Old_,New_,Err_){this.$val=this;this.Op=Op_!==undefined?Op_:"";this.Old=Old_!==undefined?Old_:"";this.New=New_!==undefined?New_:"";this.Err=Err_!==undefined?Err_:$ifaceNil;});BH=$pkg.File=$newType(0,$kindStruct,"os.File","File","os",function(file_){this.$val=this;this.file=file_!==undefined?file_:DR.nil;});BI=$pkg.file=$newType(0,$kindStruct,"os.file","file","os",function(fd_,name_,dirinfo_,nepipe_){this.$val=this;this.fd=fd_!==undefined?fd_:0;this.name=name_!==undefined?name_:"";this.dirinfo=dirinfo_!==undefined?dirinfo_:CZ.nil;this.nepipe=nepipe_!==undefined?nepipe_:0;});BK=$pkg.dirInfo=$newType(0,$kindStruct,"os.dirInfo","dirInfo","os",function(buf_,nbuf_,bufp_){this.$val=this;this.buf=buf_!==undefined?buf_:DA.nil;this.nbuf=nbuf_!==undefined?nbuf_:0;this.bufp=bufp_!==undefined?bufp_:0;});CT=$pkg.FileInfo=$newType(8,$kindInterface,"os.FileInfo","FileInfo","os",null);CU=$pkg.FileMode=$newType(4,$kindUint32,"os.FileMode","FileMode","os",null);CW=$pkg.fileStat=$newType(0,$kindStruct,"os.fileStat","fileStat","os",function(name_,size_,mode_,modTime_,sys_){this.$val=this;this.name=name_!==undefined?name_:"";this.size=size_!==undefined?size_:new $Int64(0,0);this.mode=mode_!==undefined?mode_:0;this.modTime=modTime_!==undefined?modTime_:new D.Time.ptr();this.sys=sys_!==undefined?sys_:$ifaceNil;});CY=$sliceType($String);CZ=$ptrType(BK);DA=$sliceType($Uint8);DC=$sliceType(CT);DD=$ptrType(BH);DE=$ptrType(X);DF=$ptrType(AR);DL=$arrayType($Uint8,32);DR=$ptrType(BI);DS=$funcType([DR],[$error],false);DT=$ptrType($Int32);DX=$ptrType(CW);DY=$ptrType(Y);I=function(){return $pkg.Args;};J=function(){var b,c,d;b=$global.process;if(!(b===undefined)){c=b.argv;$pkg.Args=$makeSlice(CY,($parseInt(c.length)-1>>0));d=0;while(true){if(!(d<($parseInt(c.length)-1>>0))){break;}(d<0||d>=$pkg.Args.$length)?$throwRuntimeError("index out of range"):$pkg.Args.$array[$pkg.Args.$offset+d]=$internalize(c[(d+1>>0)],$String);d=d+(1)>>0;}}if($pkg.Args.$length===0){$pkg.Args=new CY(["?"]);}};BH.ptr.prototype.readdirnames=function(b){var b,c=CY.nil,d=$ifaceNil,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;e=this;if(e.file.dirinfo===CZ.nil){e.file.dirinfo=new BK.ptr();e.file.dirinfo.buf=$makeSlice(DA,4096);}f=e.file.dirinfo;g=b;if(g<=0){g=100;b=-1;}c=$makeSlice(CY,0,g);while(true){if(!(!((b===0)))){break;}if(f.bufp>=f.nbuf){f.bufp=0;h=$ifaceNil;j=C.ReadDirent(e.file.fd,f.buf);i=AY(j[0],j[1]);f.nbuf=i[0];h=i[1];if(!($interfaceIsEqual(h,$ifaceNil))){k=c;l=Z("readdirent",h);c=k;d=l;return[c,d];}if(f.nbuf<=0){break;}}m=0;n=0;o=m;p=n;q=C.ParseDirent($subslice(f.buf,f.bufp,f.nbuf),b,c);o=q[0];p=q[1];c=q[2];f.bufp=f.bufp+(o)>>0;b=b-(p)>>0;}if(b>=0&&(c.$length===0)){r=c;s=B.EOF;c=r;d=s;return[c,d];}t=c;u=$ifaceNil;c=t;d=u;return[c,d];};BH.prototype.readdirnames=function(b){return this.$val.readdirnames(b);};BH.ptr.prototype.Readdir=function(b){var b,c=DC.nil,d=$ifaceNil,e,f,g,h;e=this;if(e===DD.nil){f=DC.nil;g=$pkg.ErrInvalid;c=f;d=g;return[c,d];}h=e.readdir(b);c=h[0];d=h[1];return[c,d];};BH.prototype.Readdir=function(b){return this.$val.Readdir(b);};BH.ptr.prototype.Readdirnames=function(b){var b,c=CY.nil,d=$ifaceNil,e,f,g,h;e=this;if(e===DD.nil){f=CY.nil;g=$pkg.ErrInvalid;c=f;d=g;return[c,d];}h=e.readdirnames(b);c=h[0];d=h[1];return[c,d];};BH.prototype.Readdirnames=function(b){return this.$val.Readdirnames(b);};S=$pkg.Getenv=function(b,$b){var $args=arguments,$r,$s=0,$this=this,c,d,e;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:d=C.Getenv(b,$BLOCKING);$s=1;case 1:if(d&&d.$blocking){d=d();}c=d;e=c[0];return e;case-1:}return;}};$f.$blocking=true;return $f;};X.ptr.prototype.Error=function(){var b;b=this;return b.Op+" "+b.Path+": "+b.Err.Error();};X.prototype.Error=function(){return this.$val.Error();};Y.ptr.prototype.Error=function(){var b;b=this;return b.Syscall+": "+b.Err.Error();};Y.prototype.Error=function(){return this.$val.Error();};Z=$pkg.NewSyscallError=function(b,c){var b,c;if($interfaceIsEqual(c,$ifaceNil)){return $ifaceNil;}return new Y.ptr(b,c);};AB=$pkg.IsNotExist=function(b){var b;return AE(b);};AE=function(b){var b,c,d;d=b;if(d===$ifaceNil){c=d;return false;}else if($assertType(d,DE,true)[1]){c=d.$val;b=c.Err;}else if($assertType(d,DF,true)[1]){c=d.$val;b=c.Err;}return $interfaceIsEqual(b,new C.Errno(2))||$interfaceIsEqual(b,$pkg.ErrNotExist);};BH.ptr.prototype.Name=function(){var b;b=this;return b.file.name;};BH.prototype.Name=function(){return this.$val.Name();};AR.ptr.prototype.Error=function(){var b;b=this;return b.Op+" "+b.Old+" "+b.New+": "+b.Err.Error();};AR.prototype.Error=function(){return this.$val.Error();};BH.ptr.prototype.Read=function(b){var b,c=0,d=$ifaceNil,e,f,g,h,i,j,k,l,m;e=this;if(e===DD.nil){f=0;g=$pkg.ErrInvalid;c=f;d=g;return[c,d];}h=e.read(b);c=h[0];i=h[1];if(c<0){c=0;}if((c===0)&&b.$length>0&&$interfaceIsEqual(i,$ifaceNil)){j=0;k=B.EOF;c=j;d=k;return[c,d];}if(!($interfaceIsEqual(i,$ifaceNil))){d=new X.ptr("read",e.file.name,i);}l=c;m=d;c=l;d=m;return[c,d];};BH.prototype.Read=function(b){return this.$val.Read(b);};BH.ptr.prototype.ReadAt=function(b,c){var b,c,d=0,e=$ifaceNil,f,g,h,i,j,k,l,m,n;f=this;if(f===DD.nil){g=0;h=$pkg.ErrInvalid;d=g;e=h;return[d,e];}while(true){if(!(b.$length>0)){break;}i=f.pread(b,c);j=i[0];k=i[1];if((j===0)&&$interfaceIsEqual(k,$ifaceNil)){l=d;m=B.EOF;d=l;e=m;return[d,e];}if(!($interfaceIsEqual(k,$ifaceNil))){e=new X.ptr("read",f.file.name,k);break;}d=d+(j)>>0;b=$subslice(b,j);c=(n=new $Int64(0,j),new $Int64(c.$high+n.$high,c.$low+n.$low));}return[d,e];};BH.prototype.ReadAt=function(b,c){return this.$val.ReadAt(b,c);};BH.ptr.prototype.Write=function(b){var b,c=0,d=$ifaceNil,e,f,g,h,i,j,k;e=this;if(e===DD.nil){f=0;g=$pkg.ErrInvalid;c=f;d=g;return[c,d];}h=e.write(b);c=h[0];i=h[1];if(c<0){c=0;}if(!((c===b.$length))){d=B.ErrShortWrite;}BL(e,i);if(!($interfaceIsEqual(i,$ifaceNil))){d=new X.ptr("write",e.file.name,i);}j=c;k=d;c=j;d=k;return[c,d];};BH.prototype.Write=function(b){return this.$val.Write(b);};BH.ptr.prototype.WriteAt=function(b,c){var b,c,d=0,e=$ifaceNil,f,g,h,i,j,k,l;f=this;if(f===DD.nil){g=0;h=$pkg.ErrInvalid;d=g;e=h;return[d,e];}while(true){if(!(b.$length>0)){break;}i=f.pwrite(b,c);j=i[0];k=i[1];if(!($interfaceIsEqual(k,$ifaceNil))){e=new X.ptr("write",f.file.name,k);break;}d=d+(j)>>0;b=$subslice(b,j);c=(l=new $Int64(0,j),new $Int64(c.$high+l.$high,c.$low+l.$low));}return[d,e];};BH.prototype.WriteAt=function(b,c){return this.$val.WriteAt(b,c);};BH.ptr.prototype.Seek=function(b,c){var b,c,d=new $Int64(0,0),e=$ifaceNil,f,g,h,i,j,k,l,m,n,o;f=this;if(f===DD.nil){g=new $Int64(0,0);h=$pkg.ErrInvalid;d=g;e=h;return[d,e];}i=f.seek(b,c);j=i[0];k=i[1];if($interfaceIsEqual(k,$ifaceNil)&&!(f.file.dirinfo===CZ.nil)&&!((j.$high===0&&j.$low===0))){k=new C.Errno(21);}if(!($interfaceIsEqual(k,$ifaceNil))){l=new $Int64(0,0);m=new X.ptr("seek",f.file.name,k);d=l;e=m;return[d,e];}n=j;o=$ifaceNil;d=n;e=o;return[d,e];};BH.prototype.Seek=function(b,c){return this.$val.Seek(b,c);};BH.ptr.prototype.WriteString=function(b){var b,c=0,d=$ifaceNil,e,f,g,h;e=this;if(e===DD.nil){f=0;g=$pkg.ErrInvalid;c=f;d=g;return[c,d];}h=e.Write(new DA($stringToBytes(b)));c=h[0];d=h[1];return[c,d];};BH.prototype.WriteString=function(b){return this.$val.WriteString(b);};BH.ptr.prototype.Chdir=function(){var b,c;b=this;if(b===DD.nil){return $pkg.ErrInvalid;}c=C.Fchdir(b.file.fd);if(!($interfaceIsEqual(c,$ifaceNil))){return new X.ptr("chdir",b.file.name,c);}return $ifaceNil;};BH.prototype.Chdir=function(){return this.$val.Chdir();};AU=$pkg.Open=function(b){var b,c=DD.nil,d=$ifaceNil,e;e=BM(b,0,0);c=e[0];d=e[1];return[c,d];};AY=function(b,c){var b,c;if(b<0){b=0;}return[b,c];};AZ=function(){$panic("Native function not implemented: os.sigpipe");};BC=function(b){var b,c=0;c=(c|((new CU(b).Perm()>>>0)))>>>0;if(!((((b&8388608)>>>0)===0))){c=(c|(2048))>>>0;}if(!((((b&4194304)>>>0)===0))){c=(c|(1024))>>>0;}if(!((((b&1048576)>>>0)===0))){c=(c|(512))>>>0;}return c;};BH.ptr.prototype.Chmod=function(b){var b,c,d;c=this;if(c===DD.nil){return $pkg.ErrInvalid;}d=C.Fchmod(c.file.fd,BC(b));if(!($interfaceIsEqual(d,$ifaceNil))){return new X.ptr("chmod",c.file.name,d);}return $ifaceNil;};BH.prototype.Chmod=function(b){return this.$val.Chmod(b);};BH.ptr.prototype.Chown=function(b,c){var b,c,d,e;d=this;if(d===DD.nil){return $pkg.ErrInvalid;}e=C.Fchown(d.file.fd,b,c);if(!($interfaceIsEqual(e,$ifaceNil))){return new X.ptr("chown",d.file.name,e);}return $ifaceNil;};BH.prototype.Chown=function(b,c){return this.$val.Chown(b,c);};BH.ptr.prototype.Truncate=function(b){var b,c,d;c=this;if(c===DD.nil){return $pkg.ErrInvalid;}d=C.Ftruncate(c.file.fd,b);if(!($interfaceIsEqual(d,$ifaceNil))){return new X.ptr("truncate",c.file.name,d);}return $ifaceNil;};BH.prototype.Truncate=function(b){return this.$val.Truncate(b);};BH.ptr.prototype.Sync=function(){var b=$ifaceNil,c,d;c=this;if(c===DD.nil){b=$pkg.ErrInvalid;return b;}d=C.Fsync(c.file.fd);if(!($interfaceIsEqual(d,$ifaceNil))){b=Z("fsync",d);return b;}b=$ifaceNil;return b;};BH.prototype.Sync=function(){return this.$val.Sync();};BH.ptr.prototype.Fd=function(){var b;b=this;if(b===DD.nil){return 4294967295;}return(b.file.fd>>>0);};BH.prototype.Fd=function(){return this.$val.Fd();};BJ=$pkg.NewFile=function(b,c){var b,c,d,e;d=(b>>0);if(d<0){return DD.nil;}e=new BH.ptr(new BI.ptr(d,c,CZ.nil,0));F.SetFinalizer(e.file,new DS($methodExpr(DR.prototype.close)));return e;};BL=function(b,c){var b,c;if($interfaceIsEqual(c,new C.Errno(32))){if(G.AddInt32(new DT(function(){return this.$target.file.nepipe;},function($v){this.$target.file.nepipe=$v;},b),1)>=10){AZ();}}else{G.StoreInt32(new DT(function(){return this.$target.file.nepipe;},function($v){this.$target.file.nepipe=$v;},b),0);}};BM=$pkg.OpenFile=function(b,c,d){var b,c,d,e=DD.nil,f=$ifaceNil,g,h,i,j,k,l,m;g=C.Open(b,c|16777216,BC(d));h=g[0];i=g[1];if(!($interfaceIsEqual(i,$ifaceNil))){j=DD.nil;k=new X.ptr("open",b,i);e=j;f=k;return[e,f];}if(!CQ){C.CloseOnExec(h);}l=BJ((h>>>0),b);m=$ifaceNil;e=l;f=m;return[e,f];};BH.ptr.prototype.Close=function(){var b;b=this;if(b===DD.nil){return $pkg.ErrInvalid;}return b.file.close();};BH.prototype.Close=function(){return this.$val.Close();};BI.ptr.prototype.close=function(){var b,c,d;b=this;if(b===DR.nil||b.fd<0){return new C.Errno(22);}c=$ifaceNil;d=C.Close(b.fd);if(!($interfaceIsEqual(d,$ifaceNil))){c=new X.ptr("close",b.name,d);}b.fd=-1;F.SetFinalizer(b,$ifaceNil);return c;};BI.prototype.close=function(){return this.$val.close();};BH.ptr.prototype.Stat=function(){var b=$ifaceNil,c=$ifaceNil,d,e,f,g,h,i,j,k;d=this;if(d===DD.nil){e=$ifaceNil;f=$pkg.ErrInvalid;b=e;c=f;return[b,c];}g=$clone(new C.Stat_t.ptr(),C.Stat_t);c=C.Fstat(d.file.fd,g);if(!($interfaceIsEqual(c,$ifaceNil))){h=$ifaceNil;i=new X.ptr("stat",d.file.name,c);b=h;c=i;return[b,c];}j=CM(g,d.file.name);k=$ifaceNil;b=j;c=k;return[b,c];};BH.prototype.Stat=function(){return this.$val.Stat();};BO=$pkg.Lstat=function(b){var b,c=$ifaceNil,d=$ifaceNil,e,f,g,h,i;e=$clone(new C.Stat_t.ptr(),C.Stat_t);d=C.Lstat(b,e);if(!($interfaceIsEqual(d,$ifaceNil))){f=$ifaceNil;g=new X.ptr("lstat",b,d);c=f;d=g;return[c,d];}h=CM(e,b);i=$ifaceNil;c=h;d=i;return[c,d];};BH.ptr.prototype.readdir=function(b){var b,c=DC.nil,d=$ifaceNil,e,f,g,h,i,j,k,l,m,n,o,p,q,r;e=this;f=e.file.name;if(f===""){f=".";}g=e.Readdirnames(b);h=g[0];d=g[1];c=$makeSlice(DC,0,h.$length);i=h;j=0;while(true){if(!(j=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]);l=AW(f+"/"+k);m=l[0];n=l[1];if(AB(n)){j++;continue;}if(!($interfaceIsEqual(n,$ifaceNil))){o=c;p=n;c=o;d=p;return[c,d];}c=$append(c,m);j++;}q=c;r=d;c=q;d=r;return[c,d];};BH.prototype.readdir=function(b){return this.$val.readdir(b);};BH.ptr.prototype.read=function(b){var b,c=0,d=$ifaceNil,e,f,g;e=this;if(true&&b.$length>1073741824){b=$subslice(b,0,1073741824);}g=C.Read(e.file.fd,b);f=AY(g[0],g[1]);c=f[0];d=f[1];return[c,d];};BH.prototype.read=function(b){return this.$val.read(b);};BH.ptr.prototype.pread=function(b,c){var b,c,d=0,e=$ifaceNil,f,g,h;f=this;if(true&&b.$length>1073741824){b=$subslice(b,0,1073741824);}h=C.Pread(f.file.fd,b,c);g=AY(h[0],h[1]);d=g[0];e=g[1];return[d,e];};BH.prototype.pread=function(b,c){return this.$val.pread(b,c);};BH.ptr.prototype.write=function(b){var b,c=0,d=$ifaceNil,e,f,g,h,i,j,k,l;e=this;while(true){if(!(true)){break;}f=b;if(true&&f.$length>1073741824){f=$subslice(f,0,1073741824);}h=C.Write(e.file.fd,f);g=AY(h[0],h[1]);i=g[0];j=g[1];c=c+(i)>>0;if(01073741824){b=$subslice(b,0,1073741824);}h=C.Pwrite(f.file.fd,b,c);g=AY(h[0],h[1]);d=g[0];e=g[1];return[d,e];};BH.prototype.pwrite=function(b,c){return this.$val.pwrite(b,c);};BH.ptr.prototype.seek=function(b,c){var b,c,d=new $Int64(0,0),e=$ifaceNil,f,g;f=this;g=C.Seek(f.file.fd,b,c);d=g[0];e=g[1];return[d,e];};BH.prototype.seek=function(b,c){return this.$val.seek(b,c);};BR=function(b){var b,c;c=b.length-1>>0;while(true){if(!(c>0&&(b.charCodeAt(c)===47))){break;}b=b.substring(0,c);c=c-(1)>>0;}c=c-(1)>>0;while(true){if(!(c>=0)){break;}if(b.charCodeAt(c)===47){b=b.substring((c+1>>0));break;}c=c-(1)>>0;}return b;};BY=function(){BW=BZ;};BZ=function(b){var b;return!($interfaceIsEqual(b,new C.Errno(45)));};CC=$pkg.IsPathSeparator=function(b){var b;return 47===b;};CE=function(){$pkg.Args=I();};CK=$pkg.Exit=function(b){var b;C.Exit(b);};CM=function(b,c){var b,c,d,e;d=new CW.ptr(BR(c),b.Size,0,$clone(CN(b.Mtimespec),D.Time),b);d.mode=(((b.Mode&511)>>>0)>>>0);e=(b.Mode&61440)>>>0;if(e===24576||e===57344){d.mode=(d.mode|(67108864))>>>0;}else if(e===8192){d.mode=(d.mode|(69206016))>>>0;}else if(e===16384){d.mode=(d.mode|(2147483648))>>>0;}else if(e===4096){d.mode=(d.mode|(33554432))>>>0;}else if(e===40960){d.mode=(d.mode|(134217728))>>>0;}else if(e===32768){}else if(e===49152){d.mode=(d.mode|(16777216))>>>0;}if(!((((b.Mode&1024)>>>0)===0))){d.mode=(d.mode|(4194304))>>>0;}if(!((((b.Mode&2048)>>>0)===0))){d.mode=(d.mode|(8388608))>>>0;}if(!((((b.Mode&512)>>>0)===0))){d.mode=(d.mode|(1048576))>>>0;}return d;};CN=function(b){var b;b=$clone(b,C.Timespec);return D.Unix(b.Sec,b.Nsec);};CR=function(){var b,c,d,e,f,g,h;b=C.Sysctl("kern.osrelease");c=b[0];d=b[1];if(!($interfaceIsEqual(d,$ifaceNil))){return;}e=0;f=c;g=0;while(true){if(!(g2||(e===2)&&c.charCodeAt(0)>=49&&c.charCodeAt(1)>=49){CQ=true;}};CU.prototype.String=function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;b=this.$val;c=$clone(DL.zero(),DL);d=0;e="dalTLDpSugct";f=0;while(true){if(!(f>0)>>>0),j<32?(1<>>0)))>>>0)===0))){(d<0||d>=c.length)?$throwRuntimeError("index out of range"):c[d]=(i<<24>>>24);d=d+(1)>>0;}f+=g[1];}if(d===0){(d<0||d>=c.length)?$throwRuntimeError("index out of range"):c[d]=45;d=d+(1)>>0;}k="rwxrwxrwx";l=0;while(true){if(!(l>0)>>>0),p<32?(1<>>0)))>>>0)===0))){(d<0||d>=c.length)?$throwRuntimeError("index out of range"):c[d]=(o<<24>>>24);}else{(d<0||d>=c.length)?$throwRuntimeError("index out of range"):c[d]=45;}d=d+(1)>>0;l+=m[1];}return $bytesToString($subslice(new DA(c),0,d));};$ptrType(CU).prototype.String=function(){return new CU(this.$get()).String();};CU.prototype.IsDir=function(){var b;b=this.$val;return!((((b&2147483648)>>>0)===0));};$ptrType(CU).prototype.IsDir=function(){return new CU(this.$get()).IsDir();};CU.prototype.IsRegular=function(){var b;b=this.$val;return((b&2399141888)>>>0)===0;};$ptrType(CU).prototype.IsRegular=function(){return new CU(this.$get()).IsRegular();};CU.prototype.Perm=function(){var b;b=this.$val;return(b&511)>>>0;};$ptrType(CU).prototype.Perm=function(){return new CU(this.$get()).Perm();};CW.ptr.prototype.Name=function(){var b;b=this;return b.name;};CW.prototype.Name=function(){return this.$val.Name();};CW.ptr.prototype.IsDir=function(){var b;b=this;return new CU(b.Mode()).IsDir();};CW.prototype.IsDir=function(){return this.$val.IsDir();};CW.ptr.prototype.Size=function(){var b;b=this;return b.size;};CW.prototype.Size=function(){return this.$val.Size();};CW.ptr.prototype.Mode=function(){var b;b=this;return b.mode;};CW.prototype.Mode=function(){return this.$val.Mode();};CW.ptr.prototype.ModTime=function(){var b;b=this;return b.modTime;};CW.prototype.ModTime=function(){return this.$val.ModTime();};CW.ptr.prototype.Sys=function(){var b;b=this;return b.sys;};CW.prototype.Sys=function(){return this.$val.Sys();};DE.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];DY.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];DF.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];DD.methods=[{prop:"readdirnames",name:"readdirnames",pkg:"os",typ:$funcType([$Int],[CY,$error],false)},{prop:"Readdir",name:"Readdir",pkg:"",typ:$funcType([$Int],[DC,$error],false)},{prop:"Readdirnames",name:"Readdirnames",pkg:"",typ:$funcType([$Int],[CY,$error],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"Read",name:"Read",pkg:"",typ:$funcType([DA],[$Int,$error],false)},{prop:"ReadAt",name:"ReadAt",pkg:"",typ:$funcType([DA,$Int64],[$Int,$error],false)},{prop:"Write",name:"Write",pkg:"",typ:$funcType([DA],[$Int,$error],false)},{prop:"WriteAt",name:"WriteAt",pkg:"",typ:$funcType([DA,$Int64],[$Int,$error],false)},{prop:"Seek",name:"Seek",pkg:"",typ:$funcType([$Int64,$Int],[$Int64,$error],false)},{prop:"WriteString",name:"WriteString",pkg:"",typ:$funcType([$String],[$Int,$error],false)},{prop:"Chdir",name:"Chdir",pkg:"",typ:$funcType([],[$error],false)},{prop:"Chmod",name:"Chmod",pkg:"",typ:$funcType([CU],[$error],false)},{prop:"Chown",name:"Chown",pkg:"",typ:$funcType([$Int,$Int],[$error],false)},{prop:"Truncate",name:"Truncate",pkg:"",typ:$funcType([$Int64],[$error],false)},{prop:"Sync",name:"Sync",pkg:"",typ:$funcType([],[$error],false)},{prop:"Fd",name:"Fd",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"Close",name:"Close",pkg:"",typ:$funcType([],[$error],false)},{prop:"Stat",name:"Stat",pkg:"",typ:$funcType([],[CT,$error],false)},{prop:"readdir",name:"readdir",pkg:"os",typ:$funcType([$Int],[DC,$error],false)},{prop:"read",name:"read",pkg:"os",typ:$funcType([DA],[$Int,$error],false)},{prop:"pread",name:"pread",pkg:"os",typ:$funcType([DA,$Int64],[$Int,$error],false)},{prop:"write",name:"write",pkg:"os",typ:$funcType([DA],[$Int,$error],false)},{prop:"pwrite",name:"pwrite",pkg:"os",typ:$funcType([DA,$Int64],[$Int,$error],false)},{prop:"seek",name:"seek",pkg:"os",typ:$funcType([$Int64,$Int],[$Int64,$error],false)}];DR.methods=[{prop:"close",name:"close",pkg:"os",typ:$funcType([],[$error],false)}];CU.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"IsDir",name:"IsDir",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"IsRegular",name:"IsRegular",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Perm",name:"Perm",pkg:"",typ:$funcType([],[CU],false)}];DX.methods=[{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"IsDir",name:"IsDir",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Size",name:"Size",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Mode",name:"Mode",pkg:"",typ:$funcType([],[CU],false)},{prop:"ModTime",name:"ModTime",pkg:"",typ:$funcType([],[D.Time],false)},{prop:"Sys",name:"Sys",pkg:"",typ:$funcType([],[$emptyInterface],false)}];X.init([{prop:"Op",name:"Op",pkg:"",typ:$String,tag:""},{prop:"Path",name:"Path",pkg:"",typ:$String,tag:""},{prop:"Err",name:"Err",pkg:"",typ:$error,tag:""}]);Y.init([{prop:"Syscall",name:"Syscall",pkg:"",typ:$String,tag:""},{prop:"Err",name:"Err",pkg:"",typ:$error,tag:""}]);AR.init([{prop:"Op",name:"Op",pkg:"",typ:$String,tag:""},{prop:"Old",name:"Old",pkg:"",typ:$String,tag:""},{prop:"New",name:"New",pkg:"",typ:$String,tag:""},{prop:"Err",name:"Err",pkg:"",typ:$error,tag:""}]);BH.init([{prop:"file",name:"",pkg:"os",typ:DR,tag:""}]);BI.init([{prop:"fd",name:"fd",pkg:"os",typ:$Int,tag:""},{prop:"name",name:"name",pkg:"os",typ:$String,tag:""},{prop:"dirinfo",name:"dirinfo",pkg:"os",typ:CZ,tag:""},{prop:"nepipe",name:"nepipe",pkg:"os",typ:$Int32,tag:""}]);BK.init([{prop:"buf",name:"buf",pkg:"os",typ:DA,tag:""},{prop:"nbuf",name:"nbuf",pkg:"os",typ:$Int,tag:""},{prop:"bufp",name:"bufp",pkg:"os",typ:$Int,tag:""}]);CT.init([{prop:"IsDir",name:"IsDir",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"ModTime",name:"ModTime",pkg:"",typ:$funcType([],[D.Time],false)},{prop:"Mode",name:"Mode",pkg:"",typ:$funcType([],[CU],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"Size",name:"Size",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Sys",name:"Sys",pkg:"",typ:$funcType([],[$emptyInterface],false)}]);CW.init([{prop:"name",name:"name",pkg:"os",typ:$String,tag:""},{prop:"size",name:"size",pkg:"os",typ:$Int64,tag:""},{prop:"mode",name:"mode",pkg:"os",typ:CU,tag:""},{prop:"modTime",name:"modTime",pkg:"os",typ:D.Time,tag:""},{prop:"sys",name:"sys",pkg:"os",typ:$emptyInterface,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_os=function(){while(true){switch($s){case 0:$r=E.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=F.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=H.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}$r=G.$init($BLOCKING);$s=6;case 6:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=7;case 7:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=8;case 8:if($r&&$r.$blocking){$r=$r();}$pkg.Args=CY.nil;CQ=false;$pkg.ErrInvalid=E.New("invalid argument");$pkg.ErrPermission=E.New("permission denied");$pkg.ErrExist=E.New("file already exists");$pkg.ErrNotExist=E.New("file does not exist");AP=E.New("os: process already finished");$pkg.Stdin=BJ((C.Stdin>>>0),"/dev/stdin");$pkg.Stdout=BJ((C.Stdout>>>0),"/dev/stdout");$pkg.Stderr=BJ((C.Stderr>>>0),"/dev/stderr");BW=(function(b){var b;return true;});AW=BO;J();BY();CE();CR();}return;}};$init_os.$blocking=true;return $init_os;};return $pkg;})(); +$packages["strconv"]=(function(){var $pkg={},B,A,C,S,Z,AD,AI,AP,AY,CF,CG,CH,CI,CJ,CK,CL,CM,CN,CO,CP,CQ,CR,CS,CT,CU,CV,CW,CX,G,K,L,M,AE,AJ,AK,AL,AQ,AR,BD,BE,BF,BG,BM,D,H,I,J,N,O,P,Q,R,T,U,V,W,X,Y,AA,AB,AC,AF,AG,AH,AM,AN,AO,AT,AU,AV,AW,AX,AZ,BA,BB,BC,BH,BI,BJ,BN,BO,BP,BR,BT,BU,BV,BW,BX,BY,BZ,CA,CB,CC,CD,CE;B=$packages["errors"];A=$packages["math"];C=$packages["unicode/utf8"];S=$pkg.NumError=$newType(0,$kindStruct,"strconv.NumError","NumError","strconv",function(Func_,Num_,Err_){this.$val=this;this.Func=Func_!==undefined?Func_:"";this.Num=Num_!==undefined?Num_:"";this.Err=Err_!==undefined?Err_:$ifaceNil;});Z=$pkg.decimal=$newType(0,$kindStruct,"strconv.decimal","decimal","strconv",function(d_,nd_,dp_,neg_,trunc_){this.$val=this;this.d=d_!==undefined?d_:CU.zero();this.nd=nd_!==undefined?nd_:0;this.dp=dp_!==undefined?dp_:0;this.neg=neg_!==undefined?neg_:false;this.trunc=trunc_!==undefined?trunc_:false;});AD=$pkg.leftCheat=$newType(0,$kindStruct,"strconv.leftCheat","leftCheat","strconv",function(delta_,cutoff_){this.$val=this;this.delta=delta_!==undefined?delta_:0;this.cutoff=cutoff_!==undefined?cutoff_:"";});AI=$pkg.extFloat=$newType(0,$kindStruct,"strconv.extFloat","extFloat","strconv",function(mant_,exp_,neg_){this.$val=this;this.mant=mant_!==undefined?mant_:new $Uint64(0,0);this.exp=exp_!==undefined?exp_:0;this.neg=neg_!==undefined?neg_:false;});AP=$pkg.floatInfo=$newType(0,$kindStruct,"strconv.floatInfo","floatInfo","strconv",function(mantbits_,expbits_,bias_){this.$val=this;this.mantbits=mantbits_!==undefined?mantbits_:0;this.expbits=expbits_!==undefined?expbits_:0;this.bias=bias_!==undefined?bias_:0;});AY=$pkg.decimalSlice=$newType(0,$kindStruct,"strconv.decimalSlice","decimalSlice","strconv",function(d_,nd_,dp_,neg_){this.$val=this;this.d=d_!==undefined?d_:CL.nil;this.nd=nd_!==undefined?nd_:0;this.dp=dp_!==undefined?dp_:0;this.neg=neg_!==undefined?neg_:false;});CF=$sliceType($Int);CG=$sliceType($Float64);CH=$sliceType($Float32);CI=$sliceType(AD);CJ=$sliceType($Uint16);CK=$sliceType($Uint32);CL=$sliceType($Uint8);CM=$ptrType(S);CN=$arrayType($Uint8,24);CO=$arrayType($Uint8,32);CP=$ptrType(AP);CQ=$arrayType($Uint8,3);CR=$arrayType($Uint8,50);CS=$arrayType($Uint8,65);CT=$arrayType($Uint8,4);CU=$arrayType($Uint8,800);CV=$ptrType(Z);CW=$ptrType(AY);CX=$ptrType(AI);D=$pkg.ParseBool=function(a){var a,b=false,c=$ifaceNil,d,e,f,g,h,i,j;d=a;if(d==="1"||d==="t"||d==="T"||d==="true"||d==="TRUE"||d==="True"){e=true;f=$ifaceNil;b=e;c=f;return[b,c];}else if(d==="0"||d==="f"||d==="F"||d==="false"||d==="FALSE"||d==="False"){g=false;h=$ifaceNil;b=g;c=h;return[b,c];}i=false;j=T("ParseBool",a);b=i;c=j;return[b,c];};H=function(a,b){var a,b,c,d,e;if(!((a.length===b.length))){return false;}c=0;while(true){if(!(c>>24;}e=b.charCodeAt(c);if(65<=e&&e<=90){e=e+(32)<<24>>>24;}if(!((d===e))){return false;}c=c+(1)>>0;}return true;};I=function(a){var a,b=0,c=false,d,e,f,g,h,i,j,k,l;if(a.length===0){return[b,c];}d=a.charCodeAt(0);if(d===43){if(H(a,"+inf")||H(a,"+infinity")){e=A.Inf(1);f=true;b=e;c=f;return[b,c];}}else if(d===45){if(H(a,"-inf")||H(a,"-infinity")){g=A.Inf(-1);h=true;b=g;c=h;return[b,c];}}else if(d===110||d===78){if(H(a,"nan")){i=A.NaN();j=true;b=i;c=j;return[b,c];}}else if(d===105||d===73){if(H(a,"inf")||H(a,"infinity")){k=A.Inf(1);l=true;b=k;c=l;return[b,c];}}else{return[b,c];}return[b,c];};Z.ptr.prototype.set=function(a){var a,b=false,c,d,e,f,g,h,i,j;c=this;d=0;c.neg=false;c.trunc=false;if(d>=a.length){return b;}if(a.charCodeAt(d)===43){d=d+(1)>>0;}else if(a.charCodeAt(d)===45){c.neg=true;d=d+(1)>>0;}e=false;f=false;while(true){if(!(d>0;continue;}else if(48<=a.charCodeAt(d)&&a.charCodeAt(d)<=57){f=true;if((a.charCodeAt(d)===48)&&(c.nd===0)){c.dp=c.dp-(1)>>0;d=d+(1)>>0;continue;}if(c.nd<800){(g=c.d,h=c.nd,(h<0||h>=g.length)?$throwRuntimeError("index out of range"):g[h]=a.charCodeAt(d));c.nd=c.nd+(1)>>0;}else if(!((a.charCodeAt(d)===48))){c.trunc=true;}d=d+(1)>>0;continue;}break;}if(!f){return b;}if(!e){c.dp=c.nd;}if(d>0;if(d>=a.length){return b;}i=1;if(a.charCodeAt(d)===43){d=d+(1)>>0;}else if(a.charCodeAt(d)===45){d=d+(1)>>0;i=-1;}if(d>=a.length||a.charCodeAt(d)<48||a.charCodeAt(d)>57){return b;}j=0;while(true){if(!(d>0)+(a.charCodeAt(d)>>0)>>0)-48>>0;}d=d+(1)>>0;}c.dp=c.dp+((j*i>>0))>>0;}if(!((d===a.length))){return b;}b=true;return b;};Z.prototype.set=function(a){return this.$val.set(a);};J=function(a){var a,b=new $Uint64(0,0),c=0,d=false,e=false,f=false,g,h,i,j,k,l,m,n,o,p,q;g=0;if(g>=a.length){return[b,c,d,e,f];}if(a.charCodeAt(g)===43){g=g+(1)>>0;}else if(a.charCodeAt(g)===45){d=true;g=g+(1)>>0;}h=false;i=false;j=0;k=0;l=0;while(true){if(!(g>0;continue;}else if(n===48<=m&&m<=57){i=true;if((m===48)&&(j===0)){l=l-(1)>>0;g=g+(1)>>0;continue;}j=j+(1)>>0;if(k<19){b=$mul64(b,(new $Uint64(0,10)));b=(o=new $Uint64(0,(m-48<<24>>>24)),new $Uint64(b.$high+o.$high,b.$low+o.$low));k=k+(1)>>0;}else if(!((a.charCodeAt(g)===48))){e=true;}g=g+(1)>>0;continue;}break;}if(!i){return[b,c,d,e,f];}if(!h){l=j;}if(g>0;if(g>=a.length){return[b,c,d,e,f];}p=1;if(a.charCodeAt(g)===43){g=g+(1)>>0;}else if(a.charCodeAt(g)===45){g=g+(1)>>0;p=-1;}if(g>=a.length||a.charCodeAt(g)<48||a.charCodeAt(g)>57){return[b,c,d,e,f];}q=0;while(true){if(!(g>0)+(a.charCodeAt(g)>>0)>>0)-48>>0;}g=g+(1)>>0;}l=l+((q*p>>0))>>0;}if(!((g===a.length))){return[b,c,d,e,f];}c=l-k>>0;f=true;return[b,c,d,e,f];};Z.ptr.prototype.floatBits=function(a){var $args=arguments,$s=0,$this=this,b=new $Uint64(0,0),c=false,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y;s:while(true){switch($s){case 0:d=$this;e=0;f=new $Uint64(0,0);if(d.nd===0){}else{$s=1;continue;}f=new $Uint64(0,0);e=a.bias;$s=2;continue;case 1:if(d.dp>310){}else{$s=3;continue;}$s=4;continue;case 3:if(d.dp<-330){}else{$s=5;continue;}f=new $Uint64(0,0);e=a.bias;$s=2;continue;case 5:e=0;while(true){if(!(d.dp>0)){break;}g=0;if(d.dp>=K.$length){g=27;}else{g=(h=d.dp,((h<0||h>=K.$length)?$throwRuntimeError("index out of range"):K.$array[K.$offset+h]));}d.Shift(-g);e=e+(g)>>0;}while(true){if(!(d.dp<0||(d.dp===0)&&d.d[0]<53)){break;}i=0;if(-d.dp>=K.$length){i=27;}else{i=(j=-d.dp,((j<0||j>=K.$length)?$throwRuntimeError("index out of range"):K.$array[K.$offset+j]));}d.Shift(i);e=e-(i)>>0;}e=e-(1)>>0;if(e<(a.bias+1>>0)){k=(a.bias+1>>0)-e>>0;d.Shift(-k);e=e+(k)>>0;}if((e-a.bias>>0)>=(((l=a.expbits,l<32?(1<>0)-1>>0)){}else{$s=6;continue;}$s=4;continue;case 6:d.Shift(((1+a.mantbits>>>0)>>0));f=d.RoundedInteger();if((m=$shiftLeft64(new $Uint64(0,2),a.mantbits),(f.$high===m.$high&&f.$low===m.$low))){}else{$s=7;continue;}f=$shiftRightUint64(f,(1));e=e+(1)>>0;if((e-a.bias>>0)>=(((n=a.expbits,n<32?(1<>0)-1>>0)){}else{$s=8;continue;}$s=4;continue;case 8:case 7:if((o=(p=$shiftLeft64(new $Uint64(0,1),a.mantbits),new $Uint64(f.$high&p.$high,(f.$low&p.$low)>>>0)),(o.$high===0&&o.$low===0))){e=a.bias;}$s=2;continue;case 4:f=new $Uint64(0,0);e=(((q=a.expbits,q<32?(1<>0)-1>>0)+a.bias>>0;c=true;case 2:t=(r=(s=$shiftLeft64(new $Uint64(0,1),a.mantbits),new $Uint64(s.$high-0,s.$low-1)),new $Uint64(f.$high&r.$high,(f.$low&r.$low)>>>0));t=(u=$shiftLeft64(new $Uint64(0,(((e-a.bias>>0))&((((v=a.expbits,v<32?(1<>0)-1>>0)))),a.mantbits),new $Uint64(t.$high|u.$high,(t.$low|u.$low)>>>0));if(d.neg){t=(w=$shiftLeft64($shiftLeft64(new $Uint64(0,1),a.mantbits),a.expbits),new $Uint64(t.$high|w.$high,(t.$low|w.$low)>>>0));}x=t;y=c;b=x;c=y;return[b,c];case-1:}return;}};Z.prototype.floatBits=function(a){return this.$val.floatBits(a);};N=function(a,b,c){var a,b,c,d=0,e=false,f,g,h,i,j,k,l,m,n;if(!((f=$shiftRightUint64(a,AR.mantbits),(f.$high===0&&f.$low===0)))){return[d,e];}d=$flatten64(a);if(c){d=-d;}if(b===0){g=d;h=true;d=g;e=h;return[d,e];}else if(b>0&&b<=37){if(b>22){d=d*((i=b-22>>0,((i<0||i>=L.$length)?$throwRuntimeError("index out of range"):L.$array[L.$offset+i])));b=22;}if(d>1e+15||d<-1e+15){return[d,e];}j=d*((b<0||b>=L.$length)?$throwRuntimeError("index out of range"):L.$array[L.$offset+b]);k=true;d=j;e=k;return[d,e];}else if(b<0&&b>=-22){l=d/(m=-b,((m<0||m>=L.$length)?$throwRuntimeError("index out of range"):L.$array[L.$offset+m]));n=true;d=l;e=n;return[d,e];}return[d,e];};O=function(a,b,c){var a,b,c,d=0,e=false,f,g,h,i,j,k,l,m,n;if(!((f=$shiftRightUint64(a,AQ.mantbits),(f.$high===0&&f.$low===0)))){return[d,e];}d=$flatten64(a);if(c){d=-d;}if(b===0){g=d;h=true;d=g;e=h;return[d,e];}else if(b>0&&b<=17){if(b>10){d=d*((i=b-10>>0,((i<0||i>=M.$length)?$throwRuntimeError("index out of range"):M.$array[M.$offset+i])));b=10;}if(d>1e+07||d<-1e+07){return[d,e];}j=d*((b<0||b>=M.$length)?$throwRuntimeError("index out of range"):M.$array[M.$offset+b]);k=true;d=j;e=k;return[d,e];}else if(b<0&&b>=-10){l=d/(m=-b,((m<0||m>=M.$length)?$throwRuntimeError("index out of range"):M.$array[M.$offset+m]));n=true;d=l;e=n;return[d,e];}return[d,e];};P=function(a){var a,aa,ab,ac,ad,ae,af,ag,ah,b=0,c=$ifaceNil,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;d=I(a);e=d[0];f=d[1];if(f){g=e;h=$ifaceNil;b=g;c=h;return[b,c];}if(G){i=J(a);j=i[0];k=i[1];l=i[2];m=i[3];n=i[4];if(n){if(!m){o=O(j,k,l);p=o[0];q=o[1];if(q){r=p;s=$ifaceNil;b=r;c=s;return[b,c];}}t=new AI.ptr();u=t.AssignDecimal(j,k,l,m,AQ);if(u){v=t.floatBits(AQ);w=v[0];x=v[1];b=A.Float32frombits((w.$low>>>0));if(x){c=U("ParseFloat",a);}y=b;z=c;b=y;c=z;return[b,c];}}}aa=$clone(new Z.ptr(),Z);if(!aa.set(a)){ab=0;ac=T("ParseFloat",a);b=ab;c=ac;return[b,c];}ad=aa.floatBits(AQ);ae=ad[0];af=ad[1];b=A.Float32frombits((ae.$low>>>0));if(af){c=U("ParseFloat",a);}ag=b;ah=c;b=ag;c=ah;return[b,c];};Q=function(a){var a,aa,ab,ac,ad,ae,af,ag,ah,b=0,c=$ifaceNil,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;d=I(a);e=d[0];f=d[1];if(f){g=e;h=$ifaceNil;b=g;c=h;return[b,c];}if(G){i=J(a);j=i[0];k=i[1];l=i[2];m=i[3];n=i[4];if(n){if(!m){o=N(j,k,l);p=o[0];q=o[1];if(q){r=p;s=$ifaceNil;b=r;c=s;return[b,c];}}t=new AI.ptr();u=t.AssignDecimal(j,k,l,m,AR);if(u){v=t.floatBits(AR);w=v[0];x=v[1];b=A.Float64frombits(w);if(x){c=U("ParseFloat",a);}y=b;z=c;b=y;c=z;return[b,c];}}}aa=$clone(new Z.ptr(),Z);if(!aa.set(a)){ab=0;ac=T("ParseFloat",a);b=ab;c=ac;return[b,c];}ad=aa.floatBits(AR);ae=ad[0];af=ad[1];b=A.Float64frombits(ae);if(af){c=U("ParseFloat",a);}ag=b;ah=c;b=ag;c=ah;return[b,c];};R=$pkg.ParseFloat=function(a,b){var a,b,c=0,d=$ifaceNil,e,f,g,h,i,j,k,l,m,n;if(b===32){e=P(a);f=e[0];g=e[1];h=$coerceFloat32(f);i=g;c=h;d=i;return[c,d];}j=Q(a);k=j[0];l=j[1];m=k;n=l;c=m;d=n;return[c,d];};S.ptr.prototype.Error=function(){var a;a=this;return"strconv."+a.Func+": "+"parsing "+BP(a.Num)+": "+a.Err.Error();};S.prototype.Error=function(){return this.$val.Error();};T=function(a,b){var a,b;return new S.ptr(a,b,$pkg.ErrSyntax);};U=function(a,b){var a,b;return new S.ptr(a,b,$pkg.ErrRange);};V=function(a){var a,b;if(a<2){return new $Uint64(0,0);}return(b=$div64(new $Uint64(4294967295,4294967295),new $Uint64(0,a),false),new $Uint64(b.$high+0,b.$low+1));};W=$pkg.ParseUint=function(a,b,c){var $args=arguments,$s=0,$this=this,d=new $Uint64(0,0),e=$ifaceNil,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;s:while(true){switch($s){case 0:f=new $Uint64(0,0);g=new $Uint64(0,0);h=f;i=g;if(c===0){c=32;}j=a;if(a.length<1){}else if(2<=b&&b<=36){$s=1;continue;}else if(b===0){$s=2;continue;}else{$s=3;continue;}e=$pkg.ErrSyntax;$s=5;continue;$s=4;continue;case 1:$s=4;continue;case 2:if((a.charCodeAt(0)===48)&&a.length>1&&((a.charCodeAt(1)===120)||(a.charCodeAt(1)===88))){}else if(a.charCodeAt(0)===48){$s=6;continue;}else{$s=7;continue;}b=16;a=a.substring(2);if(a.length<1){}else{$s=9;continue;}e=$pkg.ErrSyntax;$s=5;continue;case 9:$s=8;continue;case 6:b=8;$s=8;continue;case 7:b=10;case 8:$s=4;continue;case 3:e=B.New("invalid base "+BJ(b));$s=5;continue;case 4:d=new $Uint64(0,0);h=V(b);i=(k=$shiftLeft64(new $Uint64(0,1),(c>>>0)),new $Uint64(k.$high-0,k.$low-1));l=0;case 10:if(!(l>>24;$s=15;continue;case 12:m=(n-97<<24>>>24)+10<<24>>>24;$s=15;continue;case 13:m=(n-65<<24>>>24)+10<<24>>>24;$s=15;continue;case 14:d=new $Uint64(0,0);e=$pkg.ErrSyntax;$s=5;continue;case 15:if((m>>0)>=b){}else{$s=16;continue;}d=new $Uint64(0,0);e=$pkg.ErrSyntax;$s=5;continue;case 16:if((d.$high>h.$high||(d.$high===h.$high&&d.$low>=h.$low))){}else{$s=17;continue;}d=new $Uint64(4294967295,4294967295);e=$pkg.ErrRange;$s=5;continue;case 17:d=$mul64(d,(new $Uint64(0,b)));p=(o=new $Uint64(0,m),new $Uint64(d.$high+o.$high,d.$low+o.$low));if((p.$highi.$high||(p.$high===i.$high&&p.$low>i.$low))){}else{$s=18;continue;}d=new $Uint64(4294967295,4294967295);e=$pkg.ErrRange;$s=5;continue;case 18:d=p;l=l+(1)>>0;$s=10;continue;case 11:q=d;r=$ifaceNil;d=q;e=r;return[d,e];case 5:s=d;t=new S.ptr("ParseUint",j,e);d=s;e=t;return[d,e];case-1:}return;}};X=$pkg.ParseInt=function(a,b,c){var a,b,c,d=new $Int64(0,0),e=$ifaceNil,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;if(c===0){c=32;}if(a.length===0){f=new $Int64(0,0);g=T("ParseInt",a);d=f;e=g;return[d,e];}h=a;i=false;if(a.charCodeAt(0)===43){a=a.substring(1);}else if(a.charCodeAt(0)===45){i=true;a=a.substring(1);}j=new $Uint64(0,0);k=W(a,b,c);j=k[0];e=k[1];if(!($interfaceIsEqual(e,$ifaceNil))&&!($interfaceIsEqual($assertType(e,CM).Err,$pkg.ErrRange))){$assertType(e,CM).Func="ParseInt";$assertType(e,CM).Num=h;l=new $Int64(0,0);m=e;d=l;e=m;return[d,e];}n=$shiftLeft64(new $Uint64(0,1),((c-1>>0)>>>0));if(!i&&(j.$high>n.$high||(j.$high===n.$high&&j.$low>=n.$low))){o=(p=new $Uint64(n.$high-0,n.$low-1),new $Int64(p.$high,p.$low));q=U("ParseInt",h);d=o;e=q;return[d,e];}if(i&&(j.$high>n.$high||(j.$high===n.$high&&j.$low>n.$low))){r=(s=new $Int64(n.$high,n.$low),new $Int64(-s.$high,-s.$low));t=U("ParseInt",h);d=r;e=t;return[d,e];}u=new $Int64(j.$high,j.$low);if(i){u=new $Int64(-u.$high,-u.$low);}v=u;w=$ifaceNil;d=v;e=w;return[d,e];};Y=$pkg.Atoi=function(a){var a,b=0,c=$ifaceNil,d,e,f,g;d=X(a,10,0);e=d[0];c=d[1];f=((e.$low+((e.$high>>31)*4294967296))>>0);g=c;b=f;c=g;return[b,c];};Z.ptr.prototype.String=function(){var a,b,c,d;a=this;b=10+a.nd>>0;if(a.dp>0){b=b+(a.dp)>>0;}if(a.dp<0){b=b+(-a.dp)>>0;}c=$makeSlice(CL,b);d=0;if(a.nd===0){return"0";}else if(a.dp<=0){(d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]=48;d=d+(1)>>0;(d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]=46;d=d+(1)>>0;d=d+(AA($subslice(c,d,(d+-a.dp>>0))))>>0;d=d+($copySlice($subslice(c,d),$subslice(new CL(a.d),0,a.nd)))>>0;}else if(a.dp>0;(d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]=46;d=d+(1)>>0;d=d+($copySlice($subslice(c,d),$subslice(new CL(a.d),a.dp,a.nd)))>>0;}else{d=d+($copySlice($subslice(c,d),$subslice(new CL(a.d),0,a.nd)))>>0;d=d+(AA($subslice(c,d,((d+a.dp>>0)-a.nd>>0))))>>0;}return $bytesToString($subslice(c,0,d));};Z.prototype.String=function(){return this.$val.String();};AA=function(a){var a,b,c,d;b=a;c=0;while(true){if(!(c=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+d]=48;c++;}return a.$length;};AB=function(a){var a,b,c;while(true){if(!(a.nd>0&&((b=a.d,c=a.nd-1>>0,((c<0||c>=b.length)?$throwRuntimeError("index out of range"):b[c]))===48))){break;}a.nd=a.nd-(1)>>0;}if(a.nd===0){a.dp=0;}};Z.ptr.prototype.Assign=function(a){var a,b,c,d,e,f,g,h;b=this;c=$clone(CN.zero(),CN);d=0;while(true){if(!((a.$high>0||(a.$high===0&&a.$low>0)))){break;}e=$div64(a,new $Uint64(0,10),false);a=(f=$mul64(new $Uint64(0,10),e),new $Uint64(a.$high-f.$high,a.$low-f.$low));(d<0||d>=c.length)?$throwRuntimeError("index out of range"):c[d]=(new $Uint64(a.$high+0,a.$low+48).$low<<24>>>24);d=d+(1)>>0;a=e;}b.nd=0;d=d-(1)>>0;while(true){if(!(d>=0)){break;}(g=b.d,h=b.nd,(h<0||h>=g.length)?$throwRuntimeError("index out of range"):g[h]=((d<0||d>=c.length)?$throwRuntimeError("index out of range"):c[d]));b.nd=b.nd+(1)>>0;d=d-(1)>>0;}b.dp=b.nd;AB(b);};Z.prototype.Assign=function(a){return this.$val.Assign(a);};AC=function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o;c=0;d=0;e=0;while(true){if(!(((e>>$min(b,31))>>0)===0)){break;}if(c>=a.nd){if(e===0){a.nd=0;return;}while(true){if(!(((e>>$min(b,31))>>0)===0)){break;}e=e*10>>0;c=c+(1)>>0;}break;}g=((f=a.d,((c<0||c>=f.length)?$throwRuntimeError("index out of range"):f[c]))>>0);e=((e*10>>0)+g>>0)-48>>0;c=c+(1)>>0;}a.dp=a.dp-((c-1>>0))>>0;while(true){if(!(c=h.length)?$throwRuntimeError("index out of range"):h[c]))>>0);j=(e>>$min(b,31))>>0;e=e-(((k=b,k<32?(j<>0))>>0;(l=a.d,(d<0||d>=l.length)?$throwRuntimeError("index out of range"):l[d]=((j+48>>0)<<24>>>24));d=d+(1)>>0;e=((e*10>>0)+i>>0)-48>>0;c=c+(1)>>0;}while(true){if(!(e>0)){break;}m=(e>>$min(b,31))>>0;e=e-(((n=b,n<32?(m<>0))>>0;if(d<800){(o=a.d,(d<0||d>=o.length)?$throwRuntimeError("index out of range"):o[d]=((m+48>>0)<<24>>>24));d=d+(1)>>0;}else if(m>0){a.trunc=true;}e=e*10>>0;}a.nd=d;AB(a);};AF=function(a,b){var a,b,c;c=0;while(true){if(!(c=a.$length){return true;}if(!((((c<0||c>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+c])===b.charCodeAt(c)))){return((c<0||c>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+c])>0;}return false;};AG=function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;c=((b<0||b>=AE.$length)?$throwRuntimeError("index out of range"):AE.$array[AE.$offset+b]).delta;if(AF($subslice(new CL(a.d),0,a.nd),((b<0||b>=AE.$length)?$throwRuntimeError("index out of range"):AE.$array[AE.$offset+b]).cutoff)){c=c-(1)>>0;}d=a.nd;e=a.nd+c>>0;f=0;d=d-(1)>>0;while(true){if(!(d>=0)){break;}f=f+(((g=b,g<32?(((((h=a.d,((d<0||d>=h.length)?$throwRuntimeError("index out of range"):h[d]))>>0)-48>>0))<>0))>>0;j=(i=f/10,(i===i&&i!==1/0&&i!==-1/0)?i>>0:$throwRuntimeError("integer divide by zero"));k=f-(10*j>>0)>>0;e=e-(1)>>0;if(e<800){(l=a.d,(e<0||e>=l.length)?$throwRuntimeError("index out of range"):l[e]=((k+48>>0)<<24>>>24));}else if(!((k===0))){a.trunc=true;}f=j;d=d-(1)>>0;}while(true){if(!(f>0)){break;}n=(m=f/10,(m===m&&m!==1/0&&m!==-1/0)?m>>0:$throwRuntimeError("integer divide by zero"));o=f-(10*n>>0)>>0;e=e-(1)>>0;if(e<800){(p=a.d,(e<0||e>=p.length)?$throwRuntimeError("index out of range"):p[e]=((o+48>>0)<<24>>>24));}else if(!((o===0))){a.trunc=true;}f=n;}a.nd=a.nd+(c)>>0;if(a.nd>=800){a.nd=800;}a.dp=a.dp+(c)>>0;AB(a);};Z.ptr.prototype.Shift=function(a){var a,b;b=this;if(b.nd===0){}else if(a>0){while(true){if(!(a>27)){break;}AG(b,27);a=a-(27)>>0;}AG(b,(a>>>0));}else if(a<0){while(true){if(!(a<-27)){break;}AC(b,27);a=a+(27)>>0;}AC(b,(-a>>>0));}};Z.prototype.Shift=function(a){return this.$val.Shift(a);};AH=function(a,b){var a,b,c,d,e,f,g;if(b<0||b>=a.nd){return false;}if(((c=a.d,((b<0||b>=c.length)?$throwRuntimeError("index out of range"):c[b]))===53)&&((b+1>>0)===a.nd)){if(a.trunc){return true;}return b>0&&!(((d=(((e=a.d,f=b-1>>0,((f<0||f>=e.length)?$throwRuntimeError("index out of range"):e[f]))-48<<24>>>24))%2,d===d?d:$throwRuntimeError("integer divide by zero"))===0));}return(g=a.d,((b<0||b>=g.length)?$throwRuntimeError("index out of range"):g[b]))>=53;};Z.ptr.prototype.Round=function(a){var a,b;b=this;if(a<0||a>=b.nd){return;}if(AH(b,a)){b.RoundUp(a);}else{b.RoundDown(a);}};Z.prototype.Round=function(a){return this.$val.Round(a);};Z.ptr.prototype.RoundDown=function(a){var a,b;b=this;if(a<0||a>=b.nd){return;}b.nd=a;AB(b);};Z.prototype.RoundDown=function(a){return this.$val.RoundDown(a);};Z.ptr.prototype.RoundUp=function(a){var a,b,c,d,e,f,g;b=this;if(a<0||a>=b.nd){return;}c=a-1>>0;while(true){if(!(c>=0)){break;}e=(d=b.d,((c<0||c>=d.length)?$throwRuntimeError("index out of range"):d[c]));if(e<57){(g=b.d,(c<0||c>=g.length)?$throwRuntimeError("index out of range"):g[c]=(f=b.d,((c<0||c>=f.length)?$throwRuntimeError("index out of range"):f[c]))+(1)<<24>>>24);b.nd=c+1>>0;return;}c=c-(1)>>0;}b.d[0]=49;b.nd=1;b.dp=b.dp+(1)>>0;};Z.prototype.RoundUp=function(a){return this.$val.RoundUp(a);};Z.ptr.prototype.RoundedInteger=function(){var a,b,c,d,e,f,g;a=this;if(a.dp>20){return new $Uint64(4294967295,4294967295);}b=0;c=new $Uint64(0,0);b=0;while(true){if(!(b=f.length)?$throwRuntimeError("index out of range"):f[b]))-48<<24>>>24)),new $Uint64(d.$high+e.$high,d.$low+e.$low));b=b+(1)>>0;}while(true){if(!(b>0;}if(AH(a,a.dp)){c=(g=new $Uint64(0,1),new $Uint64(c.$high+g.$high,c.$low+g.$low));}return c;};Z.prototype.RoundedInteger=function(){return this.$val.RoundedInteger();};AI.ptr.prototype.floatBits=function(a){var a,b=new $Uint64(0,0),c=false,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;d=this;d.Normalize();e=d.exp+63>>0;if(e<(a.bias+1>>0)){f=(a.bias+1>>0)-e>>0;d.mant=$shiftRightUint64(d.mant,((f>>>0)));e=e+(f)>>0;}g=$shiftRightUint64(d.mant,((63-a.mantbits>>>0)));if(!((h=(i=d.mant,j=$shiftLeft64(new $Uint64(0,1),((62-a.mantbits>>>0))),new $Uint64(i.$high&j.$high,(i.$low&j.$low)>>>0)),(h.$high===0&&h.$low===0)))){g=(k=new $Uint64(0,1),new $Uint64(g.$high+k.$high,g.$low+k.$low));}if((l=$shiftLeft64(new $Uint64(0,2),a.mantbits),(g.$high===l.$high&&g.$low===l.$low))){g=$shiftRightUint64(g,(1));e=e+(1)>>0;}if((e-a.bias>>0)>=(((m=a.expbits,m<32?(1<>0)-1>>0)){g=new $Uint64(0,0);e=(((p=a.expbits,p<32?(1<>0)-1>>0)+a.bias>>0;c=true;}else if((n=(o=$shiftLeft64(new $Uint64(0,1),a.mantbits),new $Uint64(g.$high&o.$high,(g.$low&o.$low)>>>0)),(n.$high===0&&n.$low===0))){e=a.bias;}b=(q=(r=$shiftLeft64(new $Uint64(0,1),a.mantbits),new $Uint64(r.$high-0,r.$low-1)),new $Uint64(g.$high&q.$high,(g.$low&q.$low)>>>0));b=(s=$shiftLeft64(new $Uint64(0,(((e-a.bias>>0))&((((t=a.expbits,t<32?(1<>0)-1>>0)))),a.mantbits),new $Uint64(b.$high|s.$high,(b.$low|s.$low)>>>0));if(d.neg){b=(u=$shiftLeft64(new $Uint64(0,1),((a.mantbits+a.expbits>>>0))),new $Uint64(b.$high|u.$high,(b.$low|u.$low)>>>0));}return[b,c];};AI.prototype.floatBits=function(a){return this.$val.floatBits(a);};AI.ptr.prototype.AssignComputeBounds=function(a,b,c,d){var a,b,c,d,e=new AI.ptr(),f=new AI.ptr(),g,h,i,j,k,l,m,n,o;g=this;g.mant=a;g.exp=b-(d.mantbits>>0)>>0;g.neg=c;if(g.exp<=0&&(h=$shiftLeft64(($shiftRightUint64(a,(-g.exp>>>0))),(-g.exp>>>0)),(a.$high===h.$high&&a.$low===h.$low))){g.mant=$shiftRightUint64(g.mant,((-g.exp>>>0)));g.exp=0;i=$clone(g,AI);j=$clone(g,AI);$copy(e,i,AI);$copy(f,j,AI);return[e,f];}k=b-d.bias>>0;$copy(f,new AI.ptr((l=$mul64(new $Uint64(0,2),g.mant),new $Uint64(l.$high+0,l.$low+1)),g.exp-1>>0,g.neg),AI);if(!((m=$shiftLeft64(new $Uint64(0,1),d.mantbits),(a.$high===m.$high&&a.$low===m.$low)))||(k===1)){$copy(e,new AI.ptr((n=$mul64(new $Uint64(0,2),g.mant),new $Uint64(n.$high-0,n.$low-1)),g.exp-1>>0,g.neg),AI);}else{$copy(e,new AI.ptr((o=$mul64(new $Uint64(0,4),g.mant),new $Uint64(o.$high-0,o.$low-1)),g.exp-2>>0,g.neg),AI);}return[e,f];};AI.prototype.AssignComputeBounds=function(a,b,c,d){return this.$val.AssignComputeBounds(a,b,c,d);};AI.ptr.prototype.Normalize=function(){var a=0,b,c,d,e,f,g,h,i,j,k,l,m,n;b=this;c=b.mant;d=b.exp;e=c;f=d;if((e.$high===0&&e.$low===0)){a=0;return a;}if((g=$shiftRightUint64(e,32),(g.$high===0&&g.$low===0))){e=$shiftLeft64(e,(32));f=f-(32)>>0;}if((h=$shiftRightUint64(e,48),(h.$high===0&&h.$low===0))){e=$shiftLeft64(e,(16));f=f-(16)>>0;}if((i=$shiftRightUint64(e,56),(i.$high===0&&i.$low===0))){e=$shiftLeft64(e,(8));f=f-(8)>>0;}if((j=$shiftRightUint64(e,60),(j.$high===0&&j.$low===0))){e=$shiftLeft64(e,(4));f=f-(4)>>0;}if((k=$shiftRightUint64(e,62),(k.$high===0&&k.$low===0))){e=$shiftLeft64(e,(2));f=f-(2)>>0;}if((l=$shiftRightUint64(e,63),(l.$high===0&&l.$low===0))){e=$shiftLeft64(e,(1));f=f-(1)>>0;}a=((b.exp-f>>0)>>>0);m=e;n=f;b.mant=m;b.exp=n;return a;};AI.prototype.Normalize=function(){return this.$val.Normalize();};AI.ptr.prototype.Multiply=function(a){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x;b=this;a=$clone(a,AI);c=$shiftRightUint64(b.mant,32);d=new $Uint64(0,(b.mant.$low>>>0));e=c;f=d;g=$shiftRightUint64(a.mant,32);h=new $Uint64(0,(a.mant.$low>>>0));i=g;j=h;k=$mul64(e,j);l=$mul64(f,i);b.mant=(m=(n=$mul64(e,i),o=$shiftRightUint64(k,32),new $Uint64(n.$high+o.$high,n.$low+o.$low)),p=$shiftRightUint64(l,32),new $Uint64(m.$high+p.$high,m.$low+p.$low));u=(q=(r=new $Uint64(0,(k.$low>>>0)),s=new $Uint64(0,(l.$low>>>0)),new $Uint64(r.$high+s.$high,r.$low+s.$low)),t=$shiftRightUint64(($mul64(f,j)),32),new $Uint64(q.$high+t.$high,q.$low+t.$low));u=(v=new $Uint64(0,2147483648),new $Uint64(u.$high+v.$high,u.$low+v.$low));b.mant=(w=b.mant,x=($shiftRightUint64(u,32)),new $Uint64(w.$high+x.$high,w.$low+x.$low));b.exp=(b.exp+a.exp>>0)+64>>0;};AI.prototype.Multiply=function(a){return this.$val.Multiply(a);};AI.ptr.prototype.AssignDecimal=function(a,b,c,d,e){var a,aa,ab,ac,ad,ae,b,c,d,e,f=false,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;g=this;h=0;if(d){h=h+(4)>>0;}g.mant=a;g.exp=0;g.neg=c;j=(i=((b- -348>>0))/8,(i===i&&i!==1/0&&i!==-1/0)?i>>0:$throwRuntimeError("integer divide by zero"));if(b<-348||j>=87){f=false;return f;}l=(k=((b- -348>>0))%8,k===k?k:$throwRuntimeError("integer divide by zero"));if(l<19&&(m=(n=19-l>>0,((n<0||n>=AL.length)?$throwRuntimeError("index out of range"):AL[n])),(a.$high=AL.length)?$throwRuntimeError("index out of range"):AL[l])));g.Normalize();}else{g.Normalize();g.Multiply(((l<0||l>=AJ.length)?$throwRuntimeError("index out of range"):AJ[l]));h=h+(4)>>0;}g.Multiply(((j<0||j>=AK.length)?$throwRuntimeError("index out of range"):AK[j]));if(h>0){h=h+(1)>>0;}h=h+(4)>>0;o=g.Normalize();h=(p=(o),p<32?(h<>0;q=e.bias-63>>0;r=0;if(g.exp<=q){r=(((63-e.mantbits>>>0)+1>>>0)+((q-g.exp>>0)>>>0)>>>0);}else{r=(63-e.mantbits>>>0);}s=$shiftLeft64(new $Uint64(0,1),((r-1>>>0)));w=(t=g.mant,u=(v=$shiftLeft64(new $Uint64(0,1),r),new $Uint64(v.$high-0,v.$low-1)),new $Uint64(t.$high&u.$high,(t.$low&u.$low)>>>0));if((x=(y=new $Int64(s.$high,s.$low),z=new $Int64(0,h),new $Int64(y.$high-z.$high,y.$low-z.$low)),aa=new $Int64(w.$high,w.$low),(x.$high>0))*28>>0)/93,(d===d&&d!==1/0&&d!==-1/0)?d>>0:$throwRuntimeError("integer divide by zero"));g=(f=((e- -348>>0))/8,(f===f&&f!==1/0&&f!==-1/0)?f>>0:$throwRuntimeError("integer divide by zero"));Loop:while(true){if(!(true)){break;}h=(c.exp+((g<0||g>=AK.length)?$throwRuntimeError("index out of range"):AK[g]).exp>>0)+64>>0;if(h<-60){g=g+(1)>>0;}else if(h>-32){g=g-(1)>>0;}else{break Loop;}}c.Multiply(((g<0||g>=AK.length)?$throwRuntimeError("index out of range"):AK[g]));i=-((-348+(g*8>>0)>>0));j=g;a=i;b=j;return[a,b];};AI.prototype.frexp10=function(){return this.$val.frexp10();};AM=function(a,b,c){var a,b,c,d=0,e,f;e=c.frexp10();d=e[0];f=e[1];a.Multiply(((f<0||f>=AK.length)?$throwRuntimeError("index out of range"):AK[f]));b.Multiply(((f<0||f>=AK.length)?$throwRuntimeError("index out of range"):AK[f]));return d;};AI.ptr.prototype.FixedDecimal=function(a,b){var a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;c=this;if((d=c.mant,(d.$high===0&&d.$low===0))){a.nd=0;a.dp=0;a.neg=c.neg;return true;}if(b===0){$panic(new $String("strconv: internal error: extFloat.FixedDecimal called with n == 0"));}c.Normalize();e=c.frexp10();f=e[0];g=(-c.exp>>>0);h=($shiftRightUint64(c.mant,g).$low>>>0);k=(i=c.mant,j=$shiftLeft64(new $Uint64(0,h),g),new $Uint64(i.$high-j.$high,i.$low-j.$low));l=new $Uint64(0,1);m=b;n=0;o=new $Uint64(0,1);p=0;q=new $Uint64(0,1);r=p;s=q;while(true){if(!(r<20)){break;}if((t=new $Uint64(0,h),(s.$high>t.$high||(s.$high===t.$high&&s.$low>t.$low)))){n=r;break;}s=$mul64(s,(new $Uint64(0,10)));r=r+(1)>>0;}u=h;if(n>m){o=(v=n-m>>0,((v<0||v>=AL.length)?$throwRuntimeError("index out of range"):AL[v]));h=(w=h/((o.$low>>>0)),(w===w&&w!==1/0&&w!==-1/0)?w>>>0:$throwRuntimeError("integer divide by zero"));u=u-((x=(o.$low>>>0),(((h>>>16<<16)*x>>>0)+(h<<16>>>16)*x)>>>0))>>>0;}else{u=0;}y=$clone(CO.zero(),CO);z=32;aa=h;while(true){if(!(aa>0)){break;}ac=(ab=aa/10,(ab===ab&&ab!==1/0&&ab!==-1/0)?ab>>>0:$throwRuntimeError("integer divide by zero"));aa=aa-(((((10>>>16<<16)*ac>>>0)+(10<<16>>>16)*ac)>>>0))>>>0;z=z-(1)>>0;(z<0||z>=y.length)?$throwRuntimeError("index out of range"):y[z]=((aa+48>>>0)<<24>>>24);aa=ac;}ad=z;while(true){if(!(ad<32)){break;}(ae=a.d,af=ad-z>>0,(af<0||af>=ae.$length)?$throwRuntimeError("index out of range"):ae.$array[ae.$offset+af]=((ad<0||ad>=y.length)?$throwRuntimeError("index out of range"):y[ad]));ad=ad+(1)>>0;}ag=32-z>>0;a.nd=ag;a.dp=n+f>>0;m=m-(ag)>>0;if(m>0){if(!((u===0))||!((o.$high===0&&o.$low===1))){$panic(new $String("strconv: internal error, rest != 0 but needed > 0"));}while(true){if(!(m>0)){break;}k=$mul64(k,(new $Uint64(0,10)));l=$mul64(l,(new $Uint64(0,10)));if((ah=$mul64(new $Uint64(0,2),l),ai=$shiftLeft64(new $Uint64(0,1),g),(ah.$high>ai.$high||(ah.$high===ai.$high&&ah.$low>ai.$low)))){return false;}aj=$shiftRightUint64(k,g);(ak=a.d,(ag<0||ag>=ak.$length)?$throwRuntimeError("index out of range"):ak.$array[ak.$offset+ag]=(new $Uint64(aj.$high+0,aj.$low+48).$low<<24>>>24));k=(al=$shiftLeft64(aj,g),new $Uint64(k.$high-al.$high,k.$low-al.$low));ag=ag+(1)>>0;m=m-(1)>>0;}a.nd=ag;}an=AN(a,(am=$shiftLeft64(new $Uint64(0,u),g),new $Uint64(am.$high|k.$high,(am.$low|k.$low)>>>0)),o,g,l);if(!an){return false;}ao=a.nd-1>>0;while(true){if(!(ao>=0)){break;}if(!(((ap=a.d,((ao<0||ao>=ap.$length)?$throwRuntimeError("index out of range"):ap.$array[ap.$offset+ao]))===48))){a.nd=ao+1>>0;break;}ao=ao-(1)>>0;}return true;};AI.prototype.FixedDecimal=function(a,b){return this.$val.FixedDecimal(a,b);};AN=function(a,b,c,d,e){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;if((f=$shiftLeft64(c,d),(b.$high>f.$high||(b.$high===f.$high&&b.$low>f.$low)))){$panic(new $String("strconv: num > den<h.$high||(g.$high===h.$high&&g.$low>h.$low)))){$panic(new $String("strconv: \xCE\xB5 > (den<l.$high||(k.$high===l.$high&&k.$low>l.$low)))){m=a.nd-1>>0;while(true){if(!(m>=0)){break;}if((n=a.d,((m<0||m>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+m]))===57){a.nd=a.nd-(1)>>0;}else{break;}m=m-(1)>>0;}if(m<0){(o=a.d,(0<0||0>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+0]=49);a.nd=1;a.dp=a.dp+(1)>>0;}else{(q=a.d,(m<0||m>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+m]=(p=a.d,((m<0||m>=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+m]))+(1)<<24>>>24);}return true;}return false;};AI.ptr.prototype.ShortestDecimal=function(a,b,c){var a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b,ba,bb,bc,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;d=this;if((e=d.mant,(e.$high===0&&e.$low===0))){a.nd=0;a.dp=0;a.neg=d.neg;return true;}if((d.exp===0)&&$equal(b,d,AI)&&$equal(b,c,AI)){f=$clone(CN.zero(),CN);g=23;h=d.mant;while(true){if(!((h.$high>0||(h.$high===0&&h.$low>0)))){break;}i=$div64(h,new $Uint64(0,10),false);h=(j=$mul64(new $Uint64(0,10),i),new $Uint64(h.$high-j.$high,h.$low-j.$low));(g<0||g>=f.length)?$throwRuntimeError("index out of range"):f[g]=(new $Uint64(h.$high+0,h.$low+48).$low<<24>>>24);g=g-(1)>>0;h=i;}k=(24-g>>0)-1>>0;l=0;while(true){if(!(l=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+l]=(m=(g+1>>0)+l>>0,((m<0||m>=f.length)?$throwRuntimeError("index out of range"):f[m])));l=l+(1)>>0;}o=k;p=k;a.nd=o;a.dp=p;while(true){if(!(a.nd>0&&((q=a.d,r=a.nd-1>>0,((r<0||r>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+r]))===48))){break;}a.nd=a.nd-(1)>>0;}if(a.nd===0){a.dp=0;}a.neg=d.neg;return true;}c.Normalize();if(d.exp>c.exp){d.mant=$shiftLeft64(d.mant,(((d.exp-c.exp>>0)>>>0)));d.exp=c.exp;}if(b.exp>c.exp){b.mant=$shiftLeft64(b.mant,(((b.exp-c.exp>>0)>>>0)));b.exp=c.exp;}s=AM(b,d,c);c.mant=(t=c.mant,u=new $Uint64(0,1),new $Uint64(t.$high+u.$high,t.$low+u.$low));b.mant=(v=b.mant,w=new $Uint64(0,1),new $Uint64(v.$high-w.$high,v.$low-w.$low));x=(-c.exp>>>0);y=($shiftRightUint64(c.mant,x).$low>>>0);ab=(z=c.mant,aa=$shiftLeft64(new $Uint64(0,y),x),new $Uint64(z.$high-aa.$high,z.$low-aa.$low));ae=(ac=c.mant,ad=b.mant,new $Uint64(ac.$high-ad.$high,ac.$low-ad.$low));ah=(af=c.mant,ag=d.mant,new $Uint64(af.$high-ag.$high,af.$low-ag.$low));ai=0;aj=0;ak=new $Uint64(0,1);al=aj;am=ak;while(true){if(!(al<20)){break;}if((an=new $Uint64(0,y),(am.$high>an.$high||(am.$high===an.$high&&am.$low>an.$low)))){ai=al;break;}am=$mul64(am,(new $Uint64(0,10)));al=al+(1)>>0;}ao=0;while(true){if(!(ao>0)-1>>0,((ap<0||ap>=AL.length)?$throwRuntimeError("index out of range"):AL[ap]));as=(ar=y/(aq.$low>>>0),(ar===ar&&ar!==1/0&&ar!==-1/0)?ar>>>0:$throwRuntimeError("integer divide by zero"));(at=a.d,(ao<0||ao>=at.$length)?$throwRuntimeError("index out of range"):at.$array[at.$offset+ao]=((as+48>>>0)<<24>>>24));y=y-((au=(aq.$low>>>0),(((as>>>16<<16)*au>>>0)+(as<<16>>>16)*au)>>>0))>>>0;aw=(av=$shiftLeft64(new $Uint64(0,y),x),new $Uint64(av.$high+ab.$high,av.$low+ab.$low));if((aw.$high>0;a.dp=ai+s>>0;a.neg=d.neg;return AO(a,aw,ah,ae,$shiftLeft64(aq,x),new $Uint64(0,2));}ao=ao+(1)>>0;}a.nd=ai;a.dp=a.nd+s>>0;a.neg=d.neg;ax=0;ay=new $Uint64(0,1);while(true){if(!(true)){break;}ab=$mul64(ab,(new $Uint64(0,10)));ay=$mul64(ay,(new $Uint64(0,10)));ax=($shiftRightUint64(ab,x).$low>>0);(az=a.d,ba=a.nd,(ba<0||ba>=az.$length)?$throwRuntimeError("index out of range"):az.$array[az.$offset+ba]=((ax+48>>0)<<24>>>24));a.nd=a.nd+(1)>>0;ab=(bb=$shiftLeft64(new $Uint64(0,ax),x),new $Uint64(ab.$high-bb.$high,ab.$low-bb.$low));if((bc=$mul64(ae,ay),(ab.$high>0;(m=a.d,(k<0||k>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+k]=(l=a.d,((k<0||k>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+k]))-(1)<<24>>>24);b=(n=e,new $Uint64(b.$high+n.$high,b.$low+n.$low));}if((o=new $Uint64(b.$high+e.$high,b.$low+e.$low),p=(q=(r=$div64(e,new $Uint64(0,2),false),new $Uint64(c.$high+r.$high,c.$low+r.$low)),new $Uint64(q.$high+f.$high,q.$low+f.$low)),(o.$highs.$high||(b.$high===s.$high&&b.$low>s.$low)))){return false;}if((a.nd===1)&&((t=a.d,((0<0||0>=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+0]))===48)){a.nd=0;a.dp=0;}return true;};AT=$pkg.AppendFloat=function(a,b,c,d,e){var a,b,c,d,e;return AU(a,b,c,d,e);};AU=function(a,b,c,d,e){var a,aa,ab,ac,ad,ae,af,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;f=new $Uint64(0,0);g=CP.nil;h=e;if(h===32){f=new $Uint64(0,A.Float32bits(b));g=AQ;}else if(h===64){f=A.Float64bits(b);g=AR;}else{$panic(new $String("strconv: illegal AppendFloat/FormatFloat bitSize"));}j=!((i=$shiftRightUint64(f,((g.expbits+g.mantbits>>>0))),(i.$high===0&&i.$low===0)));l=($shiftRightUint64(f,g.mantbits).$low>>0)&((((k=g.expbits,k<32?(1<>0)-1>>0));o=(m=(n=$shiftLeft64(new $Uint64(0,1),g.mantbits),new $Uint64(n.$high-0,n.$low-1)),new $Uint64(f.$high&m.$high,(f.$low&m.$low)>>>0));p=l;if(p===(((q=g.expbits,q<32?(1<>0)-1>>0)){r="";if(!((o.$high===0&&o.$low===0))){r="NaN";}else if(j){r="-Inf";}else{r="+Inf";}return $appendSlice(a,new CL($stringToBytes(r)));}else if(p===0){l=l+(1)>>0;}else{o=(s=$shiftLeft64(new $Uint64(0,1),g.mantbits),new $Uint64(o.$high|s.$high,(o.$low|s.$low)>>>0));}l=l+(g.bias)>>0;if(c===98){return BB(a,j,o,l,g);}if(!G){return AV(a,d,c,j,o,l,g);}t=$clone(new AY.ptr(),AY);u=false;v=d<0;if(v){w=new AI.ptr();x=w.AssignComputeBounds(o,l,j,g);y=$clone(x[0],AI);z=$clone(x[1],AI);aa=$clone(CO.zero(),CO);t.d=new CL(aa);u=w.ShortestDecimal(t,y,z);if(!u){return AV(a,d,c,j,o,l,g);}ab=c;if(ab===101||ab===69){d=t.nd-1>>0;}else if(ab===102){d=BC(t.nd-t.dp>>0,0);}else if(ab===103||ab===71){d=t.nd;}}else if(!((c===102))){ac=d;ad=c;if(ad===101||ad===69){ac=ac+(1)>>0;}else if(ad===103||ad===71){if(d===0){d=1;}ac=d;}if(ac<=15){ae=$clone(CN.zero(),CN);t.d=new CL(ae);af=new AI.ptr(o,l-(g.mantbits>>0)>>0,j);u=af.FixedDecimal(t,ac);}}if(!u){return AV(a,d,c,j,o,l,g);}return AW(a,v,j,t,d,c);};AV=function(a,b,c,d,e,f,g){var a,b,c,d,e,f,g,h,i,j,k,l;h=new Z.ptr();h.Assign(e);h.Shift(f-(g.mantbits>>0)>>0);i=$clone(new AY.ptr(),AY);j=b<0;if(j){AX(h,e,f,g);$copy(i,new AY.ptr(new CL(h.d),h.nd,h.dp,false),AY);k=c;if(k===101||k===69){b=i.nd-1>>0;}else if(k===102){b=BC(i.nd-i.dp>>0,0);}else if(k===103||k===71){b=i.nd;}}else{l=c;if(l===101||l===69){h.Round(b+1>>0);}else if(l===102){h.Round(h.dp+b>>0);}else if(l===103||l===71){if(b===0){b=1;}h.Round(b);}$copy(i,new AY.ptr(new CL(h.d),h.nd,h.dp,false),AY);}return AW(a,j,d,i,b,c);};AW=function(a,b,c,d,e,f){var a,b,c,d,e,f,g,h,i;d=$clone(d,AY);g=f;if(g===101||g===69){return AZ(a,c,d,e,f);}else if(g===102){return BA(a,c,d,e);}else if(g===103||g===71){h=e;if(h>d.nd&&d.nd>=d.dp){h=d.nd;}if(b){h=6;}i=d.dp-1>>0;if(i<-4||i>=h){if(e>d.nd){e=d.nd;}return AZ(a,c,d,e-1>>0,(f+101<<24>>>24)-103<<24>>>24);}if(e>d.dp){e=d.nd;}return BA(a,c,d,BC(e-d.dp>>0,0));}return $append(a,37,f);};AX=function(a,b,c,d){var a,aa,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;if((b.$high===0&&b.$low===0)){a.nd=0;return;}e=d.bias+1>>0;if(c>e&&(332*((a.dp-a.nd>>0))>>0)>=(100*((c-(d.mantbits>>0)>>0))>>0)){return;}f=new Z.ptr();f.Assign((g=$mul64(b,new $Uint64(0,2)),new $Uint64(g.$high+0,g.$low+1)));f.Shift((c-(d.mantbits>>0)>>0)-1>>0);h=new $Uint64(0,0);i=0;if((j=$shiftLeft64(new $Uint64(0,1),d.mantbits),(b.$high>j.$high||(b.$high===j.$high&&b.$low>j.$low)))||(c===e)){h=new $Uint64(b.$high-0,b.$low-1);i=c;}else{h=(k=$mul64(b,new $Uint64(0,2)),new $Uint64(k.$high-0,k.$low-1));i=c-1>>0;}l=new Z.ptr();l.Assign((m=$mul64(h,new $Uint64(0,2)),new $Uint64(m.$high+0,m.$low+1)));l.Shift((i-(d.mantbits>>0)>>0)-1>>0);o=(n=$div64(b,new $Uint64(0,2),true),(n.$high===0&&n.$low===0));p=0;while(true){if(!(p=w.length)?$throwRuntimeError("index out of range"):w[p]));}else{t=48;}u=(x=a.d,((p<0||p>=x.length)?$throwRuntimeError("index out of range"):x[p]));if(p=y.length)?$throwRuntimeError("index out of range"):y[p]));}else{v=48;}z=!((t===u))||(o&&(t===u)&&((p+1>>0)===l.nd));aa=!((u===v))&&(o||(u+1<<24>>>24)>0)>0);return;}else if(z){a.RoundDown(p+1>>0);return;}else if(aa){a.RoundUp(p+1>>0);return;}p=p+(1)>>0;}};AZ=function(a,b,c,d,e){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;c=$clone(c,AY);if(b){a=$append(a,45);}f=48;if(!((c.nd===0))){f=(g=c.d,((0<0||0>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+0]));}a=$append(a,f);if(d>0){a=$append(a,46);h=1;i=((c.nd+d>>0)+1>>0)-BC(c.nd,d+1>>0)>>0;while(true){if(!(h=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+h])));h=h+(1)>>0;}while(true){if(!(h<=d)){break;}a=$append(a,48);h=h+(1)>>0;}}a=$append(a,e);k=c.dp-1>>0;if(c.nd===0){k=0;}if(k<0){f=45;k=-k;}else{f=43;}a=$append(a,f);l=$clone(CQ.zero(),CQ);m=3;while(true){if(!(k>=10)){break;}m=m-(1)>>0;(m<0||m>=l.length)?$throwRuntimeError("index out of range"):l[m]=(((n=k%10,n===n?n:$throwRuntimeError("integer divide by zero"))+48>>0)<<24>>>24);k=(o=k/(10),(o===o&&o!==1/0&&o!==-1/0)?o>>0:$throwRuntimeError("integer divide by zero"));}m=m-(1)>>0;(m<0||m>=l.length)?$throwRuntimeError("index out of range"):l[m]=((k+48>>0)<<24>>>24);p=m;if(p===0){a=$append(a,l[0],l[1],l[2]);}else if(p===1){a=$append(a,l[1],l[2]);}else if(p===2){a=$append(a,48,l[2]);}return a;};BA=function(a,b,c,d){var a,b,c,d,e,f,g,h,i,j;c=$clone(c,AY);if(b){a=$append(a,45);}if(c.dp>0){e=0;e=0;while(true){if(!(e=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+e])));e=e+(1)>>0;}while(true){if(!(e>0;}}else{a=$append(a,48);}if(d>0){a=$append(a,46);g=0;while(true){if(!(g>0;if(0<=i&&i=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+i]));}a=$append(a,h);g=g+(1)>>0;}}return a;};BB=function(a,b,c,d,e){var a,b,c,d,e,f,g,h,i,j,k,l;f=$clone(CR.zero(),CR);g=50;d=d-((e.mantbits>>0))>>0;h=43;if(d<0){h=45;d=-d;}i=0;while(true){if(!(d>0||i<1)){break;}i=i+(1)>>0;g=g-(1)>>0;(g<0||g>=f.length)?$throwRuntimeError("index out of range"):f[g]=(((j=d%10,j===j?j:$throwRuntimeError("integer divide by zero"))+48>>0)<<24>>>24);d=(k=d/(10),(k===k&&k!==1/0&&k!==-1/0)?k>>0:$throwRuntimeError("integer divide by zero"));}g=g-(1)>>0;(g<0||g>=f.length)?$throwRuntimeError("index out of range"):f[g]=h;g=g-(1)>>0;(g<0||g>=f.length)?$throwRuntimeError("index out of range"):f[g]=112;i=0;while(true){if(!((c.$high>0||(c.$high===0&&c.$low>0))||i<1)){break;}i=i+(1)>>0;g=g-(1)>>0;(g<0||g>=f.length)?$throwRuntimeError("index out of range"):f[g]=((l=$div64(c,new $Uint64(0,10),true),new $Uint64(l.$high+0,l.$low+48)).$low<<24>>>24);c=$div64(c,(new $Uint64(0,10)),false);}if(b){g=g-(1)>>0;(g<0||g>=f.length)?$throwRuntimeError("index out of range"):f[g]=45;}return $appendSlice(a,$subslice(new CL(f),g));};BC=function(a,b){var a,b;if(a>b){return a;}return b;};BH=$pkg.FormatUint=function(a,b){var a,b,c,d;c=BN(CL.nil,a,b,false,false);d=c[1];return d;};BI=$pkg.FormatInt=function(a,b){var a,b,c,d;c=BN(CL.nil,new $Uint64(a.$high,a.$low),b,(a.$high<0||(a.$high===0&&a.$low<0)),false);d=c[1];return d;};BJ=$pkg.Itoa=function(a){var a;return BI(new $Int64(0,a),10);};BN=function(a,b,c,d,e){var a,b,c,d,e,f=CL.nil,g="",h,i,j,k,l,m,n,o,p,q,r,s,t;if(c<2||c>36){$panic(new $String("strconv: illegal AppendInt/FormatInt base"));}h=$clone(CS.zero(),CS);i=65;if(d){b=new $Uint64(-b.$high,-b.$low);}if(c===10){while(true){if(!((b.$high>0||(b.$high===0&&b.$low>=100)))){break;}i=i-(2)>>0;j=$div64(b,new $Uint64(0,100),false);l=((k=$mul64(j,new $Uint64(0,100)),new $Uint64(b.$high-k.$high,b.$low-k.$low)).$low>>>0);(m=i+1>>0,(m<0||m>=h.length)?$throwRuntimeError("index out of range"):h[m]="0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789".charCodeAt(l));(n=i+0>>0,(n<0||n>=h.length)?$throwRuntimeError("index out of range"):h[n]="0000000000111111111122222222223333333333444444444455555555556666666666777777777788888888889999999999".charCodeAt(l));b=j;}if((b.$high>0||(b.$high===0&&b.$low>=10))){i=i-(1)>>0;o=$div64(b,new $Uint64(0,10),false);(i<0||i>=h.length)?$throwRuntimeError("index out of range"):h[i]="0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt(((p=$mul64(o,new $Uint64(0,10)),new $Uint64(b.$high-p.$high,b.$low-p.$low)).$low>>>0));b=o;}}else{q=((c<0||c>=BM.length)?$throwRuntimeError("index out of range"):BM[c]);if(q>0){r=new $Uint64(0,c);s=(r.$low>>>0)-1>>>0;while(true){if(!((b.$high>r.$high||(b.$high===r.$high&&b.$low>=r.$low)))){break;}i=i-(1)>>0;(i<0||i>=h.length)?$throwRuntimeError("index out of range"):h[i]="0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt((((b.$low>>>0)&s)>>>0));b=$shiftRightUint64(b,(q));}}else{t=new $Uint64(0,c);while(true){if(!((b.$high>t.$high||(b.$high===t.$high&&b.$low>=t.$low)))){break;}i=i-(1)>>0;(i<0||i>=h.length)?$throwRuntimeError("index out of range"):h[i]="0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt(($div64(b,t,true).$low>>>0));b=$div64(b,(t),false);}}}i=i-(1)>>0;(i<0||i>=h.length)?$throwRuntimeError("index out of range"):h[i]="0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt((b.$low>>>0));if(d){i=i-(1)>>0;(i<0||i>=h.length)?$throwRuntimeError("index out of range"):h[i]=45;}if(e){f=$appendSlice(a,$subslice(new CL(h),i));return[f,g];}g=$bytesToString($subslice(new CL(h),i));return[f,g];};BO=function(a,b,c){var a,b,c,d,e,f,g,h,i,j,k,l,m;d=$clone(CT.zero(),CT);f=$makeSlice(CL,0,(e=(3*a.length>>0)/2,(e===e&&e!==1/0&&e!==-1/0)?e>>0:$throwRuntimeError("integer divide by zero")));f=$append(f,b);g=0;while(true){if(!(a.length>0)){break;}h=(a.charCodeAt(0)>>0);g=1;if(h>=128){i=C.DecodeRuneInString(a);h=i[0];g=i[1];}if((g===1)&&(h===65533)){f=$appendSlice(f,new CL($stringToBytes("\\x")));f=$append(f,"0123456789abcdef".charCodeAt((a.charCodeAt(0)>>>4<<24>>>24)));f=$append(f,"0123456789abcdef".charCodeAt(((a.charCodeAt(0)&15)>>>0)));a=a.substring(g);continue;}if((h===(b>>0))||(h===92)){f=$append(f,92);f=$append(f,(h<<24>>>24));a=a.substring(g);continue;}if(c){if(h<128&&CE(h)){f=$append(f,(h<<24>>>24));a=a.substring(g);continue;}}else if(CE(h)){j=C.EncodeRune(new CL(d),h);f=$appendSlice(f,$subslice(new CL(d),0,j));a=a.substring(g);continue;}k=h;if(k===7){f=$appendSlice(f,new CL($stringToBytes("\\a")));}else if(k===8){f=$appendSlice(f,new CL($stringToBytes("\\b")));}else if(k===12){f=$appendSlice(f,new CL($stringToBytes("\\f")));}else if(k===10){f=$appendSlice(f,new CL($stringToBytes("\\n")));}else if(k===13){f=$appendSlice(f,new CL($stringToBytes("\\r")));}else if(k===9){f=$appendSlice(f,new CL($stringToBytes("\\t")));}else if(k===11){f=$appendSlice(f,new CL($stringToBytes("\\v")));}else{if(h<32){f=$appendSlice(f,new CL($stringToBytes("\\x")));f=$append(f,"0123456789abcdef".charCodeAt((a.charCodeAt(0)>>>4<<24>>>24)));f=$append(f,"0123456789abcdef".charCodeAt(((a.charCodeAt(0)&15)>>>0)));}else if(h>1114111){h=65533;f=$appendSlice(f,new CL($stringToBytes("\\u")));l=12;while(true){if(!(l>=0)){break;}f=$append(f,"0123456789abcdef".charCodeAt((((h>>$min((l>>>0),31))>>0)&15)));l=l-(4)>>0;}}else if(h<65536){f=$appendSlice(f,new CL($stringToBytes("\\u")));l=12;while(true){if(!(l>=0)){break;}f=$append(f,"0123456789abcdef".charCodeAt((((h>>$min((l>>>0),31))>>0)&15)));l=l-(4)>>0;}}else{f=$appendSlice(f,new CL($stringToBytes("\\U")));m=28;while(true){if(!(m>=0)){break;}f=$append(f,"0123456789abcdef".charCodeAt((((h>>$min((m>>>0),31))>>0)&15)));m=m-(4)>>0;}}}a=a.substring(g);}f=$append(f,b);return $bytesToString(f);};BP=$pkg.Quote=function(a){var a;return BO(a,34,false);};BR=$pkg.QuoteToASCII=function(a){var a;return BO(a,34,true);};BT=$pkg.QuoteRune=function(a){var a;return BO($encodeRune(a),39,false);};BU=$pkg.AppendQuoteRune=function(a,b){var a,b;return $appendSlice(a,new CL($stringToBytes(BT(b))));};BV=$pkg.QuoteRuneToASCII=function(a){var a;return BO($encodeRune(a),39,true);};BW=$pkg.AppendQuoteRuneToASCII=function(a,b){var a,b;return $appendSlice(a,new CL($stringToBytes(BV(b))));};BX=$pkg.CanBackquote=function(a){var a,b,c,d;while(true){if(!(a.length>0)){break;}b=C.DecodeRuneInString(a);c=b[0];d=b[1];a=a.substring(d);if(d>1){if(c===65279){return false;}continue;}if(c===65533){return false;}if((c<32&&!((c===9)))||(c===96)||(c===127)){return false;}}return true;};BY=function(a){var a,b=0,c=false,d,e,f,g,h,i,j;d=(a>>0);if(48<=d&&d<=57){e=d-48>>0;f=true;b=e;c=f;return[b,c];}else if(97<=d&&d<=102){g=(d-97>>0)+10>>0;h=true;b=g;c=h;return[b,c];}else if(65<=d&&d<=70){i=(d-65>>0)+10>>0;j=true;b=i;c=j;return[b,c];}return[b,c];};BZ=$pkg.UnquoteChar=function(a,b){var a,aa,ab,ac,ad,b,c=0,d=false,e="",f=$ifaceNil,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;g=a.charCodeAt(0);if((g===b)&&((b===39)||(b===34))){f=$pkg.ErrSyntax;return[c,d,e,f];}else if(g>=128){h=C.DecodeRuneInString(a);i=h[0];j=h[1];k=i;l=true;m=a.substring(j);n=$ifaceNil;c=k;d=l;e=m;f=n;return[c,d,e,f];}else if(!((g===92))){o=(a.charCodeAt(0)>>0);p=false;q=a.substring(1);r=$ifaceNil;c=o;d=p;e=q;f=r;return[c,d,e,f];}if(a.length<=1){f=$pkg.ErrSyntax;return[c,d,e,f];}s=a.charCodeAt(1);a=a.substring(2);t=s;switch(0){default:if(t===97){c=7;}else if(t===98){c=8;}else if(t===102){c=12;}else if(t===110){c=10;}else if(t===114){c=13;}else if(t===116){c=9;}else if(t===118){c=11;}else if(t===120||t===117||t===85){u=0;v=s;if(v===120){u=2;}else if(v===117){u=4;}else if(v===85){u=8;}w=0;if(a.length>0)|z;x=x+(1)>>0;}a=a.substring(u);if(s===120){c=w;break;}if(w>1114111){f=$pkg.ErrSyntax;return[c,d,e,f];}c=w;d=true;}else if(t===48||t===49||t===50||t===51||t===52||t===53||t===54||t===55){ab=(s>>0)-48>>0;if(a.length<2){f=$pkg.ErrSyntax;return[c,d,e,f];}ac=0;while(true){if(!(ac<2)){break;}ad=(a.charCodeAt(ac)>>0)-48>>0;if(ad<0||ad>7){f=$pkg.ErrSyntax;return[c,d,e,f];}ab=((ab<<3>>0))|ad;ac=ac+(1)>>0;}a=a.substring(2);if(ab>255){f=$pkg.ErrSyntax;return[c,d,e,f];}c=ab;}else if(t===92){c=92;}else if(t===39||t===34){if(!((s===b))){f=$pkg.ErrSyntax;return[c,d,e,f];}c=(s>>0);}else{f=$pkg.ErrSyntax;return[c,d,e,f];}}e=a;return[c,d,e,f];};CA=$pkg.Unquote=function(a){var a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,b="",c=$ifaceNil,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;d=a.length;if(d<2){e="";f=$pkg.ErrSyntax;b=e;c=f;return[b,c];}g=a.charCodeAt(0);if(!((g===a.charCodeAt((d-1>>0))))){h="";i=$pkg.ErrSyntax;b=h;c=i;return[b,c];}a=a.substring(1,(d-1>>0));if(g===96){if(CB(a,96)){j="";k=$pkg.ErrSyntax;b=j;c=k;return[b,c];}l=a;m=$ifaceNil;b=l;c=m;return[b,c];}if(!((g===34))&&!((g===39))){n="";o=$pkg.ErrSyntax;b=n;c=o;return[b,c];}if(CB(a,10)){p="";q=$pkg.ErrSyntax;b=p;c=q;return[b,c];}if(!CB(a,92)&&!CB(a,g)){r=g;if(r===34){s=a;t=$ifaceNil;b=s;c=t;return[b,c];}else if(r===39){u=C.DecodeRuneInString(a);v=u[0];w=u[1];if((w===a.length)&&(!((v===65533))||!((w===1)))){x=a;y=$ifaceNil;b=x;c=y;return[b,c];}}}z=$clone(CT.zero(),CT);ab=$makeSlice(CL,0,(aa=(3*a.length>>0)/2,(aa===aa&&aa!==1/0&&aa!==-1/0)?aa>>0:$throwRuntimeError("integer divide by zero")));while(true){if(!(a.length>0)){break;}ac=BZ(a,g);ad=ac[0];ae=ac[1];af=ac[2];ag=ac[3];if(!($interfaceIsEqual(ag,$ifaceNil))){ah="";ai=ag;b=ah;c=ai;return[b,c];}a=af;if(ad<128||!ae){ab=$append(ab,(ad<<24>>>24));}else{aj=C.EncodeRune(new CL(z),ad);ab=$appendSlice(ab,$subslice(new CL(z),0,aj));}if((g===39)&&!((a.length===0))){ak="";al=$pkg.ErrSyntax;b=ak;c=al;return[b,c];}}am=$bytesToString(ab);an=$ifaceNil;b=am;c=an;return[b,c];};CB=function(a,b){var a,b,c;c=0;while(true){if(!(c>0;}return false;};CC=function(a,b){var a,b,c,d,e,f,g,h;c=0;d=a.$length;e=c;f=d;while(true){if(!(e>0))/2,(g===g&&g!==1/0&&g!==-1/0)?g>>0:$throwRuntimeError("integer divide by zero"))>>0;if(((h<0||h>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+h])>0;}else{f=h;}}return e;};CD=function(a,b){var a,b,c,d,e,f,g,h;c=0;d=a.$length;e=c;f=d;while(true){if(!(e>0))/2,(g===g&&g!==1/0&&g!==-1/0)?g>>0:$throwRuntimeError("integer divide by zero"))>>0;if(((h<0||h>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+h])>0;}else{f=h;}}return e;};CE=$pkg.IsPrint=function(a){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;if(a<=255){if(32<=a&&a<=126){return true;}if(161<=a&&a<=255){return!((a===173));}return false;}if(0<=a&&a<65536){b=(a<<16>>>16);c=BD;d=BE;e=b;f=c;g=d;h=CC(f,e);if(h>=f.$length||e<(i=h&~1,((i<0||i>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+i]))||(j=h|1,((j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]))=g.$length||!((((k<0||k>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+k])===e));}l=(a>>>0);m=BF;n=BG;o=l;p=m;q=n;r=CD(p,o);if(r>=p.$length||o<(s=r&~1,((s<0||s>=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+s]))||(t=r|1,((t<0||t>=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+t]))=131072){return true;}a=a-(65536)>>0;u=CC(q,(a<<16>>>16));return u>=q.$length||!((((u<0||u>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+u])===(a<<16>>>16)));};CM.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];CV.methods=[{prop:"set",name:"set",pkg:"strconv",typ:$funcType([$String],[$Bool],false)},{prop:"floatBits",name:"floatBits",pkg:"strconv",typ:$funcType([CP],[$Uint64,$Bool],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Assign",name:"Assign",pkg:"",typ:$funcType([$Uint64],[],false)},{prop:"Shift",name:"Shift",pkg:"",typ:$funcType([$Int],[],false)},{prop:"Round",name:"Round",pkg:"",typ:$funcType([$Int],[],false)},{prop:"RoundDown",name:"RoundDown",pkg:"",typ:$funcType([$Int],[],false)},{prop:"RoundUp",name:"RoundUp",pkg:"",typ:$funcType([$Int],[],false)},{prop:"RoundedInteger",name:"RoundedInteger",pkg:"",typ:$funcType([],[$Uint64],false)}];CX.methods=[{prop:"floatBits",name:"floatBits",pkg:"strconv",typ:$funcType([CP],[$Uint64,$Bool],false)},{prop:"AssignComputeBounds",name:"AssignComputeBounds",pkg:"",typ:$funcType([$Uint64,$Int,$Bool,CP],[AI,AI],false)},{prop:"Normalize",name:"Normalize",pkg:"",typ:$funcType([],[$Uint],false)},{prop:"Multiply",name:"Multiply",pkg:"",typ:$funcType([AI],[],false)},{prop:"AssignDecimal",name:"AssignDecimal",pkg:"",typ:$funcType([$Uint64,$Int,$Bool,$Bool,CP],[$Bool],false)},{prop:"frexp10",name:"frexp10",pkg:"strconv",typ:$funcType([],[$Int,$Int],false)},{prop:"FixedDecimal",name:"FixedDecimal",pkg:"",typ:$funcType([CW,$Int],[$Bool],false)},{prop:"ShortestDecimal",name:"ShortestDecimal",pkg:"",typ:$funcType([CW,CX,CX],[$Bool],false)}];S.init([{prop:"Func",name:"Func",pkg:"",typ:$String,tag:""},{prop:"Num",name:"Num",pkg:"",typ:$String,tag:""},{prop:"Err",name:"Err",pkg:"",typ:$error,tag:""}]);Z.init([{prop:"d",name:"d",pkg:"strconv",typ:CU,tag:""},{prop:"nd",name:"nd",pkg:"strconv",typ:$Int,tag:""},{prop:"dp",name:"dp",pkg:"strconv",typ:$Int,tag:""},{prop:"neg",name:"neg",pkg:"strconv",typ:$Bool,tag:""},{prop:"trunc",name:"trunc",pkg:"strconv",typ:$Bool,tag:""}]);AD.init([{prop:"delta",name:"delta",pkg:"strconv",typ:$Int,tag:""},{prop:"cutoff",name:"cutoff",pkg:"strconv",typ:$String,tag:""}]);AI.init([{prop:"mant",name:"mant",pkg:"strconv",typ:$Uint64,tag:""},{prop:"exp",name:"exp",pkg:"strconv",typ:$Int,tag:""},{prop:"neg",name:"neg",pkg:"strconv",typ:$Bool,tag:""}]);AP.init([{prop:"mantbits",name:"mantbits",pkg:"strconv",typ:$Uint,tag:""},{prop:"expbits",name:"expbits",pkg:"strconv",typ:$Uint,tag:""},{prop:"bias",name:"bias",pkg:"strconv",typ:$Int,tag:""}]);AY.init([{prop:"d",name:"d",pkg:"strconv",typ:CL,tag:""},{prop:"nd",name:"nd",pkg:"strconv",typ:$Int,tag:""},{prop:"dp",name:"dp",pkg:"strconv",typ:$Int,tag:""},{prop:"neg",name:"neg",pkg:"strconv",typ:$Bool,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_strconv=function(){while(true){switch($s){case 0:$r=B.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}G=true;K=new CF([1,3,6,9,13,16,19,23,26]);L=new CG([1,10,100,1000,10000,100000,1e+06,1e+07,1e+08,1e+09,1e+10,1e+11,1e+12,1e+13,1e+14,1e+15,1e+16,1e+17,1e+18,1e+19,1e+20,1e+21,1e+22]);M=new CH([1,10,100,1000,10000,100000,1e+06,1e+07,1e+08,1e+09,1e+10]);$pkg.ErrRange=B.New("value out of range");$pkg.ErrSyntax=B.New("invalid syntax");AE=new CI([new AD.ptr(0,""),new AD.ptr(1,"5"),new AD.ptr(1,"25"),new AD.ptr(1,"125"),new AD.ptr(2,"625"),new AD.ptr(2,"3125"),new AD.ptr(2,"15625"),new AD.ptr(3,"78125"),new AD.ptr(3,"390625"),new AD.ptr(3,"1953125"),new AD.ptr(4,"9765625"),new AD.ptr(4,"48828125"),new AD.ptr(4,"244140625"),new AD.ptr(4,"1220703125"),new AD.ptr(5,"6103515625"),new AD.ptr(5,"30517578125"),new AD.ptr(5,"152587890625"),new AD.ptr(6,"762939453125"),new AD.ptr(6,"3814697265625"),new AD.ptr(6,"19073486328125"),new AD.ptr(7,"95367431640625"),new AD.ptr(7,"476837158203125"),new AD.ptr(7,"2384185791015625"),new AD.ptr(7,"11920928955078125"),new AD.ptr(8,"59604644775390625"),new AD.ptr(8,"298023223876953125"),new AD.ptr(8,"1490116119384765625"),new AD.ptr(9,"7450580596923828125")]);AJ=$toNativeArray($kindStruct,[new AI.ptr(new $Uint64(2147483648,0),-63,false),new AI.ptr(new $Uint64(2684354560,0),-60,false),new AI.ptr(new $Uint64(3355443200,0),-57,false),new AI.ptr(new $Uint64(4194304000,0),-54,false),new AI.ptr(new $Uint64(2621440000,0),-50,false),new AI.ptr(new $Uint64(3276800000,0),-47,false),new AI.ptr(new $Uint64(4096000000,0),-44,false),new AI.ptr(new $Uint64(2560000000,0),-40,false)]);AK=$toNativeArray($kindStruct,[new AI.ptr(new $Uint64(4203730336,136053384),-1220,false),new AI.ptr(new $Uint64(3132023167,2722021238),-1193,false),new AI.ptr(new $Uint64(2333539104,810921078),-1166,false),new AI.ptr(new $Uint64(3477244234,1573795306),-1140,false),new AI.ptr(new $Uint64(2590748842,1432697645),-1113,false),new AI.ptr(new $Uint64(3860516611,1025131999),-1087,false),new AI.ptr(new $Uint64(2876309015,3348809418),-1060,false),new AI.ptr(new $Uint64(4286034428,3200048207),-1034,false),new AI.ptr(new $Uint64(3193344495,1097586188),-1007,false),new AI.ptr(new $Uint64(2379227053,2424306748),-980,false),new AI.ptr(new $Uint64(3545324584,827693699),-954,false),new AI.ptr(new $Uint64(2641472655,2913388981),-927,false),new AI.ptr(new $Uint64(3936100983,602835915),-901,false),new AI.ptr(new $Uint64(2932623761,1081627501),-874,false),new AI.ptr(new $Uint64(2184974969,1572261463),-847,false),new AI.ptr(new $Uint64(3255866422,1308317239),-821,false),new AI.ptr(new $Uint64(2425809519,944281679),-794,false),new AI.ptr(new $Uint64(3614737867,629291719),-768,false),new AI.ptr(new $Uint64(2693189581,2545915892),-741,false),new AI.ptr(new $Uint64(4013165208,388672741),-715,false),new AI.ptr(new $Uint64(2990041083,708162190),-688,false),new AI.ptr(new $Uint64(2227754207,3536207675),-661,false),new AI.ptr(new $Uint64(3319612455,450088378),-635,false),new AI.ptr(new $Uint64(2473304014,3139815830),-608,false),new AI.ptr(new $Uint64(3685510180,2103616900),-582,false),new AI.ptr(new $Uint64(2745919064,224385782),-555,false),new AI.ptr(new $Uint64(4091738259,3737383206),-529,false),new AI.ptr(new $Uint64(3048582568,2868871352),-502,false),new AI.ptr(new $Uint64(2271371013,1820084875),-475,false),new AI.ptr(new $Uint64(3384606560,885076051),-449,false),new AI.ptr(new $Uint64(2521728396,2444895829),-422,false),new AI.ptr(new $Uint64(3757668132,1881767613),-396,false),new AI.ptr(new $Uint64(2799680927,3102062735),-369,false),new AI.ptr(new $Uint64(4171849679,2289335700),-343,false),new AI.ptr(new $Uint64(3108270227,2410191823),-316,false),new AI.ptr(new $Uint64(2315841784,3205436779),-289,false),new AI.ptr(new $Uint64(3450873173,1697722806),-263,false),new AI.ptr(new $Uint64(2571100870,3497754540),-236,false),new AI.ptr(new $Uint64(3831238852,707476230),-210,false),new AI.ptr(new $Uint64(2854495385,1769181907),-183,false),new AI.ptr(new $Uint64(4253529586,2197867022),-157,false),new AI.ptr(new $Uint64(3169126500,2450594539),-130,false),new AI.ptr(new $Uint64(2361183241,1867548876),-103,false),new AI.ptr(new $Uint64(3518437208,3793315116),-77,false),new AI.ptr(new $Uint64(2621440000,0),-50,false),new AI.ptr(new $Uint64(3906250000,0),-24,false),new AI.ptr(new $Uint64(2910383045,2892103680),3,false),new AI.ptr(new $Uint64(2168404344,4170451332),30,false),new AI.ptr(new $Uint64(3231174267,3372684723),56,false),new AI.ptr(new $Uint64(2407412430,2078956656),83,false),new AI.ptr(new $Uint64(3587324068,2884206696),109,false),new AI.ptr(new $Uint64(2672764710,395977285),136,false),new AI.ptr(new $Uint64(3982729777,3569679143),162,false),new AI.ptr(new $Uint64(2967364920,2361961896),189,false),new AI.ptr(new $Uint64(2210859150,447440347),216,false),new AI.ptr(new $Uint64(3294436857,1114709402),242,false),new AI.ptr(new $Uint64(2454546732,2786846552),269,false),new AI.ptr(new $Uint64(3657559652,443583978),295,false),new AI.ptr(new $Uint64(2725094297,2599384906),322,false),new AI.ptr(new $Uint64(4060706939,3028118405),348,false),new AI.ptr(new $Uint64(3025462433,2044532855),375,false),new AI.ptr(new $Uint64(2254145170,1536935362),402,false),new AI.ptr(new $Uint64(3358938053,3365297469),428,false),new AI.ptr(new $Uint64(2502603868,4204241075),455,false),new AI.ptr(new $Uint64(3729170365,2577424355),481,false),new AI.ptr(new $Uint64(2778448436,3677981733),508,false),new AI.ptr(new $Uint64(4140210802,2744688476),534,false),new AI.ptr(new $Uint64(3084697427,1424604878),561,false),new AI.ptr(new $Uint64(2298278679,4062331362),588,false),new AI.ptr(new $Uint64(3424702107,3546052773),614,false),new AI.ptr(new $Uint64(2551601907,2065781727),641,false),new AI.ptr(new $Uint64(3802183132,2535403578),667,false),new AI.ptr(new $Uint64(2832847187,1558426518),694,false),new AI.ptr(new $Uint64(4221271257,2762425404),720,false),new AI.ptr(new $Uint64(3145092172,2812560400),747,false),new AI.ptr(new $Uint64(2343276271,3057687578),774,false),new AI.ptr(new $Uint64(3491753744,2790753324),800,false),new AI.ptr(new $Uint64(2601559269,3918606633),827,false),new AI.ptr(new $Uint64(3876625403,2711358621),853,false),new AI.ptr(new $Uint64(2888311001,1648096297),880,false),new AI.ptr(new $Uint64(2151959390,2057817989),907,false),new AI.ptr(new $Uint64(3206669376,61660461),933,false),new AI.ptr(new $Uint64(2389154863,1581580175),960,false),new AI.ptr(new $Uint64(3560118173,2626467905),986,false),new AI.ptr(new $Uint64(2652494738,3034782633),1013,false),new AI.ptr(new $Uint64(3952525166,3135207385),1039,false),new AI.ptr(new $Uint64(2944860731,2616258155),1066,false)]);AL=$toNativeArray($kindUint64,[new $Uint64(0,1),new $Uint64(0,10),new $Uint64(0,100),new $Uint64(0,1000),new $Uint64(0,10000),new $Uint64(0,100000),new $Uint64(0,1000000),new $Uint64(0,10000000),new $Uint64(0,100000000),new $Uint64(0,1000000000),new $Uint64(2,1410065408),new $Uint64(23,1215752192),new $Uint64(232,3567587328),new $Uint64(2328,1316134912),new $Uint64(23283,276447232),new $Uint64(232830,2764472320),new $Uint64(2328306,1874919424),new $Uint64(23283064,1569325056),new $Uint64(232830643,2808348672),new $Uint64(2328306436,2313682944)]);AQ=new AP.ptr(23,8,-127);AR=new AP.ptr(52,11,-1023);BD=new CJ([32,126,161,887,890,895,900,1366,1369,1418,1421,1479,1488,1514,1520,1524,1542,1563,1566,1805,1808,1866,1869,1969,1984,2042,2048,2093,2096,2139,2142,2142,2208,2226,2276,2444,2447,2448,2451,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2531,2534,2555,2561,2570,2575,2576,2579,2617,2620,2626,2631,2632,2635,2637,2641,2641,2649,2654,2662,2677,2689,2745,2748,2765,2768,2768,2784,2787,2790,2801,2817,2828,2831,2832,2835,2873,2876,2884,2887,2888,2891,2893,2902,2903,2908,2915,2918,2935,2946,2954,2958,2965,2969,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3021,3024,3024,3031,3031,3046,3066,3072,3129,3133,3149,3157,3161,3168,3171,3174,3183,3192,3257,3260,3277,3285,3286,3294,3299,3302,3314,3329,3386,3389,3406,3415,3415,3424,3427,3430,3445,3449,3455,3458,3478,3482,3517,3520,3526,3530,3530,3535,3551,3558,3567,3570,3572,3585,3642,3647,3675,3713,3716,3719,3722,3725,3725,3732,3751,3754,3773,3776,3789,3792,3801,3804,3807,3840,3948,3953,4058,4096,4295,4301,4301,4304,4685,4688,4701,4704,4749,4752,4789,4792,4805,4808,4885,4888,4954,4957,4988,4992,5017,5024,5108,5120,5788,5792,5880,5888,5908,5920,5942,5952,5971,5984,6003,6016,6109,6112,6121,6128,6137,6144,6157,6160,6169,6176,6263,6272,6314,6320,6389,6400,6443,6448,6459,6464,6464,6468,6509,6512,6516,6528,6571,6576,6601,6608,6618,6622,6683,6686,6780,6783,6793,6800,6809,6816,6829,6832,6846,6912,6987,6992,7036,7040,7155,7164,7223,7227,7241,7245,7295,7360,7367,7376,7417,7424,7669,7676,7957,7960,7965,7968,8005,8008,8013,8016,8061,8064,8147,8150,8175,8178,8190,8208,8231,8240,8286,8304,8305,8308,8348,8352,8381,8400,8432,8448,8585,8592,9210,9216,9254,9280,9290,9312,11123,11126,11157,11160,11193,11197,11217,11264,11507,11513,11559,11565,11565,11568,11623,11631,11632,11647,11670,11680,11842,11904,12019,12032,12245,12272,12283,12289,12438,12441,12543,12549,12589,12593,12730,12736,12771,12784,19893,19904,40908,40960,42124,42128,42182,42192,42539,42560,42743,42752,42925,42928,42929,42999,43051,43056,43065,43072,43127,43136,43204,43214,43225,43232,43259,43264,43347,43359,43388,43392,43481,43486,43574,43584,43597,43600,43609,43612,43714,43739,43766,43777,43782,43785,43790,43793,43798,43808,43871,43876,43877,43968,44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64449,64467,64831,64848,64911,64914,64967,65008,65021,65024,65049,65056,65069,65072,65131,65136,65276,65281,65470,65474,65479,65482,65487,65490,65495,65498,65500,65504,65518,65532,65533]);BE=new CJ([173,907,909,930,1328,1376,1416,1424,1757,2111,2436,2473,2481,2526,2564,2601,2609,2612,2615,2621,2653,2692,2702,2706,2729,2737,2740,2758,2762,2820,2857,2865,2868,2910,2948,2961,2971,2973,3017,3076,3085,3089,3113,3141,3145,3159,3200,3204,3213,3217,3241,3252,3269,3273,3295,3312,3332,3341,3345,3397,3401,3460,3506,3516,3541,3543,3715,3721,3736,3744,3748,3750,3756,3770,3781,3783,3912,3992,4029,4045,4294,4681,4695,4697,4745,4785,4799,4801,4823,4881,5760,5901,5997,6001,6431,6751,7415,8024,8026,8028,8030,8117,8133,8156,8181,8335,11209,11311,11359,11558,11687,11695,11703,11711,11719,11727,11735,11743,11930,12352,12687,12831,13055,42654,42895,43470,43519,43815,43823,64311,64317,64319,64322,64325,65107,65127,65141,65511]);BF=new CK([65536,65613,65616,65629,65664,65786,65792,65794,65799,65843,65847,65932,65936,65947,65952,65952,66000,66045,66176,66204,66208,66256,66272,66299,66304,66339,66352,66378,66384,66426,66432,66499,66504,66517,66560,66717,66720,66729,66816,66855,66864,66915,66927,66927,67072,67382,67392,67413,67424,67431,67584,67589,67592,67640,67644,67644,67647,67742,67751,67759,67840,67867,67871,67897,67903,67903,67968,68023,68030,68031,68096,68102,68108,68147,68152,68154,68159,68167,68176,68184,68192,68255,68288,68326,68331,68342,68352,68405,68409,68437,68440,68466,68472,68497,68505,68508,68521,68527,68608,68680,69216,69246,69632,69709,69714,69743,69759,69825,69840,69864,69872,69881,69888,69955,69968,70006,70016,70088,70093,70093,70096,70106,70113,70132,70144,70205,70320,70378,70384,70393,70401,70412,70415,70416,70419,70457,70460,70468,70471,70472,70475,70477,70487,70487,70493,70499,70502,70508,70512,70516,70784,70855,70864,70873,71040,71093,71096,71113,71168,71236,71248,71257,71296,71351,71360,71369,71840,71922,71935,71935,72384,72440,73728,74648,74752,74868,77824,78894,92160,92728,92736,92777,92782,92783,92880,92909,92912,92917,92928,92997,93008,93047,93053,93071,93952,94020,94032,94078,94095,94111,110592,110593,113664,113770,113776,113788,113792,113800,113808,113817,113820,113823,118784,119029,119040,119078,119081,119154,119163,119261,119296,119365,119552,119638,119648,119665,119808,119967,119970,119970,119973,119974,119977,120074,120077,120134,120138,120485,120488,120779,120782,120831,124928,125124,125127,125142,126464,126500,126503,126523,126530,126530,126535,126548,126551,126564,126567,126619,126625,126651,126704,126705,126976,127019,127024,127123,127136,127150,127153,127221,127232,127244,127248,127339,127344,127386,127462,127490,127504,127546,127552,127560,127568,127569,127744,127788,127792,127869,127872,127950,127956,127991,128000,128330,128336,128578,128581,128719,128736,128748,128752,128755,128768,128883,128896,128980,129024,129035,129040,129095,129104,129113,129120,129159,129168,129197,131072,173782,173824,177972,177984,178205,194560,195101,917760,917999]);BG=new CJ([12,39,59,62,926,2057,2102,2134,2564,2580,2584,4285,4405,4626,4868,4905,4913,4916,9327,27231,27482,27490,54357,54429,54445,54458,54460,54468,54534,54549,54557,54586,54591,54597,54609,60932,60960,60963,60968,60979,60984,60986,61000,61002,61004,61008,61011,61016,61018,61020,61022,61024,61027,61035,61043,61048,61053,61055,61066,61092,61098,61632,61648,61743,62719,62842,62884]);BM=$toNativeArray($kindUint,[0,0,1,0,2,0,0,0,3,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0]);}return;}};$init_strconv.$blocking=true;return $init_strconv;};return $pkg;})(); +$packages["reflect"]=(function(){var $pkg={},B,E,A,C,D,AH,BF,BG,BH,BI,BJ,BK,BL,BM,BN,BO,BP,BQ,BR,BS,BT,BU,BV,BW,BY,BZ,CA,CZ,DA,DD,DF,FL,FU,FV,FW,FX,FY,FZ,GA,GB,GC,GD,GE,GF,GG,GH,GI,GJ,GK,GM,GN,GO,GP,GQ,GR,GW,GY,GZ,HC,HD,HE,HG,HH,F,K,AT,AU,BX,DM,G,H,I,J,L,M,N,O,P,Q,R,V,W,X,Y,AA,AE,AF,AG,AI,AJ,AK,AL,AM,AO,AP,AQ,AR,AS,AV,AW,CC,CE,CF,CG,CR,CW,DN,EF,EH,EI,EJ,EK,EL,EM,EN,EO,EP,EQ,ER,ES,ET,EU,EV,EW,EX,EY,EZ,FA,FB,FC;B=$packages["github.com/gopherjs/gopherjs/js"];E=$packages["math"];A=$packages["runtime"];C=$packages["strconv"];D=$packages["sync"];AH=$pkg.mapIter=$newType(0,$kindStruct,"reflect.mapIter","mapIter","reflect",function(t_,m_,keys_,i_){this.$val=this;this.t=t_!==undefined?t_:$ifaceNil;this.m=m_!==undefined?m_:null;this.keys=keys_!==undefined?keys_:null;this.i=i_!==undefined?i_:0;});BF=$pkg.Type=$newType(8,$kindInterface,"reflect.Type","Type","reflect",null);BG=$pkg.Kind=$newType(4,$kindUint,"reflect.Kind","Kind","reflect",null);BH=$pkg.rtype=$newType(0,$kindStruct,"reflect.rtype","rtype","reflect",function(size_,hash_,_$2_,align_,fieldAlign_,kind_,alg_,gc_,string_,uncommonType_,ptrToThis_,zero_){this.$val=this;this.size=size_!==undefined?size_:0;this.hash=hash_!==undefined?hash_:0;this._$2=_$2_!==undefined?_$2_:0;this.align=align_!==undefined?align_:0;this.fieldAlign=fieldAlign_!==undefined?fieldAlign_:0;this.kind=kind_!==undefined?kind_:0;this.alg=alg_!==undefined?alg_:FV.nil;this.gc=gc_!==undefined?gc_:FW.zero();this.string=string_!==undefined?string_:FX.nil;this.uncommonType=uncommonType_!==undefined?uncommonType_:FY.nil;this.ptrToThis=ptrToThis_!==undefined?ptrToThis_:FL.nil;this.zero=zero_!==undefined?zero_:0;});BI=$pkg.typeAlg=$newType(0,$kindStruct,"reflect.typeAlg","typeAlg","reflect",function(hash_,equal_){this.$val=this;this.hash=hash_!==undefined?hash_:$throwNilPointerError;this.equal=equal_!==undefined?equal_:$throwNilPointerError;});BJ=$pkg.method=$newType(0,$kindStruct,"reflect.method","method","reflect",function(name_,pkgPath_,mtyp_,typ_,ifn_,tfn_){this.$val=this;this.name=name_!==undefined?name_:FX.nil;this.pkgPath=pkgPath_!==undefined?pkgPath_:FX.nil;this.mtyp=mtyp_!==undefined?mtyp_:FL.nil;this.typ=typ_!==undefined?typ_:FL.nil;this.ifn=ifn_!==undefined?ifn_:0;this.tfn=tfn_!==undefined?tfn_:0;});BK=$pkg.uncommonType=$newType(0,$kindStruct,"reflect.uncommonType","uncommonType","reflect",function(name_,pkgPath_,methods_){this.$val=this;this.name=name_!==undefined?name_:FX.nil;this.pkgPath=pkgPath_!==undefined?pkgPath_:FX.nil;this.methods=methods_!==undefined?methods_:FZ.nil;});BL=$pkg.ChanDir=$newType(4,$kindInt,"reflect.ChanDir","ChanDir","reflect",null);BM=$pkg.arrayType=$newType(0,$kindStruct,"reflect.arrayType","arrayType","reflect",function(rtype_,elem_,slice_,len_){this.$val=this;this.rtype=rtype_!==undefined?rtype_:new BH.ptr();this.elem=elem_!==undefined?elem_:FL.nil;this.slice=slice_!==undefined?slice_:FL.nil;this.len=len_!==undefined?len_:0;});BN=$pkg.chanType=$newType(0,$kindStruct,"reflect.chanType","chanType","reflect",function(rtype_,elem_,dir_){this.$val=this;this.rtype=rtype_!==undefined?rtype_:new BH.ptr();this.elem=elem_!==undefined?elem_:FL.nil;this.dir=dir_!==undefined?dir_:0;});BO=$pkg.funcType=$newType(0,$kindStruct,"reflect.funcType","funcType","reflect",function(rtype_,dotdotdot_,in$2_,out_){this.$val=this;this.rtype=rtype_!==undefined?rtype_:new BH.ptr();this.dotdotdot=dotdotdot_!==undefined?dotdotdot_:false;this.in$2=in$2_!==undefined?in$2_:GA.nil;this.out=out_!==undefined?out_:GA.nil;});BP=$pkg.imethod=$newType(0,$kindStruct,"reflect.imethod","imethod","reflect",function(name_,pkgPath_,typ_){this.$val=this;this.name=name_!==undefined?name_:FX.nil;this.pkgPath=pkgPath_!==undefined?pkgPath_:FX.nil;this.typ=typ_!==undefined?typ_:FL.nil;});BQ=$pkg.interfaceType=$newType(0,$kindStruct,"reflect.interfaceType","interfaceType","reflect",function(rtype_,methods_){this.$val=this;this.rtype=rtype_!==undefined?rtype_:new BH.ptr();this.methods=methods_!==undefined?methods_:GB.nil;});BR=$pkg.mapType=$newType(0,$kindStruct,"reflect.mapType","mapType","reflect",function(rtype_,key_,elem_,bucket_,hmap_,keysize_,indirectkey_,valuesize_,indirectvalue_,bucketsize_){this.$val=this;this.rtype=rtype_!==undefined?rtype_:new BH.ptr();this.key=key_!==undefined?key_:FL.nil;this.elem=elem_!==undefined?elem_:FL.nil;this.bucket=bucket_!==undefined?bucket_:FL.nil;this.hmap=hmap_!==undefined?hmap_:FL.nil;this.keysize=keysize_!==undefined?keysize_:0;this.indirectkey=indirectkey_!==undefined?indirectkey_:0;this.valuesize=valuesize_!==undefined?valuesize_:0;this.indirectvalue=indirectvalue_!==undefined?indirectvalue_:0;this.bucketsize=bucketsize_!==undefined?bucketsize_:0;});BS=$pkg.ptrType=$newType(0,$kindStruct,"reflect.ptrType","ptrType","reflect",function(rtype_,elem_){this.$val=this;this.rtype=rtype_!==undefined?rtype_:new BH.ptr();this.elem=elem_!==undefined?elem_:FL.nil;});BT=$pkg.sliceType=$newType(0,$kindStruct,"reflect.sliceType","sliceType","reflect",function(rtype_,elem_){this.$val=this;this.rtype=rtype_!==undefined?rtype_:new BH.ptr();this.elem=elem_!==undefined?elem_:FL.nil;});BU=$pkg.structField=$newType(0,$kindStruct,"reflect.structField","structField","reflect",function(name_,pkgPath_,typ_,tag_,offset_){this.$val=this;this.name=name_!==undefined?name_:FX.nil;this.pkgPath=pkgPath_!==undefined?pkgPath_:FX.nil;this.typ=typ_!==undefined?typ_:FL.nil;this.tag=tag_!==undefined?tag_:FX.nil;this.offset=offset_!==undefined?offset_:0;});BV=$pkg.structType=$newType(0,$kindStruct,"reflect.structType","structType","reflect",function(rtype_,fields_){this.$val=this;this.rtype=rtype_!==undefined?rtype_:new BH.ptr();this.fields=fields_!==undefined?fields_:GC.nil;});BW=$pkg.Method=$newType(0,$kindStruct,"reflect.Method","Method","reflect",function(Name_,PkgPath_,Type_,Func_,Index_){this.$val=this;this.Name=Name_!==undefined?Name_:"";this.PkgPath=PkgPath_!==undefined?PkgPath_:"";this.Type=Type_!==undefined?Type_:$ifaceNil;this.Func=Func_!==undefined?Func_:new CZ.ptr();this.Index=Index_!==undefined?Index_:0;});BY=$pkg.StructField=$newType(0,$kindStruct,"reflect.StructField","StructField","reflect",function(Name_,PkgPath_,Type_,Tag_,Offset_,Index_,Anonymous_){this.$val=this;this.Name=Name_!==undefined?Name_:"";this.PkgPath=PkgPath_!==undefined?PkgPath_:"";this.Type=Type_!==undefined?Type_:$ifaceNil;this.Tag=Tag_!==undefined?Tag_:"";this.Offset=Offset_!==undefined?Offset_:0;this.Index=Index_!==undefined?Index_:GP.nil;this.Anonymous=Anonymous_!==undefined?Anonymous_:false;});BZ=$pkg.StructTag=$newType(8,$kindString,"reflect.StructTag","StructTag","reflect",null);CA=$pkg.fieldScan=$newType(0,$kindStruct,"reflect.fieldScan","fieldScan","reflect",function(typ_,index_){this.$val=this;this.typ=typ_!==undefined?typ_:GR.nil;this.index=index_!==undefined?index_:GP.nil;});CZ=$pkg.Value=$newType(0,$kindStruct,"reflect.Value","Value","reflect",function(typ_,ptr_,flag_){this.$val=this;this.typ=typ_!==undefined?typ_:FL.nil;this.ptr=ptr_!==undefined?ptr_:0;this.flag=flag_!==undefined?flag_:0;});DA=$pkg.flag=$newType(4,$kindUintptr,"reflect.flag","flag","reflect",null);DD=$pkg.ValueError=$newType(0,$kindStruct,"reflect.ValueError","ValueError","reflect",function(Method_,Kind_){this.$val=this;this.Method=Method_!==undefined?Method_:"";this.Kind=Kind_!==undefined?Kind_:0;});DF=$pkg.nonEmptyInterface=$newType(0,$kindStruct,"reflect.nonEmptyInterface","nonEmptyInterface","reflect",function(itab_,word_){this.$val=this;this.itab=itab_!==undefined?itab_:GI.nil;this.word=word_!==undefined?word_:0;});FL=$ptrType(BH);FU=$sliceType($String);FV=$ptrType(BI);FW=$arrayType($UnsafePointer,2);FX=$ptrType($String);FY=$ptrType(BK);FZ=$sliceType(BJ);GA=$sliceType(FL);GB=$sliceType(BP);GC=$sliceType(BU);GD=$structType([{prop:"str",name:"str",pkg:"reflect",typ:$String,tag:""}]);GE=$sliceType(CZ);GF=$ptrType(DF);GG=$arrayType($UnsafePointer,100000);GH=$structType([{prop:"ityp",name:"ityp",pkg:"reflect",typ:FL,tag:""},{prop:"typ",name:"typ",pkg:"reflect",typ:FL,tag:""},{prop:"link",name:"link",pkg:"reflect",typ:$UnsafePointer,tag:""},{prop:"bad",name:"bad",pkg:"reflect",typ:$Int32,tag:""},{prop:"unused",name:"unused",pkg:"reflect",typ:$Int32,tag:""},{prop:"fun",name:"fun",pkg:"reflect",typ:GG,tag:""}]);GI=$ptrType(GH);GJ=$sliceType(B.Object);GK=$ptrType($Uint8);GM=$ptrType(BJ);GN=$ptrType(BQ);GO=$ptrType(BP);GP=$sliceType($Int);GQ=$sliceType(CA);GR=$ptrType(BV);GW=$ptrType($UnsafePointer);GY=$sliceType($Uint8);GZ=$sliceType($Int32);HC=$funcType([$String],[$Bool],false);HD=$funcType([$UnsafePointer,$Uintptr,$Uintptr],[$Uintptr],false);HE=$funcType([$UnsafePointer,$UnsafePointer,$Uintptr],[$Bool],false);HG=$arrayType($Uintptr,2);HH=$ptrType(DD);G=function(){var ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq;ad=(function(ad){var ad;});ad((ae=new BH.ptr(0,0,0,0,0,0,FV.nil,FW.zero(),FX.nil,FY.nil,FL.nil,0),new ae.constructor.elem(ae)));ad((af=new BK.ptr(FX.nil,FX.nil,FZ.nil),new af.constructor.elem(af)));ad((ag=new BJ.ptr(FX.nil,FX.nil,FL.nil,FL.nil,0,0),new ag.constructor.elem(ag)));ad((ah=new BM.ptr(new BH.ptr(),FL.nil,FL.nil,0),new ah.constructor.elem(ah)));ad((ai=new BN.ptr(new BH.ptr(),FL.nil,0),new ai.constructor.elem(ai)));ad((aj=new BO.ptr(new BH.ptr(),false,GA.nil,GA.nil),new aj.constructor.elem(aj)));ad((ak=new BQ.ptr(new BH.ptr(),GB.nil),new ak.constructor.elem(ak)));ad((al=new BR.ptr(new BH.ptr(),FL.nil,FL.nil,FL.nil,FL.nil,0,0,0,0,0),new al.constructor.elem(al)));ad((am=new BS.ptr(new BH.ptr(),FL.nil),new am.constructor.elem(am)));ad((an=new BT.ptr(new BH.ptr(),FL.nil),new an.constructor.elem(an)));ad((ao=new BV.ptr(new BH.ptr(),GC.nil),new ao.constructor.elem(ao)));ad((ap=new BP.ptr(FX.nil,FX.nil,FL.nil),new ap.constructor.elem(ap)));ad((aq=new BU.ptr(FX.nil,FX.nil,FL.nil,FX.nil,0),new aq.constructor.elem(aq)));F=true;DM=$assertType(Q(new $Uint8(0)),FL);};H=function(ad){var ad;return ad.jsType;};I=function(ad){var ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj;if(ad.reflectType===undefined){ae=new BH.ptr((($parseInt(ad.size)>>0)>>>0),0,0,0,0,(($parseInt(ad.kind)>>0)<<24>>>24),FV.nil,FW.zero(),L(ad.string),FY.nil,FL.nil,0);ae.jsType=ad;ad.reflectType=ae;af=$methodSet(ad);if(!($internalize(ad.typeName,$String)==="")||!(($parseInt(af.length)===0))){ag=$makeSlice(FZ,$parseInt(af.length));ah=ag;ai=0;while(true){if(!(ai=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+aj]),new BJ.ptr(L(ak.name),L(ak.pkg),I(al),I($funcType(new($global.Array)(ad).concat(al.params),al.results,al.variadic)),0,0),BJ);ai++;}ae.uncommonType=new BK.ptr(L(ad.typeName),L(ad.pkg),ag);ae.uncommonType.jsType=ad;}am=ae.Kind();if(am===17){J(ae,new BM.ptr(new BH.ptr(),I(ad.elem),FL.nil,(($parseInt(ad.len)>>0)>>>0)));}else if(am===18){an=3;if(!!(ad.sendOnly)){an=2;}if(!!(ad.recvOnly)){an=1;}J(ae,new BN.ptr(new BH.ptr(),I(ad.elem),(an>>>0)));}else if(am===19){ao=ad.params;ap=$makeSlice(GA,$parseInt(ao.length));aq=ap;ar=0;while(true){if(!(ar=ap.$length)?$throwRuntimeError("index out of range"):ap.$array[ap.$offset+as]=I(ao[as]);ar++;}at=ad.results;au=$makeSlice(GA,$parseInt(at.length));av=au;aw=0;while(true){if(!(aw=au.$length)?$throwRuntimeError("index out of range"):au.$array[au.$offset+ax]=I(at[ax]);aw++;}J(ae,new BO.ptr($clone(ae,BH),!!(ad.variadic),ap,au));}else if(am===20){ay=ad.methods;az=$makeSlice(GB,$parseInt(ay.length));ba=az;bb=0;while(true){if(!(bb=az.$length)?$throwRuntimeError("index out of range"):az.$array[az.$offset+bc]),new BP.ptr(L(bd.name),L(bd.pkg),I(bd.typ)),BP);bb++;}J(ae,new BQ.ptr($clone(ae,BH),az));}else if(am===21){J(ae,new BR.ptr(new BH.ptr(),I(ad.key),I(ad.elem),FL.nil,FL.nil,0,0,0,0,0));}else if(am===22){J(ae,new BS.ptr(new BH.ptr(),I(ad.elem)));}else if(am===23){J(ae,new BT.ptr(new BH.ptr(),I(ad.elem)));}else if(am===25){be=ad.fields;bf=$makeSlice(GC,$parseInt(be.length));bg=bf;bh=0;while(true){if(!(bh=bf.$length)?$throwRuntimeError("index out of range"):bf.$array[bf.$offset+bi]),new BU.ptr(L(bj.name),L(bj.pkg),I(bj.typ),L(bj.tag),(bi>>>0)),BU);bh++;}J(ae,new BV.ptr($clone(ae,BH),bf));}}return ad.reflectType;};J=function(ad,ae){var ad,ae;ad.kindType=ae;ae.rtype=ad;};L=function(ad){var ad,ae,af,ag,ah,ai,aj,ak;ae=$clone(new GD.ptr(),GD);ae.str=ad;af=ae.str;if(af===""){return FX.nil;}ag=(ah=K[af],ah!==undefined?[ah.v,true]:[FX.nil,false]);ai=ag[0];aj=ag[1];if(!aj){ai=new FX(function(){return af;},function($v){af=$v;});ak=af;(K||$throwRuntimeError("assignment to entry in nil map"))[ak]={k:ak,v:ai};}return ai;};M=function(ad){var ad,ae;ae=ad.Kind();if(ae===1||ae===2||ae===3||ae===4||ae===5||ae===7||ae===8||ae===9||ae===10||ae===12||ae===13||ae===14||ae===17||ae===21||ae===19||ae===24||ae===25){return true;}else if(ae===22){return ad.Elem().Kind()===17;}return false;};N=function(ad,ae,af){var ad,ae,af,ag,ah,ai;ag=H(af).fields;ah=0;while(true){if(!(ah<$parseInt(ag.length))){break;}ai=$internalize(ag[ah].prop,$String);ad[$externalize(ai,$String)]=ae[$externalize(ai,$String)];ah=ah+(1)>>0;}};O=function(ad,ae,af){var ad,ae,af,ag;ag=ad.common();if((ad.Kind()===17)||(ad.Kind()===25)||(ad.Kind()===22)){return new CZ.ptr(ag,ae,(af|(ad.Kind()>>>0))>>>0);}return new CZ.ptr(ag,$newDataPointer(ae,H(ag.ptrTo())),(((af|(ad.Kind()>>>0))>>>0)|64)>>>0);};P=$pkg.MakeSlice=function(ad,ae,af){var ad,ae,af;if(!((ad.Kind()===23))){$panic(new $String("reflect.MakeSlice of non-slice type"));}if(ae<0){$panic(new $String("reflect.MakeSlice: negative len"));}if(af<0){$panic(new $String("reflect.MakeSlice: negative cap"));}if(ae>af){$panic(new $String("reflect.MakeSlice: len > cap"));}return O(ad,$makeSlice(H(ad),ae,af,(function(){return H(ad.Elem()).zero();})),0);};Q=$pkg.TypeOf=function(ad){var ad;if(!F){return new BH.ptr(0,0,0,0,0,0,FV.nil,FW.zero(),FX.nil,FY.nil,FL.nil,0);}if($interfaceIsEqual(ad,$ifaceNil)){return $ifaceNil;}return I(ad.constructor);};R=$pkg.ValueOf=function(ad){var ad;if($interfaceIsEqual(ad,$ifaceNil)){return new CZ.ptr(FL.nil,0,0);}return O(I(ad.constructor),ad.$val,0);};BH.ptr.prototype.ptrTo=function(){var ad;ad=this;return I($ptrType(H(ad)));};BH.prototype.ptrTo=function(){return this.$val.ptrTo();};V=$pkg.SliceOf=function(ad){var ad;return I($sliceType(H(ad)));};W=$pkg.Zero=function(ad){var ad;return O(ad,H(ad).zero(),0);};X=function(ad){var ad,ae;ae=ad.Kind();if(ae===25){return new(H(ad).ptr)();}else if(ae===17){return H(ad).zero();}else{return $newDataPointer(H(ad).zero(),H(ad.ptrTo()));}};Y=function(ad,ae,af){var ad,ae,af,ag,ah,ai;ag=af.common();ah=X(ag);ai=ag.Kind();if(ai===3){ah.$set((ae.$low<<24>>24));}else if(ai===4){ah.$set((ae.$low<<16>>16));}else if(ai===2||ai===5){ah.$set((ae.$low>>0));}else if(ai===6){ah.$set(new $Int64(ae.$high,ae.$low));}else if(ai===8){ah.$set((ae.$low<<24>>>24));}else if(ai===9){ah.$set((ae.$low<<16>>>16));}else if(ai===7||ai===10||ai===12){ah.$set((ae.$low>>>0));}else if(ai===11){ah.$set(ae);}return new CZ.ptr(ag,ah,(((ad|64)>>>0)|(ag.Kind()>>>0))>>>0);};AA=function(ad,ae,af){var ad,ae,af;ad.$set(ae.$get());};AE=function(ad,ae,af){var ad,ae,af,ag,ah;ag=af.$get();if(!(ag.$key===undefined)){ag=ag.$key();}ah=ae[$externalize($internalize(ag,$String),$String)];if(ah===undefined){return 0;}return $newDataPointer(ah.v,H(CC(ad.Elem())));};AF=function(ad,ae,af,ag){var ad,ae,af,ag,ah,ai,aj,ak,al,am;ah=af.$get();ai=ah;if(!(ai.$key===undefined)){ai=ai.$key();}aj=ag.$get();ak=ad.Elem();if(ak.Kind()===25){al=H(ak).zero();N(al,aj,ak);aj=al;}am=new($global.Object)();am.k=ah;am.v=aj;ae[$externalize($internalize(ai,$String),$String)]=am;};AG=function(ad,ae,af){var ad,ae,af,ag;ag=af.$get();if(!(ag.$key===undefined)){ag=ag.$key();}delete ae[$externalize($internalize(ag,$String),$String)];};AI=function(ad,ae){var ad,ae;return new AH.ptr(ad,ae,$keys(ae),0);};AJ=function(ad){var ad,ae,af;ae=ad;af=ae.keys[ae.i];return $newDataPointer(ae.m[$externalize($internalize(af,$String),$String)].k,H(CC(ae.t.Key())));};AK=function(ad){var ad,ae;ae=ad;ae.i=ae.i+(1)>>0;};AL=function(ad){var ad;return $parseInt($keys(ad).length);};AM=function(ad,ae){var ad,ae,af,ag,ah,ai,aj;ad=ad;af=ad.object();if(af===H(ad.typ).nil){return O(ae,H(ae).nil,ad.flag);}ag=null;ah=ae.Kind();ai=ah;switch(0){default:if(ai===18){ag=new(H(ae))();}else if(ai===23){aj=new(H(ae))(af.$array);aj.$offset=af.$offset;aj.$length=af.$length;aj.$capacity=af.$capacity;ag=$newDataPointer(aj,H(CC(ae)));}else if(ai===22){if(ae.Elem().Kind()===25){if($interfaceIsEqual(ae.Elem(),ad.typ.Elem())){ag=af;break;}ag=new(H(ae))();N(ag,af,ae.Elem());break;}ag=new(H(ae))(af.$get,af.$set);}else if(ai===25){ag=new(H(ae).ptr)();N(ag,af,ae);}else if(ai===17||ai===19||ai===20||ai===21||ai===24){ag=ad.ptr;}else{$panic(new DD.ptr("reflect.Convert",ah));}}return new CZ.ptr(ae.common(),ag,(((ad.flag&96)>>>0)|(ae.Kind()>>>0))>>>0);};AO=function(ad,ae,af){var ad,ae,af,ag=FL.nil,ah=FL.nil,ai=0,aj,ak,al,am,an,ao,ap,aq,ar;ae=ae;aj="";if(ae.typ.Kind()===20){ak=ae.typ.kindType;if(af<0||af>=ak.methods.$length){$panic(new $String("reflect: internal error: invalid method index"));}am=(al=ak.methods,((af<0||af>=al.$length)?$throwRuntimeError("index out of range"):al.$array[al.$offset+af]));if(!($pointerIsEqual(am.pkgPath,FX.nil))){$panic(new $String("reflect: "+ad+" of unexported method"));}an=$pointerOfStructConversion(ae.ptr,GF);if(an.itab===GI.nil){$panic(new $String("reflect: "+ad+" of method on nil interface value"));}ah=am.typ;aj=am.name.$get();}else{ao=ae.typ.uncommonType.uncommon();if(ao===FY.nil||af<0||af>=ao.methods.$length){$panic(new $String("reflect: internal error: invalid method index"));}aq=(ap=ao.methods,((af<0||af>=ap.$length)?$throwRuntimeError("index out of range"):ap.$array[ap.$offset+af]));if(!($pointerIsEqual(aq.pkgPath,FX.nil))){$panic(new $String("reflect: "+ad+" of unexported method"));}ah=aq.mtyp;aj=$internalize($methodSet(H(ae.typ))[af].prop,$String);}ar=ae.object();if(M(ae.typ)){ar=new(H(ae.typ))(ar);}ai=ar[$externalize(aj,$String)];return[ag,ah,ai];};AP=function(ad,ae){var ad,ae;ad=ad;if(ad.flag===0){$panic(new DD.ptr("reflect.Value.Interface",0));}if(ae&&!((((ad.flag&32)>>>0)===0))){$panic(new $String("reflect.Value.Interface: cannot return value obtained from unexported field or method"));}if(!((((ad.flag&256)>>>0)===0))){ad=AS("Interface",ad);}if(M(ad.typ)){return new(H(ad.typ))(ad.object());}return ad.object();};AQ=function(ad,ae,af){var ad,ae,af;af.$set(ae);};AR=function(){return"?FIXME?";};AS=function(ad,ae){var ad,ae,af,ag,ah,ai;ae=ae;if(((ae.flag&256)>>>0)===0){$panic(new $String("reflect: internal error: invalid use of makePartialFunc"));}af=AO(ad,ae,(ae.flag>>0)>>9>>0);ag=af[2];ah=ae.object();if(M(ae.typ)){ah=new(H(ae.typ))(ah);}ai=(function(){return ag.apply(ah,$externalize(new($sliceType(B.Object))($global.Array.prototype.slice.call(arguments,[])),GJ));});return new CZ.ptr(ae.Type().common(),ai,(((ae.flag&32)>>>0)|19)>>>0);};BH.ptr.prototype.pointers=function(){var ad,ae;ad=this;ae=ad.Kind();if(ae===22||ae===21||ae===18||ae===19||ae===25||ae===17){return true;}else{return false;}};BH.prototype.pointers=function(){return this.$val.pointers();};BH.ptr.prototype.Comparable=function(){var ad,ae,af;ad=this;ae=ad.Kind();if(ae===19||ae===23||ae===21){return false;}else if(ae===17){return ad.Elem().Comparable();}else if(ae===25){af=0;while(true){if(!(af>0;}}return true;};BH.prototype.Comparable=function(){return this.$val.Comparable();};BK.ptr.prototype.Method=function(ad){var ad,ae=new BW.ptr(),af,ag,ah,ai,aj,ak,al;af=this;if(af===FY.nil||ad<0||ad>=af.methods.$length){$panic(new $String("reflect: Method index out of range"));}ah=(ag=af.methods,((ad<0||ad>=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+ad]));if(!($pointerIsEqual(ah.name,FX.nil))){ae.Name=ah.name.$get();}ai=19;if(!($pointerIsEqual(ah.pkgPath,FX.nil))){ae.PkgPath=ah.pkgPath.$get();ai=(ai|(32))>>>0;}aj=ah.typ;ae.Type=aj;ak=$internalize($methodSet(af.jsType)[ad].prop,$String);al=(function(al){var al;return al[$externalize(ak,$String)].apply(al,$externalize($subslice(new($sliceType(B.Object))($global.Array.prototype.slice.call(arguments,[])),1),GJ));});ae.Func=new CZ.ptr(aj,al,ai);ae.Index=ad;return ae;};BK.prototype.Method=function(ad){return this.$val.Method(ad);};CZ.ptr.prototype.object=function(){var ad,ae,af,ag;ad=this;if((ad.typ.Kind()===17)||(ad.typ.Kind()===25)){return ad.ptr;}if(!((((ad.flag&64)>>>0)===0))){ae=ad.ptr.$get();if(!(ae===$ifaceNil)&&!(ae.constructor===H(ad.typ))){af=ad.typ.Kind();switch(0){default:if(af===11||af===6){ae=new(H(ad.typ))(ae.$high,ae.$low);}else if(af===15||af===16){ae=new(H(ad.typ))(ae.$real,ae.$imag);}else if(af===23){if(ae===ae.constructor.nil){ae=H(ad.typ).nil;break;}ag=new(H(ad.typ))(ae.$array);ag.$offset=ae.$offset;ag.$length=ae.$length;ag.$capacity=ae.$capacity;ae=ag;}}}return ae;}return ad.ptr;};CZ.prototype.object=function(){return this.$val.object();};CZ.ptr.prototype.call=function(ad,ae){var ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo;af=this;ag=af.typ;ah=0;ai=null;if(!((((af.flag&256)>>>0)===0))){aj=AO(ad,af,(af.flag>>0)>>9>>0);ag=aj[1];ah=aj[2];ai=af.object();if(M(af.typ)){ai=new(H(af.typ))(ai);}}else{ah=af.object();}if(ah===0){$panic(new $String("reflect.Value.Call: call of nil function"));}ak=ad==="CallSlice";al=ag.NumIn();if(ak){if(!ag.IsVariadic()){$panic(new $String("reflect: CallSlice of non-variadic function"));}if(ae.$lengthal){$panic(new $String("reflect: CallSlice with too many input arguments"));}}else{if(ag.IsVariadic()){al=al-(1)>>0;}if(ae.$lengthal){$panic(new $String("reflect: Call with too many input arguments"));}}am=ae;an=0;while(true){if(!(an=am.$length)?$throwRuntimeError("index out of range"):am.$array[am.$offset+an]);if(ao.Kind()===0){$panic(new $String("reflect: "+ad+" using zero Value argument"));}an++;}ap=0;while(true){if(!(ap=ae.$length)?$throwRuntimeError("index out of range"):ae.$array[ae.$offset+ap]).Type();ar=ag.In(ap);as=aq;at=ar;if(!as.AssignableTo(at)){$panic(new $String("reflect: "+ad+" using "+as.String()+" as type "+at.String()));}ap=ap+(1)>>0;}if(!ak&&ag.IsVariadic()){au=ae.$length-al>>0;av=P(ag.In(al),au,au);aw=ag.In(al).Elem();ax=0;while(true){if(!(ax>0,((ay<0||ay>=ae.$length)?$throwRuntimeError("index out of range"):ae.$array[ae.$offset+ay]));ba=az.Type();if(!ba.AssignableTo(aw)){$panic(new $String("reflect: cannot use "+ba.String()+" as type "+aw.String()+" in "+ad));}av.Index(ax).Set(az);ax=ax+(1)>>0;}bb=ae;ae=$makeSlice(GE,(al+1>>0));$copySlice($subslice(ae,0,al),bb);(al<0||al>=ae.$length)?$throwRuntimeError("index out of range"):ae.$array[ae.$offset+al]=av;}bc=ae.$length;if(!((bc===ag.NumIn()))){$panic(new $String("reflect.Value.Call: wrong argument count"));}bd=ag.NumOut();be=new($global.Array)(ag.NumIn());bf=ae;bg=0;while(true){if(!(bg=bf.$length)?$throwRuntimeError("index out of range"):bf.$array[bf.$offset+bg]);be[bh]=AW(ag.In(bh),bi.assignTo("reflect.Value.Call",ag.In(bh).common(),0).object());bg++;}bj=ah.apply(ai,be);bk=bd;if(bk===0){return GE.nil;}else if(bk===1){return new GE([$clone(O(ag.Out(0),AV(ag.Out(0),bj),0),CZ)]);}else{bl=$makeSlice(GE,bd);bm=bl;bn=0;while(true){if(!(bn=bl.$length)?$throwRuntimeError("index out of range"):bl.$array[bl.$offset+bo]=O(ag.Out(bo),AV(ag.Out(bo),bj[bo]),0);bn++;}return bl;}};CZ.prototype.call=function(ad,ae){return this.$val.call(ad,ae);};CZ.ptr.prototype.Cap=function(){var ad,ae,af;ad=this;ae=new DA(ad.flag).kind();af=ae;if(af===17){return ad.typ.Len();}else if(af===18||af===23){return $parseInt(ad.object().$capacity)>>0;}$panic(new DD.ptr("reflect.Value.Cap",ae));};CZ.prototype.Cap=function(){return this.$val.Cap();};AV=function(ad,ae){var ad,ae;if($interfaceIsEqual(ad,I(AT))){return new(AU)(ae);}return ae;};AW=function(ad,ae){var ad,ae;if($interfaceIsEqual(ad,I(AT))){return ae.Object;}return ae;};CZ.ptr.prototype.Elem=function(){var ad,ae,af,ag,ah,ai,aj,ak;ad=this;ae=new DA(ad.flag).kind();af=ae;if(af===20){ag=ad.object();if(ag===$ifaceNil){return new CZ.ptr(FL.nil,0,0);}ah=I(ag.constructor);return O(ah,ag.$val,(ad.flag&32)>>>0);}else if(af===22){if(ad.IsNil()){return new CZ.ptr(FL.nil,0,0);}ai=ad.object();aj=ad.typ.kindType;ak=(((((ad.flag&32)>>>0)|64)>>>0)|128)>>>0;ak=(ak|((aj.elem.Kind()>>>0)))>>>0;return new CZ.ptr(aj.elem,AV(aj.elem,ai),ak);}else{$panic(new DD.ptr("reflect.Value.Elem",ae));}};CZ.prototype.Elem=function(){return this.$val.Elem();};CZ.ptr.prototype.Field=function(ad){var ad,ae,af,ag,ah,ai,aj,ak,al;ae=this;new DA(ae.flag).mustBe(25);af=ae.typ.kindType;if(ad<0||ad>=af.fields.$length){$panic(new $String("reflect: Field index out of range"));}ah=(ag=af.fields,((ad<0||ad>=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+ad]));ai=$internalize(H(ae.typ).fields[ad].prop,$String);aj=ah.typ;ak=(ae.flag&224)>>>0;if(!($pointerIsEqual(ah.pkgPath,FX.nil))){ak=(ak|(32))>>>0;}ak=(ak|((aj.Kind()>>>0)))>>>0;al=ae.ptr;if(!((((ak&64)>>>0)===0))&&!((aj.Kind()===17))&&!((aj.Kind()===25))){return new CZ.ptr(aj,new(H(CC(aj)))((function(){return AV(aj,al[$externalize(ai,$String)]);}),(function(am){var am;al[$externalize(ai,$String)]=AW(aj,am);})),ak);}return O(aj,AV(aj,al[$externalize(ai,$String)]),ak);};CZ.prototype.Field=function(ad){return this.$val.Field(ad);};CZ.ptr.prototype.Index=function(ad){var ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as;ae=this;af=new DA(ae.flag).kind();ag=af;if(ag===17){ah=ae.typ.kindType;if(ad<0||ad>(ah.len>>0)){$panic(new $String("reflect: array index out of range"));}ai=ah.elem;aj=(ae.flag&224)>>>0;aj=(aj|((ai.Kind()>>>0)))>>>0;ak=ae.ptr;if(!((((aj&64)>>>0)===0))&&!((ai.Kind()===17))&&!((ai.Kind()===25))){return new CZ.ptr(ai,new(H(CC(ai)))((function(){return AV(ai,ak[ad]);}),(function(al){var al;ak[ad]=AW(ai,al);})),aj);}return O(ai,AV(ai,ak[ad]),aj);}else if(ag===23){al=ae.object();if(ad<0||ad>=($parseInt(al.$length)>>0)){$panic(new $String("reflect: slice index out of range"));}am=ae.typ.kindType;an=am.elem;ao=(192|((ae.flag&32)>>>0))>>>0;ao=(ao|((an.Kind()>>>0)))>>>0;ad=ad+(($parseInt(al.$offset)>>0))>>0;ap=al.$array;if(!((((ao&64)>>>0)===0))&&!((an.Kind()===17))&&!((an.Kind()===25))){return new CZ.ptr(an,new(H(CC(an)))((function(){return AV(an,ap[ad]);}),(function(aq){var aq;ap[ad]=AW(an,aq);})),ao);}return O(an,AV(an,ap[ad]),ao);}else if(ag===24){aq=ae.ptr.$get();if(ad<0||ad>=aq.length){$panic(new $String("reflect: string index out of range"));}ar=(((ae.flag&32)>>>0)|8)>>>0;as=aq.charCodeAt(ad);return new CZ.ptr(DM,new GK(function(){return as;},function($v){as=$v;}),(ar|64)>>>0);}else{$panic(new DD.ptr("reflect.Value.Index",af));}};CZ.prototype.Index=function(ad){return this.$val.Index(ad);};CZ.ptr.prototype.IsNil=function(){var ad,ae,af;ad=this;ae=new DA(ad.flag).kind();af=ae;if(af===18||af===22||af===23){return ad.object()===H(ad.typ).nil;}else if(af===19){return ad.object()===$throwNilPointerError;}else if(af===21){return ad.object()===false;}else if(af===20){return ad.object()===$ifaceNil;}else{$panic(new DD.ptr("reflect.Value.IsNil",ae));}};CZ.prototype.IsNil=function(){return this.$val.IsNil();};CZ.ptr.prototype.Len=function(){var ad,ae,af;ad=this;ae=new DA(ad.flag).kind();af=ae;if(af===17||af===24){return $parseInt(ad.object().length);}else if(af===23){return $parseInt(ad.object().$length)>>0;}else if(af===18){return $parseInt(ad.object().$buffer.length)>>0;}else if(af===21){return $parseInt($keys(ad.object()).length);}else{$panic(new DD.ptr("reflect.Value.Len",ae));}};CZ.prototype.Len=function(){return this.$val.Len();};CZ.ptr.prototype.Pointer=function(){var ad,ae,af;ad=this;ae=new DA(ad.flag).kind();af=ae;if(af===18||af===21||af===22||af===26){if(ad.IsNil()){return 0;}return ad.object();}else if(af===19){if(ad.IsNil()){return 0;}return 1;}else if(af===23){if(ad.IsNil()){return 0;}return ad.object().$array;}else{$panic(new DD.ptr("reflect.Value.Pointer",ae));}};CZ.prototype.Pointer=function(){return this.$val.Pointer();};CZ.ptr.prototype.Set=function(ad){var ad,ae,af;ae=this;ad=ad;new DA(ae.flag).mustBeAssignable();new DA(ad.flag).mustBeExported();ad=ad.assignTo("reflect.Set",ae.typ,0);if(!((((ae.flag&64)>>>0)===0))){af=ae.typ.Kind();if(af===17){$copy(ae.ptr,ad.ptr,H(ae.typ));}else if(af===20){ae.ptr.$set(AP(ad,false));}else if(af===25){N(ae.ptr,ad.ptr,ae.typ);}else{ae.ptr.$set(ad.object());}return;}ae.ptr=ad.ptr;};CZ.prototype.Set=function(ad){return this.$val.Set(ad);};CZ.ptr.prototype.SetCap=function(ad){var ad,ae,af,ag;ae=this;new DA(ae.flag).mustBeAssignable();new DA(ae.flag).mustBe(23);af=ae.ptr.$get();if(ad<($parseInt(af.$length)>>0)||ad>($parseInt(af.$capacity)>>0)){$panic(new $String("reflect: slice capacity out of range in SetCap"));}ag=new(H(ae.typ))(af.$array);ag.$offset=af.$offset;ag.$length=af.$length;ag.$capacity=ad;ae.ptr.$set(ag);};CZ.prototype.SetCap=function(ad){return this.$val.SetCap(ad);};CZ.ptr.prototype.SetLen=function(ad){var ad,ae,af,ag;ae=this;new DA(ae.flag).mustBeAssignable();new DA(ae.flag).mustBe(23);af=ae.ptr.$get();if(ad<0||ad>($parseInt(af.$capacity)>>0)){$panic(new $String("reflect: slice length out of range in SetLen"));}ag=new(H(ae.typ))(af.$array);ag.$offset=af.$offset;ag.$length=ad;ag.$capacity=af.$capacity;ae.ptr.$set(ag);};CZ.prototype.SetLen=function(ad){return this.$val.SetLen(ad);};CZ.ptr.prototype.Slice=function(ad,ae){var ad,ae,af,ag,ah,ai,aj,ak,al,am;af=this;ag=0;ah=$ifaceNil;ai=null;aj=new DA(af.flag).kind();ak=aj;if(ak===17){if(((af.flag&128)>>>0)===0){$panic(new $String("reflect.Value.Slice: slice of unaddressable array"));}al=af.typ.kindType;ag=(al.len>>0);ah=V(al.elem);ai=new(H(ah))(af.object());}else if(ak===23){ah=af.typ;ai=af.object();ag=$parseInt(ai.$capacity)>>0;}else if(ak===24){am=af.ptr.$get();if(ad<0||aeam.length){$panic(new $String("reflect.Value.Slice: string slice index out of bounds"));}return R(new $String(am.substring(ad,ae)));}else{$panic(new DD.ptr("reflect.Value.Slice",aj));}if(ad<0||aeag){$panic(new $String("reflect.Value.Slice: slice index out of bounds"));}return O(ah,$subslice(ai,ad,ae),(af.flag&32)>>>0);};CZ.prototype.Slice=function(ad,ae){return this.$val.Slice(ad,ae);};CZ.ptr.prototype.Slice3=function(ad,ae,af){var ad,ae,af,ag,ah,ai,aj,ak,al,am;ag=this;ah=0;ai=$ifaceNil;aj=null;ak=new DA(ag.flag).kind();al=ak;if(al===17){if(((ag.flag&128)>>>0)===0){$panic(new $String("reflect.Value.Slice: slice of unaddressable array"));}am=ag.typ.kindType;ah=(am.len>>0);ai=V(am.elem);aj=new(H(ai))(ag.object());}else if(al===23){ai=ag.typ;aj=ag.object();ah=$parseInt(aj.$capacity)>>0;}else{$panic(new DD.ptr("reflect.Value.Slice3",ak));}if(ad<0||aeah){$panic(new $String("reflect.Value.Slice3: slice index out of bounds"));}return O(ai,$subslice(aj,ad,ae,af),(ag.flag&32)>>>0);};CZ.prototype.Slice3=function(ad,ae,af){return this.$val.Slice3(ad,ae,af);};CZ.ptr.prototype.Close=function(){var ad;ad=this;new DA(ad.flag).mustBe(18);new DA(ad.flag).mustBeExported();$close(ad.object());};CZ.prototype.Close=function(){return this.$val.Close();};CZ.ptr.prototype.TrySend=function(ad){var ad,ae,af,ag;ae=this;ad=ad;new DA(ae.flag).mustBe(18);new DA(ae.flag).mustBeExported();af=ae.typ.kindType;if(((af.dir>>0)&2)===0){$panic(new $String("reflect: send on recv-only channel"));}new DA(ad.flag).mustBeExported();ag=ae.object();if(!!!(ag.$closed)&&($parseInt(ag.$recvQueue.length)===0)&&($parseInt(ag.$buffer.length)===($parseInt(ag.$capacity)>>0))){return false;}ad=ad.assignTo("reflect.Value.Send",af.elem,0);$send(ag,ad.object());return true;};CZ.prototype.TrySend=function(ad){return this.$val.TrySend(ad);};CZ.ptr.prototype.Send=function(ad){var ad,ae;ae=this;ad=ad;$panic(new A.NotSupportedError.ptr("reflect.Value.Send, use reflect.Value.TrySend if possible"));};CZ.prototype.Send=function(ad){return this.$val.Send(ad);};CZ.ptr.prototype.TryRecv=function(){var ad=new CZ.ptr(),ae=false,af,ag,ah,ai,aj,ak,al;af=this;new DA(af.flag).mustBe(18);new DA(af.flag).mustBeExported();ag=af.typ.kindType;if(((ag.dir>>0)&1)===0){$panic(new $String("reflect: recv on send-only channel"));}ah=$recv(af.object());if(ah.constructor===$global.Function){ai=new CZ.ptr(FL.nil,0,0);aj=false;ad=ai;ae=aj;return[ad,ae];}ak=O(ag.elem,ah[0],0);al=!!(ah[1]);ad=ak;ae=al;return[ad,ae];};CZ.prototype.TryRecv=function(){return this.$val.TryRecv();};CZ.ptr.prototype.Recv=function(){var ad=new CZ.ptr(),ae=false,af;af=this;$panic(new A.NotSupportedError.ptr("reflect.Value.Recv, use reflect.Value.TryRecv if possible"));};CZ.prototype.Recv=function(){return this.$val.Recv();};BG.prototype.String=function(){var ad;ad=this.$val;if((ad>>0)=BX.$length)?$throwRuntimeError("index out of range"):BX.$array[BX.$offset+ad]);}return"kind"+C.Itoa((ad>>0));};$ptrType(BG).prototype.String=function(){return new BG(this.$get()).String();};BK.ptr.prototype.uncommon=function(){var ad;ad=this;return ad;};BK.prototype.uncommon=function(){return this.$val.uncommon();};BK.ptr.prototype.PkgPath=function(){var ad;ad=this;if(ad===FY.nil||$pointerIsEqual(ad.pkgPath,FX.nil)){return"";}return ad.pkgPath.$get();};BK.prototype.PkgPath=function(){return this.$val.PkgPath();};BK.ptr.prototype.Name=function(){var ad;ad=this;if(ad===FY.nil||$pointerIsEqual(ad.name,FX.nil)){return"";}return ad.name.$get();};BK.prototype.Name=function(){return this.$val.Name();};BH.ptr.prototype.String=function(){var ad;ad=this;return ad.string.$get();};BH.prototype.String=function(){return this.$val.String();};BH.ptr.prototype.Size=function(){var ad;ad=this;return ad.size;};BH.prototype.Size=function(){return this.$val.Size();};BH.ptr.prototype.Bits=function(){var ad,ae;ad=this;if(ad===FL.nil){$panic(new $String("reflect: Bits of nil Type"));}ae=ad.Kind();if(ae<2||ae>16){$panic(new $String("reflect: Bits of non-arithmetic Type "+ad.String()));}return(ad.size>>0)*8>>0;};BH.prototype.Bits=function(){return this.$val.Bits();};BH.ptr.prototype.Align=function(){var ad;ad=this;return(ad.align>>0);};BH.prototype.Align=function(){return this.$val.Align();};BH.ptr.prototype.FieldAlign=function(){var ad;ad=this;return(ad.fieldAlign>>0);};BH.prototype.FieldAlign=function(){return this.$val.FieldAlign();};BH.ptr.prototype.Kind=function(){var ad;ad=this;return(((ad.kind&31)>>>0)>>>0);};BH.prototype.Kind=function(){return this.$val.Kind();};BH.ptr.prototype.common=function(){var ad;ad=this;return ad;};BH.prototype.common=function(){return this.$val.common();};BK.ptr.prototype.NumMethod=function(){var ad;ad=this;if(ad===FY.nil){return 0;}return ad.methods.$length;};BK.prototype.NumMethod=function(){return this.$val.NumMethod();};BK.ptr.prototype.MethodByName=function(ad){var ad,ae=new BW.ptr(),af=false,ag,ah,ai,aj,ak,al,am,an;ag=this;if(ag===FY.nil){return[ae,af];}ah=GM.nil;ai=ag.methods;aj=0;while(true){if(!(aj=al.$length)?$throwRuntimeError("index out of range"):al.$array[al.$offset+ak]));if(!($pointerIsEqual(ah.name,FX.nil))&&ah.name.$get()===ad){am=$clone(ag.Method(ak),BW);an=true;$copy(ae,am,BW);af=an;return[ae,af];}aj++;}return[ae,af];};BK.prototype.MethodByName=function(ad){return this.$val.MethodByName(ad);};BH.ptr.prototype.NumMethod=function(){var ad,ae;ad=this;if(ad.Kind()===20){ae=ad.kindType;return ae.NumMethod();}return ad.uncommonType.NumMethod();};BH.prototype.NumMethod=function(){return this.$val.NumMethod();};BH.ptr.prototype.Method=function(ad){var ad,ae=new BW.ptr(),af,ag;af=this;if(af.Kind()===20){ag=af.kindType;$copy(ae,ag.Method(ad),BW);return ae;}$copy(ae,af.uncommonType.Method(ad),BW);return ae;};BH.prototype.Method=function(ad){return this.$val.Method(ad);};BH.ptr.prototype.MethodByName=function(ad){var ad,ae=new BW.ptr(),af=false,ag,ah,ai,aj;ag=this;if(ag.Kind()===20){ah=ag.kindType;ai=ah.MethodByName(ad);$copy(ae,ai[0],BW);af=ai[1];return[ae,af];}aj=ag.uncommonType.MethodByName(ad);$copy(ae,aj[0],BW);af=aj[1];return[ae,af];};BH.prototype.MethodByName=function(ad){return this.$val.MethodByName(ad);};BH.ptr.prototype.PkgPath=function(){var ad;ad=this;return ad.uncommonType.PkgPath();};BH.prototype.PkgPath=function(){return this.$val.PkgPath();};BH.ptr.prototype.Name=function(){var ad;ad=this;return ad.uncommonType.Name();};BH.prototype.Name=function(){return this.$val.Name();};BH.ptr.prototype.ChanDir=function(){var ad,ae;ad=this;if(!((ad.Kind()===18))){$panic(new $String("reflect: ChanDir of non-chan type"));}ae=ad.kindType;return(ae.dir>>0);};BH.prototype.ChanDir=function(){return this.$val.ChanDir();};BH.ptr.prototype.IsVariadic=function(){var ad,ae;ad=this;if(!((ad.Kind()===19))){$panic(new $String("reflect: IsVariadic of non-func type"));}ae=ad.kindType;return ae.dotdotdot;};BH.prototype.IsVariadic=function(){return this.$val.IsVariadic();};BH.ptr.prototype.Elem=function(){var ad,ae,af,ag,ah,ai,aj;ad=this;ae=ad.Kind();if(ae===17){af=ad.kindType;return CR(af.elem);}else if(ae===18){ag=ad.kindType;return CR(ag.elem);}else if(ae===21){ah=ad.kindType;return CR(ah.elem);}else if(ae===22){ai=ad.kindType;return CR(ai.elem);}else if(ae===23){aj=ad.kindType;return CR(aj.elem);}$panic(new $String("reflect: Elem of invalid type"));};BH.prototype.Elem=function(){return this.$val.Elem();};BH.ptr.prototype.Field=function(ad){var ad,ae,af;ae=this;if(!((ae.Kind()===25))){$panic(new $String("reflect: Field of non-struct type"));}af=ae.kindType;return af.Field(ad);};BH.prototype.Field=function(ad){return this.$val.Field(ad);};BH.ptr.prototype.FieldByIndex=function(ad){var ad,ae,af;ae=this;if(!((ae.Kind()===25))){$panic(new $String("reflect: FieldByIndex of non-struct type"));}af=ae.kindType;return af.FieldByIndex(ad);};BH.prototype.FieldByIndex=function(ad){return this.$val.FieldByIndex(ad);};BH.ptr.prototype.FieldByName=function(ad){var ad,ae,af;ae=this;if(!((ae.Kind()===25))){$panic(new $String("reflect: FieldByName of non-struct type"));}af=ae.kindType;return af.FieldByName(ad);};BH.prototype.FieldByName=function(ad){return this.$val.FieldByName(ad);};BH.ptr.prototype.FieldByNameFunc=function(ad){var ad,ae,af;ae=this;if(!((ae.Kind()===25))){$panic(new $String("reflect: FieldByNameFunc of non-struct type"));}af=ae.kindType;return af.FieldByNameFunc(ad);};BH.prototype.FieldByNameFunc=function(ad){return this.$val.FieldByNameFunc(ad);};BH.ptr.prototype.In=function(ad){var ad,ae,af,ag;ae=this;if(!((ae.Kind()===19))){$panic(new $String("reflect: In of non-func type"));}af=ae.kindType;return CR((ag=af.in$2,((ad<0||ad>=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+ad])));};BH.prototype.In=function(ad){return this.$val.In(ad);};BH.ptr.prototype.Key=function(){var ad,ae;ad=this;if(!((ad.Kind()===21))){$panic(new $String("reflect: Key of non-map type"));}ae=ad.kindType;return CR(ae.key);};BH.prototype.Key=function(){return this.$val.Key();};BH.ptr.prototype.Len=function(){var ad,ae;ad=this;if(!((ad.Kind()===17))){$panic(new $String("reflect: Len of non-array type"));}ae=ad.kindType;return(ae.len>>0);};BH.prototype.Len=function(){return this.$val.Len();};BH.ptr.prototype.NumField=function(){var ad,ae;ad=this;if(!((ad.Kind()===25))){$panic(new $String("reflect: NumField of non-struct type"));}ae=ad.kindType;return ae.fields.$length;};BH.prototype.NumField=function(){return this.$val.NumField();};BH.ptr.prototype.NumIn=function(){var ad,ae;ad=this;if(!((ad.Kind()===19))){$panic(new $String("reflect: NumIn of non-func type"));}ae=ad.kindType;return ae.in$2.$length;};BH.prototype.NumIn=function(){return this.$val.NumIn();};BH.ptr.prototype.NumOut=function(){var ad,ae;ad=this;if(!((ad.Kind()===19))){$panic(new $String("reflect: NumOut of non-func type"));}ae=ad.kindType;return ae.out.$length;};BH.prototype.NumOut=function(){return this.$val.NumOut();};BH.ptr.prototype.Out=function(ad){var ad,ae,af,ag;ae=this;if(!((ae.Kind()===19))){$panic(new $String("reflect: Out of non-func type"));}af=ae.kindType;return CR((ag=af.out,((ad<0||ad>=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+ad])));};BH.prototype.Out=function(ad){return this.$val.Out(ad);};BL.prototype.String=function(){var ad,ae;ad=this.$val;ae=ad;if(ae===2){return"chan<-";}else if(ae===1){return"<-chan";}else if(ae===3){return"chan";}return"ChanDir"+C.Itoa((ad>>0));};$ptrType(BL).prototype.String=function(){return new BL(this.$get()).String();};BQ.ptr.prototype.Method=function(ad){var ad,ae=new BW.ptr(),af,ag,ah;af=this;if(ad<0||ad>=af.methods.$length){return ae;}ah=(ag=af.methods,((ad<0||ad>=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+ad]));ae.Name=ah.name.$get();if(!($pointerIsEqual(ah.pkgPath,FX.nil))){ae.PkgPath=ah.pkgPath.$get();}ae.Type=CR(ah.typ);ae.Index=ad;return ae;};BQ.prototype.Method=function(ad){return this.$val.Method(ad);};BQ.ptr.prototype.NumMethod=function(){var ad;ad=this;return ad.methods.$length;};BQ.prototype.NumMethod=function(){return this.$val.NumMethod();};BQ.ptr.prototype.MethodByName=function(ad){var ad,ae=new BW.ptr(),af=false,ag,ah,ai,aj,ak,al,am,an;ag=this;if(ag===GN.nil){return[ae,af];}ah=GO.nil;ai=ag.methods;aj=0;while(true){if(!(aj=al.$length)?$throwRuntimeError("index out of range"):al.$array[al.$offset+ak]));if(ah.name.$get()===ad){am=$clone(ag.Method(ak),BW);an=true;$copy(ae,am,BW);af=an;return[ae,af];}aj++;}return[ae,af];};BQ.prototype.MethodByName=function(ad){return this.$val.MethodByName(ad);};BZ.prototype.Get=function(ad){var ad,ae,af,ag,ah,ai,aj;ae=this.$val;while(true){if(!(!(ae===""))){break;}af=0;while(true){if(!(af>0;}ae=ae.substring(af);if(ae===""){break;}af=0;while(true){if(!(af>0;}if((af+1>>0)>=ae.length||!((ae.charCodeAt(af)===58))||!((ae.charCodeAt((af+1>>0))===34))){break;}ag=ae.substring(0,af);ae=ae.substring((af+1>>0));af=1;while(true){if(!(af>0;}af=af+(1)>>0;}if(af>=ae.length){break;}ah=ae.substring(0,(af+1>>0));ae=ae.substring((af+1>>0));if(ad===ag){ai=C.Unquote(ah);aj=ai[0];return aj;}}return"";};$ptrType(BZ).prototype.Get=function(ad){return new BZ(this.$get()).Get(ad);};BV.ptr.prototype.Field=function(ad){var ad,ae=new BY.ptr(),af,ag,ah,ai;af=this;if(ad<0||ad>=af.fields.$length){return ae;}ah=(ag=af.fields,((ad<0||ad>=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+ad]));ae.Type=CR(ah.typ);if(!($pointerIsEqual(ah.name,FX.nil))){ae.Name=ah.name.$get();}else{ai=ae.Type;if(ai.Kind()===22){ai=ai.Elem();}ae.Name=ai.Name();ae.Anonymous=true;}if(!($pointerIsEqual(ah.pkgPath,FX.nil))){ae.PkgPath=ah.pkgPath.$get();}if(!($pointerIsEqual(ah.tag,FX.nil))){ae.Tag=ah.tag.$get();}ae.Offset=ah.offset;ae.Index=new GP([ad]);return ae;};BV.prototype.Field=function(ad){return this.$val.Field(ad);};BV.ptr.prototype.FieldByIndex=function(ad){var ad,ae=new BY.ptr(),af,ag,ah,ai,aj,ak;af=this;ae.Type=CR(af.rtype);ag=ad;ah=0;while(true){if(!(ah=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+ah]);if(ai>0){ak=ae.Type;if((ak.Kind()===22)&&(ak.Elem().Kind()===25)){ak=ak.Elem();}ae.Type=ak;}$copy(ae,ae.Type.Field(aj),BY);ah++;}return ae;};BV.prototype.FieldByIndex=function(ad){return this.$val.FieldByIndex(ad);};BV.ptr.prototype.FieldByNameFunc=function(ad){var ad,ae=new BY.ptr(),af=false,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo;ag=this;ah=new GQ([]);ai=new GQ([new CA.ptr(ag,GP.nil)]);aj=false;ak=(al=new $Map(),al);while(true){if(!(ai.$length>0)){break;}an=ai;ao=$subslice(ah,0,0);ah=an;ai=ao;ap=aj;aj=false;aq=ah;ar=0;while(true){if(!(ar=aq.$length)?$throwRuntimeError("index out of range"):aq.$array[aq.$offset+ar]),CA);at=as.typ;if((au=ak[at.$key()],au!==undefined?au.v:false)){ar++;continue;}av=at;(ak||$throwRuntimeError("assignment to entry in nil map"))[av.$key()]={k:av,v:true};aw=at.fields;ax=0;while(true){if(!(ax=az.$length)?$throwRuntimeError("index out of range"):az.$array[az.$offset+ay]));bb="";bc=FL.nil;if(!($pointerIsEqual(ba.name,FX.nil))){bb=ba.name.$get();}else{bc=ba.typ;if(bc.Kind()===22){bc=bc.Elem().common();}bb=bc.Name();}if(ad(bb)){if((bd=ap[at.$key()],bd!==undefined?bd.v:0)>1||af){be=new BY.ptr("","",$ifaceNil,"",0,GP.nil,false);bf=false;$copy(ae,be,BY);af=bf;return[ae,af];}$copy(ae,at.Field(ay),BY);ae.Index=GP.nil;ae.Index=$appendSlice(ae.Index,as.index);ae.Index=$append(ae.Index,ay);af=true;ax++;continue;}if(af||bc===FL.nil||!((bc.Kind()===25))){ax++;continue;}bg=bc.kindType;if((bh=aj[bg.$key()],bh!==undefined?bh.v:0)>0){bi=bg;(aj||$throwRuntimeError("assignment to entry in nil map"))[bi.$key()]={k:bi,v:2};ax++;continue;}if(aj===false){aj=(bj=new $Map(),bj);}bl=bg;(aj||$throwRuntimeError("assignment to entry in nil map"))[bl.$key()]={k:bl,v:1};if((bm=ap[at.$key()],bm!==undefined?bm.v:0)>1){bn=bg;(aj||$throwRuntimeError("assignment to entry in nil map"))[bn.$key()]={k:bn,v:2};}bo=GP.nil;bo=$appendSlice(bo,as.index);bo=$append(bo,ay);ai=$append(ai,new CA.ptr(bg,bo));ax++;}ar++;}if(af){break;}}return[ae,af];};BV.prototype.FieldByNameFunc=function(ad){return this.$val.FieldByNameFunc(ad);};BV.ptr.prototype.FieldByName=function(ad){var ad,ae=new BY.ptr(),af=false,ag,ah,ai,aj,ak,al,am,an,ao,ap;ag=this;ah=false;if(!(ad==="")){ai=ag.fields;aj=0;while(true){if(!(aj=al.$length)?$throwRuntimeError("index out of range"):al.$array[al.$offset+ak]));if($pointerIsEqual(am.name,FX.nil)){ah=true;aj++;continue;}if(am.name.$get()===ad){an=$clone(ag.Field(ak),BY);ao=true;$copy(ae,an,BY);af=ao;return[ae,af];}aj++;}}if(!ah){return[ae,af];}ap=ag.FieldByNameFunc((function(aq){var aq;return aq===ad;}));$copy(ae,ap[0],BY);af=ap[1];return[ae,af];};BV.prototype.FieldByName=function(ad){return this.$val.FieldByName(ad);};CC=$pkg.PtrTo=function(ad){var ad;return $assertType(ad,FL).ptrTo();};BH.ptr.prototype.Implements=function(ad){var ad,ae;ae=this;if($interfaceIsEqual(ad,$ifaceNil)){$panic(new $String("reflect: nil type passed to Type.Implements"));}if(!((ad.Kind()===20))){$panic(new $String("reflect: non-interface type passed to Type.Implements"));}return CE($assertType(ad,FL),ae);};BH.prototype.Implements=function(ad){return this.$val.Implements(ad);};BH.ptr.prototype.AssignableTo=function(ad){var ad,ae,af;ae=this;if($interfaceIsEqual(ad,$ifaceNil)){$panic(new $String("reflect: nil type passed to Type.AssignableTo"));}af=$assertType(ad,FL);return CF(af,ae)||CE(af,ae);};BH.prototype.AssignableTo=function(ad){return this.$val.AssignableTo(ad);};BH.ptr.prototype.ConvertibleTo=function(ad){var ad,ae,af;ae=this;if($interfaceIsEqual(ad,$ifaceNil)){$panic(new $String("reflect: nil type passed to Type.ConvertibleTo"));}af=$assertType(ad,FL);return!(EH(af,ae)===$throwNilPointerError);};BH.prototype.ConvertibleTo=function(ad){return this.$val.ConvertibleTo(ad);};CE=function(ad,ae){var ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at;if(!((ad.Kind()===20))){return false;}af=ad.kindType;if(af.methods.$length===0){return true;}if(ae.Kind()===20){ag=ae.kindType;ah=0;ai=0;while(true){if(!(ai=aj.$length)?$throwRuntimeError("index out of range"):aj.$array[aj.$offset+ah]));am=(al=ag.methods,((ai<0||ai>=al.$length)?$throwRuntimeError("index out of range"):al.$array[al.$offset+ai]));if($pointerIsEqual(am.name,ak.name)&&$pointerIsEqual(am.pkgPath,ak.pkgPath)&&am.typ===ak.typ){ah=ah+(1)>>0;if(ah>=af.methods.$length){return true;}}ai=ai+(1)>>0;}return false;}an=ae.uncommonType.uncommon();if(an===FY.nil){return false;}ao=0;ap=0;while(true){if(!(ap=aq.$length)?$throwRuntimeError("index out of range"):aq.$array[aq.$offset+ao]));at=(as=an.methods,((ap<0||ap>=as.$length)?$throwRuntimeError("index out of range"):as.$array[as.$offset+ap]));if($pointerIsEqual(at.name,ar.name)&&$pointerIsEqual(at.pkgPath,ar.pkgPath)&&at.mtyp===ar.typ){ao=ao+(1)>>0;if(ao>=af.methods.$length){return true;}}ap=ap+(1)>>0;}return false;};CF=function(ad,ae){var ad,ae;if(ad===ae){return true;}if(!(ad.Name()==="")&&!(ae.Name()==="")||!((ad.Kind()===ae.Kind()))){return false;}return CG(ad,ae);};CG=function(ad,ae){var ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd;if(ad===ae){return true;}af=ad.Kind();if(!((af===ae.Kind()))){return false;}if(1<=af&&af<=16||(af===24)||(af===26)){return true;}ag=af;if(ag===17){return $interfaceIsEqual(ad.Elem(),ae.Elem())&&(ad.Len()===ae.Len());}else if(ag===18){if((ae.ChanDir()===3)&&$interfaceIsEqual(ad.Elem(),ae.Elem())){return true;}return(ae.ChanDir()===ad.ChanDir())&&$interfaceIsEqual(ad.Elem(),ae.Elem());}else if(ag===19){ah=ad.kindType;ai=ae.kindType;if(!(ah.dotdotdot===ai.dotdotdot)||!((ah.in$2.$length===ai.in$2.$length))||!((ah.out.$length===ai.out.$length))){return false;}aj=ah.in$2;ak=0;while(true){if(!(ak=aj.$length)?$throwRuntimeError("index out of range"):aj.$array[aj.$offset+ak]);if(!(am===(an=ai.in$2,((al<0||al>=an.$length)?$throwRuntimeError("index out of range"):an.$array[an.$offset+al])))){return false;}ak++;}ao=ah.out;ap=0;while(true){if(!(ap=ao.$length)?$throwRuntimeError("index out of range"):ao.$array[ao.$offset+ap]);if(!(ar===(as=ai.out,((aq<0||aq>=as.$length)?$throwRuntimeError("index out of range"):as.$array[as.$offset+aq])))){return false;}ap++;}return true;}else if(ag===20){at=ad.kindType;au=ae.kindType;if((at.methods.$length===0)&&(au.methods.$length===0)){return true;}return false;}else if(ag===21){return $interfaceIsEqual(ad.Key(),ae.Key())&&$interfaceIsEqual(ad.Elem(),ae.Elem());}else if(ag===22||ag===23){return $interfaceIsEqual(ad.Elem(),ae.Elem());}else if(ag===25){av=ad.kindType;aw=ae.kindType;if(!((av.fields.$length===aw.fields.$length))){return false;}ax=av.fields;ay=0;while(true){if(!(ay=ba.$length)?$throwRuntimeError("index out of range"):ba.$array[ba.$offset+az]));bd=(bc=aw.fields,((az<0||az>=bc.$length)?$throwRuntimeError("index out of range"):bc.$array[bc.$offset+az]));if(!($pointerIsEqual(bb.name,bd.name))&&($pointerIsEqual(bb.name,FX.nil)||$pointerIsEqual(bd.name,FX.nil)||!(bb.name.$get()===bd.name.$get()))){return false;}if(!($pointerIsEqual(bb.pkgPath,bd.pkgPath))&&($pointerIsEqual(bb.pkgPath,FX.nil)||$pointerIsEqual(bd.pkgPath,FX.nil)||!(bb.pkgPath.$get()===bd.pkgPath.$get()))){return false;}if(!(bb.typ===bd.typ)){return false;}if(!($pointerIsEqual(bb.tag,bd.tag))&&($pointerIsEqual(bb.tag,FX.nil)||$pointerIsEqual(bd.tag,FX.nil)||!(bb.tag.$get()===bd.tag.$get()))){return false;}if(!((bb.offset===bd.offset))){return false;}ay++;}return true;}return false;};CR=function(ad){var ad;if(ad===FL.nil){return $ifaceNil;}return ad;};CW=function(ad){var ad;return((ad.kind&32)>>>0)===0;};DA.prototype.kind=function(){var ad;ad=this.$val;return(((ad&31)>>>0)>>>0);};$ptrType(DA).prototype.kind=function(){return new DA(this.$get()).kind();};CZ.ptr.prototype.pointer=function(){var ad;ad=this;if(!((ad.typ.size===4))||!ad.typ.pointers()){$panic(new $String("can't call pointer on a non-pointer Value"));}if(!((((ad.flag&64)>>>0)===0))){return ad.ptr.$get();}return ad.ptr;};CZ.prototype.pointer=function(){return this.$val.pointer();};DD.ptr.prototype.Error=function(){var ad;ad=this;if(ad.Kind===0){return"reflect: call of "+ad.Method+" on zero Value";}return"reflect: call of "+ad.Method+" on "+new BG(ad.Kind).String()+" Value";};DD.prototype.Error=function(){return this.$val.Error();};DA.prototype.mustBe=function(ad){var ad,ae;ae=this.$val;if(!((new DA(ae).kind()===ad))){$panic(new DD.ptr(AR(),new DA(ae).kind()));}};$ptrType(DA).prototype.mustBe=function(ad){return new DA(this.$get()).mustBe(ad);};DA.prototype.mustBeExported=function(){var ad;ad=this.$val;if(ad===0){$panic(new DD.ptr(AR(),0));}if(!((((ad&32)>>>0)===0))){$panic(new $String("reflect: "+AR()+" using value obtained using unexported field"));}};$ptrType(DA).prototype.mustBeExported=function(){return new DA(this.$get()).mustBeExported();};DA.prototype.mustBeAssignable=function(){var ad;ad=this.$val;if(ad===0){$panic(new DD.ptr(AR(),0));}if(!((((ad&32)>>>0)===0))){$panic(new $String("reflect: "+AR()+" using value obtained using unexported field"));}if(((ad&128)>>>0)===0){$panic(new $String("reflect: "+AR()+" using unaddressable value"));}};$ptrType(DA).prototype.mustBeAssignable=function(){return new DA(this.$get()).mustBeAssignable();};CZ.ptr.prototype.Addr=function(){var ad;ad=this;if(((ad.flag&128)>>>0)===0){$panic(new $String("reflect.Value.Addr of unaddressable value"));}return new CZ.ptr(ad.typ.ptrTo(),ad.ptr,((((ad.flag&32)>>>0))|22)>>>0);};CZ.prototype.Addr=function(){return this.$val.Addr();};CZ.ptr.prototype.Bool=function(){var ad;ad=this;new DA(ad.flag).mustBe(1);return ad.ptr.$get();};CZ.prototype.Bool=function(){return this.$val.Bool();};CZ.ptr.prototype.Bytes=function(){var ad;ad=this;new DA(ad.flag).mustBe(23);if(!((ad.typ.Elem().Kind()===8))){$panic(new $String("reflect.Value.Bytes of non-byte slice"));}return ad.ptr.$get();};CZ.prototype.Bytes=function(){return this.$val.Bytes();};CZ.ptr.prototype.runes=function(){var ad;ad=this;new DA(ad.flag).mustBe(23);if(!((ad.typ.Elem().Kind()===5))){$panic(new $String("reflect.Value.Bytes of non-rune slice"));}return ad.ptr.$get();};CZ.prototype.runes=function(){return this.$val.runes();};CZ.ptr.prototype.CanAddr=function(){var ad;ad=this;return!((((ad.flag&128)>>>0)===0));};CZ.prototype.CanAddr=function(){return this.$val.CanAddr();};CZ.ptr.prototype.CanSet=function(){var ad;ad=this;return((ad.flag&160)>>>0)===128;};CZ.prototype.CanSet=function(){return this.$val.CanSet();};CZ.ptr.prototype.Call=function(ad){var ad,ae;ae=this;new DA(ae.flag).mustBe(19);new DA(ae.flag).mustBeExported();return ae.call("Call",ad);};CZ.prototype.Call=function(ad){return this.$val.Call(ad);};CZ.ptr.prototype.CallSlice=function(ad){var ad,ae;ae=this;new DA(ae.flag).mustBe(19);new DA(ae.flag).mustBeExported();return ae.call("CallSlice",ad);};CZ.prototype.CallSlice=function(ad){return this.$val.CallSlice(ad);};CZ.ptr.prototype.Complex=function(){var ad,ae,af,ag;ad=this;ae=new DA(ad.flag).kind();af=ae;if(af===15){return(ag=ad.ptr.$get(),new $Complex128(ag.$real,ag.$imag));}else if(af===16){return ad.ptr.$get();}$panic(new DD.ptr("reflect.Value.Complex",new DA(ad.flag).kind()));};CZ.prototype.Complex=function(){return this.$val.Complex();};CZ.ptr.prototype.FieldByIndex=function(ad){var ad,ae,af,ag,ah,ai;ae=this;if(ad.$length===1){return ae.Field(((0<0||0>=ad.$length)?$throwRuntimeError("index out of range"):ad.$array[ad.$offset+0]));}new DA(ae.flag).mustBe(25);af=ad;ag=0;while(true){if(!(ag=af.$length)?$throwRuntimeError("index out of range"):af.$array[af.$offset+ag]);if(ah>0){if((ae.Kind()===22)&&(ae.typ.Elem().Kind()===25)){if(ae.IsNil()){$panic(new $String("reflect: indirection through nil pointer to embedded struct"));}ae=ae.Elem();}}ae=ae.Field(ai);ag++;}return ae;};CZ.prototype.FieldByIndex=function(ad){return this.$val.FieldByIndex(ad);};CZ.ptr.prototype.FieldByName=function(ad){var ad,ae,af,ag,ah;ae=this;new DA(ae.flag).mustBe(25);af=ae.typ.FieldByName(ad);ag=$clone(af[0],BY);ah=af[1];if(ah){return ae.FieldByIndex(ag.Index);}return new CZ.ptr(FL.nil,0,0);};CZ.prototype.FieldByName=function(ad){return this.$val.FieldByName(ad);};CZ.ptr.prototype.FieldByNameFunc=function(ad){var ad,ae,af,ag,ah;ae=this;af=ae.typ.FieldByNameFunc(ad);ag=$clone(af[0],BY);ah=af[1];if(ah){return ae.FieldByIndex(ag.Index);}return new CZ.ptr(FL.nil,0,0);};CZ.prototype.FieldByNameFunc=function(ad){return this.$val.FieldByNameFunc(ad);};CZ.ptr.prototype.Float=function(){var ad,ae,af;ad=this;ae=new DA(ad.flag).kind();af=ae;if(af===13){return $coerceFloat32(ad.ptr.$get());}else if(af===14){return ad.ptr.$get();}$panic(new DD.ptr("reflect.Value.Float",new DA(ad.flag).kind()));};CZ.prototype.Float=function(){return this.$val.Float();};CZ.ptr.prototype.Int=function(){var ad,ae,af,ag;ad=this;ae=new DA(ad.flag).kind();af=ad.ptr;ag=ae;if(ag===2){return new $Int64(0,af.$get());}else if(ag===3){return new $Int64(0,af.$get());}else if(ag===4){return new $Int64(0,af.$get());}else if(ag===5){return new $Int64(0,af.$get());}else if(ag===6){return af.$get();}$panic(new DD.ptr("reflect.Value.Int",new DA(ad.flag).kind()));};CZ.prototype.Int=function(){return this.$val.Int();};CZ.ptr.prototype.CanInterface=function(){var ad;ad=this;if(ad.flag===0){$panic(new DD.ptr("reflect.Value.CanInterface",0));}return((ad.flag&32)>>>0)===0;};CZ.prototype.CanInterface=function(){return this.$val.CanInterface();};CZ.ptr.prototype.Interface=function(){var ad=$ifaceNil,ae;ae=this;ad=AP(ae,true);return ad;};CZ.prototype.Interface=function(){return this.$val.Interface();};CZ.ptr.prototype.InterfaceData=function(){var ad;ad=this;new DA(ad.flag).mustBe(20);return ad.ptr;};CZ.prototype.InterfaceData=function(){return this.$val.InterfaceData();};CZ.ptr.prototype.IsValid=function(){var ad;ad=this;return!((ad.flag===0));};CZ.prototype.IsValid=function(){return this.$val.IsValid();};CZ.ptr.prototype.Kind=function(){var ad;ad=this;return new DA(ad.flag).kind();};CZ.prototype.Kind=function(){return this.$val.Kind();};CZ.ptr.prototype.MapIndex=function(ad){var ad,ae,af,ag,ah,ai,aj,ak;ae=this;ad=ad;new DA(ae.flag).mustBe(21);af=ae.typ.kindType;ad=ad.assignTo("reflect.Value.MapIndex",af.key,0);ag=0;if(!((((ad.flag&64)>>>0)===0))){ag=ad.ptr;}else{ag=new GW(function(){return this.$target.ptr;},function($v){this.$target.ptr=$v;},ad);}ah=AE(ae.typ,ae.pointer(),ag);if(ah===0){return new CZ.ptr(FL.nil,0,0);}ai=af.elem;aj=((((ae.flag|ad.flag)>>>0))&32)>>>0;aj=(aj|((ai.Kind()>>>0)))>>>0;if(CW(ai)){ak=X(ai);AA(ak,ah,ai.size);return new CZ.ptr(ai,ak,(aj|64)>>>0);}else{return new CZ.ptr(ai,ah.$get(),aj);}};CZ.prototype.MapIndex=function(ad){return this.$val.MapIndex(ad);};CZ.ptr.prototype.MapKeys=function(){var ad,ae,af,ag,ah,ai,aj,ak,al,am,an;ad=this;new DA(ad.flag).mustBe(21);ae=ad.typ.kindType;af=ae.key;ag=(((ad.flag&32)>>>0)|(af.Kind()>>>0))>>>0;ah=ad.pointer();ai=0;if(!(ah===0)){ai=AL(ah);}aj=AI(ad.typ,ah);ak=$makeSlice(GE,ai);al=0;al=0;while(true){if(!(al=ak.$length)?$throwRuntimeError("index out of range"):ak.$array[ak.$offset+al]=new CZ.ptr(af,an,(ag|64)>>>0);}else{(al<0||al>=ak.$length)?$throwRuntimeError("index out of range"):ak.$array[ak.$offset+al]=new CZ.ptr(af,am.$get(),ag);}AK(aj);al=al+(1)>>0;}return $subslice(ak,0,al);};CZ.prototype.MapKeys=function(){return this.$val.MapKeys();};CZ.ptr.prototype.Method=function(ad){var ad,ae,af;ae=this;if(ae.typ===FL.nil){$panic(new DD.ptr("reflect.Value.Method",0));}if(!((((ae.flag&256)>>>0)===0))||(ad>>>0)>=(ae.typ.NumMethod()>>>0)){$panic(new $String("reflect: Method index out of range"));}if((ae.typ.Kind()===20)&&ae.IsNil()){$panic(new $String("reflect: Method on nil interface value"));}af=(ae.flag&96)>>>0;af=(af|(19))>>>0;af=(af|(((((ad>>>0)<<9>>>0)|256)>>>0)))>>>0;return new CZ.ptr(ae.typ,ae.ptr,af);};CZ.prototype.Method=function(ad){return this.$val.Method(ad);};CZ.ptr.prototype.NumMethod=function(){var ad;ad=this;if(ad.typ===FL.nil){$panic(new DD.ptr("reflect.Value.NumMethod",0));}if(!((((ad.flag&256)>>>0)===0))){return 0;}return ad.typ.NumMethod();};CZ.prototype.NumMethod=function(){return this.$val.NumMethod();};CZ.ptr.prototype.MethodByName=function(ad){var ad,ae,af,ag,ah;ae=this;if(ae.typ===FL.nil){$panic(new DD.ptr("reflect.Value.MethodByName",0));}if(!((((ae.flag&256)>>>0)===0))){return new CZ.ptr(FL.nil,0,0);}af=ae.typ.MethodByName(ad);ag=$clone(af[0],BW);ah=af[1];if(!ah){return new CZ.ptr(FL.nil,0,0);}return ae.Method(ag.Index);};CZ.prototype.MethodByName=function(ad){return this.$val.MethodByName(ad);};CZ.ptr.prototype.NumField=function(){var ad,ae;ad=this;new DA(ad.flag).mustBe(25);ae=ad.typ.kindType;return ae.fields.$length;};CZ.prototype.NumField=function(){return this.$val.NumField();};CZ.ptr.prototype.OverflowComplex=function(ad){var ad,ae,af,ag;ae=this;af=new DA(ae.flag).kind();ag=af;if(ag===15){return DN(ad.$real)||DN(ad.$imag);}else if(ag===16){return false;}$panic(new DD.ptr("reflect.Value.OverflowComplex",new DA(ae.flag).kind()));};CZ.prototype.OverflowComplex=function(ad){return this.$val.OverflowComplex(ad);};CZ.ptr.prototype.OverflowFloat=function(ad){var ad,ae,af,ag;ae=this;af=new DA(ae.flag).kind();ag=af;if(ag===13){return DN(ad);}else if(ag===14){return false;}$panic(new DD.ptr("reflect.Value.OverflowFloat",new DA(ae.flag).kind()));};CZ.prototype.OverflowFloat=function(ad){return this.$val.OverflowFloat(ad);};DN=function(ad){var ad;if(ad<0){ad=-ad;}return 3.4028234663852886e+38>>16<<16)*8>>>0)+(ah<<16>>>16)*8)>>>0);aj=$shiftRightInt64(($shiftLeft64(ad,((64-ai>>>0)))),((64-ai>>>0)));return!((ad.$high===aj.$high&&ad.$low===aj.$low));}$panic(new DD.ptr("reflect.Value.OverflowInt",new DA(ae.flag).kind()));};CZ.prototype.OverflowInt=function(ad){return this.$val.OverflowInt(ad);};CZ.ptr.prototype.OverflowUint=function(ad){var ad,ae,af,ag,ah,ai,aj;ae=this;af=new DA(ae.flag).kind();ag=af;if(ag===7||ag===12||ag===8||ag===9||ag===10||ag===11){ai=(ah=ae.typ.size,(((ah>>>16<<16)*8>>>0)+(ah<<16>>>16)*8)>>>0);aj=$shiftRightUint64(($shiftLeft64(ad,((64-ai>>>0)))),((64-ai>>>0)));return!((ad.$high===aj.$high&&ad.$low===aj.$low));}$panic(new DD.ptr("reflect.Value.OverflowUint",new DA(ae.flag).kind()));};CZ.prototype.OverflowUint=function(ad){return this.$val.OverflowUint(ad);};CZ.ptr.prototype.SetBool=function(ad){var ad,ae;ae=this;new DA(ae.flag).mustBeAssignable();new DA(ae.flag).mustBe(1);ae.ptr.$set(ad);};CZ.prototype.SetBool=function(ad){return this.$val.SetBool(ad);};CZ.ptr.prototype.SetBytes=function(ad){var ad,ae;ae=this;new DA(ae.flag).mustBeAssignable();new DA(ae.flag).mustBe(23);if(!((ae.typ.Elem().Kind()===8))){$panic(new $String("reflect.Value.SetBytes of non-byte slice"));}ae.ptr.$set(ad);};CZ.prototype.SetBytes=function(ad){return this.$val.SetBytes(ad);};CZ.ptr.prototype.setRunes=function(ad){var ad,ae;ae=this;new DA(ae.flag).mustBeAssignable();new DA(ae.flag).mustBe(23);if(!((ae.typ.Elem().Kind()===5))){$panic(new $String("reflect.Value.setRunes of non-rune slice"));}ae.ptr.$set(ad);};CZ.prototype.setRunes=function(ad){return this.$val.setRunes(ad);};CZ.ptr.prototype.SetComplex=function(ad){var ad,ae,af,ag;ae=this;new DA(ae.flag).mustBeAssignable();af=new DA(ae.flag).kind();ag=af;if(ag===15){ae.ptr.$set(new $Complex64(ad.$real,ad.$imag));}else if(ag===16){ae.ptr.$set(ad);}else{$panic(new DD.ptr("reflect.Value.SetComplex",new DA(ae.flag).kind()));}};CZ.prototype.SetComplex=function(ad){return this.$val.SetComplex(ad);};CZ.ptr.prototype.SetFloat=function(ad){var ad,ae,af,ag;ae=this;new DA(ae.flag).mustBeAssignable();af=new DA(ae.flag).kind();ag=af;if(ag===13){ae.ptr.$set(ad);}else if(ag===14){ae.ptr.$set(ad);}else{$panic(new DD.ptr("reflect.Value.SetFloat",new DA(ae.flag).kind()));}};CZ.prototype.SetFloat=function(ad){return this.$val.SetFloat(ad);};CZ.ptr.prototype.SetInt=function(ad){var ad,ae,af,ag;ae=this;new DA(ae.flag).mustBeAssignable();af=new DA(ae.flag).kind();ag=af;if(ag===2){ae.ptr.$set(((ad.$low+((ad.$high>>31)*4294967296))>>0));}else if(ag===3){ae.ptr.$set(((ad.$low+((ad.$high>>31)*4294967296))<<24>>24));}else if(ag===4){ae.ptr.$set(((ad.$low+((ad.$high>>31)*4294967296))<<16>>16));}else if(ag===5){ae.ptr.$set(((ad.$low+((ad.$high>>31)*4294967296))>>0));}else if(ag===6){ae.ptr.$set(ad);}else{$panic(new DD.ptr("reflect.Value.SetInt",new DA(ae.flag).kind()));}};CZ.prototype.SetInt=function(ad){return this.$val.SetInt(ad);};CZ.ptr.prototype.SetMapIndex=function(ad,ae){var ad,ae,af,ag,ah,ai;af=this;ae=ae;ad=ad;new DA(af.flag).mustBe(21);new DA(af.flag).mustBeExported();new DA(ad.flag).mustBeExported();ag=af.typ.kindType;ad=ad.assignTo("reflect.Value.SetMapIndex",ag.key,0);ah=0;if(!((((ad.flag&64)>>>0)===0))){ah=ad.ptr;}else{ah=new GW(function(){return this.$target.ptr;},function($v){this.$target.ptr=$v;},ad);}if(ae.typ===FL.nil){AG(af.typ,af.pointer(),ah);return;}new DA(ae.flag).mustBeExported();ae=ae.assignTo("reflect.Value.SetMapIndex",ag.elem,0);ai=0;if(!((((ae.flag&64)>>>0)===0))){ai=ae.ptr;}else{ai=new GW(function(){return this.$target.ptr;},function($v){this.$target.ptr=$v;},ae);}AF(af.typ,af.pointer(),ah,ai);};CZ.prototype.SetMapIndex=function(ad,ae){return this.$val.SetMapIndex(ad,ae);};CZ.ptr.prototype.SetUint=function(ad){var ad,ae,af,ag;ae=this;new DA(ae.flag).mustBeAssignable();af=new DA(ae.flag).kind();ag=af;if(ag===7){ae.ptr.$set((ad.$low>>>0));}else if(ag===8){ae.ptr.$set((ad.$low<<24>>>24));}else if(ag===9){ae.ptr.$set((ad.$low<<16>>>16));}else if(ag===10){ae.ptr.$set((ad.$low>>>0));}else if(ag===11){ae.ptr.$set(ad);}else if(ag===12){ae.ptr.$set((ad.$low>>>0));}else{$panic(new DD.ptr("reflect.Value.SetUint",new DA(ae.flag).kind()));}};CZ.prototype.SetUint=function(ad){return this.$val.SetUint(ad);};CZ.ptr.prototype.SetPointer=function(ad){var ad,ae;ae=this;new DA(ae.flag).mustBeAssignable();new DA(ae.flag).mustBe(26);ae.ptr.$set(ad);};CZ.prototype.SetPointer=function(ad){return this.$val.SetPointer(ad);};CZ.ptr.prototype.SetString=function(ad){var ad,ae;ae=this;new DA(ae.flag).mustBeAssignable();new DA(ae.flag).mustBe(24);ae.ptr.$set(ad);};CZ.prototype.SetString=function(ad){return this.$val.SetString(ad);};CZ.ptr.prototype.String=function(){var ad,ae,af;ad=this;ae=new DA(ad.flag).kind();af=ae;if(af===0){return"";}else if(af===24){return ad.ptr.$get();}return"<"+ad.Type().String()+" Value>";};CZ.prototype.String=function(){return this.$val.String();};CZ.ptr.prototype.Type=function(){var ad,ae,af,ag,ah,ai,aj,ak,al;ad=this;ae=ad.flag;if(ae===0){$panic(new DD.ptr("reflect.Value.Type",0));}if(((ae&256)>>>0)===0){return ad.typ;}af=(ad.flag>>0)>>9>>0;if(ad.typ.Kind()===20){ag=ad.typ.kindType;if((af>>>0)>=(ag.methods.$length>>>0)){$panic(new $String("reflect: internal error: invalid method index"));}ai=(ah=ag.methods,((af<0||af>=ah.$length)?$throwRuntimeError("index out of range"):ah.$array[ah.$offset+af]));return ai.typ;}aj=ad.typ.uncommonType.uncommon();if(aj===FY.nil||(af>>>0)>=(aj.methods.$length>>>0)){$panic(new $String("reflect: internal error: invalid method index"));}al=(ak=aj.methods,((af<0||af>=ak.$length)?$throwRuntimeError("index out of range"):ak.$array[ak.$offset+af]));return al.mtyp;};CZ.prototype.Type=function(){return this.$val.Type();};CZ.ptr.prototype.Uint=function(){var ad,ae,af,ag,ah;ad=this;ae=new DA(ad.flag).kind();af=ad.ptr;ag=ae;if(ag===7){return new $Uint64(0,af.$get());}else if(ag===8){return new $Uint64(0,af.$get());}else if(ag===9){return new $Uint64(0,af.$get());}else if(ag===10){return new $Uint64(0,af.$get());}else if(ag===11){return af.$get();}else if(ag===12){return(ah=af.$get(),new $Uint64(0,ah.constructor===Number?ah:1));}$panic(new DD.ptr("reflect.Value.Uint",new DA(ad.flag).kind()));};CZ.prototype.Uint=function(){return this.$val.Uint();};CZ.ptr.prototype.UnsafeAddr=function(){var ad;ad=this;if(ad.typ===FL.nil){$panic(new DD.ptr("reflect.Value.UnsafeAddr",0));}if(((ad.flag&128)>>>0)===0){$panic(new $String("reflect.Value.UnsafeAddr of unaddressable value"));}return ad.ptr;};CZ.prototype.UnsafeAddr=function(){return this.$val.UnsafeAddr();};EF=$pkg.New=function(ad){var ad,ae,af;if($interfaceIsEqual(ad,$ifaceNil)){$panic(new $String("reflect: New(nil)"));}ae=X($assertType(ad,FL));af=22;return new CZ.ptr(ad.common().ptrTo(),ae,af);};CZ.ptr.prototype.assignTo=function(ad,ae,af){var ad,ae,af,ag,ah,ai;ag=this;if(!((((ag.flag&256)>>>0)===0))){ag=AS(ad,ag);}if(CF(ae,ag.typ)){ag.typ=ae;ah=(ag.flag&224)>>>0;ah=(ah|((ae.Kind()>>>0)))>>>0;return new CZ.ptr(ae,ag.ptr,ah);}else if(CE(ae,ag.typ)){if(af===0){af=X(ae);}ai=AP(ag,false);if(ae.NumMethod()===0){af.$set(ai);}else{AQ(ae,ai,af);}return new CZ.ptr(ae,af,84);}$panic(new $String(ad+": value of type "+ag.typ.String()+" is not assignable to type "+ae.String()));};CZ.prototype.assignTo=function(ad,ae,af){return this.$val.assignTo(ad,ae,af);};CZ.ptr.prototype.Convert=function(ad){var ad,ae,af;ae=this;if(!((((ae.flag&256)>>>0)===0))){ae=AS("Convert",ae);}af=EH(ad.common(),ae.typ);if(af===$throwNilPointerError){$panic(new $String("reflect.Value.Convert: value of type "+ae.typ.String()+" cannot be converted to type "+ad.String()));}return af(ae,ad);};CZ.prototype.Convert=function(ad){return this.$val.Convert(ad);};EH=function(ad,ae){var ad,ae,af,ag,ah,ai,aj,ak,al;af=ae.Kind();if(af===2||af===3||af===4||af===5||af===6){ag=ad.Kind();if(ag===2||ag===3||ag===4||ag===5||ag===6||ag===7||ag===8||ag===9||ag===10||ag===11||ag===12){return EN;}else if(ag===13||ag===14){return ER;}else if(ag===24){return EV;}}else if(af===7||af===8||af===9||af===10||af===11||af===12){ah=ad.Kind();if(ah===2||ah===3||ah===4||ah===5||ah===6||ah===7||ah===8||ah===9||ah===10||ah===11||ah===12){return EO;}else if(ah===13||ah===14){return ES;}else if(ah===24){return EW;}}else if(af===13||af===14){ai=ad.Kind();if(ai===2||ai===3||ai===4||ai===5||ai===6){return EP;}else if(ai===7||ai===8||ai===9||ai===10||ai===11||ai===12){return EQ;}else if(ai===13||ai===14){return ET;}}else if(af===15||af===16){aj=ad.Kind();if(aj===15||aj===16){return EU;}}else if(af===24){if((ad.Kind()===23)&&ad.Elem().PkgPath()===""){ak=ad.Elem().Kind();if(ak===8){return EY;}else if(ak===5){return FA;}}}else if(af===23){if((ad.Kind()===24)&&ae.Elem().PkgPath()===""){al=ae.Elem().Kind();if(al===8){return EX;}else if(al===5){return EZ;}}}if(CG(ad,ae)){return AM;}if((ad.Kind()===22)&&ad.Name()===""&&(ae.Kind()===22)&&ae.Name()===""&&CG(ad.Elem().common(),ae.Elem().common())){return AM;}if(CE(ad,ae)){if(ae.Kind()===20){return FC;}return FB;}return $throwNilPointerError;};EI=function(ad,ae,af){var ad,ae,af,ag,ah,ai;ag=af.common();ah=X(ag);ai=ag.size;if(ai===4){ah.$set(ae);}else if(ai===8){ah.$set(ae);}return new CZ.ptr(ag,ah,(((ad|64)>>>0)|(ag.Kind()>>>0))>>>0);};EJ=function(ad,ae,af){var ad,ae,af,ag,ah,ai;ag=af.common();ah=X(ag);ai=ag.size;if(ai===8){ah.$set(new $Complex64(ae.$real,ae.$imag));}else if(ai===16){ah.$set(ae);}return new CZ.ptr(ag,ah,(((ad|64)>>>0)|(ag.Kind()>>>0))>>>0);};EK=function(ad,ae,af){var ad,ae,af,ag;ag=EF(af).Elem();ag.SetString(ae);ag.flag=((ag.flag&~128)|ad)>>>0;return ag;};EL=function(ad,ae,af){var ad,ae,af,ag;ag=EF(af).Elem();ag.SetBytes(ae);ag.flag=((ag.flag&~128)|ad)>>>0;return ag;};EM=function(ad,ae,af){var ad,ae,af,ag;ag=EF(af).Elem();ag.setRunes(ae);ag.flag=((ag.flag&~128)|ad)>>>0;return ag;};EN=function(ad,ae){var ad,ae,af;ad=ad;return Y((ad.flag&32)>>>0,(af=ad.Int(),new $Uint64(af.$high,af.$low)),ae);};EO=function(ad,ae){var ad,ae;ad=ad;return Y((ad.flag&32)>>>0,ad.Uint(),ae);};EP=function(ad,ae){var ad,ae,af;ad=ad;return Y((ad.flag&32)>>>0,(af=new $Int64(0,ad.Float()),new $Uint64(af.$high,af.$low)),ae);};EQ=function(ad,ae){var ad,ae;ad=ad;return Y((ad.flag&32)>>>0,new $Uint64(0,ad.Float()),ae);};ER=function(ad,ae){var ad,ae;ad=ad;return EI((ad.flag&32)>>>0,$flatten64(ad.Int()),ae);};ES=function(ad,ae){var ad,ae;ad=ad;return EI((ad.flag&32)>>>0,$flatten64(ad.Uint()),ae);};ET=function(ad,ae){var ad,ae;ad=ad;return EI((ad.flag&32)>>>0,ad.Float(),ae);};EU=function(ad,ae){var ad,ae;ad=ad;return EJ((ad.flag&32)>>>0,ad.Complex(),ae);};EV=function(ad,ae){var ad,ae;ad=ad;return EK((ad.flag&32)>>>0,$encodeRune(ad.Int().$low),ae);};EW=function(ad,ae){var ad,ae;ad=ad;return EK((ad.flag&32)>>>0,$encodeRune(ad.Uint().$low),ae);};EX=function(ad,ae){var ad,ae;ad=ad;return EK((ad.flag&32)>>>0,$bytesToString(ad.Bytes()),ae);};EY=function(ad,ae){var ad,ae;ad=ad;return EL((ad.flag&32)>>>0,new GY($stringToBytes(ad.String())),ae);};EZ=function(ad,ae){var ad,ae;ad=ad;return EK((ad.flag&32)>>>0,$runesToString(ad.runes()),ae);};FA=function(ad,ae){var ad,ae;ad=ad;return EM((ad.flag&32)>>>0,new GZ($stringToRunes(ad.String())),ae);};FB=function(ad,ae){var ad,ae,af,ag;ad=ad;af=X(ae.common());ag=AP(ad,false);if(ae.NumMethod()===0){af.$set(ag);}else{AQ($assertType(ae,FL),ag,af);}return new CZ.ptr(ae.common(),af,(((((ad.flag&32)>>>0)|64)>>>0)|20)>>>0);};FC=function(ad,ae){var ad,ae,af;ad=ad;if(ad.IsNil()){af=W(ae);af.flag=(af.flag|(((ad.flag&32)>>>0)))>>>0;return af;}return FB(ad.Elem(),ae);};BG.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];FL.methods=[{prop:"ptrTo",name:"ptrTo",pkg:"reflect",typ:$funcType([],[FL],false)},{prop:"pointers",name:"pointers",pkg:"reflect",typ:$funcType([],[$Bool],false)},{prop:"Comparable",name:"Comparable",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Size",name:"Size",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"Bits",name:"Bits",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Align",name:"Align",pkg:"",typ:$funcType([],[$Int],false)},{prop:"FieldAlign",name:"FieldAlign",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Kind",name:"Kind",pkg:"",typ:$funcType([],[BG],false)},{prop:"common",name:"common",pkg:"reflect",typ:$funcType([],[FL],false)},{prop:"NumMethod",name:"NumMethod",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Method",name:"Method",pkg:"",typ:$funcType([$Int],[BW],false)},{prop:"MethodByName",name:"MethodByName",pkg:"",typ:$funcType([$String],[BW,$Bool],false)},{prop:"PkgPath",name:"PkgPath",pkg:"",typ:$funcType([],[$String],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"ChanDir",name:"ChanDir",pkg:"",typ:$funcType([],[BL],false)},{prop:"IsVariadic",name:"IsVariadic",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Elem",name:"Elem",pkg:"",typ:$funcType([],[BF],false)},{prop:"Field",name:"Field",pkg:"",typ:$funcType([$Int],[BY],false)},{prop:"FieldByIndex",name:"FieldByIndex",pkg:"",typ:$funcType([GP],[BY],false)},{prop:"FieldByName",name:"FieldByName",pkg:"",typ:$funcType([$String],[BY,$Bool],false)},{prop:"FieldByNameFunc",name:"FieldByNameFunc",pkg:"",typ:$funcType([HC],[BY,$Bool],false)},{prop:"In",name:"In",pkg:"",typ:$funcType([$Int],[BF],false)},{prop:"Key",name:"Key",pkg:"",typ:$funcType([],[BF],false)},{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumField",name:"NumField",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumIn",name:"NumIn",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumOut",name:"NumOut",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Out",name:"Out",pkg:"",typ:$funcType([$Int],[BF],false)},{prop:"Implements",name:"Implements",pkg:"",typ:$funcType([BF],[$Bool],false)},{prop:"AssignableTo",name:"AssignableTo",pkg:"",typ:$funcType([BF],[$Bool],false)},{prop:"ConvertibleTo",name:"ConvertibleTo",pkg:"",typ:$funcType([BF],[$Bool],false)}];FY.methods=[{prop:"Method",name:"Method",pkg:"",typ:$funcType([$Int],[BW],false)},{prop:"uncommon",name:"uncommon",pkg:"reflect",typ:$funcType([],[FY],false)},{prop:"PkgPath",name:"PkgPath",pkg:"",typ:$funcType([],[$String],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"NumMethod",name:"NumMethod",pkg:"",typ:$funcType([],[$Int],false)},{prop:"MethodByName",name:"MethodByName",pkg:"",typ:$funcType([$String],[BW,$Bool],false)}];BL.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];GN.methods=[{prop:"Method",name:"Method",pkg:"",typ:$funcType([$Int],[BW],false)},{prop:"NumMethod",name:"NumMethod",pkg:"",typ:$funcType([],[$Int],false)},{prop:"MethodByName",name:"MethodByName",pkg:"",typ:$funcType([$String],[BW,$Bool],false)}];GR.methods=[{prop:"Field",name:"Field",pkg:"",typ:$funcType([$Int],[BY],false)},{prop:"FieldByIndex",name:"FieldByIndex",pkg:"",typ:$funcType([GP],[BY],false)},{prop:"FieldByNameFunc",name:"FieldByNameFunc",pkg:"",typ:$funcType([HC],[BY,$Bool],false)},{prop:"FieldByName",name:"FieldByName",pkg:"",typ:$funcType([$String],[BY,$Bool],false)}];BZ.methods=[{prop:"Get",name:"Get",pkg:"",typ:$funcType([$String],[$String],false)}];CZ.methods=[{prop:"object",name:"object",pkg:"reflect",typ:$funcType([],[B.Object],false)},{prop:"call",name:"call",pkg:"reflect",typ:$funcType([$String,GE],[GE],false)},{prop:"Cap",name:"Cap",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Elem",name:"Elem",pkg:"",typ:$funcType([],[CZ],false)},{prop:"Field",name:"Field",pkg:"",typ:$funcType([$Int],[CZ],false)},{prop:"Index",name:"Index",pkg:"",typ:$funcType([$Int],[CZ],false)},{prop:"IsNil",name:"IsNil",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Pointer",name:"Pointer",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"Set",name:"Set",pkg:"",typ:$funcType([CZ],[],false)},{prop:"SetCap",name:"SetCap",pkg:"",typ:$funcType([$Int],[],false)},{prop:"SetLen",name:"SetLen",pkg:"",typ:$funcType([$Int],[],false)},{prop:"Slice",name:"Slice",pkg:"",typ:$funcType([$Int,$Int],[CZ],false)},{prop:"Slice3",name:"Slice3",pkg:"",typ:$funcType([$Int,$Int,$Int],[CZ],false)},{prop:"Close",name:"Close",pkg:"",typ:$funcType([],[],false)},{prop:"TrySend",name:"TrySend",pkg:"",typ:$funcType([CZ],[$Bool],false)},{prop:"Send",name:"Send",pkg:"",typ:$funcType([CZ],[],false)},{prop:"TryRecv",name:"TryRecv",pkg:"",typ:$funcType([],[CZ,$Bool],false)},{prop:"Recv",name:"Recv",pkg:"",typ:$funcType([],[CZ,$Bool],false)},{prop:"pointer",name:"pointer",pkg:"reflect",typ:$funcType([],[$UnsafePointer],false)},{prop:"Addr",name:"Addr",pkg:"",typ:$funcType([],[CZ],false)},{prop:"Bool",name:"Bool",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Bytes",name:"Bytes",pkg:"",typ:$funcType([],[GY],false)},{prop:"runes",name:"runes",pkg:"reflect",typ:$funcType([],[GZ],false)},{prop:"CanAddr",name:"CanAddr",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"CanSet",name:"CanSet",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Call",name:"Call",pkg:"",typ:$funcType([GE],[GE],false)},{prop:"CallSlice",name:"CallSlice",pkg:"",typ:$funcType([GE],[GE],false)},{prop:"Complex",name:"Complex",pkg:"",typ:$funcType([],[$Complex128],false)},{prop:"FieldByIndex",name:"FieldByIndex",pkg:"",typ:$funcType([GP],[CZ],false)},{prop:"FieldByName",name:"FieldByName",pkg:"",typ:$funcType([$String],[CZ],false)},{prop:"FieldByNameFunc",name:"FieldByNameFunc",pkg:"",typ:$funcType([HC],[CZ],false)},{prop:"Float",name:"Float",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Int",name:"Int",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"CanInterface",name:"CanInterface",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Interface",name:"Interface",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"InterfaceData",name:"InterfaceData",pkg:"",typ:$funcType([],[HG],false)},{prop:"IsValid",name:"IsValid",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Kind",name:"Kind",pkg:"",typ:$funcType([],[BG],false)},{prop:"MapIndex",name:"MapIndex",pkg:"",typ:$funcType([CZ],[CZ],false)},{prop:"MapKeys",name:"MapKeys",pkg:"",typ:$funcType([],[GE],false)},{prop:"Method",name:"Method",pkg:"",typ:$funcType([$Int],[CZ],false)},{prop:"NumMethod",name:"NumMethod",pkg:"",typ:$funcType([],[$Int],false)},{prop:"MethodByName",name:"MethodByName",pkg:"",typ:$funcType([$String],[CZ],false)},{prop:"NumField",name:"NumField",pkg:"",typ:$funcType([],[$Int],false)},{prop:"OverflowComplex",name:"OverflowComplex",pkg:"",typ:$funcType([$Complex128],[$Bool],false)},{prop:"OverflowFloat",name:"OverflowFloat",pkg:"",typ:$funcType([$Float64],[$Bool],false)},{prop:"OverflowInt",name:"OverflowInt",pkg:"",typ:$funcType([$Int64],[$Bool],false)},{prop:"OverflowUint",name:"OverflowUint",pkg:"",typ:$funcType([$Uint64],[$Bool],false)},{prop:"recv",name:"recv",pkg:"reflect",typ:$funcType([$Bool],[CZ,$Bool],false)},{prop:"send",name:"send",pkg:"reflect",typ:$funcType([CZ,$Bool],[$Bool],false)},{prop:"SetBool",name:"SetBool",pkg:"",typ:$funcType([$Bool],[],false)},{prop:"SetBytes",name:"SetBytes",pkg:"",typ:$funcType([GY],[],false)},{prop:"setRunes",name:"setRunes",pkg:"reflect",typ:$funcType([GZ],[],false)},{prop:"SetComplex",name:"SetComplex",pkg:"",typ:$funcType([$Complex128],[],false)},{prop:"SetFloat",name:"SetFloat",pkg:"",typ:$funcType([$Float64],[],false)},{prop:"SetInt",name:"SetInt",pkg:"",typ:$funcType([$Int64],[],false)},{prop:"SetMapIndex",name:"SetMapIndex",pkg:"",typ:$funcType([CZ,CZ],[],false)},{prop:"SetUint",name:"SetUint",pkg:"",typ:$funcType([$Uint64],[],false)},{prop:"SetPointer",name:"SetPointer",pkg:"",typ:$funcType([$UnsafePointer],[],false)},{prop:"SetString",name:"SetString",pkg:"",typ:$funcType([$String],[],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Type",name:"Type",pkg:"",typ:$funcType([],[BF],false)},{prop:"Uint",name:"Uint",pkg:"",typ:$funcType([],[$Uint64],false)},{prop:"UnsafeAddr",name:"UnsafeAddr",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"assignTo",name:"assignTo",pkg:"reflect",typ:$funcType([$String,FL,$UnsafePointer],[CZ],false)},{prop:"Convert",name:"Convert",pkg:"",typ:$funcType([BF],[CZ],false)}];DA.methods=[{prop:"kind",name:"kind",pkg:"reflect",typ:$funcType([],[BG],false)},{prop:"mustBe",name:"mustBe",pkg:"reflect",typ:$funcType([BG],[],false)},{prop:"mustBeExported",name:"mustBeExported",pkg:"reflect",typ:$funcType([],[],false)},{prop:"mustBeAssignable",name:"mustBeAssignable",pkg:"reflect",typ:$funcType([],[],false)}];HH.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];AH.init([{prop:"t",name:"t",pkg:"reflect",typ:BF,tag:""},{prop:"m",name:"m",pkg:"reflect",typ:B.Object,tag:""},{prop:"keys",name:"keys",pkg:"reflect",typ:B.Object,tag:""},{prop:"i",name:"i",pkg:"reflect",typ:$Int,tag:""}]);BF.init([{prop:"Align",name:"Align",pkg:"",typ:$funcType([],[$Int],false)},{prop:"AssignableTo",name:"AssignableTo",pkg:"",typ:$funcType([BF],[$Bool],false)},{prop:"Bits",name:"Bits",pkg:"",typ:$funcType([],[$Int],false)},{prop:"ChanDir",name:"ChanDir",pkg:"",typ:$funcType([],[BL],false)},{prop:"Comparable",name:"Comparable",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"ConvertibleTo",name:"ConvertibleTo",pkg:"",typ:$funcType([BF],[$Bool],false)},{prop:"Elem",name:"Elem",pkg:"",typ:$funcType([],[BF],false)},{prop:"Field",name:"Field",pkg:"",typ:$funcType([$Int],[BY],false)},{prop:"FieldAlign",name:"FieldAlign",pkg:"",typ:$funcType([],[$Int],false)},{prop:"FieldByIndex",name:"FieldByIndex",pkg:"",typ:$funcType([GP],[BY],false)},{prop:"FieldByName",name:"FieldByName",pkg:"",typ:$funcType([$String],[BY,$Bool],false)},{prop:"FieldByNameFunc",name:"FieldByNameFunc",pkg:"",typ:$funcType([HC],[BY,$Bool],false)},{prop:"Implements",name:"Implements",pkg:"",typ:$funcType([BF],[$Bool],false)},{prop:"In",name:"In",pkg:"",typ:$funcType([$Int],[BF],false)},{prop:"IsVariadic",name:"IsVariadic",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Key",name:"Key",pkg:"",typ:$funcType([],[BF],false)},{prop:"Kind",name:"Kind",pkg:"",typ:$funcType([],[BG],false)},{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Method",name:"Method",pkg:"",typ:$funcType([$Int],[BW],false)},{prop:"MethodByName",name:"MethodByName",pkg:"",typ:$funcType([$String],[BW,$Bool],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"NumField",name:"NumField",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumIn",name:"NumIn",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumMethod",name:"NumMethod",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumOut",name:"NumOut",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Out",name:"Out",pkg:"",typ:$funcType([$Int],[BF],false)},{prop:"PkgPath",name:"PkgPath",pkg:"",typ:$funcType([],[$String],false)},{prop:"Size",name:"Size",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"common",name:"common",pkg:"reflect",typ:$funcType([],[FL],false)},{prop:"uncommon",name:"uncommon",pkg:"reflect",typ:$funcType([],[FY],false)}]);BH.init([{prop:"size",name:"size",pkg:"reflect",typ:$Uintptr,tag:""},{prop:"hash",name:"hash",pkg:"reflect",typ:$Uint32,tag:""},{prop:"_$2",name:"_",pkg:"reflect",typ:$Uint8,tag:""},{prop:"align",name:"align",pkg:"reflect",typ:$Uint8,tag:""},{prop:"fieldAlign",name:"fieldAlign",pkg:"reflect",typ:$Uint8,tag:""},{prop:"kind",name:"kind",pkg:"reflect",typ:$Uint8,tag:""},{prop:"alg",name:"alg",pkg:"reflect",typ:FV,tag:""},{prop:"gc",name:"gc",pkg:"reflect",typ:FW,tag:""},{prop:"string",name:"string",pkg:"reflect",typ:FX,tag:""},{prop:"uncommonType",name:"",pkg:"reflect",typ:FY,tag:""},{prop:"ptrToThis",name:"ptrToThis",pkg:"reflect",typ:FL,tag:""},{prop:"zero",name:"zero",pkg:"reflect",typ:$UnsafePointer,tag:""}]);BI.init([{prop:"hash",name:"hash",pkg:"reflect",typ:HD,tag:""},{prop:"equal",name:"equal",pkg:"reflect",typ:HE,tag:""}]);BJ.init([{prop:"name",name:"name",pkg:"reflect",typ:FX,tag:""},{prop:"pkgPath",name:"pkgPath",pkg:"reflect",typ:FX,tag:""},{prop:"mtyp",name:"mtyp",pkg:"reflect",typ:FL,tag:""},{prop:"typ",name:"typ",pkg:"reflect",typ:FL,tag:""},{prop:"ifn",name:"ifn",pkg:"reflect",typ:$UnsafePointer,tag:""},{prop:"tfn",name:"tfn",pkg:"reflect",typ:$UnsafePointer,tag:""}]);BK.init([{prop:"name",name:"name",pkg:"reflect",typ:FX,tag:""},{prop:"pkgPath",name:"pkgPath",pkg:"reflect",typ:FX,tag:""},{prop:"methods",name:"methods",pkg:"reflect",typ:FZ,tag:""}]);BM.init([{prop:"rtype",name:"",pkg:"reflect",typ:BH,tag:"reflect:\"array\""},{prop:"elem",name:"elem",pkg:"reflect",typ:FL,tag:""},{prop:"slice",name:"slice",pkg:"reflect",typ:FL,tag:""},{prop:"len",name:"len",pkg:"reflect",typ:$Uintptr,tag:""}]);BN.init([{prop:"rtype",name:"",pkg:"reflect",typ:BH,tag:"reflect:\"chan\""},{prop:"elem",name:"elem",pkg:"reflect",typ:FL,tag:""},{prop:"dir",name:"dir",pkg:"reflect",typ:$Uintptr,tag:""}]);BO.init([{prop:"rtype",name:"",pkg:"reflect",typ:BH,tag:"reflect:\"func\""},{prop:"dotdotdot",name:"dotdotdot",pkg:"reflect",typ:$Bool,tag:""},{prop:"in$2",name:"in",pkg:"reflect",typ:GA,tag:""},{prop:"out",name:"out",pkg:"reflect",typ:GA,tag:""}]);BP.init([{prop:"name",name:"name",pkg:"reflect",typ:FX,tag:""},{prop:"pkgPath",name:"pkgPath",pkg:"reflect",typ:FX,tag:""},{prop:"typ",name:"typ",pkg:"reflect",typ:FL,tag:""}]);BQ.init([{prop:"rtype",name:"",pkg:"reflect",typ:BH,tag:"reflect:\"interface\""},{prop:"methods",name:"methods",pkg:"reflect",typ:GB,tag:""}]);BR.init([{prop:"rtype",name:"",pkg:"reflect",typ:BH,tag:"reflect:\"map\""},{prop:"key",name:"key",pkg:"reflect",typ:FL,tag:""},{prop:"elem",name:"elem",pkg:"reflect",typ:FL,tag:""},{prop:"bucket",name:"bucket",pkg:"reflect",typ:FL,tag:""},{prop:"hmap",name:"hmap",pkg:"reflect",typ:FL,tag:""},{prop:"keysize",name:"keysize",pkg:"reflect",typ:$Uint8,tag:""},{prop:"indirectkey",name:"indirectkey",pkg:"reflect",typ:$Uint8,tag:""},{prop:"valuesize",name:"valuesize",pkg:"reflect",typ:$Uint8,tag:""},{prop:"indirectvalue",name:"indirectvalue",pkg:"reflect",typ:$Uint8,tag:""},{prop:"bucketsize",name:"bucketsize",pkg:"reflect",typ:$Uint16,tag:""}]);BS.init([{prop:"rtype",name:"",pkg:"reflect",typ:BH,tag:"reflect:\"ptr\""},{prop:"elem",name:"elem",pkg:"reflect",typ:FL,tag:""}]);BT.init([{prop:"rtype",name:"",pkg:"reflect",typ:BH,tag:"reflect:\"slice\""},{prop:"elem",name:"elem",pkg:"reflect",typ:FL,tag:""}]);BU.init([{prop:"name",name:"name",pkg:"reflect",typ:FX,tag:""},{prop:"pkgPath",name:"pkgPath",pkg:"reflect",typ:FX,tag:""},{prop:"typ",name:"typ",pkg:"reflect",typ:FL,tag:""},{prop:"tag",name:"tag",pkg:"reflect",typ:FX,tag:""},{prop:"offset",name:"offset",pkg:"reflect",typ:$Uintptr,tag:""}]);BV.init([{prop:"rtype",name:"",pkg:"reflect",typ:BH,tag:"reflect:\"struct\""},{prop:"fields",name:"fields",pkg:"reflect",typ:GC,tag:""}]);BW.init([{prop:"Name",name:"Name",pkg:"",typ:$String,tag:""},{prop:"PkgPath",name:"PkgPath",pkg:"",typ:$String,tag:""},{prop:"Type",name:"Type",pkg:"",typ:BF,tag:""},{prop:"Func",name:"Func",pkg:"",typ:CZ,tag:""},{prop:"Index",name:"Index",pkg:"",typ:$Int,tag:""}]);BY.init([{prop:"Name",name:"Name",pkg:"",typ:$String,tag:""},{prop:"PkgPath",name:"PkgPath",pkg:"",typ:$String,tag:""},{prop:"Type",name:"Type",pkg:"",typ:BF,tag:""},{prop:"Tag",name:"Tag",pkg:"",typ:BZ,tag:""},{prop:"Offset",name:"Offset",pkg:"",typ:$Uintptr,tag:""},{prop:"Index",name:"Index",pkg:"",typ:GP,tag:""},{prop:"Anonymous",name:"Anonymous",pkg:"",typ:$Bool,tag:""}]);CA.init([{prop:"typ",name:"typ",pkg:"reflect",typ:GR,tag:""},{prop:"index",name:"index",pkg:"reflect",typ:GP,tag:""}]);CZ.init([{prop:"typ",name:"typ",pkg:"reflect",typ:FL,tag:""},{prop:"ptr",name:"ptr",pkg:"reflect",typ:$UnsafePointer,tag:""},{prop:"flag",name:"",pkg:"reflect",typ:DA,tag:""}]);DD.init([{prop:"Method",name:"Method",pkg:"",typ:$String,tag:""},{prop:"Kind",name:"Kind",pkg:"",typ:BG,tag:""}]);DF.init([{prop:"itab",name:"itab",pkg:"reflect",typ:GI,tag:""},{prop:"word",name:"word",pkg:"reflect",typ:$UnsafePointer,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_reflect=function(){while(true){switch($s){case 0:$r=B.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}F=false;K=new $Map();AT=$js.Object;AU=$js.container.ptr;BX=new FU(["invalid","bool","int","int8","int16","int32","int64","uint","uint8","uint16","uint32","uint64","uintptr","float32","float64","complex64","complex128","array","chan","func","interface","map","ptr","slice","string","struct","unsafe.Pointer"]);DM=$assertType(Q(new $Uint8(0)),FL);G();}return;}};$init_reflect.$blocking=true;return $init_reflect;};return $pkg;})(); +$packages["fmt"]=(function(){var $pkg={},D,E,A,F,G,B,H,C,L,M,AF,AG,AH,AI,AJ,AK,BE,BR,BS,BT,CE,CF,CG,CH,CI,CJ,CK,CN,CO,DI,DJ,DK,I,J,N,O,Q,R,S,T,U,V,W,X,Y,Z,AA,AB,AC,AD,AE,AL,AZ,BA,BB,BU,BY,CA,CB,K,P,AM,AN,AO,AP,AQ,AR,AS,AU,AV,AX,AY,BC,BD,BV,BW,CC;D=$packages["errors"];E=$packages["io"];A=$packages["math"];F=$packages["os"];G=$packages["reflect"];B=$packages["strconv"];H=$packages["sync"];C=$packages["unicode/utf8"];L=$pkg.fmtFlags=$newType(0,$kindStruct,"fmt.fmtFlags","fmtFlags","fmt",function(widPresent_,precPresent_,minus_,plus_,sharp_,space_,unicode_,uniQuote_,zero_,plusV_,sharpV_){this.$val=this;this.widPresent=widPresent_!==undefined?widPresent_:false;this.precPresent=precPresent_!==undefined?precPresent_:false;this.minus=minus_!==undefined?minus_:false;this.plus=plus_!==undefined?plus_:false;this.sharp=sharp_!==undefined?sharp_:false;this.space=space_!==undefined?space_:false;this.unicode=unicode_!==undefined?unicode_:false;this.uniQuote=uniQuote_!==undefined?uniQuote_:false;this.zero=zero_!==undefined?zero_:false;this.plusV=plusV_!==undefined?plusV_:false;this.sharpV=sharpV_!==undefined?sharpV_:false;});M=$pkg.fmt=$newType(0,$kindStruct,"fmt.fmt","fmt","fmt",function(intbuf_,buf_,wid_,prec_,fmtFlags_){this.$val=this;this.intbuf=intbuf_!==undefined?intbuf_:DI.zero();this.buf=buf_!==undefined?buf_:CJ.nil;this.wid=wid_!==undefined?wid_:0;this.prec=prec_!==undefined?prec_:0;this.fmtFlags=fmtFlags_!==undefined?fmtFlags_:new L.ptr();});AF=$pkg.State=$newType(8,$kindInterface,"fmt.State","State","fmt",null);AG=$pkg.Formatter=$newType(8,$kindInterface,"fmt.Formatter","Formatter","fmt",null);AH=$pkg.Stringer=$newType(8,$kindInterface,"fmt.Stringer","Stringer","fmt",null);AI=$pkg.GoStringer=$newType(8,$kindInterface,"fmt.GoStringer","GoStringer","fmt",null);AJ=$pkg.buffer=$newType(12,$kindSlice,"fmt.buffer","buffer","fmt",null);AK=$pkg.pp=$newType(0,$kindStruct,"fmt.pp","pp","fmt",function(n_,panicking_,erroring_,buf_,arg_,value_,reordered_,goodArgNum_,runeBuf_,fmt_){this.$val=this;this.n=n_!==undefined?n_:0;this.panicking=panicking_!==undefined?panicking_:false;this.erroring=erroring_!==undefined?erroring_:false;this.buf=buf_!==undefined?buf_:AJ.nil;this.arg=arg_!==undefined?arg_:$ifaceNil;this.value=value_!==undefined?value_:new G.Value.ptr();this.reordered=reordered_!==undefined?reordered_:false;this.goodArgNum=goodArgNum_!==undefined?goodArgNum_:false;this.runeBuf=runeBuf_!==undefined?runeBuf_:CO.zero();this.fmt=fmt_!==undefined?fmt_:new M.ptr();});BE=$pkg.runeUnreader=$newType(8,$kindInterface,"fmt.runeUnreader","runeUnreader","fmt",null);BR=$pkg.scanError=$newType(0,$kindStruct,"fmt.scanError","scanError","fmt",function(err_){this.$val=this;this.err=err_!==undefined?err_:$ifaceNil;});BS=$pkg.ss=$newType(0,$kindStruct,"fmt.ss","ss","fmt",function(rr_,buf_,peekRune_,prevRune_,count_,atEOF_,ssave_){this.$val=this;this.rr=rr_!==undefined?rr_:$ifaceNil;this.buf=buf_!==undefined?buf_:AJ.nil;this.peekRune=peekRune_!==undefined?peekRune_:0;this.prevRune=prevRune_!==undefined?prevRune_:0;this.count=count_!==undefined?count_:0;this.atEOF=atEOF_!==undefined?atEOF_:false;this.ssave=ssave_!==undefined?ssave_:new BT.ptr();});BT=$pkg.ssave=$newType(0,$kindStruct,"fmt.ssave","ssave","fmt",function(validSave_,nlIsEnd_,nlIsSpace_,argLimit_,limit_,maxWid_){this.$val=this;this.validSave=validSave_!==undefined?validSave_:false;this.nlIsEnd=nlIsEnd_!==undefined?nlIsEnd_:false;this.nlIsSpace=nlIsSpace_!==undefined?nlIsSpace_:false;this.argLimit=argLimit_!==undefined?argLimit_:0;this.limit=limit_!==undefined?limit_:0;this.maxWid=maxWid_!==undefined?maxWid_:0;});CE=$sliceType($Uint8);CF=$sliceType($emptyInterface);CG=$arrayType($Uint16,2);CH=$sliceType(CG);CI=$ptrType(AK);CJ=$ptrType(AJ);CK=$ptrType(G.rtype);CN=$ptrType(BS);CO=$arrayType($Uint8,4);DI=$arrayType($Uint8,65);DJ=$ptrType(M);DK=$funcType([$Int32],[$Bool],false);K=function(){var a;a=0;while(true){if(!(a<65)){break;}(a<0||a>=I.$length)?$throwRuntimeError("index out of range"):I.$array[I.$offset+a]=48;(a<0||a>=J.$length)?$throwRuntimeError("index out of range"):J.$array[J.$offset+a]=32;a=a+(1)>>0;}};M.ptr.prototype.clearflags=function(){var a;a=this;$copy(a.fmtFlags,new L.ptr(false,false,false,false,false,false,false,false,false,false,false),L);};M.prototype.clearflags=function(){return this.$val.clearflags();};M.ptr.prototype.init=function(a){var a,b;b=this;b.buf=a;b.clearflags();};M.prototype.init=function(a){return this.$val.init(a);};M.ptr.prototype.computePadding=function(a){var a,b=CE.nil,c=0,d=0,e,f,g,h,i,j,k,l,m,n,o,p;e=this;f=!e.fmtFlags.minus;g=e.wid;if(g<0){f=false;g=-g;}g=g-(a)>>0;if(g>0){if(f&&e.fmtFlags.zero){h=I;i=g;j=0;b=h;c=i;d=j;return[b,c,d];}if(f){k=J;l=g;m=0;b=k;c=l;d=m;return[b,c,d];}else{n=J;o=0;p=g;b=n;c=o;d=p;return[b,c,d];}}return[b,c,d];};M.prototype.computePadding=function(a){return this.$val.computePadding(a);};M.ptr.prototype.writePadding=function(a,b){var a,b,c,d;c=this;while(true){if(!(a>0)){break;}d=a;if(d>65){d=65;}c.buf.Write($subslice(b,0,d));a=a-(d)>>0;}};M.prototype.writePadding=function(a,b){return this.$val.writePadding(a,b);};M.ptr.prototype.pad=function(a){var a,b,c,d,e,f;b=this;if(!b.fmtFlags.widPresent||(b.wid===0)){b.buf.Write(a);return;}c=b.computePadding(C.RuneCount(a));d=c[0];e=c[1];f=c[2];if(e>0){b.writePadding(e,d);}b.buf.Write(a);if(f>0){b.writePadding(f,d);}};M.prototype.pad=function(a){return this.$val.pad(a);};M.ptr.prototype.padString=function(a){var a,b,c,d,e,f;b=this;if(!b.fmtFlags.widPresent||(b.wid===0)){b.buf.WriteString(a);return;}c=b.computePadding(C.RuneCountInString(a));d=c[0];e=c[1];f=c[2];if(e>0){b.writePadding(e,d);}b.buf.WriteString(a);if(f>0){b.writePadding(f,d);}};M.prototype.padString=function(a){return this.$val.padString(a);};M.ptr.prototype.fmt_boolean=function(a){var a,b;b=this;if(a){b.pad(N);}else{b.pad(O);}};M.prototype.fmt_boolean=function(a){return this.$val.fmt_boolean(a);};M.ptr.prototype.integer=function(a,b,c,d){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;e=this;if(e.fmtFlags.precPresent&&(e.prec===0)&&(a.$high===0&&a.$low===0)){return;}f=$subslice(new CE(e.intbuf),0);if(e.fmtFlags.widPresent){g=e.wid;if((b.$high===0&&b.$low===16)&&e.fmtFlags.sharp){g=g+(2)>>0;}if(g>65){f=$makeSlice(CE,g);}}h=c===true&&(a.$high<0||(a.$high===0&&a.$low<0));if(h){a=new $Int64(-a.$high,-a.$low);}i=0;if(e.fmtFlags.precPresent){i=e.prec;e.fmtFlags.zero=false;}else if(e.fmtFlags.zero&&e.fmtFlags.widPresent&&!e.fmtFlags.minus&&e.wid>0){i=e.wid;if(h||e.fmtFlags.plus||e.fmtFlags.space){i=i-(1)>>0;}}j=f.$length;k=new $Uint64(a.$high,a.$low);l=b;if((l.$high===0&&l.$low===10)){while(true){if(!((k.$high>0||(k.$high===0&&k.$low>=10)))){break;}j=j-(1)>>0;m=$div64(k,new $Uint64(0,10),false);(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=((n=new $Uint64(0+k.$high,48+k.$low),o=$mul64(m,new $Uint64(0,10)),new $Uint64(n.$high-o.$high,n.$low-o.$low)).$low<<24>>>24);k=m;}}else if((l.$high===0&&l.$low===16)){while(true){if(!((k.$high>0||(k.$high===0&&k.$low>=16)))){break;}j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=d.charCodeAt($flatten64(new $Uint64(k.$high&0,(k.$low&15)>>>0)));k=$shiftRightUint64(k,(4));}}else if((l.$high===0&&l.$low===8)){while(true){if(!((k.$high>0||(k.$high===0&&k.$low>=8)))){break;}j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=((p=new $Uint64(k.$high&0,(k.$low&7)>>>0),new $Uint64(0+p.$high,48+p.$low)).$low<<24>>>24);k=$shiftRightUint64(k,(3));}}else if((l.$high===0&&l.$low===2)){while(true){if(!((k.$high>0||(k.$high===0&&k.$low>=2)))){break;}j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=((q=new $Uint64(k.$high&0,(k.$low&1)>>>0),new $Uint64(0+q.$high,48+q.$low)).$low<<24>>>24);k=$shiftRightUint64(k,(1));}}else{$panic(new $String("fmt: unknown base; can't happen"));}j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=d.charCodeAt($flatten64(k));while(true){if(!(j>0&&i>(f.$length-j>>0))){break;}j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=48;}if(e.fmtFlags.sharp){r=b;if((r.$high===0&&r.$low===8)){if(!((((j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j])===48))){j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=48;}}else if((r.$high===0&&r.$low===16)){j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=(120+d.charCodeAt(10)<<24>>>24)-97<<24>>>24;j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=48;}}if(e.fmtFlags.unicode){j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=43;j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=85;}if(h){j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=45;}else if(e.fmtFlags.plus){j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=43;}else if(e.fmtFlags.space){j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=32;}if(e.fmtFlags.unicode&&e.fmtFlags.uniQuote&&(a.$high>0||(a.$high===0&&a.$low>=0))&&(a.$high<0||(a.$high===0&&a.$low<=1114111))&&B.IsPrint(((a.$low+((a.$high>>31)*4294967296))>>0))){s=C.RuneLen(((a.$low+((a.$high>>31)*4294967296))>>0));t=(2+s>>0)+1>>0;$copySlice($subslice(f,(j-t>>0)),$subslice(f,j));j=j-(t)>>0;u=f.$length-t>>0;(u<0||u>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+u]=32;u=u+(1)>>0;(u<0||u>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+u]=39;u=u+(1)>>0;C.EncodeRune($subslice(f,u),((a.$low+((a.$high>>31)*4294967296))>>0));u=u+(s)>>0;(u<0||u>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+u]=39;}e.pad($subslice(f,j));};M.prototype.integer=function(a,b,c,d){return this.$val.integer(a,b,c,d);};M.ptr.prototype.truncate=function(a){var a,b,c,d,e,f,g;b=this;if(b.fmtFlags.precPresent&&b.prec>0;e+=f[1];}}return a;};M.prototype.truncate=function(a){return this.$val.truncate(a);};M.ptr.prototype.fmt_s=function(a){var a,b;b=this;a=b.truncate(a);b.padString(a);};M.prototype.fmt_s=function(a){return this.$val.fmt_s(a);};M.ptr.prototype.fmt_sbx=function(a,b,c){var a,b,c,d,e,f,g,h,i;d=this;e=b.$length;if(b===CE.nil){e=a.length;}f=(c.charCodeAt(10)-97<<24>>>24)+120<<24>>>24;g=CE.nil;h=0;while(true){if(!(h0&&d.fmtFlags.space){g=$append(g,32);}if(d.fmtFlags.sharp&&(d.fmtFlags.space||(h===0))){g=$append(g,48,f);}i=0;if(b===CE.nil){i=a.charCodeAt(h);}else{i=((h<0||h>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+h]);}g=$append(g,c.charCodeAt((i>>>4<<24>>>24)),c.charCodeAt(((i&15)>>>0)));h=h+(1)>>0;}d.pad(g);};M.prototype.fmt_sbx=function(a,b,c){return this.$val.fmt_sbx(a,b,c);};M.ptr.prototype.fmt_sx=function(a,b){var a,b,c;c=this;if(c.fmtFlags.precPresent&&c.prec>31)*4294967296))>>0));}else{c=B.AppendQuoteRune($subslice(new CE(b.intbuf),0,0),((a.$low+((a.$high>>31)*4294967296))>>0));}b.pad(c);};M.prototype.fmt_qc=function(a){return this.$val.fmt_qc(a);};P=function(a,b){var a,b;if(a.fmtFlags.precPresent){return a.prec;}return b;};M.ptr.prototype.formatFloat=function(a,b,c,d){var $deferred=[],$err=null,a,b,c,d,e,f;try{$deferFrames.push($deferred);e=this;f=B.AppendFloat($subslice(new CE(e.intbuf),0,1),a,b,c,d);if((((1<0||1>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+1])===45)||(((1<0||1>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+1])===43)){f=$subslice(f,1);}else{(0<0||0>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+0]=43;}if(A.IsInf(a,0)){if(e.fmtFlags.zero){$deferred.push([(function(){e.fmtFlags.zero=true;}),[]]);e.fmtFlags.zero=false;}}if(e.fmtFlags.zero&&e.fmtFlags.widPresent&&e.wid>f.$length){if(e.fmtFlags.space&&a>=0){e.buf.WriteByte(32);e.wid=e.wid-(1)>>0;}else if(e.fmtFlags.plus||a<0){e.buf.WriteByte(((0<0||0>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+0]));e.wid=e.wid-(1)>>0;}e.pad($subslice(f,1));return;}if(e.fmtFlags.space&&(((0<0||0>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+0])===43)){(0<0||0>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+0]=32;e.pad(f);return;}if(e.fmtFlags.plus||(((0<0||0>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+0])===45)||A.IsInf(a,0)){e.pad(f);return;}e.pad($subslice(f,1));}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};M.prototype.formatFloat=function(a,b,c,d){return this.$val.formatFloat(a,b,c,d);};M.ptr.prototype.fmt_e64=function(a){var a,b;b=this;b.formatFloat(a,101,P(b,6),64);};M.prototype.fmt_e64=function(a){return this.$val.fmt_e64(a);};M.ptr.prototype.fmt_E64=function(a){var a,b;b=this;b.formatFloat(a,69,P(b,6),64);};M.prototype.fmt_E64=function(a){return this.$val.fmt_E64(a);};M.ptr.prototype.fmt_f64=function(a){var a,b;b=this;b.formatFloat(a,102,P(b,6),64);};M.prototype.fmt_f64=function(a){return this.$val.fmt_f64(a);};M.ptr.prototype.fmt_g64=function(a){var a,b;b=this;b.formatFloat(a,103,P(b,-1),64);};M.prototype.fmt_g64=function(a){return this.$val.fmt_g64(a);};M.ptr.prototype.fmt_G64=function(a){var a,b;b=this;b.formatFloat(a,71,P(b,-1),64);};M.prototype.fmt_G64=function(a){return this.$val.fmt_G64(a);};M.ptr.prototype.fmt_fb64=function(a){var a,b;b=this;b.formatFloat(a,98,0,64);};M.prototype.fmt_fb64=function(a){return this.$val.fmt_fb64(a);};M.ptr.prototype.fmt_e32=function(a){var a,b;b=this;b.formatFloat($coerceFloat32(a),101,P(b,6),32);};M.prototype.fmt_e32=function(a){return this.$val.fmt_e32(a);};M.ptr.prototype.fmt_E32=function(a){var a,b;b=this;b.formatFloat($coerceFloat32(a),69,P(b,6),32);};M.prototype.fmt_E32=function(a){return this.$val.fmt_E32(a);};M.ptr.prototype.fmt_f32=function(a){var a,b;b=this;b.formatFloat($coerceFloat32(a),102,P(b,6),32);};M.prototype.fmt_f32=function(a){return this.$val.fmt_f32(a);};M.ptr.prototype.fmt_g32=function(a){var a,b;b=this;b.formatFloat($coerceFloat32(a),103,P(b,-1),32);};M.prototype.fmt_g32=function(a){return this.$val.fmt_g32(a);};M.ptr.prototype.fmt_G32=function(a){var a,b;b=this;b.formatFloat($coerceFloat32(a),71,P(b,-1),32);};M.prototype.fmt_G32=function(a){return this.$val.fmt_G32(a);};M.ptr.prototype.fmt_fb32=function(a){var a,b;b=this;b.formatFloat($coerceFloat32(a),98,0,32);};M.prototype.fmt_fb32=function(a){return this.$val.fmt_fb32(a);};M.ptr.prototype.fmt_c64=function(a,b){var a,b,c;c=this;c.fmt_complex($coerceFloat32(a.$real),$coerceFloat32(a.$imag),32,b);};M.prototype.fmt_c64=function(a,b){return this.$val.fmt_c64(a,b);};M.ptr.prototype.fmt_c128=function(a,b){var a,b,c;c=this;c.fmt_complex(a.$real,a.$imag,64,b);};M.prototype.fmt_c128=function(a,b){return this.$val.fmt_c128(a,b);};M.ptr.prototype.fmt_complex=function(a,b,c,d){var a,b,c,d,e,f,g,h,i,j;e=this;e.buf.WriteByte(40);f=e.fmtFlags.plus;g=e.fmtFlags.space;h=e.wid;i=0;while(true){if(!(true)){break;}j=d;if(j===98){e.formatFloat(a,98,0,c);}else if(j===101){e.formatFloat(a,101,P(e,6),c);}else if(j===69){e.formatFloat(a,69,P(e,6),c);}else if(j===102||j===70){e.formatFloat(a,102,P(e,6),c);}else if(j===103){e.formatFloat(a,103,P(e,-1),c);}else if(j===71){e.formatFloat(a,71,P(e,-1),c);}if(!((i===0))){break;}e.fmtFlags.plus=true;e.fmtFlags.space=false;e.wid=h;a=b;i=i+(1)>>0;}e.fmtFlags.space=g;e.fmtFlags.plus=f;e.wid=h;e.buf.Write(AA);};M.prototype.fmt_complex=function(a,b,c,d){return this.$val.fmt_complex(a,b,c,d);};$ptrType(AJ).prototype.Write=function(a){var a,b=0,c=$ifaceNil,d,e,f;d=this;d.$set($appendSlice(d.$get(),a));e=a.$length;f=$ifaceNil;b=e;c=f;return[b,c];};$ptrType(AJ).prototype.WriteString=function(a){var a,b=0,c=$ifaceNil,d,e,f;d=this;d.$set($appendSlice(d.$get(),new AJ($stringToBytes(a))));e=a.length;f=$ifaceNil;b=e;c=f;return[b,c];};$ptrType(AJ).prototype.WriteByte=function(a){var a,b;b=this;b.$set($append(b.$get(),a));return $ifaceNil;};$ptrType(AJ).prototype.WriteRune=function(a){var a,b,c,d,e,f;b=this;if(a<128){b.$set($append(b.$get(),(a<<24>>>24)));return $ifaceNil;}c=b.$get();d=c.$length;while(true){if(!((d+4>>0)>c.$capacity)){break;}c=$append(c,0);}f=C.EncodeRune((e=$subslice(c,d,(d+4>>0)),$subslice(new CE(e.$array),e.$offset,e.$offset+e.$length)),a);b.$set($subslice(c,0,(d+f>>0)));return $ifaceNil;};AM=function(){var a;a=$assertType(AL.Get(),CI);a.panicking=false;a.erroring=false;a.fmt.init(new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},a));return a;};AK.ptr.prototype.free=function(){var a;a=this;if(a.buf.$capacity>1024){return;}a.buf=$subslice(a.buf,0,0);a.arg=$ifaceNil;a.value=new G.Value.ptr(CK.nil,0,0);AL.Put(a);};AK.prototype.free=function(){return this.$val.free();};AK.ptr.prototype.Width=function(){var a=0,b=false,c,d,e;c=this;d=c.fmt.wid;e=c.fmt.fmtFlags.widPresent;a=d;b=e;return[a,b];};AK.prototype.Width=function(){return this.$val.Width();};AK.ptr.prototype.Precision=function(){var a=0,b=false,c,d,e;c=this;d=c.fmt.prec;e=c.fmt.fmtFlags.precPresent;a=d;b=e;return[a,b];};AK.prototype.Precision=function(){return this.$val.Precision();};AK.ptr.prototype.Flag=function(a){var a,b,c;b=this;c=a;if(c===45){return b.fmt.fmtFlags.minus;}else if(c===43){return b.fmt.fmtFlags.plus;}else if(c===35){return b.fmt.fmtFlags.sharp;}else if(c===32){return b.fmt.fmtFlags.space;}else if(c===48){return b.fmt.fmtFlags.zero;}return false;};AK.prototype.Flag=function(a){return this.$val.Flag(a);};AK.ptr.prototype.add=function(a){var a,b;b=this;new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b).WriteRune(a);};AK.prototype.add=function(a){return this.$val.add(a);};AK.ptr.prototype.Write=function(a){var a,b=0,c=$ifaceNil,d,e;d=this;e=new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d).Write(a);b=e[0];c=e[1];return[b,c];};AK.prototype.Write=function(a){return this.$val.Write(a);};AN=$pkg.Fprintf=function(a,b,c){var a,b,c,d=0,e=$ifaceNil,f,g,h;f=AM();f.doPrintf(b,c);g=a.Write((h=f.buf,$subslice(new CE(h.$array),h.$offset,h.$offset+h.$length)));d=g[0];e=g[1];f.free();return[d,e];};AO=$pkg.Printf=function(a,b){var a,b,c=0,d=$ifaceNil,e;e=AN(F.Stdout,a,b);c=e[0];d=e[1];return[c,d];};AP=$pkg.Sprintf=function(a,b){var a,b,c,d;c=AM();c.doPrintf(a,b);d=$bytesToString(c.buf);c.free();return d;};AQ=$pkg.Errorf=function(a,b){var a,b;return D.New(AP(a,b));};AR=$pkg.Fprint=function(a,b){var a,b,c=0,d=$ifaceNil,e,f,g;e=AM();e.doPrint(b,false,false);f=a.Write((g=e.buf,$subslice(new CE(g.$array),g.$offset,g.$offset+g.$length)));c=f[0];d=f[1];e.free();return[c,d];};AS=$pkg.Print=function(a){var a,b=0,c=$ifaceNil,d;d=AR(F.Stdout,a);b=d[0];c=d[1];return[b,c];};AU=$pkg.Fprintln=function(a,b){var a,b,c=0,d=$ifaceNil,e,f,g;e=AM();e.doPrint(b,true,true);f=a.Write((g=e.buf,$subslice(new CE(g.$array),g.$offset,g.$offset+g.$length)));c=f[0];d=f[1];e.free();return[c,d];};AV=$pkg.Println=function(a){var a,b=0,c=$ifaceNil,d;d=AU(F.Stdout,a);b=d[0];c=d[1];return[b,c];};AX=function(a,b){var a,b,c;a=a;c=a.Field(b);if((c.Kind()===20)&&!c.IsNil()){c=c.Elem();}return c;};AY=function(a,b,c){var a,b,c,d=0,e=false,f=0,g,h,i;if(b>=c){g=0;h=false;i=c;d=g;e=h;f=i;return[d,e,f];}f=b;while(true){if(!(f>0)+((a.charCodeAt(f)-48<<24>>>24)>>0)>>0;e=true;f=f+(1)>>0;}return[d,e,f];};AK.ptr.prototype.unknownType=function(a){var a,b;b=this;a=a;if(!a.IsValid()){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b).Write(R);return;}new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b).WriteByte(63);new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b).WriteString(a.Type().String());new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b).WriteByte(63);};AK.prototype.unknownType=function(a){return this.$val.unknownType(a);};AK.ptr.prototype.badVerb=function(a){var a,b;b=this;b.erroring=true;b.add(37);b.add(33);b.add(a);b.add(40);if(!($interfaceIsEqual(b.arg,$ifaceNil))){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b).WriteString(G.TypeOf(b.arg).String());b.add(61);b.printArg(b.arg,118,0);}else if(b.value.IsValid()){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b).WriteString(b.value.Type().String());b.add(61);b.printValue(b.value,118,0);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b).Write(R);}b.add(41);b.erroring=false;};AK.prototype.badVerb=function(a){return this.$val.badVerb(a);};AK.ptr.prototype.fmtBool=function(a,b){var a,b,c,d;c=this;d=b;if(d===116||d===118){c.fmt.fmt_boolean(a);}else{c.badVerb(b);}};AK.prototype.fmtBool=function(a,b){return this.$val.fmtBool(a,b);};AK.ptr.prototype.fmtC=function(a){var a,b,c,d,e;b=this;c=((a.$low+((a.$high>>31)*4294967296))>>0);if(!((d=new $Int64(0,c),(d.$high===a.$high&&d.$low===a.$low)))){c=65533;}e=C.EncodeRune($subslice(new CE(b.runeBuf),0,4),c);b.fmt.pad($subslice(new CE(b.runeBuf),0,e));};AK.prototype.fmtC=function(a){return this.$val.fmtC(a);};AK.ptr.prototype.fmtInt64=function(a,b){var a,b,c,d;c=this;d=b;if(d===98){c.fmt.integer(a,new $Uint64(0,2),true,"0123456789abcdef");}else if(d===99){c.fmtC(a);}else if(d===100||d===118){c.fmt.integer(a,new $Uint64(0,10),true,"0123456789abcdef");}else if(d===111){c.fmt.integer(a,new $Uint64(0,8),true,"0123456789abcdef");}else if(d===113){if((0=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]);if(h>0){if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).Write(Q);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(32);}}e.printArg(new $Uint8(i),118,d+1>>0);g++;}if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(125);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(93);}return;}j=b;if(j===115){e.fmt.fmt_s($bytesToString(a));}else if(j===120){e.fmt.fmt_bx(a,"0123456789abcdef");}else if(j===88){e.fmt.fmt_bx(a,"0123456789ABCDEF");}else if(j===113){e.fmt.fmt_q($bytesToString(a));}else{e.badVerb(b);}};AK.prototype.fmtBytes=function(a,b,c,d){return this.$val.fmtBytes(a,b,c,d);};AK.ptr.prototype.fmtPointer=function(a,b){var a,b,c,d,e,f,g;c=this;a=a;d=true;e=b;if(e===112||e===118){}else if(e===98||e===100||e===111||e===120||e===88){d=false;}else{c.badVerb(b);return;}f=0;g=a.Kind();if(g===18||g===19||g===21||g===22||g===23||g===26){f=a.Pointer();}else{c.badVerb(b);return;}if(c.fmt.fmtFlags.sharpV){c.add(40);new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).WriteString(a.Type().String());c.add(41);c.add(40);if(f===0){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).Write(T);}else{c.fmt0x64(new $Uint64(0,f.constructor===Number?f:1),true);}c.add(41);}else if((b===118)&&(f===0)){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).Write(R);}else{if(d){c.fmt0x64(new $Uint64(0,f.constructor===Number?f:1),!c.fmt.fmtFlags.sharp);}else{c.fmtUint64(new $Uint64(0,f.constructor===Number?f:1),b);}}};AK.prototype.fmtPointer=function(a,b){return this.$val.fmtPointer(a,b);};AK.ptr.prototype.catchPanic=function(a,b){var a,b,c,d,e;c=this;d=$recover();if(!($interfaceIsEqual(d,$ifaceNil))){e=G.ValueOf(a);if((e.Kind()===22)&&e.IsNil()){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).Write(R);return;}if(c.panicking){$panic(d);}c.fmt.clearflags();new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).Write(V);c.add(b);new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).Write(Y);c.panicking=true;c.printArg(d,118,0);c.panicking=false;new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).WriteByte(41);}};AK.prototype.catchPanic=function(a,b){return this.$val.catchPanic(a,b);};AK.ptr.prototype.clearSpecialFlags=function(){var a=false,b=false,c;c=this;a=c.fmt.fmtFlags.plusV;if(a){c.fmt.fmtFlags.plus=true;c.fmt.fmtFlags.plusV=false;}b=c.fmt.fmtFlags.sharpV;if(b){c.fmt.fmtFlags.sharp=true;c.fmt.fmtFlags.sharpV=false;}return[a,b];};AK.prototype.clearSpecialFlags=function(){return this.$val.clearSpecialFlags();};AK.ptr.prototype.restoreSpecialFlags=function(a,b){var a,b,c;c=this;if(a){c.fmt.fmtFlags.plus=false;c.fmt.fmtFlags.plusV=true;}if(b){c.fmt.fmtFlags.sharp=false;c.fmt.fmtFlags.sharpV=true;}};AK.prototype.restoreSpecialFlags=function(a,b){return this.$val.restoreSpecialFlags(a,b);};AK.ptr.prototype.handleMethods=function(a,b){var $deferred=[],$err=null,a,b,c=false,d,e,f,g,h,i,j,k,l,m,n;try{$deferFrames.push($deferred);d=this;if(d.erroring){return c;}e=$assertType(d.arg,AG,true);f=e[0];g=e[1];if(g){c=true;h=d.clearSpecialFlags();$deferred.push([$methodVal(d,"restoreSpecialFlags"),[h[0],h[1]]]);$deferred.push([$methodVal(d,"catchPanic"),[d.arg,a]]);f.Format(d,a);return c;}if(d.fmt.fmtFlags.sharpV){i=$assertType(d.arg,AI,true);j=i[0];k=i[1];if(k){c=true;$deferred.push([$methodVal(d,"catchPanic"),[d.arg,a]]);d.fmt.fmt_s(j.GoString());return c;}}else{l=a;if(l===118||l===115||l===120||l===88||l===113){n=d.arg;if($assertType(n,$error,true)[1]){m=n;c=true;$deferred.push([$methodVal(d,"catchPanic"),[d.arg,a]]);d.printArg(new $String(m.Error()),a,b);return c;}else if($assertType(n,AH,true)[1]){m=n;c=true;$deferred.push([$methodVal(d,"catchPanic"),[d.arg,a]]);d.printArg(new $String(m.String()),a,b);return c;}}}c=false;return c;}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);return c;}};AK.prototype.handleMethods=function(a,b){return this.$val.handleMethods(a,b);};AK.ptr.prototype.printArg=function(a,b,c){var a,b,c,d=false,e,f,g,h,i;e=this;e.arg=a;e.value=new G.Value.ptr(CK.nil,0,0);if($interfaceIsEqual(a,$ifaceNil)){if((b===84)||(b===118)){e.fmt.pad(R);}else{e.badVerb(b);}d=false;return d;}f=b;if(f===84){e.printArg(new $String(G.TypeOf(a).String()),115,0);d=false;return d;}else if(f===112){e.fmtPointer(G.ValueOf(a),b);d=false;return d;}h=a;if($assertType(h,$Bool,true)[1]){g=h.$val;e.fmtBool(g,b);}else if($assertType(h,$Float32,true)[1]){g=h.$val;e.fmtFloat32(g,b);}else if($assertType(h,$Float64,true)[1]){g=h.$val;e.fmtFloat64(g,b);}else if($assertType(h,$Complex64,true)[1]){g=h.$val;e.fmtComplex64(g,b);}else if($assertType(h,$Complex128,true)[1]){g=h.$val;e.fmtComplex128(g,b);}else if($assertType(h,$Int,true)[1]){g=h.$val;e.fmtInt64(new $Int64(0,g),b);}else if($assertType(h,$Int8,true)[1]){g=h.$val;e.fmtInt64(new $Int64(0,g),b);}else if($assertType(h,$Int16,true)[1]){g=h.$val;e.fmtInt64(new $Int64(0,g),b);}else if($assertType(h,$Int32,true)[1]){g=h.$val;e.fmtInt64(new $Int64(0,g),b);}else if($assertType(h,$Int64,true)[1]){g=h.$val;e.fmtInt64(g,b);}else if($assertType(h,$Uint,true)[1]){g=h.$val;e.fmtUint64(new $Uint64(0,g),b);}else if($assertType(h,$Uint8,true)[1]){g=h.$val;e.fmtUint64(new $Uint64(0,g),b);}else if($assertType(h,$Uint16,true)[1]){g=h.$val;e.fmtUint64(new $Uint64(0,g),b);}else if($assertType(h,$Uint32,true)[1]){g=h.$val;e.fmtUint64(new $Uint64(0,g),b);}else if($assertType(h,$Uint64,true)[1]){g=h.$val;e.fmtUint64(g,b);}else if($assertType(h,$Uintptr,true)[1]){g=h.$val;e.fmtUint64(new $Uint64(0,g.constructor===Number?g:1),b);}else if($assertType(h,$String,true)[1]){g=h.$val;e.fmtString(g,b);d=(b===115)||(b===118);}else if($assertType(h,CE,true)[1]){g=h.$val;e.fmtBytes(g,b,$ifaceNil,c);d=b===115;}else{g=h;i=e.handleMethods(b,c);if(i){d=false;return d;}d=e.printReflectValue(G.ValueOf(a),b,c);return d;}e.arg=$ifaceNil;return d;};AK.prototype.printArg=function(a,b,c){return this.$val.printArg(a,b,c);};AK.ptr.prototype.printValue=function(a,b,c){var a,b,c,d=false,e,f,g;e=this;a=a;if(!a.IsValid()){if((b===84)||(b===118)){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).Write(R);}else{e.badVerb(b);}d=false;return d;}f=b;if(f===84){e.printArg(new $String(a.Type().String()),115,0);d=false;return d;}else if(f===112){e.fmtPointer(a,b);d=false;return d;}e.arg=$ifaceNil;if(a.CanInterface()){e.arg=a.Interface();}g=e.handleMethods(b,c);if(g){d=false;return d;}d=e.printReflectValue(a,b,c);return d;};AK.prototype.printValue=function(a,b,c){return this.$val.printValue(a,b,c);};AK.ptr.prototype.printReflectValue=function(a,b,c){var a,aa,ab,b,c,d=false,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;e=this;a=a;f=e.value;e.value=a;g=a;h=g.Kind();BigSwitch:switch(0){default:if(h===1){e.fmtBool(g.Bool(),b);}else if(h===2||h===3||h===4||h===5||h===6){e.fmtInt64(g.Int(),b);}else if(h===7||h===8||h===9||h===10||h===11||h===12){e.fmtUint64(g.Uint(),b);}else if(h===13||h===14){if(g.Type().Size()===4){e.fmtFloat32(g.Float(),b);}else{e.fmtFloat64(g.Float(),b);}}else if(h===15||h===16){if(g.Type().Size()===8){e.fmtComplex64((i=g.Complex(),new $Complex64(i.$real,i.$imag)),b);}else{e.fmtComplex128(g.Complex(),b);}}else if(h===24){e.fmtString(g.String(),b);}else if(h===21){if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteString(g.Type().String());if(g.IsNil()){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteString("(nil)");break;}new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(123);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).Write(U);}j=g.MapKeys();k=j;l=0;while(true){if(!(l=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+l]);if(m>0){if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).Write(Q);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(32);}}e.printValue(n,b,c+1>>0);new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(58);e.printValue(g.MapIndex(n),b,c+1>>0);l++;}if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(125);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(93);}}else if(h===25){if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteString(a.Type().String());}e.add(123);o=g;p=o.Type();q=0;while(true){if(!(q0){if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).Write(Q);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(32);}}if(e.fmt.fmtFlags.plusV||e.fmt.fmtFlags.sharpV){r=$clone(p.Field(q),G.StructField);if(!(r.Name==="")){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteString(r.Name);new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(58);}}e.printValue(AX(o,q),b,c+1>>0);q=q+(1)>>0;}new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(125);}else if(h===20){s=g.Elem();if(!s.IsValid()){if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteString(g.Type().String());new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).Write(S);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).Write(R);}}else{d=e.printValue(s,b,c+1>>0);}}else if(h===17||h===23){t=g.Type();if((t.Elem().Kind()===8)&&($interfaceIsEqual(t.Elem(),BB)||(b===115)||(b===113)||(b===120))){u=CE.nil;if(g.Kind()===23){u=g.Bytes();}else if(g.CanAddr()){u=g.Slice(0,g.Len()).Bytes();}else{u=$makeSlice(CE,g.Len());v=u;w=0;while(true){if(!(w=u.$length)?$throwRuntimeError("index out of range"):u.$array[u.$offset+x]=(g.Index(x).Uint().$low<<24>>>24);w++;}}e.fmtBytes(u,b,t,c);d=b===115;break;}if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteString(a.Type().String());if((g.Kind()===23)&&g.IsNil()){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteString("(nil)");break;}new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(123);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(91);}y=0;while(true){if(!(y0){if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).Write(Q);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(32);}}e.printValue(g.Index(y),b,c+1>>0);y=y+(1)>>0;}if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(125);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(93);}}else if(h===22){z=g.Pointer();if(!((z===0))&&(c===0)){aa=g.Elem();ab=aa.Kind();if(ab===17||ab===23){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(38);e.printValue(aa,b,c+1>>0);break BigSwitch;}else if(ab===25){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(38);e.printValue(aa,b,c+1>>0);break BigSwitch;}else if(ab===21){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(38);e.printValue(aa,b,c+1>>0);break BigSwitch;}}e.fmtPointer(a,b);}else if(h===18||h===19||h===26){e.fmtPointer(a,b);}else{e.unknownType(g);}}e.value=f;d=d;return d;};AK.prototype.printReflectValue=function(a,b,c){return this.$val.printReflectValue(a,b,c);};BC=function(a,b){var a,b,c=0,d=false,e=0,f;e=b;if(b=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+b]),$Int,true);c=f[0];d=f[1];e=b+1>>0;}return[c,d,e];};BD=function(a){var a,b=0,c=0,d=false,e,f,g,h,i,j,k,l,m,n,o,p,q,r;e=1;while(true){if(!(e>0;l=false;b=j;c=k;d=l;return[b,c,d];}m=g-1>>0;n=e+1>>0;o=true;b=m;c=n;d=o;return[b,c,d];}e=e+(1)>>0;}p=0;q=1;r=false;b=p;c=q;d=r;return[b,c,d];};AK.ptr.prototype.argNumber=function(a,b,c,d){var a,b,c,d,e=0,f=0,g=false,h,i,j,k,l,m,n,o,p,q,r,s,t,u;h=this;if(b.length<=c||!((b.charCodeAt(c)===91))){i=a;j=c;k=false;e=i;f=j;g=k;return[e,f,g];}h.reordered=true;l=BD(b.substring(c));m=l[0];n=l[1];o=l[2];if(o&&0<=m&&m>0;r=true;e=p;f=q;g=r;return[e,f,g];}h.goodArgNum=false;s=a;t=c+n>>0;u=true;e=s;f=t;g=u;return[e,f,g];};AK.prototype.argNumber=function(a,b,c,d){return this.$val.argNumber(a,b,c,d);};AK.ptr.prototype.doPrintf=function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;c=this;d=a.length;e=0;f=false;c.reordered=false;g=0;while(true){if(!(g>0;}if(g>h){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).WriteString(a.substring(h,g));}if(g>=d){break;}g=g+(1)>>0;c.fmt.clearflags();F:while(true){if(!(g>0;}j=c.argNumber(e,a,g,b.$length);e=j[0];g=j[1];f=j[2];if(g>0;k=BC(b,e);c.fmt.wid=k[0];c.fmt.fmtFlags.widPresent=k[1];e=k[2];if(!c.fmt.fmtFlags.widPresent){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).Write(AC);}f=false;}else{l=AY(a,g,d);c.fmt.wid=l[0];c.fmt.fmtFlags.widPresent=l[1];g=l[2];if(f&&c.fmt.fmtFlags.widPresent){c.goodArgNum=false;}}if((g+1>>0)>0;if(f){c.goodArgNum=false;}m=c.argNumber(e,a,g,b.$length);e=m[0];g=m[1];f=m[2];if(a.charCodeAt(g)===42){g=g+(1)>>0;n=BC(b,e);c.fmt.prec=n[0];c.fmt.fmtFlags.precPresent=n[1];e=n[2];if(!c.fmt.fmtFlags.precPresent){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).Write(AD);}f=false;}else{o=AY(a,g,d);c.fmt.prec=o[0];c.fmt.fmtFlags.precPresent=o[1];g=o[2];if(!c.fmt.fmtFlags.precPresent){c.fmt.prec=0;c.fmt.fmtFlags.precPresent=true;}}}if(!f){p=c.argNumber(e,a,g,b.$length);e=p[0];g=p[1];f=p[2];}if(g>=d){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).Write(AE);continue;}q=C.DecodeRuneInString(a.substring(g));r=q[0];s=q[1];g=g+(s)>>0;if(r===37){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).WriteByte(37);continue;}if(!c.goodArgNum){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).Write(V);c.add(r);new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).Write(X);continue;}else if(e>=b.$length){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).Write(V);c.add(r);new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).Write(W);continue;}t=((e<0||e>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+e]);e=e+(1)>>0;if(r===118){if(c.fmt.fmtFlags.sharp){c.fmt.fmtFlags.sharp=false;c.fmt.fmtFlags.sharpV=true;}if(c.fmt.fmtFlags.plus){c.fmt.fmtFlags.plus=false;c.fmt.fmtFlags.plusV=true;}}c.printArg(t,r,0);}if(!c.reordered&&e=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+e]);if(!($interfaceIsEqual(u,$ifaceNil))){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).WriteString(G.TypeOf(u).String());new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).WriteByte(61);}c.printArg(u,118,0);if((e+1>>0)>0;}new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).WriteByte(41);}};AK.prototype.doPrintf=function(a,b){return this.$val.doPrintf(a,b);};AK.ptr.prototype.doPrint=function(a,b,c){var a,b,c,d,e,f,g,h;d=this;e=false;f=0;while(true){if(!(f=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+f]);if(f>0){h=!($interfaceIsEqual(g,$ifaceNil))&&(G.TypeOf(g).Kind()===24);if(b||!h&&!e){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d).WriteByte(32);}}e=d.printArg(g,118,0);f=f+(1)>>0;}if(c){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d).WriteByte(10);}};AK.prototype.doPrint=function(a,b,c){return this.$val.doPrint(a,b,c);};BS.ptr.prototype.Read=function(a){var a,b=0,c=$ifaceNil,d,e,f;d=this;e=0;f=D.New("ScanState's Read should not be called. Use ReadRune");b=e;c=f;return[b,c];};BS.prototype.Read=function(a){return this.$val.Read(a);};BS.ptr.prototype.ReadRune=function(){var a=0,b=0,c=$ifaceNil,d,e;d=this;if(d.peekRune>=0){d.count=d.count+(1)>>0;a=d.peekRune;b=C.RuneLen(a);d.prevRune=a;d.peekRune=-1;return[a,b,c];}if(d.atEOF||d.ssave.nlIsEnd&&(d.prevRune===10)||d.count>=d.ssave.argLimit){c=E.EOF;return[a,b,c];}e=d.rr.ReadRune();a=e[0];b=e[1];c=e[2];if($interfaceIsEqual(c,$ifaceNil)){d.count=d.count+(1)>>0;d.prevRune=a;}else if($interfaceIsEqual(c,E.EOF)){d.atEOF=true;}return[a,b,c];};BS.prototype.ReadRune=function(){return this.$val.ReadRune();};BS.ptr.prototype.Width=function(){var a=0,b=false,c,d,e,f,g;c=this;if(c.ssave.maxWid===1073741824){d=0;e=false;a=d;b=e;return[a,b];}f=c.ssave.maxWid;g=true;a=f;b=g;return[a,b];};BS.prototype.Width=function(){return this.$val.Width();};BS.ptr.prototype.getRune=function(){var a=0,b,c,d;b=this;c=b.ReadRune();a=c[0];d=c[2];if(!($interfaceIsEqual(d,$ifaceNil))){if($interfaceIsEqual(d,E.EOF)){a=-1;return a;}b.error(d);}return a;};BS.prototype.getRune=function(){return this.$val.getRune();};BS.ptr.prototype.UnreadRune=function(){var a,b,c,d;a=this;b=$assertType(a.rr,BE,true);c=b[0];d=b[1];if(d){c.UnreadRune();}else{a.peekRune=a.prevRune;}a.prevRune=-1;a.count=a.count-(1)>>0;return $ifaceNil;};BS.prototype.UnreadRune=function(){return this.$val.UnreadRune();};BS.ptr.prototype.error=function(a){var a,b,c;b=this;$panic((c=new BR.ptr(a),new c.constructor.elem(c)));};BS.prototype.error=function(a){return this.$val.error(a);};BS.ptr.prototype.errorString=function(a){var a,b,c;b=this;$panic((c=new BR.ptr(D.New(a)),new c.constructor.elem(c)));};BS.prototype.errorString=function(a){return this.$val.errorString(a);};BS.ptr.prototype.Token=function(a,b){var $deferred=[],$err=null,a,b,c=CE.nil,d=$ifaceNil,e;try{$deferFrames.push($deferred);e=this;$deferred.push([(function(){var f,g,h,i;f=$recover();if(!($interfaceIsEqual(f,$ifaceNil))){g=$assertType(f,BR,true);h=$clone(g[0],BR);i=g[1];if(i){d=h.err;}else{$panic(f);}}}),[]]);if(b===$throwNilPointerError){b=BW;}e.buf=$subslice(e.buf,0,0);c=e.token(a,b);return[c,d];}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);return[c,d];}};BS.prototype.Token=function(a,b){return this.$val.Token(a,b);};BV=function(a){var a,b,c,d,e;if(a>=65536){return false;}b=(a<<16>>>16);c=BU;d=0;while(true){if(!(d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]),CG);if(b1024){return;}b.buf=$subslice(b.buf,0,0);b.rr=$ifaceNil;BY.Put(b);};BS.prototype.free=function(a){return this.$val.free(a);};BS.ptr.prototype.skipSpace=function(a){var a,b,c;b=this;while(true){if(!(true)){break;}c=b.getRune();if(c===-1){return;}if((c===13)&&b.peek("\n")){continue;}if(c===10){if(a){break;}if(b.ssave.nlIsSpace){continue;}b.errorString("unexpected newline");return;}if(!BV(c)){b.UnreadRune();break;}}};BS.prototype.skipSpace=function(a){return this.$val.skipSpace(a);};BS.ptr.prototype.token=function(a,b){var a,b,c,d,e;c=this;if(a){c.skipSpace(false);}while(true){if(!(true)){break;}d=c.getRune();if(d===-1){break;}if(!b(d)){c.UnreadRune();break;}new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).WriteRune(d);}return(e=c.buf,$subslice(new CE(e.$array),e.$offset,e.$offset+e.$length));};BS.prototype.token=function(a,b){return this.$val.token(a,b);};CC=function(a,b){var a,b,c,d,e,f,g;c=a;d=0;while(true){if(!(d=0;};BS.prototype.peek=function(a){return this.$val.peek(a);};DJ.methods=[{prop:"clearflags",name:"clearflags",pkg:"fmt",typ:$funcType([],[],false)},{prop:"init",name:"init",pkg:"fmt",typ:$funcType([CJ],[],false)},{prop:"computePadding",name:"computePadding",pkg:"fmt",typ:$funcType([$Int],[CE,$Int,$Int],false)},{prop:"writePadding",name:"writePadding",pkg:"fmt",typ:$funcType([$Int,CE],[],false)},{prop:"pad",name:"pad",pkg:"fmt",typ:$funcType([CE],[],false)},{prop:"padString",name:"padString",pkg:"fmt",typ:$funcType([$String],[],false)},{prop:"fmt_boolean",name:"fmt_boolean",pkg:"fmt",typ:$funcType([$Bool],[],false)},{prop:"integer",name:"integer",pkg:"fmt",typ:$funcType([$Int64,$Uint64,$Bool,$String],[],false)},{prop:"truncate",name:"truncate",pkg:"fmt",typ:$funcType([$String],[$String],false)},{prop:"fmt_s",name:"fmt_s",pkg:"fmt",typ:$funcType([$String],[],false)},{prop:"fmt_sbx",name:"fmt_sbx",pkg:"fmt",typ:$funcType([$String,CE,$String],[],false)},{prop:"fmt_sx",name:"fmt_sx",pkg:"fmt",typ:$funcType([$String,$String],[],false)},{prop:"fmt_bx",name:"fmt_bx",pkg:"fmt",typ:$funcType([CE,$String],[],false)},{prop:"fmt_q",name:"fmt_q",pkg:"fmt",typ:$funcType([$String],[],false)},{prop:"fmt_qc",name:"fmt_qc",pkg:"fmt",typ:$funcType([$Int64],[],false)},{prop:"formatFloat",name:"formatFloat",pkg:"fmt",typ:$funcType([$Float64,$Uint8,$Int,$Int],[],false)},{prop:"fmt_e64",name:"fmt_e64",pkg:"fmt",typ:$funcType([$Float64],[],false)},{prop:"fmt_E64",name:"fmt_E64",pkg:"fmt",typ:$funcType([$Float64],[],false)},{prop:"fmt_f64",name:"fmt_f64",pkg:"fmt",typ:$funcType([$Float64],[],false)},{prop:"fmt_g64",name:"fmt_g64",pkg:"fmt",typ:$funcType([$Float64],[],false)},{prop:"fmt_G64",name:"fmt_G64",pkg:"fmt",typ:$funcType([$Float64],[],false)},{prop:"fmt_fb64",name:"fmt_fb64",pkg:"fmt",typ:$funcType([$Float64],[],false)},{prop:"fmt_e32",name:"fmt_e32",pkg:"fmt",typ:$funcType([$Float32],[],false)},{prop:"fmt_E32",name:"fmt_E32",pkg:"fmt",typ:$funcType([$Float32],[],false)},{prop:"fmt_f32",name:"fmt_f32",pkg:"fmt",typ:$funcType([$Float32],[],false)},{prop:"fmt_g32",name:"fmt_g32",pkg:"fmt",typ:$funcType([$Float32],[],false)},{prop:"fmt_G32",name:"fmt_G32",pkg:"fmt",typ:$funcType([$Float32],[],false)},{prop:"fmt_fb32",name:"fmt_fb32",pkg:"fmt",typ:$funcType([$Float32],[],false)},{prop:"fmt_c64",name:"fmt_c64",pkg:"fmt",typ:$funcType([$Complex64,$Int32],[],false)},{prop:"fmt_c128",name:"fmt_c128",pkg:"fmt",typ:$funcType([$Complex128,$Int32],[],false)},{prop:"fmt_complex",name:"fmt_complex",pkg:"fmt",typ:$funcType([$Float64,$Float64,$Int,$Int32],[],false)}];CJ.methods=[{prop:"Write",name:"Write",pkg:"",typ:$funcType([CE],[$Int,$error],false)},{prop:"WriteString",name:"WriteString",pkg:"",typ:$funcType([$String],[$Int,$error],false)},{prop:"WriteByte",name:"WriteByte",pkg:"",typ:$funcType([$Uint8],[$error],false)},{prop:"WriteRune",name:"WriteRune",pkg:"",typ:$funcType([$Int32],[$error],false)}];CI.methods=[{prop:"free",name:"free",pkg:"fmt",typ:$funcType([],[],false)},{prop:"Width",name:"Width",pkg:"",typ:$funcType([],[$Int,$Bool],false)},{prop:"Precision",name:"Precision",pkg:"",typ:$funcType([],[$Int,$Bool],false)},{prop:"Flag",name:"Flag",pkg:"",typ:$funcType([$Int],[$Bool],false)},{prop:"add",name:"add",pkg:"fmt",typ:$funcType([$Int32],[],false)},{prop:"Write",name:"Write",pkg:"",typ:$funcType([CE],[$Int,$error],false)},{prop:"unknownType",name:"unknownType",pkg:"fmt",typ:$funcType([G.Value],[],false)},{prop:"badVerb",name:"badVerb",pkg:"fmt",typ:$funcType([$Int32],[],false)},{prop:"fmtBool",name:"fmtBool",pkg:"fmt",typ:$funcType([$Bool,$Int32],[],false)},{prop:"fmtC",name:"fmtC",pkg:"fmt",typ:$funcType([$Int64],[],false)},{prop:"fmtInt64",name:"fmtInt64",pkg:"fmt",typ:$funcType([$Int64,$Int32],[],false)},{prop:"fmt0x64",name:"fmt0x64",pkg:"fmt",typ:$funcType([$Uint64,$Bool],[],false)},{prop:"fmtUnicode",name:"fmtUnicode",pkg:"fmt",typ:$funcType([$Int64],[],false)},{prop:"fmtUint64",name:"fmtUint64",pkg:"fmt",typ:$funcType([$Uint64,$Int32],[],false)},{prop:"fmtFloat32",name:"fmtFloat32",pkg:"fmt",typ:$funcType([$Float32,$Int32],[],false)},{prop:"fmtFloat64",name:"fmtFloat64",pkg:"fmt",typ:$funcType([$Float64,$Int32],[],false)},{prop:"fmtComplex64",name:"fmtComplex64",pkg:"fmt",typ:$funcType([$Complex64,$Int32],[],false)},{prop:"fmtComplex128",name:"fmtComplex128",pkg:"fmt",typ:$funcType([$Complex128,$Int32],[],false)},{prop:"fmtString",name:"fmtString",pkg:"fmt",typ:$funcType([$String,$Int32],[],false)},{prop:"fmtBytes",name:"fmtBytes",pkg:"fmt",typ:$funcType([CE,$Int32,G.Type,$Int],[],false)},{prop:"fmtPointer",name:"fmtPointer",pkg:"fmt",typ:$funcType([G.Value,$Int32],[],false)},{prop:"catchPanic",name:"catchPanic",pkg:"fmt",typ:$funcType([$emptyInterface,$Int32],[],false)},{prop:"clearSpecialFlags",name:"clearSpecialFlags",pkg:"fmt",typ:$funcType([],[$Bool,$Bool],false)},{prop:"restoreSpecialFlags",name:"restoreSpecialFlags",pkg:"fmt",typ:$funcType([$Bool,$Bool],[],false)},{prop:"handleMethods",name:"handleMethods",pkg:"fmt",typ:$funcType([$Int32,$Int],[$Bool],false)},{prop:"printArg",name:"printArg",pkg:"fmt",typ:$funcType([$emptyInterface,$Int32,$Int],[$Bool],false)},{prop:"printValue",name:"printValue",pkg:"fmt",typ:$funcType([G.Value,$Int32,$Int],[$Bool],false)},{prop:"printReflectValue",name:"printReflectValue",pkg:"fmt",typ:$funcType([G.Value,$Int32,$Int],[$Bool],false)},{prop:"argNumber",name:"argNumber",pkg:"fmt",typ:$funcType([$Int,$String,$Int,$Int],[$Int,$Int,$Bool],false)},{prop:"doPrintf",name:"doPrintf",pkg:"fmt",typ:$funcType([$String,CF],[],false)},{prop:"doPrint",name:"doPrint",pkg:"fmt",typ:$funcType([CF,$Bool,$Bool],[],false)}];CN.methods=[{prop:"Read",name:"Read",pkg:"",typ:$funcType([CE],[$Int,$error],false)},{prop:"ReadRune",name:"ReadRune",pkg:"",typ:$funcType([],[$Int32,$Int,$error],false)},{prop:"Width",name:"Width",pkg:"",typ:$funcType([],[$Int,$Bool],false)},{prop:"getRune",name:"getRune",pkg:"fmt",typ:$funcType([],[$Int32],false)},{prop:"mustReadRune",name:"mustReadRune",pkg:"fmt",typ:$funcType([],[$Int32],false)},{prop:"UnreadRune",name:"UnreadRune",pkg:"",typ:$funcType([],[$error],false)},{prop:"error",name:"error",pkg:"fmt",typ:$funcType([$error],[],false)},{prop:"errorString",name:"errorString",pkg:"fmt",typ:$funcType([$String],[],false)},{prop:"Token",name:"Token",pkg:"",typ:$funcType([$Bool,DK],[CE,$error],false)},{prop:"SkipSpace",name:"SkipSpace",pkg:"",typ:$funcType([],[],false)},{prop:"free",name:"free",pkg:"fmt",typ:$funcType([BT],[],false)},{prop:"skipSpace",name:"skipSpace",pkg:"fmt",typ:$funcType([$Bool],[],false)},{prop:"token",name:"token",pkg:"fmt",typ:$funcType([$Bool,DK],[CE],false)},{prop:"consume",name:"consume",pkg:"fmt",typ:$funcType([$String,$Bool],[$Bool],false)},{prop:"peek",name:"peek",pkg:"fmt",typ:$funcType([$String],[$Bool],false)},{prop:"notEOF",name:"notEOF",pkg:"fmt",typ:$funcType([],[],false)},{prop:"accept",name:"accept",pkg:"fmt",typ:$funcType([$String],[$Bool],false)},{prop:"okVerb",name:"okVerb",pkg:"fmt",typ:$funcType([$Int32,$String,$String],[$Bool],false)},{prop:"scanBool",name:"scanBool",pkg:"fmt",typ:$funcType([$Int32],[$Bool],false)},{prop:"getBase",name:"getBase",pkg:"fmt",typ:$funcType([$Int32],[$Int,$String],false)},{prop:"scanNumber",name:"scanNumber",pkg:"fmt",typ:$funcType([$String,$Bool],[$String],false)},{prop:"scanRune",name:"scanRune",pkg:"fmt",typ:$funcType([$Int],[$Int64],false)},{prop:"scanBasePrefix",name:"scanBasePrefix",pkg:"fmt",typ:$funcType([],[$Int,$String,$Bool],false)},{prop:"scanInt",name:"scanInt",pkg:"fmt",typ:$funcType([$Int32,$Int],[$Int64],false)},{prop:"scanUint",name:"scanUint",pkg:"fmt",typ:$funcType([$Int32,$Int],[$Uint64],false)},{prop:"floatToken",name:"floatToken",pkg:"fmt",typ:$funcType([],[$String],false)},{prop:"complexTokens",name:"complexTokens",pkg:"fmt",typ:$funcType([],[$String,$String],false)},{prop:"convertFloat",name:"convertFloat",pkg:"fmt",typ:$funcType([$String,$Int],[$Float64],false)},{prop:"scanComplex",name:"scanComplex",pkg:"fmt",typ:$funcType([$Int32,$Int],[$Complex128],false)},{prop:"convertString",name:"convertString",pkg:"fmt",typ:$funcType([$Int32],[$String],false)},{prop:"quotedString",name:"quotedString",pkg:"fmt",typ:$funcType([],[$String],false)},{prop:"hexDigit",name:"hexDigit",pkg:"fmt",typ:$funcType([$Int32],[$Int],false)},{prop:"hexByte",name:"hexByte",pkg:"fmt",typ:$funcType([],[$Uint8,$Bool],false)},{prop:"hexString",name:"hexString",pkg:"fmt",typ:$funcType([],[$String],false)},{prop:"scanOne",name:"scanOne",pkg:"fmt",typ:$funcType([$Int32,$emptyInterface],[],false)},{prop:"doScan",name:"doScan",pkg:"fmt",typ:$funcType([CF],[$Int,$error],false)},{prop:"advance",name:"advance",pkg:"fmt",typ:$funcType([$String],[$Int],false)},{prop:"doScanf",name:"doScanf",pkg:"fmt",typ:$funcType([$String,CF],[$Int,$error],false)}];L.init([{prop:"widPresent",name:"widPresent",pkg:"fmt",typ:$Bool,tag:""},{prop:"precPresent",name:"precPresent",pkg:"fmt",typ:$Bool,tag:""},{prop:"minus",name:"minus",pkg:"fmt",typ:$Bool,tag:""},{prop:"plus",name:"plus",pkg:"fmt",typ:$Bool,tag:""},{prop:"sharp",name:"sharp",pkg:"fmt",typ:$Bool,tag:""},{prop:"space",name:"space",pkg:"fmt",typ:$Bool,tag:""},{prop:"unicode",name:"unicode",pkg:"fmt",typ:$Bool,tag:""},{prop:"uniQuote",name:"uniQuote",pkg:"fmt",typ:$Bool,tag:""},{prop:"zero",name:"zero",pkg:"fmt",typ:$Bool,tag:""},{prop:"plusV",name:"plusV",pkg:"fmt",typ:$Bool,tag:""},{prop:"sharpV",name:"sharpV",pkg:"fmt",typ:$Bool,tag:""}]);M.init([{prop:"intbuf",name:"intbuf",pkg:"fmt",typ:DI,tag:""},{prop:"buf",name:"buf",pkg:"fmt",typ:CJ,tag:""},{prop:"wid",name:"wid",pkg:"fmt",typ:$Int,tag:""},{prop:"prec",name:"prec",pkg:"fmt",typ:$Int,tag:""},{prop:"fmtFlags",name:"",pkg:"fmt",typ:L,tag:""}]);AF.init([{prop:"Flag",name:"Flag",pkg:"",typ:$funcType([$Int],[$Bool],false)},{prop:"Precision",name:"Precision",pkg:"",typ:$funcType([],[$Int,$Bool],false)},{prop:"Width",name:"Width",pkg:"",typ:$funcType([],[$Int,$Bool],false)},{prop:"Write",name:"Write",pkg:"",typ:$funcType([CE],[$Int,$error],false)}]);AG.init([{prop:"Format",name:"Format",pkg:"",typ:$funcType([AF,$Int32],[],false)}]);AH.init([{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}]);AI.init([{prop:"GoString",name:"GoString",pkg:"",typ:$funcType([],[$String],false)}]);AJ.init($Uint8);AK.init([{prop:"n",name:"n",pkg:"fmt",typ:$Int,tag:""},{prop:"panicking",name:"panicking",pkg:"fmt",typ:$Bool,tag:""},{prop:"erroring",name:"erroring",pkg:"fmt",typ:$Bool,tag:""},{prop:"buf",name:"buf",pkg:"fmt",typ:AJ,tag:""},{prop:"arg",name:"arg",pkg:"fmt",typ:$emptyInterface,tag:""},{prop:"value",name:"value",pkg:"fmt",typ:G.Value,tag:""},{prop:"reordered",name:"reordered",pkg:"fmt",typ:$Bool,tag:""},{prop:"goodArgNum",name:"goodArgNum",pkg:"fmt",typ:$Bool,tag:""},{prop:"runeBuf",name:"runeBuf",pkg:"fmt",typ:CO,tag:""},{prop:"fmt",name:"fmt",pkg:"fmt",typ:M,tag:""}]);BE.init([{prop:"UnreadRune",name:"UnreadRune",pkg:"",typ:$funcType([],[$error],false)}]);BR.init([{prop:"err",name:"err",pkg:"fmt",typ:$error,tag:""}]);BS.init([{prop:"rr",name:"rr",pkg:"fmt",typ:E.RuneReader,tag:""},{prop:"buf",name:"buf",pkg:"fmt",typ:AJ,tag:""},{prop:"peekRune",name:"peekRune",pkg:"fmt",typ:$Int32,tag:""},{prop:"prevRune",name:"prevRune",pkg:"fmt",typ:$Int32,tag:""},{prop:"count",name:"count",pkg:"fmt",typ:$Int,tag:""},{prop:"atEOF",name:"atEOF",pkg:"fmt",typ:$Bool,tag:""},{prop:"ssave",name:"",pkg:"fmt",typ:BT,tag:""}]);BT.init([{prop:"validSave",name:"validSave",pkg:"fmt",typ:$Bool,tag:""},{prop:"nlIsEnd",name:"nlIsEnd",pkg:"fmt",typ:$Bool,tag:""},{prop:"nlIsSpace",name:"nlIsSpace",pkg:"fmt",typ:$Bool,tag:""},{prop:"argLimit",name:"argLimit",pkg:"fmt",typ:$Int,tag:""},{prop:"limit",name:"limit",pkg:"fmt",typ:$Int,tag:""},{prop:"maxWid",name:"maxWid",pkg:"fmt",typ:$Int,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_fmt=function(){while(true){switch($s){case 0:$r=D.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=F.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=G.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=6;case 6:if($r&&$r.$blocking){$r=$r();}$r=H.$init($BLOCKING);$s=7;case 7:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=8;case 8:if($r&&$r.$blocking){$r=$r();}I=$makeSlice(CE,65);J=$makeSlice(CE,65);N=new CE($stringToBytes("true"));O=new CE($stringToBytes("false"));Q=new CE($stringToBytes(", "));R=new CE($stringToBytes(""));S=new CE($stringToBytes("(nil)"));T=new CE($stringToBytes("nil"));U=new CE($stringToBytes("map["));V=new CE($stringToBytes("%!"));W=new CE($stringToBytes("(MISSING)"));X=new CE($stringToBytes("(BADINDEX)"));Y=new CE($stringToBytes("(PANIC="));Z=new CE($stringToBytes("%!(EXTRA "));AA=new CE($stringToBytes("i)"));AB=new CE($stringToBytes("[]byte{"));AC=new CE($stringToBytes("%!(BADWIDTH)"));AD=new CE($stringToBytes("%!(BADPREC)"));AE=new CE($stringToBytes("%!(NOVERB)"));AL=new H.Pool.ptr(0,0,CF.nil,(function(){return new AK.ptr();}));AZ=G.TypeOf(new $Int(0)).Bits();BA=G.TypeOf(new $Uintptr(0)).Bits();BB=G.TypeOf(new $Uint8(0));BU=new CH([$toNativeArray($kindUint16,[9,13]),$toNativeArray($kindUint16,[32,32]),$toNativeArray($kindUint16,[133,133]),$toNativeArray($kindUint16,[160,160]),$toNativeArray($kindUint16,[5760,5760]),$toNativeArray($kindUint16,[8192,8202]),$toNativeArray($kindUint16,[8232,8233]),$toNativeArray($kindUint16,[8239,8239]),$toNativeArray($kindUint16,[8287,8287]),$toNativeArray($kindUint16,[12288,12288])]);BY=new H.Pool.ptr(0,0,CF.nil,(function(){return new BS.ptr();}));CA=D.New("syntax error scanning complex number");CB=D.New("syntax error scanning boolean");K();}return;}};$init_fmt.$blocking=true;return $init_fmt;};return $pkg;})(); +$packages["sort"]=(function(){var $pkg={},U,AG,A,D,F,G,H,I,J,K,L,M,N;U=$pkg.StringSlice=$newType(12,$kindSlice,"sort.StringSlice","StringSlice","sort",null);AG=$sliceType($String);A=$pkg.Search=function(a,b){var a,b,c,d,e,f,g,h;c=0;d=a;e=c;f=d;while(true){if(!(e>0))/2,(g===g&&g!==1/0&&g!==-1/0)?g>>0:$throwRuntimeError("integer divide by zero"))>>0;if(!b(h)){e=h+1>>0;}else{f=h;}}return e;};D=$pkg.SearchStrings=function(a,b){var a,b;return A(a.$length,(function(c){var c;return((c<0||c>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+c])>=b;}));};U.prototype.Search=function(a){var a,b;b=this;return D($subslice(new AG(b.$array),b.$offset,b.$offset+b.$length),a);};$ptrType(U).prototype.Search=function(a){return this.$get().Search(a);};F=function(a,b){var a,b;if(a>0;while(true){if(!(db&&a.Less(e,e-1>>0))){break;}a.Swap(e,e-1>>0);e=e-(1)>>0;}d=d+(1)>>0;}};H=function(a,b,c,d){var a,b,c,d,e,f;e=b;while(true){if(!(true)){break;}f=(2*e>>0)+1>>0;if(f>=c){break;}if((f+1>>0)>0,(d+f>>0)+1>>0)){f=f+(1)>>0;}if(!a.Less(d+e>>0,d+f>>0)){return;}a.Swap(d+e>>0,d+f>>0);e=f;}};I=function(a,b,c){var a,b,c,d,e,f,g,h,i;d=b;e=0;f=c-b>>0;h=(g=((f-1>>0))/2,(g===g&&g!==1/0&&g!==-1/0)?g>>0:$throwRuntimeError("integer divide by zero"));while(true){if(!(h>=0)){break;}H(a,h,f,d);h=h-(1)>>0;}i=f-1>>0;while(true){if(!(i>=0)){break;}a.Swap(d,d+i>>0);H(a,e,i,d);i=i-(1)>>0;}};J=function(a,b,c,d){var a,b,c,d,e,f,g;e=c;f=b;g=d;if(a.Less(f,e)){a.Swap(f,e);}if(a.Less(g,f)){a.Swap(g,f);}if(a.Less(f,e)){a.Swap(f,e);}};K=function(a,b,c,d){var a,b,c,d,e;e=0;while(true){if(!(e>0,c+e>>0);e=e+(1)>>0;}};L=function(a,b,c){var a,b,c,d=0,e=0,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;g=b+(f=((c-b>>0))/2,(f===f&&f!==1/0&&f!==-1/0)?f>>0:$throwRuntimeError("integer divide by zero"))>>0;if((c-b>>0)>40){i=(h=((c-b>>0))/8,(h===h&&h!==1/0&&h!==-1/0)?h>>0:$throwRuntimeError("integer divide by zero"));J(a,b,b+i>>0,b+(2*i>>0)>>0);J(a,g,g-i>>0,g+i>>0);J(a,c-1>>0,(c-1>>0)-i>>0,(c-1>>0)-(2*i>>0)>>0);}J(a,b,g,c-1>>0);j=b;k=b+1>>0;l=b+1>>0;m=c;n=c;o=k;p=l;q=m;r=n;while(true){if(!(true)){break;}while(true){if(!(p>0;}else if(!a.Less(j,p)){a.Swap(o,p);o=o+(1)>>0;p=p+(1)>>0;}else{break;}}while(true){if(!(p>0)){q=q-(1)>>0;}else if(!a.Less(q-1>>0,j)){a.Swap(q-1>>0,r-1>>0);q=q-(1)>>0;r=r-(1)>>0;}else{break;}}if(p>=q){break;}a.Swap(p,q-1>>0);p=p+(1)>>0;q=q-(1)>>0;}s=F(p-o>>0,o-b>>0);K(a,b,p-s>>0,s);s=F(c-r>>0,r-q>>0);K(a,q,c-s>>0,s);t=(b+p>>0)-o>>0;u=c-((r-q>>0))>>0;d=t;e=u;return[d,e];};M=function(a,b,c,d){var a,b,c,d,e,f,g;while(true){if(!((c-b>>0)>7)){break;}if(d===0){I(a,b,c);return;}d=d-(1)>>0;e=L(a,b,c);f=e[0];g=e[1];if((f-b>>0)<(c-g>>0)){M(a,b,f,d);b=g;}else{M(a,g,c,d);c=f;}}if((c-b>>0)>1){G(a,b,c);}};N=$pkg.Sort=function(a){var a,b,c,d;b=a.Len();c=0;d=b;while(true){if(!(d>0)){break;}c=c+(1)>>0;d=(d>>$min((1),31))>>0;}c=c*(2)>>0;M(a,0,b,c);};U.prototype.Len=function(){var a;a=this;return a.$length;};$ptrType(U).prototype.Len=function(){return this.$get().Len();};U.prototype.Less=function(a,b){var a,b,c;c=this;return((a<0||a>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a])<((b<0||b>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+b]);};$ptrType(U).prototype.Less=function(a,b){return this.$get().Less(a,b);};U.prototype.Swap=function(a,b){var a,b,c,d,e;c=this;d=((b<0||b>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+b]);e=((a<0||a>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a]);(a<0||a>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a]=d;(b<0||b>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+b]=e;};$ptrType(U).prototype.Swap=function(a,b){return this.$get().Swap(a,b);};U.prototype.Sort=function(){var a;a=this;N(a);};$ptrType(U).prototype.Sort=function(){return this.$get().Sort();};U.methods=[{prop:"Search",name:"Search",pkg:"",typ:$funcType([$String],[$Int],false)},{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Less",name:"Less",pkg:"",typ:$funcType([$Int,$Int],[$Bool],false)},{prop:"Swap",name:"Swap",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"Sort",name:"Sort",pkg:"",typ:$funcType([],[],false)}];U.init($String);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_sort=function(){while(true){switch($s){case 0:}return;}};$init_sort.$blocking=true;return $init_sort;};return $pkg;})(); +$packages["regexp/syntax"]=(function(){var $pkg={},E,B,F,C,A,D,G,H,I,M,N,O,P,Z,AM,BK,BL,BN,BQ,BW,BX,CB,CC,CD,CE,CF,CG,CH,CI,CJ,CK,CL,CM,CN,CO,CP,CQ,K,L,AA,AR,AS,AT,AU,AV,AW,AX,AY,AZ,BA,BB,BC,BD,BE,BF,BG,BH,BI,BJ,BM,a,b,c,d,J,Q,R,S,T,U,V,W,X,Y,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AN,AO,AP,AQ,BO,BP,BR,BS,BT,BU,BV,BY,BZ,CA;E=$packages["bytes"];B=$packages["sort"];F=$packages["strconv"];C=$packages["strings"];A=$packages["unicode"];D=$packages["unicode/utf8"];G=$pkg.patchList=$newType(4,$kindUint32,"syntax.patchList","patchList","regexp/syntax",null);H=$pkg.frag=$newType(0,$kindStruct,"syntax.frag","frag","regexp/syntax",function(i_,out_){this.$val=this;this.i=i_!==undefined?i_:0;this.out=out_!==undefined?out_:0;});I=$pkg.compiler=$newType(0,$kindStruct,"syntax.compiler","compiler","regexp/syntax",function(p_){this.$val=this;this.p=p_!==undefined?p_:CL.nil;});M=$pkg.Error=$newType(0,$kindStruct,"syntax.Error","Error","regexp/syntax",function(Code_,Expr_){this.$val=this;this.Code=Code_!==undefined?Code_:"";this.Expr=Expr_!==undefined?Expr_:"";});N=$pkg.ErrorCode=$newType(8,$kindString,"syntax.ErrorCode","ErrorCode","regexp/syntax",null);O=$pkg.Flags=$newType(2,$kindUint16,"syntax.Flags","Flags","regexp/syntax",null);P=$pkg.parser=$newType(0,$kindStruct,"syntax.parser","parser","regexp/syntax",function(flags_,stack_,free_,numCap_,wholeRegexp_,tmpClass_){this.$val=this;this.flags=flags_!==undefined?flags_:0;this.stack=stack_!==undefined?stack_:CG.nil;this.free=free_!==undefined?free_:CF.nil;this.numCap=numCap_!==undefined?numCap_:0;this.wholeRegexp=wholeRegexp_!==undefined?wholeRegexp_:"";this.tmpClass=tmpClass_!==undefined?tmpClass_:CB.nil;});Z=$pkg.charGroup=$newType(0,$kindStruct,"syntax.charGroup","charGroup","regexp/syntax",function(sign_,class$1_){this.$val=this;this.sign=sign_!==undefined?sign_:0;this.class$1=class$1_!==undefined?class$1_:CB.nil;});AM=$pkg.ranges=$newType(0,$kindStruct,"syntax.ranges","ranges","regexp/syntax",function(p_){this.$val=this;this.p=p_!==undefined?p_:CJ.nil;});BK=$pkg.Prog=$newType(0,$kindStruct,"syntax.Prog","Prog","regexp/syntax",function(Inst_,Start_,NumCap_){this.$val=this;this.Inst=Inst_!==undefined?Inst_:CP.nil;this.Start=Start_!==undefined?Start_:0;this.NumCap=NumCap_!==undefined?NumCap_:0;});BL=$pkg.InstOp=$newType(1,$kindUint8,"syntax.InstOp","InstOp","regexp/syntax",null);BN=$pkg.EmptyOp=$newType(1,$kindUint8,"syntax.EmptyOp","EmptyOp","regexp/syntax",null);BQ=$pkg.Inst=$newType(0,$kindStruct,"syntax.Inst","Inst","regexp/syntax",function(Op_,Out_,Arg_,Rune_){this.$val=this;this.Op=Op_!==undefined?Op_:0;this.Out=Out_!==undefined?Out_:0;this.Arg=Arg_!==undefined?Arg_:0;this.Rune=Rune_!==undefined?Rune_:CB.nil;});BW=$pkg.Regexp=$newType(0,$kindStruct,"syntax.Regexp","Regexp","regexp/syntax",function(Op_,Flags_,Sub_,Sub0_,Rune_,Rune0_,Min_,Max_,Cap_,Name_){this.$val=this;this.Op=Op_!==undefined?Op_:0;this.Flags=Flags_!==undefined?Flags_:0;this.Sub=Sub_!==undefined?Sub_:CG.nil;this.Sub0=Sub0_!==undefined?Sub0_:CH.zero();this.Rune=Rune_!==undefined?Rune_:CB.nil;this.Rune0=Rune0_!==undefined?Rune0_:CI.zero();this.Min=Min_!==undefined?Min_:0;this.Max=Max_!==undefined?Max_:0;this.Cap=Cap_!==undefined?Cap_:0;this.Name=Name_!==undefined?Name_:"";});BX=$pkg.Op=$newType(1,$kindUint8,"syntax.Op","Op","regexp/syntax",null);CB=$sliceType($Int32);CC=$sliceType(A.Range16);CD=$sliceType(A.Range32);CE=$sliceType($String);CF=$ptrType(BW);CG=$sliceType(CF);CH=$arrayType(CF,1);CI=$arrayType($Int32,2);CJ=$ptrType(CB);CK=$ptrType(A.RangeTable);CL=$ptrType(BK);CM=$ptrType(I);CN=$ptrType(M);CO=$ptrType(P);CP=$sliceType(BQ);CQ=$ptrType(BQ);G.prototype.next=function(e){var e,f,g,h,i;f=this.$val;i=(g=e.Inst,h=f>>>1>>>0,((h<0||h>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]));if(((f&1)>>>0)===0){return(i.Out>>>0);}return(i.Arg>>>0);};$ptrType(G).prototype.next=function(e){return new G(this.$get()).next(e);};G.prototype.patch=function(e,f){var e,f,g,h,i,j;g=this.$val;while(true){if(!(!((g===0)))){break;}j=(h=e.Inst,i=g>>>1>>>0,((i<0||i>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i]));if(((g&1)>>>0)===0){g=(j.Out>>>0);j.Out=f;}else{g=(j.Arg>>>0);j.Arg=f;}}};$ptrType(G).prototype.patch=function(e,f){return new G(this.$get()).patch(e,f);};G.prototype.append=function(e,f){var e,f,g,h,i,j,k,l;g=this.$val;if(g===0){return f;}if(f===0){return g;}h=g;while(true){if(!(true)){break;}i=new G(h).next(e);if(i===0){break;}h=i;}l=(j=e.Inst,k=h>>>1>>>0,((k<0||k>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+k]));if(((h&1)>>>0)===0){l.Out=(f>>>0);}else{l.Arg=(f>>>0);}return g;};$ptrType(G).prototype.append=function(e,f){return new G(this.$get()).append(e,f);};J=$pkg.Compile=function(e){var e,f,g;f=$clone(new I.ptr(),I);f.init();g=$clone(f.compile(e),H);new G(g.out).patch(f.p,f.inst(4).i);f.p.Start=(g.i>>0);return[f.p,$ifaceNil];};I.ptr.prototype.init=function(){var e;e=this;e.p=new BK.ptr();e.p.NumCap=2;e.inst(5);};I.prototype.init=function(){return this.$val.init();};I.ptr.prototype.compile=function(e){var aa,ab,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;f=this;g=e.Op;if(g===1){return f.fail();}else if(g===2){return f.nop();}else if(g===3){if(e.Rune.$length===0){return f.nop();}h=$clone(new H.ptr(),H);i=e.Rune;j=0;while(true){if(!(j>0)),e.Flags),H);if(k===0){$copy(h,l,H);}else{$copy(h,f.cat(h,l),H);}j++;}return h;}else if(g===4){return f.rune(e.Rune,e.Flags);}else if(g===5){return f.rune(K,0);}else if(g===6){return f.rune(L,0);}else if(g===7){return f.empty(1);}else if(g===8){return f.empty(2);}else if(g===9){return f.empty(4);}else if(g===10){return f.empty(8);}else if(g===11){return f.empty(16);}else if(g===12){return f.empty(32);}else if(g===13){m=$clone(f.cap(((e.Cap<<1>>0)>>>0)),H);o=$clone(f.compile((n=e.Sub,((0<0||0>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+0]))),H);p=$clone(f.cap((((e.Cap<<1>>0)|1)>>>0)),H);return f.cat(f.cat(m,o),p);}else if(g===14){return f.star(f.compile((q=e.Sub,((0<0||0>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+0]))),!((((e.Flags&32)>>>0)===0)));}else if(g===15){return f.plus(f.compile((r=e.Sub,((0<0||0>=r.$length)?$throwRuntimeError("index out of range"):r.$array[r.$offset+0]))),!((((e.Flags&32)>>>0)===0)));}else if(g===16){return f.quest(f.compile((s=e.Sub,((0<0||0>=s.$length)?$throwRuntimeError("index out of range"):s.$array[s.$offset+0]))),!((((e.Flags&32)>>>0)===0)));}else if(g===18){if(e.Sub.$length===0){return f.nop();}t=$clone(new H.ptr(),H);u=e.Sub;v=0;while(true){if(!(v=u.$length)?$throwRuntimeError("index out of range"):u.$array[u.$offset+v]);if(w===0){$copy(t,f.compile(x),H);}else{$copy(t,f.cat(t,f.compile(x)),H);}v++;}return t;}else if(g===19){y=$clone(new H.ptr(),H);z=e.Sub;aa=0;while(true){if(!(aa=z.$length)?$throwRuntimeError("index out of range"):z.$array[z.$offset+aa]);$copy(y,f.alt(y,f.compile(ab)),H);aa++;}return y;}$panic(new $String("regexp: unhandled case in compile"));};I.prototype.compile=function(e){return this.$val.compile(e);};I.ptr.prototype.inst=function(e){var e,f,g;f=this;g=new H.ptr((f.p.Inst.$length>>>0),0);f.p.Inst=$append(f.p.Inst,new BQ.ptr(e,0,0,CB.nil));return g;};I.prototype.inst=function(e){return this.$val.inst(e);};I.ptr.prototype.nop=function(){var e,f;e=this;f=$clone(e.inst(6),H);f.out=((f.i<<1>>>0)>>>0);return f;};I.prototype.nop=function(){return this.$val.nop();};I.ptr.prototype.fail=function(){var e;e=this;return new H.ptr(0,0);};I.prototype.fail=function(){return this.$val.fail();};I.ptr.prototype.cap=function(e){var e,f,g,h,i;f=this;g=$clone(f.inst(2),H);g.out=((g.i<<1>>>0)>>>0);(h=f.p.Inst,i=g.i,((i<0||i>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i])).Arg=e;if(f.p.NumCap<((e>>0)+1>>0)){f.p.NumCap=(e>>0)+1>>0;}return g;};I.prototype.cap=function(e){return this.$val.cap(e);};I.ptr.prototype.cat=function(e,f){var e,f,g;g=this;f=$clone(f,H);e=$clone(e,H);if((e.i===0)||(f.i===0)){return new H.ptr(0,0);}new G(e.out).patch(g.p,f.i);return new H.ptr(e.i,f.out);};I.prototype.cat=function(e,f){return this.$val.cat(e,f);};I.ptr.prototype.alt=function(e,f){var e,f,g,h,i,j,k;g=this;f=$clone(f,H);e=$clone(e,H);if(e.i===0){return f;}if(f.i===0){return e;}h=$clone(g.inst(0),H);k=(i=g.p.Inst,j=h.i,((j<0||j>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]));k.Out=e.i;k.Arg=f.i;h.out=new G(e.out).append(g.p,f.out);return h;};I.prototype.alt=function(e,f){return this.$val.alt(e,f);};I.ptr.prototype.quest=function(e,f){var e,f,g,h,i,j,k;g=this;e=$clone(e,H);h=$clone(g.inst(0),H);k=(i=g.p.Inst,j=h.i,((j<0||j>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]));if(f){k.Arg=e.i;h.out=((h.i<<1>>>0)>>>0);}else{k.Out=e.i;h.out=((((h.i<<1>>>0)|1)>>>0)>>>0);}h.out=new G(h.out).append(g.p,e.out);return h;};I.prototype.quest=function(e,f){return this.$val.quest(e,f);};I.ptr.prototype.star=function(e,f){var e,f,g,h,i,j,k;g=this;e=$clone(e,H);h=$clone(g.inst(0),H);k=(i=g.p.Inst,j=h.i,((j<0||j>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]));if(f){k.Arg=e.i;h.out=((h.i<<1>>>0)>>>0);}else{k.Out=e.i;h.out=((((h.i<<1>>>0)|1)>>>0)>>>0);}new G(e.out).patch(g.p,h.i);return h;};I.prototype.star=function(e,f){return this.$val.star(e,f);};I.ptr.prototype.plus=function(e,f){var e,f,g;g=this;e=$clone(e,H);return new H.ptr(e.i,g.star(e,f).out);};I.prototype.plus=function(e,f){return this.$val.plus(e,f);};I.ptr.prototype.empty=function(e){var e,f,g,h,i;f=this;g=$clone(f.inst(3),H);(h=f.p.Inst,i=g.i,((i<0||i>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i])).Arg=(e>>>0);g.out=((g.i<<1>>>0)>>>0);return g;};I.prototype.empty=function(e){return this.$val.empty(e);};I.ptr.prototype.rune=function(e,f){var e,f,g,h,i,j,k;g=this;h=$clone(g.inst(7),H);k=(i=g.p.Inst,j=h.i,((j<0||j>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]));k.Rune=e;f=(f&(1))>>>0;if(!((e.$length===1))||(A.SimpleFold(((0<0||0>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]))===((0<0||0>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]))){f=f&~(1);}k.Arg=(f>>>0);h.out=((h.i<<1>>>0)>>>0);if((((f&1)>>>0)===0)&&((e.$length===1)||(e.$length===2)&&(((0<0||0>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+0])===((1<0||1>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+1])))){k.Op=8;}else if((e.$length===2)&&(((0<0||0>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+0])===0)&&(((1<0||1>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+1])===1114111)){k.Op=9;}else if((e.$length===4)&&(((0<0||0>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+0])===0)&&(((1<0||1>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+1])===9)&&(((2<0||2>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+2])===11)&&(((3<0||3>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+3])===1114111)){k.Op=10;}return h;};I.prototype.rune=function(e,f){return this.$val.rune(e,f);};M.ptr.prototype.Error=function(){var e;e=this;return"error parsing regexp: "+new N(e.Code).String()+": `"+e.Expr+"`";};M.prototype.Error=function(){return this.$val.Error();};N.prototype.String=function(){var e;e=this.$val;return e;};$ptrType(N).prototype.String=function(){return new N(this.$get()).String();};P.ptr.prototype.newRegexp=function(e){var e,f,g;f=this;g=f.free;if(!(g===CF.nil)){f.free=g.Sub0[0];$copy(g,new BW.ptr(0,0,CG.nil,CH.zero(),CB.nil,CI.zero(),0,0,0,""),BW);}else{g=new BW.ptr();}g.Op=e;return g;};P.prototype.newRegexp=function(e){return this.$val.newRegexp(e);};P.ptr.prototype.reuse=function(e){var e,f;f=this;e.Sub0[0]=f.free;f.free=e;};P.prototype.reuse=function(e){return this.$val.reuse(e);};P.ptr.prototype.push=function(e){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x;f=this;if((e.Op===4)&&(e.Rune.$length===2)&&((g=e.Rune,((0<0||0>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+0]))===(h=e.Rune,((1<0||1>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+1])))){if(f.maybeConcat((w=e.Rune,((0<0||0>=w.$length)?$throwRuntimeError("index out of range"):w.$array[w.$offset+0])),f.flags&~1)){return CF.nil;}e.Op=3;e.Rune=$subslice(e.Rune,0,1);e.Flags=f.flags&~1;}else if((e.Op===4)&&(e.Rune.$length===4)&&((i=e.Rune,((0<0||0>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+0]))===(j=e.Rune,((1<0||1>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+1])))&&((k=e.Rune,((2<0||2>=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+2]))===(l=e.Rune,((3<0||3>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+3])))&&(A.SimpleFold((m=e.Rune,((0<0||0>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+0])))===(n=e.Rune,((2<0||2>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+2])))&&(A.SimpleFold((o=e.Rune,((2<0||2>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+2])))===(p=e.Rune,((0<0||0>=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+0])))||(e.Op===4)&&(e.Rune.$length===2)&&(((q=e.Rune,((0<0||0>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+0]))+1>>0)===(r=e.Rune,((1<0||1>=r.$length)?$throwRuntimeError("index out of range"):r.$array[r.$offset+1])))&&(A.SimpleFold((s=e.Rune,((0<0||0>=s.$length)?$throwRuntimeError("index out of range"):s.$array[s.$offset+0])))===(t=e.Rune,((1<0||1>=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+1])))&&(A.SimpleFold((u=e.Rune,((1<0||1>=u.$length)?$throwRuntimeError("index out of range"):u.$array[u.$offset+1])))===(v=e.Rune,((0<0||0>=v.$length)?$throwRuntimeError("index out of range"):v.$array[v.$offset+0])))){if(f.maybeConcat((x=e.Rune,((0<0||0>=x.$length)?$throwRuntimeError("index out of range"):x.$array[x.$offset+0])),(f.flags|1)>>>0)){return CF.nil;}e.Op=3;e.Rune=$subslice(e.Rune,0,1);e.Flags=(f.flags|1)>>>0;}else{f.maybeConcat(-1,0);}f.stack=$append(f.stack,e);return e;};P.prototype.push=function(e){return this.$val.push(e);};P.ptr.prototype.maybeConcat=function(e,f){var e,f,g,h,i,j,k,l,m,n,o;g=this;h=g.stack.$length;if(h<2){return false;}k=(i=g.stack,j=h-1>>0,((j<0||j>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]));n=(l=g.stack,m=h-2>>0,((m<0||m>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+m]));if(!((k.Op===3))||!((n.Op===3))||!((((k.Flags&1)>>>0)===((n.Flags&1)>>>0)))){return false;}n.Rune=$appendSlice(n.Rune,k.Rune);if(e>=0){k.Rune=$subslice(new CB(k.Rune0),0,1);(o=k.Rune,(0<0||0>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+0]=e);k.Flags=f;return true;}g.stack=$subslice(g.stack,0,(h-1>>0));g.reuse(k);return false;};P.prototype.maybeConcat=function(e,f){return this.$val.maybeConcat(e,f);};P.ptr.prototype.newLiteral=function(e,f){var e,f,g,h;g=this;h=g.newRegexp(3);h.Flags=f;if(!((((f&1)>>>0)===0))){e=Q(e);}h.Rune0[0]=e;h.Rune=$subslice(new CB(h.Rune0),0,1);return h;};P.prototype.newLiteral=function(e,f){return this.$val.newLiteral(e,f);};Q=function(e){var e,f,g;if(e<65||e>71903){return e;}f=e;g=e;e=A.SimpleFold(e);while(true){if(!(!((e===g)))){break;}if(f>e){f=e;}e=A.SimpleFold(e);}return f;};P.ptr.prototype.literal=function(e){var e,f;f=this;f.push(f.newLiteral(e,f.flags));};P.prototype.literal=function(e){return this.$val.literal(e);};P.ptr.prototype.op=function(e){var e,f,g;f=this;g=f.newRegexp(e);g.Flags=f.flags;return f.push(g);};P.prototype.op=function(e){return this.$val.op(e);};P.ptr.prototype.repeat=function(e,f,g,h,i,j){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;k=this;l=k.flags;if(!((((k.flags&64)>>>0)===0))){if(i.length>0&&(i.charCodeAt(0)===63)){i=i.substring(1);l=(l^(32))<<16>>>16;}if(!(j==="")){return["",new M.ptr("invalid nested repetition operator",j.substring(0,(j.length-i.length>>0)))];}}m=k.stack.$length;if(m===0){return["",new M.ptr("missing argument to repetition operator",h.substring(0,(h.length-i.length>>0)))];}p=(n=k.stack,o=m-1>>0,((o<0||o>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+o]));if(p.Op>=128){return["",new M.ptr("missing argument to repetition operator",h.substring(0,(h.length-i.length>>0)))];}q=k.newRegexp(e);q.Min=f;q.Max=g;q.Flags=l;q.Sub=$subslice(new CG(q.Sub0),0,1);(r=q.Sub,(0<0||0>=r.$length)?$throwRuntimeError("index out of range"):r.$array[r.$offset+0]=p);(s=k.stack,t=m-1>>0,(t<0||t>=s.$length)?$throwRuntimeError("index out of range"):s.$array[s.$offset+t]=q);if((e===17)&&(f>=2||g>=2)&&!R(q,1000)){return["",new M.ptr("invalid repeat count",h.substring(0,(h.length-i.length>>0)))];}return[i,$ifaceNil];};P.prototype.repeat=function(e,f,g,h,i,j){return this.$val.repeat(e,f,g,h,i,j);};R=function(e,f){var e,f,g,h,i,j,k;if(e.Op===17){g=e.Max;if(g===0){return true;}if(g<0){g=e.Min;}if(g>f){return false;}if(g>0){f=(h=f/(g),(h===h&&h!==1/0&&h!==-1/0)?h>>0:$throwRuntimeError("integer divide by zero"));}}i=e.Sub;j=0;while(true){if(!(j=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]);if(!R(k,f)){return false;}j++;}return true;};P.ptr.prototype.concat=function(){var e,f,g,h,i;e=this;e.maybeConcat(-1,0);f=e.stack.$length;while(true){if(!(f>0&&(g=e.stack,h=f-1>>0,((h<0||h>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h])).Op<128)){break;}f=f-(1)>>0;}i=$subslice(e.stack,f);e.stack=$subslice(e.stack,0,f);if(i.$length===0){return e.push(e.newRegexp(2));}return e.push(e.collapse(i,18));};P.prototype.concat=function(){return this.$val.concat();};P.ptr.prototype.alternate=function(){var e,f,g,h,i,j;e=this;f=e.stack.$length;while(true){if(!(f>0&&(g=e.stack,h=f-1>>0,((h<0||h>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h])).Op<128)){break;}f=f-(1)>>0;}i=$subslice(e.stack,f);e.stack=$subslice(e.stack,0,f);if(i.$length>0){S((j=i.$length-1>>0,((j<0||j>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j])));}if(i.$length===0){return e.push(e.newRegexp(1));}return e.push(e.collapse(i,19));};P.prototype.alternate=function(){return this.$val.alternate();};S=function(e){var e,f,g,h,i,j,k,l;f=e.Op;if(f===4){e.Rune=AC(new CJ(function(){return this.$target.Rune;},function($v){this.$target.Rune=$v;},e));if((e.Rune.$length===2)&&((g=e.Rune,((0<0||0>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+0]))===0)&&((h=e.Rune,((1<0||1>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+1]))===1114111)){e.Rune=CB.nil;e.Op=6;return;}if((e.Rune.$length===4)&&((i=e.Rune,((0<0||0>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+0]))===0)&&((j=e.Rune,((1<0||1>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+1]))===9)&&((k=e.Rune,((2<0||2>=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+2]))===11)&&((l=e.Rune,((3<0||3>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+3]))===1114111)){e.Rune=CB.nil;e.Op=5;return;}if((e.Rune.$capacity-e.Rune.$length>>0)>100){e.Rune=$appendSlice($subslice(new CB(e.Rune0),0,0),e.Rune);}}};P.ptr.prototype.collapse=function(e,f){var e,f,g,h,i,j,k,l,m;g=this;if(e.$length===1){return((0<0||0>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]);}h=g.newRegexp(f);h.Sub=$subslice(new CG(h.Sub0),0,0);i=e;j=0;while(true){if(!(j=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]);if(k.Op===f){h.Sub=$appendSlice(h.Sub,k.Sub);g.reuse(k);}else{h.Sub=$append(h.Sub,k);}j++;}if(f===19){h.Sub=g.factor(h.Sub,h.Flags);if(h.Sub.$length===1){l=h;h=(m=h.Sub,((0<0||0>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+0]));g.reuse(l);}}return h;};P.prototype.collapse=function(e,f){return this.$val.collapse(e,f);};P.ptr.prototype.factor=function(e,f){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;g=this;if(e.$length<2){return e;}h=CB.nil;i=0;j=0;k=$subslice(e,0,0);l=0;while(true){if(!(l<=e.$length)){break;}m=CB.nil;n=0;if(l=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+l]));m=o[0];n=o[1];if(n===i){p=0;while(true){if(!(p=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+p])===((p<0||p>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+p])))){break;}p=p+(1)>>0;}if(p>0){h=$subslice(h,0,p);l=l+(1)>>0;continue;}}}if(l===j){}else if(l===(j+1>>0)){k=$append(k,((j<0||j>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+j]));}else{q=g.newRegexp(3);q.Flags=i;q.Rune=$appendSlice($subslice(q.Rune,0,0),h);r=j;while(true){if(!(r=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+r]=g.removeLeadingString(((r<0||r>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+r]),h.$length);r=r+(1)>>0;}s=g.collapse($subslice(e,j,l),19);t=g.newRegexp(18);t.Sub=$append($subslice(t.Sub,0,0),q,s);k=$append(k,t);}j=l;h=m;i=n;l=l+(1)>>0;}e=k;j=0;k=$subslice(e,0,0);u=CF.nil;v=0;while(true){if(!(v<=e.$length)){break;}w=CF.nil;if(v=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+v]));if(!(u===CF.nil)&&u.Equal(w)){v=v+(1)>>0;continue;}}if(v===j){}else if(v===(j+1>>0)){k=$append(k,((j<0||j>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+j]));}else{x=u;y=j;while(true){if(!(y=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+y]=g.removeLeadingRegexp(((y<0||y>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+y]),z);y=y+(1)>>0;}aa=g.collapse($subslice(e,j,v),19);ab=g.newRegexp(18);ab.Sub=$append($subslice(ab.Sub,0,0),x,aa);k=$append(k,ab);}j=v;u=w;v=v+(1)>>0;}e=k;j=0;k=$subslice(e,0,0);ac=0;while(true){if(!(ac<=e.$length)){break;}if(ac=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+ac]))){ac=ac+(1)>>0;continue;}if(ac===j){}else if(ac===(j+1>>0)){k=$append(k,((j<0||j>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+j]));}else{ad=j;ae=j+1>>0;while(true){if(!(ae=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+ad]).Op<((ae<0||ae>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+ae]).Op||(((ad<0||ad>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+ad]).Op===((ae<0||ae>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+ae]).Op)&&((ad<0||ad>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+ad]).Rune.$length<((ae<0||ae>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+ae]).Rune.$length){ad=ae;}ae=ae+(1)>>0;}af=((ad<0||ad>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+ad]);ag=((j<0||j>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+j]);(j<0||j>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+j]=af;(ad<0||ad>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+ad]=ag;ah=j+1>>0;while(true){if(!(ah=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+j]),((ah<0||ah>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+ah]));g.reuse(((ah<0||ah>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+ah]));ah=ah+(1)>>0;}S(((j<0||j>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+j]));k=$append(k,((j<0||j>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+j]));}if(ac=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+ac]));}j=ac+1>>0;ac=ac+(1)>>0;}e=k;j=0;k=$subslice(e,0,0);ai=e;aj=0;while(true){if(!(aj>0)=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+ak]).Op===2)&&((al=ak+1>>0,((al<0||al>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+al])).Op===2)){aj++;continue;}k=$append(k,((ak<0||ak>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+ak]));aj++;}e=k;return e;};P.prototype.factor=function(e,f){return this.$val.factor(e,f);};P.ptr.prototype.leadingString=function(e){var e,f,g;f=this;if((e.Op===18)&&e.Sub.$length>0){e=(g=e.Sub,((0<0||0>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+0]));}if(!((e.Op===3))){return[CB.nil,0];}return[e.Rune,(e.Flags&1)>>>0];};P.prototype.leadingString=function(e){return this.$val.leadingString(e);};P.ptr.prototype.removeLeadingString=function(e,f){var e,f,g,h,i,j,k,l,m;g=this;if((e.Op===18)&&e.Sub.$length>0){i=(h=e.Sub,((0<0||0>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+0]));i=g.removeLeadingString(i,f);(j=e.Sub,(0<0||0>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+0]=i);if(i.Op===2){g.reuse(i);k=e.Sub.$length;if(k===0||k===1){e.Op=2;e.Sub=CG.nil;}else if(k===2){l=e;e=(m=e.Sub,((1<0||1>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+1]));g.reuse(l);}else{$copySlice(e.Sub,$subslice(e.Sub,1));e.Sub=$subslice(e.Sub,0,(e.Sub.$length-1>>0));}}return e;}if(e.Op===3){e.Rune=$subslice(e.Rune,0,$copySlice(e.Rune,$subslice(e.Rune,f)));if(e.Rune.$length===0){e.Op=2;}}return e;};P.prototype.removeLeadingString=function(e,f){return this.$val.removeLeadingString(e,f);};P.ptr.prototype.leadingRegexp=function(e){var e,f,g,h;f=this;if(e.Op===2){return CF.nil;}if((e.Op===18)&&e.Sub.$length>0){h=(g=e.Sub,((0<0||0>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+0]));if(h.Op===2){return CF.nil;}return h;}return e;};P.prototype.leadingRegexp=function(e){return this.$val.leadingRegexp(e);};P.ptr.prototype.removeLeadingRegexp=function(e,f){var e,f,g,h,i,j,k;g=this;if((e.Op===18)&&e.Sub.$length>0){if(f){g.reuse((h=e.Sub,((0<0||0>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+0])));}e.Sub=$subslice(e.Sub,0,$copySlice(e.Sub,$subslice(e.Sub,1)));i=e.Sub.$length;if(i===0){e.Op=2;e.Sub=CG.nil;}else if(i===1){j=e;e=(k=e.Sub,((0<0||0>=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+0]));g.reuse(j);}return e;}if(f){g.reuse(e);}return g.newRegexp(2);};P.prototype.removeLeadingRegexp=function(e,f){return this.$val.removeLeadingRegexp(e,f);};T=function(e,f){var e,f,g,h,i,j,k;g=new BW.ptr(3,0,CG.nil,CH.zero(),CB.nil,CI.zero(),0,0,0,"");g.Flags=f;g.Rune=$subslice(new CB(g.Rune0),0,0);h=e;i=0;while(true){if(!(i=g.Rune.$capacity){g.Rune=new CB($stringToRunes(e));break;}g.Rune=$append(g.Rune,k);i+=j[1];}return g;};U=$pkg.Parse=function(e,f){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;if(!((((f&2)>>>0)===0))){g=AN(e);if(!($interfaceIsEqual(g,$ifaceNil))){return[CF.nil,g];}return[T(e,f),$ifaceNil];}h=$clone(new P.ptr(),P);i=$ifaceNil;j=0;k=0;l="";h.flags=f;h.wholeRegexp=e;m=e;while(true){if(!(!(m===""))){break;}n="";o=m.charCodeAt(0);BigSwitch:switch(0){default:if(o===40){if(!((((h.flags&64)>>>0)===0))&&m.length>=2&&(m.charCodeAt(1)===63)){p=h.parsePerlFlags(m);m=p[0];i=p[1];if(!($interfaceIsEqual(i,$ifaceNil))){return[CF.nil,i];}break;}h.numCap=h.numCap+(1)>>0;h.op(128).Cap=h.numCap;m=m.substring(1);}else if(o===124){i=h.parseVerticalBar();if(!($interfaceIsEqual(i,$ifaceNil))){return[CF.nil,i];}m=m.substring(1);}else if(o===41){i=h.parseRightParen();if(!($interfaceIsEqual(i,$ifaceNil))){return[CF.nil,i];}m=m.substring(1);}else if(o===94){if(!((((h.flags&16)>>>0)===0))){h.op(9);}else{h.op(7);}m=m.substring(1);}else if(o===36){if(!((((h.flags&16)>>>0)===0))){q=h.op(10);q.Flags=(q.Flags|(256))>>>0;}else{h.op(8);}m=m.substring(1);}else if(o===46){if(!((((h.flags&8)>>>0)===0))){h.op(6);}else{h.op(5);}m=m.substring(1);}else if(o===91){r=h.parseClass(m);m=r[0];i=r[1];if(!($interfaceIsEqual(i,$ifaceNil))){return[CF.nil,i];}}else if(o===42||o===43||o===63){s=m;t=m.charCodeAt(0);if(t===42){k=14;}else if(t===43){k=15;}else if(t===63){k=16;}u=m.substring(1);v=h.repeat(k,0,0,s,u,l);u=v[0];i=v[1];if(!($interfaceIsEqual(i,$ifaceNil))){return[CF.nil,i];}n=s;m=u;}else if(o===123){k=17;w=m;x=h.parseRepeat(m);y=x[0];z=x[1];aa=x[2];ab=x[3];if(!ab){h.literal(123);m=m.substring(1);break;}if(y<0||y>1000||z>1000||z>=0&&y>z){return[CF.nil,new M.ptr("invalid repeat count",w.substring(0,(w.length-aa.length>>0)))];}ac=h.repeat(k,y,z,w,aa,l);aa=ac[0];i=ac[1];if(!($interfaceIsEqual(i,$ifaceNil))){return[CF.nil,i];}n=w;m=aa;}else if(o===92){if(!((((h.flags&64)>>>0)===0))&&m.length>=2){ad=m.charCodeAt(1);if(ad===65){h.op(9);m=m.substring(2);break BigSwitch;}else if(ad===98){h.op(11);m=m.substring(2);break BigSwitch;}else if(ad===66){h.op(12);m=m.substring(2);break BigSwitch;}else if(ad===67){return[CF.nil,new M.ptr("invalid escape sequence",m.substring(0,2))];}else if(ad===81){ae="";af=C.Index(m,"\\E");if(af<0){ae=m.substring(2);m="";}else{ae=m.substring(2,af);m=m.substring((af+2>>0));}h.push(T(ae,h.flags));break BigSwitch;}else if(ad===122){h.op(10);m=m.substring(2);break BigSwitch;}}ag=h.newRegexp(4);ag.Flags=h.flags;if(m.length>=2&&((m.charCodeAt(1)===112)||(m.charCodeAt(1)===80))){ah=h.parseUnicodeClass(m,$subslice(new CB(ag.Rune0),0,0));ai=ah[0];aj=ah[1];ak=ah[2];if(!($interfaceIsEqual(ak,$ifaceNil))){return[CF.nil,ak];}if(!(ai===CB.nil)){ag.Rune=ai;m=aj;h.push(ag);break BigSwitch;}}al=h.parsePerlClassEscape(m,$subslice(new CB(ag.Rune0),0,0));am=al[0];an=al[1];if(!(am===CB.nil)){ag.Rune=am;m=an;h.push(ag);break BigSwitch;}h.reuse(ag);ao=h.parseEscape(m);j=ao[0];m=ao[1];i=ao[2];if(!($interfaceIsEqual(i,$ifaceNil))){return[CF.nil,i];}h.literal(j);}else{ap=AO(m);j=ap[0];m=ap[1];i=ap[2];if(!($interfaceIsEqual(i,$ifaceNil))){return[CF.nil,i];}h.literal(j);}}l=n;}h.concat();if(h.swapVerticalBar()){h.stack=$subslice(h.stack,0,(h.stack.$length-1>>0));}h.alternate();aq=h.stack.$length;if(!((aq===1))){return[CF.nil,new M.ptr("missing closing )",e)];}return[(ar=h.stack,((0<0||0>=ar.$length)?$throwRuntimeError("index out of range"):ar.$array[ar.$offset+0])),$ifaceNil];};P.ptr.prototype.parseRepeat=function(e){var e,f=0,g=0,h="",i=false,j,k,l,m;j=this;if(e===""||!((e.charCodeAt(0)===123))){return[f,g,h,i];}e=e.substring(1);k=false;l=j.parseInt(e);f=l[0];e=l[1];k=l[2];if(!k){return[f,g,h,i];}if(e===""){return[f,g,h,i];}if(!((e.charCodeAt(0)===44))){g=f;}else{e=e.substring(1);if(e===""){return[f,g,h,i];}if(e.charCodeAt(0)===125){g=-1;}else{m=j.parseInt(e);g=m[0];e=m[1];k=m[2];if(!k){return[f,g,h,i];}else if(g<0){f=-1;}}}if(e===""||!((e.charCodeAt(0)===125))){return[f,g,h,i];}h=e.substring(1);i=true;return[f,g,h,i];};P.prototype.parseRepeat=function(e){return this.$val.parseRepeat(e);};P.ptr.prototype.parsePerlFlags=function(e){var aa,ab,ac,ad,ae,af,ag,ah,ai,e,f="",g=$ifaceNil,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;h=this;i=e;if(i.length>4&&(i.charCodeAt(2)===80)&&(i.charCodeAt(3)===60)){j=C.IndexRune(i,62);if(j<0){g=AN(i);if(!($interfaceIsEqual(g,$ifaceNil))){k="";l=g;f=k;g=l;return[f,g];}m="";n=new M.ptr("invalid named capture",e);f=m;g=n;return[f,g];}o=i.substring(0,(j+1>>0));p=i.substring(4,j);g=AN(p);if(!($interfaceIsEqual(g,$ifaceNil))){q="";r=g;f=q;g=r;return[f,g];}if(!V(p)){s="";t=new M.ptr("invalid named capture",o);f=s;g=t;return[f,g];}h.numCap=h.numCap+(1)>>0;u=h.op(128);u.Cap=h.numCap;u.Name=p;v=i.substring((j+1>>0));w=$ifaceNil;f=v;g=w;return[f,g];}x=0;i=i.substring(2);y=h.flags;z=1;aa=false;Loop:while(true){if(!(!(i===""))){break;}ab=AO(i);x=ab[0];i=ab[1];g=ab[2];if(!($interfaceIsEqual(g,$ifaceNil))){ac="";ad=g;f=ac;g=ad;return[f,g];}ae=x;if(ae===105){y=(y|(1))>>>0;aa=true;}else if(ae===109){y=y&~(16);aa=true;}else if(ae===115){y=(y|(8))>>>0;aa=true;}else if(ae===85){y=(y|(32))>>>0;aa=true;}else if(ae===45){if(z<0){break Loop;}z=-1;y=~y<<16>>>16;aa=false;}else if(ae===58||ae===41){if(z<0){if(!aa){break Loop;}y=~y<<16>>>16;}if(x===58){h.op(128);}h.flags=y;af=i;ag=$ifaceNil;f=af;g=ag;return[f,g];}else{break Loop;}}ah="";ai=new M.ptr("invalid or unsupported Perl syntax",e.substring(0,(e.length-i.length>>0)));f=ah;g=ai;return[f,g];};P.prototype.parsePerlFlags=function(e){return this.$val.parsePerlFlags(e);};V=function(e){var e,f,g,h,i;if(e===""){return false;}f=e;g=0;while(true){if(!(g=2&&(e.charCodeAt(0)===48)&&48<=e.charCodeAt(1)&&e.charCodeAt(1)<=57){return[f,g,h];}j=e;while(true){if(!(!(e==="")&&48<=e.charCodeAt(0)&&e.charCodeAt(0)<=57)){break;}e=e.substring(1);}g=e;h=true;j=j.substring(0,(j.length-e.length>>0));k=0;while(true){if(!(k=100000000){f=-1;break;}f=((f*10>>0)+(j.charCodeAt(k)>>0)>>0)-48>>0;k=k+(1)>>0;}return[f,g,h];};P.prototype.parseInt=function(e){return this.$val.parseInt(e);};W=function(e){var e;return(e.Op===3)&&(e.Rune.$length===1)||(e.Op===4)||(e.Op===5)||(e.Op===6);};X=function(e,f){var e,f,g,h,i,j,k,l;g=e.Op;if(g===3){return(e.Rune.$length===1)&&((h=e.Rune,((0<0||0>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+0]))===f);}else if(g===4){i=0;while(true){if(!(i=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+i]))<=f&&f<=(k=e.Rune,l=i+1>>0,((l<0||l>=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+l]))){return true;}i=i+(2)>>0;}return false;}else if(g===5){return!((f===10));}else if(g===6){return true;}return false;};P.ptr.prototype.parseVerticalBar=function(){var e;e=this;e.concat();if(!e.swapVerticalBar()){e.op(129);}return $ifaceNil;};P.prototype.parseVerticalBar=function(){return this.$val.parseVerticalBar();};Y=function(e,f){var e,f,g,h,i,j,k,l;g=e.Op;switch(0){default:if(g===6){}else if(g===5){if(X(f,10)){e.Op=6;}}else if(g===4){if(f.Op===3){e.Rune=AD(e.Rune,(h=f.Rune,((0<0||0>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+0])),f.Flags);}else{e.Rune=AG(e.Rune,f.Rune);}}else if(g===3){if(((i=f.Rune,((0<0||0>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+0]))===(j=e.Rune,((0<0||0>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+0])))&&(f.Flags===e.Flags)){break;}e.Op=4;e.Rune=AD($subslice(e.Rune,0,0),(k=e.Rune,((0<0||0>=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+0])),e.Flags);e.Rune=AD(e.Rune,(l=f.Rune,((0<0||0>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+0])),f.Flags);}}};P.ptr.prototype.swapVerticalBar=function(){var aa,ab,ac,ad,ae,af,ag,ah,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;e=this;f=e.stack.$length;if(f>=3&&((g=e.stack,h=f-2>>0,((h<0||h>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h])).Op===129)&&W((i=e.stack,j=f-1>>0,((j<0||j>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j])))&&W((k=e.stack,l=f-3>>0,((l<0||l>=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+l])))){o=(m=e.stack,n=f-1>>0,((n<0||n>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+n]));r=(p=e.stack,q=f-3>>0,((q<0||q>=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+q]));if(o.Op>r.Op){s=r;t=o;o=s;r=t;(u=e.stack,v=f-3>>0,(v<0||v>=u.$length)?$throwRuntimeError("index out of range"):u.$array[u.$offset+v]=r);}Y(r,o);e.reuse(o);e.stack=$subslice(e.stack,0,(f-1>>0));return true;}if(f>=2){y=(w=e.stack,x=f-1>>0,((x<0||x>=w.$length)?$throwRuntimeError("index out of range"):w.$array[w.$offset+x]));ab=(z=e.stack,aa=f-2>>0,((aa<0||aa>=z.$length)?$throwRuntimeError("index out of range"):z.$array[z.$offset+aa]));if(ab.Op===129){if(f>=3){S((ac=e.stack,ad=f-3>>0,((ad<0||ad>=ac.$length)?$throwRuntimeError("index out of range"):ac.$array[ac.$offset+ad])));}(ae=e.stack,af=f-2>>0,(af<0||af>=ae.$length)?$throwRuntimeError("index out of range"):ae.$array[ae.$offset+af]=y);(ag=e.stack,ah=f-1>>0,(ah<0||ah>=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+ah]=ab);return true;}}return false;};P.prototype.swapVerticalBar=function(){return this.$val.swapVerticalBar();};P.ptr.prototype.parseRightParen=function(){var e,f,g,h,i,j,k,l,m;e=this;e.concat();if(e.swapVerticalBar()){e.stack=$subslice(e.stack,0,(e.stack.$length-1>>0));}e.alternate();f=e.stack.$length;if(f<2){return new M.ptr("unexpected )",e.wholeRegexp);}i=(g=e.stack,h=f-1>>0,((h<0||h>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]));l=(j=e.stack,k=f-2>>0,((k<0||k>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+k]));e.stack=$subslice(e.stack,0,(f-2>>0));if(!((l.Op===128))){return new M.ptr("unexpected )",e.wholeRegexp);}e.flags=l.Flags;if(l.Cap===0){e.push(i);}else{l.Op=13;l.Sub=$subslice(new CG(l.Sub0),0,1);(m=l.Sub,(0<0||0>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+0]=i);e.push(l);}return $ifaceNil;};P.prototype.parseRightParen=function(){return this.$val.parseRightParen();};P.ptr.prototype.parseEscape=function(e){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,e,f=0,g="",h=$ifaceNil,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;i=this;j=e.substring(1);if(j===""){k=0;l="";m=new M.ptr("trailing backslash at end of expression","");f=k;g=l;h=m;return[f,g,h];}n=AO(j);o=n[0];j=n[1];h=n[2];if(!($interfaceIsEqual(h,$ifaceNil))){p=0;q="";r=h;f=p;g=q;h=r;return[f,g,h];}s=o;Switch:switch(0){default:if(s===49||s===50||s===51||s===52||s===53||s===54||s===55){if(j===""||j.charCodeAt(0)<48||j.charCodeAt(0)>55){break;}f=o-48>>0;t=1;while(true){if(!(t<3)){break;}if(j===""||j.charCodeAt(0)<48||j.charCodeAt(0)>55){break;}f=(((((f>>>16<<16)*8>>0)+(f<<16>>>16)*8)>>0)+(j.charCodeAt(0)>>0)>>0)-48>>0;j=j.substring(1);t=t+(1)>>0;}u=f;v=j;w=$ifaceNil;f=u;g=v;h=w;return[f,g,h];}else if(s===48){f=o-48>>0;t=1;while(true){if(!(t<3)){break;}if(j===""||j.charCodeAt(0)<48||j.charCodeAt(0)>55){break;}f=(((((f>>>16<<16)*8>>0)+(f<<16>>>16)*8)>>0)+(j.charCodeAt(0)>>0)>>0)-48>>0;j=j.substring(1);t=t+(1)>>0;}x=f;y=j;z=$ifaceNil;f=x;g=y;h=z;return[f,g,h];}else if(s===120){if(j===""){break;}aa=AO(j);o=aa[0];j=aa[1];h=aa[2];if(!($interfaceIsEqual(h,$ifaceNil))){ab=0;ac="";ad=h;f=ab;g=ac;h=ad;return[f,g,h];}if(o===123){ae=0;f=0;while(true){if(!(true)){break;}if(j===""){break Switch;}af=AO(j);o=af[0];j=af[1];h=af[2];if(!($interfaceIsEqual(h,$ifaceNil))){ag=0;ah="";ai=h;f=ag;g=ah;h=ai;return[f,g,h];}if(o===125){break;}aj=AQ(o);if(aj<0){break Switch;}f=((((f>>>16<<16)*16>>0)+(f<<16>>>16)*16)>>0)+aj>>0;if(f>1114111){break Switch;}ae=ae+(1)>>0;}if(ae===0){break Switch;}ak=f;al=j;am=$ifaceNil;f=ak;g=al;h=am;return[f,g,h];}an=AQ(o);ao=AO(j);o=ao[0];j=ao[1];h=ao[2];if(!($interfaceIsEqual(h,$ifaceNil))){ap=0;aq="";ar=h;f=ap;g=aq;h=ar;return[f,g,h];}as=AQ(o);if(an<0||as<0){break;}at=((((an>>>16<<16)*16>>0)+(an<<16>>>16)*16)>>0)+as>>0;au=j;av=$ifaceNil;f=at;g=au;h=av;return[f,g,h];}else if(s===97){aw=7;ax=j;ay=h;f=aw;g=ax;h=ay;return[f,g,h];}else if(s===102){az=12;ba=j;bb=h;f=az;g=ba;h=bb;return[f,g,h];}else if(s===110){bc=10;bd=j;be=h;f=bc;g=bd;h=be;return[f,g,h];}else if(s===114){bf=13;bg=j;bh=h;f=bf;g=bg;h=bh;return[f,g,h];}else if(s===116){bi=9;bj=j;bk=h;f=bi;g=bj;h=bk;return[f,g,h];}else if(s===118){bl=11;bm=j;bn=h;f=bl;g=bm;h=bn;return[f,g,h];}else{if(o<128&&!AP(o)){bo=o;bp=j;bq=$ifaceNil;f=bo;g=bp;h=bq;return[f,g,h];}}}br=0;bs="";bt=new M.ptr("invalid escape sequence",e.substring(0,(e.length-j.length>>0)));f=br;g=bs;h=bt;return[f,g,h];};P.prototype.parseEscape=function(e){return this.$val.parseEscape(e);};P.ptr.prototype.parseClassChar=function(e,f){var e,f,g=0,h="",i=$ifaceNil,j,k,l,m,n,o;j=this;if(e===""){k=0;l="";m=new M.ptr("missing closing ]",f);g=k;h=l;i=m;return[g,h,i];}if(e.charCodeAt(0)===92){n=j.parseEscape(e);g=n[0];h=n[1];i=n[2];return[g,h,i];}o=AO(e);g=o[0];h=o[1];i=o[2];return[g,h,i];};P.prototype.parseClassChar=function(e,f){return this.$val.parseClassChar(e,f);};P.ptr.prototype.parsePerlClassEscape=function(e,f){var e,f,g=CB.nil,h="",i,j,k,l,m;i=this;if((((i.flags&64)>>>0)===0)||e.length<2||!((e.charCodeAt(0)===92))){return[g,h];}k=$clone((j=AU[e.substring(0,2)],j!==undefined?j.v:new Z.ptr()),Z);if(k.sign===0){return[g,h];}l=i.appendGroup(f,k);m=e.substring(2);g=l;h=m;return[g,h];};P.prototype.parsePerlClassEscape=function(e,f){return this.$val.parsePerlClassEscape(e,f);};P.ptr.prototype.parseNamedClass=function(e,f){var e,f,g=CB.nil,h="",i=$ifaceNil,j,k,l,m,n,o,p,q,r,s,t,u,v;j=this;if(e.length<2||!((e.charCodeAt(0)===91))||!((e.charCodeAt(1)===58))){return[g,h,i];}k=C.Index(e.substring(2),":]");if(k<0){return[g,h,i];}k=k+(2)>>0;l=e.substring(0,(k+2>>0));m=e.substring((k+2>>0));n=l;e=m;p=$clone((o=BJ[n],o!==undefined?o.v:new Z.ptr()),Z);if(p.sign===0){q=CB.nil;r="";s=new M.ptr("invalid character class range",n);g=q;h=r;i=s;return[g,h,i];}t=j.appendGroup(f,p);u=e;v=$ifaceNil;g=t;h=u;i=v;return[g,h,i];};P.prototype.parseNamedClass=function(e,f){return this.$val.parseNamedClass(e,f);};P.ptr.prototype.appendGroup=function(e,f){var e,f,g,h;g=this;f=$clone(f,Z);if(((g.flags&1)>>>0)===0){if(f.sign<0){e=AI(e,f.class$1);}else{e=AG(e,f.class$1);}}else{h=$subslice(g.tmpClass,0,0);h=AH(h,f.class$1);g.tmpClass=h;h=AC(new CJ(function(){return this.$target.tmpClass;},function($v){this.$target.tmpClass=$v;},g));if(f.sign<0){e=AI(e,h);}else{e=AG(e,h);}}return e;};P.prototype.appendGroup=function(e,f){return this.$val.appendGroup(e,f);};AB=function(e){var e,f,g,h,i,j,k;if(e==="Any"){return[AA,AA];}g=(f=A.Categories[e],f!==undefined?f.v:CK.nil);if(!(g===CK.nil)){return[g,(h=A.FoldCategory[e],h!==undefined?h.v:CK.nil)];}j=(i=A.Scripts[e],i!==undefined?i.v:CK.nil);if(!(j===CK.nil)){return[j,(k=A.FoldScript[e],k!==undefined?k.v:CK.nil)];}return[CK.nil,CK.nil];};P.ptr.prototype.parseUnicodeClass=function(e,f){var aa,ab,ac,ad,ae,af,ag,ah,e,f,g=CB.nil,h="",i=$ifaceNil,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;j=this;if((((j.flags&128)>>>0)===0)||e.length<2||!((e.charCodeAt(0)===92))||!((e.charCodeAt(1)===112))&&!((e.charCodeAt(1)===80))){return[g,h,i];}k=1;if(e.charCodeAt(1)===80){k=-1;}l=e.substring(2);m=AO(l);n=m[0];l=m[1];i=m[2];if(!($interfaceIsEqual(i,$ifaceNil))){return[g,h,i];}o="";p="";q=o;r=p;if(!((n===123))){q=e.substring(0,(e.length-l.length>>0));r=q.substring(2);}else{s=C.IndexRune(e,125);if(s<0){i=AN(e);if(!($interfaceIsEqual(i,$ifaceNil))){return[g,h,i];}t=CB.nil;u="";v=new M.ptr("invalid character class range",e);g=t;h=u;i=v;return[g,h,i];}w=e.substring(0,(s+1>>0));x=e.substring((s+1>>0));q=w;l=x;r=e.substring(3,s);i=AN(r);if(!($interfaceIsEqual(i,$ifaceNil))){return[g,h,i];}}if(!(r==="")&&(r.charCodeAt(0)===94)){k=-k;r=r.substring(1);}y=AB(r);z=y[0];aa=y[1];if(z===CK.nil){ab=CB.nil;ac="";ad=new M.ptr("invalid character class range",q);g=ab;h=ac;i=ad;return[g,h,i];}if((((j.flags&1)>>>0)===0)||aa===CK.nil){if(k>0){f=AJ(f,z);}else{f=AK(f,z);}}else{ae=$subslice(j.tmpClass,0,0);ae=AJ(ae,z);ae=AJ(ae,aa);j.tmpClass=ae;ae=AC(new CJ(function(){return this.$target.tmpClass;},function($v){this.$target.tmpClass=$v;},j));if(k>0){f=AG(f,ae);}else{f=AI(f,ae);}}af=f;ag=l;ah=$ifaceNil;g=af;h=ag;i=ah;return[g,h,i];};P.prototype.parseUnicodeClass=function(e,f){return this.$val.parseUnicodeClass(e,f);};P.ptr.prototype.parseClass=function(e){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,e,f="",g=$ifaceNil,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;h=this;i=e.substring(1);j=h.newRegexp(4);j.Flags=h.flags;j.Rune=$subslice(new CB(j.Rune0),0,0);k=1;if(!(i==="")&&(i.charCodeAt(0)===94)){k=-1;i=i.substring(1);if(((h.flags&4)>>>0)===0){j.Rune=$append(j.Rune,10,10);}}l=j.Rune;m=true;while(true){if(!(i===""||!((i.charCodeAt(0)===93))||m)){break;}if(!(i==="")&&(i.charCodeAt(0)===45)&&(((h.flags&64)>>>0)===0)&&!m&&((i.length===1)||!((i.charCodeAt(1)===93)))){n=D.DecodeRuneInString(i.substring(1));o=n[1];p="";q=new M.ptr("invalid character class range",i.substring(0,(1+o>>0)));f=p;g=q;return[f,g];}m=false;if(i.length>2&&(i.charCodeAt(0)===91)&&(i.charCodeAt(1)===58)){r=h.parseNamedClass(i,l);s=r[0];t=r[1];u=r[2];if(!($interfaceIsEqual(u,$ifaceNil))){v="";w=u;f=v;g=w;return[f,g];}if(!(s===CB.nil)){x=s;y=t;l=x;i=y;continue;}}z=h.parseUnicodeClass(i,l);aa=z[0];ab=z[1];ac=z[2];if(!($interfaceIsEqual(ac,$ifaceNil))){ad="";ae=ac;f=ad;g=ae;return[f,g];}if(!(aa===CB.nil)){af=aa;ag=ab;l=af;i=ag;continue;}ah=h.parsePerlClassEscape(i,l);ai=ah[0];aj=ah[1];if(!(ai===CB.nil)){ak=ai;al=aj;l=ak;i=al;continue;}am=i;an=0;ao=0;ap=an;aq=ao;ar=h.parseClassChar(i,e);ap=ar[0];i=ar[1];ac=ar[2];if(!($interfaceIsEqual(ac,$ifaceNil))){as="";at=ac;f=as;g=at;return[f,g];}aq=ap;if(i.length>=2&&(i.charCodeAt(0)===45)&&!((i.charCodeAt(1)===93))){i=i.substring(1);au=h.parseClassChar(i,e);aq=au[0];i=au[1];ac=au[2];if(!($interfaceIsEqual(ac,$ifaceNil))){av="";aw=ac;f=av;g=aw;return[f,g];}if(aq>0));ax="";ay=new M.ptr("invalid character class range",am);f=ax;g=ay;return[f,g];}}if(((h.flags&1)>>>0)===0){l=AE(l,ap,aq);}else{l=AF(l,ap,aq);}}i=i.substring(1);j.Rune=l;l=AC(new CJ(function(){return this.$target.Rune;},function($v){this.$target.Rune=$v;},j));if(k<0){l=AL(l);}j.Rune=l;h.push(j);az=i;ba=$ifaceNil;f=az;g=ba;return[f,g];};P.prototype.parseClass=function(e){return this.$val.parseClass(e);};AC=function(e){var e,f,g,h,i,j,k,l,m,n,o,p,q,r;B.Sort((f=new AM.ptr(e),new f.constructor.elem(f)));g=e.$get();if(g.$length<2){return g;}h=2;i=2;while(true){if(!(i=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+i]);k=(l=i+1>>0,((l<0||l>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+l]));m=j;n=k;if(m<=((o=h-1>>0,((o<0||o>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+o]))+1>>0)){if(n>(p=h-1>>0,((p<0||p>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+p]))){(q=h-1>>0,(q<0||q>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+q]=n);}i=i+(2)>>0;continue;}(h<0||h>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]=m;(r=h+1>>0,(r<0||r>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+r]=n);h=h+(2)>>0;i=i+(2)>>0;}return $subslice(g,0,h);};AD=function(e,f,g){var e,f,g;if(!((((g&1)>>>0)===0))){return AF(e,f,f);}return AE(e,f,f);};AE=function(e,f,g){var e,f,g,h,i,j,k,l,m,n,o,p,q;h=e.$length;i=2;while(true){if(!(i<=4)){break;}if(h>=i){j=(k=h-i>>0,((k<0||k>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+k]));l=(m=(h-i>>0)+1>>0,((m<0||m>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m]));n=j;o=l;if(f<=(o+1>>0)&&n<=(g+1>>0)){if(f>0,(p<0||p>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+p]=f);}if(g>o){(q=(h-i>>0)+1>>0,(q<0||q>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+q]=g);}return e;}}i=i+(2)>>0;}return $append(e,f,g);};AF=function(e,f,g){var e,f,g,h,i;if(f<=65&&g>=71903){return AE(e,f,g);}if(g<65||f>71903){return AE(e,f,g);}if(f<65){e=AE(e,f,64);f=65;}if(g>71903){e=AE(e,71904,g);g=71903;}h=f;while(true){if(!(h<=g)){break;}e=AE(e,h,h);i=A.SimpleFold(h);while(true){if(!(!((i===h)))){break;}e=AE(e,i,i);i=A.SimpleFold(i);}h=h+(1)>>0;}return e;};AG=function(e,f){var e,f,g,h;g=0;while(true){if(!(g=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]),(h=g+1>>0,((h<0||h>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+h])));g=g+(2)>>0;}return e;};AH=function(e,f){var e,f,g,h;g=0;while(true){if(!(g=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]),(h=g+1>>0,((h<0||h>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+h])));g=g+(2)>>0;}return e;};AI=function(e,f){var e,f,g,h,i,j,k,l,m;g=0;h=0;while(true){if(!(h=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+h]);j=(k=h+1>>0,((k<0||k>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+k]));l=i;m=j;if(g<=(l-1>>0)){e=AE(e,g,l-1>>0);}g=m+1>>0;h=h+(2)>>0;}if(g<=1114111){e=AE(e,g,1114111);}return e;};AJ=function(e,f){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;g=f.R16;h=0;while(true){if(!(h=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]),A.Range16);j=(i.Lo>>0);k=(i.Hi>>0);l=(i.Stride>>0);m=j;n=k;o=l;if(o===1){e=AE(e,m,n);h++;continue;}p=m;while(true){if(!(p<=n)){break;}e=AE(e,p,p);p=p+(o)>>0;}h++;}q=f.R32;r=0;while(true){if(!(r=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+r]),A.Range32);t=(s.Lo>>0);u=(s.Hi>>0);v=(s.Stride>>0);w=t;x=u;y=v;if(y===1){e=AE(e,w,x);r++;continue;}z=w;while(true){if(!(z<=x)){break;}e=AE(e,z,z);z=z+(y)>>0;}r++;}return e;};AK=function(e,f){var aa,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;g=0;h=f.R16;i=0;while(true){if(!(i=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i]),A.Range16);k=(j.Lo>>0);l=(j.Hi>>0);m=(j.Stride>>0);n=k;o=l;p=m;if(p===1){if(g<=(n-1>>0)){e=AE(e,g,n-1>>0);}g=o+1>>0;i++;continue;}q=n;while(true){if(!(q<=o)){break;}if(g<=(q-1>>0)){e=AE(e,g,q-1>>0);}g=q+1>>0;q=q+(p)>>0;}i++;}r=f.R32;s=0;while(true){if(!(s=r.$length)?$throwRuntimeError("index out of range"):r.$array[r.$offset+s]),A.Range32);u=(t.Lo>>0);v=(t.Hi>>0);w=(t.Stride>>0);x=u;y=v;z=w;if(z===1){if(g<=(x-1>>0)){e=AE(e,g,x-1>>0);}g=y+1>>0;s++;continue;}aa=x;while(true){if(!(aa<=y)){break;}if(g<=(aa-1>>0)){e=AE(e,g,aa-1>>0);}g=aa+1>>0;aa=aa+(z)>>0;}s++;}if(g<=1114111){e=AE(e,g,1114111);}return e;};AL=function(e){var e,f,g,h,i,j,k,l,m,n;f=0;g=0;h=0;while(true){if(!(h=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+h]);j=(k=h+1>>0,((k<0||k>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+k]));l=i;m=j;if(f<=(l-1>>0)){(g<0||g>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+g]=f;(n=g+1>>0,(n<0||n>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+n]=l-1>>0);g=g+(2)>>0;}f=m+1>>0;h=h+(2)>>0;}e=$subslice(e,0,g);if(f<=1114111){e=$append(e,f,1114111);}return e;};AM.ptr.prototype.Less=function(e,f){var e,f,g,h,i,j;g=$clone(this,AM);h=g.p.$get();e=e*(2)>>0;f=f*(2)>>0;return((e<0||e>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+e])<((f<0||f>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+f])||(((e<0||e>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+e])===((f<0||f>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+f]))&&(i=e+1>>0,((i<0||i>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i]))>(j=f+1>>0,((j<0||j>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+j]));};AM.prototype.Less=function(e,f){return this.$val.Less(e,f);};AM.ptr.prototype.Len=function(){var e,f;e=$clone(this,AM);return(f=e.p.$get().$length/2,(f===f&&f!==1/0&&f!==-1/0)?f>>0:$throwRuntimeError("integer divide by zero"));};AM.prototype.Len=function(){return this.$val.Len();};AM.ptr.prototype.Swap=function(e,f){var e,f,g,h,i,j,k,l,m,n,o,p;g=$clone(this,AM);h=g.p.$get();e=e*(2)>>0;f=f*(2)>>0;i=((f<0||f>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+f]);j=(k=f+1>>0,((k<0||k>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+k]));l=((e<0||e>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+e]);m=(n=e+1>>0,((n<0||n>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+n]));(e<0||e>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+e]=i;(o=e+1>>0,(o<0||o>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+o]=j);(f<0||f>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+f]=l;(p=f+1>>0,(p<0||p>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+p]=m);};AM.prototype.Swap=function(e,f){return this.$val.Swap(e,f);};AN=function(e){var e,f,g,h;while(true){if(!(!(e===""))){break;}f=D.DecodeRuneInString(e);g=f[0];h=f[1];if((g===65533)&&(h===1)){return new M.ptr("invalid UTF-8",e);}e=e.substring(h);}return $ifaceNil;};AO=function(e){var e,f=0,g="",h=$ifaceNil,i,j,k,l,m,n,o,p;i=D.DecodeRuneInString(e);f=i[0];j=i[1];if((f===65533)&&(j===1)){k=0;l="";m=new M.ptr("invalid UTF-8",e);f=k;g=l;h=m;return[f,g,h];}n=f;o=e.substring(j);p=$ifaceNil;f=n;g=o;h=p;return[f,g,h];};AP=function(e){var e;return 48<=e&&e<=57||65<=e&&e<=90||97<=e&&e<=122;};AQ=function(e){var e;if(48<=e&&e<=57){return e-48>>0;}if(97<=e&&e<=102){return(e-97>>0)+10>>0;}if(65<=e&&e<=70){return(e-65>>0)+10>>0;}return-1;};BL.prototype.String=function(){var e;e=this.$val;if((e>>>0)>=(BM.$length>>>0)){return"";}return((e<0||e>=BM.$length)?$throwRuntimeError("index out of range"):BM.$array[BM.$offset+e]);};$ptrType(BL).prototype.String=function(){return new BL(this.$get()).String();};BO=$pkg.EmptyOpContext=function(e,f){var e,f,g,h;g=32;h=0;if(BP(e)){h=1;}else if(e===10){g=(g|(1))>>>0;}else if(e<0){g=(g|(5))>>>0;}if(BP(f)){h=(h^(1))<<24>>>24;}else if(f===10){g=(g|(2))>>>0;}else if(f<0){g=(g|(10))>>>0;}if(!((h===0))){g=(g^(48))<<24>>>24;}return g;};BP=$pkg.IsWordChar=function(e){var e;return 65<=e&&e<=90||97<=e&&e<=122||48<=e&&e<=57||(e===95);};BK.ptr.prototype.String=function(){var e,f;e=this;f=$clone(new E.Buffer.ptr(),E.Buffer);BT(f,e);return f.String();};BK.prototype.String=function(){return this.$val.String();};BK.ptr.prototype.skipNop=function(e){var e,f,g,h,i;f=this;h=(g=f.Inst,((e<0||e>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+e]));while(true){if(!((h.Op===6)||(h.Op===2))){break;}e=h.Out;h=(i=f.Inst,((e<0||e>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+e]));}return[h,e];};BK.prototype.skipNop=function(e){return this.$val.skipNop(e);};BQ.ptr.prototype.op=function(){var e,f,g;e=this;f=e.Op;g=f;if(g===8||g===9||g===10){f=7;}return f;};BQ.prototype.op=function(){return this.$val.op();};BK.ptr.prototype.Prefix=function(){var e="",f=false,g,h,i,j,k,l,m,n,o,p;g=this;h=g.skipNop((g.Start>>>0));i=h[0];if(!((i.op()===7))||!((i.Rune.$length===1))){j="";k=i.Op===4;e=j;f=k;return[e,f];}l=$clone(new E.Buffer.ptr(),E.Buffer);while(true){if(!((i.op()===7)&&(i.Rune.$length===1)&&((((i.Arg<<16>>>16)&1)>>>0)===0))){break;}l.WriteRune((m=i.Rune,((0<0||0>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+0])));n=g.skipNop(i.Out);i=n[0];}o=l.String();p=i.Op===4;e=o;f=p;return[e,f];};BK.prototype.Prefix=function(){return this.$val.Prefix();};BK.ptr.prototype.StartCond=function(){var e,f,g,h,i,j,k;e=this;f=0;g=(e.Start>>>0);i=(h=e.Inst,((g<0||g>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+g]));Loop:while(true){if(!(true)){break;}j=i.Op;if(j===3){f=(f|((i.Arg<<24>>>24)))>>>0;}else if(j===5){return 255;}else if(j===2||j===6){}else{break Loop;}g=i.Out;i=(k=e.Inst,((g<0||g>=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+g]));}return f;};BK.prototype.StartCond=function(){return this.$val.StartCond();};BQ.ptr.prototype.MatchRune=function(e){var e,f;f=this;return!((f.MatchRunePos(e)===-1));};BQ.prototype.MatchRune=function(e){return this.$val.MatchRune(e);};BQ.ptr.prototype.MatchRunePos=function(e){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;f=this;g=f.Rune;if(g.$length===1){h=((0<0||0>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+0]);if(e===h){return 0;}if(!(((((f.Arg<<16>>>16)&1)>>>0)===0))){i=A.SimpleFold(h);while(true){if(!(!((i===h)))){break;}if(e===i){return 0;}i=A.SimpleFold(i);}}return-1;}j=0;while(true){if(!(j=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+j])){return-1;}if(e<=(k=j+1>>0,((k<0||k>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+k]))){return(l=j/2,(l===l&&l!==1/0&&l!==-1/0)?l>>0:$throwRuntimeError("integer divide by zero"));}j=j+(2)>>0;}m=0;o=(n=g.$length/2,(n===n&&n!==1/0&&n!==-1/0)?n>>0:$throwRuntimeError("integer divide by zero"));while(true){if(!(m>0))/2,(p===p&&p!==1/0&&p!==-1/0)?p>>0:$throwRuntimeError("integer divide by zero"))>>0;s=(r=2*q>>0,((r<0||r>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+r]));if(s<=e){if(e<=(t=(2*q>>0)+1>>0,((t<0||t>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+t]))){return q;}m=q+1>>0;}else{o=q;}}return-1;};BQ.prototype.MatchRunePos=function(e){return this.$val.MatchRunePos(e);};BR=function(e){var e;return(e===95)||(65<=e&&e<=90)||(97<=e&&e<=122)||(48<=e&&e<=57);};BQ.ptr.prototype.MatchEmptyWidth=function(e,f){var e,f,g,h;g=this;h=(g.Arg<<24>>>24);if(h===1){return(e===10)||(e===-1);}else if(h===2){return(f===10)||(f===-1);}else if(h===4){return e===-1;}else if(h===8){return f===-1;}else if(h===16){return!(BR(e)===BR(f));}else if(h===32){return BR(e)===BR(f);}$panic(new $String("unknown empty width arg"));};BQ.prototype.MatchEmptyWidth=function(e,f){return this.$val.MatchEmptyWidth(e,f);};BQ.ptr.prototype.String=function(){var e,f;e=this;f=$clone(new E.Buffer.ptr(),E.Buffer);BV(f,e);return f.String();};BQ.prototype.String=function(){return this.$val.String();};BS=function(e,f){var e,f,g,h,i;g=f;h=0;while(true){if(!(h=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]);e.WriteString(i);h++;}};BT=function(e,f){var e,f,g,h,i,j,k,l;g=f.Inst;h=0;while(true){if(!(h=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+i]));l=F.Itoa(i);if(l.length<3){e.WriteString(" ".substring(l.length));}if(i===f.Start){l=l+("*");}BS(e,new CE([l,"\t"]));BV(e,k);BS(e,new CE(["\n"]));h++;}};BU=function(e){var e;return F.FormatUint(new $Uint64(0,e),10);};BV=function(e,f){var e,f,g;g=f.Op;if(g===0){BS(e,new CE(["alt -> ",BU(f.Out),", ",BU(f.Arg)]));}else if(g===1){BS(e,new CE(["altmatch -> ",BU(f.Out),", ",BU(f.Arg)]));}else if(g===2){BS(e,new CE(["cap ",BU(f.Arg)," -> ",BU(f.Out)]));}else if(g===3){BS(e,new CE(["empty ",BU(f.Arg)," -> ",BU(f.Out)]));}else if(g===4){BS(e,new CE(["match"]));}else if(g===5){BS(e,new CE(["fail"]));}else if(g===6){BS(e,new CE(["nop -> ",BU(f.Out)]));}else if(g===7){if(f.Rune===CB.nil){BS(e,new CE(["rune "]));}BS(e,new CE(["rune ",F.QuoteToASCII($runesToString(f.Rune))]));if(!(((((f.Arg<<16>>>16)&1)>>>0)===0))){BS(e,new CE(["/i"]));}BS(e,new CE([" -> ",BU(f.Out)]));}else if(g===8){BS(e,new CE(["rune1 ",F.QuoteToASCII($runesToString(f.Rune))," -> ",BU(f.Out)]));}else if(g===9){BS(e,new CE(["any -> ",BU(f.Out)]));}else if(g===10){BS(e,new CE(["anynotnl -> ",BU(f.Out)]));}};BW.ptr.prototype.Equal=function(e){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;f=this;if(f===CF.nil||e===CF.nil){return f===e;}if(!((f.Op===e.Op))){return false;}g=f.Op;if(g===10){if(!((((f.Flags&256)>>>0)===((e.Flags&256)>>>0)))){return false;}}else if(g===3||g===4){if(!((f.Rune.$length===e.Rune.$length))){return false;}h=f.Rune;i=0;while(true){if(!(i=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i]);if(!((k===(l=e.Rune,((j<0||j>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+j]))))){return false;}i++;}}else if(g===19||g===18){if(!((f.Sub.$length===e.Sub.$length))){return false;}m=f.Sub;n=0;while(true){if(!(n=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+n]);if(!p.Equal((q=e.Sub,((o<0||o>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+o])))){return false;}n++;}}else if(g===14||g===15||g===16){if(!((((f.Flags&32)>>>0)===((e.Flags&32)>>>0)))||!(r=f.Sub,((0<0||0>=r.$length)?$throwRuntimeError("index out of range"):r.$array[r.$offset+0])).Equal((s=e.Sub,((0<0||0>=s.$length)?$throwRuntimeError("index out of range"):s.$array[s.$offset+0])))){return false;}}else if(g===17){if(!((((f.Flags&32)>>>0)===((e.Flags&32)>>>0)))||!((f.Min===e.Min))||!((f.Max===e.Max))||!(t=f.Sub,((0<0||0>=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+0])).Equal((u=e.Sub,((0<0||0>=u.$length)?$throwRuntimeError("index out of range"):u.$array[u.$offset+0])))){return false;}}else if(g===13){if(!((f.Cap===e.Cap))||!(f.Name===e.Name)||!(v=f.Sub,((0<0||0>=v.$length)?$throwRuntimeError("index out of range"):v.$array[v.$offset+0])).Equal((w=e.Sub,((0<0||0>=w.$length)?$throwRuntimeError("index out of range"):w.$array[w.$offset+0])))){return false;}}return true;};BW.prototype.Equal=function(e){return this.$val.Equal(e);};BY=function(e,f){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;g=f.Op;switch(0){default:if(g===1){e.WriteString("[^\\x00-\\x{10FFFF}]");}else if(g===2){e.WriteString("(?:)");}else if(g===3){if(!((((f.Flags&1)>>>0)===0))){e.WriteString("(?i:");}h=f.Rune;i=0;while(true){if(!(i=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i]);BZ(e,j,false);i++;}if(!((((f.Flags&1)>>>0)===0))){e.WriteString(")");}}else if(g===4){if(!(((k=f.Rune.$length%2,k===k?k:$throwRuntimeError("integer divide by zero"))===0))){e.WriteString("[invalid char class]");break;}e.WriteRune(91);if(f.Rune.$length===0){e.WriteString("^\\x00-\\x{10FFFF}");}else if(((l=f.Rune,((0<0||0>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+0]))===0)&&((m=f.Rune,n=f.Rune.$length-1>>0,((n<0||n>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+n]))===1114111)){e.WriteRune(94);o=1;while(true){if(!(o<(f.Rune.$length-1>>0))){break;}p=(q=f.Rune,((o<0||o>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+o]))+1>>0;r=(s=f.Rune,t=o+1>>0,((t<0||t>=s.$length)?$throwRuntimeError("index out of range"):s.$array[s.$offset+t]))-1>>0;u=p;v=r;BZ(e,u,u===45);if(!((u===v))){e.WriteRune(45);BZ(e,v,v===45);}o=o+(2)>>0;}}else{w=0;while(true){if(!(w=y.$length)?$throwRuntimeError("index out of range"):y.$array[y.$offset+w]));z=(aa=f.Rune,ab=w+1>>0,((ab<0||ab>=aa.$length)?$throwRuntimeError("index out of range"):aa.$array[aa.$offset+ab]));ac=x;ad=z;BZ(e,ac,ac===45);if(!((ac===ad))){e.WriteRune(45);BZ(e,ad,ad===45);}w=w+(2)>>0;}}e.WriteRune(93);}else if(g===5){e.WriteString("(?-s:.)");}else if(g===6){e.WriteString("(?s:.)");}else if(g===7){e.WriteRune(94);}else if(g===8){e.WriteRune(36);}else if(g===9){e.WriteString("\\A");}else if(g===10){if(!((((f.Flags&256)>>>0)===0))){e.WriteString("(?-m:$)");}else{e.WriteString("\\z");}}else if(g===11){e.WriteString("\\b");}else if(g===12){e.WriteString("\\B");}else if(g===13){if(!(f.Name==="")){e.WriteString("(?P<");e.WriteString(f.Name);e.WriteRune(62);}else{e.WriteRune(40);}if(!(((ae=f.Sub,((0<0||0>=ae.$length)?$throwRuntimeError("index out of range"):ae.$array[ae.$offset+0])).Op===2))){BY(e,(af=f.Sub,((0<0||0>=af.$length)?$throwRuntimeError("index out of range"):af.$array[af.$offset+0])));}e.WriteRune(41);}else if(g===14||g===15||g===16||g===17){ah=(ag=f.Sub,((0<0||0>=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+0]));if(ah.Op>13||(ah.Op===3)&&ah.Rune.$length>1){e.WriteString("(?:");BY(e,ah);e.WriteString(")");}else{BY(e,ah);}ai=f.Op;if(ai===14){e.WriteRune(42);}else if(ai===15){e.WriteRune(43);}else if(ai===16){e.WriteRune(63);}else if(ai===17){e.WriteRune(123);e.WriteString(F.Itoa(f.Min));if(!((f.Max===f.Min))){e.WriteRune(44);if(f.Max>=0){e.WriteString(F.Itoa(f.Max));}}e.WriteRune(125);}if(!((((f.Flags&32)>>>0)===0))){e.WriteRune(63);}}else if(g===18){aj=f.Sub;ak=0;while(true){if(!(ak=aj.$length)?$throwRuntimeError("index out of range"):aj.$array[aj.$offset+ak]);if(al.Op===19){e.WriteString("(?:");BY(e,al);e.WriteString(")");}else{BY(e,al);}ak++;}}else if(g===19){am=f.Sub;an=0;while(true){if(!(an=am.$length)?$throwRuntimeError("index out of range"):am.$array[am.$offset+an]);if(ao>0){e.WriteRune(124);}BY(e,ap);an++;}}else{e.WriteString(">0))+">");}}};BW.ptr.prototype.String=function(){var e,f;e=this;f=$clone(new E.Buffer.ptr(),E.Buffer);BY(f,e);return f.String();};BW.prototype.String=function(){return this.$val.String();};BZ=function(e,f,g){var e,f,g,h,i;if(A.IsPrint(f)){if(C.IndexRune("\\.+*?()|[]{}^$",f)>=0||g){e.WriteRune(92);}e.WriteRune(f);return;}h=f;switch(0){default:if(h===7){e.WriteString("\\a");}else if(h===12){e.WriteString("\\f");}else if(h===10){e.WriteString("\\n");}else if(h===13){e.WriteString("\\r");}else if(h===9){e.WriteString("\\t");}else if(h===11){e.WriteString("\\v");}else{if(f<256){e.WriteString("\\x");i=F.FormatInt(new $Int64(0,f),16);if(i.length===1){e.WriteRune(48);}e.WriteString(i);break;}e.WriteString("\\x{");e.WriteString(F.FormatInt(new $Int64(0,f),16));e.WriteString("}");}}};BW.ptr.prototype.MaxCap=function(){var e,f,g,h,i,j;e=this;f=0;if(e.Op===13){f=e.Cap;}g=e.Sub;h=0;while(true){if(!(h=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]);j=i.MaxCap();if(f>0));e.capNames(f);return f;};BW.prototype.CapNames=function(){return this.$val.CapNames();};BW.ptr.prototype.capNames=function(e){var e,f,g,h,i,j;f=this;if(f.Op===13){(g=f.Cap,(g<0||g>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+g]=f.Name);}h=f.Sub;i=0;while(true){if(!(i=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i]);j.capNames(e);i++;}};BW.prototype.capNames=function(e){return this.$val.capNames(e);};BW.ptr.prototype.Simplify=function(){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;e=this;if(e===CF.nil){return CF.nil;}f=e.Op;if(f===13||f===18||f===19){g=e;h=e.Sub;i=0;while(true){if(!(i=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i]);l=k.Simplify();if(g===e&&!(l===k)){g=new BW.ptr();$copy(g,e,BW);g.Rune=CB.nil;g.Sub=$appendSlice($subslice(new CG(g.Sub0),0,0),$subslice(e.Sub,0,j));}if(!(g===e)){g.Sub=$append(g.Sub,l);}i++;}return g;}else if(f===14||f===15||f===16){n=(m=e.Sub,((0<0||0>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+0])).Simplify();return CA(e.Op,e.Flags,n,e);}else if(f===17){if((e.Min===0)&&(e.Max===0)){return new BW.ptr(2,0,CG.nil,CH.zero(),CB.nil,CI.zero(),0,0,0,"");}p=(o=e.Sub,((0<0||0>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+0])).Simplify();if(e.Max===-1){if(e.Min===0){return CA(14,e.Flags,p,CF.nil);}if(e.Min===1){return CA(15,e.Flags,p,CF.nil);}q=new BW.ptr(18,0,CG.nil,CH.zero(),CB.nil,CI.zero(),0,0,0,"");q.Sub=$subslice(new CG(q.Sub0),0,0);r=0;while(true){if(!(r<(e.Min-1>>0))){break;}q.Sub=$append(q.Sub,p);r=r+(1)>>0;}q.Sub=$append(q.Sub,CA(15,e.Flags,p,CF.nil));return q;}if((e.Min===1)&&(e.Max===1)){return p;}s=CF.nil;if(e.Min>0){s=new BW.ptr(18,0,CG.nil,CH.zero(),CB.nil,CI.zero(),0,0,0,"");s.Sub=$subslice(new CG(s.Sub0),0,0);t=0;while(true){if(!(t>0;}}if(e.Max>e.Min){u=CA(16,e.Flags,p,CF.nil);v=e.Min+1>>0;while(true){if(!(v>0;}if(s===CF.nil){return u;}s.Sub=$append(s.Sub,u);}if(!(s===CF.nil)){return s;}return new BW.ptr(1,0,CG.nil,CH.zero(),CB.nil,CI.zero(),0,0,0,"");}return e;};BW.prototype.Simplify=function(){return this.$val.Simplify();};CA=function(e,f,g,h){var e,f,g,h,i;if(g.Op===2){return g;}if((e===g.Op)&&(((f&32)>>>0)===((g.Flags&32)>>>0))){return g;}if(!(h===CF.nil)&&(h.Op===e)&&(((h.Flags&32)>>>0)===((f&32)>>>0))&&g===(i=h.Sub,((0<0||0>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+0]))){return h;}h=new BW.ptr(e,f,CG.nil,CH.zero(),CB.nil,CI.zero(),0,0,0,"");h.Sub=$append($subslice(new CG(h.Sub0),0,0),g);return h;};G.methods=[{prop:"next",name:"next",pkg:"regexp/syntax",typ:$funcType([CL],[G],false)},{prop:"patch",name:"patch",pkg:"regexp/syntax",typ:$funcType([CL,$Uint32],[],false)},{prop:"append",name:"append",pkg:"regexp/syntax",typ:$funcType([CL,G],[G],false)}];CM.methods=[{prop:"init",name:"init",pkg:"regexp/syntax",typ:$funcType([],[],false)},{prop:"compile",name:"compile",pkg:"regexp/syntax",typ:$funcType([CF],[H],false)},{prop:"inst",name:"inst",pkg:"regexp/syntax",typ:$funcType([BL],[H],false)},{prop:"nop",name:"nop",pkg:"regexp/syntax",typ:$funcType([],[H],false)},{prop:"fail",name:"fail",pkg:"regexp/syntax",typ:$funcType([],[H],false)},{prop:"cap",name:"cap",pkg:"regexp/syntax",typ:$funcType([$Uint32],[H],false)},{prop:"cat",name:"cat",pkg:"regexp/syntax",typ:$funcType([H,H],[H],false)},{prop:"alt",name:"alt",pkg:"regexp/syntax",typ:$funcType([H,H],[H],false)},{prop:"quest",name:"quest",pkg:"regexp/syntax",typ:$funcType([H,$Bool],[H],false)},{prop:"star",name:"star",pkg:"regexp/syntax",typ:$funcType([H,$Bool],[H],false)},{prop:"plus",name:"plus",pkg:"regexp/syntax",typ:$funcType([H,$Bool],[H],false)},{prop:"empty",name:"empty",pkg:"regexp/syntax",typ:$funcType([BN],[H],false)},{prop:"rune",name:"rune",pkg:"regexp/syntax",typ:$funcType([CB,O],[H],false)}];CN.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];N.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];CO.methods=[{prop:"newRegexp",name:"newRegexp",pkg:"regexp/syntax",typ:$funcType([BX],[CF],false)},{prop:"reuse",name:"reuse",pkg:"regexp/syntax",typ:$funcType([CF],[],false)},{prop:"push",name:"push",pkg:"regexp/syntax",typ:$funcType([CF],[CF],false)},{prop:"maybeConcat",name:"maybeConcat",pkg:"regexp/syntax",typ:$funcType([$Int32,O],[$Bool],false)},{prop:"newLiteral",name:"newLiteral",pkg:"regexp/syntax",typ:$funcType([$Int32,O],[CF],false)},{prop:"literal",name:"literal",pkg:"regexp/syntax",typ:$funcType([$Int32],[],false)},{prop:"op",name:"op",pkg:"regexp/syntax",typ:$funcType([BX],[CF],false)},{prop:"repeat",name:"repeat",pkg:"regexp/syntax",typ:$funcType([BX,$Int,$Int,$String,$String,$String],[$String,$error],false)},{prop:"concat",name:"concat",pkg:"regexp/syntax",typ:$funcType([],[CF],false)},{prop:"alternate",name:"alternate",pkg:"regexp/syntax",typ:$funcType([],[CF],false)},{prop:"collapse",name:"collapse",pkg:"regexp/syntax",typ:$funcType([CG,BX],[CF],false)},{prop:"factor",name:"factor",pkg:"regexp/syntax",typ:$funcType([CG,O],[CG],false)},{prop:"leadingString",name:"leadingString",pkg:"regexp/syntax",typ:$funcType([CF],[CB,O],false)},{prop:"removeLeadingString",name:"removeLeadingString",pkg:"regexp/syntax",typ:$funcType([CF,$Int],[CF],false)},{prop:"leadingRegexp",name:"leadingRegexp",pkg:"regexp/syntax",typ:$funcType([CF],[CF],false)},{prop:"removeLeadingRegexp",name:"removeLeadingRegexp",pkg:"regexp/syntax",typ:$funcType([CF,$Bool],[CF],false)},{prop:"parseRepeat",name:"parseRepeat",pkg:"regexp/syntax",typ:$funcType([$String],[$Int,$Int,$String,$Bool],false)},{prop:"parsePerlFlags",name:"parsePerlFlags",pkg:"regexp/syntax",typ:$funcType([$String],[$String,$error],false)},{prop:"parseInt",name:"parseInt",pkg:"regexp/syntax",typ:$funcType([$String],[$Int,$String,$Bool],false)},{prop:"parseVerticalBar",name:"parseVerticalBar",pkg:"regexp/syntax",typ:$funcType([],[$error],false)},{prop:"swapVerticalBar",name:"swapVerticalBar",pkg:"regexp/syntax",typ:$funcType([],[$Bool],false)},{prop:"parseRightParen",name:"parseRightParen",pkg:"regexp/syntax",typ:$funcType([],[$error],false)},{prop:"parseEscape",name:"parseEscape",pkg:"regexp/syntax",typ:$funcType([$String],[$Int32,$String,$error],false)},{prop:"parseClassChar",name:"parseClassChar",pkg:"regexp/syntax",typ:$funcType([$String,$String],[$Int32,$String,$error],false)},{prop:"parsePerlClassEscape",name:"parsePerlClassEscape",pkg:"regexp/syntax",typ:$funcType([$String,CB],[CB,$String],false)},{prop:"parseNamedClass",name:"parseNamedClass",pkg:"regexp/syntax",typ:$funcType([$String,CB],[CB,$String,$error],false)},{prop:"appendGroup",name:"appendGroup",pkg:"regexp/syntax",typ:$funcType([CB,Z],[CB],false)},{prop:"parseUnicodeClass",name:"parseUnicodeClass",pkg:"regexp/syntax",typ:$funcType([$String,CB],[CB,$String,$error],false)},{prop:"parseClass",name:"parseClass",pkg:"regexp/syntax",typ:$funcType([$String],[$String,$error],false)}];AM.methods=[{prop:"Less",name:"Less",pkg:"",typ:$funcType([$Int,$Int],[$Bool],false)},{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Swap",name:"Swap",pkg:"",typ:$funcType([$Int,$Int],[],false)}];CL.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"skipNop",name:"skipNop",pkg:"regexp/syntax",typ:$funcType([$Uint32],[CQ,$Uint32],false)},{prop:"Prefix",name:"Prefix",pkg:"",typ:$funcType([],[$String,$Bool],false)},{prop:"StartCond",name:"StartCond",pkg:"",typ:$funcType([],[BN],false)}];BL.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];CQ.methods=[{prop:"op",name:"op",pkg:"regexp/syntax",typ:$funcType([],[BL],false)},{prop:"MatchRune",name:"MatchRune",pkg:"",typ:$funcType([$Int32],[$Bool],false)},{prop:"MatchRunePos",name:"MatchRunePos",pkg:"",typ:$funcType([$Int32],[$Int],false)},{prop:"MatchEmptyWidth",name:"MatchEmptyWidth",pkg:"",typ:$funcType([$Int32,$Int32],[$Bool],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];CF.methods=[{prop:"Equal",name:"Equal",pkg:"",typ:$funcType([CF],[$Bool],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"MaxCap",name:"MaxCap",pkg:"",typ:$funcType([],[$Int],false)},{prop:"CapNames",name:"CapNames",pkg:"",typ:$funcType([],[CE],false)},{prop:"capNames",name:"capNames",pkg:"regexp/syntax",typ:$funcType([CE],[],false)},{prop:"Simplify",name:"Simplify",pkg:"",typ:$funcType([],[CF],false)}];H.init([{prop:"i",name:"i",pkg:"regexp/syntax",typ:$Uint32,tag:""},{prop:"out",name:"out",pkg:"regexp/syntax",typ:G,tag:""}]);I.init([{prop:"p",name:"p",pkg:"regexp/syntax",typ:CL,tag:""}]);M.init([{prop:"Code",name:"Code",pkg:"",typ:N,tag:""},{prop:"Expr",name:"Expr",pkg:"",typ:$String,tag:""}]);P.init([{prop:"flags",name:"flags",pkg:"regexp/syntax",typ:O,tag:""},{prop:"stack",name:"stack",pkg:"regexp/syntax",typ:CG,tag:""},{prop:"free",name:"free",pkg:"regexp/syntax",typ:CF,tag:""},{prop:"numCap",name:"numCap",pkg:"regexp/syntax",typ:$Int,tag:""},{prop:"wholeRegexp",name:"wholeRegexp",pkg:"regexp/syntax",typ:$String,tag:""},{prop:"tmpClass",name:"tmpClass",pkg:"regexp/syntax",typ:CB,tag:""}]);Z.init([{prop:"sign",name:"sign",pkg:"regexp/syntax",typ:$Int,tag:""},{prop:"class$1",name:"class",pkg:"regexp/syntax",typ:CB,tag:""}]);AM.init([{prop:"p",name:"p",pkg:"regexp/syntax",typ:CJ,tag:""}]);BK.init([{prop:"Inst",name:"Inst",pkg:"",typ:CP,tag:""},{prop:"Start",name:"Start",pkg:"",typ:$Int,tag:""},{prop:"NumCap",name:"NumCap",pkg:"",typ:$Int,tag:""}]);BQ.init([{prop:"Op",name:"Op",pkg:"",typ:BL,tag:""},{prop:"Out",name:"Out",pkg:"",typ:$Uint32,tag:""},{prop:"Arg",name:"Arg",pkg:"",typ:$Uint32,tag:""},{prop:"Rune",name:"Rune",pkg:"",typ:CB,tag:""}]);BW.init([{prop:"Op",name:"Op",pkg:"",typ:BX,tag:""},{prop:"Flags",name:"Flags",pkg:"",typ:O,tag:""},{prop:"Sub",name:"Sub",pkg:"",typ:CG,tag:""},{prop:"Sub0",name:"Sub0",pkg:"",typ:CH,tag:""},{prop:"Rune",name:"Rune",pkg:"",typ:CB,tag:""},{prop:"Rune0",name:"Rune0",pkg:"",typ:CI,tag:""},{prop:"Min",name:"Min",pkg:"",typ:$Int,tag:""},{prop:"Max",name:"Max",pkg:"",typ:$Int,tag:""},{prop:"Cap",name:"Cap",pkg:"",typ:$Int,tag:""},{prop:"Name",name:"Name",pkg:"",typ:$String,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_syntax=function(){while(true){switch($s){case 0:$r=E.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=F.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=6;case 6:if($r&&$r.$blocking){$r=$r();}K=new CB([0,9,11,1114111]);L=new CB([0,1114111]);AA=new A.RangeTable.ptr(new CC([new A.Range16.ptr(0,65535,1)]),new CD([new A.Range32.ptr(65536,1114111,1)]),0);AR=new CB([48,57]);AS=new CB([9,10,12,13,32,32]);AT=new CB([48,57,65,90,95,95,97,122]);AU=(a=new $Map(),b="\\d",a[b]={k:b,v:new Z.ptr(1,AR)},b="\\D",a[b]={k:b,v:new Z.ptr(-1,AR)},b="\\s",a[b]={k:b,v:new Z.ptr(1,AS)},b="\\S",a[b]={k:b,v:new Z.ptr(-1,AS)},b="\\w",a[b]={k:b,v:new Z.ptr(1,AT)},b="\\W",a[b]={k:b,v:new Z.ptr(-1,AT)},a);AV=new CB([48,57,65,90,97,122]);AW=new CB([65,90,97,122]);AX=new CB([0,127]);AY=new CB([9,9,32,32]);AZ=new CB([0,31,127,127]);BA=new CB([48,57]);BB=new CB([33,126]);BC=new CB([97,122]);BD=new CB([32,126]);BE=new CB([33,47,58,64,91,96,123,126]);BF=new CB([9,13,32,32]);BG=new CB([65,90]);BH=new CB([48,57,65,90,95,95,97,122]);BI=new CB([48,57,65,70,97,102]);BJ=(c=new $Map(),d="[:alnum:]",c[d]={k:d,v:new Z.ptr(1,AV)},d="[:^alnum:]",c[d]={k:d,v:new Z.ptr(-1,AV)},d="[:alpha:]",c[d]={k:d,v:new Z.ptr(1,AW)},d="[:^alpha:]",c[d]={k:d,v:new Z.ptr(-1,AW)},d="[:ascii:]",c[d]={k:d,v:new Z.ptr(1,AX)},d="[:^ascii:]",c[d]={k:d,v:new Z.ptr(-1,AX)},d="[:blank:]",c[d]={k:d,v:new Z.ptr(1,AY)},d="[:^blank:]",c[d]={k:d,v:new Z.ptr(-1,AY)},d="[:cntrl:]",c[d]={k:d,v:new Z.ptr(1,AZ)},d="[:^cntrl:]",c[d]={k:d,v:new Z.ptr(-1,AZ)},d="[:digit:]",c[d]={k:d,v:new Z.ptr(1,BA)},d="[:^digit:]",c[d]={k:d,v:new Z.ptr(-1,BA)},d="[:graph:]",c[d]={k:d,v:new Z.ptr(1,BB)},d="[:^graph:]",c[d]={k:d,v:new Z.ptr(-1,BB)},d="[:lower:]",c[d]={k:d,v:new Z.ptr(1,BC)},d="[:^lower:]",c[d]={k:d,v:new Z.ptr(-1,BC)},d="[:print:]",c[d]={k:d,v:new Z.ptr(1,BD)},d="[:^print:]",c[d]={k:d,v:new Z.ptr(-1,BD)},d="[:punct:]",c[d]={k:d,v:new Z.ptr(1,BE)},d="[:^punct:]",c[d]={k:d,v:new Z.ptr(-1,BE)},d="[:space:]",c[d]={k:d,v:new Z.ptr(1,BF)},d="[:^space:]",c[d]={k:d,v:new Z.ptr(-1,BF)},d="[:upper:]",c[d]={k:d,v:new Z.ptr(1,BG)},d="[:^upper:]",c[d]={k:d,v:new Z.ptr(-1,BG)},d="[:word:]",c[d]={k:d,v:new Z.ptr(1,BH)},d="[:^word:]",c[d]={k:d,v:new Z.ptr(-1,BH)},d="[:xdigit:]",c[d]={k:d,v:new Z.ptr(1,BI)},d="[:^xdigit:]",c[d]={k:d,v:new Z.ptr(-1,BI)},c);BM=new CE(["InstAlt","InstAltMatch","InstCapture","InstEmptyWidth","InstMatch","InstFail","InstNop","InstRune","InstRune1","InstRuneAny","InstRuneAnyNotNL"]);}return;}};$init_syntax.$blocking=true;return $init_syntax;};return $pkg;})(); +$packages["flag"]=(function(){var $pkg={},A,B,C,D,E,F,G,H,J,K,M,O,Q,S,U,W,Y,AA,AB,AC,BI,BJ,BK,BL,BM,BN,BO,BP,BQ,BR,BS,BT,BU,BV,BW,BX,BY,BZ,CA,CB,CC,CD,CE,CF,a,I,L,N,P,R,T,V,X,AD,AI,AJ,AP,AR,AZ,BD,BH;A=$packages["errors"];B=$packages["fmt"];C=$packages["io"];D=$packages["os"];E=$packages["sort"];F=$packages["strconv"];G=$packages["time"];H=$pkg.boolValue=$newType(1,$kindBool,"flag.boolValue","boolValue","flag",null);J=$pkg.boolFlag=$newType(8,$kindInterface,"flag.boolFlag","boolFlag","flag",null);K=$pkg.intValue=$newType(4,$kindInt,"flag.intValue","intValue","flag",null);M=$pkg.int64Value=$newType(8,$kindInt64,"flag.int64Value","int64Value","flag",null);O=$pkg.uintValue=$newType(4,$kindUint,"flag.uintValue","uintValue","flag",null);Q=$pkg.uint64Value=$newType(8,$kindUint64,"flag.uint64Value","uint64Value","flag",null);S=$pkg.stringValue=$newType(8,$kindString,"flag.stringValue","stringValue","flag",null);U=$pkg.float64Value=$newType(8,$kindFloat64,"flag.float64Value","float64Value","flag",null);W=$pkg.durationValue=$newType(8,$kindInt64,"flag.durationValue","durationValue","flag",null);Y=$pkg.Value=$newType(8,$kindInterface,"flag.Value","Value","flag",null);AA=$pkg.ErrorHandling=$newType(4,$kindInt,"flag.ErrorHandling","ErrorHandling","flag",null);AB=$pkg.FlagSet=$newType(0,$kindStruct,"flag.FlagSet","FlagSet","flag",function(Usage_,name_,parsed_,actual_,formal_,args_,errorHandling_,output_){this.$val=this;this.Usage=Usage_!==undefined?Usage_:$throwNilPointerError;this.name=name_!==undefined?name_:"";this.parsed=parsed_!==undefined?parsed_:false;this.actual=actual_!==undefined?actual_:false;this.formal=formal_!==undefined?formal_:false;this.args=args_!==undefined?args_:CB.nil;this.errorHandling=errorHandling_!==undefined?errorHandling_:0;this.output=output_!==undefined?output_:$ifaceNil;});AC=$pkg.Flag=$newType(0,$kindStruct,"flag.Flag","Flag","flag",function(Name_,Usage_,Value_,DefValue_){this.$val=this;this.Name=Name_!==undefined?Name_:"";this.Usage=Usage_!==undefined?Usage_:"";this.Value=Value_!==undefined?Value_:$ifaceNil;this.DefValue=DefValue_!==undefined?DefValue_:"";});BI=$sliceType($emptyInterface);BJ=$ptrType(H);BK=$ptrType(K);BL=$ptrType(M);BM=$ptrType(O);BN=$ptrType(Q);BO=$ptrType(S);BP=$ptrType(U);BQ=$ptrType(W);BR=$ptrType(G.Duration);BS=$ptrType(AC);BT=$sliceType(BS);BU=$ptrType($Bool);BV=$ptrType($Int);BW=$ptrType($Int64);BX=$ptrType($Uint);BY=$ptrType($Uint64);BZ=$ptrType($String);CA=$ptrType($Float64);CB=$sliceType($String);CC=$funcType([BS],[],false);CD=$ptrType(AB);CE=$funcType([],[],false);CF=$mapType($String,BS);I=function(b,c){var b,c;c.$set(b);return new BJ(c.$get,c.$set);};$ptrType(H).prototype.Set=function(b){var b,c,d,e,f;c=this;d=F.ParseBool(b);e=d[0];f=d[1];c.$set(e);return f;};$ptrType(H).prototype.Get=function(){var b;b=this;return new $Bool(b.$get());};$ptrType(H).prototype.String=function(){var b;b=this;return B.Sprintf("%v",new BI([new H(b.$get())]));};$ptrType(H).prototype.IsBoolFlag=function(){var b;b=this;return true;};L=function(b,c){var b,c;c.$set(b);return new BK(c.$get,c.$set);};$ptrType(K).prototype.Set=function(b){var b,c,d,e,f;c=this;d=F.ParseInt(b,0,64);e=d[0];f=d[1];c.$set(((e.$low+((e.$high>>31)*4294967296))>>0));return f;};$ptrType(K).prototype.Get=function(){var b;b=this;return new $Int((b.$get()>>0));};$ptrType(K).prototype.String=function(){var b;b=this;return B.Sprintf("%v",new BI([new K(b.$get())]));};N=function(b,c){var b,c;c.$set(b);return new BL(c.$get,c.$set);};$ptrType(M).prototype.Set=function(b){var b,c,d,e,f;c=this;d=F.ParseInt(b,0,64);e=d[0];f=d[1];c.$set(new M(e.$high,e.$low));return f;};$ptrType(M).prototype.Get=function(){var b,c;b=this;return(c=b.$get(),new $Int64(c.$high,c.$low));};$ptrType(M).prototype.String=function(){var b;b=this;return B.Sprintf("%v",new BI([b.$get()]));};P=function(b,c){var b,c;c.$set(b);return new BM(c.$get,c.$set);};$ptrType(O).prototype.Set=function(b){var b,c,d,e,f;c=this;d=F.ParseUint(b,0,64);e=d[0];f=d[1];c.$set((e.$low>>>0));return f;};$ptrType(O).prototype.Get=function(){var b;b=this;return new $Uint((b.$get()>>>0));};$ptrType(O).prototype.String=function(){var b;b=this;return B.Sprintf("%v",new BI([new O(b.$get())]));};R=function(b,c){var b,c;c.$set(b);return new BN(c.$get,c.$set);};$ptrType(Q).prototype.Set=function(b){var b,c,d,e,f;c=this;d=F.ParseUint(b,0,64);e=d[0];f=d[1];c.$set(new Q(e.$high,e.$low));return f;};$ptrType(Q).prototype.Get=function(){var b,c;b=this;return(c=b.$get(),new $Uint64(c.$high,c.$low));};$ptrType(Q).prototype.String=function(){var b;b=this;return B.Sprintf("%v",new BI([b.$get()]));};T=function(b,c){var b,c;c.$set(b);return new BO(c.$get,c.$set);};$ptrType(S).prototype.Set=function(b){var b,c;c=this;c.$set(b);return $ifaceNil;};$ptrType(S).prototype.Get=function(){var b;b=this;return new $String(b.$get());};$ptrType(S).prototype.String=function(){var b;b=this;return B.Sprintf("%s",new BI([new S(b.$get())]));};V=function(b,c){var b,c;c.$set(b);return new BP(c.$get,c.$set);};$ptrType(U).prototype.Set=function(b){var b,c,d,e,f;c=this;d=F.ParseFloat(b,64);e=d[0];f=d[1];c.$set(e);return f;};$ptrType(U).prototype.Get=function(){var b;b=this;return new $Float64(b.$get());};$ptrType(U).prototype.String=function(){var b;b=this;return B.Sprintf("%v",new BI([new U(b.$get())]));};X=function(b,c){var b,c;c.$set(b);return new BQ(c.$get,c.$set);};$ptrType(W).prototype.Set=function(b){var b,c,d,e,f;c=this;d=G.ParseDuration(b);e=d[0];f=d[1];c.$set(new W(e.$high,e.$low));return f;};$ptrType(W).prototype.Get=function(){var b,c;b=this;return(c=b.$get(),new G.Duration(c.$high,c.$low));};$ptrType(W).prototype.String=function(){var b;b=this;return new BR(b.$get,b.$set).String();};AD=function(b){var b,c,d,e,f,g,h,i,j,k,l,m,n,o;c=$makeSlice(E.StringSlice,$keys(b).length);d=0;e=b;f=0;g=$keys(e);while(true){if(!(f=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]=i.Name;d=d+(1)>>0;f++;}c.Sort();j=$makeSlice(BT,c.$length);k=c;l=0;while(true){if(!(l=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+l]);(m<0||m>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+m]=(o=b[n],o!==undefined?o.v:BS.nil);l++;}return j;};AB.ptr.prototype.out=function(){var b;b=this;if($interfaceIsEqual(b.output,$ifaceNil)){return D.Stderr;}return b.output;};AB.prototype.out=function(){return this.$val.out();};AB.ptr.prototype.SetOutput=function(b){var b,c;c=this;c.output=b;};AB.prototype.SetOutput=function(b){return this.$val.SetOutput(b);};AB.ptr.prototype.VisitAll=function(b){var b,c,d,e,f;c=this;d=AD(c.formal);e=0;while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]);b(f);e++;}};AB.prototype.VisitAll=function(b){return this.$val.VisitAll(b);};AB.ptr.prototype.Visit=function(b){var b,c,d,e,f;c=this;d=AD(c.actual);e=0;while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]);b(f);e++;}};AB.prototype.Visit=function(b){return this.$val.Visit(b);};AB.ptr.prototype.Lookup=function(b){var b,c,d;c=this;return(d=c.formal[b],d!==undefined?d.v:BS.nil);};AB.prototype.Lookup=function(b){return this.$val.Lookup(b);};AB.ptr.prototype.Set=function(b,c){var b,c,d,e,f,g,h,i,j;d=this;e=(f=d.formal[b],f!==undefined?[f.v,true]:[BS.nil,false]);g=e[0];h=e[1];if(!h){return B.Errorf("no such flag -%v",new BI([new $String(b)]));}i=g.Value.Set(c);if(!($interfaceIsEqual(i,$ifaceNil))){return i;}if(d.actual===false){d.actual=new $Map();}j=b;(d.actual||$throwRuntimeError("assignment to entry in nil map"))[j]={k:j,v:g};return $ifaceNil;};AB.prototype.Set=function(b,c){return this.$val.Set(b,c);};AB.ptr.prototype.PrintDefaults=function(){var b;b=this;b.VisitAll((function(c){var c,d,e,f;d=" -%s=%s: %s\n";e=$assertType(c.Value,BO,true);f=e[1];if(f){d=" -%s=%q: %s\n";}B.Fprintf(b.out(),d,new BI([new $String(c.Name),new $String(c.DefValue),new $String(c.Usage)]));}));};AB.prototype.PrintDefaults=function(){return this.$val.PrintDefaults();};AI=$pkg.PrintDefaults=function(){$pkg.CommandLine.PrintDefaults();};AJ=function(b){var b;if(b.name===""){B.Fprintf(b.out(),"Usage:\n",new BI([]));}else{B.Fprintf(b.out(),"Usage of %s:\n",new BI([new $String(b.name)]));}b.PrintDefaults();};AB.ptr.prototype.NFlag=function(){var b;b=this;return $keys(b.actual).length;};AB.prototype.NFlag=function(){return this.$val.NFlag();};AB.ptr.prototype.Arg=function(b){var b,c,d;c=this;if(b<0||b>=c.args.$length){return"";}return(d=c.args,((b<0||b>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+b]));};AB.prototype.Arg=function(b){return this.$val.Arg(b);};AB.ptr.prototype.NArg=function(){var b;b=this;return b.args.$length;};AB.prototype.NArg=function(){return this.$val.NArg();};AB.ptr.prototype.Args=function(){var b;b=this;return b.args;};AB.prototype.Args=function(){return this.$val.Args();};AB.ptr.prototype.BoolVar=function(b,c,d,e){var b,c,d,e,f;f=this;f.Var(I(d,b),c,e);};AB.prototype.BoolVar=function(b,c,d,e){return this.$val.BoolVar(b,c,d,e);};AB.ptr.prototype.Bool=function(b,c,d){var b,c,d,e,f;e=this;f=$newDataPointer(false,BU);e.BoolVar(f,b,c,d);return f;};AB.prototype.Bool=function(b,c,d){return this.$val.Bool(b,c,d);};AP=$pkg.Bool=function(b,c,d){var b,c,d;return $pkg.CommandLine.Bool(b,c,d);};AB.ptr.prototype.IntVar=function(b,c,d,e){var b,c,d,e,f;f=this;f.Var(L(d,b),c,e);};AB.prototype.IntVar=function(b,c,d,e){return this.$val.IntVar(b,c,d,e);};AB.ptr.prototype.Int=function(b,c,d){var b,c,d,e,f;e=this;f=$newDataPointer(0,BV);e.IntVar(f,b,c,d);return f;};AB.prototype.Int=function(b,c,d){return this.$val.Int(b,c,d);};AR=$pkg.Int=function(b,c,d){var b,c,d;return $pkg.CommandLine.Int(b,c,d);};AB.ptr.prototype.Int64Var=function(b,c,d,e){var b,c,d,e,f;f=this;f.Var(N(d,b),c,e);};AB.prototype.Int64Var=function(b,c,d,e){return this.$val.Int64Var(b,c,d,e);};AB.ptr.prototype.Int64=function(b,c,d){var b,c,d,e,f;e=this;f=$newDataPointer(new $Int64(0,0),BW);e.Int64Var(f,b,c,d);return f;};AB.prototype.Int64=function(b,c,d){return this.$val.Int64(b,c,d);};AB.ptr.prototype.UintVar=function(b,c,d,e){var b,c,d,e,f;f=this;f.Var(P(d,b),c,e);};AB.prototype.UintVar=function(b,c,d,e){return this.$val.UintVar(b,c,d,e);};AB.ptr.prototype.Uint=function(b,c,d){var b,c,d,e,f;e=this;f=$newDataPointer(0,BX);e.UintVar(f,b,c,d);return f;};AB.prototype.Uint=function(b,c,d){return this.$val.Uint(b,c,d);};AB.ptr.prototype.Uint64Var=function(b,c,d,e){var b,c,d,e,f;f=this;f.Var(R(d,b),c,e);};AB.prototype.Uint64Var=function(b,c,d,e){return this.$val.Uint64Var(b,c,d,e);};AB.ptr.prototype.Uint64=function(b,c,d){var b,c,d,e,f;e=this;f=$newDataPointer(new $Uint64(0,0),BY);e.Uint64Var(f,b,c,d);return f;};AB.prototype.Uint64=function(b,c,d){return this.$val.Uint64(b,c,d);};AB.ptr.prototype.StringVar=function(b,c,d,e){var b,c,d,e,f;f=this;f.Var(T(d,b),c,e);};AB.prototype.StringVar=function(b,c,d,e){return this.$val.StringVar(b,c,d,e);};AB.ptr.prototype.String=function(b,c,d){var b,c,d,e,f;e=this;f=$newDataPointer("",BZ);e.StringVar(f,b,c,d);return f;};AB.prototype.String=function(b,c,d){return this.$val.String(b,c,d);};AZ=$pkg.String=function(b,c,d){var b,c,d;return $pkg.CommandLine.String(b,c,d);};AB.ptr.prototype.Float64Var=function(b,c,d,e){var b,c,d,e,f;f=this;f.Var(V(d,b),c,e);};AB.prototype.Float64Var=function(b,c,d,e){return this.$val.Float64Var(b,c,d,e);};AB.ptr.prototype.Float64=function(b,c,d){var b,c,d,e,f;e=this;f=$newDataPointer(0,CA);e.Float64Var(f,b,c,d);return f;};AB.prototype.Float64=function(b,c,d){return this.$val.Float64(b,c,d);};AB.ptr.prototype.DurationVar=function(b,c,d,e){var b,c,d,e,f;f=this;f.Var(X(d,b),c,e);};AB.prototype.DurationVar=function(b,c,d,e){return this.$val.DurationVar(b,c,d,e);};AB.ptr.prototype.Duration=function(b,c,d){var b,c,d,e,f;e=this;f=$newDataPointer(new G.Duration(0,0),BR);e.DurationVar(f,b,c,d);return f;};AB.prototype.Duration=function(b,c,d){return this.$val.Duration(b,c,d);};BD=$pkg.Duration=function(b,c,d){var b,c,d;return $pkg.CommandLine.Duration(b,c,d);};AB.ptr.prototype.Var=function(b,c,d){var b,c,d,e,f,g,h,i,j,k;e=this;f=new AC.ptr(c,d,b,b.String());g=(h=e.formal[c],h!==undefined?[h.v,true]:[BS.nil,false]);i=g[1];if(i){j="";if(e.name===""){j=B.Sprintf("flag redefined: %s",new BI([new $String(c)]));}else{j=B.Sprintf("%s flag redefined: %s",new BI([new $String(e.name),new $String(c)]));}B.Fprintln(e.out(),new BI([new $String(j)]));$panic(new $String(j));}if(e.formal===false){e.formal=new $Map();}k=c;(e.formal||$throwRuntimeError("assignment to entry in nil map"))[k]={k:k,v:f};};AB.prototype.Var=function(b,c,d){return this.$val.Var(b,c,d);};AB.ptr.prototype.failf=function(b,c){var b,c,d,e;d=this;e=B.Errorf(b,c);B.Fprintln(d.out(),new BI([e]));d.usage();return e;};AB.prototype.failf=function(b,c){return this.$val.failf(b,c);};AB.ptr.prototype.usage=function(){var b;b=this;if(b.Usage===$throwNilPointerError){if(b===$pkg.CommandLine){$pkg.Usage();}else{AJ(b);}}else{b.Usage();}};AB.prototype.usage=function(){return this.$val.usage();};AB.ptr.prototype.parseOne=function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;b=this;if(b.args.$length===0){return[false,$ifaceNil];}d=(c=b.args,((0<0||0>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+0]));if((d.length===0)||!((d.charCodeAt(0)===45))||(d.length===1)){return[false,$ifaceNil];}e=1;if(d.charCodeAt(1)===45){e=e+(1)>>0;if(d.length===2){b.args=$subslice(b.args,1);return[false,$ifaceNil];}}f=d.substring(e);if((f.length===0)||(f.charCodeAt(0)===45)||(f.charCodeAt(0)===61)){return[false,b.failf("bad flag syntax: %s",new BI([new $String(d)]))];}b.args=$subslice(b.args,1);g=false;h="";i=1;while(true){if(!(i>0));g=true;f=f.substring(0,i);break;}i=i+(1)>>0;}j=b.formal;k=(l=j[f],l!==undefined?[l.v,true]:[BS.nil,false]);m=k[0];n=k[1];if(!n){if(f==="help"||f==="h"){b.usage();return[false,$pkg.ErrHelp];}return[false,b.failf("flag provided but not defined: -%s",new BI([new $String(f)]))];}o=$assertType(m.Value,J,true);p=o[0];q=o[1];if(q&&p.IsBoolFlag()){if(g){r=p.Set(h);if(!($interfaceIsEqual(r,$ifaceNil))){return[false,b.failf("invalid boolean value %q for -%s: %v",new BI([new $String(h),new $String(f),r]))];}}else{p.Set("true");}}else{if(!g&&b.args.$length>0){g=true;s=(t=b.args,((0<0||0>=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+0]));u=$subslice(b.args,1);h=s;b.args=u;}if(!g){return[false,b.failf("flag needs an argument: -%s",new BI([new $String(f)]))];}v=m.Value.Set(h);if(!($interfaceIsEqual(v,$ifaceNil))){return[false,b.failf("invalid value %q for flag -%s: %v",new BI([new $String(h),new $String(f),v]))];}}if(b.actual===false){b.actual=new $Map();}w=f;(b.actual||$throwRuntimeError("assignment to entry in nil map"))[w]={k:w,v:m};return[true,$ifaceNil];};AB.prototype.parseOne=function(){return this.$val.parseOne();};AB.ptr.prototype.Parse=function(b){var b,c,d,e,f,g;c=this;c.parsed=true;c.args=b;while(true){if(!(true)){break;}d=c.parseOne();e=d[0];f=d[1];if(e){continue;}if($interfaceIsEqual(f,$ifaceNil)){break;}g=c.errorHandling;if(g===0){return f;}else if(g===1){D.Exit(2);}else if(g===2){$panic(f);}}return $ifaceNil;};AB.prototype.Parse=function(b){return this.$val.Parse(b);};AB.ptr.prototype.Parsed=function(){var b;b=this;return b.parsed;};AB.prototype.Parsed=function(){return this.$val.Parsed();};BH=$pkg.NewFlagSet=function(b,c){var b,c,d;d=new AB.ptr($throwNilPointerError,b,false,false,false,CB.nil,c,$ifaceNil);return d;};AB.ptr.prototype.Init=function(b,c){var b,c,d;d=this;d.name=b;d.errorHandling=c;};AB.prototype.Init=function(b,c){return this.$val.Init(b,c);};BJ.methods=[{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String],[$error],false)},{prop:"Get",name:"Get",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"IsBoolFlag",name:"IsBoolFlag",pkg:"",typ:$funcType([],[$Bool],false)}];BK.methods=[{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String],[$error],false)},{prop:"Get",name:"Get",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];BL.methods=[{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String],[$error],false)},{prop:"Get",name:"Get",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];BM.methods=[{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String],[$error],false)},{prop:"Get",name:"Get",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];BN.methods=[{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String],[$error],false)},{prop:"Get",name:"Get",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];BO.methods=[{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String],[$error],false)},{prop:"Get",name:"Get",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];BP.methods=[{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String],[$error],false)},{prop:"Get",name:"Get",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];BQ.methods=[{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String],[$error],false)},{prop:"Get",name:"Get",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];CD.methods=[{prop:"out",name:"out",pkg:"flag",typ:$funcType([],[C.Writer],false)},{prop:"SetOutput",name:"SetOutput",pkg:"",typ:$funcType([C.Writer],[],false)},{prop:"VisitAll",name:"VisitAll",pkg:"",typ:$funcType([CC],[],false)},{prop:"Visit",name:"Visit",pkg:"",typ:$funcType([CC],[],false)},{prop:"Lookup",name:"Lookup",pkg:"",typ:$funcType([$String],[BS],false)},{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String,$String],[$error],false)},{prop:"PrintDefaults",name:"PrintDefaults",pkg:"",typ:$funcType([],[],false)},{prop:"NFlag",name:"NFlag",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Arg",name:"Arg",pkg:"",typ:$funcType([$Int],[$String],false)},{prop:"NArg",name:"NArg",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Args",name:"Args",pkg:"",typ:$funcType([],[CB],false)},{prop:"BoolVar",name:"BoolVar",pkg:"",typ:$funcType([BU,$String,$Bool,$String],[],false)},{prop:"Bool",name:"Bool",pkg:"",typ:$funcType([$String,$Bool,$String],[BU],false)},{prop:"IntVar",name:"IntVar",pkg:"",typ:$funcType([BV,$String,$Int,$String],[],false)},{prop:"Int",name:"Int",pkg:"",typ:$funcType([$String,$Int,$String],[BV],false)},{prop:"Int64Var",name:"Int64Var",pkg:"",typ:$funcType([BW,$String,$Int64,$String],[],false)},{prop:"Int64",name:"Int64",pkg:"",typ:$funcType([$String,$Int64,$String],[BW],false)},{prop:"UintVar",name:"UintVar",pkg:"",typ:$funcType([BX,$String,$Uint,$String],[],false)},{prop:"Uint",name:"Uint",pkg:"",typ:$funcType([$String,$Uint,$String],[BX],false)},{prop:"Uint64Var",name:"Uint64Var",pkg:"",typ:$funcType([BY,$String,$Uint64,$String],[],false)},{prop:"Uint64",name:"Uint64",pkg:"",typ:$funcType([$String,$Uint64,$String],[BY],false)},{prop:"StringVar",name:"StringVar",pkg:"",typ:$funcType([BZ,$String,$String,$String],[],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([$String,$String,$String],[BZ],false)},{prop:"Float64Var",name:"Float64Var",pkg:"",typ:$funcType([CA,$String,$Float64,$String],[],false)},{prop:"Float64",name:"Float64",pkg:"",typ:$funcType([$String,$Float64,$String],[CA],false)},{prop:"DurationVar",name:"DurationVar",pkg:"",typ:$funcType([BR,$String,G.Duration,$String],[],false)},{prop:"Duration",name:"Duration",pkg:"",typ:$funcType([$String,G.Duration,$String],[BR],false)},{prop:"Var",name:"Var",pkg:"",typ:$funcType([Y,$String,$String],[],false)},{prop:"failf",name:"failf",pkg:"flag",typ:$funcType([$String,BI],[$error],true)},{prop:"usage",name:"usage",pkg:"flag",typ:$funcType([],[],false)},{prop:"parseOne",name:"parseOne",pkg:"flag",typ:$funcType([],[$Bool,$error],false)},{prop:"Parse",name:"Parse",pkg:"",typ:$funcType([CB],[$error],false)},{prop:"Parsed",name:"Parsed",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Init",name:"Init",pkg:"",typ:$funcType([$String,AA],[],false)}];J.init([{prop:"IsBoolFlag",name:"IsBoolFlag",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String],[$error],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}]);Y.init([{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String],[$error],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}]);AB.init([{prop:"Usage",name:"Usage",pkg:"",typ:CE,tag:""},{prop:"name",name:"name",pkg:"flag",typ:$String,tag:""},{prop:"parsed",name:"parsed",pkg:"flag",typ:$Bool,tag:""},{prop:"actual",name:"actual",pkg:"flag",typ:CF,tag:""},{prop:"formal",name:"formal",pkg:"flag",typ:CF,tag:""},{prop:"args",name:"args",pkg:"flag",typ:CB,tag:""},{prop:"errorHandling",name:"errorHandling",pkg:"flag",typ:AA,tag:""},{prop:"output",name:"output",pkg:"flag",typ:C.Writer,tag:""}]);AC.init([{prop:"Name",name:"Name",pkg:"",typ:$String,tag:""},{prop:"Usage",name:"Usage",pkg:"",typ:$String,tag:""},{prop:"Value",name:"Value",pkg:"",typ:Y,tag:""},{prop:"DefValue",name:"DefValue",pkg:"",typ:$String,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_flag=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}$r=F.$init($BLOCKING);$s=6;case 6:if($r&&$r.$blocking){$r=$r();}$r=G.$init($BLOCKING);$s=7;case 7:if($r&&$r.$blocking){$r=$r();}$pkg.ErrHelp=A.New("flag: help requested");$pkg.CommandLine=BH((a=D.Args,((0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0])),1);$pkg.Usage=(function(){var b;B.Fprintf(D.Stderr,"Usage of %s:\n",new BI([new $String((b=D.Args,((0<0||0>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+0])))]));AI();});}return;}};$init_flag.$blocking=true;return $init_flag;};return $pkg;})(); +$packages["runtime/pprof"]=(function(){var $pkg={},A,B;A=$packages["io"];B=$packages["sync"];$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_pprof=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}}return;}};$init_pprof.$blocking=true;return $init_pprof;};return $pkg;})(); +$packages["testing"]=(function(){var $pkg={},H,B,C,E,I,D,A,K,L,J,F,G,O,P,Q,AN,AO,AP,AQ,AR,AS,AT,AU,AV,AW,AX,AY,AZ;H=$packages["bytes"];B=$packages["flag"];C=$packages["fmt"];E=$packages["github.com/gopherjs/gopherjs/nosync"];I=$packages["io"];D=$packages["os"];A=$packages["runtime"];K=$packages["runtime/pprof"];L=$packages["strconv"];J=$packages["strings"];F=$packages["sync/atomic"];G=$packages["time"];$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_testing=function(){while(true){switch($s){case 0:$r=H.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=I.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=6;case 6:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=7;case 7:if($r&&$r.$blocking){$r=$r();}$r=K.$init($BLOCKING);$s=8;case 8:if($r&&$r.$blocking){$r=$r();}$r=L.$init($BLOCKING);$s=9;case 9:if($r&&$r.$blocking){$r=$r();}$r=J.$init($BLOCKING);$s=10;case 10:if($r&&$r.$blocking){$r=$r();}$r=F.$init($BLOCKING);$s=11;case 11:if($r&&$r.$blocking){$r=$r();}$r=G.$init($BLOCKING);$s=12;case 12:if($r&&$r.$blocking){$r=$r();}O=B.String("test.bench","","regular expression to select benchmarks to run");P=B.Duration("test.benchtime",new G.Duration(0,1000000000),"approximate run time for each benchmark");Q=B.Bool("test.benchmem",false,"print memory allocations for benchmarks");AN=B.Bool("test.short",false,"run smaller test suite to save time");AO=B.String("test.outputdir","","directory in which to write profiles");AP=B.Bool("test.v",false,"verbose: print additional output");AQ=B.String("test.coverprofile","","write a coverage profile to the named file after execution");AR=B.String("test.run","","regular expression to select tests and examples to run");AS=B.String("test.memprofile","","write a memory profile to the named file after execution");AT=B.Int("test.memprofilerate",0,"if >=0, sets runtime.MemProfileRate");AU=B.String("test.cpuprofile","","write a cpu profile to the named file during execution");AV=B.String("test.blockprofile","","write a goroutine blocking profile to the named file after execution");AW=B.Int("test.blockprofilerate",1,"if >= 0, calls runtime.SetBlockProfileRate()");AX=B.Duration("test.timeout",new G.Duration(0,0),"if positive, sets an aggregate time limit for all tests");AY=B.String("test.cpu","","comma-separated list of number of CPUs to use for each test");AZ=B.Int("test.parallel",A.GOMAXPROCS(0),"maximum test parallelism");}return;}};$init_testing.$blocking=true;return $init_testing;};return $pkg;})(); +$packages["regexp"]=(function(){var $pkg={},D,I,B,C,E,G,H,A,F,J,L,M,N,O,R,S,W,AD,AM,AT,AU,AV,AW,BE,BF,BG,BH,BI,BK,BL,BM,BN,BO,BP,BQ,BR,BS,BT,BU,BV,BW,BX,BY,BZ,CA,CB,CC,CD,CE,CF,CG,CH,CI,CJ,CK,Q,Y,Z,AE,AF,AJ,P,T,U,V,X,AA,AB,AC,AG,AK,AN,AP,AQ,AS,BD;D=$packages["bytes"];I=$packages["github.com/gopherjs/gopherjs/nosync"];B=$packages["io"];C=$packages["regexp/syntax"];E=$packages["sort"];G=$packages["strconv"];H=$packages["strings"];A=$packages["testing"];F=$packages["unicode"];J=$packages["unicode/utf8"];L=$pkg.queue=$newType(0,$kindStruct,"regexp.queue","queue","regexp",function(sparse_,dense_){this.$val=this;this.sparse=sparse_!==undefined?sparse_:BG.nil;this.dense=dense_!==undefined?dense_:BO.nil;});M=$pkg.entry=$newType(0,$kindStruct,"regexp.entry","entry","regexp",function(pc_,t_){this.$val=this;this.pc=pc_!==undefined?pc_:0;this.t=t_!==undefined?t_:BM.nil;});N=$pkg.thread=$newType(0,$kindStruct,"regexp.thread","thread","regexp",function(inst_,cap_){this.$val=this;this.inst=inst_!==undefined?inst_:CC.nil;this.cap=cap_!==undefined?cap_:BE.nil;});O=$pkg.machine=$newType(0,$kindStruct,"regexp.machine","machine","regexp",function(re_,p_,op_,q0_,q1_,pool_,matched_,matchcap_,inputBytes_,inputString_,inputReader_){this.$val=this;this.re=re_!==undefined?re_:BK.nil;this.p=p_!==undefined?p_:BL.nil;this.op=op_!==undefined?op_:BH.nil;this.q0=q0_!==undefined?q0_:new L.ptr();this.q1=q1_!==undefined?q1_:new L.ptr();this.pool=pool_!==undefined?pool_:BN.nil;this.matched=matched_!==undefined?matched_:false;this.matchcap=matchcap_!==undefined?matchcap_:BE.nil;this.inputBytes=inputBytes_!==undefined?inputBytes_:new AV.ptr();this.inputString=inputString_!==undefined?inputString_:new AU.ptr();this.inputReader=inputReader_!==undefined?inputReader_:new AW.ptr();});R=$pkg.onePassProg=$newType(0,$kindStruct,"regexp.onePassProg","onePassProg","regexp",function(Inst_,Start_,NumCap_){this.$val=this;this.Inst=Inst_!==undefined?Inst_:BR.nil;this.Start=Start_!==undefined?Start_:0;this.NumCap=NumCap_!==undefined?NumCap_:0;});S=$pkg.onePassInst=$newType(0,$kindStruct,"regexp.onePassInst","onePassInst","regexp",function(Inst_,Next_){this.$val=this;this.Inst=Inst_!==undefined?Inst_:new C.Inst.ptr();this.Next=Next_!==undefined?Next_:BG.nil;});W=$pkg.queueOnePass=$newType(0,$kindStruct,"regexp.queueOnePass","queueOnePass","regexp",function(sparse_,dense_,size_,nextIndex_){this.$val=this;this.sparse=sparse_!==undefined?sparse_:BG.nil;this.dense=dense_!==undefined?dense_:BG.nil;this.size=size_!==undefined?size_:0;this.nextIndex=nextIndex_!==undefined?nextIndex_:0;});AD=$pkg.runeSlice=$newType(12,$kindSlice,"regexp.runeSlice","runeSlice","regexp",null);AM=$pkg.Regexp=$newType(0,$kindStruct,"regexp.Regexp","Regexp","regexp",function(expr_,prog_,onepass_,prefix_,prefixBytes_,prefixComplete_,prefixRune_,prefixEnd_,cond_,numSubexp_,subexpNames_,longest_,mu_,machine_){this.$val=this;this.expr=expr_!==undefined?expr_:"";this.prog=prog_!==undefined?prog_:BL.nil;this.onepass=onepass_!==undefined?onepass_:BH.nil;this.prefix=prefix_!==undefined?prefix_:"";this.prefixBytes=prefixBytes_!==undefined?prefixBytes_:BI.nil;this.prefixComplete=prefixComplete_!==undefined?prefixComplete_:false;this.prefixRune=prefixRune_!==undefined?prefixRune_:0;this.prefixEnd=prefixEnd_!==undefined?prefixEnd_:0;this.cond=cond_!==undefined?cond_:0;this.numSubexp=numSubexp_!==undefined?numSubexp_:0;this.subexpNames=subexpNames_!==undefined?subexpNames_:BV.nil;this.longest=longest_!==undefined?longest_:false;this.mu=mu_!==undefined?mu_:new I.Mutex.ptr();this.machine=machine_!==undefined?machine_:BX.nil;});AT=$pkg.input=$newType(8,$kindInterface,"regexp.input","input","regexp",null);AU=$pkg.inputString=$newType(0,$kindStruct,"regexp.inputString","inputString","regexp",function(str_){this.$val=this;this.str=str_!==undefined?str_:"";});AV=$pkg.inputBytes=$newType(0,$kindStruct,"regexp.inputBytes","inputBytes","regexp",function(str_){this.$val=this;this.str=str_!==undefined?str_:BI.nil;});AW=$pkg.inputReader=$newType(0,$kindStruct,"regexp.inputReader","inputReader","regexp",function(r_,atEOT_,pos_){this.$val=this;this.r=r_!==undefined?r_:$ifaceNil;this.atEOT=atEOT_!==undefined?atEOT_:false;this.pos=pos_!==undefined?pos_:0;});BE=$sliceType($Int);BF=$sliceType($Int32);BG=$sliceType($Uint32);BH=$ptrType(R);BI=$sliceType($Uint8);BK=$ptrType(AM);BL=$ptrType(C.Prog);BM=$ptrType(N);BN=$sliceType(BM);BO=$sliceType(M);BP=$ptrType($Int);BQ=$ptrType(W);BR=$sliceType(S);BS=$ptrType($Uint32);BT=$sliceType(BF);BU=$ptrType(BF);BV=$sliceType($String);BW=$ptrType(O);BX=$sliceType(BW);BY=$sliceType(BI);BZ=$sliceType(BE);CA=$sliceType(BY);CB=$sliceType(BV);CC=$ptrType(C.Inst);CD=$ptrType(L);CE=$funcType([$String],[$String],false);CF=$funcType([BI,BE],[BI],false);CG=$funcType([BI],[BI],false);CH=$funcType([BE],[],false);CI=$ptrType(AU);CJ=$ptrType(AV);CK=$ptrType(AW);O.ptr.prototype.newInputBytes=function(a){var a,b;b=this;b.inputBytes.str=a;return b.inputBytes;};O.prototype.newInputBytes=function(a){return this.$val.newInputBytes(a);};O.ptr.prototype.newInputString=function(a){var a,b;b=this;b.inputString.str=a;return b.inputString;};O.prototype.newInputString=function(a){return this.$val.newInputString(a);};O.ptr.prototype.newInputReader=function(a){var a,b;b=this;b.inputReader.r=a;b.inputReader.atEOT=false;b.inputReader.pos=0;return b.inputReader;};O.prototype.newInputReader=function(a){return this.$val.newInputReader(a);};P=function(a,b){var a,b,c,d,e;c=new O.ptr(BK.nil,a,b,new L.ptr(),new L.ptr(),BN.nil,false,BE.nil,new AV.ptr(),new AU.ptr(),new AW.ptr());d=c.p.Inst.$length;$copy(c.q0,new L.ptr($makeSlice(BG,d),$makeSlice(BO,0,d)),L);$copy(c.q1,new L.ptr($makeSlice(BG,d),$makeSlice(BO,0,d)),L);e=a.NumCap;if(e<2){e=2;}c.matchcap=$makeSlice(BE,e);return c;};O.ptr.prototype.init=function(a){var a,b,c,d,e;b=this;c=b.pool;d=0;while(true){if(!(d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]);e.cap=$subslice(e.cap,0,a);d++;}b.matchcap=$subslice(b.matchcap,0,a);};O.prototype.init=function(a){return this.$val.init(a);};O.ptr.prototype.alloc=function(a){var a,b,c,d,e,f;b=this;c=BM.nil;d=b.pool.$length;if(d>0){c=(e=b.pool,f=d-1>>0,((f<0||f>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]));b.pool=$subslice(b.pool,0,(d-1>>0));}else{c=new N.ptr();c.cap=$makeSlice(BE,b.matchcap.$length,b.matchcap.$capacity);}c.inst=a;return c;};O.prototype.alloc=function(a){return this.$val.alloc(a);};O.ptr.prototype.match=function(a,b){var a,aa,ab,ac,ad,ae,af,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;c=this;d=c.re.cond;if(d===255){return false;}c.matched=false;e=c.matchcap;f=0;while(true){if(!(f=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+g]=-1);f++;}i=c.q0;j=c.q1;k=i;l=j;m=-1;n=-1;o=m;p=n;q=0;r=0;s=q;t=r;u=a.step(b);o=u[0];s=u[1];if(!((o===-1))){v=a.step(b+s>>0);p=v[0];t=v[1];}w=0;if(b===0){w=C.EmptyOpContext(-1,o);}else{w=a.context(b);}while(true){if(!(true)){break;}if(k.dense.$length===0){if(!((((d&4)>>>0)===0))&&!((b===0))){break;}if(c.matched){break;}if(c.re.prefix.length>0&&!((p===c.re.prefixRune))&&a.canCheckPrefix()){x=a.index(c.re,b);if(x<0){break;}b=b+(x)>>0;y=a.step(b);o=y[0];s=y[1];z=a.step(b+s>>0);p=z[0];t=z[1];}}if(!c.matched){if(c.matchcap.$length>0){(aa=c.matchcap,(0<0||0>=aa.$length)?$throwRuntimeError("index out of range"):aa.$array[aa.$offset+0]=b);}c.add(k,(c.p.Start>>>0),b,c.matchcap,w,BM.nil);}w=C.EmptyOpContext(o,p);c.step(k,l,b,b+s>>0,o,w);if(s===0){break;}if((c.matchcap.$length===0)&&c.matched){break;}b=b+(s)>>0;ab=p;ac=t;o=ab;s=ac;if(!((o===-1))){ad=a.step(b+s>>0);p=ad[0];t=ad[1];}ae=l;af=k;k=ae;l=af;}c.clear(l);return c.matched;};O.prototype.match=function(a,b){return this.$val.match(a,b);};O.ptr.prototype.clear=function(a){var a,b,c,d,e;b=this;c=a.dense;d=0;while(true){if(!(d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]),M);if(!(e.t===BM.nil)){b.pool=$append(b.pool,e.t);}d++;}a.dense=$subslice(a.dense,0,0);};O.prototype.clear=function(a){return this.$val.clear(a);};O.ptr.prototype.step=function(a,b,c,d,e,f){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;g=this;h=g.re.longest;i=0;while(true){if(!(i=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+i]));l=k.t;if(l===BM.nil){i=i+(1)>>0;continue;}if(h&&g.matched&&l.cap.$length>0&&(m=g.matchcap,((0<0||0>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+0]))<(n=l.cap,((0<0||0>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+0]))){g.pool=$append(g.pool,l);i=i+(1)>>0;continue;}o=l.inst;p=false;q=o.Op;if(q===4){if(l.cap.$length>0&&(!h||!g.matched||(r=g.matchcap,((1<0||1>=r.$length)?$throwRuntimeError("index out of range"):r.$array[r.$offset+1]))=s.$length)?$throwRuntimeError("index out of range"):s.$array[s.$offset+1]=c);$copySlice(g.matchcap,l.cap);}if(!h){t=$subslice(a.dense,(i+1>>0));u=0;while(true){if(!(u=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+u]),M);if(!(v.t===BM.nil)){g.pool=$append(g.pool,v.t);}u++;}a.dense=$subslice(a.dense,0,0);}g.matched=true;}else if(q===7){p=o.MatchRune(e);}else if(q===8){p=e===(w=o.Rune,((0<0||0>=w.$length)?$throwRuntimeError("index out of range"):w.$array[w.$offset+0]));}else if(q===9){p=true;}else if(q===10){p=!((e===10));}else{$panic(new $String("bad inst"));}if(p){l=g.add(b,o.Out,d,l.cap,f,l);}if(!(l===BM.nil)){g.pool=$append(g.pool,l);}i=i+(1)>>0;}a.dense=$subslice(a.dense,0,0);};O.prototype.step=function(a,b,c,d,e,f){return this.$val.step(a,b,c,d,e,f);};O.ptr.prototype.add=function(a,b,c,d,e,f){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;g=this;if(b===0){return f;}i=(h=a.sparse,((b<0||b>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+b]));if(i<(a.dense.$length>>>0)&&((j=a.dense,((i<0||i>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+i])).pc===b)){return f;}k=a.dense.$length;a.dense=$subslice(a.dense,0,(k+1>>0));m=(l=a.dense,((k<0||k>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+k]));m.t=BM.nil;m.pc=b;(n=a.sparse,(b<0||b>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+b]=(k>>>0));p=(o=g.p.Inst,((b<0||b>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+b]));q=p.Op;if(q===5){}else if(q===0||q===1){f=g.add(a,p.Out,c,d,e,f);f=g.add(a,p.Arg,c,d,e,f);}else if(q===3){if(((p.Arg<<24>>>24)&~e)===0){f=g.add(a,p.Out,c,d,e,f);}}else if(q===6){f=g.add(a,p.Out,c,d,e,f);}else if(q===2){if((p.Arg>>0)=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+r]));(t=p.Arg,(t<0||t>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+t]=c);g.add(a,p.Out,c,d,e,BM.nil);(u=p.Arg,(u<0||u>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+u]=s);}else{f=g.add(a,p.Out,c,d,e,f);}}else if(q===4||q===7||q===8||q===9||q===10){if(f===BM.nil){f=g.alloc(p);}else{f.inst=p;}if(d.$length>0&&!($pointerIsEqual(new BP(function(){return((0<0||0>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+0]);},function($v){(0<0||0>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+0]=$v;},f.cap),new BP(function(){return((0<0||0>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+0]);},function($v){(0<0||0>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+0]=$v;},d)))){$copySlice(f.cap,d);}m.t=f;f=BM.nil;}else{$panic(new $String("unhandled"));}return f;};O.prototype.add=function(a,b,c,d,e,f){return this.$val.add(a,b,c,d,e,f);};O.ptr.prototype.onepass=function(a,b){var a,aa,ab,ac,ad,ae,af,ag,ah,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;c=this;d=c.re.cond;if(d===255){return false;}c.matched=false;e=c.matchcap;f=0;while(true){if(!(f=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+g]=-1);f++;}i=-1;j=-1;k=i;l=j;m=0;n=0;o=m;p=n;q=a.step(b);k=q[0];o=q[1];if(!((k===-1))){r=a.step(b+o>>0);l=r[0];p=r[1];}s=0;if(b===0){s=C.EmptyOpContext(-1,k);}else{s=a.context(b);}t=c.op.Start;v=$clone((u=c.op.Inst,((t<0||t>=u.$length)?$throwRuntimeError("index out of range"):u.$array[u.$offset+t])),S);if((b===0)&&(((v.Inst.Arg<<24>>>24)&~s)===0)&&c.re.prefix.length>0&&a.canCheckPrefix()){if(a.hasPrefix(c.re)){b=b+(c.re.prefix.length)>>0;w=a.step(b);k=w[0];o=w[1];x=a.step(b+o>>0);l=x[0];p=x[1];s=a.context(b);t=(c.re.prefixEnd>>0);}else{return c.matched;}}while(true){if(!(true)){break;}$copy(v,(y=c.op.Inst,((t<0||t>=y.$length)?$throwRuntimeError("index out of range"):y.$array[y.$offset+t])),S);t=(v.Inst.Out>>0);z=v.Inst.Op;if(z===4){c.matched=true;if(c.matchcap.$length>0){(aa=c.matchcap,(0<0||0>=aa.$length)?$throwRuntimeError("index out of range"):aa.$array[aa.$offset+0]=0);(ab=c.matchcap,(1<0||1>=ab.$length)?$throwRuntimeError("index out of range"):ab.$array[ab.$offset+1]=b);}return c.matched;}else if(z===7){if(!v.Inst.MatchRune(k)){return c.matched;}}else if(z===8){if(!((k===(ac=v.Inst.Rune,((0<0||0>=ac.$length)?$throwRuntimeError("index out of range"):ac.$array[ac.$offset+0]))))){return c.matched;}}else if(z===9){}else if(z===10){if(k===10){return c.matched;}}else if(z===0||z===1){t=(U(v,k)>>0);continue;}else if(z===5){return c.matched;}else if(z===6){continue;}else if(z===3){if(!((((v.Inst.Arg<<24>>>24)&~s)===0))){return c.matched;}continue;}else if(z===2){if((v.Inst.Arg>>0)=ad.$length)?$throwRuntimeError("index out of range"):ad.$array[ad.$offset+ae]=b);}continue;}else{$panic(new $String("bad inst"));}if(o===0){break;}s=C.EmptyOpContext(k,l);b=b+(o)>>0;af=l;ag=p;k=af;o=ag;if(!((k===-1))){ah=a.step(b+o>>0);l=ah[0];p=ah[1];}}return c.matched;};O.prototype.onepass=function(a,b){return this.$val.onepass(a,b);};AM.ptr.prototype.doExecute=function(a,b,c,d,e){var a,b,c,d,e,f,g,h,i;f=this;g=f.get();h=$ifaceNil;if(!($interfaceIsEqual(a,$ifaceNil))){h=g.newInputReader(a);}else if(!(b===BI.nil)){h=g.newInputBytes(b);}else{h=g.newInputString(c);}if(!(g.op===AJ)){if(!g.onepass(h,d)){f.put(g);return BE.nil;}}else{g.init(e);if(!g.match(h,d)){f.put(g);return BE.nil;}}if(e===0){f.put(g);return Q;}i=$makeSlice(BE,g.matchcap.$length);$copySlice(i,g.matchcap);f.put(g);return i;};AM.prototype.doExecute=function(a,b,c,d,e){return this.$val.doExecute(a,b,c,d,e);};T=function(a){var a,b="",c=false,d=0,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x;g=(e=a.Inst,f=a.Start,((f<0||f>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]));if(!((g.Op===3))||(((((g.Arg<<24>>>24))&4)>>>0)===0)){h="";i=g.Op===4;j=(a.Start>>>0);b=h;c=i;d=j;return[b,c,d];}d=g.Out;g=(k=a.Inst,((d<0||d>=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+d]));while(true){if(!(g.Op===6)){break;}d=g.Out;g=(l=a.Inst,((d<0||d>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+d]));}if(!((V(g)===7))||!((g.Rune.$length===1))){m="";n=g.Op===4;o=(a.Start>>>0);b=m;c=n;d=o;return[b,c,d];}p=$clone(new D.Buffer.ptr(),D.Buffer);while(true){if(!((V(g)===7)&&(g.Rune.$length===1)&&((((g.Arg<<16>>>16)&1)>>>0)===0))){break;}p.WriteRune((q=g.Rune,((0<0||0>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+0])));r=g.Out;s=(t=a.Inst,u=g.Out,((u<0||u>=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+u]));d=r;g=s;}v=p.String();w=(g.Op===3)&&!((((((g.Arg<<24>>>24))&4)>>>0)===0));x=d;b=v;c=w;d=x;return[b,c,d];};U=function(a,b){var a,b,c,d;c=a.Inst.MatchRunePos(b);if(c>=0){return(d=a.Next,((c<0||c>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+c]));}if(a.Inst.Op===1){return a.Inst.Out;}return 0;};V=function(a){var a,b,c;b=a.Op;c=b;if(c===8||c===9||c===10){b=7;}return b;};W.ptr.prototype.empty=function(){var a;a=this;return a.nextIndex>=a.size;};W.prototype.empty=function(){return this.$val.empty();};W.ptr.prototype.next=function(){var a=0,b,c,d;b=this;a=(c=b.dense,d=b.nextIndex,((d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]));b.nextIndex=b.nextIndex+(1)>>>0;return a;};W.prototype.next=function(){return this.$val.next();};W.ptr.prototype.clear=function(){var a;a=this;a.size=0;a.nextIndex=0;};W.prototype.clear=function(){return this.$val.clear();};W.ptr.prototype.contains=function(a){var a,b,c,d,e,f;b=this;if(a>=(b.sparse.$length>>>0)){return false;}return(c=b.sparse,((a<0||a>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a]))=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+a])),((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]))===a);};W.prototype.contains=function(a){return this.$val.contains(a);};W.ptr.prototype.insert=function(a){var a,b;b=this;if(!b.contains(a)){b.insertNew(a);}};W.prototype.insert=function(a){return this.$val.insert(a);};W.ptr.prototype.insertNew=function(a){var a,b,c,d,e;b=this;if(a>=(b.sparse.$length>>>0)){return;}(c=b.sparse,(a<0||a>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a]=b.size);(d=b.dense,e=b.size,(e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]=a);b.size=b.size+(1)>>>0;};W.prototype.insertNew=function(a){return this.$val.insertNew(a);};X=function(a){var a,b=BQ.nil;b=new W.ptr($makeSlice(BG,a),$makeSlice(BG,a),0,0);return b;};AA=function(a,b,c,d){var $deferred=[],$err=null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;try{$deferFrames.push($deferred);e=a.$get().$length;f=b.$get().$length;if(!(((e&1)===0))||!(((f&1)===0))){$panic(new $String("mergeRuneSets odd length []rune"));}g=0;h=0;i=g;j=h;k=$makeSlice(BF,0);l=$makeSlice(BG,0);m=true;$deferred.push([(function(){if(!m){k=BF.nil;l=BG.nil;}}),[]]);n=-1;o=(function(o,p,q){var o,p,q,r,s,t,u,v,w;if(n>0&&(r=p.$get(),s=o.$get(),((s<0||s>=r.$length)?$throwRuntimeError("index out of range"):r.$array[r.$offset+s]))<=((n<0||n>=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+n])){return false;}k=$append(k,(t=p.$get(),u=o.$get(),((u<0||u>=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+u])),(v=p.$get(),w=o.$get()+1>>0,((w<0||w>=v.$length)?$throwRuntimeError("index out of range"):v.$array[v.$offset+w])));o.$set(o.$get()+(2)>>0);n=n+(2)>>0;l=$append(l,q);return true;});while(true){if(!(i=f){m=o(new BP(function(){return i;},function($v){i=$v;}),a,c);}else if(i>=e){m=o(new BP(function(){return j;},function($v){j=$v;}),b,d);}else if((p=b.$get(),((j<0||j>=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+j]))<(q=a.$get(),((i<0||i>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+i]))){m=o(new BP(function(){return j;},function($v){j=$v;}),b,d);}else{m=o(new BP(function(){return i;},function($v){i=$v;}),a,c);}if(!m){return[Y,Z];}}return[k,l];}catch(err){$err=err;return[BF.nil,BG.nil];}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};AB=function(a,b){var a,b,c,d,e,f,g,h,i,j;c=b.Inst;d=0;while(true){if(!(d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]),C.Inst);g=f.Op;if(g===0||g===1||g===7){}else if(g===2||g===3||g===6||g===4||g===5){(h=a.Inst,((e<0||e>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+e])).Next=BG.nil;}else if(g===8||g===9||g===10){(i=a.Inst,((e<0||e>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+e])).Next=BG.nil;$copy((j=a.Inst,((e<0||e>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+e])),new S.ptr($clone(f,C.Inst),BG.nil),S);}d++;}};AC=function(a){var a,aa,ab,ac,ad,ae,af,ag,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;b=new R.ptr(BR.nil,a.Start,a.NumCap);c=a.Inst;d=0;while(true){if(!(d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]),C.Inst);b.Inst=$append(b.Inst,new S.ptr($clone(e,C.Inst),BG.nil));d++;}f=b.Inst;g=0;while(true){if(!(g=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+i])).Inst.Op;if(j===0||j===1){m=new BS(function(){return this.$target.Inst.Out;},function($v){this.$target.Inst.Out=$v;},(l=b.Inst,((i<0||i>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+i])));h[0]=new BS(function(){return this.$target.Inst.Arg;},function($v){this.$target.Inst.Arg=$v;},(n=b.Inst,((i<0||i>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+i])));q=$clone((o=b.Inst,p=h[0].$get(),((p<0||p>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+p])),S);if(!((q.Inst.Op===0)||(q.Inst.Op===1))){r=m;s=h[0];h[0]=r;m=s;$copy(q,(t=b.Inst,u=h[0].$get(),((u<0||u>=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+u])),S);if(!((q.Inst.Op===0)||(q.Inst.Op===1))){g++;continue;}}x=$clone((v=b.Inst,w=m.$get(),((w<0||w>=v.$length)?$throwRuntimeError("index out of range"):v.$array[v.$offset+w])),S);if((x.Inst.Op===0)||(x.Inst.Op===1)){g++;continue;}aa=new BS(function(){return this.$target.Inst.Out;},function($v){this.$target.Inst.Out=$v;},(y=b.Inst,z=h[0].$get(),((z<0||z>=y.$length)?$throwRuntimeError("index out of range"):y.$array[y.$offset+z])));ad=new BS(function(){return this.$target.Inst.Arg;},function($v){this.$target.Inst.Arg=$v;},(ab=b.Inst,ac=h[0].$get(),((ac<0||ac>=ab.$length)?$throwRuntimeError("index out of range"):ab.$array[ab.$offset+ac])));ae=false;if(q.Inst.Out===(i>>>0)){ae=true;}else if(q.Inst.Arg===(i>>>0)){ae=true;af=ad;ag=aa;aa=af;ad=ag;}if(ae){aa.$set(m.$get());}if(m.$get()===aa.$get()){h[0].$set(ad.$get());}}else{g++;continue;}g++;}return b;};AD.prototype.Len=function(){var a;a=this;return a.$length;};$ptrType(AD).prototype.Len=function(){return this.$get().Len();};AD.prototype.Less=function(a,b){var a,b,c;c=this;return((a<0||a>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a])<((b<0||b>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+b]);};$ptrType(AD).prototype.Less=function(a,b){return this.$get().Less(a,b);};AD.prototype.Swap=function(a,b){var a,b,c,d,e;c=this;d=((b<0||b>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+b]);e=((a<0||a>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a]);(a<0||a>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a]=d;(b<0||b>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+b]=e;};$ptrType(AD).prototype.Swap=function(a,b){return this.$get().Swap(a,b);};AD.prototype.Sort=function(){var a;a=this;E.Sort(a);};$ptrType(AD).prototype.Sort=function(){return this.$get().Sort();};AG=function(a){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o;if(a.Inst.$length>=1000){return AJ;}b=X(a.Inst.$length);c=X(a.Inst.$length);d=$throwNilPointerError;e=$throwNilPointerError;f=$makeSlice(BT,a.Inst.$length);d=(function(g,h){var g,h,i,j,k;if(h.contains(g)){return;}j=$clone((i=a.Inst,((g<0||g>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+g])),S);k=j.Inst.Op;if(k===0||k===1){h.insert(j.Inst.Out);d(j.Inst.Out,h);h.insert(j.Inst.Arg);}else if(k===4||k===5){}else{h.insert(j.Inst.Out);}});e=(function(g,h){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,g,h,i=false,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;i=true;k=(j=a.Inst,((g<0||g>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+g]));if(c.contains(g)){return i;}c.insert(g);l=k.Inst.Op;switch(0){default:if(l===0||l===1){i=e(k.Inst.Out,h)&&e(k.Inst.Arg,h);n=(m=h[k.Inst.Out],m!==undefined?m.v:false);p=(o=h[k.Inst.Arg],o!==undefined?o.v:false);if(n&&p){i=false;break;}if(p){q=k.Inst.Arg;r=k.Inst.Out;k.Inst.Out=q;k.Inst.Arg=r;s=p;t=n;n=s;p=t;}if(n){u=g;(h||$throwRuntimeError("assignment to entry in nil map"))[u]={k:u,v:true};k.Inst.Op=1;}v=AA(new BU(function(){return(x=k.Inst.Out,((x<0||x>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+x]));},function($v){(w=k.Inst.Out,(w<0||w>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+w]=$v);},f),new BU(function(){return(z=k.Inst.Arg,((z<0||z>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+z]));},function($v){(y=k.Inst.Arg,(y<0||y>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+y]=$v);},f),k.Inst.Out,k.Inst.Arg);(g<0||g>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]=v[0];k.Next=v[1];if(k.Next.$length>0&&((aa=k.Next,((0<0||0>=aa.$length)?$throwRuntimeError("index out of range"):aa.$array[aa.$offset+0]))===4294967295)){i=false;break;}}else if(l===2||l===6){i=e(k.Inst.Out,h);ab=g;(h||$throwRuntimeError("assignment to entry in nil map"))[ab]={k:ab,v:(ac=h[k.Inst.Out],ac!==undefined?ac.v:false)};(g<0||g>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]=$appendSlice(new BF([]),(ad=k.Inst.Out,((ad<0||ad>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+ad])));k.Next=new BG([]);af=(ae=((g<0||g>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]).$length/2,(ae===ae&&ae!==1/0&&ae!==-1/0)?ae>>0:$throwRuntimeError("integer divide by zero"));while(true){if(!(af>=0)){break;}k.Next=$append(k.Next,k.Inst.Out);af=af-(1)>>0;}}else if(l===3){i=e(k.Inst.Out,h);ag=g;(h||$throwRuntimeError("assignment to entry in nil map"))[ag]={k:ag,v:(ah=h[k.Inst.Out],ah!==undefined?ah.v:false)};(g<0||g>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]=$appendSlice(new BF([]),(ai=k.Inst.Out,((ai<0||ai>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+ai])));k.Next=new BG([]);ak=(aj=((g<0||g>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]).$length/2,(aj===aj&&aj!==1/0&&aj!==-1/0)?aj>>0:$throwRuntimeError("integer divide by zero"));while(true){if(!(ak>=0)){break;}k.Next=$append(k.Next,k.Inst.Out);ak=ak-(1)>>0;}}else if(l===4||l===5){al=g;(h||$throwRuntimeError("assignment to entry in nil map"))[al]={k:al,v:k.Inst.Op===4};break;}else if(l===7){i=e(k.Inst.Out,h);am=g;(h||$throwRuntimeError("assignment to entry in nil map"))[am]={k:am,v:false};if(k.Next.$length>0){break;}if(k.Inst.Rune.$length===0){(g<0||g>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]=new BF([]);k.Next=new BG([k.Inst.Out]);break;}an=$makeSlice(BF,0);if((k.Inst.Rune.$length===1)&&!(((((k.Inst.Arg<<16>>>16)&1)>>>0)===0))){ap=(ao=k.Inst.Rune,((0<0||0>=ao.$length)?$throwRuntimeError("index out of range"):ao.$array[ao.$offset+0]));an=$append(an,ap,ap);aq=F.SimpleFold(ap);while(true){if(!(!((aq===ap)))){break;}an=$append(an,aq,aq);aq=F.SimpleFold(aq);}E.Sort($subslice(new AD(an.$array),an.$offset,an.$offset+an.$length));}else{an=$appendSlice(an,k.Inst.Rune);}(g<0||g>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]=an;k.Next=new BG([]);as=(ar=((g<0||g>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]).$length/2,(ar===ar&&ar!==1/0&&ar!==-1/0)?ar>>0:$throwRuntimeError("integer divide by zero"));while(true){if(!(as>=0)){break;}k.Next=$append(k.Next,k.Inst.Out);as=as-(1)>>0;}k.Inst.Op=7;}else if(l===8){i=e(k.Inst.Out,h);at=g;(h||$throwRuntimeError("assignment to entry in nil map"))[at]={k:at,v:false};if(k.Next.$length>0){break;}au=new BF([]);if(!(((((k.Inst.Arg<<16>>>16)&1)>>>0)===0))){aw=(av=k.Inst.Rune,((0<0||0>=av.$length)?$throwRuntimeError("index out of range"):av.$array[av.$offset+0]));au=$append(au,aw,aw);ax=F.SimpleFold(aw);while(true){if(!(!((ax===aw)))){break;}au=$append(au,ax,ax);ax=F.SimpleFold(ax);}E.Sort($subslice(new AD(au.$array),au.$offset,au.$offset+au.$length));}else{au=$append(au,(ay=k.Inst.Rune,((0<0||0>=ay.$length)?$throwRuntimeError("index out of range"):ay.$array[ay.$offset+0])),(az=k.Inst.Rune,((0<0||0>=az.$length)?$throwRuntimeError("index out of range"):az.$array[az.$offset+0])));}(g<0||g>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]=au;k.Next=new BG([]);bb=(ba=((g<0||g>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]).$length/2,(ba===ba&&ba!==1/0&&ba!==-1/0)?ba>>0:$throwRuntimeError("integer divide by zero"));while(true){if(!(bb>=0)){break;}k.Next=$append(k.Next,k.Inst.Out);bb=bb-(1)>>0;}k.Inst.Op=7;}else if(l===9){i=e(k.Inst.Out,h);bc=g;(h||$throwRuntimeError("assignment to entry in nil map"))[bc]={k:bc,v:false};if(k.Next.$length>0){break;}(g<0||g>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]=$appendSlice(new BF([]),AF);k.Next=new BG([k.Inst.Out]);}else if(l===10){i=e(k.Inst.Out,h);bd=g;(h||$throwRuntimeError("assignment to entry in nil map"))[bd]={k:bd,v:false};if(k.Next.$length>0){break;}(g<0||g>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]=$appendSlice(new BF([]),AE);k.Next=new BG([]);bf=(be=((g<0||g>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]).$length/2,(be===be&&be!==1/0&&be!==-1/0)?be>>0:$throwRuntimeError("integer divide by zero"));while(true){if(!(bf>=0)){break;}k.Next=$append(k.Next,k.Inst.Out);bf=bf-(1)>>0;}}}return i;});b.clear();b.insert((a.Start>>>0));g=new $Map();while(true){if(!(!b.empty())){break;}h=b.next();j=$clone((i=a.Inst,((h<0||h>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+h])),S);c.clear();if(!e(h,g)){a=AJ;break;}k=j.Inst.Op;if(k===0||k===1){b.insert(j.Inst.Out);b.insert(j.Inst.Arg);}else if(k===2||k===3||k===6){b.insert(j.Inst.Out);}else if(k===4){}else if(k===5){}else if(k===7||k===8||k===9||k===10){}else{}}if(!(a===AJ)){l=a.Inst;m=0;while(true){if(!(m=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+n])).Inst.Rune=((n<0||n>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+n]);m++;}}return a;};AK=function(a){var a,b=BH.nil,c,d,e,f,g,h,i,j,k,l,m,n,o;if(a.Start===0){b=AJ;return b;}if(!(((c=a.Inst,d=a.Start,((d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d])).Op===3))||!((((((e=a.Inst,f=a.Start,((f<0||f>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f])).Arg<<24>>>24)&4)>>>0)===4))){b=AJ;return b;}g=a.Inst;h=0;while(true){if(!(h=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]),C.Inst);l=(j=a.Inst,k=i.Out,((k<0||k>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+k])).Op;m=i.Op;if(m===0||m===1){if((l===4)||((n=a.Inst,o=i.Arg,((o<0||o>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+o])).Op===4)){b=AJ;return b;}}else if(m===3){if(l===4){if((((i.Arg<<24>>>24)&8)>>>0)===8){h++;continue;}b=AJ;return b;}}else{if(l===4){b=AJ;return b;}}h++;}b=AC(a);b=AG(b);if(!(b===AJ)){AB(b,a);}b=b;return b;};AM.ptr.prototype.String=function(){var a;a=this;return a.expr;};AM.prototype.String=function(){return this.$val.String();};AN=$pkg.Compile=function(a){var a;return AP(a,212,false);};AM.ptr.prototype.Longest=function(){var a;a=this;a.longest=true;};AM.prototype.Longest=function(){return this.$val.Longest();};AP=function(a,b,c){var a,b,c,d,e,f,g,h,i,j,k,l,m,n;d=C.Parse(a,b);e=d[0];f=d[1];if(!($interfaceIsEqual(f,$ifaceNil))){return[BK.nil,f];}g=e.MaxCap();h=e.CapNames();e=e.Simplify();i=C.Compile(e);j=i[0];f=i[1];if(!($interfaceIsEqual(f,$ifaceNil))){return[BK.nil,f];}k=new AM.ptr(a,j,AK(j),"",BI.nil,false,0,0,j.StartCond(),g,h,c,new I.Mutex.ptr(),BX.nil);if(k.onepass===AJ){l=j.Prefix();k.prefix=l[0];k.prefixComplete=l[1];}else{m=T(j);k.prefix=m[0];k.prefixComplete=m[1];k.prefixEnd=m[2];}if(!(k.prefix==="")){k.prefixBytes=new BI($stringToBytes(k.prefix));n=J.DecodeRuneInString(k.prefix);k.prefixRune=n[0];}return[k,$ifaceNil];};AM.ptr.prototype.get=function(){var a,b,c,d,e,f;a=this;a.mu.Lock();b=a.machine.$length;if(b>0){e=(c=a.machine,d=b-1>>0,((d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]));a.machine=$subslice(a.machine,0,(b-1>>0));a.mu.Unlock();return e;}a.mu.Unlock();f=P(a.prog,a.onepass);f.re=a;return f;};AM.prototype.get=function(){return this.$val.get();};AM.ptr.prototype.put=function(a){var a,b;b=this;b.mu.Lock();b.machine=$append(b.machine,a);b.mu.Unlock();};AM.prototype.put=function(a){return this.$val.put(a);};AQ=$pkg.MustCompile=function(a){var a,b,c,d;b=AN(a);c=b[0];d=b[1];if(!($interfaceIsEqual(d,$ifaceNil))){$panic(new $String("regexp: Compile("+AS(a)+"): "+d.Error()));}return c;};AS=function(a){var a;if(G.CanBackquote(a)){return"`"+a+"`";}return G.Quote(a);};AM.ptr.prototype.NumSubexp=function(){var a;a=this;return a.numSubexp;};AM.prototype.NumSubexp=function(){return this.$val.NumSubexp();};AM.ptr.prototype.SubexpNames=function(){var a;a=this;return a.subexpNames;};AM.prototype.SubexpNames=function(){return this.$val.SubexpNames();};AU.ptr.prototype.step=function(a){var a,b,c;b=this;if(a>0),1];}return J.DecodeRuneInString(b.str.substring(a));}return[-1,0];};AU.prototype.step=function(a){return this.$val.step(a);};AU.ptr.prototype.canCheckPrefix=function(){var a;a=this;return true;};AU.prototype.canCheckPrefix=function(){return this.$val.canCheckPrefix();};AU.ptr.prototype.hasPrefix=function(a){var a,b;b=this;return H.HasPrefix(b.str,a.prefix);};AU.prototype.hasPrefix=function(a){return this.$val.hasPrefix(a);};AU.ptr.prototype.index=function(a,b){var a,b,c;c=this;return H.Index(c.str.substring(b),a.prefix);};AU.prototype.index=function(a,b){return this.$val.index(a,b);};AU.ptr.prototype.context=function(a){var a,b,c,d,e,f,g,h;b=this;c=-1;d=-1;e=c;f=d;if(a>0&&a<=b.str.length){g=J.DecodeLastRuneInString(b.str.substring(0,a));e=g[0];}if(a=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a]));if(d<128){return[(d>>0),1];}return J.DecodeRune($subslice(b.str,a));}return[-1,0];};AV.prototype.step=function(a){return this.$val.step(a);};AV.ptr.prototype.canCheckPrefix=function(){var a;a=this;return true;};AV.prototype.canCheckPrefix=function(){return this.$val.canCheckPrefix();};AV.ptr.prototype.hasPrefix=function(a){var a,b;b=this;return D.HasPrefix(b.str,a.prefixBytes);};AV.prototype.hasPrefix=function(a){return this.$val.hasPrefix(a);};AV.ptr.prototype.index=function(a,b){var a,b,c;c=this;return D.Index($subslice(c.str,b),a.prefixBytes);};AV.prototype.index=function(a,b){return this.$val.index(a,b);};AV.ptr.prototype.context=function(a){var a,b,c,d,e,f,g,h;b=this;c=-1;d=-1;e=c;f=d;if(a>0&&a<=b.str.$length){g=J.DecodeLastRune($subslice(b.str,0,a));e=g[0];}if(a>0;return[d,e];};AW.prototype.step=function(a){return this.$val.step(a);};AW.ptr.prototype.canCheckPrefix=function(){var a;a=this;return false;};AW.prototype.canCheckPrefix=function(){return this.$val.canCheckPrefix();};AW.ptr.prototype.hasPrefix=function(a){var a,b;b=this;return false;};AW.prototype.hasPrefix=function(a){return this.$val.hasPrefix(a);};AW.ptr.prototype.index=function(a,b){var a,b,c;c=this;return-1;};AW.prototype.index=function(a,b){return this.$val.index(a,b);};AW.ptr.prototype.context=function(a){var a,b;b=this;return 0;};AW.prototype.context=function(a){return this.$val.context(a);};AM.ptr.prototype.LiteralPrefix=function(){var a="",b=false,c,d,e;c=this;d=c.prefix;e=c.prefixComplete;a=d;b=e;return[a,b];};AM.prototype.LiteralPrefix=function(){return this.$val.LiteralPrefix();};AM.ptr.prototype.MatchReader=function(a){var a,b;b=this;return!(b.doExecute(a,BI.nil,"",0,0)===BE.nil);};AM.prototype.MatchReader=function(a){return this.$val.MatchReader(a);};AM.ptr.prototype.MatchString=function(a){var a,b;b=this;return!(b.doExecute($ifaceNil,BI.nil,a,0,0)===BE.nil);};AM.prototype.MatchString=function(a){return this.$val.MatchString(a);};AM.ptr.prototype.Match=function(a){var a,b;b=this;return!(b.doExecute($ifaceNil,a,"",0,0)===BE.nil);};AM.prototype.Match=function(a){return this.$val.Match(a);};AM.ptr.prototype.ReplaceAllString=function(a,b){var a,b,c,d,e;c=this;d=2;if(H.Index(b,"$")>=0){d=2*((c.numSubexp+1>>0))>>0;}e=c.replaceAll(BI.nil,a,d,(function(e,f){var e,f;return c.expand(e,b,BI.nil,a,f);}));return $bytesToString(e);};AM.prototype.ReplaceAllString=function(a,b){return this.$val.ReplaceAllString(a,b);};AM.ptr.prototype.ReplaceAllLiteralString=function(a,b){var a,b,c;c=this;return $bytesToString(c.replaceAll(BI.nil,a,2,(function(d,e){var d,e;return $appendSlice(d,new BI($stringToBytes(b)));})));};AM.prototype.ReplaceAllLiteralString=function(a,b){return this.$val.ReplaceAllLiteralString(a,b);};AM.ptr.prototype.ReplaceAllStringFunc=function(a,b){var a,b,c,d;c=this;d=c.replaceAll(BI.nil,a,2,(function(d,e){var d,e;return $appendSlice(d,new BI($stringToBytes(b(a.substring(((0<0||0>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]),((1<0||1>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+1]))))));}));return $bytesToString(d);};AM.prototype.ReplaceAllStringFunc=function(a,b){return this.$val.ReplaceAllStringFunc(a,b);};AM.ptr.prototype.replaceAll=function(a,b,c,d){var a,b,c,d,e,f,g,h,i,j,k,l,m;e=this;f=0;g=0;h=BI.nil;i=0;if(!(a===BI.nil)){i=a.$length;}else{i=b.length;}while(true){if(!(g<=i)){break;}j=e.doExecute($ifaceNil,a,b,g,c);if(j.$length===0){break;}if(!(a===BI.nil)){h=$appendSlice(h,$subslice(a,f,((0<0||0>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+0])));}else{h=$appendSlice(h,new BI($stringToBytes(b.substring(f,((0<0||0>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+0])))));}if(((1<0||1>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+1])>f||(((0<0||0>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+0])===0)){h=d(h,j);}f=((1<0||1>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+1]);k=0;if(!(a===BI.nil)){l=J.DecodeRune($subslice(a,g));k=l[1];}else{m=J.DecodeRuneInString(b.substring(g));k=m[1];}if((g+k>>0)>((1<0||1>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+1])){g=g+(k)>>0;}else if((g+1>>0)>((1<0||1>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+1])){g=g+(1)>>0;}else{g=((1<0||1>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+1]);}}if(!(a===BI.nil)){h=$appendSlice(h,$subslice(a,f));}else{h=$appendSlice(h,new BI($stringToBytes(b.substring(f))));}return h;};AM.prototype.replaceAll=function(a,b,c,d){return this.$val.replaceAll(a,b,c,d);};AM.ptr.prototype.ReplaceAll=function(a,b){var a,b,c,d,e,f;c=this;d=2;if(D.IndexByte(b,36)>=0){d=2*((c.numSubexp+1>>0))>>0;}e="";f=c.replaceAll(a,"",d,(function(f,g){var f,g;if(!((e.length===b.$length))){e=$bytesToString(b);}return c.expand(f,e,a,"",g);}));return f;};AM.prototype.ReplaceAll=function(a,b){return this.$val.ReplaceAll(a,b);};AM.ptr.prototype.ReplaceAllLiteral=function(a,b){var a,b,c;c=this;return c.replaceAll(a,"",2,(function(d,e){var d,e;return $appendSlice(d,b);}));};AM.prototype.ReplaceAllLiteral=function(a,b){return this.$val.ReplaceAllLiteral(a,b);};AM.ptr.prototype.ReplaceAllFunc=function(a,b){var a,b,c;c=this;return c.replaceAll(a,"",2,(function(d,e){var d,e;return $appendSlice(d,b($subslice(a,((0<0||0>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]),((1<0||1>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+1]))));}));};AM.prototype.ReplaceAllFunc=function(a,b){return this.$val.ReplaceAllFunc(a,b);};AM.ptr.prototype.pad=function(a){var a,b,c;b=this;if(a===BE.nil){return BE.nil;}c=((1+b.numSubexp>>0))*2>>0;while(true){if(!(a.$length=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+1])===j){if(((0<0||0>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+0])===l){n=false;}o=0;if(b===BI.nil){p=J.DecodeRuneInString(a.substring(j,f));o=p[1];}else{q=J.DecodeRune($subslice(b,j,f));o=q[1];}if(o>0){j=j+(o)>>0;}else{j=f+1>>0;}}else{j=((1<0||1>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+1]);}l=((1<0||1>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+1]);if(n){d(e.pad(m));k=k+(1)>>0;}}};AM.prototype.allMatches=function(a,b,c,d){return this.$val.allMatches(a,b,c,d);};AM.ptr.prototype.Find=function(a){var a,b,c;b=this;c=b.doExecute($ifaceNil,a,"",0,2);if(c===BE.nil){return BI.nil;}return $subslice(a,((0<0||0>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+0]),((1<0||1>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+1]));};AM.prototype.Find=function(a){return this.$val.Find(a);};AM.ptr.prototype.FindIndex=function(a){var a,b=BE.nil,c,d;c=this;d=c.doExecute($ifaceNil,a,"",0,2);if(d===BE.nil){b=BE.nil;return b;}b=$subslice(d,0,2);return b;};AM.prototype.FindIndex=function(a){return this.$val.FindIndex(a);};AM.ptr.prototype.FindString=function(a){var a,b,c;b=this;c=b.doExecute($ifaceNil,BI.nil,a,0,2);if(c===BE.nil){return"";}return a.substring(((0<0||0>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+0]),((1<0||1>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+1]));};AM.prototype.FindString=function(a){return this.$val.FindString(a);};AM.ptr.prototype.FindStringIndex=function(a){var a,b=BE.nil,c,d;c=this;d=c.doExecute($ifaceNil,BI.nil,a,0,2);if(d===BE.nil){b=BE.nil;return b;}b=$subslice(d,0,2);return b;};AM.prototype.FindStringIndex=function(a){return this.$val.FindStringIndex(a);};AM.ptr.prototype.FindReaderIndex=function(a){var a,b=BE.nil,c,d;c=this;d=c.doExecute(a,BI.nil,"",0,2);if(d===BE.nil){b=BE.nil;return b;}b=$subslice(d,0,2);return b;};AM.prototype.FindReaderIndex=function(a){return this.$val.FindReaderIndex(a);};AM.ptr.prototype.FindSubmatch=function(a){var a,b,c,d,e,f,g,h,i,j;b=this;c=b.doExecute($ifaceNil,a,"",0,b.prog.NumCap);if(c===BE.nil){return BY.nil;}d=$makeSlice(BY,(1+b.numSubexp>>0));e=d;f=0;while(true){if(!(f>0)>0,((h<0||h>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+h]))>=0){(g<0||g>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+g]=$subslice(a,(i=2*g>>0,((i<0||i>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+i])),(j=(2*g>>0)+1>>0,((j<0||j>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+j])));}f++;}return d;};AM.prototype.FindSubmatch=function(a){return this.$val.FindSubmatch(a);};AM.ptr.prototype.Expand=function(a,b,c,d){var a,b,c,d,e;e=this;return e.expand(a,$bytesToString(b),c,"",d);};AM.prototype.Expand=function(a,b,c,d){return this.$val.Expand(a,b,c,d);};AM.ptr.prototype.ExpandString=function(a,b,c,d){var a,b,c,d,e;e=this;return e.expand(a,b,BI.nil,c,d);};AM.prototype.ExpandString=function(a,b,c,d){return this.$val.ExpandString(a,b,c,d);};AM.ptr.prototype.expand=function(a,b,c,d,e){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;f=this;while(true){if(!(b.length>0)){break;}g=H.Index(b,"$");if(g<0){break;}a=$appendSlice(a,new BI($stringToBytes(b.substring(0,g))));b=b.substring(g);if(b.length>1&&(b.charCodeAt(1)===36)){a=$append(a,36);b=b.substring(2);continue;}h=BD(b);i=h[0];j=h[1];k=h[2];l=h[3];if(!l){a=$append(a,36);b=b.substring(1);continue;}b=k;if(j>=0){if(((2*j>>0)+1>>0)>0,((m<0||m>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m]))>=0){if(!(c===BI.nil)){a=$appendSlice(a,$subslice(c,(n=2*j>>0,((n<0||n>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+n])),(o=(2*j>>0)+1>>0,((o<0||o>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+o]))));}else{a=$appendSlice(a,new BI($stringToBytes(d.substring((p=2*j>>0,((p<0||p>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+p])),(q=(2*j>>0)+1>>0,((q<0||q>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+q]))))));}}}else{r=f.subexpNames;s=0;while(true){if(!(s=r.$length)?$throwRuntimeError("index out of range"):r.$array[r.$offset+s]);if(i===u&&((2*t>>0)+1>>0)>0,((v<0||v>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+v]))>=0){if(!(c===BI.nil)){a=$appendSlice(a,$subslice(c,(w=2*t>>0,((w<0||w>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+w])),(x=(2*t>>0)+1>>0,((x<0||x>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+x]))));}else{a=$appendSlice(a,new BI($stringToBytes(d.substring((y=2*t>>0,((y<0||y>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+y])),(z=(2*t>>0)+1>>0,((z<0||z>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+z]))))));}break;}s++;}}}a=$appendSlice(a,new BI($stringToBytes(b)));return a;};AM.prototype.expand=function(a,b,c,d,e){return this.$val.expand(a,b,c,d,e);};BD=function(a){var a,b="",c=0,d="",e=false,f,g,h,i,j,k;if(a.length<2||!((a.charCodeAt(0)===36))){return[b,c,d,e];}f=false;if(a.charCodeAt(1)===123){f=true;a=a.substring(2);}else{a=a.substring(1);}g=0;while(true){if(!(g>0;}if(g===0){return[b,c,d,e];}b=a.substring(0,g);if(f){if(g>=a.length||!((a.charCodeAt(g)===125))){return[b,c,d,e];}g=g+(1)>>0;}c=0;k=0;while(true){if(!(k=100000000){c=-1;break;}c=((c*10>>0)+(b.charCodeAt(k)>>0)>>0)-48>>0;k=k+(1)>>0;}if((b.charCodeAt(0)===48)&&b.length>1){c=-1;}d=a.substring(g);e=true;return[b,c,d,e];};AM.ptr.prototype.FindSubmatchIndex=function(a){var a,b;b=this;return b.pad(b.doExecute($ifaceNil,a,"",0,b.prog.NumCap));};AM.prototype.FindSubmatchIndex=function(a){return this.$val.FindSubmatchIndex(a);};AM.ptr.prototype.FindStringSubmatch=function(a){var a,b,c,d,e,f,g,h,i,j;b=this;c=b.doExecute($ifaceNil,BI.nil,a,0,b.prog.NumCap);if(c===BE.nil){return BV.nil;}d=$makeSlice(BV,(1+b.numSubexp>>0));e=d;f=0;while(true){if(!(f>0)>0,((h<0||h>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+h]))>=0){(g<0||g>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+g]=a.substring((i=2*g>>0,((i<0||i>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+i])),(j=(2*g>>0)+1>>0,((j<0||j>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+j])));}f++;}return d;};AM.prototype.FindStringSubmatch=function(a){return this.$val.FindStringSubmatch(a);};AM.ptr.prototype.FindStringSubmatchIndex=function(a){var a,b;b=this;return b.pad(b.doExecute($ifaceNil,BI.nil,a,0,b.prog.NumCap));};AM.prototype.FindStringSubmatchIndex=function(a){return this.$val.FindStringSubmatchIndex(a);};AM.ptr.prototype.FindReaderSubmatchIndex=function(a){var a,b;b=this;return b.pad(b.doExecute(a,BI.nil,"",0,b.prog.NumCap));};AM.prototype.FindReaderSubmatchIndex=function(a){return this.$val.FindReaderSubmatchIndex(a);};AM.ptr.prototype.FindAll=function(a,b){var a,b,c,d;c=this;if(b<0){b=a.$length+1>>0;}d=$makeSlice(BY,0,10);c.allMatches("",a,b,(function(e){var e;d=$append(d,$subslice(a,((0<0||0>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]),((1<0||1>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+1])));}));if(d.$length===0){return BY.nil;}return d;};AM.prototype.FindAll=function(a,b){return this.$val.FindAll(a,b);};AM.ptr.prototype.FindAllIndex=function(a,b){var a,b,c,d;c=this;if(b<0){b=a.$length+1>>0;}d=$makeSlice(BZ,0,10);c.allMatches("",a,b,(function(e){var e;d=$append(d,$subslice(e,0,2));}));if(d.$length===0){return BZ.nil;}return d;};AM.prototype.FindAllIndex=function(a,b){return this.$val.FindAllIndex(a,b);};AM.ptr.prototype.FindAllString=function(a,b){var a,b,c,d;c=this;if(b<0){b=a.length+1>>0;}d=$makeSlice(BV,0,10);c.allMatches(a,BI.nil,b,(function(e){var e;d=$append(d,a.substring(((0<0||0>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]),((1<0||1>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+1])));}));if(d.$length===0){return BV.nil;}return d;};AM.prototype.FindAllString=function(a,b){return this.$val.FindAllString(a,b);};AM.ptr.prototype.FindAllStringIndex=function(a,b){var a,b,c,d;c=this;if(b<0){b=a.length+1>>0;}d=$makeSlice(BZ,0,10);c.allMatches(a,BI.nil,b,(function(e){var e;d=$append(d,$subslice(e,0,2));}));if(d.$length===0){return BZ.nil;}return d;};AM.prototype.FindAllStringIndex=function(a,b){return this.$val.FindAllStringIndex(a,b);};AM.ptr.prototype.FindAllSubmatch=function(a,b){var a,b,c,d;c=this;if(b<0){b=a.$length+1>>0;}d=$makeSlice(CA,0,10);c.allMatches("",a,b,(function(e){var e,f,g,h,i,j,k,l,m;g=$makeSlice(BY,(f=e.$length/2,(f===f&&f!==1/0&&f!==-1/0)?f>>0:$throwRuntimeError("integer divide by zero")));h=g;i=0;while(true){if(!(i>0,((k<0||k>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+k]))>=0){(j<0||j>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+j]=$subslice(a,(l=2*j>>0,((l<0||l>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+l])),(m=(2*j>>0)+1>>0,((m<0||m>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m])));}i++;}d=$append(d,g);}));if(d.$length===0){return CA.nil;}return d;};AM.prototype.FindAllSubmatch=function(a,b){return this.$val.FindAllSubmatch(a,b);};AM.ptr.prototype.FindAllSubmatchIndex=function(a,b){var a,b,c,d;c=this;if(b<0){b=a.$length+1>>0;}d=$makeSlice(BZ,0,10);c.allMatches("",a,b,(function(e){var e;d=$append(d,e);}));if(d.$length===0){return BZ.nil;}return d;};AM.prototype.FindAllSubmatchIndex=function(a,b){return this.$val.FindAllSubmatchIndex(a,b);};AM.ptr.prototype.FindAllStringSubmatch=function(a,b){var a,b,c,d;c=this;if(b<0){b=a.length+1>>0;}d=$makeSlice(CB,0,10);c.allMatches(a,BI.nil,b,(function(e){var e,f,g,h,i,j,k,l,m;g=$makeSlice(BV,(f=e.$length/2,(f===f&&f!==1/0&&f!==-1/0)?f>>0:$throwRuntimeError("integer divide by zero")));h=g;i=0;while(true){if(!(i>0,((k<0||k>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+k]))>=0){(j<0||j>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+j]=a.substring((l=2*j>>0,((l<0||l>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+l])),(m=(2*j>>0)+1>>0,((m<0||m>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m])));}i++;}d=$append(d,g);}));if(d.$length===0){return CB.nil;}return d;};AM.prototype.FindAllStringSubmatch=function(a,b){return this.$val.FindAllStringSubmatch(a,b);};AM.ptr.prototype.FindAllStringSubmatchIndex=function(a,b){var a,b,c,d;c=this;if(b<0){b=a.length+1>>0;}d=$makeSlice(BZ,0,10);c.allMatches(a,BI.nil,b,(function(e){var e;d=$append(d,e);}));if(d.$length===0){return BZ.nil;}return d;};AM.prototype.FindAllStringSubmatchIndex=function(a,b){return this.$val.FindAllStringSubmatchIndex(a,b);};AM.ptr.prototype.Split=function(a,b){var a,b,c,d,e,f,g,h,i,j;c=this;if(b===0){return BV.nil;}if(c.expr.length>0&&(a.length===0)){return new BV([""]);}d=c.FindAllStringIndex(a,b);e=$makeSlice(BV,0,d.$length);f=0;g=0;h=d;i=0;while(true){if(!(i=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i]);if(b>0&&e.$length>=(b-1>>0)){break;}g=((0<0||0>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+0]);if(!((((1<0||1>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+1])===0))){e=$append(e,a.substring(f,g));}f=((1<0||1>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+1]);i++;}if(!((g===a.length))){e=$append(e,a.substring(f));}return e;};AM.prototype.Split=function(a,b){return this.$val.Split(a,b);};BW.methods=[{prop:"newInputBytes",name:"newInputBytes",pkg:"regexp",typ:$funcType([BI],[AT],false)},{prop:"newInputString",name:"newInputString",pkg:"regexp",typ:$funcType([$String],[AT],false)},{prop:"newInputReader",name:"newInputReader",pkg:"regexp",typ:$funcType([B.RuneReader],[AT],false)},{prop:"init",name:"init",pkg:"regexp",typ:$funcType([$Int],[],false)},{prop:"alloc",name:"alloc",pkg:"regexp",typ:$funcType([CC],[BM],false)},{prop:"free",name:"free",pkg:"regexp",typ:$funcType([BM],[],false)},{prop:"match",name:"match",pkg:"regexp",typ:$funcType([AT,$Int],[$Bool],false)},{prop:"clear",name:"clear",pkg:"regexp",typ:$funcType([CD],[],false)},{prop:"step",name:"step",pkg:"regexp",typ:$funcType([CD,CD,$Int,$Int,$Int32,C.EmptyOp],[],false)},{prop:"add",name:"add",pkg:"regexp",typ:$funcType([CD,$Uint32,$Int,BE,C.EmptyOp,BM],[BM],false)},{prop:"onepass",name:"onepass",pkg:"regexp",typ:$funcType([AT,$Int],[$Bool],false)}];BQ.methods=[{prop:"empty",name:"empty",pkg:"regexp",typ:$funcType([],[$Bool],false)},{prop:"next",name:"next",pkg:"regexp",typ:$funcType([],[$Uint32],false)},{prop:"clear",name:"clear",pkg:"regexp",typ:$funcType([],[],false)},{prop:"reset",name:"reset",pkg:"regexp",typ:$funcType([],[],false)},{prop:"contains",name:"contains",pkg:"regexp",typ:$funcType([$Uint32],[$Bool],false)},{prop:"insert",name:"insert",pkg:"regexp",typ:$funcType([$Uint32],[],false)},{prop:"insertNew",name:"insertNew",pkg:"regexp",typ:$funcType([$Uint32],[],false)}];AD.methods=[{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Less",name:"Less",pkg:"",typ:$funcType([$Int,$Int],[$Bool],false)},{prop:"Swap",name:"Swap",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"Sort",name:"Sort",pkg:"",typ:$funcType([],[],false)}];BK.methods=[{prop:"doExecute",name:"doExecute",pkg:"regexp",typ:$funcType([B.RuneReader,BI,$String,$Int,$Int],[BE],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Longest",name:"Longest",pkg:"",typ:$funcType([],[],false)},{prop:"get",name:"get",pkg:"regexp",typ:$funcType([],[BW],false)},{prop:"put",name:"put",pkg:"regexp",typ:$funcType([BW],[],false)},{prop:"NumSubexp",name:"NumSubexp",pkg:"",typ:$funcType([],[$Int],false)},{prop:"SubexpNames",name:"SubexpNames",pkg:"",typ:$funcType([],[BV],false)},{prop:"LiteralPrefix",name:"LiteralPrefix",pkg:"",typ:$funcType([],[$String,$Bool],false)},{prop:"MatchReader",name:"MatchReader",pkg:"",typ:$funcType([B.RuneReader],[$Bool],false)},{prop:"MatchString",name:"MatchString",pkg:"",typ:$funcType([$String],[$Bool],false)},{prop:"Match",name:"Match",pkg:"",typ:$funcType([BI],[$Bool],false)},{prop:"ReplaceAllString",name:"ReplaceAllString",pkg:"",typ:$funcType([$String,$String],[$String],false)},{prop:"ReplaceAllLiteralString",name:"ReplaceAllLiteralString",pkg:"",typ:$funcType([$String,$String],[$String],false)},{prop:"ReplaceAllStringFunc",name:"ReplaceAllStringFunc",pkg:"",typ:$funcType([$String,CE],[$String],false)},{prop:"replaceAll",name:"replaceAll",pkg:"regexp",typ:$funcType([BI,$String,$Int,CF],[BI],false)},{prop:"ReplaceAll",name:"ReplaceAll",pkg:"",typ:$funcType([BI,BI],[BI],false)},{prop:"ReplaceAllLiteral",name:"ReplaceAllLiteral",pkg:"",typ:$funcType([BI,BI],[BI],false)},{prop:"ReplaceAllFunc",name:"ReplaceAllFunc",pkg:"",typ:$funcType([BI,CG],[BI],false)},{prop:"pad",name:"pad",pkg:"regexp",typ:$funcType([BE],[BE],false)},{prop:"allMatches",name:"allMatches",pkg:"regexp",typ:$funcType([$String,BI,$Int,CH],[],false)},{prop:"Find",name:"Find",pkg:"",typ:$funcType([BI],[BI],false)},{prop:"FindIndex",name:"FindIndex",pkg:"",typ:$funcType([BI],[BE],false)},{prop:"FindString",name:"FindString",pkg:"",typ:$funcType([$String],[$String],false)},{prop:"FindStringIndex",name:"FindStringIndex",pkg:"",typ:$funcType([$String],[BE],false)},{prop:"FindReaderIndex",name:"FindReaderIndex",pkg:"",typ:$funcType([B.RuneReader],[BE],false)},{prop:"FindSubmatch",name:"FindSubmatch",pkg:"",typ:$funcType([BI],[BY],false)},{prop:"Expand",name:"Expand",pkg:"",typ:$funcType([BI,BI,BI,BE],[BI],false)},{prop:"ExpandString",name:"ExpandString",pkg:"",typ:$funcType([BI,$String,$String,BE],[BI],false)},{prop:"expand",name:"expand",pkg:"regexp",typ:$funcType([BI,$String,BI,$String,BE],[BI],false)},{prop:"FindSubmatchIndex",name:"FindSubmatchIndex",pkg:"",typ:$funcType([BI],[BE],false)},{prop:"FindStringSubmatch",name:"FindStringSubmatch",pkg:"",typ:$funcType([$String],[BV],false)},{prop:"FindStringSubmatchIndex",name:"FindStringSubmatchIndex",pkg:"",typ:$funcType([$String],[BE],false)},{prop:"FindReaderSubmatchIndex",name:"FindReaderSubmatchIndex",pkg:"",typ:$funcType([B.RuneReader],[BE],false)},{prop:"FindAll",name:"FindAll",pkg:"",typ:$funcType([BI,$Int],[BY],false)},{prop:"FindAllIndex",name:"FindAllIndex",pkg:"",typ:$funcType([BI,$Int],[BZ],false)},{prop:"FindAllString",name:"FindAllString",pkg:"",typ:$funcType([$String,$Int],[BV],false)},{prop:"FindAllStringIndex",name:"FindAllStringIndex",pkg:"",typ:$funcType([$String,$Int],[BZ],false)},{prop:"FindAllSubmatch",name:"FindAllSubmatch",pkg:"",typ:$funcType([BI,$Int],[CA],false)},{prop:"FindAllSubmatchIndex",name:"FindAllSubmatchIndex",pkg:"",typ:$funcType([BI,$Int],[BZ],false)},{prop:"FindAllStringSubmatch",name:"FindAllStringSubmatch",pkg:"",typ:$funcType([$String,$Int],[CB],false)},{prop:"FindAllStringSubmatchIndex",name:"FindAllStringSubmatchIndex",pkg:"",typ:$funcType([$String,$Int],[BZ],false)},{prop:"Split",name:"Split",pkg:"",typ:$funcType([$String,$Int],[BV],false)}];CI.methods=[{prop:"step",name:"step",pkg:"regexp",typ:$funcType([$Int],[$Int32,$Int],false)},{prop:"canCheckPrefix",name:"canCheckPrefix",pkg:"regexp",typ:$funcType([],[$Bool],false)},{prop:"hasPrefix",name:"hasPrefix",pkg:"regexp",typ:$funcType([BK],[$Bool],false)},{prop:"index",name:"index",pkg:"regexp",typ:$funcType([BK,$Int],[$Int],false)},{prop:"context",name:"context",pkg:"regexp",typ:$funcType([$Int],[C.EmptyOp],false)}];CJ.methods=[{prop:"step",name:"step",pkg:"regexp",typ:$funcType([$Int],[$Int32,$Int],false)},{prop:"canCheckPrefix",name:"canCheckPrefix",pkg:"regexp",typ:$funcType([],[$Bool],false)},{prop:"hasPrefix",name:"hasPrefix",pkg:"regexp",typ:$funcType([BK],[$Bool],false)},{prop:"index",name:"index",pkg:"regexp",typ:$funcType([BK,$Int],[$Int],false)},{prop:"context",name:"context",pkg:"regexp",typ:$funcType([$Int],[C.EmptyOp],false)}];CK.methods=[{prop:"step",name:"step",pkg:"regexp",typ:$funcType([$Int],[$Int32,$Int],false)},{prop:"canCheckPrefix",name:"canCheckPrefix",pkg:"regexp",typ:$funcType([],[$Bool],false)},{prop:"hasPrefix",name:"hasPrefix",pkg:"regexp",typ:$funcType([BK],[$Bool],false)},{prop:"index",name:"index",pkg:"regexp",typ:$funcType([BK,$Int],[$Int],false)},{prop:"context",name:"context",pkg:"regexp",typ:$funcType([$Int],[C.EmptyOp],false)}];L.init([{prop:"sparse",name:"sparse",pkg:"regexp",typ:BG,tag:""},{prop:"dense",name:"dense",pkg:"regexp",typ:BO,tag:""}]);M.init([{prop:"pc",name:"pc",pkg:"regexp",typ:$Uint32,tag:""},{prop:"t",name:"t",pkg:"regexp",typ:BM,tag:""}]);N.init([{prop:"inst",name:"inst",pkg:"regexp",typ:CC,tag:""},{prop:"cap",name:"cap",pkg:"regexp",typ:BE,tag:""}]);O.init([{prop:"re",name:"re",pkg:"regexp",typ:BK,tag:""},{prop:"p",name:"p",pkg:"regexp",typ:BL,tag:""},{prop:"op",name:"op",pkg:"regexp",typ:BH,tag:""},{prop:"q0",name:"q0",pkg:"regexp",typ:L,tag:""},{prop:"q1",name:"q1",pkg:"regexp",typ:L,tag:""},{prop:"pool",name:"pool",pkg:"regexp",typ:BN,tag:""},{prop:"matched",name:"matched",pkg:"regexp",typ:$Bool,tag:""},{prop:"matchcap",name:"matchcap",pkg:"regexp",typ:BE,tag:""},{prop:"inputBytes",name:"inputBytes",pkg:"regexp",typ:AV,tag:""},{prop:"inputString",name:"inputString",pkg:"regexp",typ:AU,tag:""},{prop:"inputReader",name:"inputReader",pkg:"regexp",typ:AW,tag:""}]);R.init([{prop:"Inst",name:"Inst",pkg:"",typ:BR,tag:""},{prop:"Start",name:"Start",pkg:"",typ:$Int,tag:""},{prop:"NumCap",name:"NumCap",pkg:"",typ:$Int,tag:""}]);S.init([{prop:"Inst",name:"",pkg:"",typ:C.Inst,tag:""},{prop:"Next",name:"Next",pkg:"",typ:BG,tag:""}]);W.init([{prop:"sparse",name:"sparse",pkg:"regexp",typ:BG,tag:""},{prop:"dense",name:"dense",pkg:"regexp",typ:BG,tag:""},{prop:"size",name:"size",pkg:"regexp",typ:$Uint32,tag:""},{prop:"nextIndex",name:"nextIndex",pkg:"regexp",typ:$Uint32,tag:""}]);AD.init($Int32);AM.init([{prop:"expr",name:"expr",pkg:"regexp",typ:$String,tag:""},{prop:"prog",name:"prog",pkg:"regexp",typ:BL,tag:""},{prop:"onepass",name:"onepass",pkg:"regexp",typ:BH,tag:""},{prop:"prefix",name:"prefix",pkg:"regexp",typ:$String,tag:""},{prop:"prefixBytes",name:"prefixBytes",pkg:"regexp",typ:BI,tag:""},{prop:"prefixComplete",name:"prefixComplete",pkg:"regexp",typ:$Bool,tag:""},{prop:"prefixRune",name:"prefixRune",pkg:"regexp",typ:$Int32,tag:""},{prop:"prefixEnd",name:"prefixEnd",pkg:"regexp",typ:$Uint32,tag:""},{prop:"cond",name:"cond",pkg:"regexp",typ:C.EmptyOp,tag:""},{prop:"numSubexp",name:"numSubexp",pkg:"regexp",typ:$Int,tag:""},{prop:"subexpNames",name:"subexpNames",pkg:"regexp",typ:BV,tag:""},{prop:"longest",name:"longest",pkg:"regexp",typ:$Bool,tag:""},{prop:"mu",name:"mu",pkg:"regexp",typ:I.Mutex,tag:""},{prop:"machine",name:"machine",pkg:"regexp",typ:BX,tag:""}]);AT.init([{prop:"canCheckPrefix",name:"canCheckPrefix",pkg:"regexp",typ:$funcType([],[$Bool],false)},{prop:"context",name:"context",pkg:"regexp",typ:$funcType([$Int],[C.EmptyOp],false)},{prop:"hasPrefix",name:"hasPrefix",pkg:"regexp",typ:$funcType([BK],[$Bool],false)},{prop:"index",name:"index",pkg:"regexp",typ:$funcType([BK,$Int],[$Int],false)},{prop:"step",name:"step",pkg:"regexp",typ:$funcType([$Int],[$Int32,$Int],false)}]);AU.init([{prop:"str",name:"str",pkg:"regexp",typ:$String,tag:""}]);AV.init([{prop:"str",name:"str",pkg:"regexp",typ:BI,tag:""}]);AW.init([{prop:"r",name:"r",pkg:"regexp",typ:B.RuneReader,tag:""},{prop:"atEOT",name:"atEOT",pkg:"regexp",typ:$Bool,tag:""},{prop:"pos",name:"pos",pkg:"regexp",typ:$Int,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_regexp=function(){while(true){switch($s){case 0:$r=D.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=I.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}$r=G.$init($BLOCKING);$s=6;case 6:if($r&&$r.$blocking){$r=$r();}$r=H.$init($BLOCKING);$s=7;case 7:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=8;case 8:if($r&&$r.$blocking){$r=$r();}$r=F.$init($BLOCKING);$s=9;case 9:if($r&&$r.$blocking){$r=$r();}$r=J.$init($BLOCKING);$s=10;case 10:if($r&&$r.$blocking){$r=$r();}Q=$makeSlice(BE,0);Y=new BF([]);Z=new BG([4294967295]);AE=new BF([0,9,11,1114111]);AF=new BF([0,1114111]);AJ=BH.nil;}return;}};$init_regexp.$blocking=true;return $init_regexp;};return $pkg;})(); +$packages["github.com/mattn/go-runewidth"]=(function(){var $pkg={},A,B,C,D,G,O,P,Q,R,E,F,M,I,J,K,N;A=$packages["os"];B=$packages["regexp"];C=$packages["strings"];D=$pkg.interval=$newType(0,$kindStruct,"runewidth.interval","interval","github.com/mattn/go-runewidth",function(first_,last_){this.$val=this;this.first=first_!==undefined?first_:0;this.last=last_!==undefined?last_:0;});G=$pkg.Condition=$newType(0,$kindStruct,"runewidth.Condition","Condition","github.com/mattn/go-runewidth",function(EastAsianWidth_){this.$val=this;this.EastAsianWidth=EastAsianWidth_!==undefined?EastAsianWidth_:false;});O=$sliceType(D);P=$sliceType($Int32);Q=$sliceType($Uint8);R=$ptrType(G);G.ptr.prototype.RuneWidth=function(a){var a,b,c,d,e;b=this;if(a===0){return 0;}if(a<32||(a>=127&&a<160)){return 1;}c=E;d=0;while(true){if(!(d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]),D);if(e.first<=a&&a<=e.last){return 0;}d++;}if(b.EastAsianWidth&&J(a)){return 2;}if(a>=4352&&(a<=4447||(a===9001)||(a===9002)||(a>=11904&&a<=42191&&!((a===12351)))||(a>=44032&&a<=55203)||(a>=63744&&a<=64255)||(a>=65072&&a<=65135)||(a>=65280&&a<=65376)||(a>=65504&&a<=65510)||(a>=131072&&a<=196605)||(a>=196608&&a<=262141))){return 2;}return 1;};G.prototype.RuneWidth=function(a){return this.$val.RuneWidth(a);};G.ptr.prototype.StringWidth=function(a){var a,b=0,c,d,e,f;c=this;d=new P($stringToRunes(a));e=0;while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]);b=b+(c.RuneWidth(f))>>0;e++;}b=b;return b;};G.prototype.StringWidth=function(a){return this.$val.StringWidth(a);};G.ptr.prototype.Truncate=function(a,b,c){var a,b,c,d,e,f,g,h,i;d=this;e=new P($stringToRunes(a));f=K(c);b=b-(f)>>0;g=0;h=0;while(true){if(!(h=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+h]));if((g+i>>0)>b){break;}g=g+(i)>>0;h=h+(1)>>0;}if(h===e.$length){return $runesToString($subslice(e,0,h));}return $runesToString($subslice(e,0,h))+c;};G.prototype.Truncate=function(a,b,c){return this.$val.Truncate(a,b,c);};I=$pkg.RuneWidth=function(a){var a;return $pkg.DefaultCondition.RuneWidth(a);};J=$pkg.IsAmbiguousWidth=function(a){var a,b,c,d;b=F;c=0;while(true){if(!(c=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+c]),D);if(d.first<=a&&a<=d.last){return true;}c++;}return false;};K=$pkg.StringWidth=function(a){var a,b=0;b=$pkg.DefaultCondition.StringWidth(a);return b;};N=$pkg.IsEastAsian=function($b){var $args=arguments,$r,$s=0,$this=this,a,b,c,d,e,f,g,h,i,j,k;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:a=A.Getenv("LC_CTYPE",$BLOCKING);$s=1;case 1:if(a&&a.$blocking){a=a();}b=a;if(b===""){}else{$s=2;continue;}c=A.Getenv("LANG",$BLOCKING);$s=3;case 3:if(c&&c.$blocking){c=c();}b=c;case 2:if(b==="POSIX"||b==="C"){return false;}if(b.length>1&&(b.charCodeAt(0)===67)&&((b.charCodeAt(1)===46)||(b.charCodeAt(1)===45))){return false;}d=C.ToLower(b);e=M.FindStringSubmatch(b);if(e.$length===2){d=C.ToLower(((1<0||1>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+1]));}if(C.HasSuffix(d,"@cjk_narrow")){return false;}f=new Q($stringToBytes(d));g=0;while(true){if(!(g=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]);if(i===64){d=d.substring(0,h);break;}g++;}j=1;k=d;if(k==="utf-8"||k==="utf8"){j=6;}else if(k==="jis"){j=8;}else if(k==="eucjp"){j=3;}else if(k==="euckr"||k==="euccn"){j=2;}else if(k==="sjis"||k==="cp932"||k==="cp51932"||k==="cp936"||k==="cp949"||k==="cp950"){j=2;}else if(k==="big5"){j=2;}else if(k==="gbk"||k==="gb2312"){j=2;}if(j>1&&(!((d.charCodeAt(0)===117))||C.HasPrefix(b,"ja")||C.HasPrefix(b,"ko")||C.HasPrefix(b,"zh"))){return true;}return false;case-1:}return;}};$f.$blocking=true;return $f;};R.methods=[{prop:"RuneWidth",name:"RuneWidth",pkg:"",typ:$funcType([$Int32],[$Int],false)},{prop:"StringWidth",name:"StringWidth",pkg:"",typ:$funcType([$String],[$Int],false)},{prop:"Truncate",name:"Truncate",pkg:"",typ:$funcType([$String,$Int,$String],[$String],false)}];D.init([{prop:"first",name:"first",pkg:"github.com/mattn/go-runewidth",typ:$Int32,tag:""},{prop:"last",name:"last",pkg:"github.com/mattn/go-runewidth",typ:$Int32,tag:""}]);G.init([{prop:"EastAsianWidth",name:"EastAsianWidth",pkg:"",typ:$Bool,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_runewidth=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}E=new O([new D.ptr(768,879),new D.ptr(1155,1158),new D.ptr(1160,1161),new D.ptr(1425,1469),new D.ptr(1471,1471),new D.ptr(1473,1474),new D.ptr(1476,1477),new D.ptr(1479,1479),new D.ptr(1536,1539),new D.ptr(1552,1557),new D.ptr(1611,1630),new D.ptr(1648,1648),new D.ptr(1750,1764),new D.ptr(1767,1768),new D.ptr(1770,1773),new D.ptr(1807,1807),new D.ptr(1809,1809),new D.ptr(1840,1866),new D.ptr(1958,1968),new D.ptr(2027,2035),new D.ptr(2305,2306),new D.ptr(2364,2364),new D.ptr(2369,2376),new D.ptr(2381,2381),new D.ptr(2385,2388),new D.ptr(2402,2403),new D.ptr(2433,2433),new D.ptr(2492,2492),new D.ptr(2497,2500),new D.ptr(2509,2509),new D.ptr(2530,2531),new D.ptr(2561,2562),new D.ptr(2620,2620),new D.ptr(2625,2626),new D.ptr(2631,2632),new D.ptr(2635,2637),new D.ptr(2672,2673),new D.ptr(2689,2690),new D.ptr(2748,2748),new D.ptr(2753,2757),new D.ptr(2759,2760),new D.ptr(2765,2765),new D.ptr(2786,2787),new D.ptr(2817,2817),new D.ptr(2876,2876),new D.ptr(2879,2879),new D.ptr(2881,2883),new D.ptr(2893,2893),new D.ptr(2902,2902),new D.ptr(2946,2946),new D.ptr(3008,3008),new D.ptr(3021,3021),new D.ptr(3134,3136),new D.ptr(3142,3144),new D.ptr(3146,3149),new D.ptr(3157,3158),new D.ptr(3260,3260),new D.ptr(3263,3263),new D.ptr(3270,3270),new D.ptr(3276,3277),new D.ptr(3298,3299),new D.ptr(3393,3395),new D.ptr(3405,3405),new D.ptr(3530,3530),new D.ptr(3538,3540),new D.ptr(3542,3542),new D.ptr(3633,3633),new D.ptr(3636,3642),new D.ptr(3655,3662),new D.ptr(3761,3761),new D.ptr(3764,3769),new D.ptr(3771,3772),new D.ptr(3784,3789),new D.ptr(3864,3865),new D.ptr(3893,3893),new D.ptr(3895,3895),new D.ptr(3897,3897),new D.ptr(3953,3966),new D.ptr(3968,3972),new D.ptr(3974,3975),new D.ptr(3984,3991),new D.ptr(3993,4028),new D.ptr(4038,4038),new D.ptr(4141,4144),new D.ptr(4146,4146),new D.ptr(4150,4151),new D.ptr(4153,4153),new D.ptr(4184,4185),new D.ptr(4448,4607),new D.ptr(4959,4959),new D.ptr(5906,5908),new D.ptr(5938,5940),new D.ptr(5970,5971),new D.ptr(6002,6003),new D.ptr(6068,6069),new D.ptr(6071,6077),new D.ptr(6086,6086),new D.ptr(6089,6099),new D.ptr(6109,6109),new D.ptr(6155,6157),new D.ptr(6313,6313),new D.ptr(6432,6434),new D.ptr(6439,6440),new D.ptr(6450,6450),new D.ptr(6457,6459),new D.ptr(6679,6680),new D.ptr(6912,6915),new D.ptr(6964,6964),new D.ptr(6966,6970),new D.ptr(6972,6972),new D.ptr(6978,6978),new D.ptr(7019,7027),new D.ptr(7616,7626),new D.ptr(7678,7679),new D.ptr(8203,8207),new D.ptr(8234,8238),new D.ptr(8288,8291),new D.ptr(8298,8303),new D.ptr(8400,8431),new D.ptr(12330,12335),new D.ptr(12441,12442),new D.ptr(43014,43014),new D.ptr(43019,43019),new D.ptr(43045,43046),new D.ptr(64286,64286),new D.ptr(65024,65039),new D.ptr(65056,65059),new D.ptr(65279,65279),new D.ptr(65529,65531),new D.ptr(68097,68099),new D.ptr(68101,68102),new D.ptr(68108,68111),new D.ptr(68152,68154),new D.ptr(68159,68159),new D.ptr(119143,119145),new D.ptr(119155,119170),new D.ptr(119173,119179),new D.ptr(119210,119213),new D.ptr(119362,119364),new D.ptr(917505,917505),new D.ptr(917536,917631),new D.ptr(917760,917999)]);F=new O([new D.ptr(161,161),new D.ptr(164,164),new D.ptr(167,168),new D.ptr(170,170),new D.ptr(174,174),new D.ptr(176,180),new D.ptr(182,186),new D.ptr(188,191),new D.ptr(198,198),new D.ptr(208,208),new D.ptr(215,216),new D.ptr(222,225),new D.ptr(230,230),new D.ptr(232,234),new D.ptr(236,237),new D.ptr(240,240),new D.ptr(242,243),new D.ptr(247,250),new D.ptr(252,252),new D.ptr(254,254),new D.ptr(257,257),new D.ptr(273,273),new D.ptr(275,275),new D.ptr(283,283),new D.ptr(294,295),new D.ptr(299,299),new D.ptr(305,307),new D.ptr(312,312),new D.ptr(319,322),new D.ptr(324,324),new D.ptr(328,331),new D.ptr(333,333),new D.ptr(338,339),new D.ptr(358,359),new D.ptr(363,363),new D.ptr(462,462),new D.ptr(464,464),new D.ptr(466,466),new D.ptr(468,468),new D.ptr(470,470),new D.ptr(472,472),new D.ptr(474,474),new D.ptr(476,476),new D.ptr(593,593),new D.ptr(609,609),new D.ptr(708,708),new D.ptr(711,711),new D.ptr(713,715),new D.ptr(717,717),new D.ptr(720,720),new D.ptr(728,731),new D.ptr(733,733),new D.ptr(735,735),new D.ptr(913,929),new D.ptr(931,937),new D.ptr(945,961),new D.ptr(963,969),new D.ptr(1025,1025),new D.ptr(1040,1103),new D.ptr(1105,1105),new D.ptr(8208,8208),new D.ptr(8211,8214),new D.ptr(8216,8217),new D.ptr(8220,8221),new D.ptr(8224,8226),new D.ptr(8228,8231),new D.ptr(8240,8240),new D.ptr(8242,8243),new D.ptr(8245,8245),new D.ptr(8251,8251),new D.ptr(8254,8254),new D.ptr(8308,8308),new D.ptr(8319,8319),new D.ptr(8321,8324),new D.ptr(8364,8364),new D.ptr(8451,8451),new D.ptr(8453,8453),new D.ptr(8457,8457),new D.ptr(8467,8467),new D.ptr(8470,8470),new D.ptr(8481,8482),new D.ptr(8486,8486),new D.ptr(8491,8491),new D.ptr(8531,8532),new D.ptr(8539,8542),new D.ptr(8544,8555),new D.ptr(8560,8569),new D.ptr(8592,8601),new D.ptr(8632,8633),new D.ptr(8658,8658),new D.ptr(8660,8660),new D.ptr(8679,8679),new D.ptr(8704,8704),new D.ptr(8706,8707),new D.ptr(8711,8712),new D.ptr(8715,8715),new D.ptr(8719,8719),new D.ptr(8721,8721),new D.ptr(8725,8725),new D.ptr(8730,8730),new D.ptr(8733,8736),new D.ptr(8739,8739),new D.ptr(8741,8741),new D.ptr(8743,8748),new D.ptr(8750,8750),new D.ptr(8756,8759),new D.ptr(8764,8765),new D.ptr(8776,8776),new D.ptr(8780,8780),new D.ptr(8786,8786),new D.ptr(8800,8801),new D.ptr(8804,8807),new D.ptr(8810,8811),new D.ptr(8814,8815),new D.ptr(8834,8835),new D.ptr(8838,8839),new D.ptr(8853,8853),new D.ptr(8857,8857),new D.ptr(8869,8869),new D.ptr(8895,8895),new D.ptr(8978,8978),new D.ptr(9312,9449),new D.ptr(9451,9547),new D.ptr(9552,9587),new D.ptr(9600,9615),new D.ptr(9618,9621),new D.ptr(9632,9633),new D.ptr(9635,9641),new D.ptr(9650,9651),new D.ptr(9654,9655),new D.ptr(9660,9661),new D.ptr(9664,9665),new D.ptr(9670,9672),new D.ptr(9675,9675),new D.ptr(9678,9681),new D.ptr(9698,9701),new D.ptr(9711,9711),new D.ptr(9733,9734),new D.ptr(9737,9737),new D.ptr(9742,9743),new D.ptr(9748,9749),new D.ptr(9756,9756),new D.ptr(9758,9758),new D.ptr(9792,9792),new D.ptr(9794,9794),new D.ptr(9824,9825),new D.ptr(9827,9829),new D.ptr(9831,9834),new D.ptr(9836,9837),new D.ptr(9839,9839),new D.ptr(10045,10045),new D.ptr(10102,10111),new D.ptr(57344,63743),new D.ptr(65533,65533),new D.ptr(983040,1048573),new D.ptr(1048576,1114109)]);M=B.MustCompile("^[a-z][a-z][a-z]?(?:_[A-Z][A-Z])?\\.(.+)");$pkg.EastAsianWidth=N();$pkg.DefaultCondition=new G.ptr($pkg.EastAsianWidth);}return;}};$init_runewidth.$blocking=true;return $init_runewidth;};return $pkg;})(); +$packages["github.com/shurcooL/sanitized_anchor_name"]=(function(){var $pkg={},A,C,B;A=$packages["unicode"];C=$sliceType($Int32);B=$pkg.Create=function(a){var a,b,c,d,e,f;b=C.nil;c=false;d=new C($stringToRunes(a));e=0;while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]);if(A.IsLetter(f)||A.IsNumber(f)){if(c&&b.$length>0){b=$append(b,45);}c=false;b=$append(b,A.ToLower(f));}else{c=true;}e++;}return $runesToString(b);};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_sanitized_anchor_name=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}}return;}};$init_sanitized_anchor_name.$blocking=true;return $init_sanitized_anchor_name;};return $pkg;})(); +$packages["github.com/russross/blackfriday"]=(function(){var $pkg={},A,C,B,D,E,F,G,BA,BB,BC,BI,CR,CS,CT,CU,CV,CW,CX,DA,DB,DC,DE,DI,DJ,DK,J,Y,Z,AG,AN,AZ,a,b,H,AA,AB,AC,AE,AF,AH,AI,AJ,AK,AL,AM,AO,AP,AQ,AR,AS,AT,AU,BF,BG,BH,BJ,BK,BL,BM,BN,BO,BP,BQ,BR,BS;A=$packages["bytes"];C=$packages["fmt"];B=$packages["github.com/shurcooL/sanitized_anchor_name"];D=$packages["regexp"];E=$packages["strconv"];F=$packages["strings"];G=$packages["unicode/utf8"];BA=$pkg.Renderer=$newType(8,$kindInterface,"blackfriday.Renderer","Renderer","github.com/russross/blackfriday",null);BB=$pkg.inlineParser=$newType(4,$kindFunc,"blackfriday.inlineParser","inlineParser","github.com/russross/blackfriday",null);BC=$pkg.parser=$newType(0,$kindStruct,"blackfriday.parser","parser","github.com/russross/blackfriday",function(r_,refs_,inlineCallback_,flags_,nesting_,maxNesting_,insideLink_,notes_){this.$val=this;this.r=r_!==undefined?r_:$ifaceNil;this.refs=refs_!==undefined?refs_:false;this.inlineCallback=inlineCallback_!==undefined?inlineCallback_:DJ.zero();this.flags=flags_!==undefined?flags_:0;this.nesting=nesting_!==undefined?nesting_:0;this.maxNesting=maxNesting_!==undefined?maxNesting_:0;this.insideLink=insideLink_!==undefined?insideLink_:false;this.notes=notes_!==undefined?notes_:DC.nil;});BI=$pkg.reference=$newType(0,$kindStruct,"blackfriday.reference","reference","github.com/russross/blackfriday",function(link_,title_,noteId_,hasBlock_){this.$val=this;this.link=link_!==undefined?link_:CR.nil;this.title=title_!==undefined?title_:CR.nil;this.noteId=noteId_!==undefined?noteId_:0;this.hasBlock=hasBlock_!==undefined?hasBlock_:false;});CR=$sliceType($Uint8);CS=$sliceType(CR);CT=$ptrType($String);CU=$ptrType(CT);CV=$sliceType($Int);CW=$ptrType($Int);CX=$ptrType(A.Buffer);DA=$ptrType(BI);DB=$sliceType(CV);DC=$sliceType(DA);DE=$funcType([],[$Bool],false);DI=$ptrType(BC);DJ=$arrayType(BB,256);DK=$mapType($String,DA);BC.ptr.prototype.block=function(c,d){var c,d,e,f,g,h,i,j,k,l;e=this;if((d.$length===0)||!(((f=d.$length-1>>0,((f<0||f>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+f]))===10))){$panic(new $String("block input is missing terminating newline"));}if(e.nesting>=e.maxNesting){return;}e.nesting=e.nesting+(1)>>0;while(true){if(!(d.$length>0)){break;}if(e.isPrefixHeader(d)){d=$subslice(d,e.prefixHeader(c,d));continue;}if(((0<0||0>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+0])===60){g=e.html(c,d,true);if(g>0){d=$subslice(d,g);continue;}}if(!(((e.flags&4096)===0))){if(((0<0||0>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+0])===37){h=e.titleBlock(c,d,true);if(h>0){d=$subslice(d,h);continue;}}}i=e.isEmpty(d);if(i>0){d=$subslice(d,i);continue;}if(e.codePrefix(d)>0){d=$subslice(d,e.code(c,d));continue;}if(!(((e.flags&4)===0))){j=e.fencedCode(c,d,true);if(j>0){d=$subslice(d,j);continue;}}if(e.isHRule(d)){e.r.HRule(c);k=0;k=0;while(true){if(!(!((((k<0||k>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+k])===10)))){break;}k=k+(1)>>0;}d=$subslice(d,k);continue;}if(e.quotePrefix(d)>0){d=$subslice(d,e.quote(c,d));continue;}if(!(((e.flags&2)===0))){l=e.table(c,d);if(l>0){d=$subslice(d,l);continue;}}if(e.uliPrefix(d)>0){d=$subslice(d,e.list(c,d,0));continue;}if(e.oliPrefix(d)>0){d=$subslice(d,e.list(c,d,1));continue;}d=$subslice(d,e.paragraph(c,d));}e.nesting=e.nesting-(1)>>0;};BC.prototype.block=function(c,d){return this.$val.block(c,d);};BC.ptr.prototype.isPrefixHeader=function(c){var c,d,e;d=this;if(!((((0<0||0>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+0])===35))){return false;}if(!(((d.flags&64)===0))){e=0;while(true){if(!(e<6&&(((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===35))){break;}e=e+(1)>>0;}if(!((((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===32))){return false;}}return true;};BC.prototype.isPrefixHeader=function(c){return this.$val.isPrefixHeader(c);};BC.ptr.prototype.prefixHeader=function(c,d){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;e=this;f=0;while(true){if(!(f<6&&(((f<0||f>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+f])===35))){break;}f=f+(1)>>0;}g=0;h=0;i=g;j=h;i=f;while(true){if(!(((i<0||i>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+i])===32)){break;}i=i+(1)>>0;}j=i;while(true){if(!(!((((j<0||j>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+j])===10)))){break;}j=j+(1)>>0;}k=j;l="";if(!(((e.flags&2048)===0))){m=0;n=0;o=m;p=n;o=i;while(true){if(!(o<(j-1>>0)&&(!((((o<0||o>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+o])===123))||!(((q=o+1>>0,((q<0||q>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+q]))===35))))){break;}o=o+(1)>>0;}p=o+1>>0;while(true){if(!(p=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+p])===125)))){break;}p=p+(1)>>0;}if(o>0),p));j=o;k=p+1>>0;while(true){if(!(j>0&&((r=j-1>>0,((r<0||r>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+r]))===32))){break;}j=j-(1)>>0;}}}while(true){if(!(j>0&&((s=j-1>>0,((s<0||s>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+s]))===35))){break;}j=j-(1)>>0;}while(true){if(!(j>0&&((t=j-1>>0,((t<0||t>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+t]))===32))){break;}j=j-(1)>>0;}if(j>i){if(l===""&&!(((e.flags&8192)===0))){l=B.Create($bytesToString($subslice(d,i,j)));}u=(function(){e.inline(c,$subslice(d,i,j));return true;});e.r.Header(c,u,f,l);}return k;};BC.prototype.prefixHeader=function(c,d){return this.$val.prefixHeader(c,d);};BC.ptr.prototype.isUnderlinedHeader=function(c){var c,d,e,f;d=this;if(((0<0||0>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+0])===61){e=1;while(true){if(!(((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===61)){break;}e=e+(1)>>0;}while(true){if(!(((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===32)){break;}e=e+(1)>>0;}if(((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===10){return 1;}else{return 0;}}if(((0<0||0>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+0])===45){f=1;while(true){if(!(((f<0||f>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+f])===45)){break;}f=f+(1)>>0;}while(true){if(!(((f<0||f>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+f])===32)){break;}f=f+(1)>>0;}if(((f<0||f>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+f])===10){return 2;}else{return 0;}}return 0;};BC.prototype.isUnderlinedHeader=function(c){return this.$val.isUnderlinedHeader(c);};BC.ptr.prototype.titleBlock=function(c,d,e){var c,d,e,f,g,h,i,j,k,l;f=this;if(!((((0<0||0>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+0])===37))){return 0;}g=A.Split(d,new CR($stringToBytes("\n")));h=0;i=g;j=0;while(true){if(!(j=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]);if(!A.HasPrefix(l,new CR($stringToBytes("%")))){h=k;break;}j++;}d=A.Join($subslice(g,0,h),new CR($stringToBytes("\n")));f.r.TitleBlock(c,d);return d.$length;};BC.prototype.titleBlock=function(c,d,e){return this.$val.titleBlock(c,d,e);};BC.ptr.prototype.html=function(c,d,e){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;f=this;g=0;h=0;i=g;j=h;if(!((((0<0||0>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+0])===60))){return 0;}k=f.htmlFindTag($subslice(d,1));l=k[0];m=k[1];if(!m){n=f.htmlComment(c,d,e);if(n>0){return n;}o=f.htmlHr(c,d,e);if(o>0){return o;}return 0;}p=false;if(!p&&!(l==="ins")&&!(l==="del")){i=1;while(true){if(!(i>0;while(true){if(!(i>0,((q<0||q>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+q]))===60)&&(((i<0||i>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+i])===47)))){break;}i=i+(1)>>0;}if(((i+2>>0)+l.length>>0)>=d.$length){break;}j=f.htmlFindEnd(l,$subslice(d,(i-1>>0)));if(j>0){i=i+((j-1>>0))>>0;p=true;break;}}}if(!p){return 0;}if(e){r=i;while(true){if(!(r>0&&((s=r-1>>0,((s<0||s>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+s]))===10))){break;}r=r-(1)>>0;}f.r.BlockHtml(c,$subslice(d,0,r));}return i;};BC.prototype.html=function(c,d,e){return this.$val.html(c,d,e);};BC.ptr.prototype.htmlComment=function(c,d,e){var c,d,e,f,g,h,i,j,k,l,m;f=this;if(!((((0<0||0>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+0])===60))||!((((1<0||1>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+1])===33))||!((((2<0||2>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+2])===45))||!((((3<0||3>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+3])===45))){return 0;}g=5;while(true){if(!(g>0,((h<0||h>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+h]))===45)&&((i=g-1>>0,((i<0||i>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+i]))===45)&&(((g<0||g>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+g])===62)))){break;}g=g+(1)>>0;}g=g+(1)>>0;if(g>=d.$length){return 0;}j=f.isEmpty($subslice(d,g));if(j>0){k=g+j>>0;if(e){l=k;while(true){if(!(l>0&&((m=l-1>>0,((m<0||m>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+m]))===10))){break;}l=l-(1)>>0;}f.r.BlockHtml(c,$subslice(d,0,l));}return k;}return 0;};BC.prototype.htmlComment=function(c,d,e){return this.$val.htmlComment(c,d,e);};BC.ptr.prototype.htmlHr=function(c,d,e){var c,d,e,f,g,h,i,j,k;f=this;if(!((((0<0||0>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+0])===60))||(!((((1<0||1>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+1])===104))&&!((((1<0||1>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+1])===72)))||(!((((2<0||2>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+2])===114))&&!((((2<0||2>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+2])===82)))){return 0;}if(!((((3<0||3>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+3])===32))&&!((((3<0||3>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+3])===47))&&!((((3<0||3>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+3])===62))){return 0;}g=3;while(true){if(!(!((((g<0||g>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+g])===62))&&!((((g<0||g>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+g])===10)))){break;}g=g+(1)>>0;}if(((g<0||g>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+g])===62){g=g+(1)>>0;h=f.isEmpty($subslice(d,g));if(h>0){i=g+h>>0;if(e){j=i;while(true){if(!(j>0&&((k=j-1>>0,((k<0||k>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+k]))===10))){break;}j=j-(1)>>0;}f.r.BlockHtml(c,$subslice(d,0,j));}return i;}}return 0;};BC.prototype.htmlHr=function(c,d,e){return this.$val.htmlHr(c,d,e);};BC.ptr.prototype.htmlFindTag=function(c){var c,d,e,f,g;d=this;e=0;while(true){if(!(BP(((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])))){break;}e=e+(1)>>0;}f=$bytesToString($subslice(c,0,e));if((g=AZ[f],g!==undefined?g.v:false)){return[f,true];}return["",false];};BC.prototype.htmlFindTag=function(c){return this.$val.htmlFindTag(c);};BC.ptr.prototype.htmlFindEnd=function(c,d){var c,d,e,f,g,h;e=this;f=new CR($stringToBytes(""));if(!A.HasPrefix(d,f)){return 0;}g=f.$length;h=0;h=e.isEmpty($subslice(d,g));if(h===0){return 0;}g=g+(h)>>0;h=0;if(g>=d.$length){return g;}if(!(((e.flags&32)===0))){return g;}h=e.isEmpty($subslice(d,g));if(h===0){return 0;}return g+h>>0;};BC.prototype.htmlFindEnd=function(c,d){return this.$val.htmlFindEnd(c,d);};BC.ptr.prototype.isEmpty=function(c){var c,d,e;d=this;if(c.$length===0){return 0;}e=0;e=0;while(true){if(!(e=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===10)))){break;}if(!((((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===32))&&!((((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===9))){return 0;}e=e+(1)>>0;}return e+1>>0;};BC.prototype.isEmpty=function(c){return this.$val.isEmpty(c);};BC.ptr.prototype.isHRule=function(c){var c,d,e,f,g;d=this;e=0;while(true){if(!(e<3&&(((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===32))){break;}e=e+(1)>>0;}if(!((((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===42))&&!((((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===45))&&!((((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===95))){return false;}f=((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e]);g=0;while(true){if(!(!((((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===10)))){break;}if(((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===f){g=g+(1)>>0;}else if(!((((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===32))){return false;}e=e+(1)>>0;}return g>=3;};BC.prototype.isHRule=function(c){return this.$val.isHRule(c);};BC.ptr.prototype.isFencedCode=function(c,d,e){var c,d,e,f=0,g="",h,i,j,k,l,m,n,o,p,q;h=this;i=0;j=0;k=i;l=j;f=0;while(true){if(!(k=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+k])===32))){break;}k=k+(1)>>0;}if(k>=c.$length){return[f,g];}if(!((((k<0||k>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+k])===126))&&!((((k<0||k>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+k])===96))){return[f,g];}m=((k<0||k>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+k]);while(true){if(!(k=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+k])===m))){break;}l=l+(1)>>0;k=k+(1)>>0;}if(k>=c.$length){return[f,g];}if(l<3){return[f,g];}g=$bytesToString($subslice(c,(k-l>>0),k));if(!(e==="")&&!(g===e)){return[f,g];}if(!($pointerIsEqual(d,CU.nil))){n=0;while(true){if(!(k=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+k])===32))){break;}k=k+(1)>>0;}if(k>=c.$length){return[f,g];}o=k;if(((k<0||k>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+k])===123){k=k+(1)>>0;o=o+(1)>>0;while(true){if(!(k=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+k])===125))&&!((((k<0||k>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+k])===10)))){break;}n=n+(1)>>0;k=k+(1)>>0;}if(k>=c.$length||!((((k<0||k>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+k])===125))){return[f,g];}while(true){if(!(n>0&&BN(((o<0||o>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+o])))){break;}o=o+(1)>>0;n=n-(1)>>0;}while(true){if(!(n>0&&BN((p=(o+n>>0)-1>>0,((p<0||p>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+p]))))){break;}n=n-(1)>>0;}k=k+(1)>>0;}else{while(true){if(!(k=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+k])))){break;}n=n+(1)>>0;k=k+(1)>>0;}}q=$bytesToString($subslice(c,o,(o+n>>0)));d.$set(new CT(function(){return q;},function($v){q=$v;}));}while(true){if(!(k=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+k])===32))){break;}k=k+(1)>>0;}if(k>=c.$length||!((((k<0||k>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+k])===10))){return[f,g];}f=k+1>>0;return[f,g];};BC.prototype.isFencedCode=function(c,d,e){return this.$val.isFencedCode(c,d,e);};BC.ptr.prototype.fencedCode=function(c,d,e){var c,d,e,f,g,h,i,j,k,l,m,n,o;f=this;g=CT.nil;h=f.isFencedCode(d,new CU(function(){return g;},function($v){g=$v;}),"");i=h[0];j=h[1];if((i===0)||i>=d.$length){return 0;}k=$clone(new A.Buffer.ptr(),A.Buffer);while(true){if(!(true)){break;}l=f.isFencedCode($subslice(d,i),CU.nil,j);m=l[0];if(!((m===0))){i=i+(m)>>0;break;}n=i;while(true){if(!(n=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+n])===10)))){break;}n=n+(1)>>0;}n=n+(1)>>0;if(n>=d.$length){return 0;}if(e){k.Write($subslice(d,i,n));}i=n;}o="";if(!($pointerIsEqual(g,CT.nil))){o=g.$get();}if(e){f.r.BlockCode(c,k.Bytes(),o);}return i;};BC.prototype.fencedCode=function(c,d,e){return this.$val.fencedCode(c,d,e);};BC.ptr.prototype.table=function(c,d){var c,d,e,f,g,h,i,j,k,l,m,n;e=this;f=$clone(new A.Buffer.ptr(),A.Buffer);g=e.tableHeader(f,d);h=g[0];i=g[1];if(h===0){return 0;}j=$clone(new A.Buffer.ptr(),A.Buffer);while(true){if(!(h=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+h])===10)))){break;}if(((h<0||h>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+h])===124){m=m+(1)>>0;}h=h+(1)>>0;}if(m===0){h=n;break;}h=h+(1)>>0;e.tableRow(j,$subslice(d,n,h),i,false);}e.r.Table(c,f.Bytes(),j.Bytes(),i);return h;};BC.prototype.table=function(c,d){return this.$val.table(c,d);};H=function(c,d){var c,d,e,f;e=0;while(true){if(!(((d-e>>0)-1>>0)>=0&&((f=(d-e>>0)-1>>0,((f<0||f>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+f]))===92))){break;}e=e+(1)>>0;}return(e&1)===1;};BC.ptr.prototype.tableHeader=function(c,d){var c,d,e=0,f=CV.nil,g,h,i,j,k,l,m;g=this;h=0;i=1;h=0;while(true){if(!(!((((h<0||h>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+h])===10)))){break;}if((((h<0||h>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+h])===124)&&!H(d,h)){i=i+(1)>>0;}h=h+(1)>>0;}if(i===1){return[e,f];}j=$subslice(d,0,(h+1>>0));if(((0<0||0>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+0])===124){i=i-(1)>>0;}if(h>2&&((k=h-1>>0,((k<0||k>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+k]))===124)&&!H(d,h-1>>0)){i=i-(1)>>0;}f=$makeSlice(CV,i);h=h+(1)>>0;if(h>=d.$length){return[e,f];}if((((h<0||h>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+h])===124)&&!H(d,h)){h=h+(1)>>0;}while(true){if(!(((h<0||h>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+h])===32)){break;}h=h+(1)>>0;}l=0;while(true){if(!(!((((h<0||h>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+h])===10)))){break;}m=0;if(((h<0||h>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+h])===58){h=h+(1)>>0;(l<0||l>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+l]=((l<0||l>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+l])|(1);m=m+(1)>>0;}while(true){if(!(((h<0||h>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+h])===45)){break;}h=h+(1)>>0;m=m+(1)>>0;}if(((h<0||h>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+h])===58){h=h+(1)>>0;(l<0||l>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+l]=((l<0||l>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+l])|(2);m=m+(1)>>0;}while(true){if(!(((h<0||h>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+h])===32)){break;}h=h+(1)>>0;}if(m<3){return[e,f];}else if((((h<0||h>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+h])===124)&&!H(d,h)){l=l+(1)>>0;h=h+(1)>>0;while(true){if(!(((h<0||h>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+h])===32)){break;}h=h+(1)>>0;}if(l>=i&&!((((h<0||h>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+h])===10))){return[e,f];}}else if((!((((h<0||h>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+h])===124))||H(d,h))&&(l+1>>0)=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+h])===10){l=l+(1)>>0;}else{return[e,f];}}if(!((l===i))){return[e,f];}g.tableRow(c,j,f,true);e=h+1>>0;return[e,f];};BC.prototype.tableHeader=function(c,d){return this.$val.tableHeader(c,d);};BC.ptr.prototype.tableRow=function(c,d,e,f){var c,d,e,f,g,h,i,j,k,l,m,n,o,p;g=this;h=0;i=0;j=h;k=i;l=$clone(new A.Buffer.ptr(),A.Buffer);if((((j<0||j>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+j])===124)&&!H(d,j)){j=j+(1)>>0;}k=0;while(true){if(!(k=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+j])===32)){break;}j=j+(1)>>0;}m=j;while(true){if(!((!((((j<0||j>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+j])===124))||H(d,j))&&!((((j<0||j>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+j])===10)))){break;}j=j+(1)>>0;}n=j;j=j+(1)>>0;while(true){if(!(n>m&&((o=n-1>>0,((o<0||o>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+o]))===32))){break;}n=n-(1)>>0;}p=$clone(new A.Buffer.ptr(),A.Buffer);g.inline(p,$subslice(d,m,n));if(f){g.r.TableHeaderCell(l,p.Bytes(),((k<0||k>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+k]));}else{g.r.TableCell(l,p.Bytes(),((k<0||k>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+k]));}k=k+(1)>>0;}while(true){if(!(k=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+k]));}else{g.r.TableCell(l,CR.nil,((k<0||k>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+k]));}k=k+(1)>>0;}g.r.TableRow(c,l.Bytes());};BC.prototype.tableRow=function(c,d,e,f){return this.$val.tableRow(c,d,e,f);};BC.ptr.prototype.quotePrefix=function(c){var c,d,e,f;d=this;e=0;while(true){if(!(e<3&&(((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===32))){break;}e=e+(1)>>0;}if(((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===62){if((f=e+1>>0,((f<0||f>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+f]))===32){return e+2>>0;}return e+1>>0;}return 0;};BC.prototype.quotePrefix=function(c){return this.$val.quotePrefix(c);};BC.ptr.prototype.quote=function(c,d){var c,d,e,f,g,h,i,j,k,l;e=this;f=$clone(new A.Buffer.ptr(),A.Buffer);g=0;h=0;i=g;j=h;while(true){if(!(i=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+j])===10)))){break;}j=j+(1)>>0;}j=j+(1)>>0;k=e.quotePrefix($subslice(d,i));if(k>0){i=i+(k)>>0;}else if(e.isEmpty($subslice(d,i))>0&&(j>=d.$length||((e.quotePrefix($subslice(d,j))===0)&&(e.isEmpty($subslice(d,j))===0)))){break;}f.Write($subslice(d,i,j));i=j;}l=$clone(new A.Buffer.ptr(),A.Buffer);e.block(l,f.Bytes());e.r.BlockQuote(c,l.Bytes());return j;};BC.prototype.quote=function(c,d){return this.$val.quote(c,d);};BC.ptr.prototype.codePrefix=function(c){var c,d;d=this;if((((0<0||0>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+0])===32)&&(((1<0||1>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+1])===32)&&(((2<0||2>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+2])===32)&&(((3<0||3>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+3])===32)){return 4;}return 0;};BC.prototype.codePrefix=function(c){return this.$val.codePrefix(c);};BC.ptr.prototype.code=function(c,d){var c,d,e,f,g,h,i,j,k,l,m;e=this;f=$clone(new A.Buffer.ptr(),A.Buffer);g=0;while(true){if(!(g=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+g])===10)))){break;}g=g+(1)>>0;}g=g+(1)>>0;i=e.isEmpty($subslice(d,h,g))>0;j=e.codePrefix($subslice(d,h,g));if(j>0){h=h+(j)>>0;}else if(!i){g=h;break;}if(i){f.WriteByte(10);}else{f.Write($subslice(d,h,g));}}k=f.Bytes();l=k.$length;while(true){if(!(l>0&&((m=l-1>>0,((m<0||m>=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+m]))===10))){break;}l=l-(1)>>0;}if(!((l===k.$length))){f.Truncate(l);}f.WriteByte(10);e.r.BlockCode(c,f.Bytes(),"");return g;};BC.prototype.code=function(c,d){return this.$val.code(c,d);};BC.ptr.prototype.uliPrefix=function(c){var c,d,e,f;d=this;e=0;while(true){if(!(e<3&&(((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===32))){break;}e=e+(1)>>0;}if((!((((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===42))&&!((((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===43))&&!((((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===45)))||!(((f=e+1>>0,((f<0||f>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+f]))===32))){return 0;}return e+2>>0;};BC.prototype.uliPrefix=function(c){return this.$val.uliPrefix(c);};BC.ptr.prototype.oliPrefix=function(c){var c,d,e,f,g;d=this;e=0;while(true){if(!(e<3&&(((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===32))){break;}e=e+(1)>>0;}f=e;while(true){if(!(((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])>=48&&((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])<=57)){break;}e=e+(1)>>0;}if((f===e)||!((((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===46))||!(((g=e+1>>0,((g<0||g>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+g]))===32))){return 0;}return e+2>>0;};BC.prototype.oliPrefix=function(c){return this.$val.oliPrefix(c);};BC.ptr.prototype.list=function(c,d,e){var c,d,e,f,g,h;f=this;g=0;e=e|(4);h=(function(){var h;while(true){if(!(g>0;if((h===0)||!(((e&8)===0))){break;}e=e&(-5);}return true;});f.r.List(c,h,e);return g;};BC.prototype.list=function(c,d,e){return this.$val.list(c,d,e);};BC.ptr.prototype.listItem=function(c,d,e){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;f=this;g=0;while(true){if(!(g<3&&(((g<0||g>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+g])===32))){break;}g=g+(1)>>0;}h=f.uliPrefix(d);if(h===0){h=f.oliPrefix(d);}if(h===0){return 0;}while(true){if(!(((h<0||h>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+h])===32)){break;}h=h+(1)>>0;}i=h;while(true){if(!(!(((j=h-1>>0,((j<0||j>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+j]))===10)))){break;}h=h+(1)>>0;}k=$clone(new A.Buffer.ptr(),A.Buffer);k.Write($subslice(d,i,h));i=h;l=false;m=0;gatherlines:while(true){if(!(i>0;while(true){if(!(!(((n=h-1>>0,((n<0||n>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+n]))===10)))){break;}h=h+(1)>>0;}if(f.isEmpty($subslice(d,i,h))>0){l=true;i=h;continue;}o=0;while(true){if(!(o<4&&(i+o>>0)>0,((p<0||p>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+p]))===32))){break;}o=o+(1)>>0;}q=$subslice(d,(i+o>>0),h);if((f.uliPrefix(q)>0&&!f.isHRule(q))||f.oliPrefix(q)>0){if(l){e.$set(e.$get()|(2));}if(o<=g){break gatherlines;}if(m===0){m=k.Len();}}else if(f.isPrefixHeader(q)){if(l&&o<4){e.$set(e.$get()|(8));break gatherlines;}e.$set(e.$get()|(2));}else if(l&&o<4){e.$set(e.$get()|(8));break gatherlines;}else if(l){k.WriteByte(10);e.$set(e.$get()|(2));}if(l){l=false;k.WriteByte(10);}k.Write($subslice(d,(i+o>>0),h));i=h;}r=k.Bytes();s=$clone(new A.Buffer.ptr(),A.Buffer);if(!(((e.$get()&2)===0))){if(m>0){f.block(s,$subslice(r,0,m));f.block(s,$subslice(r,m));}else{f.block(s,r);}}else{if(m>0){f.inline(s,$subslice(r,0,m));f.block(s,$subslice(r,m));}else{f.inline(s,r);}}t=s.Bytes();u=t.$length;while(true){if(!(u>0&&((v=u-1>>0,((v<0||v>=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+v]))===10))){break;}u=u-(1)>>0;}f.r.ListItem(c,$subslice(t,0,u),e.$get());return i;};BC.prototype.listItem=function(c,d,e){return this.$val.listItem(c,d,e);};BC.ptr.prototype.renderParagraph=function(c,d){var c,d,e,f,g,h,i;e=this;if(d.$length===0){return;}f=0;while(true){if(!(((f<0||f>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+f])===32)){break;}f=f+(1)>>0;}g=d.$length-1>>0;while(true){if(!(g>f&&((h=g-1>>0,((h<0||h>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+h]))===32))){break;}g=g-(1)>>0;}i=(function(){e.inline(c,$subslice(d,f,g));return true;});e.r.Paragraph(c,i);};BC.prototype.renderParagraph=function(c,d){return this.$val.renderParagraph(c,d);};BC.ptr.prototype.paragraph=function(c,d){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;e=this;f=0;g=0;h=0;i=f;j=g;k=h;while(true){if(!(k0){e.renderParagraph(c,$subslice(d,0,k));return k+m>>0;}if(k>0){n=e.isUnderlinedHeader(l);if(n>0){e.renderParagraph(c,$subslice(d,0,i));o=k-1>>0;while(true){if(!(i=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+i])===32))){break;}i=i+(1)>>0;}while(true){if(!(o>i&&((p=o-1>>0,((p<0||p>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+p]))===32))){break;}o=o-(1)>>0;}q=(function(q,r,s){var q,r,s;return(function(){r.inline(q,s);return true;});})(c,e,$subslice(d,i,o));r="";if(!(((e.flags&8192)===0))){r=B.Create($bytesToString($subslice(d,i,o)));}e.r.Header(c,q,n,r);while(true){if(!(!((((k<0||k>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+k])===10)))){break;}k=k+(1)>>0;}return k;}}if(!(((e.flags&32)===0))){if((((k<0||k>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+k])===60)&&e.html(c,l,false)>0){e.renderParagraph(c,$subslice(d,0,k));return k;}}if(e.isPrefixHeader(l)||e.isHRule(l)){e.renderParagraph(c,$subslice(d,0,k));return k;}if(!(((e.flags&1024)===0))){if(!((e.uliPrefix(l)===0))||!((e.oliPrefix(l)===0))||!((e.quotePrefix(l)===0))||!((e.codePrefix(l)===0))){e.renderParagraph(c,$subslice(d,0,k));return k;}}while(true){if(!(!((((k<0||k>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+k])===10)))){break;}k=k+(1)>>0;}k=k+(1)>>0;}e.renderParagraph(c,$subslice(d,0,k));return k;};BC.prototype.paragraph=function(c,d){return this.$val.paragraph(c,d);};BC.ptr.prototype.inline=function(c,d){var c,d,e,f,g,h,i,j,k,l,m,n,o;e=this;if(e.nesting>=e.maxNesting){return;}e.nesting=e.nesting+(1)>>0;f=0;g=0;h=f;i=g;while(true){if(!(h=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+i]),((k<0||k>=j.length)?$throwRuntimeError("index out of range"):j[k]))===$throwNilPointerError)){break;}i=i+(1)>>0;}e.r.NormalText(c,$subslice(d,h,i));if(i>=d.$length){break;}h=i;n=(l=e.inlineCallback,m=((i<0||i>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+i]),((m<0||m>=l.length)?$throwRuntimeError("index out of range"):l[m]));o=n(e,c,d,h);if(o===0){i=h+1>>0;}else{h=h+(o)>>0;i=h;}}e.nesting=e.nesting-(1)>>0;};BC.prototype.inline=function(c,d){return this.$val.inline(c,d);};AA=function(c,d,e,f){var c,d,e,f,g,h;e=$subslice(e,f);g=((0<0||0>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]);h=0;if(e.$length>2&&!((((1<0||1>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+1])===g))){if((g===126)||BN(((1<0||1>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+1]))){return 0;}h=AS(c,d,$subslice(e,1),g);if(h===0){return 0;}return h+1>>0;}if(e.$length>3&&(((1<0||1>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+1])===g)&&!((((2<0||2>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+2])===g))){if(BN(((2<0||2>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+2]))){return 0;}h=AT(c,d,$subslice(e,2),g);if(h===0){return 0;}return h+2>>0;}if(e.$length>4&&(((1<0||1>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+1])===g)&&(((2<0||2>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+2])===g)&&!((((3<0||3>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+3])===g))){if((g===126)||BN(((3<0||3>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+3]))){return 0;}h=AU(c,d,e,3,g);if(h===0){return 0;}return h+3>>0;}return 0;};AB=function(c,d,e,f){var c,d,e,f,g,h,i,j,k,l,m,n;e=$subslice(e,f);g=0;while(true){if(!(g=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+g])===96))){break;}g=g+(1)>>0;}h=0;i=0;j=h;k=i;k=g;while(true){if(!(k=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+k])===96){j=j+(1)>>0;}else{j=0;}k=k+(1)>>0;}if(j=e.$length){return 0;}l=g;while(true){if(!(l=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+l])===32))){break;}l=l+(1)>>0;}m=k-g>>0;while(true){if(!(m>l&&((n=m-1>>0,((n<0||n>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+n]))===32))){break;}m=m-(1)>>0;}if(!((l===m))){c.r.CodeSpan(d,$subslice(e,l,m));}return k;};AC=function(c,d,e,f){var c,d,e,f,g,h,i,j,k,l,m;g=d.Bytes();h=g.$length;i=h;while(true){if(!(i>0&&((j=i-1>>0,((j<0||j>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+j]))===32))){break;}i=i-(1)>>0;}d.Truncate(i);m=f>=2&&((k=f-2>>0,((k<0||k>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+k]))===32)&&((l=f-1>>0,((l<0||l>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+l]))===32);if(((c.flags&128)===0)&&!m){return 0;}c.r.LineBreak(d);return 1;};AE=function(c,d,e,f){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;if(c.insideLink&&(f>0&&((g=f-1>>0,((g<0||g>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+g]))===91)||(e.$length-1>>0)>f&&((h=f+1>>0,((h<0||h>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+h]))===94))){return 0;}i=0;if(f>0&&((j=f-1>>0,((j<0||j>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+j]))===33)){i=1;}else if(!(((c.flags&512)===0))){if(f>0&&((k=f-1>>0,((k<0||k>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+k]))===94)){i=3;}else if((e.$length-1>>0)>f&&((l=f+1>>0,((l<0||l>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+l]))===94)){i=2;}}e=$subslice(e,f);m=1;n=0;o=CR.nil;p=CR.nil;q=o;r=p;s=false;if(i===2){m=m+(1)>>0;}t=1;while(true){if(!(t>0&&m=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m])===10){s=true;}else if((u=m-1>>0,((u<0||u>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+u]))===92){m=m+(1)>>0;continue;}else if(((m<0||m>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m])===91){t=t+(1)>>0;}else if(((m<0||m>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m])===93){t=t-(1)>>0;if(t<=0){m=m-(1)>>0;}}m=m+(1)>>0;}if(m>=e.$length){return 0;}v=m;m=m+(1)>>0;while(true){if(!(m=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m])))){break;}m=m+(1)>>0;}if(m=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m])===40)){m=m+(1)>>0;while(true){if(!(m=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m])))){break;}m=m+(1)>>0;}w=m;findlinkend:while(true){if(!(m=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m])===92){m=m+(2)>>0;}else if((((m<0||m>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m])===41)||(((m<0||m>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m])===39)||(((m<0||m>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m])===34)){break findlinkend;}else{m=m+(1)>>0;}}if(m>=e.$length){return 0;}x=m;y=0;z=0;aa=y;ab=z;if((((m<0||m>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m])===39)||(((m<0||m>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m])===34)){m=m+(1)>>0;aa=m;findtitleend:while(true){if(!(m=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m])===92){m=m+(2)>>0;}else if(((m<0||m>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m])===41){break findtitleend;}else{m=m+(1)>>0;}}if(m>=e.$length){return 0;}ab=m-1>>0;while(true){if(!(ab>aa&&BN(((ab<0||ab>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+ab])))){break;}ab=ab-(1)>>0;}if(!((((ab<0||ab>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+ab])===39))&&!((((ab<0||ab>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+ab])===34))){ac=0;ad=0;aa=ac;ab=ad;x=m;}}while(true){if(!(x>w&&BN((ae=x-1>>0,((ae<0||ae>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+ae]))))){break;}x=x-(1)>>0;}if(((w<0||w>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+w])===60){w=w+(1)>>0;}if((af=x-1>>0,((af<0||af>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+af]))===62){x=x-(1)>>0;}if(x>w){r=$subslice(e,w,x);}if(ab>aa){q=$subslice(e,aa,ab);}m=m+(1)>>0;}else if(m=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m])===91)){ag=CR.nil;m=m+(1)>>0;ah=m;while(true){if(!(m=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m])===93)))){break;}m=m+(1)>>0;}if(m>=e.$length){return 0;}ai=m;if(ah===ai){if(s){aj=$clone(new A.Buffer.ptr(),A.Buffer);ak=1;while(true){if(!(ak=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+ak])===10))){aj.WriteByte(((ak<0||ak>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+ak]));}else if(!(((al=ak-1>>0,((al<0||al>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+al]))===32))){aj.WriteByte(32);}ak=ak+(1)>>0;}ag=aj.Bytes();}else{ag=$subslice(e,1,v);}}else{ag=$subslice(e,ah,ai);}am=$bytesToString(A.ToLower(ag));an=(ao=c.refs[am],ao!==undefined?[ao.v,true]:[DA.nil,false]);ap=an[0];aq=an[1];if(!aq){return 0;}r=ap.link;q=ap.title;m=m+(1)>>0;}else{ar=CR.nil;if(s){as=$clone(new A.Buffer.ptr(),A.Buffer);at=1;while(true){if(!(at=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+at])===10))){as.WriteByte(((at<0||at>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+at]));}else if(!(((au=at-1>>0,((au<0||au>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+au]))===32))){as.WriteByte(32);}at=at+(1)>>0;}ar=as.Bytes();}else{if(i===2){ar=$subslice(e,2,v);}else{ar=$subslice(e,1,v);}}av=$bytesToString(A.ToLower(ar));if(i===3){n=c.notes.$length+1>>0;aw=CR.nil;if(ar.$length>0){if(ar.$length<16){aw=$makeSlice(CR,ar.$length);}else{aw=$makeSlice(CR,16);}$copySlice(aw,BS(ar));}else{aw=$appendSlice(new CR($stringToBytes("footnote-")),new CR($stringToBytes(E.Itoa(n))));}ax=new BI.ptr(aw,ar,n,false);c.notes=$append(c.notes,ax);r=ax.link;q=ax.title;}else{ay=(az=c.refs[av],az!==undefined?[az.v,true]:[DA.nil,false]);ba=ay[0];bb=ay[1];if(!bb){return 0;}if(i===2){ba.noteId=c.notes.$length+1>>0;c.notes=$append(c.notes,ba);}r=ba.link;q=ba.title;n=ba.noteId;}m=v+1>>0;}bc=$clone(new A.Buffer.ptr(),A.Buffer);if(v>1){if(i===1){bc.Write($subslice(e,1,v));}else{bd=c.insideLink;c.insideLink=true;c.inline(bc,$subslice(e,1,v));c.insideLink=bd;}}be=CR.nil;if((i===0)||(i===1)){if(r.$length>0){bf=$clone(new A.Buffer.ptr(),A.Buffer);AI(bf,r);be=bf.Bytes();}if((be.$length===0)||((i===0)&&(bc.Len()===0))){return 0;}}bg=i;if(bg===0){c.r.Link(d,be,q,bc.Bytes());}else if(bg===1){bh=d.Len();bi=d.Bytes();if(bh>0&&((bj=bh-1>>0,((bj<0||bj>=bi.$length)?$throwRuntimeError("index out of range"):bi.$array[bi.$offset+bj]))===33)){d.Truncate(bh-1>>0);}c.r.Image(d,be,q,bc.Bytes());}else if(bg===3){bk=d.Len();bl=d.Bytes();if(bk>0&&((bm=bk-1>>0,((bm<0||bm>=bl.$length)?$throwRuntimeError("index out of range"):bl.$array[bl.$offset+bm]))===94)){d.Truncate(bk-1>>0);}c.r.FootnoteRef(d,r,n);}else if(bg===2){c.r.FootnoteRef(d,r,n);}else{return 0;}return m;};AF=function(c,d,e,f){var c,d,e,f,g,h,i;e=$subslice(e,f);g=0;h=AP(e,new CW(function(){return g;},function($v){g=$v;}));if(h>2){if(!((g===0))){i=$clone(new A.Buffer.ptr(),A.Buffer);AI(i,$subslice(e,1,((h+1>>0)-2>>0)));if(i.Len()>0){c.r.AutoLink(d,i.Bytes(),g);}}else{c.r.RawHtmlTag(d,$subslice(e,0,h));}}return h;};AH=function(c,d,e,f){var c,d,e,f;e=$subslice(e,f);if(e.$length>1){if(A.IndexByte(AG,((1<0||1>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+1]))<0){return 0;}c.r.NormalText(d,$subslice(e,1,2));}return 2;};AI=function(c,d){var c,d,e,f,g;e=0;while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===92)))){break;}e=e+(1)>>0;}if(e>f){c.Write($subslice(d,f,e));}if((e+1>>0)>=d.$length){break;}c.WriteByte((g=e+1>>0,((g<0||g>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+g])));e=e+(2)>>0;}};AJ=function(c,d,e,f){var c,d,e,f,g;e=$subslice(e,f);g=1;if(g=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+g])===35)){g=g+(1)>>0;}while(true){if(!(g=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+g])))){break;}g=g+(1)>>0;}if(g=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+g])===59)){g=g+(1)>>0;}else{return 0;}c.r.Entity(d,$subslice(e,0,g));return g;};AK=function(c,d){var c,d,e,f,g;e=J.FindAllIndex($subslice(c,0,d),-1);if(!(e===DB.nil)&&((f=(g=e.$length-1>>0,((g<0||g>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+g])),((1<0||1>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+1]))===d)){return true;}return false;};AL=function(c,d,e,f){var aa,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;if(c.insideLink||e.$length<(f+3>>0)||!(((g=f+1>>0,((g<0||g>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+g]))===47))||!(((h=f+2>>0,((h<0||h>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+h]))===47))){return 0;}i=f;j=0;while(true){if(!(i>0&&!((((i<0||i>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+i])===60)))){break;}i=i-(1)>>0;j=j+(1)>>0;}k=Z.Find($subslice(e,i));if(!(k===CR.nil)){d.Write($subslice(k,j));return k.$length-j>>0;}l=0;while(true){if(!((f-l>>0)>0&&l<=7&&BO((m=(f-l>>0)-1>>0,((m<0||m>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m]))))){break;}l=l+(1)>>0;}if(l>6){return 0;}n=e;e=$subslice(e,(f-l>>0));if(!AO(e)){return 0;}o=0;while(true){if(!(o=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+o])))){break;}o=o+(1)>>0;}if((((p=o-1>>0,((p<0||p>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+p]))===46)||((q=o-1>>0,((q<0||q>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+q]))===44))&&!(((r=o-2>>0,((r<0||r>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+r]))===92))){o=o-(1)>>0;}if(((s=o-1>>0,((s<0||s>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+s]))===59)&&!(((t=o-2>>0,((t<0||t>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+t]))===92))&&!AK(e,o)){o=o-(1)>>0;}u=0;v=(w=o-1>>0,((w<0||w>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+w]));if(v===34){u=34;}else if(v===39){u=39;}else if(v===41){u=40;}else if(v===93){u=91;}else if(v===125){u=123;}else{u=0;}if(!((u===0))){x=((f-l>>0)+o>>0)-2>>0;y=1;while(true){if(!(x>=0&&!((((x<0||x>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+x])===10))&&!((y===0)))){break;}if(((x<0||x>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+x])===(z=o-1>>0,((z<0||z>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+z]))){y=y+(1)>>0;}if(((x<0||x>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+x])===u){y=y-(1)>>0;}x=x-(1)>>0;}if(y===0){o=o-(1)>>0;}}if(d.Len()>=l){d.Truncate(d.Bytes().$length-l>>0);}aa=$clone(new A.Buffer.ptr(),A.Buffer);AI(aa,$subslice(e,0,o));if(aa.Len()>0){c.r.AutoLink(d,aa.Bytes(),1);}return o-l>>0;};AM=function(c){var c;return BN(c)||(c===60);};AO=function(c){var c,d,e,f,g;d=AN;e=0;while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]);if(c.$length>f.$length&&A.Equal(A.ToLower($subslice(c,0,f.$length)),f)&&BP((g=f.$length,((g<0||g>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+g])))){return true;}e++;}return false;};AP=function(c,d){var c,d,e,f,g,h;e=0;f=0;g=e;h=f;if(c.$length<3){return 0;}if(!((((0<0||0>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+0])===60))){return 0;}if(((1<0||1>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+1])===47){g=2;}else{g=1;}if(!BP(((g<0||g>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+g]))){return 0;}d.$set(0);while(true){if(!(g=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+g]))||(((g<0||g>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+g])===46)||(((g<0||g>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+g])===43)||(((g<0||g>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+g])===45)))){break;}g=g+(1)>>0;}if(g>1&&g=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+g])===64)){h=AQ($subslice(c,g));if(!((h===0))){d.$set(2);return g+h>>0;}}if(g>2&&g=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+g])===58)){d.$set(1);g=g+(1)>>0;}if(g>=c.$length){d.$set(0);}else if(!((d.$get()===0))){h=g;while(true){if(!(g=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+g])===92){g=g+(2)>>0;}else if((((g<0||g>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+g])===62)||(((g<0||g>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+g])===39)||(((g<0||g>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+g])===34)||BN(((g<0||g>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+g]))){break;}else{g=g+(1)>>0;}}if(g>=c.$length){return 0;}if(g>h&&(((g<0||g>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+g])===62)){return g+1>>0;}d.$set(0);}while(true){if(!(g=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+g])===62)))){break;}g=g+(1)>>0;}if(g>=c.$length){return 0;}return g+1>>0;};AQ=function(c){var c,d,e,f;d=0;e=0;while(true){if(!(e=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e]))){e=e+(1)>>0;continue;}f=((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e]);switch(0){default:if(f===64){d=d+(1)>>0;}else if(f===45||f===46||f===95){break;}else if(f===62){if(d===1){return e+1>>0;}else{return 0;}}else{return 0;}}e=e+(1)>>0;}return 0;};AR=function(c,d){var c,d,e,f,g,h,i;e=1;while(true){if(!(e=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===d))&&!((((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===96))&&!((((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===91)))){break;}e=e+(1)>>0;}if(e>=c.$length){return 0;}if(((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===d){return e;}if(!((e===0))&&((f=e-1>>0,((f<0||f>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+f]))===92)){e=e+(1)>>0;continue;}if(((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===96){g=0;e=e+(1)>>0;while(true){if(!(e=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===96)))){break;}if((g===0)&&(((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===d)){g=e;}e=e+(1)>>0;}if(e>=c.$length){return g;}e=e+(1)>>0;}else if(((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===91){h=0;e=e+(1)>>0;while(true){if(!(e=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===93)))){break;}if((h===0)&&(((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===d)){h=e;}e=e+(1)>>0;}e=e+(1)>>0;while(true){if(!(e=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===32)||(((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===10)))){break;}e=e+(1)>>0;}if(e>=c.$length){return h;}if(!((((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===91))&&!((((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===40))){if(h>0){return h;}else{continue;}}i=((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e]);e=e+(1)>>0;while(true){if(!(e=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===i)))){break;}if((h===0)&&(((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===d)){return e;}e=e+(1)>>0;}if(e>=c.$length){return h;}e=e+(1)>>0;}}return 0;};AS=function(c,d,e,f){var c,d,e,f,g,h,i,j,k,l,m;g=0;if(e.$length>1&&(((0<0||0>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+0])===f)&&(((1<0||1>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+1])===f)){g=1;}while(true){if(!(g>0;if(g>=e.$length){return 0;}if((g+1>>0)>0,((i<0||i>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+i]))===f)){g=g+(1)>>0;continue;}if((((g<0||g>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+g])===f)&&!BN((j=g-1>>0,((j<0||j>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+j])))){if(!(((c.flags&1)===0))){if(!(((g+1>>0)===e.$length)||BN((k=g+1>>0,((k<0||k>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+k])))||BM((l=g+1>>0,((l<0||l>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+l]))))){continue;}}m=$clone(new A.Buffer.ptr(),A.Buffer);c.inline(m,$subslice(e,0,g));c.r.Emphasis(d,m.Bytes());return g+1>>0;}}return 0;};AT=function(c,d,e,f){var c,d,e,f,g,h,i,j,k;g=0;while(true){if(!(g>0;if((g+1>>0)=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+g])===f)&&((i=g+1>>0,((i<0||i>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+i]))===f)&&g>0&&!BN((j=g-1>>0,((j<0||j>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+j])))){k=$clone(new A.Buffer.ptr(),A.Buffer);c.inline(k,$subslice(e,0,g));if(k.Len()>0){if(f===126){c.r.StrikeThrough(d,k.Bytes());}else{c.r.DoubleEmphasis(d,k.Bytes());}}return g+2>>0;}g=g+(1)>>0;}return 0;};AU=function(c,d,e,f,g){var c,d,e,f,g,h,i,j,k,l,m,n,o;h=0;i=e;e=$subslice(e,f);while(true){if(!(h>0;if(!((((h<0||h>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+h])===g))||BN((k=h-1>>0,((k<0||k>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+k])))){continue;}if((h+2>>0)>0,((l<0||l>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+l]))===g)&&((m=h+2>>0,((m<0||m>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m]))===g)){o=$clone(new A.Buffer.ptr(),A.Buffer);c.inline(o,$subslice(e,0,h));if(o.Len()>0){c.r.TripleEmphasis(d,o.Bytes());}return h+3>>0;}else if((h+1>>0)>0,((n<0||n>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+n]))===g)){j=AS(c,d,$subslice(i,(f-2>>0)),g);if(j===0){return 0;}else{return j-2>>0;}}else{j=AT(c,d,$subslice(i,(f-1>>0)),g);if(j===0){return 0;}else{return j-1>>0;}}}return 0;};BF=$pkg.Markdown=function(c,d,e){var c,d,e,f,g,h;if($interfaceIsEqual(d,$ifaceNil)){return CR.nil;}f=new BC.ptr();f.r=d;f.flags=e;f.refs=new $Map();f.maxNesting=16;f.insideLink=false;f.inlineCallback[42]=AA;f.inlineCallback[95]=AA;if(!(((e&16)===0))){f.inlineCallback[126]=AA;}f.inlineCallback[96]=AB;f.inlineCallback[10]=AC;f.inlineCallback[91]=AE;f.inlineCallback[60]=AF;f.inlineCallback[92]=AH;f.inlineCallback[38]=AJ;if(!(((e&8)===0))){f.inlineCallback[58]=AL;}if(!(((e&512)===0))){f.notes=$makeSlice(DC,0);}g=BG(f,c);h=BH(f,g);return h;};BG=function(c,d){var c,d,e,f,g,h,i,j,k,l,m;e=$clone(new A.Buffer.ptr(),A.Buffer);f=4;if(!(((c.flags&256)===0))){f=8;}g=0;h=0;i=g;j=h;k=false;l=0;while(true){if(!(i0){i=i+(j)>>0;}else{j=i;while(true){if(!(j=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+j])===10))&&!((((j<0||j>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+j])===13)))){break;}j=j+(1)>>0;}if(!(((c.flags&4)===0))){if(i>=l){m=c.fencedCode(e,$subslice(d,i),false);if(m>0){if(!k){e.WriteByte(10);}l=i+m>>0;}}k=j===i;}if(j>i){if(j=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+j])===13)){j=j+(1)>>0;}if(j=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+j])===10)){j=j+(1)>>0;}i=j;}}if(e.Len()===0){e.WriteByte(10);}return e.Bytes();};BH=function(c,d){var c,d,e;e=$clone(new A.Buffer.ptr(),A.Buffer);c.r.DocumentHeader(e);c.block(e,d);if(!(((c.flags&512)===0))&&c.notes.$length>0){c.r.Footnotes(e,(function(){var f,g,h,i,j;f=4;g=c.notes;h=0;while(true){if(!(h=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]);j=$clone(new A.Buffer.ptr(),A.Buffer);if(i.hasBlock){f=f|(2);c.block(j,i.title);}else{c.inline(j,i.title);}c.r.FootnoteItem(e,i.link,j.Bytes(),f);f=f&~(6);h++;}return true;}));}c.r.DocumentFooter(e);if(!((c.nesting===0))){$panic(new $String("Nesting level did not end at zero"));}return e.Bytes();};BJ=function(c,d,e){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;if(d.$length<4){return 0;}f=0;while(true){if(!(f<3&&(((f<0||f>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+f])===32))){break;}f=f+(1)>>0;}g=0;if(!((((f<0||f>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+f])===91))){return 0;}f=f+(1)>>0;if(!(((c.flags&512)===0))){if(((f<0||f>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+f])===94){g=1;f=f+(1)>>0;}}h=f;while(true){if(!(f=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+f])===10))&&!((((f<0||f>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+f])===13))&&!((((f<0||f>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+f])===93)))){break;}f=f+(1)>>0;}if(f>=d.$length||!((((f<0||f>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+f])===93))){return 0;}i=f;f=f+(1)>>0;if(f>=d.$length||!((((f<0||f>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+f])===58))){return 0;}f=f+(1)>>0;while(true){if(!(f=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+f])===32)||(((f<0||f>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+f])===9)))){break;}f=f+(1)>>0;}if(f=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+f])===10)||(((f<0||f>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+f])===13))){f=f+(1)>>0;if(f=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+f])===10)&&((j=f-1>>0,((j<0||j>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+j]))===13)){f=f+(1)>>0;}}while(true){if(!(f=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+f])===32)||(((f<0||f>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+f])===9)))){break;}f=f+(1)>>0;}if(f>=d.$length){return 0;}k=0;l=0;m=k;n=l;o=0;p=0;q=o;r=p;s=0;t=CR.nil;u=false;if(!(((c.flags&512)===0))&&!((g===0))){v=BL(c,d,f,e);m=v[0];n=v[1];t=v[2];u=v[3];s=n;}else{w=BK(c,d,f);m=w[0];n=w[1];q=w[2];r=w[3];s=w[4];}if(s===0){return 0;}x=new BI.ptr(CR.nil,CR.nil,g,u);if(g>0){x.link=$subslice(d,h,i);x.title=t;}else{x.link=$subslice(d,m,n);x.title=$subslice(d,q,r);}y=$bytesToString(A.ToLower($subslice(d,h,i)));z=y;(c.refs||$throwRuntimeError("assignment to entry in nil map"))[z]={k:z,v:x};return s;};BK=function(c,d,e){var c,d,e,f=0,g=0,h=0,i=0,j=0,k,l,m;if(((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===60){e=e+(1)>>0;}f=e;while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===32))&&!((((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===9))&&!((((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===10))&&!((((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===13)))){break;}e=e+(1)>>0;}g=e;if((((f<0||f>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+f])===60)&&((k=g-1>>0,((k<0||k>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+k]))===62)){f=f+(1)>>0;g=g-(1)>>0;}while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===32)||(((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===9)))){break;}e=e+(1)>>0;}if(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===10))&&!((((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===13))&&!((((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===39))&&!((((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===34))&&!((((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===40))){return[f,g,h,i,j];}if(e>=d.$length||(((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===13)||(((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===10)){j=e;}if((e+1>>0)=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===13)&&((l=e+1>>0,((l<0||l>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+l]))===10)){j=j+(1)>>0;}if(j>0){e=j+1>>0;while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===32)||(((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===9)))){break;}e=e+(1)>>0;}}if((e+1>>0)=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===39)||(((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===34)||(((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===40))){e=e+(1)>>0;h=e;while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===10))&&!((((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===13)))){break;}e=e+(1)>>0;}if((e+1>>0)=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===10)&&((m=e+1>>0,((m<0||m>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+m]))===13)){i=e+1>>0;}else{i=e;}e=e-(1)>>0;while(true){if(!(e>h&&((((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===32)||(((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===9)))){break;}e=e-(1)>>0;}if(e>h&&((((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===39)||(((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===34)||(((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===41))){j=i;i=e;}}return[f,g,h,i,j];};BL=function(c,d,e,f){var c,d,e,f,g=0,h=0,i=CR.nil,j=false,k,l,m,n,o,p;if((e===0)||(d.$length===0)){return[g,h,i,j];}while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])===32))){break;}e=e+(1)>>0;}g=e;h=e;while(true){if(!(e>0,((k<0||k>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+k]))===10)))){break;}e=e+(1)>>0;}l=$clone(new A.Buffer.ptr(),A.Buffer);l.Write($subslice(d,h,e));h=e;m=false;gatherLines:while(true){if(!(h>0;while(true){if(!(e>0,((n<0||n>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+n]))===10)))){break;}e=e+(1)>>0;}if(c.isEmpty($subslice(d,h,e))>0){m=true;h=e;continue;}o=0;o=BR($subslice(d,h,e),f);if(o===0){break gatherLines;}if(m){l.WriteByte(10);m=false;}l.Write($subslice(d,(h+o>>0),e));j=true;h=e;}if(!(((p=h-1>>0,((p<0||p>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+p]))===10))){l.WriteByte(10);}i=l.Bytes();return[g,h,i,j];};BM=function(c){var c,d,e,f;d=new CR($stringToBytes("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"));e=0;while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]);if(c===f){return true;}e++;}return false;};BN=function(c){var c;return(c===32)||(c===9)||(c===10)||(c===13)||(c===12)||(c===11);};BO=function(c){var c;return(c>=97&&c<=122)||(c>=65&&c<=90);};BP=function(c){var c;return(c>=48&&c<=57)||BO(c);};BQ=function(c,d,e){var c,d,e,f,g,h,i,j,k,l,m,n,o;f=0;g=0;h=f;i=g;j=false;h=0;while(true){if(!(h=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+h])===9){if(i===h){i=i+(1)>>0;}else{j=true;break;}}h=h+(1)>>0;}if(!j){h=0;while(true){if(!(h<(i*e>>0))){break;}c.WriteByte(32);h=h+(1)>>0;}c.Write($subslice(d,i));return;}k=0;h=0;while(true){if(!(h=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+h])===9)))){break;}m=G.DecodeRune($subslice(d,h));n=m[1];h=h+(n)>>0;k=k+(1)>>0;}if(h>l){c.Write($subslice(d,l,h));}if(h>=d.$length){break;}while(true){if(!(true)){break;}c.WriteByte(32);k=k+(1)>>0;if((o=k%e,o===o?o:$throwRuntimeError("integer divide by zero"))===0){break;}}h=h+(1)>>0;}};BR=function(c,d){var c,d,e;if(c.$length===0){return 0;}if(((0<0||0>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+0])===9){return 1;}if(c.$length=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e])===32))){return 0;}e=e+(1)>>0;}return d;};BS=function(c){var c,d,e,f,g,h,i,j,k,l,m,n,o;if(c.$length===0){return c;}d=$makeSlice(CR,0,c.$length);e=false;f=c;g=0;while(true){if(!(g=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]);if(BP(h)){e=false;d=$append(d,h);}else if(e){g++;continue;}else{d=$append(d,45);e=true;}g++;}i=0;j=0;k=i;l=j;m=0;n=d;o=0;while(true){if(!(o=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+o]);if(!((m===45))){break;}o++;}l=d.$length-1>>0;while(true){if(!(l>0)){break;}if(!((((l<0||l>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+l])===45))){break;}l=l-(1)>>0;}return $subslice(d,k,(l+1>>0));};DI.methods=[{prop:"block",name:"block",pkg:"github.com/russross/blackfriday",typ:$funcType([CX,CR],[],false)},{prop:"isPrefixHeader",name:"isPrefixHeader",pkg:"github.com/russross/blackfriday",typ:$funcType([CR],[$Bool],false)},{prop:"prefixHeader",name:"prefixHeader",pkg:"github.com/russross/blackfriday",typ:$funcType([CX,CR],[$Int],false)},{prop:"isUnderlinedHeader",name:"isUnderlinedHeader",pkg:"github.com/russross/blackfriday",typ:$funcType([CR],[$Int],false)},{prop:"titleBlock",name:"titleBlock",pkg:"github.com/russross/blackfriday",typ:$funcType([CX,CR,$Bool],[$Int],false)},{prop:"html",name:"html",pkg:"github.com/russross/blackfriday",typ:$funcType([CX,CR,$Bool],[$Int],false)},{prop:"htmlComment",name:"htmlComment",pkg:"github.com/russross/blackfriday",typ:$funcType([CX,CR,$Bool],[$Int],false)},{prop:"htmlHr",name:"htmlHr",pkg:"github.com/russross/blackfriday",typ:$funcType([CX,CR,$Bool],[$Int],false)},{prop:"htmlFindTag",name:"htmlFindTag",pkg:"github.com/russross/blackfriday",typ:$funcType([CR],[$String,$Bool],false)},{prop:"htmlFindEnd",name:"htmlFindEnd",pkg:"github.com/russross/blackfriday",typ:$funcType([$String,CR],[$Int],false)},{prop:"isEmpty",name:"isEmpty",pkg:"github.com/russross/blackfriday",typ:$funcType([CR],[$Int],false)},{prop:"isHRule",name:"isHRule",pkg:"github.com/russross/blackfriday",typ:$funcType([CR],[$Bool],false)},{prop:"isFencedCode",name:"isFencedCode",pkg:"github.com/russross/blackfriday",typ:$funcType([CR,CU,$String],[$Int,$String],false)},{prop:"fencedCode",name:"fencedCode",pkg:"github.com/russross/blackfriday",typ:$funcType([CX,CR,$Bool],[$Int],false)},{prop:"table",name:"table",pkg:"github.com/russross/blackfriday",typ:$funcType([CX,CR],[$Int],false)},{prop:"tableHeader",name:"tableHeader",pkg:"github.com/russross/blackfriday",typ:$funcType([CX,CR],[$Int,CV],false)},{prop:"tableRow",name:"tableRow",pkg:"github.com/russross/blackfriday",typ:$funcType([CX,CR,CV,$Bool],[],false)},{prop:"quotePrefix",name:"quotePrefix",pkg:"github.com/russross/blackfriday",typ:$funcType([CR],[$Int],false)},{prop:"quote",name:"quote",pkg:"github.com/russross/blackfriday",typ:$funcType([CX,CR],[$Int],false)},{prop:"codePrefix",name:"codePrefix",pkg:"github.com/russross/blackfriday",typ:$funcType([CR],[$Int],false)},{prop:"code",name:"code",pkg:"github.com/russross/blackfriday",typ:$funcType([CX,CR],[$Int],false)},{prop:"uliPrefix",name:"uliPrefix",pkg:"github.com/russross/blackfriday",typ:$funcType([CR],[$Int],false)},{prop:"oliPrefix",name:"oliPrefix",pkg:"github.com/russross/blackfriday",typ:$funcType([CR],[$Int],false)},{prop:"list",name:"list",pkg:"github.com/russross/blackfriday",typ:$funcType([CX,CR,$Int],[$Int],false)},{prop:"listItem",name:"listItem",pkg:"github.com/russross/blackfriday",typ:$funcType([CX,CR,CW],[$Int],false)},{prop:"renderParagraph",name:"renderParagraph",pkg:"github.com/russross/blackfriday",typ:$funcType([CX,CR],[],false)},{prop:"paragraph",name:"paragraph",pkg:"github.com/russross/blackfriday",typ:$funcType([CX,CR],[$Int],false)},{prop:"inline",name:"inline",pkg:"github.com/russross/blackfriday",typ:$funcType([CX,CR],[],false)}];BA.init([{prop:"AutoLink",name:"AutoLink",pkg:"",typ:$funcType([CX,CR,$Int],[],false)},{prop:"BlockCode",name:"BlockCode",pkg:"",typ:$funcType([CX,CR,$String],[],false)},{prop:"BlockHtml",name:"BlockHtml",pkg:"",typ:$funcType([CX,CR],[],false)},{prop:"BlockQuote",name:"BlockQuote",pkg:"",typ:$funcType([CX,CR],[],false)},{prop:"CodeSpan",name:"CodeSpan",pkg:"",typ:$funcType([CX,CR],[],false)},{prop:"DocumentFooter",name:"DocumentFooter",pkg:"",typ:$funcType([CX],[],false)},{prop:"DocumentHeader",name:"DocumentHeader",pkg:"",typ:$funcType([CX],[],false)},{prop:"DoubleEmphasis",name:"DoubleEmphasis",pkg:"",typ:$funcType([CX,CR],[],false)},{prop:"Emphasis",name:"Emphasis",pkg:"",typ:$funcType([CX,CR],[],false)},{prop:"Entity",name:"Entity",pkg:"",typ:$funcType([CX,CR],[],false)},{prop:"FootnoteItem",name:"FootnoteItem",pkg:"",typ:$funcType([CX,CR,CR,$Int],[],false)},{prop:"FootnoteRef",name:"FootnoteRef",pkg:"",typ:$funcType([CX,CR,$Int],[],false)},{prop:"Footnotes",name:"Footnotes",pkg:"",typ:$funcType([CX,DE],[],false)},{prop:"GetFlags",name:"GetFlags",pkg:"",typ:$funcType([],[$Int],false)},{prop:"HRule",name:"HRule",pkg:"",typ:$funcType([CX],[],false)},{prop:"Header",name:"Header",pkg:"",typ:$funcType([CX,DE,$Int,$String],[],false)},{prop:"Image",name:"Image",pkg:"",typ:$funcType([CX,CR,CR,CR],[],false)},{prop:"LineBreak",name:"LineBreak",pkg:"",typ:$funcType([CX],[],false)},{prop:"Link",name:"Link",pkg:"",typ:$funcType([CX,CR,CR,CR],[],false)},{prop:"List",name:"List",pkg:"",typ:$funcType([CX,DE,$Int],[],false)},{prop:"ListItem",name:"ListItem",pkg:"",typ:$funcType([CX,CR,$Int],[],false)},{prop:"NormalText",name:"NormalText",pkg:"",typ:$funcType([CX,CR],[],false)},{prop:"Paragraph",name:"Paragraph",pkg:"",typ:$funcType([CX,DE],[],false)},{prop:"RawHtmlTag",name:"RawHtmlTag",pkg:"",typ:$funcType([CX,CR],[],false)},{prop:"StrikeThrough",name:"StrikeThrough",pkg:"",typ:$funcType([CX,CR],[],false)},{prop:"Table",name:"Table",pkg:"",typ:$funcType([CX,CR,CR,CV],[],false)},{prop:"TableCell",name:"TableCell",pkg:"",typ:$funcType([CX,CR,$Int],[],false)},{prop:"TableHeaderCell",name:"TableHeaderCell",pkg:"",typ:$funcType([CX,CR,$Int],[],false)},{prop:"TableRow",name:"TableRow",pkg:"",typ:$funcType([CX,CR],[],false)},{prop:"TitleBlock",name:"TitleBlock",pkg:"",typ:$funcType([CX,CR],[],false)},{prop:"TripleEmphasis",name:"TripleEmphasis",pkg:"",typ:$funcType([CX,CR],[],false)}]);BB.init([DI,CX,CR,$Int],[$Int],false);BC.init([{prop:"r",name:"r",pkg:"github.com/russross/blackfriday",typ:BA,tag:""},{prop:"refs",name:"refs",pkg:"github.com/russross/blackfriday",typ:DK,tag:""},{prop:"inlineCallback",name:"inlineCallback",pkg:"github.com/russross/blackfriday",typ:DJ,tag:""},{prop:"flags",name:"flags",pkg:"github.com/russross/blackfriday",typ:$Int,tag:""},{prop:"nesting",name:"nesting",pkg:"github.com/russross/blackfriday",typ:$Int,tag:""},{prop:"maxNesting",name:"maxNesting",pkg:"github.com/russross/blackfriday",typ:$Int,tag:""},{prop:"insideLink",name:"insideLink",pkg:"github.com/russross/blackfriday",typ:$Bool,tag:""},{prop:"notes",name:"notes",pkg:"github.com/russross/blackfriday",typ:DC,tag:""}]);BI.init([{prop:"link",name:"link",pkg:"github.com/russross/blackfriday",typ:CR,tag:""},{prop:"title",name:"title",pkg:"github.com/russross/blackfriday",typ:CR,tag:""},{prop:"noteId",name:"noteId",pkg:"github.com/russross/blackfriday",typ:$Int,tag:""},{prop:"hasBlock",name:"hasBlock",pkg:"github.com/russross/blackfriday",typ:$Bool,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_blackfriday=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}$r=F.$init($BLOCKING);$s=6;case 6:if($r&&$r.$blocking){$r=$r();}$r=G.$init($BLOCKING);$s=7;case 7:if($r&&$r.$blocking){$r=$r();}J=D.MustCompile("&[a-z]{2,5};");Y="((https?|ftp):\\/\\/|\\/)[-A-Za-z0-9+&@#\\/%?=~_|!:,.;\\(\\)]+";Z=D.MustCompile("^(]+\")?\\s?>"+Y+"<\\/a>)");AG=new CR($stringToBytes("\\`*_{}[]()#+-.!:|&<>~"));AN=new CS([new CR($stringToBytes("http://")),new CR($stringToBytes("https://")),new CR($stringToBytes("ftp://")),new CR($stringToBytes("mailto://")),new CR($stringToBytes("/"))]);AZ=(a=new $Map(),b="p",a[b]={k:b,v:true},b="dl",a[b]={k:b,v:true},b="h1",a[b]={k:b,v:true},b="h2",a[b]={k:b,v:true},b="h3",a[b]={k:b,v:true},b="h4",a[b]={k:b,v:true},b="h5",a[b]={k:b,v:true},b="h6",a[b]={k:b,v:true},b="ol",a[b]={k:b,v:true},b="ul",a[b]={k:b,v:true},b="del",a[b]={k:b,v:true},b="div",a[b]={k:b,v:true},b="ins",a[b]={k:b,v:true},b="pre",a[b]={k:b,v:true},b="form",a[b]={k:b,v:true},b="math",a[b]={k:b,v:true},b="table",a[b]={k:b,v:true},b="iframe",a[b]={k:b,v:true},b="script",a[b]={k:b,v:true},b="fieldset",a[b]={k:b,v:true},b="noscript",a[b]={k:b,v:true},b="blockquote",a[b]={k:b,v:true},b="video",a[b]={k:b,v:true},b="aside",a[b]={k:b,v:true},b="canvas",a[b]={k:b,v:true},b="figure",a[b]={k:b,v:true},b="footer",a[b]={k:b,v:true},b="header",a[b]={k:b,v:true},b="hgroup",a[b]={k:b,v:true},b="output",a[b]={k:b,v:true},b="article",a[b]={k:b,v:true},b="section",a[b]={k:b,v:true},b="progress",a[b]={k:b,v:true},b="figcaption",a[b]={k:b,v:true},a);}return;}};$init_blackfriday.$blocking=true;return $init_blackfriday;};return $pkg;})(); +$packages["github.com/bradfitz/iter"]=(function(){var $pkg={},B,C,A;B=$structType([]);C=$sliceType(B);A=$pkg.N=function(a){var a;return $makeSlice(C,a);};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_iter=function(){while(true){switch($s){case 0:}return;}};$init_iter.$blocking=true;return $init_iter;};return $pkg;})(); +$packages["github.com/shurcooL/go/indentwriter"]=(function(){var $pkg={},B,A,C,E,F,D;B=$packages["github.com/bradfitz/iter"];A=$packages["io"];C=$pkg.indentWriter=$newType(0,$kindStruct,"indentwriter.indentWriter","indentWriter","github.com/shurcooL/go/indentwriter",function(w_,indent_,wroteIndent_){this.$val=this;this.w=w_!==undefined?w_:$ifaceNil;this.indent=indent_!==undefined?indent_:0;this.wroteIndent=wroteIndent_!==undefined?wroteIndent_:false;});E=$sliceType($Uint8);F=$ptrType(C);D=$pkg.New=function(a,b){var a,b;return new C.ptr(a,b,false);};C.ptr.prototype.Write=function(a){var a,b=0,c=$ifaceNil,d,e,f,g,h,i;d=this;e=a;f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);c=d.WriteByte(g);if(!($interfaceIsEqual(c,$ifaceNil))){return[b,c];}b=b+(1)>>0;f++;}if(!((b===a.$length))){c=A.ErrShortWrite;return[b,c];}h=a.$length;i=$ifaceNil;b=h;c=i;return[b,c];};C.prototype.Write=function(a){return this.$val.Write(a);};C.ptr.prototype.WriteString=function(a){var a,b=0,c=$ifaceNil,d,e;d=this;e=d.Write(new E($stringToBytes(a)));b=e[0];c=e[1];return[b,c];};C.prototype.WriteString=function(a){return this.$val.WriteString(a);};C.ptr.prototype.WriteByte=function(a){var a,b,c,d,e,f;b=this;if(a===10){b.wroteIndent=false;}else{if(!b.wroteIndent){b.wroteIndent=true;c=B.N(b.indent);d=0;while(true){if(!(d0;};G.prototype.IsValid=function(){return this.$val.IsValid();};G.ptr.prototype.String=function(){var a,b;a=$clone(this,G);b=a.Filename;if(a.IsValid()){if(!(b==="")){b=b+(":");}b=b+(B.Sprintf("%d:%d",new W([new $Int(a.Line),new $Int(a.Column)])));}if(b===""){b="-";}return b;};G.prototype.String=function(){return this.$val.String();};H.prototype.IsValid=function(){var a;a=this.$val;return!((a===0));};$ptrType(H).prototype.IsValid=function(){return new H(this.$get()).IsValid();};I.ptr.prototype.Name=function(){var a;a=this;return a.name;};I.prototype.Name=function(){return this.$val.Name();};I.ptr.prototype.Base=function(){var a;a=this;return a.base;};I.prototype.Base=function(){return this.$val.Base();};I.ptr.prototype.Size=function(){var a;a=this;return a.size;};I.prototype.Size=function(){return this.$val.Size();};I.ptr.prototype.LineCount=function(){var a,b;a=this;a.set.mutex.RLock();b=a.lines.$length;a.set.mutex.RUnlock();return b;};I.prototype.LineCount=function(){return this.$val.LineCount();};I.ptr.prototype.AddLine=function(a){var a,b,c,d,e;b=this;b.set.mutex.Lock();c=b.lines.$length;if(((c===0)||(d=b.lines,e=c-1>>0,((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]))=b.lines.$length){$panic(new $String("illegal line number"));}$copySlice($subslice(b.lines,a),$subslice(b.lines,(a+1>>0)));b.lines=$subslice(b.lines,0,(b.lines.$length-1>>0));}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};I.prototype.MergeLine=function(a){return this.$val.MergeLine(a);};I.ptr.prototype.SetLines=function(a){var a,b,c,d,e,f,g,h;b=this;c=b.size;d=a;e=0;while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]);if(f>0&&g<=(h=f-1>>0,((h<0||h>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+h]))||c<=g){return false;}e++;}b.set.mutex.Lock();b.lines=a;b.set.mutex.Unlock();return true;};I.prototype.SetLines=function(a){return this.$val.SetLines(a);};I.ptr.prototype.SetLinesForContent=function(a){var a,b,c,d,e,f,g,h;b=this;c=X.nil;d=0;e=a;f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);if(d>=0){c=$append(c,d);}d=-1;if(h===10){d=g+1>>0;}f++;}b.set.mutex.Lock();b.lines=c;b.set.mutex.Unlock();};I.prototype.SetLinesForContent=function(a){return this.$val.SetLinesForContent(a);};I.ptr.prototype.AddLineInfo=function(a,b,c){var a,b,c,d,e,f,g;d=this;d.set.mutex.Lock();e=d.infos.$length;if((e===0)||(f=d.infos,g=e-1>>0,((g<0||g>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g])).Offsetb.size){$panic(new $String("illegal file offset"));}return((b.base+a>>0)>>0);};I.prototype.Pos=function(a){return this.$val.Pos(a);};I.ptr.prototype.Offset=function(a){var a,b;b=this;if((a>>0)>0)>(b.base+b.size>>0)){$panic(new $String("illegal Pos value"));}return(a>>0)-b.base>>0;};I.prototype.Offset=function(a){return this.$val.Offset(a);};I.ptr.prototype.Line=function(a){var a,b;b=this;return b.Position(a).Line;};I.prototype.Line=function(a){return this.$val.Line(a);};K=function(a,b){var a,b;return C.Search(a.$length,(function(c){var c;return((c<0||c>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+c]).Offset>b;}))-1>>0;};I.ptr.prototype.unpack=function(a,b){var a,b,c="",d=0,e=0,f,g,h,i,j,k,l,m,n;f=this;c=f.name;g=O(f.lines,a);if(g>=0){h=g+1>>0;i=(a-(j=f.lines,((g<0||g>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+g]))>>0)+1>>0;d=h;e=i;}if(b&&f.infos.$length>0){k=K(f.infos,a);if(k>=0){m=(l=f.infos,((k<0||k>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+k]));c=m.Filename;n=O(f.lines,m.Offset);if(n>=0){d=d+(((m.Line-n>>0)-1>>0))>>0;}}}return[c,d,e];};I.prototype.unpack=function(a,b){return this.$val.unpack(a,b);};I.ptr.prototype.position=function(a,b){var a,b,c=new G.ptr(),d,e,f;d=this;e=(a>>0)-d.base>>0;c.Offset=e;f=d.unpack(e,b);c.Filename=f[0];c.Line=f[1];c.Column=f[2];return c;};I.prototype.position=function(a,b){return this.$val.position(a,b);};I.ptr.prototype.PositionFor=function(a,b){var a,b,c=new G.ptr(),d;d=this;if(!((a===0))){if((a>>0)>0)>(d.base+d.size>>0)){$panic(new $String("illegal Pos value"));}$copy(c,d.position(a,b),G);}return c;};I.prototype.PositionFor=function(a,b){return this.$val.PositionFor(a,b);};I.ptr.prototype.Position=function(a){var a,b=new G.ptr(),c;c=this;$copy(b,c.PositionFor(a,true),G);return b;};I.prototype.Position=function(a){return this.$val.Position(a);};M=$pkg.NewFileSet=function(){return new L.ptr(new D.RWMutex.ptr(),1,Z.nil,Y.nil);};L.ptr.prototype.Base=function(){var a,b;a=this;a.mutex.RLock();b=a.base;a.mutex.RUnlock();return b;};L.prototype.Base=function(){return this.$val.Base();};L.ptr.prototype.AddFile=function(a,b,c){var $deferred=[],$err=null,a,b,c,d,e;try{$deferFrames.push($deferred);d=this;d.mutex.Lock();$deferred.push([$methodVal(d.mutex,"Unlock"),[]]);if(b<0){b=d.base;}if(b>0))>>0;if(b<0){$panic(new $String("token.Pos offset overflow (> 2G of source code in file set)"));}d.base=b;d.files=$append(d.files,e);d.last=e;return e;}catch(err){$err=err;return Y.nil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};L.prototype.AddFile=function(a,b,c){return this.$val.AddFile(a,b,c);};L.ptr.prototype.Iterate=function(a){var a,b,c,d,e;b=this;c=0;while(true){if(!(true)){break;}d=Y.nil;b.mutex.RLock();if(c=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+c]));}b.mutex.RUnlock();if(d===Y.nil||!a(d)){break;}c=c+(1)>>0;}};L.prototype.Iterate=function(a){return this.$val.Iterate(a);};N=function(a,b){var a,b;return C.Search(a.$length,(function(c){var c;return((c<0||c>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+c]).base>b;}))-1>>0;};L.ptr.prototype.file=function(a){var a,b,c,d,e,f;b=this;b.mutex.RLock();c=b.last;if(!(c===Y.nil)&&c.base<=(a>>0)&&(a>>0)<=(c.base+c.size>>0)){b.mutex.RUnlock();return c;}d=N(b.files,(a>>0));if(d>=0){f=(e=b.files,((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]));if((a>>0)<=(f.base+f.size>>0)){b.mutex.RUnlock();b.mutex.Lock();b.last=f;b.mutex.Unlock();return f;}}b.mutex.RUnlock();return Y.nil;};L.prototype.file=function(a){return this.$val.file(a);};L.ptr.prototype.File=function(a){var a,b=Y.nil,c;c=this;if(!((a===0))){b=c.file(a);}return b;};L.prototype.File=function(a){return this.$val.File(a);};L.ptr.prototype.PositionFor=function(a,b){var a,b,c=new G.ptr(),d,e;d=this;if(!((a===0))){e=d.file(a);if(!(e===Y.nil)){$copy(c,e.position(a,b),G);}}return c;};L.prototype.PositionFor=function(a,b){return this.$val.PositionFor(a,b);};L.ptr.prototype.Position=function(a){var a,b=new G.ptr(),c;c=this;$copy(b,c.PositionFor(a,true),G);return b;};L.prototype.Position=function(a){return this.$val.Position(a);};O=function(a,b){var a,b,c,d,e,f,g,h;c=0;d=a.$length;e=c;f=d;while(true){if(!(e>0))/2,(g===g&&g!==1/0&&g!==-1/0)?g>>0:$throwRuntimeError("integer divide by zero"))>>0;if(((h<0||h>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+h])<=b){e=h+1>>0;}else{f=h;}}return e-1>>0;};L.ptr.prototype.Read=function(a){var a,b,c,d,e,f,g,h;b=this;c=$clone(new Q.ptr(),Q);d=a(c);if(!($interfaceIsEqual(d,$ifaceNil))){return d;}b.mutex.Lock();b.base=c.Base;e=$makeSlice(Z,c.Files.$length);f=0;while(true){if(!(f=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+f]));(f<0||f>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]=new I.ptr(b,h.Name,h.Base,h.Size,h.Lines,h.Infos);f=f+(1)>>0;}b.files=e;b.last=Y.nil;b.mutex.Unlock();return $ifaceNil;};L.prototype.Read=function(a){return this.$val.Read(a);};L.ptr.prototype.Write=function(a){var a,b,c,d,e,f,g,h;b=this;c=$clone(new Q.ptr(),Q);b.mutex.Lock();c.Base=b.base;d=$makeSlice(AB,b.files.$length);e=b.files;f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);$copy(((g<0||g>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+g]),new P.ptr(h.name,h.base,h.size,h.lines,h.infos),P);f++;}c.Files=d;b.mutex.Unlock();return a(new c.constructor.elem(c));};L.prototype.Write=function(a){return this.$val.Write(a);};R.prototype.String=function(){var a,b;a=this.$val;b="";if(0<=a&&a<86){b=((a<0||a>=S.length)?$throwRuntimeError("index out of range"):S[a]);}if(b===""){b="token("+E.Itoa((a>>0))+")";}return b;};$ptrType(R).prototype.String=function(){return new R(this.$get()).String();};R.prototype.Precedence=function(){var a,b;a=this.$val;b=a;if(b===35){return 1;}else if(b===34){return 2;}else if(b===39||b===44||b===40||b===45||b===41||b===46){return 3;}else if(b===12||b===13||b===18||b===19){return 4;}else if(b===14||b===15||b===16||b===20||b===21||b===17||b===22){return 5;}return 0;};$ptrType(R).prototype.Precedence=function(){return new R(this.$get()).Precedence();};U=function(){var a,b;T=new $Map();a=61;while(true){if(!(a<86)){break;}b=((a<0||a>=S.length)?$throwRuntimeError("index out of range"):S[a]);(T||$throwRuntimeError("assignment to entry in nil map"))[b]={k:b,v:a};a=a+(1)>>0;}};V=$pkg.Lookup=function(a){var a,b,c,d,e;b=(c=T[a],c!==undefined?[c.v,true]:[0,false]);d=b[0];e=b[1];if(e){return d;}return 4;};R.prototype.IsLiteral=function(){var a;a=this.$val;return 3>","&^","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=","&^=","&&","||","<-","++","--","==","<",">","=","!","!=","<=",">=",":=","...","(","[","{",",",".",")","]","}",";",":","","","break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"]);U();}return;}};$init_token.$blocking=true;return $init_token;};return $pkg;})(); +$packages["path/filepath"]=(function(){var $pkg={},G,A,B,C,D,E,F,O,AQ,AR,P,R,T,U,AH,AI,AJ;G=$packages["bytes"];A=$packages["errors"];B=$packages["os"];C=$packages["runtime"];D=$packages["sort"];E=$packages["strings"];F=$packages["unicode/utf8"];O=$pkg.lazybuf=$newType(0,$kindStruct,"filepath.lazybuf","lazybuf","path/filepath",function(path_,buf_,w_,volAndPath_,volLen_){this.$val=this;this.path=path_!==undefined?path_:"";this.buf=buf_!==undefined?buf_:AQ.nil;this.w=w_!==undefined?w_:0;this.volAndPath=volAndPath_!==undefined?volAndPath_:"";this.volLen=volLen_!==undefined?volLen_:0;});AQ=$sliceType($Uint8);AR=$ptrType(O);O.ptr.prototype.index=function(a){var a,b,c;b=this;if(!(b.buf===AQ.nil)){return(c=b.buf,((a<0||a>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a]));}return b.path.charCodeAt(a);};O.prototype.index=function(a){return this.$val.index(a);};O.ptr.prototype.append=function(a){var a,b,c,d;b=this;if(b.buf===AQ.nil){if(b.w>0;return;}b.buf=$makeSlice(AQ,b.path.length);$copyString(b.buf,b.path.substring(0,b.w));}(c=b.buf,d=b.w,(d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]=a);b.w=b.w+(1)>>0;};O.prototype.append=function(a){return this.$val.append(a);};O.ptr.prototype.string=function(){var a;a=this;if(a.buf===AQ.nil){return a.volAndPath.substring(0,(a.volLen+a.w>>0));}return a.volAndPath.substring(0,a.volLen)+$bytesToString($subslice(a.buf,0,a.w));};O.prototype.string=function(){return this.$val.string();};P=$pkg.Clean=function(a){var a,b,c,d,e,f,g,h,i,j,k,l;b=a;c=AJ(a);a=a.substring(c);if(a===""){if(c>1&&!((b.charCodeAt(1)===58))){return R(b);}return b+".";}d=B.IsPathSeparator(a.charCodeAt(0));e=a.length;f=new O.ptr(a,AQ.nil,0,b,c);g=0;h=0;i=g;j=h;if(d){f.append(47);k=1;l=1;i=k;j=l;}while(true){if(!(i>0;}else if((a.charCodeAt(i)===46)&&(((i+1>>0)===e)||B.IsPathSeparator(a.charCodeAt((i+1>>0))))){i=i+(1)>>0;}else if((a.charCodeAt(i)===46)&&(a.charCodeAt((i+1>>0))===46)&&(((i+2>>0)===e)||B.IsPathSeparator(a.charCodeAt((i+2>>0))))){i=i+(2)>>0;if(f.w>j){f.w=f.w-(1)>>0;while(true){if(!(f.w>j&&!B.IsPathSeparator(f.index(f.w)))){break;}f.w=f.w-(1)>>0;}}else if(!d){if(f.w>0){f.append(47);}f.append(46);f.append(46);j=f.w;}}else{if(d&&!((f.w===1))||!d&&!((f.w===0))){f.append(47);}while(true){if(!(i>0;}}}if(f.w===0){f.append(46);}return R(f.string());};R=$pkg.FromSlash=function(a){var a;return a;return E.Replace(a,"/","/",-1);};T=$pkg.Split=function(a){var a,b="",c="",d,e,f,g;d=AH(a);e=a.length-1>>0;while(true){if(!(e>=d.length&&!B.IsPathSeparator(a.charCodeAt(e)))){break;}e=e-(1)>>0;}f=a.substring(0,(e+1>>0));g=a.substring((e+1>>0));b=f;c=g;return[b,c];};U=$pkg.Join=function(a){var a,b,c,d,e;b=a;c=0;while(true){if(!(c=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+c]);if(!(e==="")){return P(E.Join($subslice(a,d),"/"));}c++;}return"";};AH=$pkg.VolumeName=function(a){var a,b="";b=a.substring(0,AJ(a));return b;};AI=$pkg.IsAbs=function(a){var a;return E.HasPrefix(a,"/");};AJ=function(a){var a;return 0;};AR.methods=[{prop:"index",name:"index",pkg:"path/filepath",typ:$funcType([$Int],[$Uint8],false)},{prop:"append",name:"append",pkg:"path/filepath",typ:$funcType([$Uint8],[],false)},{prop:"string",name:"string",pkg:"path/filepath",typ:$funcType([],[$String],false)}];O.init([{prop:"path",name:"path",pkg:"path/filepath",typ:$String,tag:""},{prop:"buf",name:"buf",pkg:"path/filepath",typ:AQ,tag:""},{prop:"w",name:"w",pkg:"path/filepath",typ:$Int,tag:""},{prop:"volAndPath",name:"volAndPath",pkg:"path/filepath",typ:$String,tag:""},{prop:"volLen",name:"volLen",pkg:"path/filepath",typ:$Int,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_filepath=function(){while(true){switch($s){case 0:$r=G.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=6;case 6:if($r&&$r.$blocking){$r=$r();}$r=F.$init($BLOCKING);$s=7;case 7:if($r&&$r.$blocking){$r=$r();}$pkg.ErrBadPattern=A.New("syntax error in pattern");$pkg.SkipDir=A.New("skip this directory");}return;}};$init_filepath.$blocking=true;return $init_filepath;};return $pkg;})(); +$packages["go/scanner"]=(function(){var $pkg={},E,A,B,C,F,D,G,H,I,J,K,M,N,O,U,V,W,X,Y,Z,AA,P,Q,R,S,T;E=$packages["bytes"];A=$packages["fmt"];B=$packages["go/token"];C=$packages["io"];F=$packages["path/filepath"];D=$packages["sort"];G=$packages["strconv"];H=$packages["unicode"];I=$packages["unicode/utf8"];J=$pkg.Error=$newType(0,$kindStruct,"scanner.Error","Error","go/scanner",function(Pos_,Msg_){this.$val=this;this.Pos=Pos_!==undefined?Pos_:new B.Position.ptr();this.Msg=Msg_!==undefined?Msg_:"";});K=$pkg.ErrorList=$newType(12,$kindSlice,"scanner.ErrorList","ErrorList","go/scanner",null);M=$pkg.ErrorHandler=$newType(4,$kindFunc,"scanner.ErrorHandler","ErrorHandler","go/scanner",null);N=$pkg.Scanner=$newType(0,$kindStruct,"scanner.Scanner","Scanner","go/scanner",function(file_,dir_,src_,err_,mode_,ch_,offset_,rdOffset_,lineOffset_,insertSemi_,ErrorCount_){this.$val=this;this.file=file_!==undefined?file_:Z.nil;this.dir=dir_!==undefined?dir_:"";this.src=src_!==undefined?src_:U.nil;this.err=err_!==undefined?err_:$throwNilPointerError;this.mode=mode_!==undefined?mode_:0;this.ch=ch_!==undefined?ch_:0;this.offset=offset_!==undefined?offset_:0;this.rdOffset=rdOffset_!==undefined?rdOffset_:0;this.lineOffset=lineOffset_!==undefined?lineOffset_:0;this.insertSemi=insertSemi_!==undefined?insertSemi_:false;this.ErrorCount=ErrorCount_!==undefined?ErrorCount_:0;});O=$pkg.Mode=$newType(4,$kindUint,"scanner.Mode","Mode","go/scanner",null);U=$sliceType($Uint8);V=$sliceType($emptyInterface);W=$sliceType($String);X=$ptrType(K);Y=$ptrType(J);Z=$ptrType(B.File);AA=$ptrType(N);J.ptr.prototype.Error=function(){var a;a=$clone(this,J);if(!(a.Pos.Filename==="")||a.Pos.IsValid()){return a.Pos.String()+": "+a.Msg;}return a.Msg;};J.prototype.Error=function(){return this.$val.Error();};$ptrType(K).prototype.Add=function(a,b){var a,b,c;c=this;a=$clone(a,B.Position);c.$set($append(c.$get(),new J.ptr($clone(a,B.Position),b)));};$ptrType(K).prototype.Reset=function(){var a;a=this;a.$set($subslice((a.$get()),0,0));};K.prototype.Len=function(){var a;a=this;return a.$length;};$ptrType(K).prototype.Len=function(){return this.$get().Len();};K.prototype.Swap=function(a,b){var a,b,c,d,e;c=this;d=((b<0||b>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+b]);e=((a<0||a>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a]);(a<0||a>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a]=d;(b<0||b>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+b]=e;};$ptrType(K).prototype.Swap=function(a,b){return this.$get().Swap(a,b);};K.prototype.Less=function(a,b){var a,b,c,d,e;c=this;d=((a<0||a>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a]).Pos;e=((b<0||b>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+b]).Pos;if(d.Filename=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]);if(!(f.Pos.Filename===b.Filename)||!((f.Pos.Line===b.Line))){$copy(b,f.Pos,B.Position);(g=a.$get(),(c<0||c>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+c]=f);c=c+(1)>>0;}e++;}a.$set($subslice((a.$get()),0,c));};K.prototype.Error=function(){var a,b;a=this;b=a.$length;if(b===0){return"no errors";}else if(b===1){return((0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]).Error();}return A.Sprintf("%s (and %d more errors)",new V([((0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]),new $Int((a.$length-1>>0))]));};$ptrType(K).prototype.Error=function(){return this.$get().Error();};K.prototype.Err=function(){var a;a=this;if(a.$length===0){return $ifaceNil;}return a;};$ptrType(K).prototype.Err=function(){return this.$get().Err();};N.ptr.prototype.next=function(){var a,b,c,d,e,f,g,h;a=this;if(a.rdOffset=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]))>>0);e=1;f=b;g=e;if(f===0){a.error(a.offset,"illegal character NUL");}else if(f>=128){h=I.DecodeRune($subslice(a.src,a.rdOffset));f=h[0];g=h[1];if((f===65533)&&(g===1)){a.error(a.offset,"illegal UTF-8 encoding");}else if((f===65279)&&a.offset>0){a.error(a.offset,"illegal byte order mark");}}a.rdOffset=a.rdOffset+(g)>>0;a.ch=f;}else{a.offset=a.src.$length;if(a.ch===10){a.lineOffset=a.offset;a.file.AddLine(a.offset);}a.ch=-1;}};N.prototype.next=function(){return this.$val.next();};N.ptr.prototype.Init=function(a,b,c,d){var a,b,c,d,e,f;e=this;if(!((a.Size()===b.$length))){$panic(new $String(A.Sprintf("file size (%d) does not match src len (%d)",new V([new $Int(a.Size()),new $Int(b.$length)]))));}e.file=a;f=F.Split(a.Name());e.dir=f[0];e.src=b;e.err=c;e.mode=d;e.ch=32;e.offset=0;e.rdOffset=0;e.lineOffset=0;e.insertSemi=false;e.ErrorCount=0;e.next();if(e.ch===65279){e.next();}};N.prototype.Init=function(a,b,c,d){return this.$val.Init(a,b,c,d);};N.ptr.prototype.error=function(a,b){var a,b,c;c=this;if(!(c.err===$throwNilPointerError)){c.err(c.file.Position(c.file.Pos(a)),b);}c.ErrorCount=c.ErrorCount+(1)>>0;};N.prototype.error=function(a,b){return this.$val.error(a,b);};N.ptr.prototype.interpretLineComment=function(a){var a,b,c,d,e,f,g;b=this;if(E.HasPrefix(a,P)){c=E.LastIndex(a,new U([58]));if(c>0){d=G.Atoi($bytesToString($subslice(a,(c+1>>0))));e=d[0];f=d[1];if($interfaceIsEqual(f,$ifaceNil)&&e>0){g=$bytesToString(E.TrimSpace($subslice(a,P.$length,c)));if(!(g==="")){g=F.Clean(g);if(!F.IsAbs(g)){g=F.Join(new W([b.dir,g]));}}b.file.AddLineInfo((b.lineOffset+a.$length>>0)+1>>0,g,e);}}}};N.prototype.interpretLineComment=function(a){return this.$val.interpretLineComment(a);};N.ptr.prototype.scanComment=function(){var $args=arguments,$s=0,$this=this,a,b,c,d,e;s:while(true){switch($s){case 0:a=$this;b=a.offset-1>>0;c=false;if(a.ch===47){}else{$s=1;continue;}a.next();while(true){if(!(!((a.ch===10))&&a.ch>=0)){break;}if(a.ch===13){c=true;}a.next();}if(b===a.lineOffset){a.interpretLineComment($subslice(a.src,b,a.offset));}$s=2;continue;case 1:a.next();case 3:if(!(a.ch>=0)){$s=4;continue;}d=a.ch;if(d===13){c=true;}a.next();if((d===42)&&(a.ch===47)){}else{$s=5;continue;}a.next();$s=2;continue;case 5:$s=3;continue;case 4:a.error(b,"comment not terminated");case 2:e=$subslice(a.src,b,a.offset);if(c){e=T(e);}return $bytesToString(e);case-1:}return;}};N.prototype.scanComment=function(){return this.$val.scanComment();};N.ptr.prototype.findLineEnd=function(){var $deferred=[],$err=null,a,b;try{$deferFrames.push($deferred);a=this;$deferred.push([(function(b){var b;a.ch=47;a.offset=b;a.rdOffset=b+1>>0;a.next();}),[a.offset-1>>0]]);while(true){if(!((a.ch===47)||(a.ch===42))){break;}if(a.ch===47){return true;}a.next();while(true){if(!(a.ch>=0)){break;}b=a.ch;if(b===10){return true;}a.next();if((b===42)&&(a.ch===47)){a.next();break;}}a.skipWhitespace();if(a.ch<0||(a.ch===10)){return true;}if(!((a.ch===47))){return false;}a.next();}return false;}catch(err){$err=err;return false;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};N.prototype.findLineEnd=function(){return this.$val.findLineEnd();};Q=function(a){var a;return 97<=a&&a<=122||65<=a&&a<=90||(a===95)||a>=128&&H.IsLetter(a);};R=function(a){var a;return 48<=a&&a<=57||a>=128&&H.IsDigit(a);};N.ptr.prototype.scanIdentifier=function(){var a,b;a=this;b=a.offset;while(true){if(!(Q(a.ch)||R(a.ch))){break;}a.next();}return $bytesToString($subslice(a.src,b,a.offset));};N.prototype.scanIdentifier=function(){return this.$val.scanIdentifier();};S=function(a){var a;if(48<=a&&a<=57){return((a-48>>0)>>0);}else if(97<=a&&a<=102){return(((a-97>>0)+10>>0)>>0);}else if(65<=a&&a<=70){return(((a-65>>0)+10>>0)>>0);}return 16;};N.ptr.prototype.scanMantissa=function(a){var a,b;b=this;while(true){if(!(S(b.ch)>0;d=6;b.scanMantissa(10);$s=2;continue;case 1:if(b.ch===48){}else{$s=3;continue;}e=b.offset;b.next();if((b.ch===120)||(b.ch===88)){}else{$s=4;continue;}b.next();b.scanMantissa(16);if((b.offset-e>>0)<=2){b.error(e,"illegal hexadecimal number");}$s=5;continue;case 4:f=false;b.scanMantissa(8);if((b.ch===56)||(b.ch===57)){f=true;b.scanMantissa(10);}if((b.ch===46)||(b.ch===101)||(b.ch===69)||(b.ch===105)){}else{$s=6;continue;}$s=7;continue;case 6:if(f){b.error(e,"illegal octal number");}case 5:$s=8;continue;case 3:b.scanMantissa(10);case 7:if(b.ch===46){d=6;b.next();b.scanMantissa(10);}case 2:if((b.ch===101)||(b.ch===69)){d=6;b.next();if((b.ch===45)||(b.ch===43)){b.next();}b.scanMantissa(10);}if(b.ch===105){d=7;b.next();}case 8:return[d,$bytesToString($subslice(b.src,c,b.offset))];case-1:}return;}};N.prototype.scanNumber=function(a){return this.$val.scanNumber(a);};N.ptr.prototype.scanEscape=function(a){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y;b=this;c=b.offset;d=0;e=0;f=0;g=e;h=f;i=b.ch;if(i===97||i===98||i===102||i===110||i===114||i===116||i===118||i===92||i===a){b.next();return true;}else if(i===48||i===49||i===50||i===51||i===52||i===53||i===54||i===55){j=3;k=8;l=255;d=j;g=k;h=l;}else if(i===120){b.next();m=2;n=16;o=255;d=m;g=n;h=o;}else if(i===117){b.next();p=4;q=16;r=1114111;d=p;g=q;h=r;}else if(i===85){b.next();s=8;t=16;u=1114111;d=s;g=t;h=u;}else{v="unknown escape sequence";if(b.ch<0){v="escape sequence not terminated";}b.error(c,v);return false;}w=0;while(true){if(!(d>0)){break;}x=(S(b.ch)>>>0);if(x>=g){y=A.Sprintf("illegal character %#U in escape sequence",new V([new $Int32(b.ch)]));if(b.ch<0){y="escape sequence not terminated";}b.error(b.offset,y);return false;}w=((((w>>>16<<16)*g>>>0)+(w<<16>>>16)*g)>>>0)+x>>>0;b.next();d=d-(1)>>0;}if(w>h||55296<=w&&w<57344){b.error(c,"escape sequence is invalid Unicode code point");return false;}return true;};N.prototype.scanEscape=function(a){return this.$val.scanEscape(a);};N.ptr.prototype.scanRune=function(){var a,b,c,d,e;a=this;b=a.offset-1>>0;c=true;d=0;while(true){if(!(true)){break;}e=a.ch;if((e===10)||e<0){if(c){a.error(b,"rune literal not terminated");c=false;}break;}a.next();if(e===39){break;}d=d+(1)>>0;if(e===92){if(!a.scanEscape(39)){c=false;}}}if(c&&!((d===1))){a.error(b,"illegal rune literal");}return $bytesToString($subslice(a.src,b,a.offset));};N.prototype.scanRune=function(){return this.$val.scanRune();};N.ptr.prototype.scanString=function(){var a,b,c;a=this;b=a.offset-1>>0;while(true){if(!(true)){break;}c=a.ch;if((c===10)||c<0){a.error(b,"string literal not terminated");break;}a.next();if(c===34){break;}if(c===92){a.scanEscape(34);}}return $bytesToString($subslice(a.src,b,a.offset));};N.prototype.scanString=function(){return this.$val.scanString();};T=function(a){var a,b,c,d,e,f;b=$makeSlice(U,a.$length);c=0;d=a;e=0;while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]);if(!((f===13))){(c<0||c>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+c]=f;c=c+(1)>>0;}e++;}return $subslice(b,0,c);};N.ptr.prototype.scanRawString=function(){var a,b,c,d,e;a=this;b=a.offset-1>>0;c=false;while(true){if(!(true)){break;}d=a.ch;if(d<0){a.error(b,"raw string literal not terminated");break;}a.next();if(d===96){break;}if(d===13){c=true;}}e=$subslice(a.src,b,a.offset);if(c){e=T(e);}return $bytesToString(e);};N.prototype.scanRawString=function(){return this.$val.scanRawString();};N.ptr.prototype.skipWhitespace=function(){var a;a=this;while(true){if(!((a.ch===32)||(a.ch===9)||(a.ch===10)&&!a.insertSemi||(a.ch===13))){break;}a.next();}};N.prototype.skipWhitespace=function(){return this.$val.skipWhitespace();};N.ptr.prototype.switch2=function(a,b){var a,b,c;c=this;if(c.ch===61){c.next();return b;}return a;};N.prototype.switch2=function(a,b){return this.$val.switch2(a,b);};N.ptr.prototype.switch3=function(a,b,c,d){var a,b,c,d,e;e=this;if(e.ch===61){e.next();return b;}if(e.ch===c){e.next();return d;}return a;};N.prototype.switch3=function(a,b,c,d){return this.$val.switch3(a,b,c,d);};N.ptr.prototype.switch4=function(a,b,c,d,e){var a,b,c,d,e,f;f=this;if(f.ch===61){f.next();return b;}if(f.ch===c){f.next();if(f.ch===61){f.next();return e;}return d;}return a;};N.prototype.switch4=function(a,b,c,d,e){return this.$val.switch4(a,b,c,d,e);};N.ptr.prototype.Scan=function(){var $args=arguments,$s=0,$this=this,a=0,b=0,c="",d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;s:while(true){switch($s){case 0:d=$this;case 1:d.skipWhitespace();a=d.file.Pos(d.offset);e=false;f=d.ch;if(Q(f)){}else if(48<=f&&f<=57){$s=2;continue;}else{$s=3;continue;}c=d.scanIdentifier();if(c.length>1){b=B.Lookup(c);g=b;if(g===4||g===61||g===65||g===69||g===80){e=true;}}else{e=true;b=4;}$s=4;continue;case 2:e=true;h=d.scanNumber(false);b=h[0];c=h[1];$s=4;continue;case 3:d.next();i=f;if(i===-1){}else if(i===10){$s=5;continue;}else if(i===34){$s=6;continue;}else if(i===39){$s=7;continue;}else if(i===96){$s=8;continue;}else if(i===58){$s=9;continue;}else if(i===46){$s=10;continue;}else if(i===44){$s=11;continue;}else if(i===59){$s=12;continue;}else if(i===40){$s=13;continue;}else if(i===41){$s=14;continue;}else if(i===91){$s=15;continue;}else if(i===93){$s=16;continue;}else if(i===123){$s=17;continue;}else if(i===125){$s=18;continue;}else if(i===43){$s=19;continue;}else if(i===45){$s=20;continue;}else if(i===42){$s=21;continue;}else if(i===47){$s=22;continue;}else if(i===37){$s=23;continue;}else if(i===94){$s=24;continue;}else if(i===60){$s=25;continue;}else if(i===62){$s=26;continue;}else if(i===61){$s=27;continue;}else if(i===33){$s=28;continue;}else if(i===38){$s=29;continue;}else if(i===124){$s=30;continue;}else{$s=31;continue;}if(d.insertSemi){d.insertSemi=false;j=a;k=57;l="\n";a=j;b=k;c=l;return[a,b,c];}b=1;$s=32;continue;case 5:d.insertSemi=false;m=a;n=57;o="\n";a=m;b=n;c=o;return[a,b,c];$s=32;continue;case 6:e=true;b=9;c=d.scanString();$s=32;continue;case 7:e=true;b=8;c=d.scanRune();$s=32;continue;case 8:e=true;b=9;c=d.scanRawString();$s=32;continue;case 9:b=d.switch2(58,47);$s=32;continue;case 10:if(48<=d.ch&&d.ch<=57){e=true;p=d.scanNumber(true);b=p[0];c=p[1];}else if(d.ch===46){d.next();if(d.ch===46){d.next();b=48;}}else{b=53;}$s=32;continue;case 11:b=52;$s=32;continue;case 12:b=57;c=";";$s=32;continue;case 13:b=49;$s=32;continue;case 14:e=true;b=54;$s=32;continue;case 15:b=50;$s=32;continue;case 16:e=true;b=55;$s=32;continue;case 17:b=51;$s=32;continue;case 18:e=true;b=56;$s=32;continue;case 19:b=d.switch3(12,23,43,37);if(b===37){e=true;}$s=32;continue;case 20:b=d.switch3(13,24,45,38);if(b===38){e=true;}$s=32;continue;case 21:b=d.switch2(14,25);$s=32;continue;case 22:if((d.ch===47)||(d.ch===42)){}else{$s=33;continue;}if(d.insertSemi&&d.findLineEnd()){d.ch=47;d.offset=d.file.Offset(a);d.rdOffset=d.offset+1>>0;d.insertSemi=false;q=a;r=57;s="\n";a=q;b=r;c=s;return[a,b,c];}c=d.scanComment();if(((d.mode&1)>>>0)===0){}else{$s=35;continue;}d.insertSemi=false;$s=1;continue;case 35:b=2;$s=34;continue;case 33:b=d.switch2(15,26);case 34:$s=32;continue;case 23:b=d.switch2(16,27);$s=32;continue;case 24:b=d.switch2(19,30);$s=32;continue;case 25:if(d.ch===45){d.next();b=36;}else{b=d.switch4(40,45,60,20,31);}$s=32;continue;case 26:b=d.switch4(41,46,62,21,32);$s=32;continue;case 27:b=d.switch2(42,39);$s=32;continue;case 28:b=d.switch2(43,44);$s=32;continue;case 29:if(d.ch===94){d.next();b=d.switch2(22,33);}else{b=d.switch3(17,28,38,34);}$s=32;continue;case 30:b=d.switch3(18,29,124,35);$s=32;continue;case 31:if(!((f===65279))){d.error(d.file.Offset(a),A.Sprintf("illegal character %#U",new V([new $Int32(f)])));}e=d.insertSemi;b=0;c=$encodeRune(f);case 32:case 4:if(((d.mode&2)>>>0)===0){d.insertSemi=e;}return[a,b,c];case-1:}return;}};N.prototype.Scan=function(){return this.$val.Scan();};J.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];K.methods=[{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Swap",name:"Swap",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"Less",name:"Less",pkg:"",typ:$funcType([$Int,$Int],[$Bool],false)},{prop:"Sort",name:"Sort",pkg:"",typ:$funcType([],[],false)},{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)},{prop:"Err",name:"Err",pkg:"",typ:$funcType([],[$error],false)}];X.methods=[{prop:"Add",name:"Add",pkg:"",typ:$funcType([B.Position,$String],[],false)},{prop:"Reset",name:"Reset",pkg:"",typ:$funcType([],[],false)},{prop:"RemoveMultiples",name:"RemoveMultiples",pkg:"",typ:$funcType([],[],false)}];AA.methods=[{prop:"next",name:"next",pkg:"go/scanner",typ:$funcType([],[],false)},{prop:"Init",name:"Init",pkg:"",typ:$funcType([Z,U,M,O],[],false)},{prop:"error",name:"error",pkg:"go/scanner",typ:$funcType([$Int,$String],[],false)},{prop:"interpretLineComment",name:"interpretLineComment",pkg:"go/scanner",typ:$funcType([U],[],false)},{prop:"scanComment",name:"scanComment",pkg:"go/scanner",typ:$funcType([],[$String],false)},{prop:"findLineEnd",name:"findLineEnd",pkg:"go/scanner",typ:$funcType([],[$Bool],false)},{prop:"scanIdentifier",name:"scanIdentifier",pkg:"go/scanner",typ:$funcType([],[$String],false)},{prop:"scanMantissa",name:"scanMantissa",pkg:"go/scanner",typ:$funcType([$Int],[],false)},{prop:"scanNumber",name:"scanNumber",pkg:"go/scanner",typ:$funcType([$Bool],[B.Token,$String],false)},{prop:"scanEscape",name:"scanEscape",pkg:"go/scanner",typ:$funcType([$Int32],[$Bool],false)},{prop:"scanRune",name:"scanRune",pkg:"go/scanner",typ:$funcType([],[$String],false)},{prop:"scanString",name:"scanString",pkg:"go/scanner",typ:$funcType([],[$String],false)},{prop:"scanRawString",name:"scanRawString",pkg:"go/scanner",typ:$funcType([],[$String],false)},{prop:"skipWhitespace",name:"skipWhitespace",pkg:"go/scanner",typ:$funcType([],[],false)},{prop:"switch2",name:"switch2",pkg:"go/scanner",typ:$funcType([B.Token,B.Token],[B.Token],false)},{prop:"switch3",name:"switch3",pkg:"go/scanner",typ:$funcType([B.Token,B.Token,$Int32,B.Token],[B.Token],false)},{prop:"switch4",name:"switch4",pkg:"go/scanner",typ:$funcType([B.Token,B.Token,$Int32,B.Token,B.Token],[B.Token],false)},{prop:"Scan",name:"Scan",pkg:"",typ:$funcType([],[B.Pos,B.Token,$String],false)}];J.init([{prop:"Pos",name:"Pos",pkg:"",typ:B.Position,tag:""},{prop:"Msg",name:"Msg",pkg:"",typ:$String,tag:""}]);K.init(Y);M.init([B.Position,$String],[],false);N.init([{prop:"file",name:"file",pkg:"go/scanner",typ:Z,tag:""},{prop:"dir",name:"dir",pkg:"go/scanner",typ:$String,tag:""},{prop:"src",name:"src",pkg:"go/scanner",typ:U,tag:""},{prop:"err",name:"err",pkg:"go/scanner",typ:M,tag:""},{prop:"mode",name:"mode",pkg:"go/scanner",typ:O,tag:""},{prop:"ch",name:"ch",pkg:"go/scanner",typ:$Int32,tag:""},{prop:"offset",name:"offset",pkg:"go/scanner",typ:$Int,tag:""},{prop:"rdOffset",name:"rdOffset",pkg:"go/scanner",typ:$Int,tag:""},{prop:"lineOffset",name:"lineOffset",pkg:"go/scanner",typ:$Int,tag:""},{prop:"insertSemi",name:"insertSemi",pkg:"go/scanner",typ:$Bool,tag:""},{prop:"ErrorCount",name:"ErrorCount",pkg:"",typ:$Int,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_scanner=function(){while(true){switch($s){case 0:$r=E.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=F.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=6;case 6:if($r&&$r.$blocking){$r=$r();}$r=G.$init($BLOCKING);$s=7;case 7:if($r&&$r.$blocking){$r=$r();}$r=H.$init($BLOCKING);$s=8;case 8:if($r&&$r.$blocking){$r=$r();}$r=I.$init($BLOCKING);$s=9;case 9:if($r&&$r.$blocking){$r=$r();}P=new U($stringToBytes("//line "));}return;}};$init_scanner.$blocking=true;return $init_scanner;};return $pkg;})(); +$packages["go/ast"]=(function(){var $pkg={},E,F,L,A,I,J,K,G,H,B,C,D,M,N,O,P,Q,R,U,V,W,X,Y,Z,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR,AS,AV,AW,AX,AY,AZ,BA,BB,BC,BD,BE,BF,BG,BH,BI,BJ,BK,BL,BM,BN,BO,BP,BQ,BR,BS,BT,BU,BV,BW,BX,BY,DI,DK,DL,DX,DZ,EB,ED,EJ,EM,EN,EO,EP,EQ,ER,ES,ET,EV,EY,EZ,FA,FB,FC,FD,FE,FF,FG,FH,FI,FJ,FK,FL,FM,FN,FO,FP,FQ,FR,FS,FT,FV,FW,FX,FY,FZ,GA,GB,GC,GD,GE,GF,GG,GH,GI,GJ,GK,GL,GM,GN,GO,GP,GQ,GR,GS,GT,GU,GV,GW,GX,GY,GZ,HA,HB,HC,HD,HE,HF,HG,HH,HI,EC,S,T,AU,DD,DE,DF,DG,DH,DJ,DY,EA,EE,EF,EG,EH,EI,EK;E=$packages["bytes"];F=$packages["fmt"];L=$packages["go/scanner"];A=$packages["go/token"];I=$packages["io"];J=$packages["os"];K=$packages["reflect"];G=$packages["sort"];H=$packages["strconv"];B=$packages["strings"];C=$packages["unicode"];D=$packages["unicode/utf8"];M=$pkg.Node=$newType(8,$kindInterface,"ast.Node","Node","go/ast",null);N=$pkg.Expr=$newType(8,$kindInterface,"ast.Expr","Expr","go/ast",null);O=$pkg.Stmt=$newType(8,$kindInterface,"ast.Stmt","Stmt","go/ast",null);P=$pkg.Decl=$newType(8,$kindInterface,"ast.Decl","Decl","go/ast",null);Q=$pkg.Comment=$newType(0,$kindStruct,"ast.Comment","Comment","go/ast",function(Slash_,Text_){this.$val=this;this.Slash=Slash_!==undefined?Slash_:0;this.Text=Text_!==undefined?Text_:"";});R=$pkg.CommentGroup=$newType(0,$kindStruct,"ast.CommentGroup","CommentGroup","go/ast",function(List_){this.$val=this;this.List=List_!==undefined?List_:FO.nil;});U=$pkg.Field=$newType(0,$kindStruct,"ast.Field","Field","go/ast",function(Doc_,Names_,Type_,Tag_,Comment_){this.$val=this;this.Doc=Doc_!==undefined?Doc_:EM.nil;this.Names=Names_!==undefined?Names_:FS.nil;this.Type=Type_!==undefined?Type_:$ifaceNil;this.Tag=Tag_!==undefined?Tag_:EO.nil;this.Comment=Comment_!==undefined?Comment_:EM.nil;});V=$pkg.FieldList=$newType(0,$kindStruct,"ast.FieldList","FieldList","go/ast",function(Opening_,List_,Closing_){this.$val=this;this.Opening=Opening_!==undefined?Opening_:0;this.List=List_!==undefined?List_:HD.nil;this.Closing=Closing_!==undefined?Closing_:0;});W=$pkg.BadExpr=$newType(0,$kindStruct,"ast.BadExpr","BadExpr","go/ast",function(From_,To_){this.$val=this;this.From=From_!==undefined?From_:0;this.To=To_!==undefined?To_:0;});X=$pkg.Ident=$newType(0,$kindStruct,"ast.Ident","Ident","go/ast",function(NamePos_,Name_,Obj_){this.$val=this;this.NamePos=NamePos_!==undefined?NamePos_:0;this.Name=Name_!==undefined?Name_:"";this.Obj=Obj_!==undefined?Obj_:EQ.nil;});Y=$pkg.Ellipsis=$newType(0,$kindStruct,"ast.Ellipsis","Ellipsis","go/ast",function(Ellipsis_,Elt_){this.$val=this;this.Ellipsis=Ellipsis_!==undefined?Ellipsis_:0;this.Elt=Elt_!==undefined?Elt_:$ifaceNil;});Z=$pkg.BasicLit=$newType(0,$kindStruct,"ast.BasicLit","BasicLit","go/ast",function(ValuePos_,Kind_,Value_){this.$val=this;this.ValuePos=ValuePos_!==undefined?ValuePos_:0;this.Kind=Kind_!==undefined?Kind_:0;this.Value=Value_!==undefined?Value_:"";});AA=$pkg.FuncLit=$newType(0,$kindStruct,"ast.FuncLit","FuncLit","go/ast",function(Type_,Body_){this.$val=this;this.Type=Type_!==undefined?Type_:FG.nil;this.Body=Body_!==undefined?Body_:ES.nil;});AB=$pkg.CompositeLit=$newType(0,$kindStruct,"ast.CompositeLit","CompositeLit","go/ast",function(Type_,Lbrace_,Elts_,Rbrace_){this.$val=this;this.Type=Type_!==undefined?Type_:$ifaceNil;this.Lbrace=Lbrace_!==undefined?Lbrace_:0;this.Elts=Elts_!==undefined?Elts_:HE.nil;this.Rbrace=Rbrace_!==undefined?Rbrace_:0;});AC=$pkg.ParenExpr=$newType(0,$kindStruct,"ast.ParenExpr","ParenExpr","go/ast",function(Lparen_,X_,Rparen_){this.$val=this;this.Lparen=Lparen_!==undefined?Lparen_:0;this.X=X_!==undefined?X_:$ifaceNil;this.Rparen=Rparen_!==undefined?Rparen_:0;});AD=$pkg.SelectorExpr=$newType(0,$kindStruct,"ast.SelectorExpr","SelectorExpr","go/ast",function(X_,Sel_){this.$val=this;this.X=X_!==undefined?X_:$ifaceNil;this.Sel=Sel_!==undefined?Sel_:ER.nil;});AE=$pkg.IndexExpr=$newType(0,$kindStruct,"ast.IndexExpr","IndexExpr","go/ast",function(X_,Lbrack_,Index_,Rbrack_){this.$val=this;this.X=X_!==undefined?X_:$ifaceNil;this.Lbrack=Lbrack_!==undefined?Lbrack_:0;this.Index=Index_!==undefined?Index_:$ifaceNil;this.Rbrack=Rbrack_!==undefined?Rbrack_:0;});AF=$pkg.SliceExpr=$newType(0,$kindStruct,"ast.SliceExpr","SliceExpr","go/ast",function(X_,Lbrack_,Low_,High_,Max_,Slice3_,Rbrack_){this.$val=this;this.X=X_!==undefined?X_:$ifaceNil;this.Lbrack=Lbrack_!==undefined?Lbrack_:0;this.Low=Low_!==undefined?Low_:$ifaceNil;this.High=High_!==undefined?High_:$ifaceNil;this.Max=Max_!==undefined?Max_:$ifaceNil;this.Slice3=Slice3_!==undefined?Slice3_:false;this.Rbrack=Rbrack_!==undefined?Rbrack_:0;});AG=$pkg.TypeAssertExpr=$newType(0,$kindStruct,"ast.TypeAssertExpr","TypeAssertExpr","go/ast",function(X_,Lparen_,Type_,Rparen_){this.$val=this;this.X=X_!==undefined?X_:$ifaceNil;this.Lparen=Lparen_!==undefined?Lparen_:0;this.Type=Type_!==undefined?Type_:$ifaceNil;this.Rparen=Rparen_!==undefined?Rparen_:0;});AH=$pkg.CallExpr=$newType(0,$kindStruct,"ast.CallExpr","CallExpr","go/ast",function(Fun_,Lparen_,Args_,Ellipsis_,Rparen_){this.$val=this;this.Fun=Fun_!==undefined?Fun_:$ifaceNil;this.Lparen=Lparen_!==undefined?Lparen_:0;this.Args=Args_!==undefined?Args_:HE.nil;this.Ellipsis=Ellipsis_!==undefined?Ellipsis_:0;this.Rparen=Rparen_!==undefined?Rparen_:0;});AI=$pkg.StarExpr=$newType(0,$kindStruct,"ast.StarExpr","StarExpr","go/ast",function(Star_,X_){this.$val=this;this.Star=Star_!==undefined?Star_:0;this.X=X_!==undefined?X_:$ifaceNil;});AJ=$pkg.UnaryExpr=$newType(0,$kindStruct,"ast.UnaryExpr","UnaryExpr","go/ast",function(OpPos_,Op_,X_){this.$val=this;this.OpPos=OpPos_!==undefined?OpPos_:0;this.Op=Op_!==undefined?Op_:0;this.X=X_!==undefined?X_:$ifaceNil;});AK=$pkg.BinaryExpr=$newType(0,$kindStruct,"ast.BinaryExpr","BinaryExpr","go/ast",function(X_,OpPos_,Op_,Y_){this.$val=this;this.X=X_!==undefined?X_:$ifaceNil;this.OpPos=OpPos_!==undefined?OpPos_:0;this.Op=Op_!==undefined?Op_:0;this.Y=Y_!==undefined?Y_:$ifaceNil;});AL=$pkg.KeyValueExpr=$newType(0,$kindStruct,"ast.KeyValueExpr","KeyValueExpr","go/ast",function(Key_,Colon_,Value_){this.$val=this;this.Key=Key_!==undefined?Key_:$ifaceNil;this.Colon=Colon_!==undefined?Colon_:0;this.Value=Value_!==undefined?Value_:$ifaceNil;});AM=$pkg.ChanDir=$newType(4,$kindInt,"ast.ChanDir","ChanDir","go/ast",null);AN=$pkg.ArrayType=$newType(0,$kindStruct,"ast.ArrayType","ArrayType","go/ast",function(Lbrack_,Len_,Elt_){this.$val=this;this.Lbrack=Lbrack_!==undefined?Lbrack_:0;this.Len=Len_!==undefined?Len_:$ifaceNil;this.Elt=Elt_!==undefined?Elt_:$ifaceNil;});AO=$pkg.StructType=$newType(0,$kindStruct,"ast.StructType","StructType","go/ast",function(Struct_,Fields_,Incomplete_){this.$val=this;this.Struct=Struct_!==undefined?Struct_:0;this.Fields=Fields_!==undefined?Fields_:EP.nil;this.Incomplete=Incomplete_!==undefined?Incomplete_:false;});AP=$pkg.FuncType=$newType(0,$kindStruct,"ast.FuncType","FuncType","go/ast",function(Func_,Params_,Results_){this.$val=this;this.Func=Func_!==undefined?Func_:0;this.Params=Params_!==undefined?Params_:EP.nil;this.Results=Results_!==undefined?Results_:EP.nil;});AQ=$pkg.InterfaceType=$newType(0,$kindStruct,"ast.InterfaceType","InterfaceType","go/ast",function(Interface_,Methods_,Incomplete_){this.$val=this;this.Interface=Interface_!==undefined?Interface_:0;this.Methods=Methods_!==undefined?Methods_:EP.nil;this.Incomplete=Incomplete_!==undefined?Incomplete_:false;});AR=$pkg.MapType=$newType(0,$kindStruct,"ast.MapType","MapType","go/ast",function(Map_,Key_,Value_){this.$val=this;this.Map=Map_!==undefined?Map_:0;this.Key=Key_!==undefined?Key_:$ifaceNil;this.Value=Value_!==undefined?Value_:$ifaceNil;});AS=$pkg.ChanType=$newType(0,$kindStruct,"ast.ChanType","ChanType","go/ast",function(Begin_,Arrow_,Dir_,Value_){this.$val=this;this.Begin=Begin_!==undefined?Begin_:0;this.Arrow=Arrow_!==undefined?Arrow_:0;this.Dir=Dir_!==undefined?Dir_:0;this.Value=Value_!==undefined?Value_:$ifaceNil;});AV=$pkg.BadStmt=$newType(0,$kindStruct,"ast.BadStmt","BadStmt","go/ast",function(From_,To_){this.$val=this;this.From=From_!==undefined?From_:0;this.To=To_!==undefined?To_:0;});AW=$pkg.DeclStmt=$newType(0,$kindStruct,"ast.DeclStmt","DeclStmt","go/ast",function(Decl_){this.$val=this;this.Decl=Decl_!==undefined?Decl_:$ifaceNil;});AX=$pkg.EmptyStmt=$newType(0,$kindStruct,"ast.EmptyStmt","EmptyStmt","go/ast",function(Semicolon_){this.$val=this;this.Semicolon=Semicolon_!==undefined?Semicolon_:0;});AY=$pkg.LabeledStmt=$newType(0,$kindStruct,"ast.LabeledStmt","LabeledStmt","go/ast",function(Label_,Colon_,Stmt_){this.$val=this;this.Label=Label_!==undefined?Label_:ER.nil;this.Colon=Colon_!==undefined?Colon_:0;this.Stmt=Stmt_!==undefined?Stmt_:$ifaceNil;});AZ=$pkg.ExprStmt=$newType(0,$kindStruct,"ast.ExprStmt","ExprStmt","go/ast",function(X_){this.$val=this;this.X=X_!==undefined?X_:$ifaceNil;});BA=$pkg.SendStmt=$newType(0,$kindStruct,"ast.SendStmt","SendStmt","go/ast",function(Chan_,Arrow_,Value_){this.$val=this;this.Chan=Chan_!==undefined?Chan_:$ifaceNil;this.Arrow=Arrow_!==undefined?Arrow_:0;this.Value=Value_!==undefined?Value_:$ifaceNil;});BB=$pkg.IncDecStmt=$newType(0,$kindStruct,"ast.IncDecStmt","IncDecStmt","go/ast",function(X_,TokPos_,Tok_){this.$val=this;this.X=X_!==undefined?X_:$ifaceNil;this.TokPos=TokPos_!==undefined?TokPos_:0;this.Tok=Tok_!==undefined?Tok_:0;});BC=$pkg.AssignStmt=$newType(0,$kindStruct,"ast.AssignStmt","AssignStmt","go/ast",function(Lhs_,TokPos_,Tok_,Rhs_){this.$val=this;this.Lhs=Lhs_!==undefined?Lhs_:HE.nil;this.TokPos=TokPos_!==undefined?TokPos_:0;this.Tok=Tok_!==undefined?Tok_:0;this.Rhs=Rhs_!==undefined?Rhs_:HE.nil;});BD=$pkg.GoStmt=$newType(0,$kindStruct,"ast.GoStmt","GoStmt","go/ast",function(Go_,Call_){this.$val=this;this.Go=Go_!==undefined?Go_:0;this.Call=Call_!==undefined?Call_:GF.nil;});BE=$pkg.DeferStmt=$newType(0,$kindStruct,"ast.DeferStmt","DeferStmt","go/ast",function(Defer_,Call_){this.$val=this;this.Defer=Defer_!==undefined?Defer_:0;this.Call=Call_!==undefined?Call_:GF.nil;});BF=$pkg.ReturnStmt=$newType(0,$kindStruct,"ast.ReturnStmt","ReturnStmt","go/ast",function(Return_,Results_){this.$val=this;this.Return=Return_!==undefined?Return_:0;this.Results=Results_!==undefined?Results_:HE.nil;});BG=$pkg.BranchStmt=$newType(0,$kindStruct,"ast.BranchStmt","BranchStmt","go/ast",function(TokPos_,Tok_,Label_){this.$val=this;this.TokPos=TokPos_!==undefined?TokPos_:0;this.Tok=Tok_!==undefined?Tok_:0;this.Label=Label_!==undefined?Label_:ER.nil;});BH=$pkg.BlockStmt=$newType(0,$kindStruct,"ast.BlockStmt","BlockStmt","go/ast",function(Lbrace_,List_,Rbrace_){this.$val=this;this.Lbrace=Lbrace_!==undefined?Lbrace_:0;this.List=List_!==undefined?List_:HF.nil;this.Rbrace=Rbrace_!==undefined?Rbrace_:0;});BI=$pkg.IfStmt=$newType(0,$kindStruct,"ast.IfStmt","IfStmt","go/ast",function(If_,Init_,Cond_,Body_,Else_){this.$val=this;this.If=If_!==undefined?If_:0;this.Init=Init_!==undefined?Init_:$ifaceNil;this.Cond=Cond_!==undefined?Cond_:$ifaceNil;this.Body=Body_!==undefined?Body_:ES.nil;this.Else=Else_!==undefined?Else_:$ifaceNil;});BJ=$pkg.CaseClause=$newType(0,$kindStruct,"ast.CaseClause","CaseClause","go/ast",function(Case_,List_,Colon_,Body_){this.$val=this;this.Case=Case_!==undefined?Case_:0;this.List=List_!==undefined?List_:HE.nil;this.Colon=Colon_!==undefined?Colon_:0;this.Body=Body_!==undefined?Body_:HF.nil;});BK=$pkg.SwitchStmt=$newType(0,$kindStruct,"ast.SwitchStmt","SwitchStmt","go/ast",function(Switch_,Init_,Tag_,Body_){this.$val=this;this.Switch=Switch_!==undefined?Switch_:0;this.Init=Init_!==undefined?Init_:$ifaceNil;this.Tag=Tag_!==undefined?Tag_:$ifaceNil;this.Body=Body_!==undefined?Body_:ES.nil;});BL=$pkg.TypeSwitchStmt=$newType(0,$kindStruct,"ast.TypeSwitchStmt","TypeSwitchStmt","go/ast",function(Switch_,Init_,Assign_,Body_){this.$val=this;this.Switch=Switch_!==undefined?Switch_:0;this.Init=Init_!==undefined?Init_:$ifaceNil;this.Assign=Assign_!==undefined?Assign_:$ifaceNil;this.Body=Body_!==undefined?Body_:ES.nil;});BM=$pkg.CommClause=$newType(0,$kindStruct,"ast.CommClause","CommClause","go/ast",function(Case_,Comm_,Colon_,Body_){this.$val=this;this.Case=Case_!==undefined?Case_:0;this.Comm=Comm_!==undefined?Comm_:$ifaceNil;this.Colon=Colon_!==undefined?Colon_:0;this.Body=Body_!==undefined?Body_:HF.nil;});BN=$pkg.SelectStmt=$newType(0,$kindStruct,"ast.SelectStmt","SelectStmt","go/ast",function(Select_,Body_){this.$val=this;this.Select=Select_!==undefined?Select_:0;this.Body=Body_!==undefined?Body_:ES.nil;});BO=$pkg.ForStmt=$newType(0,$kindStruct,"ast.ForStmt","ForStmt","go/ast",function(For_,Init_,Cond_,Post_,Body_){this.$val=this;this.For=For_!==undefined?For_:0;this.Init=Init_!==undefined?Init_:$ifaceNil;this.Cond=Cond_!==undefined?Cond_:$ifaceNil;this.Post=Post_!==undefined?Post_:$ifaceNil;this.Body=Body_!==undefined?Body_:ES.nil;});BP=$pkg.RangeStmt=$newType(0,$kindStruct,"ast.RangeStmt","RangeStmt","go/ast",function(For_,Key_,Value_,TokPos_,Tok_,X_,Body_){this.$val=this;this.For=For_!==undefined?For_:0;this.Key=Key_!==undefined?Key_:$ifaceNil;this.Value=Value_!==undefined?Value_:$ifaceNil;this.TokPos=TokPos_!==undefined?TokPos_:0;this.Tok=Tok_!==undefined?Tok_:0;this.X=X_!==undefined?X_:$ifaceNil;this.Body=Body_!==undefined?Body_:ES.nil;});BQ=$pkg.Spec=$newType(8,$kindInterface,"ast.Spec","Spec","go/ast",null);BR=$pkg.ImportSpec=$newType(0,$kindStruct,"ast.ImportSpec","ImportSpec","go/ast",function(Doc_,Name_,Path_,Comment_,EndPos_){this.$val=this;this.Doc=Doc_!==undefined?Doc_:EM.nil;this.Name=Name_!==undefined?Name_:ER.nil;this.Path=Path_!==undefined?Path_:EO.nil;this.Comment=Comment_!==undefined?Comment_:EM.nil;this.EndPos=EndPos_!==undefined?EndPos_:0;});BS=$pkg.ValueSpec=$newType(0,$kindStruct,"ast.ValueSpec","ValueSpec","go/ast",function(Doc_,Names_,Type_,Values_,Comment_){this.$val=this;this.Doc=Doc_!==undefined?Doc_:EM.nil;this.Names=Names_!==undefined?Names_:FS.nil;this.Type=Type_!==undefined?Type_:$ifaceNil;this.Values=Values_!==undefined?Values_:HE.nil;this.Comment=Comment_!==undefined?Comment_:EM.nil;});BT=$pkg.TypeSpec=$newType(0,$kindStruct,"ast.TypeSpec","TypeSpec","go/ast",function(Doc_,Name_,Type_,Comment_){this.$val=this;this.Doc=Doc_!==undefined?Doc_:EM.nil;this.Name=Name_!==undefined?Name_:ER.nil;this.Type=Type_!==undefined?Type_:$ifaceNil;this.Comment=Comment_!==undefined?Comment_:EM.nil;});BU=$pkg.BadDecl=$newType(0,$kindStruct,"ast.BadDecl","BadDecl","go/ast",function(From_,To_){this.$val=this;this.From=From_!==undefined?From_:0;this.To=To_!==undefined?To_:0;});BV=$pkg.GenDecl=$newType(0,$kindStruct,"ast.GenDecl","GenDecl","go/ast",function(Doc_,TokPos_,Tok_,Lparen_,Specs_,Rparen_){this.$val=this;this.Doc=Doc_!==undefined?Doc_:EM.nil;this.TokPos=TokPos_!==undefined?TokPos_:0;this.Tok=Tok_!==undefined?Tok_:0;this.Lparen=Lparen_!==undefined?Lparen_:0;this.Specs=Specs_!==undefined?Specs_:HG.nil;this.Rparen=Rparen_!==undefined?Rparen_:0;});BW=$pkg.FuncDecl=$newType(0,$kindStruct,"ast.FuncDecl","FuncDecl","go/ast",function(Doc_,Recv_,Name_,Type_,Body_){this.$val=this;this.Doc=Doc_!==undefined?Doc_:EM.nil;this.Recv=Recv_!==undefined?Recv_:EP.nil;this.Name=Name_!==undefined?Name_:ER.nil;this.Type=Type_!==undefined?Type_:FG.nil;this.Body=Body_!==undefined?Body_:ES.nil;});BX=$pkg.File=$newType(0,$kindStruct,"ast.File","File","go/ast",function(Doc_,Package_,Name_,Decls_,Scope_,Imports_,Unresolved_,Comments_){this.$val=this;this.Doc=Doc_!==undefined?Doc_:EM.nil;this.Package=Package_!==undefined?Package_:0;this.Name=Name_!==undefined?Name_:ER.nil;this.Decls=Decls_!==undefined?Decls_:FP.nil;this.Scope=Scope_!==undefined?Scope_:FV.nil;this.Imports=Imports_!==undefined?Imports_:FR.nil;this.Unresolved=Unresolved_!==undefined?Unresolved_:FS.nil;this.Comments=Comments_!==undefined?Comments_:ET.nil;});BY=$pkg.Package=$newType(0,$kindStruct,"ast.Package","Package","go/ast",function(Name_,Scope_,Imports_,Files_){this.$val=this;this.Name=Name_!==undefined?Name_:"";this.Scope=Scope_!==undefined?Scope_:FV.nil;this.Imports=Imports_!==undefined?Imports_:false;this.Files=Files_!==undefined?Files_:false;});DI=$pkg.posSpan=$newType(0,$kindStruct,"ast.posSpan","posSpan","go/ast",function(Start_,End_){this.$val=this;this.Start=Start_!==undefined?Start_:0;this.End=End_!==undefined?End_:0;});DK=$pkg.byImportSpec=$newType(12,$kindSlice,"ast.byImportSpec","byImportSpec","go/ast",null);DL=$pkg.byCommentPos=$newType(12,$kindSlice,"ast.byCommentPos","byCommentPos","go/ast",null);DX=$pkg.Scope=$newType(0,$kindStruct,"ast.Scope","Scope","go/ast",function(Outer_,Objects_){this.$val=this;this.Outer=Outer_!==undefined?Outer_:FV.nil;this.Objects=Objects_!==undefined?Objects_:false;});DZ=$pkg.Object=$newType(0,$kindStruct,"ast.Object","Object","go/ast",function(Kind_,Name_,Decl_,Data_,Type_){this.$val=this;this.Kind=Kind_!==undefined?Kind_:0;this.Name=Name_!==undefined?Name_:"";this.Decl=Decl_!==undefined?Decl_:$ifaceNil;this.Data=Data_!==undefined?Data_:$ifaceNil;this.Type=Type_!==undefined?Type_:$ifaceNil;});EB=$pkg.ObjKind=$newType(4,$kindInt,"ast.ObjKind","ObjKind","go/ast",null);ED=$pkg.Visitor=$newType(8,$kindInterface,"ast.Visitor","Visitor","go/ast",null);EJ=$pkg.inspector=$newType(4,$kindFunc,"ast.inspector","inspector","go/ast",null);EM=$ptrType(R);EN=$sliceType($String);EO=$ptrType(Z);EP=$ptrType(V);EQ=$ptrType(DZ);ER=$ptrType(X);ES=$ptrType(BH);ET=$sliceType(EM);EV=$ptrType(Q);EY=$ptrType(BX);EZ=$ptrType(U);FA=$sliceType($emptyInterface);FB=$ptrType(AD);FC=$ptrType(AI);FD=$ptrType(AC);FE=$ptrType(AN);FF=$ptrType(AO);FG=$ptrType(AP);FH=$ptrType(AQ);FI=$ptrType(AR);FJ=$ptrType(AS);FK=$ptrType(BS);FL=$ptrType(BT);FM=$ptrType(BV);FN=$ptrType(BW);FO=$sliceType(EV);FP=$sliceType(P);FQ=$ptrType(BR);FR=$sliceType(FQ);FS=$sliceType(ER);FT=$sliceType(DI);FV=$ptrType(DX);FW=$ptrType(AY);FX=$ptrType(BC);FY=$ptrType(W);FZ=$ptrType(Y);GA=$ptrType(AA);GB=$ptrType(AB);GC=$ptrType(AE);GD=$ptrType(AF);GE=$ptrType(AG);GF=$ptrType(AH);GG=$ptrType(AJ);GH=$ptrType(AK);GI=$ptrType(AL);GJ=$ptrType(AV);GK=$ptrType(AW);GL=$ptrType(AX);GM=$ptrType(AZ);GN=$ptrType(BA);GO=$ptrType(BB);GP=$ptrType(BD);GQ=$ptrType(BE);GR=$ptrType(BF);GS=$ptrType(BG);GT=$ptrType(BI);GU=$ptrType(BJ);GV=$ptrType(BK);GW=$ptrType(BL);GX=$ptrType(BM);GY=$ptrType(BN);GZ=$ptrType(BO);HA=$ptrType(BP);HB=$ptrType(BU);HC=$ptrType(BY);HD=$sliceType(EZ);HE=$sliceType(N);HF=$sliceType(O);HG=$sliceType(BQ);HH=$mapType($String,EQ);HI=$mapType($String,EY);Q.ptr.prototype.Pos=function(){var a;a=this;return a.Slash;};Q.prototype.Pos=function(){return this.$val.Pos();};Q.ptr.prototype.End=function(){var a;a=this;return(((a.Slash>>0)+a.Text.length>>0)>>0);};Q.prototype.End=function(){return this.$val.End();};R.ptr.prototype.Pos=function(){var a,b;a=this;return(b=a.List,((0<0||0>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+0])).Pos();};R.prototype.Pos=function(){return this.$val.Pos();};R.ptr.prototype.End=function(){var a,b,c;a=this;return(b=a.List,c=a.List.$length-1>>0,((c<0||c>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+c])).End();};R.prototype.End=function(){return this.$val.End();};S=function(a){var a;return(a===32)||(a===9)||(a===10)||(a===13);};T=function(a){var a,b;b=a.length;while(true){if(!(b>0&&S(a.charCodeAt((b-1>>0))))){break;}b=b-(1)>>0;}return a.substring(0,b);};R.ptr.prototype.Text=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;a=this;if(a===EM.nil){return"";}b=$makeSlice(EN,a.List.$length);c=a.List;d=0;while(true){if(!(d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]);(e<0||e>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+e]=f.Text;d++;}g=$makeSlice(EN,0,10);h=b;i=0;while(true){if(!(i=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i]);k=j.charCodeAt(1);if(k===47){j=j.substring(2);if(j.length>0&&(j.charCodeAt(0)===32)){j=j.substring(1);}}else if(k===42){j=j.substring(2,(j.length-2>>0));}l=B.Split(j,"\n");m=l;n=0;while(true){if(!(n=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+n]);g=$append(g,T(o));n++;}i++;}p=0;q=g;r=0;while(true){if(!(r=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+r]);if(!(s==="")||p>0&&!((t=p-1>>0,((t<0||t>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+t]))==="")){(p<0||p>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+p]=s;p=p+(1)>>0;}r++;}g=$subslice(g,0,p);if(p>0&&!((u=p-1>>0,((u<0||u>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+u]))==="")){g=$append(g,"");}return B.Join(g,"\n");};R.prototype.Text=function(){return this.$val.Text();};U.ptr.prototype.Pos=function(){var a,b;a=this;if(a.Names.$length>0){return(b=a.Names,((0<0||0>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+0])).Pos();}return a.Type.Pos();};U.prototype.Pos=function(){return this.$val.Pos();};U.ptr.prototype.End=function(){var a;a=this;if(!(a.Tag===EO.nil)){return a.Tag.End();}return a.Type.End();};U.prototype.End=function(){return this.$val.End();};V.ptr.prototype.Pos=function(){var a,b;a=this;if(new A.Pos(a.Opening).IsValid()){return a.Opening;}if(a.List.$length>0){return(b=a.List,((0<0||0>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+0])).Pos();}return 0;};V.prototype.Pos=function(){return this.$val.Pos();};V.ptr.prototype.End=function(){var a,b,c,d;a=this;if(new A.Pos(a.Closing).IsValid()){return a.Closing+1>>0;}b=a.List.$length;if(b>0){return(c=a.List,d=b-1>>0,((d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d])).End();}return 0;};V.prototype.End=function(){return this.$val.End();};V.ptr.prototype.NumFields=function(){var a,b,c,d,e,f;a=this;b=0;if(!(a===EP.nil)){c=a.List;d=0;while(true){if(!(d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]);f=e.Names.$length;if(f===0){f=1;}b=b+(f)>>0;d++;}}return b;};V.prototype.NumFields=function(){return this.$val.NumFields();};W.ptr.prototype.Pos=function(){var a;a=this;return a.From;};W.prototype.Pos=function(){return this.$val.Pos();};X.ptr.prototype.Pos=function(){var a;a=this;return a.NamePos;};X.prototype.Pos=function(){return this.$val.Pos();};Y.ptr.prototype.Pos=function(){var a;a=this;return a.Ellipsis;};Y.prototype.Pos=function(){return this.$val.Pos();};Z.ptr.prototype.Pos=function(){var a;a=this;return a.ValuePos;};Z.prototype.Pos=function(){return this.$val.Pos();};AA.ptr.prototype.Pos=function(){var a;a=this;return a.Type.Pos();};AA.prototype.Pos=function(){return this.$val.Pos();};AB.ptr.prototype.Pos=function(){var a;a=this;if(!($interfaceIsEqual(a.Type,$ifaceNil))){return a.Type.Pos();}return a.Lbrace;};AB.prototype.Pos=function(){return this.$val.Pos();};AC.ptr.prototype.Pos=function(){var a;a=this;return a.Lparen;};AC.prototype.Pos=function(){return this.$val.Pos();};AD.ptr.prototype.Pos=function(){var a;a=this;return a.X.Pos();};AD.prototype.Pos=function(){return this.$val.Pos();};AE.ptr.prototype.Pos=function(){var a;a=this;return a.X.Pos();};AE.prototype.Pos=function(){return this.$val.Pos();};AF.ptr.prototype.Pos=function(){var a;a=this;return a.X.Pos();};AF.prototype.Pos=function(){return this.$val.Pos();};AG.ptr.prototype.Pos=function(){var a;a=this;return a.X.Pos();};AG.prototype.Pos=function(){return this.$val.Pos();};AH.ptr.prototype.Pos=function(){var a;a=this;return a.Fun.Pos();};AH.prototype.Pos=function(){return this.$val.Pos();};AI.ptr.prototype.Pos=function(){var a;a=this;return a.Star;};AI.prototype.Pos=function(){return this.$val.Pos();};AJ.ptr.prototype.Pos=function(){var a;a=this;return a.OpPos;};AJ.prototype.Pos=function(){return this.$val.Pos();};AK.ptr.prototype.Pos=function(){var a;a=this;return a.X.Pos();};AK.prototype.Pos=function(){return this.$val.Pos();};AL.ptr.prototype.Pos=function(){var a;a=this;return a.Key.Pos();};AL.prototype.Pos=function(){return this.$val.Pos();};AN.ptr.prototype.Pos=function(){var a;a=this;return a.Lbrack;};AN.prototype.Pos=function(){return this.$val.Pos();};AO.ptr.prototype.Pos=function(){var a;a=this;return a.Struct;};AO.prototype.Pos=function(){return this.$val.Pos();};AP.ptr.prototype.Pos=function(){var a;a=this;if(new A.Pos(a.Func).IsValid()||a.Params===EP.nil){return a.Func;}return a.Params.Pos();};AP.prototype.Pos=function(){return this.$val.Pos();};AQ.ptr.prototype.Pos=function(){var a;a=this;return a.Interface;};AQ.prototype.Pos=function(){return this.$val.Pos();};AR.ptr.prototype.Pos=function(){var a;a=this;return a.Map;};AR.prototype.Pos=function(){return this.$val.Pos();};AS.ptr.prototype.Pos=function(){var a;a=this;return a.Begin;};AS.prototype.Pos=function(){return this.$val.Pos();};W.ptr.prototype.End=function(){var a;a=this;return a.To;};W.prototype.End=function(){return this.$val.End();};X.ptr.prototype.End=function(){var a;a=this;return(((a.NamePos>>0)+a.Name.length>>0)>>0);};X.prototype.End=function(){return this.$val.End();};Y.ptr.prototype.End=function(){var a;a=this;if(!($interfaceIsEqual(a.Elt,$ifaceNil))){return a.Elt.End();}return a.Ellipsis+3>>0;};Y.prototype.End=function(){return this.$val.End();};Z.ptr.prototype.End=function(){var a;a=this;return(((a.ValuePos>>0)+a.Value.length>>0)>>0);};Z.prototype.End=function(){return this.$val.End();};AA.ptr.prototype.End=function(){var a;a=this;return a.Body.End();};AA.prototype.End=function(){return this.$val.End();};AB.ptr.prototype.End=function(){var a;a=this;return a.Rbrace+1>>0;};AB.prototype.End=function(){return this.$val.End();};AC.ptr.prototype.End=function(){var a;a=this;return a.Rparen+1>>0;};AC.prototype.End=function(){return this.$val.End();};AD.ptr.prototype.End=function(){var a;a=this;return a.Sel.End();};AD.prototype.End=function(){return this.$val.End();};AE.ptr.prototype.End=function(){var a;a=this;return a.Rbrack+1>>0;};AE.prototype.End=function(){return this.$val.End();};AF.ptr.prototype.End=function(){var a;a=this;return a.Rbrack+1>>0;};AF.prototype.End=function(){return this.$val.End();};AG.ptr.prototype.End=function(){var a;a=this;return a.Rparen+1>>0;};AG.prototype.End=function(){return this.$val.End();};AH.ptr.prototype.End=function(){var a;a=this;return a.Rparen+1>>0;};AH.prototype.End=function(){return this.$val.End();};AI.ptr.prototype.End=function(){var a;a=this;return a.X.End();};AI.prototype.End=function(){return this.$val.End();};AJ.ptr.prototype.End=function(){var a;a=this;return a.X.End();};AJ.prototype.End=function(){return this.$val.End();};AK.ptr.prototype.End=function(){var a;a=this;return a.Y.End();};AK.prototype.End=function(){return this.$val.End();};AL.ptr.prototype.End=function(){var a;a=this;return a.Value.End();};AL.prototype.End=function(){return this.$val.End();};AN.ptr.prototype.End=function(){var a;a=this;return a.Elt.End();};AN.prototype.End=function(){return this.$val.End();};AO.ptr.prototype.End=function(){var a;a=this;return a.Fields.End();};AO.prototype.End=function(){return this.$val.End();};AP.ptr.prototype.End=function(){var a;a=this;if(!(a.Results===EP.nil)){return a.Results.End();}return a.Params.End();};AP.prototype.End=function(){return this.$val.End();};AQ.ptr.prototype.End=function(){var a;a=this;return a.Methods.End();};AQ.prototype.End=function(){return this.$val.End();};AR.ptr.prototype.End=function(){var a;a=this;return a.Value.End();};AR.prototype.End=function(){return this.$val.End();};AS.ptr.prototype.End=function(){var a;a=this;return a.Value.End();};AS.prototype.End=function(){return this.$val.End();};AU=$pkg.IsExported=function(a){var a,b,c;b=D.DecodeRuneInString(a);c=b[0];return C.IsUpper(c);};X.ptr.prototype.IsExported=function(){var a;a=this;return AU(a.Name);};X.prototype.IsExported=function(){return this.$val.IsExported();};X.ptr.prototype.String=function(){var a;a=this;if(!(a===ER.nil)){return a.Name;}return"";};X.prototype.String=function(){return this.$val.String();};AV.ptr.prototype.Pos=function(){var a;a=this;return a.From;};AV.prototype.Pos=function(){return this.$val.Pos();};AW.ptr.prototype.Pos=function(){var a;a=this;return a.Decl.Pos();};AW.prototype.Pos=function(){return this.$val.Pos();};AX.ptr.prototype.Pos=function(){var a;a=this;return a.Semicolon;};AX.prototype.Pos=function(){return this.$val.Pos();};AY.ptr.prototype.Pos=function(){var a;a=this;return a.Label.Pos();};AY.prototype.Pos=function(){return this.$val.Pos();};AZ.ptr.prototype.Pos=function(){var a;a=this;return a.X.Pos();};AZ.prototype.Pos=function(){return this.$val.Pos();};BA.ptr.prototype.Pos=function(){var a;a=this;return a.Chan.Pos();};BA.prototype.Pos=function(){return this.$val.Pos();};BB.ptr.prototype.Pos=function(){var a;a=this;return a.X.Pos();};BB.prototype.Pos=function(){return this.$val.Pos();};BC.ptr.prototype.Pos=function(){var a,b;a=this;return(b=a.Lhs,((0<0||0>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+0])).Pos();};BC.prototype.Pos=function(){return this.$val.Pos();};BD.ptr.prototype.Pos=function(){var a;a=this;return a.Go;};BD.prototype.Pos=function(){return this.$val.Pos();};BE.ptr.prototype.Pos=function(){var a;a=this;return a.Defer;};BE.prototype.Pos=function(){return this.$val.Pos();};BF.ptr.prototype.Pos=function(){var a;a=this;return a.Return;};BF.prototype.Pos=function(){return this.$val.Pos();};BG.ptr.prototype.Pos=function(){var a;a=this;return a.TokPos;};BG.prototype.Pos=function(){return this.$val.Pos();};BH.ptr.prototype.Pos=function(){var a;a=this;return a.Lbrace;};BH.prototype.Pos=function(){return this.$val.Pos();};BI.ptr.prototype.Pos=function(){var a;a=this;return a.If;};BI.prototype.Pos=function(){return this.$val.Pos();};BJ.ptr.prototype.Pos=function(){var a;a=this;return a.Case;};BJ.prototype.Pos=function(){return this.$val.Pos();};BK.ptr.prototype.Pos=function(){var a;a=this;return a.Switch;};BK.prototype.Pos=function(){return this.$val.Pos();};BL.ptr.prototype.Pos=function(){var a;a=this;return a.Switch;};BL.prototype.Pos=function(){return this.$val.Pos();};BM.ptr.prototype.Pos=function(){var a;a=this;return a.Case;};BM.prototype.Pos=function(){return this.$val.Pos();};BN.ptr.prototype.Pos=function(){var a;a=this;return a.Select;};BN.prototype.Pos=function(){return this.$val.Pos();};BO.ptr.prototype.Pos=function(){var a;a=this;return a.For;};BO.prototype.Pos=function(){return this.$val.Pos();};BP.ptr.prototype.Pos=function(){var a;a=this;return a.For;};BP.prototype.Pos=function(){return this.$val.Pos();};AV.ptr.prototype.End=function(){var a;a=this;return a.To;};AV.prototype.End=function(){return this.$val.End();};AW.ptr.prototype.End=function(){var a;a=this;return a.Decl.End();};AW.prototype.End=function(){return this.$val.End();};AX.ptr.prototype.End=function(){var a;a=this;return a.Semicolon+1>>0;};AX.prototype.End=function(){return this.$val.End();};AY.ptr.prototype.End=function(){var a;a=this;return a.Stmt.End();};AY.prototype.End=function(){return this.$val.End();};AZ.ptr.prototype.End=function(){var a;a=this;return a.X.End();};AZ.prototype.End=function(){return this.$val.End();};BA.ptr.prototype.End=function(){var a;a=this;return a.Value.End();};BA.prototype.End=function(){return this.$val.End();};BB.ptr.prototype.End=function(){var a;a=this;return a.TokPos+2>>0;};BB.prototype.End=function(){return this.$val.End();};BC.ptr.prototype.End=function(){var a,b,c;a=this;return(b=a.Rhs,c=a.Rhs.$length-1>>0,((c<0||c>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+c])).End();};BC.prototype.End=function(){return this.$val.End();};BD.ptr.prototype.End=function(){var a;a=this;return a.Call.End();};BD.prototype.End=function(){return this.$val.End();};BE.ptr.prototype.End=function(){var a;a=this;return a.Call.End();};BE.prototype.End=function(){return this.$val.End();};BF.ptr.prototype.End=function(){var a,b,c,d;a=this;b=a.Results.$length;if(b>0){return(c=a.Results,d=b-1>>0,((d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d])).End();}return a.Return+6>>0;};BF.prototype.End=function(){return this.$val.End();};BG.ptr.prototype.End=function(){var a;a=this;if(!(a.Label===ER.nil)){return a.Label.End();}return(((a.TokPos>>0)+new A.Token(a.Tok).String().length>>0)>>0);};BG.prototype.End=function(){return this.$val.End();};BH.ptr.prototype.End=function(){var a;a=this;return a.Rbrace+1>>0;};BH.prototype.End=function(){return this.$val.End();};BI.ptr.prototype.End=function(){var a;a=this;if(!($interfaceIsEqual(a.Else,$ifaceNil))){return a.Else.End();}return a.Body.End();};BI.prototype.End=function(){return this.$val.End();};BJ.ptr.prototype.End=function(){var a,b,c,d;a=this;b=a.Body.$length;if(b>0){return(c=a.Body,d=b-1>>0,((d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d])).End();}return a.Colon+1>>0;};BJ.prototype.End=function(){return this.$val.End();};BK.ptr.prototype.End=function(){var a;a=this;return a.Body.End();};BK.prototype.End=function(){return this.$val.End();};BL.ptr.prototype.End=function(){var a;a=this;return a.Body.End();};BL.prototype.End=function(){return this.$val.End();};BM.ptr.prototype.End=function(){var a,b,c,d;a=this;b=a.Body.$length;if(b>0){return(c=a.Body,d=b-1>>0,((d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d])).End();}return a.Colon+1>>0;};BM.prototype.End=function(){return this.$val.End();};BN.ptr.prototype.End=function(){var a;a=this;return a.Body.End();};BN.prototype.End=function(){return this.$val.End();};BO.ptr.prototype.End=function(){var a;a=this;return a.Body.End();};BO.prototype.End=function(){return this.$val.End();};BP.ptr.prototype.End=function(){var a;a=this;return a.Body.End();};BP.prototype.End=function(){return this.$val.End();};BR.ptr.prototype.Pos=function(){var a;a=this;if(!(a.Name===ER.nil)){return a.Name.Pos();}return a.Path.Pos();};BR.prototype.Pos=function(){return this.$val.Pos();};BS.ptr.prototype.Pos=function(){var a,b;a=this;return(b=a.Names,((0<0||0>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+0])).Pos();};BS.prototype.Pos=function(){return this.$val.Pos();};BT.ptr.prototype.Pos=function(){var a;a=this;return a.Name.Pos();};BT.prototype.Pos=function(){return this.$val.Pos();};BR.ptr.prototype.End=function(){var a;a=this;if(!((a.EndPos===0))){return a.EndPos;}return a.Path.End();};BR.prototype.End=function(){return this.$val.End();};BS.ptr.prototype.End=function(){var a,b,c,d,e,f;a=this;b=a.Values.$length;if(b>0){return(c=a.Values,d=b-1>>0,((d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d])).End();}if(!($interfaceIsEqual(a.Type,$ifaceNil))){return a.Type.End();}return(e=a.Names,f=a.Names.$length-1>>0,((f<0||f>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f])).End();};BS.prototype.End=function(){return this.$val.End();};BT.ptr.prototype.End=function(){var a;a=this;return a.Type.End();};BT.prototype.End=function(){return this.$val.End();};BU.ptr.prototype.Pos=function(){var a;a=this;return a.From;};BU.prototype.Pos=function(){return this.$val.Pos();};BV.ptr.prototype.Pos=function(){var a;a=this;return a.TokPos;};BV.prototype.Pos=function(){return this.$val.Pos();};BW.ptr.prototype.Pos=function(){var a;a=this;return a.Type.Pos();};BW.prototype.Pos=function(){return this.$val.Pos();};BU.ptr.prototype.End=function(){var a;a=this;return a.To;};BU.prototype.End=function(){return this.$val.End();};BV.ptr.prototype.End=function(){var a,b;a=this;if(new A.Pos(a.Rparen).IsValid()){return a.Rparen+1>>0;}return(b=a.Specs,((0<0||0>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+0])).End();};BV.prototype.End=function(){return this.$val.End();};BW.ptr.prototype.End=function(){var a;a=this;if(!(a.Body===ES.nil)){return a.Body.End();}return a.Type.End();};BW.prototype.End=function(){return this.$val.End();};BX.ptr.prototype.Pos=function(){var a;a=this;return a.Package;};BX.prototype.Pos=function(){return this.$val.Pos();};BX.ptr.prototype.End=function(){var a,b,c,d;a=this;b=a.Decls.$length;if(b>0){return(c=a.Decls,d=b-1>>0,((d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d])).End();}return a.Name.End();};BX.prototype.End=function(){return this.$val.End();};BY.ptr.prototype.Pos=function(){var a;a=this;return 0;};BY.prototype.Pos=function(){return this.$val.Pos();};BY.ptr.prototype.End=function(){var a;a=this;return 0;};BY.prototype.End=function(){return this.$val.End();};DD=$pkg.SortImports=function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;c=b.Decls;d=0;while(true){if(!(d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]);f=$assertType(e,FM,true);g=f[0];h=f[1];if(!h||!((g.Tok===75))){break;}if(!new A.Pos(g.Lparen).IsValid()){d++;continue;}i=0;j=$subslice(g.Specs,0,0);k=g.Specs;l=0;while(true){if(!(l=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+l]);if(m>i&&a.Position(n.Pos()).Line>(1+a.Position((o=g.Specs,p=m-1>>0,((p<0||p>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+p])).End()).Line>>0)){j=$appendSlice(j,DJ(a,b,$subslice(g.Specs,i,m)));i=m;}l++;}j=$appendSlice(j,DJ(a,b,$subslice(g.Specs,i)));g.Specs=j;if(g.Specs.$length>0){s=(q=g.Specs,r=g.Specs.$length-1>>0,((r<0||r>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+r]));t=a.Position(s.Pos()).Line;u=a.Position(g.Rparen).Line;if(u>(t+1>>0)){a.File(g.Rparen).MergeLine(u-1>>0);}}d++;}};DE=function(a){var a,b,c,d;b=H.Unquote($assertType(a,FQ).Path.Value);c=b[0];d=b[1];if($interfaceIsEqual(d,$ifaceNil)){return c;}return"";};DF=function(a){var a,b;b=$assertType(a,FQ).Name;if(b===ER.nil){return"";}return b.Name;};DG=function(a){var a,b;b=$assertType(a,FQ).Comment;if(b===EM.nil){return"";}return b.Text();};DH=function(a,b){var a,b;if(!(DE(b)===DE(a))||!(DF(b)===DF(a))){return false;}return $assertType(a,FQ).Comment===EM.nil;};DJ=function(a,b,c){var a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;if(c.$length<=1){return c;}d=$makeSlice(FT,c.$length);e=c;f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);$copy(((g<0||g>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+g]),new DI.ptr(h.Pos(),h.End()),DI);f++;}j=a.Position((i=d.$length-1>>0,((i<0||i>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+i])).End).Line;k=b.Comments.$length;l=b.Comments.$length;m=b.Comments;n=0;while(true){if(!(n=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+n]);if(p.Pos()<((0<0||0>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+0]).Start){n++;continue;}if(oj){l=o;break;}n++;}q=$subslice(b.Comments,k,l);r=(s=new $Map(),s);u=0;v=q;w=0;while(true){if(!(w=v.$length)?$throwRuntimeError("index out of range"):v.$array[v.$offset+w]);while(true){if(!((u+1>>0)>0,((y<0||y>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+y])).Start<=x.Pos())){break;}u=u+(1)>>0;}z=$assertType(((u<0||u>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+u]),FQ);aa=z;(r||$throwRuntimeError("assignment to entry in nil map"))[aa.$key()]={k:aa,v:$append((ab=r[z.$key()],ab!==undefined?ab.v:ET.nil),x)};w++;}G.Sort($subslice(new DK(c.$array),c.$offset,c.$offset+c.$length));ac=$subslice(c,0,0);ad=c;ae=0;while(true){if(!(ae=ad.$length)?$throwRuntimeError("index out of range"):ad.$array[ad.$offset+ae]);if((af===(c.$length-1>>0))||!DH(ag,(ah=af+1>>0,((ah<0||ah>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+ah])))){ac=$append(ac,ag);}else{ai=ag.Pos();a.File(ai).MergeLine(a.Position(ai).Line);}ae++;}c=ac;aj=c;ak=0;while(true){if(!(ak=aj.$length)?$throwRuntimeError("index out of range"):aj.$array[aj.$offset+ak]);an=$assertType(am,FQ);if(!(an.Name===ER.nil)){an.Name.NamePos=((al<0||al>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+al]).Start;}an.Path.ValuePos=((al<0||al>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+al]).Start;an.EndPos=((al<0||al>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+al]).End;ao=(ap=r[an.$key()],ap!==undefined?ap.v:ET.nil);aq=0;while(true){if(!(aq=ao.$length)?$throwRuntimeError("index out of range"):ao.$array[ao.$offset+aq]);as=ar.List;at=0;while(true){if(!(at=as.$length)?$throwRuntimeError("index out of range"):as.$array[as.$offset+at]);au.Slash=((al<0||al>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+al]).End;at++;}aq++;}ak++;}G.Sort($subslice(new DL(q.$array),q.$offset,q.$offset+q.$length));return c;};DK.prototype.Len=function(){var a;a=this;return a.$length;};$ptrType(DK).prototype.Len=function(){return this.$get().Len();};DK.prototype.Swap=function(a,b){var a,b,c,d,e;c=this;d=((b<0||b>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+b]);e=((a<0||a>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a]);(a<0||a>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a]=d;(b<0||b>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+b]=e;};$ptrType(DK).prototype.Swap=function(a,b){return this.$get().Swap(a,b);};DK.prototype.Less=function(a,b){var a,b,c,d,e,f,g;c=this;d=DE(((a<0||a>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a]));e=DE(((b<0||b>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+b]));if(!(d===e)){return d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a]));g=DF(((b<0||b>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+b]));if(!(f===g)){return f=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a]))=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+b]));};$ptrType(DK).prototype.Less=function(a,b){return this.$get().Less(a,b);};DL.prototype.Len=function(){var a;a=this;return a.$length;};$ptrType(DL).prototype.Len=function(){return this.$get().Len();};DL.prototype.Swap=function(a,b){var a,b,c,d,e;c=this;d=((b<0||b>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+b]);e=((a<0||a>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a]);(a<0||a>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a]=d;(b<0||b>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+b]=e;};$ptrType(DL).prototype.Swap=function(a,b){return this.$get().Swap(a,b);};DL.prototype.Less=function(a,b){var a,b,c;c=this;return((a<0||a>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a]).Pos()<((b<0||b>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+b]).Pos();};$ptrType(DL).prototype.Less=function(a,b){return this.$get().Less(a,b);};DY=$pkg.NewScope=function(a){var a;return new DX.ptr(a,new $Map());};DX.ptr.prototype.Lookup=function(a){var a,b,c;b=this;return(c=b.Objects[a],c!==undefined?c.v:EQ.nil);};DX.prototype.Lookup=function(a){return this.$val.Lookup(a);};DX.ptr.prototype.Insert=function(a){var a,b=EQ.nil,c,d,e;c=this;b=(d=c.Objects[a.Name],d!==undefined?d.v:EQ.nil);if(b===EQ.nil){e=a.Name;(c.Objects||$throwRuntimeError("assignment to entry in nil map"))[e]={k:e,v:a};}return b;};DX.prototype.Insert=function(a){return this.$val.Insert(a);};DX.ptr.prototype.String=function(){var a,b,c,d,e,f,g;a=this;b=$clone(new E.Buffer.ptr(),E.Buffer);F.Fprintf(b,"scope %p {",new FA([a]));if(!(a===FV.nil)&&$keys(a.Objects).length>0){F.Fprintln(b,new FA([]));c=a.Objects;d=0;e=$keys(c);while(true){if(!(d=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);if(g.Name===b){return g.Pos();}f++;}}else if($assertType(d,FQ,true)[1]){c=d.$val;if(!(c.Name===ER.nil)&&c.Name.Name===b){return c.Name.Pos();}return c.Path.Pos();}else if($assertType(d,FK,true)[1]){c=d.$val;h=c.Names;i=0;while(true){if(!(i=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i]);if(j.Name===b){return j.Pos();}i++;}}else if($assertType(d,FL,true)[1]){c=d.$val;if(c.Name.Name===b){return c.Name.Pos();}}else if($assertType(d,FN,true)[1]){c=d.$val;if(c.Name.Name===b){return c.Name.Pos();}}else if($assertType(d,FW,true)[1]){c=d.$val;if(c.Label.Name===b){return c.Label.Pos();}}else if($assertType(d,FX,true)[1]){c=d.$val;k=c.Lhs;l=0;while(true){if(!(l=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+l]);n=$assertType(m,ER,true);o=n[0];p=n[1];if(p&&o.Name===b){return o.Pos();}l++;}}return 0;};DZ.prototype.Pos=function(){return this.$val.Pos();};EB.prototype.String=function(){var a;a=this.$val;return((a<0||a>=EC.length)?$throwRuntimeError("index out of range"):EC[a]);};$ptrType(EB).prototype.String=function(){return new EB(this.$get()).String();};EE=function(a,b){var a,b,c,d,e;c=b;d=0;while(true){if(!(d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]);EI(a,e);d++;}};EF=function(a,b){var a,b,c,d,e;c=b;d=0;while(true){if(!(d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]);EI(a,e);d++;}};EG=function(a,b){var a,b,c,d,e;c=b;d=0;while(true){if(!(d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]);EI(a,e);d++;}};EH=function(a,b){var a,b,c,d,e;c=b;d=0;while(true){if(!(d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]);EI(a,e);d++;}};EI=$pkg.Walk=function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;a=a.Visit(b);if($interfaceIsEqual(a,$ifaceNil)){return;}d=b;if($assertType(d,EV,true)[1]){c=d.$val;}else if($assertType(d,EM,true)[1]){c=d.$val;e=c.List;f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);EI(a,g);f++;}}else if($assertType(d,EZ,true)[1]){c=d.$val;if(!(c.Doc===EM.nil)){EI(a,c.Doc);}EE(a,c.Names);EI(a,c.Type);if(!(c.Tag===EO.nil)){EI(a,c.Tag);}if(!(c.Comment===EM.nil)){EI(a,c.Comment);}}else if($assertType(d,EP,true)[1]){c=d.$val;h=c.List;i=0;while(true){if(!(i=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i]);EI(a,j);i++;}}else if($assertType(d,FY,true)[1]||$assertType(d,ER,true)[1]||$assertType(d,EO,true)[1]){c=d;}else if($assertType(d,FZ,true)[1]){c=d.$val;if(!($interfaceIsEqual(c.Elt,$ifaceNil))){EI(a,c.Elt);}}else if($assertType(d,GA,true)[1]){c=d.$val;EI(a,c.Type);EI(a,c.Body);}else if($assertType(d,GB,true)[1]){c=d.$val;if(!($interfaceIsEqual(c.Type,$ifaceNil))){EI(a,c.Type);}EF(a,c.Elts);}else if($assertType(d,FD,true)[1]){c=d.$val;EI(a,c.X);}else if($assertType(d,FB,true)[1]){c=d.$val;EI(a,c.X);EI(a,c.Sel);}else if($assertType(d,GC,true)[1]){c=d.$val;EI(a,c.X);EI(a,c.Index);}else if($assertType(d,GD,true)[1]){c=d.$val;EI(a,c.X);if(!($interfaceIsEqual(c.Low,$ifaceNil))){EI(a,c.Low);}if(!($interfaceIsEqual(c.High,$ifaceNil))){EI(a,c.High);}if(!($interfaceIsEqual(c.Max,$ifaceNil))){EI(a,c.Max);}}else if($assertType(d,GE,true)[1]){c=d.$val;EI(a,c.X);if(!($interfaceIsEqual(c.Type,$ifaceNil))){EI(a,c.Type);}}else if($assertType(d,GF,true)[1]){c=d.$val;EI(a,c.Fun);EF(a,c.Args);}else if($assertType(d,FC,true)[1]){c=d.$val;EI(a,c.X);}else if($assertType(d,GG,true)[1]){c=d.$val;EI(a,c.X);}else if($assertType(d,GH,true)[1]){c=d.$val;EI(a,c.X);EI(a,c.Y);}else if($assertType(d,GI,true)[1]){c=d.$val;EI(a,c.Key);EI(a,c.Value);}else if($assertType(d,FE,true)[1]){c=d.$val;if(!($interfaceIsEqual(c.Len,$ifaceNil))){EI(a,c.Len);}EI(a,c.Elt);}else if($assertType(d,FF,true)[1]){c=d.$val;EI(a,c.Fields);}else if($assertType(d,FG,true)[1]){c=d.$val;if(!(c.Params===EP.nil)){EI(a,c.Params);}if(!(c.Results===EP.nil)){EI(a,c.Results);}}else if($assertType(d,FH,true)[1]){c=d.$val;EI(a,c.Methods);}else if($assertType(d,FI,true)[1]){c=d.$val;EI(a,c.Key);EI(a,c.Value);}else if($assertType(d,FJ,true)[1]){c=d.$val;EI(a,c.Value);}else if($assertType(d,GJ,true)[1]){c=d.$val;}else if($assertType(d,GK,true)[1]){c=d.$val;EI(a,c.Decl);}else if($assertType(d,GL,true)[1]){c=d.$val;}else if($assertType(d,FW,true)[1]){c=d.$val;EI(a,c.Label);EI(a,c.Stmt);}else if($assertType(d,GM,true)[1]){c=d.$val;EI(a,c.X);}else if($assertType(d,GN,true)[1]){c=d.$val;EI(a,c.Chan);EI(a,c.Value);}else if($assertType(d,GO,true)[1]){c=d.$val;EI(a,c.X);}else if($assertType(d,FX,true)[1]){c=d.$val;EF(a,c.Lhs);EF(a,c.Rhs);}else if($assertType(d,GP,true)[1]){c=d.$val;EI(a,c.Call);}else if($assertType(d,GQ,true)[1]){c=d.$val;EI(a,c.Call);}else if($assertType(d,GR,true)[1]){c=d.$val;EF(a,c.Results);}else if($assertType(d,GS,true)[1]){c=d.$val;if(!(c.Label===ER.nil)){EI(a,c.Label);}}else if($assertType(d,ES,true)[1]){c=d.$val;EG(a,c.List);}else if($assertType(d,GT,true)[1]){c=d.$val;if(!($interfaceIsEqual(c.Init,$ifaceNil))){EI(a,c.Init);}EI(a,c.Cond);EI(a,c.Body);if(!($interfaceIsEqual(c.Else,$ifaceNil))){EI(a,c.Else);}}else if($assertType(d,GU,true)[1]){c=d.$val;EF(a,c.List);EG(a,c.Body);}else if($assertType(d,GV,true)[1]){c=d.$val;if(!($interfaceIsEqual(c.Init,$ifaceNil))){EI(a,c.Init);}if(!($interfaceIsEqual(c.Tag,$ifaceNil))){EI(a,c.Tag);}EI(a,c.Body);}else if($assertType(d,GW,true)[1]){c=d.$val;if(!($interfaceIsEqual(c.Init,$ifaceNil))){EI(a,c.Init);}EI(a,c.Assign);EI(a,c.Body);}else if($assertType(d,GX,true)[1]){c=d.$val;if(!($interfaceIsEqual(c.Comm,$ifaceNil))){EI(a,c.Comm);}EG(a,c.Body);}else if($assertType(d,GY,true)[1]){c=d.$val;EI(a,c.Body);}else if($assertType(d,GZ,true)[1]){c=d.$val;if(!($interfaceIsEqual(c.Init,$ifaceNil))){EI(a,c.Init);}if(!($interfaceIsEqual(c.Cond,$ifaceNil))){EI(a,c.Cond);}if(!($interfaceIsEqual(c.Post,$ifaceNil))){EI(a,c.Post);}EI(a,c.Body);}else if($assertType(d,HA,true)[1]){c=d.$val;if(!($interfaceIsEqual(c.Key,$ifaceNil))){EI(a,c.Key);}if(!($interfaceIsEqual(c.Value,$ifaceNil))){EI(a,c.Value);}EI(a,c.X);EI(a,c.Body);}else if($assertType(d,FQ,true)[1]){c=d.$val;if(!(c.Doc===EM.nil)){EI(a,c.Doc);}if(!(c.Name===ER.nil)){EI(a,c.Name);}EI(a,c.Path);if(!(c.Comment===EM.nil)){EI(a,c.Comment);}}else if($assertType(d,FK,true)[1]){c=d.$val;if(!(c.Doc===EM.nil)){EI(a,c.Doc);}EE(a,c.Names);if(!($interfaceIsEqual(c.Type,$ifaceNil))){EI(a,c.Type);}EF(a,c.Values);if(!(c.Comment===EM.nil)){EI(a,c.Comment);}}else if($assertType(d,FL,true)[1]){c=d.$val;if(!(c.Doc===EM.nil)){EI(a,c.Doc);}EI(a,c.Name);EI(a,c.Type);if(!(c.Comment===EM.nil)){EI(a,c.Comment);}}else if($assertType(d,HB,true)[1]){c=d.$val;}else if($assertType(d,FM,true)[1]){c=d.$val;if(!(c.Doc===EM.nil)){EI(a,c.Doc);}k=c.Specs;l=0;while(true){if(!(l=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+l]);EI(a,m);l++;}}else if($assertType(d,FN,true)[1]){c=d.$val;if(!(c.Doc===EM.nil)){EI(a,c.Doc);}if(!(c.Recv===EP.nil)){EI(a,c.Recv);}EI(a,c.Name);EI(a,c.Type);if(!(c.Body===ES.nil)){EI(a,c.Body);}}else if($assertType(d,EY,true)[1]){c=d.$val;if(!(c.Doc===EM.nil)){EI(a,c.Doc);}EI(a,c.Name);EH(a,c.Decls);}else if($assertType(d,HC,true)[1]){c=d.$val;n=c.Files;o=0;p=$keys(n);while(true){if(!(o>>0)===0))){f=1;}g=(function(g,h){var g,h;new AV(function(){return this.$target.errors;},function($v){this.$target.errors=$v;},e).Add(g,h);});e.scanner.Init(e.file,c,g,f);e.mode=d;e.trace=!((((d&8)>>>0)===0));e.next();};S.prototype.init=function(a,b,c,d){return this.$val.init(a,b,c,d);};S.ptr.prototype.openScope=function(){var a;a=this;a.topScope=C.NewScope(a.topScope);};S.prototype.openScope=function(){return this.$val.openScope();};S.ptr.prototype.closeScope=function(){var a;a=this;a.topScope=a.topScope.Outer;};S.prototype.closeScope=function(){return this.$val.closeScope();};S.ptr.prototype.openLabelScope=function(){var a;a=this;a.labelScope=C.NewScope(a.labelScope);a.targetStack=$append(a.targetStack,AR.nil);};S.prototype.openLabelScope=function(){return this.$val.openLabelScope();};S.ptr.prototype.closeLabelScope=function(){var a,b,c,d,e,f,g;a=this;b=a.targetStack.$length-1>>0;c=a.labelScope;d=(e=a.targetStack,((b<0||b>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+b]));f=0;while(true){if(!(f=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+f]);g.Obj=c.Lookup(g.Name);if(g.Obj===AW.nil&&!((((a.mode&16)>>>0)===0))){a.error(g.Pos(),J.Sprintf("label %s undefined",new AX([new $String(g.Name)])));}f++;}a.targetStack=$subslice(a.targetStack,0,b);a.labelScope=a.labelScope.Outer;};S.prototype.closeLabelScope=function(){return this.$val.closeLabelScope();};S.ptr.prototype.declare=function(a,b,c,d,e){var a,b,c,d,e,f,g,h,i,j,k,l,m,n;f=this;g=e;h=0;while(true){if(!(h=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]);X(i.Obj===AW.nil,"identifier already declared or resolved");j=C.NewObj(d,i.Name);j.Decl=a;j.Data=b;i.Obj=j;if(!(i.Name==="_")){k=c.Insert(j);if(!(k===AW.nil)&&!((((f.mode&16)>>>0)===0))){l="";m=k.Pos();if(new D.Pos(m).IsValid()){l=J.Sprintf("\n\tprevious declaration at %s",new AX([(n=f.file.Position(m),new n.constructor.elem(n))]));}f.error(i.Pos(),J.Sprintf("%s redeclared in this block%s",new AX([new $String(i.Name),new $String(l)])));}}h++;}};S.prototype.declare=function(a,b,c,d,e){return this.$val.declare(a,b,c,d,e);};S.ptr.prototype.shortVarDecl=function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l;c=this;d=0;e=b;f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);h=$assertType(g,AM,true);i=h[0];j=h[1];if(j){X(i.Obj===AW.nil,"identifier already declared or resolved");k=C.NewObj(4,i.Name);k.Decl=a;i.Obj=k;if(!(i.Name==="_")){l=c.topScope.Insert(k);if(!(l===AW.nil)){i.Obj=l;}else{d=d+(1)>>0;}}}else{c.errorExpected(g.Pos(),"identifier on left side of :=");}f++;}if((d===0)&&!((((c.mode&16)>>>0)===0))){c.error(((0<0||0>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+0]).Pos(),"no new variables on left side of :=");}};S.prototype.shortVarDecl=function(a,b){return this.$val.shortVarDecl(a,b);};S.ptr.prototype.tryResolve=function(a,b){var a,b,c,d,e,f,g;c=this;d=$assertType(a,AM,true);e=d[0];if(e===AM.nil){return;}X(e.Obj===AW.nil,"identifier already declared or resolved");if(e.Name==="_"){return;}f=c.topScope;while(true){if(!(!(f===AO.nil))){break;}g=f.Lookup(e.Name);if(!(g===AW.nil)){e.Obj=g;return;}f=f.Outer;}if(b){e.Obj=T;c.unresolved=$append(c.unresolved,e);}};S.prototype.tryResolve=function(a,b){return this.$val.tryResolve(a,b);};S.ptr.prototype.resolve=function(a){var a,b;b=this;b.tryResolve(a,true);};S.prototype.resolve=function(a){return this.$val.resolve(a);};S.ptr.prototype.printTrace=function(a){var a,b,c,d;b=this;c=$clone(b.file.Position(b.pos),D.Position);J.Printf("%5d:%3d: ",new AX([new $Int(c.Line),new $Int(c.Column)]));d=2*b.indent>>0;while(true){if(!(d>64)){break;}J.Print(new AX([new $String(". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ")]));d=d-(64)>>0;}J.Print(new AX([new $String(". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ".substring(0,d))]));J.Println(a);};S.prototype.printTrace=function(a){return this.$val.printTrace(a);};U=function(a,b){var a,b;a.printTrace(new AX([new $String(b),new $String("(")]));a.indent=a.indent+(1)>>0;return a;};V=function(a){var a;a.indent=a.indent-(1)>>0;a.printTrace(new AX([new $String(")")]));};S.ptr.prototype.next0=function(){var a,b,c;a=this;if(a.trace&&new D.Pos(a.pos).IsValid()){b=new D.Token(a.tok).String();if(new D.Token(a.tok).IsLiteral()){a.printTrace(new AX([new $String(b),new $String(a.lit)]));}else if(new D.Token(a.tok).IsOperator()||new D.Token(a.tok).IsKeyword()){a.printTrace(new AX([new $String("\""+b+"\"")]));}else{a.printTrace(new AX([new $String(b)]));}}c=a.scanner.Scan();a.pos=c[0];a.tok=c[1];a.lit=c[2];};S.prototype.next0=function(){return this.$val.next0();};S.ptr.prototype.consumeComment=function(){var a=AY.nil,b=0,c,d;c=this;b=c.file.Line(c.pos);if(c.lit.charCodeAt(1)===42){d=0;while(true){if(!(d>0;}d=d+(1)>>0;}}a=new C.Comment.ptr(c.pos,c.lit);c.next0();return[a,b];};S.prototype.consumeComment=function(){return this.$val.consumeComment();};S.ptr.prototype.consumeCommentGroup=function(a){var a,b=AL.nil,c=0,d,e,f,g;d=this;e=AZ.nil;c=d.file.Line(d.pos);while(true){if(!((d.tok===2)&&d.file.Line(d.pos)<=(c+a>>0))){break;}f=AY.nil;g=d.consumeComment();f=g[0];c=g[1];e=$append(e,f);}b=new C.CommentGroup.ptr(e);d.comments=$append(d.comments,b);return[b,c];};S.prototype.consumeCommentGroup=function(a){return this.$val.consumeCommentGroup(a);};S.ptr.prototype.next=function(){var a,b,c,d,e,f;a=this;a.leadComment=AL.nil;a.lineComment=AL.nil;b=a.pos;a.next0();if(a.tok===2){c=AL.nil;d=0;if(a.file.Line(a.pos)===a.file.Line(b)){e=a.consumeCommentGroup(0);c=e[0];d=e[1];if(!((a.file.Line(a.pos)===d))){a.lineComment=c;}}d=-1;while(true){if(!(a.tok===2)){break;}f=a.consumeCommentGroup(1);c=f[0];d=f[1];}if((d+1>>0)===a.file.Line(a.pos)){a.leadComment=c;}}};S.prototype.next=function(){return this.$val.next();};S.ptr.prototype.error=function(a,b){var a,b,c,d,e,f,g,h;c=this;d=$clone(c.file.Position(a),D.Position);if(((c.mode&32)>>>0)===0){e=c.errors.$length;if(e>0&&((f=c.errors,g=e-1>>0,((g<0||g>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g])).Pos.Line===d.Line)){return;}if(e>10){$panic((h=new W.ptr(),new h.constructor.elem(h)));}}new AV(function(){return this.$target.errors;},function($v){this.$target.errors=$v;},c).Add(d,b);};S.prototype.error=function(a,b){return this.$val.error(a,b);};S.ptr.prototype.errorExpected=function(a,b){var a,b,c;c=this;b="expected "+b;if(a===c.pos){if((c.tok===57)&&c.lit==="\n"){b=b+(", found newline");}else{b=b+(", found '"+new D.Token(c.tok).String()+"'");if(new D.Token(c.tok).IsLiteral()){b=b+(" "+c.lit);}}}c.error(a,b);};S.prototype.errorExpected=function(a,b){return this.$val.errorExpected(a,b);};S.ptr.prototype.expect=function(a){var a,b,c;b=this;c=b.pos;if(!((b.tok===a))){b.errorExpected(c,"'"+new D.Token(a).String()+"'");}b.next();return c;};S.prototype.expect=function(a){return this.$val.expect(a);};S.ptr.prototype.expectClosing=function(a,b){var a,b,c;c=this;if(!((c.tok===a))&&(c.tok===57)&&c.lit==="\n"){c.error(c.pos,"missing ',' before newline in "+b);c.next();}return c.expect(a);};S.prototype.expectClosing=function(a,b){return this.$val.expectClosing(a,b);};S.ptr.prototype.expectSemi=function(){var a;a=this;if(!((a.tok===54))&&!((a.tok===56))){if(a.tok===57){a.next();}else{a.errorExpected(a.pos,"';'");Y(a);}}};S.prototype.expectSemi=function(){return this.$val.expectSemi();};S.ptr.prototype.atComma=function(a){var a,b;b=this;if(b.tok===52){return true;}if((b.tok===57)&&b.lit==="\n"){b.error(b.pos,"missing ',' before newline in "+a);return true;}return false;};S.prototype.atComma=function(a){return this.$val.atComma(a);};X=function(a,b){var a,b;if(!a){$panic(new $String("go/parser internal error: "+b));}};Y=function(a){var a,b;while(true){if(!(true)){break;}b=a.tok;if(b===61||b===64||b===65||b===67||b===69||b===70||b===72||b===73||b===74||b===80||b===81||b===83||b===84||b===85){if((a.pos===a.syncPos)&&a.syncCnt<10){a.syncCnt=a.syncCnt+(1)>>0;return;}if(a.pos>a.syncPos){a.syncPos=a.pos;a.syncCnt=0;return;}}else if(b===1){return;}a.next();}};Z=function(a){var a,b;while(true){if(!(true)){break;}b=a.tok;if(b===64||b===84||b===85){if((a.pos===a.syncPos)&&a.syncCnt<10){a.syncCnt=a.syncCnt+(1)>>0;return;}if(a.pos>a.syncPos){a.syncPos=a.pos;a.syncCnt=0;return;}}else if(b===1){return;}a.next();}};S.ptr.prototype.safePos=function(a){var $deferred=[],$err=null,a,b=0,c;try{$deferFrames.push($deferred);c=this;$deferred.push([(function(){if(!($interfaceIsEqual($recover(),$ifaceNil))){b=((c.file.Base()+c.file.Size()>>0)>>0);}}),[]]);c.file.Offset(a);b=a;return b;}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);return b;}};S.prototype.safePos=function(a){return this.$val.safePos(a);};S.ptr.prototype.parseIdent=function(){var a,b,c;a=this;b=a.pos;c="_";if(a.tok===4){c=a.lit;a.next();}else{a.expect(4);}return new C.Ident.ptr(b,c,AW.nil);};S.prototype.parseIdent=function(){return this.$val.parseIdent();};S.ptr.prototype.parseIdentList=function(){var $deferred=[],$err=null,a=AR.nil,b;try{$deferFrames.push($deferred);b=this;if(b.trace){$deferred.push([V,[U(b,"IdentList")]]);}a=$append(a,b.parseIdent());while(true){if(!(b.tok===52)){break;}b.next();a=$append(a,b.parseIdent());}return a;}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);return a;}};S.prototype.parseIdentList=function(){return this.$val.parseIdentList();};S.ptr.prototype.parseExprList=function(a){var $deferred=[],$err=null,a,b=BA.nil,c;try{$deferFrames.push($deferred);c=this;if(c.trace){$deferred.push([V,[U(c,"ExpressionList")]]);}b=$append(b,c.checkExpr(c.parseExpr(a)));while(true){if(!(c.tok===52)){break;}c.next();b=$append(b,c.checkExpr(c.parseExpr(a)));}return b;}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);return b;}};S.prototype.parseExprList=function(a){return this.$val.parseExprList(a);};S.ptr.prototype.parseLhsList=function(){var a,b,c,d,e,f,g;a=this;b=a.inRhs;a.inRhs=false;c=a.parseExprList(true);d=a.tok;if(d===47){}else if(d===58){}else{e=c;f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);a.resolve(g);f++;}}a.inRhs=b;return c;};S.prototype.parseLhsList=function(){return this.$val.parseLhsList();};S.ptr.prototype.parseRhsList=function(){var a,b,c;a=this;b=a.inRhs;a.inRhs=true;c=a.parseExprList(false);a.inRhs=b;return c;};S.prototype.parseRhsList=function(){return this.$val.parseRhsList();};S.ptr.prototype.parseType=function(){var $deferred=[],$err=null,a,b,c;try{$deferFrames.push($deferred);a=this;if(a.trace){$deferred.push([V,[U(a,"Type")]]);}b=a.tryType();if($interfaceIsEqual(b,$ifaceNil)){c=a.pos;a.errorExpected(c,"type");a.next();return new C.BadExpr.ptr(c,a.pos);}return b;}catch(err){$err=err;return $ifaceNil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseType=function(){return this.$val.parseType();};S.ptr.prototype.parseTypeName=function(){var $deferred=[],$err=null,a,b,c;try{$deferFrames.push($deferred);a=this;if(a.trace){$deferred.push([V,[U(a,"TypeName")]]);}b=a.parseIdent();if(a.tok===53){a.next();a.resolve(b);c=a.parseIdent();return new C.SelectorExpr.ptr(b,c);}return b;}catch(err){$err=err;return $ifaceNil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseTypeName=function(){return this.$val.parseTypeName();};S.ptr.prototype.parseArrayType=function(){var $deferred=[],$err=null,a,b,c,d;try{$deferFrames.push($deferred);a=this;if(a.trace){$deferred.push([V,[U(a,"ArrayType")]]);}b=a.expect(50);a.exprLev=a.exprLev+(1)>>0;c=$ifaceNil;if(a.tok===48){c=new C.Ellipsis.ptr(a.pos,$ifaceNil);a.next();}else if(!((a.tok===55))){c=a.parseRhs();}a.exprLev=a.exprLev-(1)>>0;a.expect(55);d=a.parseType();return new C.ArrayType.ptr(b,c,d);}catch(err){$err=err;return $ifaceNil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseArrayType=function(){return this.$val.parseArrayType();};S.ptr.prototype.makeIdentList=function(a){var a,b,c,d,e,f,g,h,i,j,k,l;b=this;c=$makeSlice(AR,a.$length);d=a;e=0;while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]);h=$assertType(g,AM,true);i=h[0];j=h[1];if(!j){k=$assertType(g,BB,true);l=k[1];if(!l){b.errorExpected(g.Pos(),"identifier");}i=new C.Ident.ptr(g.Pos(),"_",AW.nil);}(f<0||f>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+f]=i;e++;}return c;};S.prototype.makeIdentList=function(a){return this.$val.makeIdentList(a);};S.ptr.prototype.parseFieldDecl=function(a){var $deferred=[],$err=null,a,b,c,d,e,f,g,h,i,j,k,l;try{$deferFrames.push($deferred);b=this;if(b.trace){$deferred.push([V,[U(b,"FieldDecl")]]);}c=b.leadComment;d=b.parseVarList(false);e=d[0];f=d[1];g=BD.nil;if(b.tok===9){g=new C.BasicLit.ptr(b.pos,b.tok,b.lit);b.next();}h=AR.nil;if(!($interfaceIsEqual(f,$ifaceNil))){h=b.makeIdentList(e);}else{f=((0<0||0>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]);i=e.$length;if(i>1||!AA(AC(f))){j=f.Pos();b.errorExpected(j,"anonymous field");f=new C.BadExpr.ptr(j,b.safePos((k=i-1>>0,((k<0||k>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+k])).End()));}}b.expectSemi();l=new C.Field.ptr(c,h,f,g,b.lineComment);b.declare(l,$ifaceNil,a,4,h);b.resolve(f);return l;}catch(err){$err=err;return BC.nil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseFieldDecl=function(a){return this.$val.parseFieldDecl(a);};S.ptr.prototype.parseStructType=function(){var $deferred=[],$err=null,a,b,c,d,e,f;try{$deferFrames.push($deferred);a=this;if(a.trace){$deferred.push([V,[U(a,"StructType")]]);}b=a.expect(82);c=a.expect(51);d=C.NewScope(AO.nil);e=BF.nil;while(true){if(!((a.tok===4)||(a.tok===14)||(a.tok===49))){break;}e=$append(e,a.parseFieldDecl(d));}f=a.expect(56);return new C.StructType.ptr(b,new C.FieldList.ptr(c,e,f),false);}catch(err){$err=err;return BE.nil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseStructType=function(){return this.$val.parseStructType();};S.ptr.prototype.parsePointerType=function(){var $deferred=[],$err=null,a,b,c;try{$deferFrames.push($deferred);a=this;if(a.trace){$deferred.push([V,[U(a,"PointerType")]]);}b=a.expect(14);c=a.parseType();return new C.StarExpr.ptr(b,c);}catch(err){$err=err;return BH.nil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parsePointerType=function(){return this.$val.parsePointerType();};S.ptr.prototype.tryVarType=function(a){var a,b,c,d;b=this;if(a&&(b.tok===48)){c=b.pos;b.next();d=b.tryIdentOrType();if(!($interfaceIsEqual(d,$ifaceNil))){b.resolve(d);}else{b.error(c,"'...' parameter is missing type");d=new C.BadExpr.ptr(c,b.pos);}return new C.Ellipsis.ptr(c,d);}return b.tryIdentOrType();};S.prototype.tryVarType=function(a){return this.$val.tryVarType(a);};S.ptr.prototype.parseVarType=function(a){var a,b,c,d;b=this;c=b.tryVarType(a);if($interfaceIsEqual(c,$ifaceNil)){d=b.pos;b.errorExpected(d,"type");b.next();c=new C.BadExpr.ptr(d,b.pos);}return c;};S.prototype.parseVarType=function(a){return this.$val.parseVarType(a);};S.ptr.prototype.parseVarList=function(a){var $deferred=[],$err=null,a,b=BA.nil,c=$ifaceNil,d,e;try{$deferFrames.push($deferred);d=this;if(d.trace){$deferred.push([V,[U(d,"VarList")]]);}e=d.parseVarType(a);while(true){if(!(!($interfaceIsEqual(e,$ifaceNil)))){break;}b=$append(b,e);if(!((d.tok===52))){break;}d.next();e=d.tryVarType(a);}c=d.tryVarType(a);return[b,c];}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);return[b,c];}};S.prototype.parseVarList=function(a){return this.$val.parseVarList(a);};S.ptr.prototype.parseParameterList=function(a,b){var $deferred=[],$err=null,a,b,c=BF.nil,d,e,f,g,h,i,j,k,l,m,n,o,p;try{$deferFrames.push($deferred);d=this;if(d.trace){$deferred.push([V,[U(d,"ParameterList")]]);}e=d.parseVarList(b);f=e[0];g=e[1];if(!($interfaceIsEqual(g,$ifaceNil))){h=d.makeIdentList(f);i=new C.Field.ptr(AL.nil,h,g,BD.nil,AL.nil);c=$append(c,i);d.declare(i,$ifaceNil,a,4,h);d.resolve(g);if(!d.atComma("parameter list")){return c;}d.next();while(true){if(!(!((d.tok===54))&&!((d.tok===1)))){break;}j=d.parseIdentList();k=d.parseVarType(b);l=new C.Field.ptr(AL.nil,j,k,BD.nil,AL.nil);c=$append(c,l);d.declare(l,$ifaceNil,a,4,j);d.resolve(k);if(!d.atComma("parameter list")){break;}d.next();}return c;}c=$makeSlice(BF,f.$length);m=f;n=0;while(true){if(!(n=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+n]);d.resolve(p);(o<0||o>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+o]=new C.Field.ptr(AL.nil,AR.nil,p,BD.nil,AL.nil);n++;}return c;}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);return c;}};S.prototype.parseParameterList=function(a,b){return this.$val.parseParameterList(a,b);};S.ptr.prototype.parseParameters=function(a,b){var $deferred=[],$err=null,a,b,c,d,e,f;try{$deferFrames.push($deferred);c=this;if(c.trace){$deferred.push([V,[U(c,"Parameters")]]);}d=BF.nil;e=c.expect(49);if(!((c.tok===54))){d=c.parseParameterList(a,b);}f=c.expect(54);return new C.FieldList.ptr(e,d,f);}catch(err){$err=err;return BG.nil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseParameters=function(a,b){return this.$val.parseParameters(a,b);};S.ptr.prototype.parseResult=function(a){var $deferred=[],$err=null,a,b,c,d;try{$deferFrames.push($deferred);b=this;if(b.trace){$deferred.push([V,[U(b,"Result")]]);}if(b.tok===49){return b.parseParameters(a,false);}c=b.tryType();if(!($interfaceIsEqual(c,$ifaceNil))){d=$makeSlice(BF,1);(0<0||0>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+0]=new C.Field.ptr(AL.nil,AR.nil,c,BD.nil,AL.nil);return new C.FieldList.ptr(0,d,0);}return BG.nil;}catch(err){$err=err;return BG.nil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseResult=function(a){return this.$val.parseResult(a);};S.ptr.prototype.parseSignature=function(a){var $deferred=[],$err=null,a,b=BG.nil,c=BG.nil,d;try{$deferFrames.push($deferred);d=this;if(d.trace){$deferred.push([V,[U(d,"Signature")]]);}b=d.parseParameters(a,true);c=d.parseResult(a);return[b,c];}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);return[b,c];}};S.prototype.parseSignature=function(a){return this.$val.parseSignature(a);};S.ptr.prototype.parseFuncType=function(){var $deferred=[],$err=null,a,b,c,d,e,f;try{$deferFrames.push($deferred);a=this;if(a.trace){$deferred.push([V,[U(a,"FuncType")]]);}b=a.expect(71);c=C.NewScope(a.topScope);d=a.parseSignature(c);e=d[0];f=d[1];return[new C.FuncType.ptr(b,e,f),c];}catch(err){$err=err;return[BI.nil,AO.nil];}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseFuncType=function(){return this.$val.parseFuncType();};S.ptr.prototype.parseMethodSpec=function(a){var $deferred=[],$err=null,a,b,c,d,e,f,g,h,i,j,k,l,m,n;try{$deferFrames.push($deferred);b=this;if(b.trace){$deferred.push([V,[U(b,"MethodSpec")]]);}c=b.leadComment;d=AR.nil;e=$ifaceNil;f=b.parseTypeName();g=$assertType(f,AM,true);h=g[0];i=g[1];if(i&&(b.tok===49)){d=new AR([h]);j=C.NewScope(AO.nil);k=b.parseSignature(j);l=k[0];m=k[1];e=new C.FuncType.ptr(0,l,m);}else{e=f;b.resolve(e);}b.expectSemi();n=new C.Field.ptr(c,d,e,BD.nil,b.lineComment);b.declare(n,$ifaceNil,a,5,d);return n;}catch(err){$err=err;return BC.nil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseMethodSpec=function(a){return this.$val.parseMethodSpec(a);};S.ptr.prototype.parseInterfaceType=function(){var $deferred=[],$err=null,a,b,c,d,e,f;try{$deferFrames.push($deferred);a=this;if(a.trace){$deferred.push([V,[U(a,"InterfaceType")]]);}b=a.expect(76);c=a.expect(51);d=C.NewScope(AO.nil);e=BF.nil;while(true){if(!(a.tok===4)){break;}e=$append(e,a.parseMethodSpec(d));}f=a.expect(56);return new C.InterfaceType.ptr(b,new C.FieldList.ptr(c,e,f),false);}catch(err){$err=err;return BJ.nil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseInterfaceType=function(){return this.$val.parseInterfaceType();};S.ptr.prototype.parseMapType=function(){var $deferred=[],$err=null,a,b,c,d;try{$deferFrames.push($deferred);a=this;if(a.trace){$deferred.push([V,[U(a,"MapType")]]);}b=a.expect(77);a.expect(50);c=a.parseType();a.expect(55);d=a.parseType();return new C.MapType.ptr(b,c,d);}catch(err){$err=err;return BK.nil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseMapType=function(){return this.$val.parseMapType();};S.ptr.prototype.parseChanType=function(){var $deferred=[],$err=null,a,b,c,d,e;try{$deferFrames.push($deferred);a=this;if(a.trace){$deferred.push([V,[U(a,"ChanType")]]);}b=a.pos;c=3;d=0;if(a.tok===63){a.next();if(a.tok===36){d=a.pos;a.next();c=1;}}else{d=a.expect(36);a.expect(63);c=2;}e=a.parseType();return new C.ChanType.ptr(b,d,c,e);}catch(err){$err=err;return BL.nil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseChanType=function(){return this.$val.parseChanType();};S.ptr.prototype.tryIdentOrType=function(){var a,b,c,d,e,f,g;a=this;b=a.tok;if(b===4){return a.parseTypeName();}else if(b===50){return a.parseArrayType();}else if(b===82){return a.parseStructType();}else if(b===14){return a.parsePointerType();}else if(b===71){c=a.parseFuncType();d=c[0];return d;}else if(b===76){return a.parseInterfaceType();}else if(b===77){return a.parseMapType();}else if(b===63||b===36){return a.parseChanType();}else if(b===49){e=a.pos;a.next();f=a.parseType();g=a.expect(54);return new C.ParenExpr.ptr(e,f,g);}return $ifaceNil;};S.prototype.tryIdentOrType=function(){return this.$val.tryIdentOrType();};S.ptr.prototype.tryType=function(){var a,b;a=this;b=a.tryIdentOrType();if(!($interfaceIsEqual(b,$ifaceNil))){a.resolve(b);}return b;};S.prototype.tryType=function(){return this.$val.tryType();};S.ptr.prototype.parseStmtList=function(){var $deferred=[],$err=null,a=BM.nil,b;try{$deferFrames.push($deferred);b=this;if(b.trace){$deferred.push([V,[U(b,"StatementList")]]);}while(true){if(!(!((b.tok===62))&&!((b.tok===66))&&!((b.tok===56))&&!((b.tok===1)))){break;}a=$append(a,b.parseStmt());}return a;}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);return a;}};S.prototype.parseStmtList=function(){return this.$val.parseStmtList();};S.ptr.prototype.parseBody=function(a){var $deferred=[],$err=null,a,b,c,d,e;try{$deferFrames.push($deferred);b=this;if(b.trace){$deferred.push([V,[U(b,"Body")]]);}c=b.expect(51);b.topScope=a;b.openLabelScope();d=b.parseStmtList();b.closeLabelScope();b.closeScope();e=b.expect(56);return new C.BlockStmt.ptr(c,d,e);}catch(err){$err=err;return BN.nil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseBody=function(a){return this.$val.parseBody(a);};S.ptr.prototype.parseBlockStmt=function(){var $deferred=[],$err=null,a,b,c,d;try{$deferFrames.push($deferred);a=this;if(a.trace){$deferred.push([V,[U(a,"BlockStmt")]]);}b=a.expect(51);a.openScope();c=a.parseStmtList();a.closeScope();d=a.expect(56);return new C.BlockStmt.ptr(b,c,d);}catch(err){$err=err;return BN.nil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseBlockStmt=function(){return this.$val.parseBlockStmt();};S.ptr.prototype.parseFuncTypeOrLit=function(){var $deferred=[],$err=null,a,b,c,d,e;try{$deferFrames.push($deferred);a=this;if(a.trace){$deferred.push([V,[U(a,"FuncTypeOrLit")]]);}b=a.parseFuncType();c=b[0];d=b[1];if(!((a.tok===51))){return c;}a.exprLev=a.exprLev+(1)>>0;e=a.parseBody(d);a.exprLev=a.exprLev-(1)>>0;return new C.FuncLit.ptr(c,e);}catch(err){$err=err;return $ifaceNil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseFuncTypeOrLit=function(){return this.$val.parseFuncTypeOrLit();};S.ptr.prototype.parseOperand=function(a){var $deferred=[],$err=null,a,b,c,d,e,f,g,h,i,j,k,l;try{$deferFrames.push($deferred);b=this;if(b.trace){$deferred.push([V,[U(b,"Operand")]]);}c=b.tok;if(c===4){d=b.parseIdent();if(!a){b.resolve(d);}return d;}else if(c===5||c===6||c===7||c===8||c===9){e=new C.BasicLit.ptr(b.pos,b.tok,b.lit);b.next();return e;}else if(c===49){f=b.pos;b.next();b.exprLev=b.exprLev+(1)>>0;g=b.parseRhsOrType();b.exprLev=b.exprLev-(1)>>0;h=b.expect(54);return new C.ParenExpr.ptr(f,g,h);}else if(c===71){return b.parseFuncTypeOrLit();}i=b.tryIdentOrType();if(!($interfaceIsEqual(i,$ifaceNil))){j=$assertType(i,AM,true);k=j[1];X(!k,"type cannot be identifier");return i;}l=b.pos;b.errorExpected(l,"operand");Y(b);return new C.BadExpr.ptr(l,b.pos);}catch(err){$err=err;return $ifaceNil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseOperand=function(a){return this.$val.parseOperand(a);};S.ptr.prototype.parseSelector=function(a){var $deferred=[],$err=null,a,b,c;try{$deferFrames.push($deferred);b=this;if(b.trace){$deferred.push([V,[U(b,"Selector")]]);}c=b.parseIdent();return new C.SelectorExpr.ptr(a,c);}catch(err){$err=err;return $ifaceNil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseSelector=function(a){return this.$val.parseSelector(a);};S.ptr.prototype.parseTypeAssertion=function(a){var $deferred=[],$err=null,a,b,c,d,e;try{$deferFrames.push($deferred);b=this;if(b.trace){$deferred.push([V,[U(b,"TypeAssertion")]]);}c=b.expect(49);d=$ifaceNil;if(b.tok===84){b.next();}else{d=b.parseType();}e=b.expect(54);return new C.TypeAssertExpr.ptr(a,c,d,e);}catch(err){$err=err;return $ifaceNil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseTypeAssertion=function(a){return this.$val.parseTypeAssertion(a);};S.ptr.prototype.parseIndexOrSlice=function(a){var $deferred=[],$err=null,a,b,c,d,e,f,g,h;try{$deferFrames.push($deferred);b=this;if(b.trace){$deferred.push([V,[U(b,"IndexOrSlice")]]);}c=b.expect(50);b.exprLev=b.exprLev+(1)>>0;d=$clone(BO.zero(),BO);e=$clone(BP.zero(),BP);if(!((b.tok===58))){d[0]=b.parseRhs();}f=0;while(true){if(!((b.tok===58)&&f<2)){break;}(f<0||f>=e.length)?$throwRuntimeError("index out of range"):e[f]=b.pos;f=f+(1)>>0;b.next();if(!((b.tok===58))&&!((b.tok===55))&&!((b.tok===1))){(f<0||f>=d.length)?$throwRuntimeError("index out of range"):d[f]=b.parseRhs();}}b.exprLev=b.exprLev-(1)>>0;g=b.expect(55);if(f>0){h=false;if(f===2){h=true;if($interfaceIsEqual(d[1],$ifaceNil)){b.error(e[0],"2nd index required in 3-index slice");d[1]=new C.BadExpr.ptr(e[0]+1>>0,e[1]);}if($interfaceIsEqual(d[2],$ifaceNil)){b.error(e[1],"3rd index required in 3-index slice");d[2]=new C.BadExpr.ptr(e[1]+1>>0,g);}}return new C.SliceExpr.ptr(a,c,d[0],d[1],d[2],h,g);}return new C.IndexExpr.ptr(a,c,d[0],g);}catch(err){$err=err;return $ifaceNil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseIndexOrSlice=function(a){return this.$val.parseIndexOrSlice(a);};S.ptr.prototype.parseCallOrConversion=function(a){var $deferred=[],$err=null,a,b,c,d,e,f;try{$deferFrames.push($deferred);b=this;if(b.trace){$deferred.push([V,[U(b,"CallOrConversion")]]);}c=b.expect(49);b.exprLev=b.exprLev+(1)>>0;d=BA.nil;e=0;while(true){if(!(!((b.tok===54))&&!((b.tok===1))&&!new D.Pos(e).IsValid())){break;}d=$append(d,b.parseRhsOrType());if(b.tok===48){e=b.pos;b.next();}if(!b.atComma("argument list")){break;}b.next();}b.exprLev=b.exprLev-(1)>>0;f=b.expectClosing(54,"argument list");return new C.CallExpr.ptr(a,c,d,e,f);}catch(err){$err=err;return BQ.nil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseCallOrConversion=function(a){return this.$val.parseCallOrConversion(a);};S.ptr.prototype.parseElement=function(a){var $deferred=[],$err=null,a,b,c,d;try{$deferFrames.push($deferred);b=this;if(b.trace){$deferred.push([V,[U(b,"Element")]]);}if(b.tok===51){return b.parseLiteralValue($ifaceNil);}c=b.checkExpr(b.parseExpr(a));if(a){if(b.tok===58){d=b.pos;b.next();b.tryResolve(c,false);return new C.KeyValueExpr.ptr(c,d,b.parseElement(false));}b.resolve(c);}return c;}catch(err){$err=err;return $ifaceNil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseElement=function(a){return this.$val.parseElement(a);};S.ptr.prototype.parseElementList=function(){var $deferred=[],$err=null,a=BA.nil,b;try{$deferFrames.push($deferred);b=this;if(b.trace){$deferred.push([V,[U(b,"ElementList")]]);}while(true){if(!(!((b.tok===56))&&!((b.tok===1)))){break;}a=$append(a,b.parseElement(true));if(!b.atComma("composite literal")){break;}b.next();}return a;}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);return a;}};S.prototype.parseElementList=function(){return this.$val.parseElementList();};S.ptr.prototype.parseLiteralValue=function(a){var $deferred=[],$err=null,a,b,c,d,e;try{$deferFrames.push($deferred);b=this;if(b.trace){$deferred.push([V,[U(b,"LiteralValue")]]);}c=b.expect(51);d=BA.nil;b.exprLev=b.exprLev+(1)>>0;if(!((b.tok===56))){d=b.parseElementList();}b.exprLev=b.exprLev-(1)>>0;e=b.expectClosing(56,"composite literal");return new C.CompositeLit.ptr(a,c,d,e);}catch(err){$err=err;return $ifaceNil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseLiteralValue=function(a){return this.$val.parseLiteralValue(a);};S.ptr.prototype.checkExpr=function(a){var a,b,c;b=this;c=AD(a);if($assertType(c,BB,true)[1]){}else if($assertType(c,AM,true)[1]){}else if($assertType(c,BD,true)[1]){}else if($assertType(c,BR,true)[1]){}else if($assertType(c,BS,true)[1]){}else if($assertType(c,BT,true)[1]){$panic(new $String("unreachable"));}else if($assertType(c,BU,true)[1]){}else if($assertType(c,BV,true)[1]){}else if($assertType(c,BW,true)[1]){}else if($assertType(c,BX,true)[1]){}else if($assertType(c,BQ,true)[1]){}else if($assertType(c,BH,true)[1]){}else if($assertType(c,BY,true)[1]){}else if($assertType(c,BZ,true)[1]){}else{b.errorExpected(a.Pos(),"expression");a=new C.BadExpr.ptr(a.Pos(),b.safePos(a.End()));}return a;};S.prototype.checkExpr=function(a){return this.$val.checkExpr(a);};AA=function(a){var a,b,c,d,e;c=a;if($assertType(c,BB,true)[1]){b=c.$val;}else if($assertType(c,AM,true)[1]){b=c.$val;}else if($assertType(c,BU,true)[1]){b=c.$val;d=$assertType(b.X,AM,true);e=d[1];return e;}else{b=c;return false;}return true;};AB=function(a){var a,b,c,d,e;c=a;if($assertType(c,BB,true)[1]){b=c.$val;}else if($assertType(c,AM,true)[1]){b=c.$val;}else if($assertType(c,BU,true)[1]){b=c.$val;d=$assertType(b.X,AM,true);e=d[1];return e;}else if($assertType(c,CA,true)[1]){b=c.$val;}else if($assertType(c,BE,true)[1]){b=c.$val;}else if($assertType(c,BK,true)[1]){b=c.$val;}else{b=c;return false;}return true;};AC=function(a){var a,b,c,d;b=$assertType(a,BH,true);c=b[0];d=b[1];if(d){a=c.X;}return a;};AD=function(a){var a,b,c,d;b=$assertType(a,BT,true);c=b[0];d=b[1];if(d){a=AD(c.X);}return a;};S.ptr.prototype.checkExprOrType=function(a){var a,b,c,d,e,f,g;b=this;d=AD(a);if($assertType(d,BT,true)[1]){c=d.$val;$panic(new $String("unreachable"));}else if($assertType(d,BY,true)[1]){c=d.$val;}else if($assertType(d,CA,true)[1]){c=d.$val;e=$assertType(c.Len,CB,true);f=e[0];g=e[1];if(g){b.error(f.Pos(),"expected array length, found '...'");a=new C.BadExpr.ptr(a.Pos(),b.safePos(a.End()));}}return a;};S.prototype.checkExprOrType=function(a){return this.$val.checkExprOrType(a);};S.ptr.prototype.parsePrimaryExpr=function(a){var $deferred=[],$err=null,a,b,c,d,e,f;try{$deferFrames.push($deferred);b=this;if(b.trace){$deferred.push([V,[U(b,"PrimaryExpr")]]);}c=b.parseOperand(a);L:while(true){if(!(true)){break;}d=b.tok;if(d===53){b.next();if(a){b.resolve(c);}e=b.tok;if(e===4){c=b.parseSelector(b.checkExprOrType(c));}else if(e===49){c=b.parseTypeAssertion(b.checkExpr(c));}else{f=b.pos;b.errorExpected(f,"selector or type assertion");b.next();c=new C.BadExpr.ptr(f,b.pos);}}else if(d===50){if(a){b.resolve(c);}c=b.parseIndexOrSlice(b.checkExpr(c));}else if(d===49){if(a){b.resolve(c);}c=b.parseCallOrConversion(b.checkExprOrType(c));}else if(d===51){if(AB(c)&&(b.exprLev>=0||!AA(c))){if(a){b.resolve(c);}c=b.parseLiteralValue(c);}else{break L;}}else{break L;}a=false;}return c;}catch(err){$err=err;return $ifaceNil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parsePrimaryExpr=function(a){return this.$val.parsePrimaryExpr(a);};S.ptr.prototype.parseUnaryExpr=function(a){var $deferred=[],$err=null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;try{$deferFrames.push($deferred);b=this;if(b.trace){$deferred.push([V,[U(b,"UnaryExpr")]]);}c=b.tok;if(c===12||c===13||c===43||c===19||c===17){d=b.pos;e=b.tok;f=d;g=e;b.next();h=b.parseUnaryExpr(false);return new C.UnaryExpr.ptr(f,g,b.checkExpr(h));}else if(c===36){i=b.pos;b.next();j=b.parseUnaryExpr(false);k=$assertType(j,BL,true);l=k[0];m=k[1];if(m){n=1;while(true){if(!(m&&(n===1))){break;}if(l.Dir===2){b.errorExpected(l.Arrow,"'chan'");}o=l.Arrow;p=i;q=i;i=o;l.Begin=p;l.Arrow=q;r=l.Dir;s=2;n=r;l.Dir=s;t=$assertType(l.Value,BL,true);l=t[0];m=t[1];}if(n===1){b.errorExpected(i,"channel type");}return j;}return new C.UnaryExpr.ptr(i,36,b.checkExpr(j));}else if(c===14){u=b.pos;b.next();v=b.parseUnaryExpr(false);return new C.StarExpr.ptr(u,b.checkExprOrType(v));}return b.parsePrimaryExpr(a);}catch(err){$err=err;return $ifaceNil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseUnaryExpr=function(a){return this.$val.parseUnaryExpr(a);};S.ptr.prototype.tokPrec=function(){var a,b;a=this;b=a.tok;if(a.inRhs&&(b===42)){b=39;}return[b,new D.Token(b).Precedence()];};S.prototype.tokPrec=function(){return this.$val.tokPrec();};S.ptr.prototype.parseBinaryExpr=function(a,b){var $deferred=[],$err=null,a,b,c,d,e,f,g,h,i,j,k;try{$deferFrames.push($deferred);c=this;if(c.trace){$deferred.push([V,[U(c,"BinaryExpr")]]);}d=c.parseUnaryExpr(a);e=c.tokPrec();f=e[1];while(true){if(!(f>=b)){break;}while(true){if(!(true)){break;}g=c.tokPrec();h=g[0];i=g[1];if(!((i===f))){break;}j=c.expect(h);if(a){c.resolve(d);a=false;}k=c.parseBinaryExpr(false,f+1>>0);d=new C.BinaryExpr.ptr(c.checkExpr(d),j,h,c.checkExpr(k));}f=f-(1)>>0;}return d;}catch(err){$err=err;return $ifaceNil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseBinaryExpr=function(a,b){return this.$val.parseBinaryExpr(a,b);};S.ptr.prototype.parseExpr=function(a){var $deferred=[],$err=null,a,b;try{$deferFrames.push($deferred);b=this;if(b.trace){$deferred.push([V,[U(b,"Expression")]]);}return b.parseBinaryExpr(a,1);}catch(err){$err=err;return $ifaceNil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseExpr=function(a){return this.$val.parseExpr(a);};S.ptr.prototype.parseRhs=function(){var a,b,c;a=this;b=a.inRhs;a.inRhs=true;c=a.checkExpr(a.parseExpr(false));a.inRhs=b;return c;};S.prototype.parseRhs=function(){return this.$val.parseRhs();};S.ptr.prototype.parseRhsOrType=function(){var a,b,c;a=this;b=a.inRhs;a.inRhs=true;c=a.checkExprOrType(a.parseExpr(false));a.inRhs=b;return c;};S.prototype.parseRhsOrType=function(){return this.$val.parseRhsOrType();};S.ptr.prototype.parseSimpleStmt=function(a){var $deferred=[],$err=null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;try{$deferFrames.push($deferred);b=this;if(b.trace){$deferred.push([V,[U(b,"SimpleStmt")]]);}c=b.parseLhsList();d=b.tok;if(d===47||d===42||d===23||d===24||d===25||d===26||d===27||d===28||d===29||d===30||d===31||d===32||d===33){e=b.pos;f=b.tok;g=e;h=f;b.next();i=BA.nil;j=false;if((a===2)&&(b.tok===79)&&((h===47)||(h===42))){k=b.pos;b.next();i=new BA([new C.UnaryExpr.ptr(k,79,b.parseRhs())]);j=true;}else{i=b.parseRhsList();}l=new C.AssignStmt.ptr(c,g,h,i);if(h===47){b.shortVarDecl(l,c);}return[l,j];}if(c.$length>1){b.errorExpected(((0<0||0>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+0]).Pos(),"1 expression");}m=b.tok;if(m===58){n=b.pos;b.next();o=$assertType(((0<0||0>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+0]),AM,true);p=o[0];q=o[1];if((a===1)&&q){r=new C.LabeledStmt.ptr(p,n,b.parseStmt());b.declare(r,$ifaceNil,b.labelScope,6,new AR([p]));return[r,false];}b.error(n,"illegal label declaration");return[new C.BadStmt.ptr(((0<0||0>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+0]).Pos(),n+1>>0),false];}else if(m===36){s=b.pos;b.next();t=b.parseRhs();return[new C.SendStmt.ptr(((0<0||0>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+0]),s,t),false];}else if(m===37||m===38){u=new C.IncDecStmt.ptr(((0<0||0>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+0]),b.pos,b.tok);b.next();return[u,false];}return[new C.ExprStmt.ptr(((0<0||0>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+0])),false];}catch(err){$err=err;return[$ifaceNil,false];}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseSimpleStmt=function(a){return this.$val.parseSimpleStmt(a);};S.ptr.prototype.parseCallExpr=function(a){var a,b,c,d,e,f,g,h;b=this;c=b.parseRhsOrType();d=$assertType(c,BQ,true);e=d[0];f=d[1];if(f){return e;}g=$assertType(c,BB,true);h=g[1];if(!h){b.error(b.safePos(c.End()),J.Sprintf("function must be invoked in %s statement",new AX([new $String(a)])));}return BQ.nil;};S.prototype.parseCallExpr=function(a){return this.$val.parseCallExpr(a);};S.ptr.prototype.parseGoStmt=function(){var $deferred=[],$err=null,a,b,c;try{$deferFrames.push($deferred);a=this;if(a.trace){$deferred.push([V,[U(a,"GoStmt")]]);}b=a.expect(72);c=a.parseCallExpr("go");a.expectSemi();if(c===BQ.nil){return new C.BadStmt.ptr(b,b+2>>0);}return new C.GoStmt.ptr(b,c);}catch(err){$err=err;return $ifaceNil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseGoStmt=function(){return this.$val.parseGoStmt();};S.ptr.prototype.parseDeferStmt=function(){var $deferred=[],$err=null,a,b,c;try{$deferFrames.push($deferred);a=this;if(a.trace){$deferred.push([V,[U(a,"DeferStmt")]]);}b=a.expect(67);c=a.parseCallExpr("defer");a.expectSemi();if(c===BQ.nil){return new C.BadStmt.ptr(b,b+5>>0);}return new C.DeferStmt.ptr(b,c);}catch(err){$err=err;return $ifaceNil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseDeferStmt=function(){return this.$val.parseDeferStmt();};S.ptr.prototype.parseReturnStmt=function(){var $deferred=[],$err=null,a,b,c;try{$deferFrames.push($deferred);a=this;if(a.trace){$deferred.push([V,[U(a,"ReturnStmt")]]);}b=a.pos;a.expect(80);c=BA.nil;if(!((a.tok===57))&&!((a.tok===56))){c=a.parseRhsList();}a.expectSemi();return new C.ReturnStmt.ptr(b,c);}catch(err){$err=err;return CC.nil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseReturnStmt=function(){return this.$val.parseReturnStmt();};S.ptr.prototype.parseBranchStmt=function(a){var $deferred=[],$err=null,a,b,c,d,e,f,g;try{$deferFrames.push($deferred);b=this;if(b.trace){$deferred.push([V,[U(b,"BranchStmt")]]);}c=b.expect(a);d=AM.nil;if(!((a===69))&&(b.tok===4)){d=b.parseIdent();e=b.targetStack.$length-1>>0;(g=b.targetStack,(e<0||e>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+e]=$append((f=b.targetStack,((e<0||e>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+e])),d));}b.expectSemi();return new C.BranchStmt.ptr(c,a,d);}catch(err){$err=err;return CD.nil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseBranchStmt=function(a){return this.$val.parseBranchStmt(a);};S.ptr.prototype.makeExpr=function(a,b){var a,b,c,d,e,f;c=this;if($interfaceIsEqual(a,$ifaceNil)){return $ifaceNil;}d=$assertType(a,CE,true);e=d[0];f=d[1];if(f){return c.checkExpr(e.X);}c.error(a.Pos(),J.Sprintf("expected %s, found simple statement (missing parentheses around composite literal?)",new AX([new $String(b)])));return new C.BadExpr.ptr(a.Pos(),c.safePos(a.End()));};S.prototype.makeExpr=function(a,b){return this.$val.makeExpr(a,b);};S.ptr.prototype.parseIfStmt=function(){var $deferred=[],$err=null,a,b,c,d,e,f,g,h;try{$deferFrames.push($deferred);a=this;if(a.trace){$deferred.push([V,[U(a,"IfStmt")]]);}b=a.expect(74);a.openScope();$deferred.push([$methodVal(a,"closeScope"),[]]);c=$ifaceNil;d=$ifaceNil;e=a.exprLev;a.exprLev=-1;if(a.tok===57){a.next();d=a.parseRhs();}else{f=a.parseSimpleStmt(0);c=f[0];if(a.tok===57){a.next();d=a.parseRhs();}else{d=a.makeExpr(c,"boolean expression");c=$ifaceNil;}}a.exprLev=e;g=a.parseBlockStmt();h=$ifaceNil;if(a.tok===68){a.next();h=a.parseStmt();}else{a.expectSemi();}return new C.IfStmt.ptr(b,c,d,g,h);}catch(err){$err=err;return CF.nil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseIfStmt=function(){return this.$val.parseIfStmt();};S.ptr.prototype.parseTypeList=function(){var $deferred=[],$err=null,a=BA.nil,b;try{$deferFrames.push($deferred);b=this;if(b.trace){$deferred.push([V,[U(b,"TypeList")]]);}a=$append(a,b.parseType());while(true){if(!(b.tok===52)){break;}b.next();a=$append(a,b.parseType());}return a;}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);return a;}};S.prototype.parseTypeList=function(){return this.$val.parseTypeList();};S.ptr.prototype.parseCaseClause=function(a){var $deferred=[],$err=null,a,b,c,d,e,f;try{$deferFrames.push($deferred);b=this;if(b.trace){$deferred.push([V,[U(b,"CaseClause")]]);}c=b.pos;d=BA.nil;if(b.tok===62){b.next();if(a){d=b.parseTypeList();}else{d=b.parseRhsList();}}else{b.expect(66);}e=b.expect(58);b.openScope();f=b.parseStmtList();b.closeScope();return new C.CaseClause.ptr(c,d,e,f);}catch(err){$err=err;return CG.nil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseCaseClause=function(a){return this.$val.parseCaseClause(a);};AE=function(a){var a,b,c,d;b=$assertType(a,BX,true);c=b[0];d=b[1];return d&&$interfaceIsEqual(c.Type,$ifaceNil);};AF=function(a){var a,b,c,d;c=a;if($assertType(c,CE,true)[1]){b=c.$val;return AE(b.X);}else if($assertType(c,CH,true)[1]){b=c.$val;return(b.Lhs.$length===1)&&(b.Tok===47)&&(b.Rhs.$length===1)&&AE((d=b.Rhs,((0<0||0>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+0])));}return false;};S.ptr.prototype.parseSwitchStmt=function(){var $deferred=[],$err=null,a,b,c,d,e,f,g,h,i,j,k,l,m,n;try{$deferFrames.push($deferred);a=this;if(a.trace){$deferred.push([V,[U(a,"SwitchStmt")]]);}b=a.expect(83);a.openScope();$deferred.push([$methodVal(a,"closeScope"),[]]);c=$ifaceNil;d=$ifaceNil;e=c;f=d;if(!((a.tok===51))){g=a.exprLev;a.exprLev=-1;if(!((a.tok===57))){h=a.parseSimpleStmt(0);f=h[0];}if(a.tok===57){a.next();e=f;f=$ifaceNil;if(!((a.tok===51))){a.openScope();$deferred.push([$methodVal(a,"closeScope"),[]]);i=a.parseSimpleStmt(0);f=i[0];}}a.exprLev=g;}j=AF(f);k=a.expect(51);l=BM.nil;while(true){if(!((a.tok===62)||(a.tok===66))){break;}l=$append(l,a.parseCaseClause(j));}m=a.expect(56);a.expectSemi();n=new C.BlockStmt.ptr(k,l,m);if(j){return new C.TypeSwitchStmt.ptr(b,e,f,n);}return new C.SwitchStmt.ptr(b,e,a.makeExpr(f,"switch expression"),n);}catch(err){$err=err;return $ifaceNil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseSwitchStmt=function(){return this.$val.parseSwitchStmt();};S.ptr.prototype.parseCommClause=function(){var $deferred=[],$err=null,a,b,c,d,e,f,g,h,i,j,k,l;try{$deferFrames.push($deferred);a=this;if(a.trace){$deferred.push([V,[U(a,"CommClause")]]);}a.openScope();b=a.pos;c=$ifaceNil;if(a.tok===62){a.next();d=a.parseLhsList();if(a.tok===36){if(d.$length>1){a.errorExpected(((0<0||0>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+0]).Pos(),"1 expression");}e=a.pos;a.next();f=a.parseRhs();c=new C.SendStmt.ptr(((0<0||0>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+0]),e,f);}else{g=a.tok;if((g===42)||(g===47)){if(d.$length>2){a.errorExpected(((0<0||0>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+0]).Pos(),"1 or 2 expressions");d=$subslice(d,0,2);}h=a.pos;a.next();i=a.parseRhs();j=new C.AssignStmt.ptr(d,h,g,new BA([i]));if(g===47){a.shortVarDecl(j,d);}c=j;}else{if(d.$length>1){a.errorExpected(((0<0||0>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+0]).Pos(),"1 expression");}c=new C.ExprStmt.ptr(((0<0||0>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+0]));}}}else{a.expect(66);}k=a.expect(58);l=a.parseStmtList();a.closeScope();return new C.CommClause.ptr(b,c,k,l);}catch(err){$err=err;return CI.nil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseCommClause=function(){return this.$val.parseCommClause();};S.ptr.prototype.parseSelectStmt=function(){var $deferred=[],$err=null,a,b,c,d,e,f;try{$deferFrames.push($deferred);a=this;if(a.trace){$deferred.push([V,[U(a,"SelectStmt")]]);}b=a.expect(81);c=a.expect(51);d=BM.nil;while(true){if(!((a.tok===62)||(a.tok===66))){break;}d=$append(d,a.parseCommClause());}e=a.expect(56);a.expectSemi();f=new C.BlockStmt.ptr(c,d,e);return new C.SelectStmt.ptr(b,f);}catch(err){$err=err;return CJ.nil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseSelectStmt=function(){return this.$val.parseSelectStmt();};S.ptr.prototype.parseForStmt=function(){var $deferred=[],$err=null,a,aa,ab,ac,ad,ae,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;try{$deferFrames.push($deferred);a=this;if(a.trace){$deferred.push([V,[U(a,"ForStmt")]]);}b=a.expect(70);a.openScope();$deferred.push([$methodVal(a,"closeScope"),[]]);c=$ifaceNil;d=$ifaceNil;e=$ifaceNil;f=c;g=d;h=e;i=false;if(!((a.tok===51))){j=a.exprLev;a.exprLev=-1;if(!((a.tok===57))){if(a.tok===79){k=a.pos;a.next();l=new BA([new C.UnaryExpr.ptr(k,79,a.parseRhs())]);g=new C.AssignStmt.ptr(BA.nil,0,0,l);i=true;}else{m=a.parseSimpleStmt(2);g=m[0];i=m[1];}}if(!i&&(a.tok===57)){a.next();f=g;g=$ifaceNil;if(!((a.tok===57))){n=a.parseSimpleStmt(0);g=n[0];}a.expectSemi();if(!((a.tok===51))){o=a.parseSimpleStmt(0);h=o[0];}}a.exprLev=j;}p=a.parseBlockStmt();a.expectSemi();if(i){q=$assertType(g,CH);r=$ifaceNil;s=$ifaceNil;t=r;u=s;v=q.Lhs.$length;if(v===0){}else if(v===1){t=(w=q.Lhs,((0<0||0>=w.$length)?$throwRuntimeError("index out of range"):w.$array[w.$offset+0]));}else if(v===2){x=(y=q.Lhs,((0<0||0>=y.$length)?$throwRuntimeError("index out of range"):y.$array[y.$offset+0]));z=(aa=q.Lhs,((1<0||1>=aa.$length)?$throwRuntimeError("index out of range"):aa.$array[aa.$offset+1]));t=x;u=z;}else{a.errorExpected((ab=q.Lhs,ac=q.Lhs.$length-1>>0,((ac<0||ac>=ab.$length)?$throwRuntimeError("index out of range"):ab.$array[ab.$offset+ac])).Pos(),"at most 2 expressions");return new C.BadStmt.ptr(b,a.safePos(p.End()));}ae=$assertType((ad=q.Rhs,((0<0||0>=ad.$length)?$throwRuntimeError("index out of range"):ad.$array[ad.$offset+0])),BY).X;return new C.RangeStmt.ptr(b,t,u,q.TokPos,q.Tok,ae,p);}return new C.ForStmt.ptr(b,f,a.makeExpr(g,"boolean or range expression"),h,p);}catch(err){$err=err;return $ifaceNil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseForStmt=function(){return this.$val.parseForStmt();};S.ptr.prototype.parseStmt=function(){var $deferred=[],$err=null,a=$ifaceNil,b,c,d,e,f,g;try{$deferFrames.push($deferred);b=this;if(b.trace){$deferred.push([V,[U(b,"Statement")]]);}c=b.tok;if(c===64||c===84||c===85){a=new C.DeclStmt.ptr(b.parseDecl(Y));}else if(c===4||c===5||c===6||c===7||c===8||c===9||c===71||c===49||c===50||c===82||c===12||c===13||c===14||c===17||c===19||c===36||c===43){d=b.parseSimpleStmt(1);a=d[0];e=$assertType(a,CK,true);f=e[1];if(!f){b.expectSemi();}}else if(c===72){a=b.parseGoStmt();}else if(c===67){a=b.parseDeferStmt();}else if(c===80){a=b.parseReturnStmt();}else if(c===61||c===65||c===73||c===69){a=b.parseBranchStmt(b.tok);}else if(c===51){a=b.parseBlockStmt();b.expectSemi();}else if(c===74){a=b.parseIfStmt();}else if(c===83){a=b.parseSwitchStmt();}else if(c===81){a=b.parseSelectStmt();}else if(c===70){a=b.parseForStmt();}else if(c===57){a=new C.EmptyStmt.ptr(b.pos);b.next();}else if(c===56){a=new C.EmptyStmt.ptr(b.pos);}else{g=b.pos;b.errorExpected(g,"statement");Y(b);a=new C.BadStmt.ptr(g,b.pos);}return a;}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);return a;}};S.prototype.parseStmt=function(){return this.$val.parseStmt();};AH=function(a){var a,b,c,d,e,f,g;b=L.Unquote(a);c=b[0];d=c;e=0;while(true){if(!(e?[\\]^{|}`\xEF\xBF\xBD",g)){return false;}e+=f[1];}return!(c==="");};S.ptr.prototype.parseImportSpec=function(a,b,c){var $deferred=[],$err=null,a,b,c,d,e,f,g,h,i;try{$deferFrames.push($deferred);d=this;if(d.trace){$deferred.push([V,[U(d,"ImportSpec")]]);}e=AM.nil;f=d.tok;if(f===53){e=new C.Ident.ptr(d.pos,".",AW.nil);d.next();}else if(f===4){e=d.parseIdent();}g=d.pos;h="";if(d.tok===9){h=d.lit;if(!AH(h)){d.error(g,"invalid import path: "+h);}d.next();}else{d.expect(9);}d.expectSemi();i=new C.ImportSpec.ptr(a,e,new C.BasicLit.ptr(g,9,h),d.lineComment,0);d.imports=$append(d.imports,i);return i;}catch(err){$err=err;return $ifaceNil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseImportSpec=function(a,b,c){return this.$val.parseImportSpec(a,b,c);};S.ptr.prototype.parseValueSpec=function(a,b,c){var $deferred=[],$err=null,a,b,c,d,e,f,g,h,i;try{$deferFrames.push($deferred);d=this;if(d.trace){$deferred.push([V,[U(d,new D.Token(b).String()+"Spec")]]);}e=d.parseIdentList();f=d.tryType();g=BA.nil;if(d.tok===42){d.next();g=d.parseRhsList();}d.expectSemi();h=new C.ValueSpec.ptr(a,e,f,g,d.lineComment);i=2;if(b===85){i=4;}d.declare(h,new $Int(c),d.topScope,i,e);return h;}catch(err){$err=err;return $ifaceNil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseValueSpec=function(a,b,c){return this.$val.parseValueSpec(a,b,c);};S.ptr.prototype.parseTypeSpec=function(a,b,c){var $deferred=[],$err=null,a,b,c,d,e,f;try{$deferFrames.push($deferred);d=this;if(d.trace){$deferred.push([V,[U(d,"TypeSpec")]]);}e=d.parseIdent();f=new C.TypeSpec.ptr(a,e,$ifaceNil,AL.nil);d.declare(f,$ifaceNil,d.topScope,3,new AR([e]));f.Type=d.parseType();d.expectSemi();f.Comment=d.lineComment;return f;}catch(err){$err=err;return $ifaceNil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseTypeSpec=function(a,b,c){return this.$val.parseTypeSpec(a,b,c);};S.ptr.prototype.parseGenDecl=function(a,b){var $deferred=[],$err=null,a,b,c,d,e,f,g,h,i,j,k;try{$deferFrames.push($deferred);c=this;if(c.trace){$deferred.push([V,[U(c,"GenDecl("+new D.Token(a).String()+")")]]);}d=c.leadComment;e=c.expect(a);f=0;g=0;h=f;i=g;j=CM.nil;if(c.tok===49){h=c.pos;c.next();k=0;while(true){if(!(!((c.tok===54))&&!((c.tok===1)))){break;}j=$append(j,b(c.leadComment,a,k));k=k+(1)>>0;}i=c.expect(54);c.expectSemi();}else{j=$append(j,b(AL.nil,a,0));}return new C.GenDecl.ptr(d,e,a,h,j,i);}catch(err){$err=err;return CL.nil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseGenDecl=function(a,b){return this.$val.parseGenDecl(a,b);};S.ptr.prototype.parseFuncDecl=function(){var $deferred=[],$err=null,a,b,c,d,e,f,g,h,i,j,k;try{$deferFrames.push($deferred);a=this;if(a.trace){$deferred.push([V,[U(a,"FunctionDecl")]]);}b=a.leadComment;c=a.expect(71);d=C.NewScope(a.topScope);e=BG.nil;if(a.tok===49){e=a.parseParameters(d,false);}f=a.parseIdent();g=a.parseSignature(d);h=g[0];i=g[1];j=BN.nil;if(a.tok===51){j=a.parseBody(d);}a.expectSemi();k=new C.FuncDecl.ptr(b,e,f,new C.FuncType.ptr(c,h,i),j);if(e===BG.nil){if(!(f.Name==="init")){a.declare(k,$ifaceNil,a.pkgScope,5,new AR([f]));}}return k;}catch(err){$err=err;return CN.nil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseFuncDecl=function(){return this.$val.parseFuncDecl();};S.ptr.prototype.parseDecl=function(a){var $deferred=[],$err=null,a,b,c,d,e;try{$deferFrames.push($deferred);b=this;if(b.trace){$deferred.push([V,[U(b,"Declaration")]]);}c=$throwNilPointerError;d=b.tok;if(d===64||d===85){c=$methodVal(b,"parseValueSpec");}else if(d===84){c=$methodVal(b,"parseTypeSpec");}else if(d===71){return b.parseFuncDecl();}else{e=b.pos;b.errorExpected(e,"declaration");a(b);return new C.BadDecl.ptr(e,b.pos);}return b.parseGenDecl(b.tok,c);}catch(err){$err=err;return $ifaceNil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseDecl=function(a){return this.$val.parseDecl(a);};S.ptr.prototype.parseFile=function(){var $deferred=[],$err=null,a,b,c,d,e,f,g,h,i,j;try{$deferFrames.push($deferred);a=this;if(a.trace){$deferred.push([V,[U(a,"File")]]);}if(!((a.errors.Len()===0))){return AK.nil;}b=a.leadComment;c=a.expect(78);d=a.parseIdent();if(d.Name==="_"&&!((((a.mode&16)>>>0)===0))){a.error(a.pos,"invalid package name _");}a.expectSemi();if(!((a.errors.Len()===0))){return AK.nil;}a.openScope();a.pkgScope=a.topScope;e=AN.nil;if(((a.mode&1)>>>0)===0){while(true){if(!(a.tok===75)){break;}e=$append(e,a.parseGenDecl(75,$methodVal(a,"parseImportSpec")));}if(((a.mode&2)>>>0)===0){while(true){if(!(!((a.tok===1)))){break;}e=$append(e,a.parseDecl(Z));}}}a.closeScope();X(a.topScope===AO.nil,"unbalanced scopes");X(a.labelScope===AO.nil,"unbalanced label scopes");f=0;g=a.unresolved;h=0;while(true){if(!(h=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]);X(i.Obj===T,"object already resolved");i.Obj=a.pkgScope.Lookup(i.Name);if(i.Obj===AW.nil){(j=a.unresolved,(f<0||f>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+f]=i);f=f+(1)>>0;}h++;}return new C.File.ptr(b,c,d,e,a.pkgScope,a.imports,$subslice(a.unresolved,0,f),a.comments);}catch(err){$err=err;return AK.nil;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};S.prototype.parseFile=function(){return this.$val.parseFile();};CR.methods=[{prop:"init",name:"init",pkg:"go/parser",typ:$funcType([CQ,$String,AI,O],[],false)},{prop:"openScope",name:"openScope",pkg:"go/parser",typ:$funcType([],[],false)},{prop:"closeScope",name:"closeScope",pkg:"go/parser",typ:$funcType([],[],false)},{prop:"openLabelScope",name:"openLabelScope",pkg:"go/parser",typ:$funcType([],[],false)},{prop:"closeLabelScope",name:"closeLabelScope",pkg:"go/parser",typ:$funcType([],[],false)},{prop:"declare",name:"declare",pkg:"go/parser",typ:$funcType([$emptyInterface,$emptyInterface,AO,C.ObjKind,AR],[],true)},{prop:"shortVarDecl",name:"shortVarDecl",pkg:"go/parser",typ:$funcType([CH,BA],[],false)},{prop:"tryResolve",name:"tryResolve",pkg:"go/parser",typ:$funcType([C.Expr,$Bool],[],false)},{prop:"resolve",name:"resolve",pkg:"go/parser",typ:$funcType([C.Expr],[],false)},{prop:"printTrace",name:"printTrace",pkg:"go/parser",typ:$funcType([AX],[],true)},{prop:"next0",name:"next0",pkg:"go/parser",typ:$funcType([],[],false)},{prop:"consumeComment",name:"consumeComment",pkg:"go/parser",typ:$funcType([],[AY,$Int],false)},{prop:"consumeCommentGroup",name:"consumeCommentGroup",pkg:"go/parser",typ:$funcType([$Int],[AL,$Int],false)},{prop:"next",name:"next",pkg:"go/parser",typ:$funcType([],[],false)},{prop:"error",name:"error",pkg:"go/parser",typ:$funcType([D.Pos,$String],[],false)},{prop:"errorExpected",name:"errorExpected",pkg:"go/parser",typ:$funcType([D.Pos,$String],[],false)},{prop:"expect",name:"expect",pkg:"go/parser",typ:$funcType([D.Token],[D.Pos],false)},{prop:"expectClosing",name:"expectClosing",pkg:"go/parser",typ:$funcType([D.Token,$String],[D.Pos],false)},{prop:"expectSemi",name:"expectSemi",pkg:"go/parser",typ:$funcType([],[],false)},{prop:"atComma",name:"atComma",pkg:"go/parser",typ:$funcType([$String],[$Bool],false)},{prop:"safePos",name:"safePos",pkg:"go/parser",typ:$funcType([D.Pos],[D.Pos],false)},{prop:"parseIdent",name:"parseIdent",pkg:"go/parser",typ:$funcType([],[AM],false)},{prop:"parseIdentList",name:"parseIdentList",pkg:"go/parser",typ:$funcType([],[AR],false)},{prop:"parseExprList",name:"parseExprList",pkg:"go/parser",typ:$funcType([$Bool],[BA],false)},{prop:"parseLhsList",name:"parseLhsList",pkg:"go/parser",typ:$funcType([],[BA],false)},{prop:"parseRhsList",name:"parseRhsList",pkg:"go/parser",typ:$funcType([],[BA],false)},{prop:"parseType",name:"parseType",pkg:"go/parser",typ:$funcType([],[C.Expr],false)},{prop:"parseTypeName",name:"parseTypeName",pkg:"go/parser",typ:$funcType([],[C.Expr],false)},{prop:"parseArrayType",name:"parseArrayType",pkg:"go/parser",typ:$funcType([],[C.Expr],false)},{prop:"makeIdentList",name:"makeIdentList",pkg:"go/parser",typ:$funcType([BA],[AR],false)},{prop:"parseFieldDecl",name:"parseFieldDecl",pkg:"go/parser",typ:$funcType([AO],[BC],false)},{prop:"parseStructType",name:"parseStructType",pkg:"go/parser",typ:$funcType([],[BE],false)},{prop:"parsePointerType",name:"parsePointerType",pkg:"go/parser",typ:$funcType([],[BH],false)},{prop:"tryVarType",name:"tryVarType",pkg:"go/parser",typ:$funcType([$Bool],[C.Expr],false)},{prop:"parseVarType",name:"parseVarType",pkg:"go/parser",typ:$funcType([$Bool],[C.Expr],false)},{prop:"parseVarList",name:"parseVarList",pkg:"go/parser",typ:$funcType([$Bool],[BA,C.Expr],false)},{prop:"parseParameterList",name:"parseParameterList",pkg:"go/parser",typ:$funcType([AO,$Bool],[BF],false)},{prop:"parseParameters",name:"parseParameters",pkg:"go/parser",typ:$funcType([AO,$Bool],[BG],false)},{prop:"parseResult",name:"parseResult",pkg:"go/parser",typ:$funcType([AO],[BG],false)},{prop:"parseSignature",name:"parseSignature",pkg:"go/parser",typ:$funcType([AO],[BG,BG],false)},{prop:"parseFuncType",name:"parseFuncType",pkg:"go/parser",typ:$funcType([],[BI,AO],false)},{prop:"parseMethodSpec",name:"parseMethodSpec",pkg:"go/parser",typ:$funcType([AO],[BC],false)},{prop:"parseInterfaceType",name:"parseInterfaceType",pkg:"go/parser",typ:$funcType([],[BJ],false)},{prop:"parseMapType",name:"parseMapType",pkg:"go/parser",typ:$funcType([],[BK],false)},{prop:"parseChanType",name:"parseChanType",pkg:"go/parser",typ:$funcType([],[BL],false)},{prop:"tryIdentOrType",name:"tryIdentOrType",pkg:"go/parser",typ:$funcType([],[C.Expr],false)},{prop:"tryType",name:"tryType",pkg:"go/parser",typ:$funcType([],[C.Expr],false)},{prop:"parseStmtList",name:"parseStmtList",pkg:"go/parser",typ:$funcType([],[BM],false)},{prop:"parseBody",name:"parseBody",pkg:"go/parser",typ:$funcType([AO],[BN],false)},{prop:"parseBlockStmt",name:"parseBlockStmt",pkg:"go/parser",typ:$funcType([],[BN],false)},{prop:"parseFuncTypeOrLit",name:"parseFuncTypeOrLit",pkg:"go/parser",typ:$funcType([],[C.Expr],false)},{prop:"parseOperand",name:"parseOperand",pkg:"go/parser",typ:$funcType([$Bool],[C.Expr],false)},{prop:"parseSelector",name:"parseSelector",pkg:"go/parser",typ:$funcType([C.Expr],[C.Expr],false)},{prop:"parseTypeAssertion",name:"parseTypeAssertion",pkg:"go/parser",typ:$funcType([C.Expr],[C.Expr],false)},{prop:"parseIndexOrSlice",name:"parseIndexOrSlice",pkg:"go/parser",typ:$funcType([C.Expr],[C.Expr],false)},{prop:"parseCallOrConversion",name:"parseCallOrConversion",pkg:"go/parser",typ:$funcType([C.Expr],[BQ],false)},{prop:"parseElement",name:"parseElement",pkg:"go/parser",typ:$funcType([$Bool],[C.Expr],false)},{prop:"parseElementList",name:"parseElementList",pkg:"go/parser",typ:$funcType([],[BA],false)},{prop:"parseLiteralValue",name:"parseLiteralValue",pkg:"go/parser",typ:$funcType([C.Expr],[C.Expr],false)},{prop:"checkExpr",name:"checkExpr",pkg:"go/parser",typ:$funcType([C.Expr],[C.Expr],false)},{prop:"checkExprOrType",name:"checkExprOrType",pkg:"go/parser",typ:$funcType([C.Expr],[C.Expr],false)},{prop:"parsePrimaryExpr",name:"parsePrimaryExpr",pkg:"go/parser",typ:$funcType([$Bool],[C.Expr],false)},{prop:"parseUnaryExpr",name:"parseUnaryExpr",pkg:"go/parser",typ:$funcType([$Bool],[C.Expr],false)},{prop:"tokPrec",name:"tokPrec",pkg:"go/parser",typ:$funcType([],[D.Token,$Int],false)},{prop:"parseBinaryExpr",name:"parseBinaryExpr",pkg:"go/parser",typ:$funcType([$Bool,$Int],[C.Expr],false)},{prop:"parseExpr",name:"parseExpr",pkg:"go/parser",typ:$funcType([$Bool],[C.Expr],false)},{prop:"parseRhs",name:"parseRhs",pkg:"go/parser",typ:$funcType([],[C.Expr],false)},{prop:"parseRhsOrType",name:"parseRhsOrType",pkg:"go/parser",typ:$funcType([],[C.Expr],false)},{prop:"parseSimpleStmt",name:"parseSimpleStmt",pkg:"go/parser",typ:$funcType([$Int],[C.Stmt,$Bool],false)},{prop:"parseCallExpr",name:"parseCallExpr",pkg:"go/parser",typ:$funcType([$String],[BQ],false)},{prop:"parseGoStmt",name:"parseGoStmt",pkg:"go/parser",typ:$funcType([],[C.Stmt],false)},{prop:"parseDeferStmt",name:"parseDeferStmt",pkg:"go/parser",typ:$funcType([],[C.Stmt],false)},{prop:"parseReturnStmt",name:"parseReturnStmt",pkg:"go/parser",typ:$funcType([],[CC],false)},{prop:"parseBranchStmt",name:"parseBranchStmt",pkg:"go/parser",typ:$funcType([D.Token],[CD],false)},{prop:"makeExpr",name:"makeExpr",pkg:"go/parser",typ:$funcType([C.Stmt,$String],[C.Expr],false)},{prop:"parseIfStmt",name:"parseIfStmt",pkg:"go/parser",typ:$funcType([],[CF],false)},{prop:"parseTypeList",name:"parseTypeList",pkg:"go/parser",typ:$funcType([],[BA],false)},{prop:"parseCaseClause",name:"parseCaseClause",pkg:"go/parser",typ:$funcType([$Bool],[CG],false)},{prop:"parseSwitchStmt",name:"parseSwitchStmt",pkg:"go/parser",typ:$funcType([],[C.Stmt],false)},{prop:"parseCommClause",name:"parseCommClause",pkg:"go/parser",typ:$funcType([],[CI],false)},{prop:"parseSelectStmt",name:"parseSelectStmt",pkg:"go/parser",typ:$funcType([],[CJ],false)},{prop:"parseForStmt",name:"parseForStmt",pkg:"go/parser",typ:$funcType([],[C.Stmt],false)},{prop:"parseStmt",name:"parseStmt",pkg:"go/parser",typ:$funcType([],[C.Stmt],false)},{prop:"parseImportSpec",name:"parseImportSpec",pkg:"go/parser",typ:$funcType([AL,D.Token,$Int],[C.Spec],false)},{prop:"parseValueSpec",name:"parseValueSpec",pkg:"go/parser",typ:$funcType([AL,D.Token,$Int],[C.Spec],false)},{prop:"parseTypeSpec",name:"parseTypeSpec",pkg:"go/parser",typ:$funcType([AL,D.Token,$Int],[C.Spec],false)},{prop:"parseGenDecl",name:"parseGenDecl",pkg:"go/parser",typ:$funcType([D.Token,AG],[CL],false)},{prop:"parseFuncDecl",name:"parseFuncDecl",pkg:"go/parser",typ:$funcType([],[CN],false)},{prop:"parseDecl",name:"parseDecl",pkg:"go/parser",typ:$funcType([CS],[C.Decl],false)},{prop:"parseFile",name:"parseFile",pkg:"go/parser",typ:$funcType([],[AK],false)}];S.init([{prop:"file",name:"file",pkg:"go/parser",typ:CO,tag:""},{prop:"errors",name:"errors",pkg:"go/parser",typ:K.ErrorList,tag:""},{prop:"scanner",name:"scanner",pkg:"go/parser",typ:K.Scanner,tag:""},{prop:"mode",name:"mode",pkg:"go/parser",typ:O,tag:""},{prop:"trace",name:"trace",pkg:"go/parser",typ:$Bool,tag:""},{prop:"indent",name:"indent",pkg:"go/parser",typ:$Int,tag:""},{prop:"comments",name:"comments",pkg:"go/parser",typ:AS,tag:""},{prop:"leadComment",name:"leadComment",pkg:"go/parser",typ:AL,tag:""},{prop:"lineComment",name:"lineComment",pkg:"go/parser",typ:AL,tag:""},{prop:"pos",name:"pos",pkg:"go/parser",typ:D.Pos,tag:""},{prop:"tok",name:"tok",pkg:"go/parser",typ:D.Token,tag:""},{prop:"lit",name:"lit",pkg:"go/parser",typ:$String,tag:""},{prop:"syncPos",name:"syncPos",pkg:"go/parser",typ:D.Pos,tag:""},{prop:"syncCnt",name:"syncCnt",pkg:"go/parser",typ:$Int,tag:""},{prop:"exprLev",name:"exprLev",pkg:"go/parser",typ:$Int,tag:""},{prop:"inRhs",name:"inRhs",pkg:"go/parser",typ:$Bool,tag:""},{prop:"pkgScope",name:"pkgScope",pkg:"go/parser",typ:AO,tag:""},{prop:"topScope",name:"topScope",pkg:"go/parser",typ:AO,tag:""},{prop:"unresolved",name:"unresolved",pkg:"go/parser",typ:AR,tag:""},{prop:"imports",name:"imports",pkg:"go/parser",typ:AQ,tag:""},{prop:"labelScope",name:"labelScope",pkg:"go/parser",typ:AO,tag:""},{prop:"targetStack",name:"targetStack",pkg:"go/parser",typ:CP,tag:""}]);W.init([]);AG.init([AL,D.Token,$Int],[C.Spec],false);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_parser=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=J.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=K.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=6;case 6:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=7;case 7:if($r&&$r.$blocking){$r=$r();}$r=F.$init($BLOCKING);$s=8;case 8:if($r&&$r.$blocking){$r=$r();}$r=G.$init($BLOCKING);$s=9;case 9:if($r&&$r.$blocking){$r=$r();}$r=H.$init($BLOCKING);$s=10;case 10:if($r&&$r.$blocking){$r=$r();}$r=L.$init($BLOCKING);$s=11;case 11:if($r&&$r.$blocking){$r=$r();}$r=I.$init($BLOCKING);$s=12;case 12:if($r&&$r.$blocking){$r=$r();}$r=M.$init($BLOCKING);$s=13;case 13:if($r&&$r.$blocking){$r=$r();}T=new C.Object.ptr();}return;}};$init_parser.$blocking=true;return $init_parser;};return $pkg;})(); +$packages["text/tabwriter"]=(function(){var $pkg={},A,B,C,D,E,F,M,N,O,P,Q,R,S,T,G,H,I,K,J,L;A=$packages["bytes"];B=$packages["io"];C=$packages["unicode/utf8"];D=$pkg.cell=$newType(0,$kindStruct,"tabwriter.cell","cell","text/tabwriter",function(size_,width_,htab_){this.$val=this;this.size=size_!==undefined?size_:0;this.width=width_!==undefined?width_:0;this.htab=htab_!==undefined?htab_:false;});E=$pkg.Writer=$newType(0,$kindStruct,"tabwriter.Writer","Writer","text/tabwriter",function(output_,minwidth_,tabwidth_,padding_,padbytes_,flags_,buf_,pos_,cell_,endChar_,lines_,widths_){this.$val=this;this.output=output_!==undefined?output_:$ifaceNil;this.minwidth=minwidth_!==undefined?minwidth_:0;this.tabwidth=tabwidth_!==undefined?tabwidth_:0;this.padding=padding_!==undefined?padding_:0;this.padbytes=padbytes_!==undefined?padbytes_:Q.zero();this.flags=flags_!==undefined?flags_:0;this.buf=buf_!==undefined?buf_:new A.Buffer.ptr();this.pos=pos_!==undefined?pos_:0;this.cell=cell_!==undefined?cell_:new D.ptr();this.endChar=endChar_!==undefined?endChar_:0;this.lines=lines_!==undefined?lines_:R.nil;this.widths=widths_!==undefined?widths_:S.nil;});F=$pkg.osError=$newType(0,$kindStruct,"tabwriter.osError","osError","text/tabwriter",function(err_){this.$val=this;this.err=err_!==undefined?err_:$ifaceNil;});M=$sliceType($Uint8);N=$sliceType(D);O=$ptrType(N);P=$ptrType($error);Q=$arrayType($Uint8,8);R=$sliceType(N);S=$sliceType($Int);T=$ptrType(E);E.ptr.prototype.addLine=function(){var a;a=this;a.lines=$append(a.lines,new N([]));};E.prototype.addLine=function(){return this.$val.addLine();};E.ptr.prototype.reset=function(){var a;a=this;a.buf.Reset();a.pos=0;$copy(a.cell,new D.ptr(0,0,false),D);a.endChar=0;a.lines=$subslice(a.lines,0,0);a.widths=$subslice(a.widths,0,0);a.addLine();};E.prototype.reset=function(){return this.$val.reset();};E.ptr.prototype.Init=function(a,b,c,d,e,f){var a,b,c,d,e,f,g,h,i,j,k;g=this;if(b<0||c<0||d<0){$panic(new $String("negative minwidth, tabwidth, or padding"));}g.output=a;g.minwidth=b;g.tabwidth=c;g.padding=d;h=g.padbytes;i=0;while(true){if(!(i<8)){break;}j=i;(k=g.padbytes,(j<0||j>=k.length)?$throwRuntimeError("index out of range"):k[j]=e);i++;}if(e===9){f=f&~(4);}g.flags=f;g.reset();return g;};E.prototype.Init=function(a,b,c,d,e,f){return this.$val.Init(a,b,c,d,e,f);};E.ptr.prototype.write0=function(a){var a,b,c,d,e,f;b=this;c=b.output.Write(a);d=c[0];e=c[1];if(!((d===a.$length))&&$interfaceIsEqual(e,$ifaceNil)){e=B.ErrShortWrite;}if(!($interfaceIsEqual(e,$ifaceNil))){$panic((f=new F.ptr(e),new f.constructor.elem(f)));}};E.prototype.write0=function(a){return this.$val.write0(a);};E.ptr.prototype.writeN=function(a,b){var a,b,c;c=this;while(true){if(!(b>a.$length)){break;}c.write0(a);b=b-(a.$length)>>0;}c.write0($subslice(a,0,b));};E.prototype.writeN=function(a,b){return this.$val.writeN(a,b);};E.ptr.prototype.writePadding=function(a,b,c){var a,b,c,d,e,f,g;d=this;if((d.padbytes[0]===9)||c){if(d.tabwidth===0){return;}b=(e=(((b+d.tabwidth>>0)-1>>0))/d.tabwidth,(e===e&&e!==1/0&&e!==-1/0)?e>>0:$throwRuntimeError("integer divide by zero"))*d.tabwidth>>0;f=b-a>>0;if(f<0){$panic(new $String("internal error"));}d.writeN(H,(g=(((f+d.tabwidth>>0)-1>>0))/d.tabwidth,(g===g&&g!==1/0&&g!==-1/0)?g>>0:$throwRuntimeError("integer divide by zero")));return;}d.writeN($subslice(new M(d.padbytes),0),b-a>>0);};E.prototype.writePadding=function(a,b,c){return this.$val.writePadding(a,b,c);};E.ptr.prototype.writeLines=function(a,b,c){var a,b,c,d=0,e,f,g,h,i,j,k,l,m,n,o,p;e=this;d=a;f=b;while(true){if(!(f=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+f]));i=!((((e.flags&16)>>>0)===0));j=h;k=0;while(true){if(!(k=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+k]),D);if(l>0&&!((((e.flags&32)>>>0)===0))){e.write0(I);}if(m.size===0){if(l=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+l])),i);}}else{i=false;if(((e.flags&4)>>>0)===0){e.write0($subslice(e.buf.Bytes(),d,(d+m.size>>0)));d=d+(m.size)>>0;if(l=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+l])),false);}}else{if(l=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+l])),false);}e.write0($subslice(e.buf.Bytes(),d,(d+m.size>>0)));d=d+(m.size)>>0;}}k++;}if((f+1>>0)===e.lines.$length){e.write0($subslice(e.buf.Bytes(),d,(d+e.cell.size>>0)));d=d+(e.cell.size)>>0;}else{e.write0(G);}f=f+(1)>>0;}return d;};E.prototype.writeLines=function(a,b,c){return this.$val.writeLines(a,b,c);};E.ptr.prototype.format=function(a,b,c){var a,b,c,d=0,e,f,g,h,i,j,k,l,m,n;e=this;d=a;f=e.widths.$length;g=b;while(true){if(!(g=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+g]));if(f<(i.$length-1>>0)){d=e.writeLines(d,b,g);b=g;j=e.minwidth;k=true;while(true){if(!(g=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+g]));if(f<(i.$length-1>>0)){m=$clone(((f<0||f>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+f]),D);n=m.width+e.padding>>0;if(n>j){j=n;}if(m.width>0||m.htab){k=false;}}else{break;}g=g+(1)>>0;}if(k&&!((((e.flags&8)>>>0)===0))){j=0;}e.widths=$append(e.widths,j);d=e.format(d,b,g);e.widths=$subslice(e.widths,0,(e.widths.$length-1>>0));b=g;}g=g+(1)>>0;}d=e.writeLines(d,b,c);return d;};E.prototype.format=function(a,b,c){return this.$val.format(a,b,c);};E.ptr.prototype.append=function(a){var a,b;b=this;b.buf.Write(a);b.cell.size=b.cell.size+(a.$length)>>0;};E.prototype.append=function(a){return this.$val.append(a);};E.ptr.prototype.updateWidth=function(){var a;a=this;a.cell.width=a.cell.width+(C.RuneCount($subslice(a.buf.Bytes(),a.pos,a.buf.Len())))>>0;a.pos=a.buf.Len();};E.prototype.updateWidth=function(){return this.$val.updateWidth();};E.ptr.prototype.startEscape=function(a){var a,b,c;b=this;c=a;if(c===255){b.endChar=255;}else if(c===60){b.endChar=62;}else if(c===38){b.endChar=59;}};E.prototype.startEscape=function(a){return this.$val.startEscape(a);};E.ptr.prototype.endEscape=function(){var a,b;a=this;b=a.endChar;if(b===255){a.updateWidth();if(((a.flags&2)>>>0)===0){a.cell.width=a.cell.width-(2)>>0;}}else if(b===62){}else if(b===59){a.cell.width=a.cell.width+(1)>>0;}a.pos=a.buf.Len();a.endChar=0;};E.prototype.endEscape=function(){return this.$val.endEscape();};E.ptr.prototype.terminateCell=function(a){var a,b,c,d,e;b=this;b.cell.htab=a;e=new O(function(){return(d=b.lines.$length-1>>0,((d<0||d>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+d]));},function($v){(c=b.lines.$length-1>>0,(c<0||c>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+c]=$v);},b.lines);e.$set($append(e.$get(),b.cell));$copy(b.cell,new D.ptr(0,0,false),D);return e.$get().$length;};E.prototype.terminateCell=function(a){return this.$val.terminateCell(a);};J=function(a,b){var a,b,c,d,e,f;c=$recover();if(!($interfaceIsEqual(c,$ifaceNil))){d=$assertType(c,F,true);e=$clone(d[0],F);f=d[1];if(f){a.$set(e.err);return;}$panic(new $String("tabwriter: panic during "+b));}};E.ptr.prototype.Flush=function(){var $deferred=[],$err=null,a=$ifaceNil,b;try{$deferFrames.push($deferred);b=this;$deferred.push([$methodVal(b,"reset"),[]]);$deferred.push([J,[new P(function(){return a;},function($v){a=$v;}),"Flush"]]);if(b.cell.size>0){if(!((b.endChar===0))){b.endEscape();}b.terminateCell(false);}b.format(0,0,b.lines.$length);return a;}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);return a;}};E.prototype.Flush=function(){return this.$val.Flush();};E.ptr.prototype.Write=function(a){var $deferred=[],$err=null,a,b=0,c=$ifaceNil,d,e,f,g,h,i,j,k;try{$deferFrames.push($deferred);d=this;$deferred.push([J,[new P(function(){return c;},function($v){c=$v;}),"Write"]]);b=0;e=a;f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);if(d.endChar===0){i=h;if(i===9||i===11||i===10||i===12){d.append($subslice(a,b,g));d.updateWidth();b=g+1>>0;j=d.terminateCell(h===9);if((h===10)||(h===12)){d.addLine();if((h===12)||(j===1)){c=d.Flush();if(!($interfaceIsEqual(c,$ifaceNil))){return[b,c];}if((h===12)&&!((((d.flags&32)>>>0)===0))){d.write0(K);}}}}else if(i===255){d.append($subslice(a,b,g));d.updateWidth();b=g;if(!((((d.flags&2)>>>0)===0))){b=b+(1)>>0;}d.startEscape(255);}else if(i===60||i===38){if(!((((d.flags&1)>>>0)===0))){d.append($subslice(a,b,g));d.updateWidth();b=g;d.startEscape(h);}}}else{if(h===d.endChar){k=g+1>>0;if((h===255)&&!((((d.flags&2)>>>0)===0))){k=g;}d.append($subslice(a,b,k));b=g+1>>0;d.endEscape();}}f++;}d.append($subslice(a,b));b=a.$length;return[b,c];}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);return[b,c];}};E.prototype.Write=function(a){return this.$val.Write(a);};L=$pkg.NewWriter=function(a,b,c,d,e,f){var a,b,c,d,e,f;return new E.ptr().Init(a,b,c,d,e,f);};T.methods=[{prop:"addLine",name:"addLine",pkg:"text/tabwriter",typ:$funcType([],[],false)},{prop:"reset",name:"reset",pkg:"text/tabwriter",typ:$funcType([],[],false)},{prop:"Init",name:"Init",pkg:"",typ:$funcType([B.Writer,$Int,$Int,$Int,$Uint8,$Uint],[T],false)},{prop:"dump",name:"dump",pkg:"text/tabwriter",typ:$funcType([],[],false)},{prop:"write0",name:"write0",pkg:"text/tabwriter",typ:$funcType([M],[],false)},{prop:"writeN",name:"writeN",pkg:"text/tabwriter",typ:$funcType([M,$Int],[],false)},{prop:"writePadding",name:"writePadding",pkg:"text/tabwriter",typ:$funcType([$Int,$Int,$Bool],[],false)},{prop:"writeLines",name:"writeLines",pkg:"text/tabwriter",typ:$funcType([$Int,$Int,$Int],[$Int],false)},{prop:"format",name:"format",pkg:"text/tabwriter",typ:$funcType([$Int,$Int,$Int],[$Int],false)},{prop:"append",name:"append",pkg:"text/tabwriter",typ:$funcType([M],[],false)},{prop:"updateWidth",name:"updateWidth",pkg:"text/tabwriter",typ:$funcType([],[],false)},{prop:"startEscape",name:"startEscape",pkg:"text/tabwriter",typ:$funcType([$Uint8],[],false)},{prop:"endEscape",name:"endEscape",pkg:"text/tabwriter",typ:$funcType([],[],false)},{prop:"terminateCell",name:"terminateCell",pkg:"text/tabwriter",typ:$funcType([$Bool],[$Int],false)},{prop:"Flush",name:"Flush",pkg:"",typ:$funcType([],[$error],false)},{prop:"Write",name:"Write",pkg:"",typ:$funcType([M],[$Int,$error],false)}];D.init([{prop:"size",name:"size",pkg:"text/tabwriter",typ:$Int,tag:""},{prop:"width",name:"width",pkg:"text/tabwriter",typ:$Int,tag:""},{prop:"htab",name:"htab",pkg:"text/tabwriter",typ:$Bool,tag:""}]);E.init([{prop:"output",name:"output",pkg:"text/tabwriter",typ:B.Writer,tag:""},{prop:"minwidth",name:"minwidth",pkg:"text/tabwriter",typ:$Int,tag:""},{prop:"tabwidth",name:"tabwidth",pkg:"text/tabwriter",typ:$Int,tag:""},{prop:"padding",name:"padding",pkg:"text/tabwriter",typ:$Int,tag:""},{prop:"padbytes",name:"padbytes",pkg:"text/tabwriter",typ:Q,tag:""},{prop:"flags",name:"flags",pkg:"text/tabwriter",typ:$Uint,tag:""},{prop:"buf",name:"buf",pkg:"text/tabwriter",typ:A.Buffer,tag:""},{prop:"pos",name:"pos",pkg:"text/tabwriter",typ:$Int,tag:""},{prop:"cell",name:"cell",pkg:"text/tabwriter",typ:D,tag:""},{prop:"endChar",name:"endChar",pkg:"text/tabwriter",typ:$Uint8,tag:""},{prop:"lines",name:"lines",pkg:"text/tabwriter",typ:R,tag:""},{prop:"widths",name:"widths",pkg:"text/tabwriter",typ:S,tag:""}]);F.init([{prop:"err",name:"err",pkg:"text/tabwriter",typ:$error,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_tabwriter=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}G=new M([10]);H=new M($stringToBytes("\t\t\t\t\t\t\t\t"));I=new M([124]);K=new M($stringToBytes("---\n"));}return;}};$init_tabwriter.$blocking=true;return $init_tabwriter;};return $pkg;})(); +$packages["go/printer"]=(function(){var $pkg={},B,F,C,D,G,H,I,J,A,K,L,E,N,Z,AA,AB,AC,AK,AM,AN,AO,AQ,AR,AS,AT,AU,AV,AW,AX,AY,AZ,BA,BB,BC,BD,BE,BF,BG,BH,BI,BJ,BK,BL,BM,BN,BO,BP,BQ,BR,BS,BT,BU,BV,BW,BX,BY,BZ,CA,CB,CC,CD,CE,CF,CG,CH,CI,CJ,CK,CL,CM,CN,CO,CP,CQ,CR,CS,CT,CU,CV,CW,CX,CY,CZ,DA,DB,DC,DD,DE,DF,DG,DH,DI,DJ,DK,AL,O,P,Q,R,S,T,U,V,W,X,Y,AD,AE,AF,AG,AH,AI,AJ;B=$packages["bytes"];F=$packages["fmt"];C=$packages["go/ast"];D=$packages["go/token"];G=$packages["io"];H=$packages["os"];I=$packages["strconv"];J=$packages["strings"];A=$packages["testing"];K=$packages["text/tabwriter"];L=$packages["unicode"];E=$packages["unicode/utf8"];N=$pkg.exprListMode=$newType(4,$kindUint,"printer.exprListMode","exprListMode","go/printer",null);Z=$pkg.whiteSpace=$newType(1,$kindUint8,"printer.whiteSpace","whiteSpace","go/printer",null);AA=$pkg.pmode=$newType(4,$kindInt,"printer.pmode","pmode","go/printer",null);AB=$pkg.commentInfo=$newType(0,$kindStruct,"printer.commentInfo","commentInfo","go/printer",function(cindex_,comment_,commentOffset_,commentNewline_){this.$val=this;this.cindex=cindex_!==undefined?cindex_:0;this.comment=comment_!==undefined?comment_:AS.nil;this.commentOffset=commentOffset_!==undefined?commentOffset_:0;this.commentNewline=commentNewline_!==undefined?commentNewline_:false;});AC=$pkg.printer=$newType(0,$kindStruct,"printer.printer","printer","go/printer",function(Config_,fset_,output_,indent_,mode_,impliedSemi_,lastTok_,prevOpen_,wsbuf_,pos_,out_,last_,linePtr_,comments_,useNodeComments_,commentInfo_,nodeSizes_,cachedPos_,cachedLine_){this.$val=this;this.Config=Config_!==undefined?Config_:new AN.ptr();this.fset=fset_!==undefined?fset_:DF.nil;this.output=output_!==undefined?output_:AQ.nil;this.indent=indent_!==undefined?indent_:0;this.mode=mode_!==undefined?mode_:0;this.impliedSemi=impliedSemi_!==undefined?impliedSemi_:false;this.lastTok=lastTok_!==undefined?lastTok_:0;this.prevOpen=prevOpen_!==undefined?prevOpen_:0;this.wsbuf=wsbuf_!==undefined?wsbuf_:CY.nil;this.pos=pos_!==undefined?pos_:new D.Position.ptr();this.out=out_!==undefined?out_:new D.Position.ptr();this.last=last_!==undefined?last_:new D.Position.ptr();this.linePtr=linePtr_!==undefined?linePtr_:BC.nil;this.comments=comments_!==undefined?comments_:AT.nil;this.useNodeComments=useNodeComments_!==undefined?useNodeComments_:false;this.commentInfo=commentInfo_!==undefined?commentInfo_:new AB.ptr();this.nodeSizes=nodeSizes_!==undefined?nodeSizes_:false;this.cachedPos=cachedPos_!==undefined?cachedPos_:0;this.cachedLine=cachedLine_!==undefined?cachedLine_:0;});AK=$pkg.trimmer=$newType(0,$kindStruct,"printer.trimmer","trimmer","go/printer",function(output_,state_,space_){this.$val=this;this.output=output_!==undefined?output_:$ifaceNil;this.state=state_!==undefined?state_:0;this.space=space_!==undefined?space_:AQ.nil;});AM=$pkg.Mode=$newType(4,$kindUint,"printer.Mode","Mode","go/printer",null);AN=$pkg.Config=$newType(0,$kindStruct,"printer.Config","Config","go/printer",function(Mode_,Tabwidth_,Indent_){this.$val=this;this.Mode=Mode_!==undefined?Mode_:0;this.Tabwidth=Tabwidth_!==undefined?Tabwidth_:0;this.Indent=Indent_!==undefined?Indent_:0;});AO=$pkg.CommentedNode=$newType(0,$kindStruct,"printer.CommentedNode","CommentedNode","go/printer",function(Node_,Comments_){this.$val=this;this.Node=Node_!==undefined?Node_:$ifaceNil;this.Comments=Comments_!==undefined?Comments_:AT.nil;});AQ=$sliceType($Uint8);AR=$sliceType($emptyInterface);AS=$ptrType(C.CommentGroup);AT=$sliceType(AS);AU=$sliceType(C.Expr);AV=$ptrType(C.KeyValueExpr);AW=$ptrType(C.FieldList);AX=$ptrType(C.Ident);AY=$sliceType(AX);AZ=$ptrType(C.BasicLit);BA=$ptrType(C.Comment);BB=$sliceType(BA);BC=$ptrType($Int);BD=$ptrType(C.FuncType);BE=$ptrType(C.BinaryExpr);BF=$ptrType(C.StarExpr);BG=$ptrType(C.UnaryExpr);BH=$ptrType(C.BadExpr);BI=$ptrType(C.FuncLit);BJ=$ptrType(C.ParenExpr);BK=$ptrType(C.SelectorExpr);BL=$ptrType(C.TypeAssertExpr);BM=$ptrType(C.IndexExpr);BN=$ptrType(C.SliceExpr);BO=$ptrType(C.CallExpr);BP=$ptrType(C.CompositeLit);BQ=$ptrType(C.Ellipsis);BR=$ptrType(C.ArrayType);BS=$ptrType(C.StructType);BT=$ptrType(C.InterfaceType);BU=$ptrType(C.MapType);BV=$ptrType(C.ChanType);BW=$ptrType(C.EmptyStmt);BX=$ptrType(C.LabeledStmt);BY=$ptrType(C.BadStmt);BZ=$ptrType(C.DeclStmt);CA=$ptrType(C.ExprStmt);CB=$ptrType(C.SendStmt);CC=$ptrType(C.IncDecStmt);CD=$ptrType(C.AssignStmt);CE=$ptrType(C.GoStmt);CF=$ptrType(C.DeferStmt);CG=$ptrType(C.ReturnStmt);CH=$ptrType(C.BranchStmt);CI=$ptrType(C.BlockStmt);CJ=$ptrType(C.IfStmt);CK=$ptrType(C.CaseClause);CL=$ptrType(C.SwitchStmt);CM=$ptrType(C.TypeSwitchStmt);CN=$ptrType(C.CommClause);CO=$ptrType(C.SelectStmt);CP=$ptrType(C.ForStmt);CQ=$ptrType(C.RangeStmt);CR=$sliceType($Bool);CS=$ptrType(C.ValueSpec);CT=$ptrType(C.ImportSpec);CU=$ptrType(C.TypeSpec);CV=$ptrType(C.BadDecl);CW=$ptrType(C.GenDecl);CX=$ptrType(C.FuncDecl);CY=$sliceType(Z);CZ=$ptrType(C.Field);DA=$ptrType(C.File);DB=$ptrType(AO);DC=$sliceType(C.Stmt);DD=$sliceType(C.Decl);DE=$ptrType(K.Writer);DF=$ptrType(D.FileSet);DG=$sliceType(CZ);DH=$ptrType(AN);DI=$mapType(C.Node,$Int);DJ=$ptrType(AC);DK=$ptrType(AK);AC.ptr.prototype.linebreak=function(a,b,c,d){var a,b,c,d,e=false,f,g;f=this;g=AH(a-f.pos.Line>>0);if(g0){f.print(new AR([new Z(c)]));if(d){f.print(new AR([new Z(12)]));g=g-(1)>>0;}while(true){if(!(g>0)){break;}f.print(new AR([new Z(10)]));g=g-(1)>>0;}e=true;}return e;};AC.prototype.linebreak=function(a,b,c,d){return this.$val.linebreak(a,b,c,d);};AC.ptr.prototype.setComment=function(a){var a,b,c,d;b=this;if(a===AS.nil||!b.useNodeComments){return;}if(b.comments===AT.nil){b.comments=$makeSlice(AT,1);}else if(b.commentInfo.cindex=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+0])).Pos()),0);b.comments=$subslice(b.comments,0,1);b.internalError(new AR([new $String("setComment found pending comments")]));}(d=b.comments,(0<0||0>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+0]=a);b.commentInfo.cindex=0;if(b.commentInfo.commentOffset===1073741824){b.nextComment();}};AC.prototype.setComment=function(a){return this.$val.setComment(a);};AC.ptr.prototype.identList=function(a,b){var a,b,c,d,e,f,g,h,i;c=this;d=$makeSlice(AU,a.$length);e=a;f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);(g<0||g>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+g]=h;f++;}i=0;if(!b){i=2;}c.exprList(0,d,1,i,0);};AC.prototype.identList=function(a,b){return this.$val.identList(a,b);};AC.ptr.prototype.exprList=function(a,b,c,d,e){var a,aa,ab,ac,ad,ae,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;f=this;if(b.$length===0){return;}g=$clone(f.posFor(a),D.Position);h=$clone(f.posFor(e),D.Position);i=f.lineFor(((0<0||0>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+0]).Pos());k=f.lineFor((j=b.$length-1>>0,((j<0||j>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+j])).End());if(g.IsValid()&&(g.Line===i)&&(i===k)){l=b;m=0;while(true){if(!(m=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+m]);if(n>0){f.print(new AR([new D.Pos(o.Pos()),new D.Token(52),new Z(32)]));}f.expr0(o,c);m++;}return;}p=0;if(((d&2)>>>0)===0){p=62;}q=-1;if(g.IsValid()&&g.Line=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+u]);i=f.lineFor(w.Pos());x=true;y=r;r=f.nodeSize(w,1000000);z=$assertType(w,AV,true);aa=z[0];ab=z[1];if(r<=1000000&&g.IsValid()&&h.IsValid()){if(ab){r=f.nodeSize(aa.Key,1000000);}}else{r=0;}if(y>0&&r>0){if(y<=20&&r<=20){x=false;}else{ac=r/y;x=ac<=0.25||4<=ac;}}ad=00){if(!ad){f.print(new AR([new D.Pos(w.Pos())]));}f.print(new AR([new D.Token(52)]));ae=true;if(ad){if(f.linebreak(i,0,p,x||(q+1>>0)1&&ab&&r>0&&ad){f.expr(aa.Key);f.print(new AR([new D.Pos(aa.Colon),new D.Token(58),new Z(11)]));f.expr(aa.Value);}else{f.expr0(w,c);}s=i;u++;}if(!((((d&1)>>>0)===0))&&h.IsValid()&&f.pos.Line>>0)===0)){f.print(new AR([new Z(60)]));}f.print(new AR([new Z(12)]));return;}if((p===0)&&(((d&2)>>>0)===0)){f.print(new AR([new Z(60)]));}};AC.prototype.exprList=function(a,b,c,d,e){return this.$val.exprList(a,b,c,d,e);};AC.ptr.prototype.parameters=function(a){var a,b,c,d,e,f,g,h,i,j,k,l,m;b=this;b.print(new AR([new D.Pos(a.Opening),new D.Token(49)]));if(a.List.$length>0){c=b.lineFor(a.Opening);d=62;e=a.List;f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);i=0;if(h.Names.$length>0){i=b.lineFor((j=h.Names,((0<0||0>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+0])).Pos());}else{i=b.lineFor(h.Type.Pos());}k=b.lineFor(h.Type.End());l=00){if(!l){b.print(new AR([new D.Pos(h.Pos())]));}b.print(new AR([new D.Token(52)]));}if(l&&b.linebreak(i,0,d,true)){d=0;}else if(g>0){b.print(new AR([new Z(32)]));}if(h.Names.$length>0){b.identList(h.Names,d===62);b.print(new AR([new Z(32)]));}b.expr(W(h.Type));c=k;f++;}m=b.lineFor(a.Closing);if(00){c.print(new AR([new Z(32)]));if((d===1)&&(e=b.List,((0<0||0>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+0])).Names===AY.nil){c.expr(W((f=b.List,((0<0||0>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+0])).Type));return;}c.parameters(b);}};AC.prototype.signature=function(a,b){return this.$val.signature(a,b);};O=function(a,b){var a,b,c=0,d,e,f,g;d=a;e=0;while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]);if(f>0){c=c+(2)>>0;}c=c+(E.RuneCountInString(g.Name))>>0;if(c>=b){break;}e++;}return c;};AC.ptr.prototype.isOneLineFieldList=function(a){var a,b,c,d,e;b=this;if(!((a.$length===1))){return false;}c=((0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]);if(!(c.Tag===AZ.nil)||!(c.Comment===AS.nil)){return false;}d=O(c.Names,30);if(d>0){d=1;}e=b.nodeSize(c.Type,30);return(d+e>>0)<=30;};AC.prototype.isOneLineFieldList=function(a){return this.$val.isOneLineFieldList(a);};AC.ptr.prototype.setLineComment=function(a){var a,b;b=this;b.setComment(new C.CommentGroup.ptr(new BB([new C.Comment.ptr(0,a)])));};AC.prototype.setLineComment=function(a){return this.$val.setLineComment(a);};AC.ptr.prototype.fieldList=function(a,b,c){var a,aa,ab,ac,ad,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;d=this;e=a.Opening;f=a.List;g=a.Closing;h=c||d.commentBefore(d.posFor(g));i=new D.Pos(e).IsValid()&&new D.Pos(g).IsValid()&&(d.lineFor(e)===d.lineFor(g));if(!h&&i){if(f.$length===0){d.print(new AR([new D.Pos(e),new D.Token(51),new D.Pos(g),new D.Token(56)]));return;}else if(b&&d.isOneLineFieldList(f)){d.print(new AR([new D.Pos(e),new D.Token(51),new Z(32)]));j=((0<0||0>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+0]);k=j.Names;l=0;while(true){if(!(l=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+l]);if(m>0){d.print(new AR([new D.Token(52),new Z(32)]));}d.expr(n);l++;}if(j.Names.$length>0){d.print(new AR([new Z(32)]));}d.expr(j.Type);d.print(new AR([new Z(32),new D.Pos(g),new D.Token(56)]));return;}}d.print(new AR([new Z(32),new D.Pos(e),new D.Token(51),new Z(62)]));if(h||f.$length>0){d.print(new AR([new Z(12)]));}if(b){o=11;if(f.$length===1){o=32;}p=0;q=f;r=0;while(true){if(!(r=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+r]);if(s>0){d.linebreak(d.lineFor(t.Pos()),1,0,d.linesFrom(p)>0);}u=0;d.setComment(t.Doc);d.recordLine(new BC(function(){return p;},function($v){p=$v;}));if(t.Names.$length>0){d.identList(t.Names,false);d.print(new AR([new Z(o)]));d.expr(t.Type);u=1;}else{d.expr(t.Type);u=2;}if(!(t.Tag===AZ.nil)){if(t.Names.$length>0&&(o===11)){d.print(new AR([new Z(o)]));}d.print(new AR([new Z(o)]));d.expr(t.Tag);u=0;}if(!(t.Comment===AS.nil)){while(true){if(!(u>0)){break;}d.print(new AR([new Z(o)]));u=u-(1)>>0;}d.setComment(t.Comment);}r++;}if(c){if(f.$length>0){d.print(new AR([new Z(12)]));}d.flush(d.posFor(g),56);d.setLineComment("// contains filtered or unexported fields");}}else{v=0;w=f;x=0;while(true){if(!(x=w.$length)?$throwRuntimeError("index out of range"):w.$array[w.$offset+x]);if(y>0){d.linebreak(d.lineFor(z.Pos()),1,0,d.linesFrom(v)>0);}d.setComment(z.Doc);d.recordLine(new BC(function(){return v;},function($v){v=$v;}));aa=$assertType(z.Type,BD,true);ab=aa[0];ac=aa[1];if(ac){d.expr((ad=z.Names,((0<0||0>=ad.$length)?$throwRuntimeError("index out of range"):ad.$array[ad.$offset+0])));d.signature(ab.Params,ab.Results);}else{d.expr(z.Type);}d.setComment(z.Comment);x++;}if(c){if(f.$length>0){d.print(new AR([new Z(12)]));}d.flush(d.posFor(g),56);d.setLineComment("// contains filtered or unexported methods");}}d.print(new AR([new Z(60),new Z(12),new D.Pos(g),new D.Token(56)]));};AC.prototype.fieldList=function(a,b,c){return this.$val.fieldList(a,b,c);};P=function(a){var a,b=false,c=false,d=0,e,f,g,h,i,j,k,l,m,n,o,p,q,r;e=new D.Token(a.Op).Precedence();if(e===4){b=true;}else if(e===5){c=true;}g=a.X;switch(0){default:if($assertType(g,BE,true)[1]){f=g.$val;if(new D.Token(f.Op).Precedence()0){return f+1>>0;}if(d&&e){if(b===1){return 5;}return 4;}if(b===1){return 6;}return 4;};R=function(a,b){var a,b,c,d,e;c=$assertType(a,BE,true);d=c[0];e=c[1];if(!e||!((b===new D.Token(d.Op).Precedence()))){return 1;}return 0;};S=function(a){var a;a=a-(1)>>0;if(a<1){a=1;}return a;};AC.ptr.prototype.binaryExpr=function(a,b,c,d){var a,b,c,d,e,f,g,h,i,j;e=this;f=new D.Token(a.Op).Precedence();if(f>0);if(g){e.print(new AR([new Z(32)]));}i=e.pos.Line;j=e.lineFor(a.Y.Pos());e.print(new AR([new D.Pos(a.OpPos),new D.Token(a.Op)]));if(!((i===j))&&i>0&&j>0){if(e.linebreak(j,1,h,true)){h=0;g=false;}}if(g){e.print(new AR([new Z(32)]));}e.expr1(a.Y,f+1>>0,d+1>>0);if(h===0){e.print(new AR([new Z(60)]));}};AC.prototype.binaryExpr=function(a,b,c,d){return this.$val.binaryExpr(a,b,c,d);};T=function(a){var a,b,c;b=$assertType(a,BE,true);c=b[1];return c;};AC.ptr.prototype.expr1=function(a,b,c){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;d=this;d.print(new AR([new D.Pos(a.Pos())]));f=a;if($assertType(f,BH,true)[1]){e=f.$val;d.print(new AR([new $String("BadExpr")]));}else if($assertType(f,AX,true)[1]){e=f.$val;d.print(new AR([e]));}else if($assertType(f,BE,true)[1]){e=f.$val;if(c<1){d.internalError(new AR([new $String("depth < 1:"),new $Int(c)]));c=1;}d.binaryExpr(e,b,Q(e,c),c);}else if($assertType(f,AV,true)[1]){e=f.$val;d.expr(e.Key);d.print(new AR([new D.Pos(e.Colon),new D.Token(58),new Z(32)]));d.expr(e.Value);}else if($assertType(f,BF,true)[1]){e=f.$val;if(6>0);d.print(new AR([new D.Pos(e.Rbrack),new D.Token(55)]));}else if($assertType(f,BN,true)[1]){e=f.$val;d.expr1(e.X,7,1);d.print(new AR([new D.Pos(e.Lbrack),new D.Token(50)]));j=new AU([e.Low,e.High]);if(!($interfaceIsEqual(e.Max,$ifaceNil))){j=$append(j,e.Max);}k=j;l=0;while(true){if(!(l=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+l]);if(m>0){p=(o=m-1>>0,((o<0||o>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+o]));if(c<=1&&!($interfaceIsEqual(p,$ifaceNil))&&!($interfaceIsEqual(n,$ifaceNil))&&(T(p)||T(n))){d.print(new AR([new Z(32),new D.Token(58),new Z(32)]));}else{d.print(new AR([new D.Token(58)]));}}if(!($interfaceIsEqual(n,$ifaceNil))){d.expr0(n,c+1>>0);}l++;}d.print(new AR([new D.Pos(e.Rbrack),new D.Token(55)]));}else if($assertType(f,BO,true)[1]){e=f.$val;if(e.Args.$length>1){c=c+(1)>>0;}q=$assertType(e.Fun,BD,true);r=q[1];if(r){d.print(new AR([new D.Token(49)]));d.expr1(e.Fun,7,c);d.print(new AR([new D.Token(54)]));}else{d.expr1(e.Fun,7,c);}d.print(new AR([new D.Pos(e.Lparen),new D.Token(49)]));if(new D.Pos(e.Ellipsis).IsValid()){d.exprList(e.Lparen,e.Args,c,0,e.Ellipsis);d.print(new AR([new D.Pos(e.Ellipsis),new D.Token(48)]));if(new D.Pos(e.Rparen).IsValid()&&d.lineFor(e.Ellipsis)0){s=s|(1);}d.print(new AR([new AA(s),new D.Pos(e.Rbrace),new D.Token(56),new AA(s)]));}else if($assertType(f,BQ,true)[1]){e=f.$val;d.print(new AR([new D.Token(48)]));if(!($interfaceIsEqual(e.Elt,$ifaceNil))){d.expr(e.Elt);}}else if($assertType(f,BR,true)[1]){e=f.$val;d.print(new AR([new D.Token(50)]));if(!($interfaceIsEqual(e.Len,$ifaceNil))){d.expr(e.Len);}d.print(new AR([new D.Token(55)]));d.expr(e.Elt);}else if($assertType(f,BS,true)[1]){e=f.$val;d.print(new AR([new D.Token(82)]));d.fieldList(e.Fields,true,e.Incomplete);}else if($assertType(f,BD,true)[1]){e=f.$val;d.print(new AR([new D.Token(71)]));d.signature(e.Params,e.Results);}else if($assertType(f,BT,true)[1]){e=f.$val;d.print(new AR([new D.Token(76)]));d.fieldList(e.Methods,false,e.Incomplete);}else if($assertType(f,BU,true)[1]){e=f.$val;d.print(new AR([new D.Token(77),new D.Token(50)]));d.expr(e.Key);d.print(new AR([new D.Token(55)]));d.expr(e.Value);}else if($assertType(f,BV,true)[1]){e=f.$val;t=e.Dir;if(t===3){d.print(new AR([new D.Token(63)]));}else if(t===2){d.print(new AR([new D.Token(36),new D.Token(63)]));}else if(t===1){d.print(new AR([new D.Token(63),new D.Pos(e.Arrow),new D.Token(36)]));}d.print(new AR([new Z(32)]));d.expr(e.Value);}else{e=f;$panic(new $String("unreachable"));}return;};AC.prototype.expr1=function(a,b,c){return this.$val.expr1(a,b,c);};AC.ptr.prototype.expr0=function(a,b){var a,b,c;c=this;c.expr1(a,0,b);};AC.prototype.expr0=function(a,b){return this.$val.expr0(a,b);};AC.ptr.prototype.expr=function(a){var a,b;b=this;b.expr1(a,0,1);};AC.prototype.expr=function(a){return this.$val.expr(a);};AC.ptr.prototype.stmtList=function(a,b,c){var a,b,c,d,e,f,g,h,i,j,k,l,m,n;d=this;if(b>0){d.print(new AR([new Z(62)]));}e=0;f=0;g=a;h=0;while(true){if(!(h=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]);j=$assertType(i,BW,true);k=j[1];if(!k){if(d.output.$length>0){d.linebreak(d.lineFor(i.Pos()),1,0,(f===0)||(b===0)||d.linesFrom(e)>0);}d.recordLine(new BC(function(){return e;},function($v){e=$v;}));d.stmt(i,c&&(f===(a.$length-1>>0)));l=i;while(true){if(!(true)){break;}m=$assertType(l,BX,true);n=m[0];if(n===BX.nil){break;}e=e+(1)>>0;l=n.Stmt;}f=f+(1)>>0;}h++;}if(b>0){d.print(new AR([new Z(60)]));}};AC.prototype.stmtList=function(a,b,c){return this.$val.stmtList(a,b,c);};AC.ptr.prototype.block=function(a,b){var a,b,c;c=this;c.print(new AR([new D.Pos(a.Lbrace),new D.Token(51)]));c.stmtList(a.List,b,true);c.linebreak(c.lineFor(a.Rbrace),1,0,true);c.print(new AR([new D.Pos(a.Rbrace),new D.Token(56)]));};AC.prototype.block=function(a,b){return this.$val.block(a,b);};U=function(a){var a,b,c;c=a;if($assertType(c,AX,true)[1]){b=c.$val;return true;}else if($assertType(c,BK,true)[1]){b=c.$val;return U(b.X);}return false;};V=function(a){var a,b,c,d;b=$assertType(a,BJ,true);c=b[0];d=b[1];if(d){C.Inspect(c.X,(function(e){var e,f,g;g=e;if($assertType(g,BJ,true)[1]){f=g.$val;return false;}else if($assertType(g,BP,true)[1]){f=g.$val;if(U(f.Type)){d=false;}return false;}return true;}));if(d){return V(c.X);}}return a;};W=function(a){var a,b,c,d;b=$assertType(a,BJ,true);c=b[0];d=b[1];if(d){return W(c.X);}return a;};AC.ptr.prototype.controlClause=function(a,b,c,d){var a,b,c,d,e,f;e=this;e.print(new AR([new Z(32)]));f=false;if($interfaceIsEqual(b,$ifaceNil)&&$interfaceIsEqual(d,$ifaceNil)){if(!($interfaceIsEqual(c,$ifaceNil))){e.expr(V(c));f=true;}}else{if(!($interfaceIsEqual(b,$ifaceNil))){e.stmt(b,false);}e.print(new AR([new D.Token(57),new Z(32)]));if(!($interfaceIsEqual(c,$ifaceNil))){e.expr(V(c));f=true;}if(a){e.print(new AR([new D.Token(57),new Z(32)]));f=false;if(!($interfaceIsEqual(d,$ifaceNil))){e.stmt(d,false);f=true;}}}if(f){e.print(new AR([new Z(32)]));}};AC.prototype.controlClause=function(a,b,c,d){return this.$val.controlClause(a,b,c,d);};AC.ptr.prototype.indentList=function(a){var a,b,c,d,e,f,g,h,i,j,k,l;b=this;if(a.$length>=2){c=b.lineFor(((0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]).Pos());e=b.lineFor((d=a.$length-1>>0,((d<0||d>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+d])).End());if(0=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i]);k=b.lineFor(j.Pos());l=b.lineFor(j.End());if(g>0;}g=l;i++;}return f>1;}}return false;};AC.prototype.indentList=function(a){return this.$val.indentList(a);};AC.ptr.prototype.stmt=function(a,b){var a,b,c,d,e,f,g,h,i,j,k;c=this;c.print(new AR([new D.Pos(a.Pos())]));e=a;switch(0){default:if($assertType(e,BY,true)[1]){d=e.$val;c.print(new AR([new $String("BadStmt")]));}else if($assertType(e,BZ,true)[1]){d=e.$val;c.decl(d.Decl);}else if($assertType(e,BW,true)[1]){d=e.$val;}else if($assertType(e,BX,true)[1]){d=e.$val;c.print(new AR([new Z(60)]));c.expr(d.Label);c.print(new AR([new D.Pos(d.Colon),new D.Token(58),new Z(62)]));f=$assertType(d.Stmt,BW,true);g=f[0];h=f[1];if(h){if(!b){c.print(new AR([new Z(10),new D.Pos(g.Pos()),new D.Token(57)]));break;}}else{c.linebreak(c.lineFor(d.Stmt.Pos()),1,0,true);}c.stmt(d.Stmt,b);}else if($assertType(e,CA,true)[1]){d=e.$val;c.expr0(d.X,1);}else if($assertType(e,CB,true)[1]){d=e.$val;c.expr0(d.Chan,1);c.print(new AR([new Z(32),new D.Pos(d.Arrow),new D.Token(36),new Z(32)]));c.expr0(d.Value,1);}else if($assertType(e,CC,true)[1]){d=e.$val;c.expr0(d.X,2);c.print(new AR([new D.Pos(d.TokPos),new D.Token(d.Tok)]));}else if($assertType(e,CD,true)[1]){d=e.$val;i=1;if(d.Lhs.$length>1&&d.Rhs.$length>1){i=i+(1)>>0;}c.exprList(d.Pos(),d.Lhs,i,0,d.TokPos);c.print(new AR([new Z(32),new D.Pos(d.TokPos),new D.Token(d.Tok),new Z(32)]));c.exprList(d.TokPos,d.Rhs,i,0,0);}else if($assertType(e,CE,true)[1]){d=e.$val;c.print(new AR([new D.Token(72),new Z(32)]));c.expr(d.Call);}else if($assertType(e,CF,true)[1]){d=e.$val;c.print(new AR([new D.Token(67),new Z(32)]));c.expr(d.Call);}else if($assertType(e,CG,true)[1]){d=e.$val;c.print(new AR([new D.Token(80)]));if(!(d.Results===AU.nil)){c.print(new AR([new Z(32)]));if(c.indentList(d.Results)){c.print(new AR([new Z(62)]));c.exprList(d.Pos(),d.Results,1,2,0);c.print(new AR([new Z(60)]));}else{c.exprList(d.Pos(),d.Results,1,0,0);}}}else if($assertType(e,CH,true)[1]){d=e.$val;c.print(new AR([new D.Token(d.Tok)]));if(!(d.Label===AX.nil)){c.print(new AR([new Z(32)]));c.expr(d.Label);}}else if($assertType(e,CI,true)[1]){d=e.$val;c.block(d,1);}else if($assertType(e,CJ,true)[1]){d=e.$val;c.print(new AR([new D.Token(74)]));c.controlClause(false,d.Init,d.Cond,$ifaceNil);c.block(d.Body,1);if(!($interfaceIsEqual(d.Else,$ifaceNil))){c.print(new AR([new Z(32),new D.Token(68),new Z(32)]));j=d.Else;if($assertType(j,CI,true)[1]||$assertType(j,CJ,true)[1]){c.stmt(d.Else,b);}else{c.print(new AR([new D.Token(51),new Z(62),new Z(12)]));c.stmt(d.Else,true);c.print(new AR([new Z(60),new Z(12),new D.Token(56)]));}}}else if($assertType(e,CK,true)[1]){d=e.$val;if(!(d.List===AU.nil)){c.print(new AR([new D.Token(62),new Z(32)]));c.exprList(d.Pos(),d.List,1,0,d.Colon);}else{c.print(new AR([new D.Token(66)]));}c.print(new AR([new D.Pos(d.Colon),new D.Token(58)]));c.stmtList(d.Body,1,b);}else if($assertType(e,CL,true)[1]){d=e.$val;c.print(new AR([new D.Token(83)]));c.controlClause(false,d.Init,d.Tag,$ifaceNil);c.block(d.Body,0);}else if($assertType(e,CM,true)[1]){d=e.$val;c.print(new AR([new D.Token(83)]));if(!($interfaceIsEqual(d.Init,$ifaceNil))){c.print(new AR([new Z(32)]));c.stmt(d.Init,false);c.print(new AR([new D.Token(57)]));}c.print(new AR([new Z(32)]));c.stmt(d.Assign,false);c.print(new AR([new Z(32)]));c.block(d.Body,0);}else if($assertType(e,CN,true)[1]){d=e.$val;if(!($interfaceIsEqual(d.Comm,$ifaceNil))){c.print(new AR([new D.Token(62),new Z(32)]));c.stmt(d.Comm,false);}else{c.print(new AR([new D.Token(66)]));}c.print(new AR([new D.Pos(d.Colon),new D.Token(58)]));c.stmtList(d.Body,1,b);}else if($assertType(e,CO,true)[1]){d=e.$val;c.print(new AR([new D.Token(81),new Z(32)]));k=d.Body;if((k.List.$length===0)&&!c.commentBefore(c.posFor(k.Rbrace))){c.print(new AR([new D.Pos(k.Lbrace),new D.Token(51),new D.Pos(k.Rbrace),new D.Token(56)]));}else{c.block(k,0);}}else if($assertType(e,CP,true)[1]){d=e.$val;c.print(new AR([new D.Token(70)]));c.controlClause(true,d.Init,d.Cond,d.Post);c.block(d.Body,1);}else if($assertType(e,CQ,true)[1]){d=e.$val;c.print(new AR([new D.Token(70),new Z(32)]));if(!($interfaceIsEqual(d.Key,$ifaceNil))){c.expr(d.Key);if(!($interfaceIsEqual(d.Value,$ifaceNil))){c.print(new AR([new D.Pos(d.Value.Pos()),new D.Token(52),new Z(32)]));c.expr(d.Value);}c.print(new AR([new Z(32),new D.Pos(d.TokPos),new D.Token(d.Tok),new Z(32)]));}c.print(new AR([new D.Token(79),new Z(32)]));c.expr(V(d.X));c.print(new AR([new Z(32)]));c.block(d.Body,1);}else{d=e;$panic(new $String("unreachable"));}}return;};AC.prototype.stmt=function(a,b){return this.$val.stmt(a,b);};X=function(a){var a,b,c,d,e,f,g,h,i,j;b=$makeSlice(CR,a.$length);c=(function(c,d,e){var c,d,e;if(e){while(true){if(!(c=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+c]=true;c=c+(1)>>0;}}});d=-1;e=false;f=a;g=0;while(true){if(!(g=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]);j=$assertType(i,CS);if(!(j.Values===AU.nil)){if(d<0){d=h;e=false;}}else{if(d>=0){c(d,h,e);d=-1;}}if(!($interfaceIsEqual(j.Type,$ifaceNil))){e=true;}g++;}if(d>=0){c(d,a.$length,e);}return b;};AC.ptr.prototype.valueSpec=function(a,b){var a,b,c,d;c=this;c.setComment(a.Doc);c.identList(a.Names,false);d=3;if(!($interfaceIsEqual(a.Type,$ifaceNil))||b){c.print(new AR([new Z(11)]));d=d-(1)>>0;}if(!($interfaceIsEqual(a.Type,$ifaceNil))){c.expr(a.Type);}if(!(a.Values===AU.nil)){c.print(new AR([new Z(11),new D.Token(42),new Z(32)]));c.exprList(0,a.Values,1,0,0);d=d-(1)>>0;}if(!(a.Comment===AS.nil)){while(true){if(!(d>0)){break;}c.print(new AR([new Z(11)]));d=d-(1)>>0;}c.setComment(a.Comment);}};AC.prototype.valueSpec=function(a,b){return this.$val.valueSpec(a,b);};AC.ptr.prototype.spec=function(a,b,c){var a,b,c,d,e,f;d=this;f=a;if($assertType(f,CT,true)[1]){e=f.$val;d.setComment(e.Doc);if(!(e.Name===AX.nil)){d.expr(e.Name);d.print(new AR([new Z(32)]));}d.expr(e.Path);d.setComment(e.Comment);d.print(new AR([new D.Pos(e.EndPos)]));}else if($assertType(f,CS,true)[1]){e=f.$val;if(!((b===1))){d.internalError(new AR([new $String("expected n = 1; got"),new $Int(b)]));}d.setComment(e.Doc);d.identList(e.Names,c);if(!($interfaceIsEqual(e.Type,$ifaceNil))){d.print(new AR([new Z(32)]));d.expr(e.Type);}if(!(e.Values===AU.nil)){d.print(new AR([new Z(32),new D.Token(42),new Z(32)]));d.exprList(0,e.Values,1,0,0);}d.setComment(e.Comment);}else if($assertType(f,CU,true)[1]){e=f.$val;d.setComment(e.Doc);d.expr(e.Name);if(b===1){d.print(new AR([new Z(32)]));}else{d.print(new AR([new Z(11)]));}d.expr(e.Type);d.setComment(e.Comment);}else{e=f;$panic(new $String("unreachable"));}};AC.prototype.spec=function(a,b,c){return this.$val.spec(a,b,c);};AC.ptr.prototype.genDecl=function(a){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o;b=this;b.setComment(a.Doc);b.print(new AR([new D.Pos(a.Pos()),new D.Token(a.Tok),new Z(32)]));if(new D.Pos(a.Lparen).IsValid()){b.print(new AR([new D.Pos(a.Lparen),new D.Token(49)]));c=a.Specs.$length;if(c>0){b.print(new AR([new Z(62),new Z(12)]));if(c>1&&((a.Tok===64)||(a.Tok===85))){d=X(a.Specs);e=0;f=a.Specs;g=0;while(true){if(!(g=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]);if(h>0){b.linebreak(b.lineFor(i.Pos()),1,0,b.linesFrom(e)>0);}b.recordLine(new BC(function(){return e;},function($v){e=$v;}));b.valueSpec($assertType(i,CS),((h<0||h>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+h]));g++;}}else{j=0;k=a.Specs;l=0;while(true){if(!(l=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+l]);if(m>0){b.linebreak(b.lineFor(n.Pos()),1,0,b.linesFrom(j)>0);}b.recordLine(new BC(function(){return j;},function($v){j=$v;}));b.spec(n,c,false);l++;}}b.print(new AR([new Z(60),new Z(12)]));}b.print(new AR([new D.Pos(a.Rparen),new D.Token(54)]));}else{b.spec((o=a.Specs,((0<0||0>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+0])),1,true);}};AC.prototype.genDecl=function(a){return this.$val.genDecl(a);};AC.ptr.prototype.nodeSize=function(a,b){var a,b,c=0,d,e,f,g,h,i,j,k,l,m,n,o,p;d=this;e=(f=d.nodeSizes[a.$key()],f!==undefined?[f.v,true]:[0,false]);g=e[0];h=e[1];if(h){c=g;return c;}c=b+1>>0;i=a;(d.nodeSizes||$throwRuntimeError("assignment to entry in nil map"))[i.$key()]={k:i,v:c};j=new AN.ptr(1,0,0);k=$clone(new B.Buffer.ptr(),B.Buffer);l=j.fprint(k,d.fset,a,d.nodeSizes);if(!($interfaceIsEqual(l,$ifaceNil))){return c;}if(k.Len()<=b){m=k.Bytes();n=0;while(true){if(!(n=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+n]);if(o<32){return c;}n++;}c=k.Len();p=a;(d.nodeSizes||$throwRuntimeError("assignment to entry in nil map"))[p.$key()]={k:p,v:c};}return c;};AC.prototype.nodeSize=function(a,b){return this.$val.nodeSize(a,b);};AC.ptr.prototype.bodySize=function(a,b){var a,b,c,d,e,f,g,h,i,j;c=this;d=a.Pos();e=a.Rbrace;if(new D.Pos(d).IsValid()&&new D.Pos(e).IsValid()&&!((c.lineFor(d)===c.lineFor(e)))){return b+1>>0;}if(a.List.$length>5){return b+1>>0;}f=c.commentSizeBefore(c.posFor(e));g=a.List;h=0;while(true){if(!(h=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]);if(f>b){break;}if(i>0){f=f+(2)>>0;}f=f+(c.nodeSize(j,b))>>0;h++;}return f;};AC.prototype.bodySize=function(a,b){return this.$val.bodySize(a,b);};AC.ptr.prototype.adjBlock=function(a,b,c){var a,b,c,d,e,f,g,h;d=this;if(c===CI.nil){return;}if((a+d.bodySize(c,100)>>0)<=100){d.print(new AR([new Z(b),new D.Pos(c.Lbrace),new D.Token(51)]));if(c.List.$length>0){d.print(new AR([new Z(32)]));e=c.List;f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);if(g>0){d.print(new AR([new D.Token(57),new Z(32)]));}d.stmt(h,g===(c.List.$length-1>>0));f++;}d.print(new AR([new Z(32)]));}d.print(new AR([new AA(2),new D.Pos(c.Rbrace),new D.Token(56),new AA(2)]));return;}if(!((b===0))){d.print(new AR([new Z(32)]));}d.block(c,1);};AC.prototype.adjBlock=function(a,b,c){return this.$val.adjBlock(a,b,c);};AC.ptr.prototype.distanceFrom=function(a){var a,b,c;b=this;if(new D.Pos(a).IsValid()&&b.pos.IsValid()){c=$clone(b.posFor(a),D.Position);if(c.Line===b.pos.Line){return b.pos.Column-c.Column>>0;}}return 1073741824;};AC.prototype.distanceFrom=function(a){return this.$val.distanceFrom(a);};AC.ptr.prototype.funcDecl=function(a){var a,b;b=this;b.setComment(a.Doc);b.print(new AR([new D.Pos(a.Pos()),new D.Token(71),new Z(32)]));if(!(a.Recv===AW.nil)){b.parameters(a.Recv);b.print(new AR([new Z(32)]));}b.expr(a.Name);b.signature(a.Type.Params,a.Type.Results);b.adjBlock(b.distanceFrom(a.Pos()),11,a.Body);};AC.prototype.funcDecl=function(a){return this.$val.funcDecl(a);};AC.ptr.prototype.decl=function(a){var a,b,c,d;b=this;d=a;if($assertType(d,CV,true)[1]){c=d.$val;b.print(new AR([new D.Pos(c.Pos()),new $String("BadDecl")]));}else if($assertType(d,CW,true)[1]){c=d.$val;b.genDecl(c);}else if($assertType(d,CX,true)[1]){c=d.$val;b.funcDecl(c);}else{c=d;$panic(new $String("unreachable"));}};AC.prototype.decl=function(a){return this.$val.decl(a);};Y=function(a){var a,b=0,c,d;b=0;d=a;if($assertType(d,CW,true)[1]){c=d.$val;b=c.Tok;}else if($assertType(d,CX,true)[1]){c=d.$val;b=71;}return b;};AC.ptr.prototype.declList=function(a){var a,b,c,d,e,f,g,h;b=this;c=0;d=a;e=0;while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]);g=c;c=Y(f);if(b.output.$length>0){h=1;if(!((g===c))||!(AJ(f)===AS.nil)){h=2;}b.linebreak(b.lineFor(f.Pos()),h,0,false);}b.decl(f);e++;}};AC.prototype.declList=function(a){return this.$val.declList(a);};AC.ptr.prototype.file=function(a){var a,b;b=this;b.setComment(a.Doc);b.print(new AR([new D.Pos(a.Pos()),new D.Token(78),new Z(32)]));b.expr(a.Name);b.declList(a.Decls);b.print(new AR([new Z(10)]));};AC.prototype.file=function(a){return this.$val.file(a);};AC.ptr.prototype.init=function(a,b,c){var a,b,c,d;d=this;$copy(d.Config,a,AN);d.fset=b;$copy(d.pos,new D.Position.ptr("",0,1,1),D.Position);$copy(d.out,new D.Position.ptr("",0,1,1),D.Position);d.wsbuf=$makeSlice(CY,0,16);d.nodeSizes=c;d.cachedPos=-1;};AC.prototype.init=function(a,b,c){return this.$val.init(a,b,c);};AC.ptr.prototype.internalError=function(a){var a,b;b=this;};AC.prototype.internalError=function(a){return this.$val.internalError(a);};AC.ptr.prototype.commentsHaveNewline=function(a){var a,b,c,d,e,f,g,h;b=this;c=b.lineFor(((0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]).Pos());d=a;e=0;while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]);if(f>0&&!((b.lineFor(((f<0||f>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+f]).Pos())===c))){return true;}h=g.Text;if(h.length>=2&&((h.charCodeAt(1)===47)||J.Contains(h,"\n"))){return true;}e++;}return false;};AC.prototype.commentsHaveNewline=function(a){return this.$val.commentsHaveNewline(a);};AC.ptr.prototype.nextComment=function(){var a,b,c,d,e;a=this;while(true){if(!(a.commentInfo.cindex=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+c]));a.commentInfo.cindex=a.commentInfo.cindex+(1)>>0;e=d.List;if(e.$length>0){a.commentInfo.comment=d;a.commentInfo.commentOffset=a.posFor(((0<0||0>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]).Pos()).Offset;a.commentInfo.commentNewline=a.commentsHaveNewline(e);return;}}a.commentInfo.commentOffset=1073741824;};AC.prototype.nextComment=function(){return this.$val.nextComment();};AC.ptr.prototype.commentBefore=function(a){var a,b;b=this;a=$clone(a,D.Position);return b.commentInfo.commentOffset=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]);c=c+(f.Text.length)>>0;e++;}b.nextComment();}return c;}catch(err){$err=err;return 0;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};AC.prototype.commentSizeBefore=function(a){return this.$val.commentSizeBefore(a);};AC.ptr.prototype.recordLine=function(a){var a,b;b=this;b.linePtr=a;};AC.prototype.recordLine=function(a){return this.$val.recordLine(a);};AC.ptr.prototype.linesFrom=function(a){var a,b;b=this;return b.out.Line-a>>0;};AC.prototype.linesFrom=function(a){return this.$val.linesFrom(a);};AC.ptr.prototype.posFor=function(a){var a,b;b=this;return b.fset.Position(a);};AC.prototype.posFor=function(a){return this.$val.posFor(a);};AC.ptr.prototype.lineFor=function(a){var a,b;b=this;if(!((a===b.cachedPos))){b.cachedPos=a;b.cachedLine=b.fset.Position(a).Line;}return b.cachedLine;};AC.prototype.lineFor=function(a){return this.$val.lineFor(a);};AC.ptr.prototype.atLineBegin=function(a){var a,b,c,d;b=this;a=$clone(a,D.Position);if(!((((b.Config.Mode&8)>>>0)===0))&&a.IsValid()&&(!((b.out.Line===a.Line))||!(b.out.Filename===a.Filename))){b.output=$append(b.output,255);b.output=$appendSlice(b.output,new AQ($stringToBytes(F.Sprintf("//line %s:%d\n",new AR([new $String(a.Filename),new $Int(a.Line)])))));b.output=$append(b.output,255);b.out.Filename=a.Filename;b.out.Line=a.Line;}c=b.Config.Indent+b.indent>>0;d=0;while(true){if(!(d>0;}b.pos.Offset=b.pos.Offset+(c)>>0;b.pos.Column=b.pos.Column+(c)>>0;b.out.Column=b.out.Column+(c)>>0;};AC.prototype.atLineBegin=function(a){return this.$val.atLineBegin(a);};AC.ptr.prototype.writeByte=function(a,b){var a,b,c,d;c=this;if(c.out.Column===1){c.atLineBegin(c.pos);}d=0;while(true){if(!(d>0;}c.pos.Offset=c.pos.Offset+(b)>>0;if((a===10)||(a===12)){c.pos.Line=c.pos.Line+(b)>>0;c.out.Line=c.out.Line+(b)>>0;c.pos.Column=1;c.out.Column=1;return;}c.pos.Column=c.pos.Column+(b)>>0;c.out.Column=c.out.Column+(b)>>0;};AC.prototype.writeByte=function(a,b){return this.$val.writeByte(a,b);};AC.ptr.prototype.writeString=function(a,b,c){var a,b,c,d,e,f,g,h;d=this;a=$clone(a,D.Position);if(d.out.Column===1){d.atLineBegin(a);}if(a.IsValid()){$copy(d.pos,a,D.Position);}if(c){d.output=$append(d.output,255);}d.output=$appendSlice(d.output,new AQ($stringToBytes(b)));e=0;f=0;g=0;while(true){if(!(g>0;f=g;}g=g+(1)>>0;}d.pos.Offset=d.pos.Offset+(b.length)>>0;if(e>0){d.pos.Line=d.pos.Line+(e)>>0;d.out.Line=d.out.Line+(e)>>0;h=b.length-f>>0;d.pos.Column=h;d.out.Column=h;}else{d.pos.Column=d.pos.Column+(b.length)>>0;d.out.Column=d.out.Column+(b.length)>>0;}if(c){d.output=$append(d.output,255);}$copy(d.last,d.pos,D.Position);};AC.prototype.writeString=function(a,b,c){return this.$val.writeString(a,b,c);};AC.ptr.prototype.writeCommentPrefix=function(a,b,c,d,e){var a,aa,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;f=this;b=$clone(b,D.Position);a=$clone(a,D.Position);if(f.output.$length===0){return;}if(a.IsValid()&&!(a.Filename===f.last.Filename)){f.writeByte(12,2);return;}if((a.Line===f.last.Line)&&(c===BA.nil||!((c.Text.charCodeAt(1)===47)))){g=false;if(c===BA.nil){h=0;i=f.wsbuf;j=0;while(true){if(!(j=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]);m=l;if(m===32){(n=f.wsbuf,(k<0||k>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+k]=0);j++;continue;}else if(m===11){g=true;j++;continue;}else if(m===62){j++;continue;}h=k;break;}f.writeWhitespace(h);}if(!g){o=9;if(a.Line===b.Line){o=32;}f.writeByte(o,1);}}else{p=false;q=0;r=f.wsbuf;s=0;while(true){if(!(s=r.$length)?$throwRuntimeError("index out of range"):r.$array[r.$offset+s]);v=u;if(v===32||v===11){(w=f.wsbuf,(t<0||t>=w.$length)?$throwRuntimeError("index out of range"):w.$array[w.$offset+t]=0);s++;continue;}else if(v===62){s++;continue;}else if(v===60){if((t+1>>0)>0,((y<0||y>=x.$length)?$throwRuntimeError("index out of range"):x.$array[x.$offset+y]))===60)){s++;continue;}if(!((e===56))&&(a.Column===b.Column)){s++;continue;}}else if(v===10||v===12){(z=f.wsbuf,(t<0||t>=z.$length)?$throwRuntimeError("index out of range"):z.$array[z.$offset+t]=0);p=c===BA.nil;}q=t;break;}f.writeWhitespace(q);aa=0;if(a.IsValid()&&f.last.IsValid()){aa=a.Line-f.last.Line>>0;if(aa<0){aa=0;}}if((f.indent===0)&&p){aa=aa+(1)>>0;}if((aa===0)&&!(c===BA.nil)&&(c.Text.charCodeAt(1)===47)){aa=1;}if(aa>0){f.writeByte(12,AH(aa));}}};AC.prototype.writeCommentPrefix=function(a,b,c,d,e){return this.$val.writeCommentPrefix(a,b,c,d,e);};AD=function(a){var a,b;b=0;while(true){if(!(b32){return false;}b=b+(1)>>0;}return true;};AE=function(a,b){var a,b,c;c=0;while(true){if(!(c>0;}return a.substring(0,c);};AF=function(a){var a;return J.TrimRightFunc(a,L.IsSpace);};AG=function(a){var a,aa,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;if(a.$length<=1){return;}b="";if(a.$length>2){c=true;d=$subslice(a,1,(a.$length-1>>0));e=0;while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]);if(AD(g)){(h=1+f>>0,(h<0||h>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+h]="");}else if(c){b=AE(g,g);c=false;}else{b=AE(b,g);}e++;}}else{i=((1<0||1>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+1]);b=AE(i,i);}j=false;k=J.Index(b,"*");if(k>=0){if(k>0&&(b.charCodeAt((k-1>>0))===32)){k=k-(1)>>0;}b=b.substring(0,k);j=true;}else{l=((0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]);if(AD(l.substring(2))){m=b.length;n=0;while(true){if(!(n<3&&m>0&&(b.charCodeAt((m-1>>0))===32))){break;}m=m-(1)>>0;n=n+(1)>>0;}if((m===b.length)&&m>0&&(b.charCodeAt((m-1>>0))===9)){m=m-(1)>>0;}b=b.substring(0,m);}else{o=$makeSlice(AQ,l.length);p=2;while(true){if(!(p=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+p]=l.charCodeAt(p);p=p+(1)>>0;}if(p>2&&(((2<0||2>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+2])===9)){o=$subslice(o,2,p);}else{q=32;r=32;(0<0||0>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+0]=q;(1<0||1>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+1]=r;o=$subslice(o,0,p);}b=J.TrimSuffix(b,$bytesToString(o));}}t=(s=a.$length-1>>0,((s<0||s>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+s]));u="*/";v=J.Index(t,u);if(AD(t.substring(0,v))){if(j){u=" */";}(w=a.$length-1>>0,(w<0||w>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+w]=b+u);}else{b=AE(b,t);}x=a;y=0;while(true){if(!(y=x.$length)?$throwRuntimeError("index out of range"):x.$array[x.$offset+y]);if(z>0&&!(aa==="")){(z<0||z>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+z]=aa.substring(b.length);}y++;}};AC.ptr.prototype.writeComment=function(a){var $deferred=[],$err=null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;try{$deferFrames.push($deferred);b=this;c=a.Text;d=$clone(b.posFor(a.Pos()),D.Position);if(J.HasPrefix(c,"//line ")&&(!d.IsValid()||(d.Column===1))){e=J.TrimSpace(c.substring(7));f=J.LastIndex(e,":");if(f>=0){g=I.Atoi(e.substring((f+1>>0)));h=g[0];i=g[1];if($interfaceIsEqual(i,$ifaceNil)&&h>0){j=b.indent;b.indent=0;$deferred.push([(function(){b.pos.Filename=e.substring(0,f);b.pos.Line=h;b.pos.Column=1;b.indent=j;}),[]]);}}}if(c.charCodeAt(1)===47){b.writeString(d,AF(c),true);return;}k=J.Split(c,"\n");if(d.IsValid()&&(d.Column===1)&&b.indent>0){l=$subslice(k,1);m=0;while(true){if(!(m=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+m]);(p=1+n>>0,(p<0||p>=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+p]=" "+o);m++;}}AG(k);q=k;r=0;while(true){if(!(r=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+r]);if(s>0){b.writeByte(12,1);$copy(d,b.pos,D.Position);}if(t.length>0){b.writeString(d,AF(t),true);}r++;}}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};AC.prototype.writeComment=function(a){return this.$val.writeComment(a);};AC.ptr.prototype.writeCommentSuffix=function(a){var a,b=false,c=false,d,e,f,g,h,i,j,k;d=this;e=d.wsbuf;f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);i=h;if(i===32||i===11){(j=d.wsbuf,(g<0||g>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+g]=0);}else if(i===62||i===60){}else if(i===10||i===12){if(a){a=false;b=true;}else{if(h===12){c=true;}(k=d.wsbuf,(g<0||g>=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+g]=0);}}f++;}d.writeWhitespace(d.wsbuf.$length);if(a){d.writeByte(10,1);b=true;}return[b,c];};AC.prototype.writeCommentSuffix=function(a){return this.$val.writeCommentSuffix(a);};AC.ptr.prototype.intersperseComments=function(a,b){var a,b,c=false,d=false,e,f,g,h,i,j,k;e=this;a=$clone(a,D.Position);f=BA.nil;while(true){if(!(e.commentBefore(a))){break;}g=e.commentInfo.comment.List;h=0;while(true){if(!(h=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]);e.writeCommentPrefix(e.posFor(i.Pos()),a,f,i,b);e.writeComment(i);f=i;h++;}e.nextComment();}if(!(f===BA.nil)){if(((e.mode&1)===0)&&(f.Text.charCodeAt(1)===42)&&(e.lineFor(f.Pos())===a.Line)&&!((b===52))&&(!((b===54))||(e.prevOpen===49))&&(!((b===55))||(e.prevOpen===50))){e.writeByte(32,1);}j=(f.Text.charCodeAt(1)===47)||(b===56)&&((e.mode&2)===0)||(b===1);k=e.writeCommentSuffix(j);c=k[0];d=k[1];return[c,d];}e.internalError(new AR([new $String("intersperseComments called without pending comments")]));return[c,d];};AC.prototype.intersperseComments=function(a,b){return this.$val.intersperseComments(a,b);};AC.ptr.prototype.writeWhitespace=function(a){var a,b,c,d,e,f,g,h,i,j,k,l,m,n;b=this;c=0;while(true){if(!(c=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+c]));f=e;if(f===0){}else if(f===62){b.indent=b.indent+(1)>>0;}else if(f===60){b.indent=b.indent-(1)>>0;if(b.indent<0){b.internalError(new AR([new $String("negative indentation:"),new $Int(b.indent)]));b.indent=0;}}else if(f===10||f===12){if((c+1>>0)>0,((h<0||h>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]))===60)){i=60;j=12;(k=b.wsbuf,(c<0||c>=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+c]=i);(l=b.wsbuf,m=c+1>>0,(m<0||m>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+m]=j);c=c-(1)>>0;c=c+(1)>>0;continue;}b.writeByte((e<<24>>>24),1);}else{b.writeByte((e<<24>>>24),1);}c=c+(1)>>0;}n=$copySlice(b.wsbuf,$subslice(b.wsbuf,a));b.wsbuf=$subslice(b.wsbuf,0,n);};AC.prototype.writeWhitespace=function(a){return this.$val.writeWhitespace(a);};AH=function(a){var a;if(a>2){a=2;}return a;};AI=function(a,b){var a,b,c=false,d;d=a;if(d===5){c=b===46;}else if(d===12){c=b===43;}else if(d===13){c=b===45;}else if(d===15){c=b===42;}else if(d===40){c=(b===45)||(b===60);}else if(d===17){c=(b===38)||(b===94);}return c;};AC.ptr.prototype.print=function(a){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;b=this;c=a;d=0;while(true){if(!(d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]);f="";g=false;h=false;i=b.lastTok;if(i===0){}else if(i===49||i===50){b.prevOpen=b.lastTok;}else{b.prevOpen=0;}k=e;if($assertType(k,AA,true)[1]){j=k.$val;b.mode=(b.mode^(j))>>0;d++;continue;}else if($assertType(k,Z,true)[1]){j=k.$val;if(j===0){d++;continue;}l=b.wsbuf.$length;if(l===b.wsbuf.$capacity){b.writeWhitespace(l);l=0;}b.wsbuf=$subslice(b.wsbuf,0,(l+1>>0));(m=b.wsbuf,(l<0||l>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+l]=j);if((j===10)||(j===12)){b.impliedSemi=false;}b.lastTok=0;d++;continue;}else if($assertType(k,AX,true)[1]){j=k.$val;f=j.Name;h=true;b.lastTok=4;}else if($assertType(k,AZ,true)[1]){j=k.$val;f=j.Value;g=true;h=true;b.lastTok=j.Kind;}else if($assertType(k,D.Token,true)[1]){j=k.$val;n=new D.Token(j).String();if(AI(b.lastTok,n.charCodeAt(0))){if(!((b.wsbuf.$length===0))){b.internalError(new AR([new $String("whitespace buffer not empty")]));}b.wsbuf=$subslice(b.wsbuf,0,1);(o=b.wsbuf,(0<0||0>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+0]=32);}f=n;p=j;if(p===61||p===65||p===69||p===80||p===37||p===38||p===54||p===55||p===56){h=true;}b.lastTok=j;}else if($assertType(k,D.Pos,true)[1]){j=k.$val;if(new D.Pos(j).IsValid()){$copy(b.pos,b.posFor(j),D.Position);}d++;continue;}else if($assertType(k,$String,true)[1]){j=k.$val;f=j;g=true;h=true;b.lastTok=9;}else{j=k;F.Fprintf(H.Stderr,"print: unsupported argument %v (%T)\n",new AR([e,e]));$panic(new $String("go/printer type"));}q=$clone(b.pos,D.Position);r=b.flush(q,b.lastTok);s=r[0];t=r[1];if(!b.impliedSemi){u=AH(q.Line-b.pos.Line>>0);if(s&&(u===2)){u=1;}if(u>0){v=10;if(t){v=12;}b.writeByte(v,u);h=false;}}if(!($pointerIsEqual(b.linePtr,BC.nil))){b.linePtr.$set(b.out.Line);b.linePtr=BC.nil;}b.writeString(q,f,g);b.impliedSemi=h;d++;}};AC.prototype.print=function(a){return this.$val.print(a);};AC.ptr.prototype.flush=function(a,b){var a,b,c=false,d=false,e,f;e=this;a=$clone(a,D.Position);if(e.commentBefore(a)){f=e.intersperseComments(a,b);c=f[0];d=f[1];}else{e.writeWhitespace(e.wsbuf.$length);}return[c,d];};AC.prototype.flush=function(a,b){return this.$val.flush(a,b);};AJ=function(a){var a,b,c;c=a;if($assertType(c,CZ,true)[1]){b=c.$val;return b.Doc;}else if($assertType(c,CT,true)[1]){b=c.$val;return b.Doc;}else if($assertType(c,CS,true)[1]){b=c.$val;return b.Doc;}else if($assertType(c,CU,true)[1]){b=c.$val;return b.Doc;}else if($assertType(c,CW,true)[1]){b=c.$val;return b.Doc;}else if($assertType(c,CX,true)[1]){b=c.$val;return b.Doc;}else if($assertType(c,DA,true)[1]){b=c.$val;return b.Doc;}return AS.nil;};AC.ptr.prototype.printNode=function(a){var $args=arguments,$s=0,$this=this,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;s:while(true){switch($s){case 0:b=$this;c=AT.nil;d=$assertType(a,DB,true);e=d[0];f=d[1];if(f){a=e.Node;c=e.Comments;}if(!(c===AT.nil)){}else{$s=1;continue;}g=$assertType(a,C.Node,true);h=g[0];i=g[1];if(!i){}else{$s=3;continue;}$s=4;continue;case 3:j=h.Pos();k=h.End();l=AJ(h);if(!(l===AS.nil)){j=l.Pos();}m=0;while(true){if(!(m=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+m]).End()>0;}n=m;while(true){if(!(n=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+n]).Pos()>0;}if(m=v.$length)?$throwRuntimeError("index out of range"):v.$array[v.$offset+w]);y=$assertType(x,BX,true);z=y[1];if(z){b.indent=1;}w++;}b.stmtList(r,0,false);$s=12;continue;case 9:r=s.$val;b.declList(r);$s=12;continue;case 10:r=s.$val;b.file(r);$s=12;continue;case 11:r=s;$s=4;continue;case 12:return $ifaceNil;case 4:return F.Errorf("go/printer: unsupported node type %T",new AR([a]));case-1:}return;}};AC.prototype.printNode=function(a){return this.$val.printNode(a);};AK.ptr.prototype.resetSpace=function(){var a;a=this;a.state=0;a.space=$subslice(a.space,0,0);};AK.prototype.resetSpace=function(){return this.$val.resetSpace();};AK.ptr.prototype.Write=function(a){var a,b=0,c=$ifaceNil,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;d=this;e=0;f=0;g=a;h=0;while(true){if(!(h=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]);if(f===11){f=9;}i=d.state;if(i===0){j=f;if(j===9||j===32){d.space=$append(d.space,f);}else if(j===10||j===12){d.resetSpace();k=d.output.Write(AL);c=k[1];}else if(j===255){l=d.output.Write(d.space);c=l[1];d.state=1;e=b+1>>0;}else{m=d.output.Write(d.space);c=m[1];d.state=2;e=b;}}else if(i===1){if(f===255){n=d.output.Write($subslice(a,e,b));c=n[1];d.resetSpace();}}else if(i===2){o=f;if(o===9||o===32){p=d.output.Write($subslice(a,e,b));c=p[1];d.resetSpace();d.space=$append(d.space,f);}else if(o===10||o===12){q=d.output.Write($subslice(a,e,b));c=q[1];d.resetSpace();r=d.output.Write(AL);c=r[1];}else if(o===255){s=d.output.Write($subslice(a,e,b));c=s[1];d.state=1;e=b+1>>0;}}else{$panic(new $String("unreachable"));}if(!($interfaceIsEqual(c,$ifaceNil))){return[b,c];}h++;}b=a.$length;t=d.state;if(t===1||t===2){u=d.output.Write($subslice(a,e,b));c=u[1];d.resetSpace();}return[b,c];};AK.prototype.Write=function(a){return this.$val.Write(a);};AN.ptr.prototype.fprint=function(a,b,c,d){var a,b,c,d,e=$ifaceNil,f,g,h,i,j,k,l,m;f=this;g=$clone(new AC.ptr(),AC);g.init(f,b,d);e=g.printNode(c);if(!($interfaceIsEqual(e,$ifaceNil))){return e;}g.impliedSemi=false;g.flush(new D.Position.ptr("",1073741824,1073741824,0),1);a=new AK.ptr(a,0,AQ.nil);if(((f.Mode&1)>>>0)===0){h=f.Tabwidth;i=9;if(!((((f.Mode&4)>>>0)===0))){i=32;}j=8;if(!((((f.Mode&2)>>>0)===0))){h=0;j=(j|(16))>>>0;}a=K.NewWriter(a,h,f.Tabwidth,1,i,j);}k=a.Write(g.output);e=k[1];if(!($interfaceIsEqual(e,$ifaceNil))){return e;}l=$assertType(a,DE,true);m=l[0];if(!(m===DE.nil)){e=m.Flush();}return e;};AN.prototype.fprint=function(a,b,c,d){return this.$val.fprint(a,b,c,d);};AN.ptr.prototype.Fprint=function(a,b,c){var a,b,c,d;d=this;return d.fprint(a,b,c,new $Map());};AN.prototype.Fprint=function(a,b,c){return this.$val.Fprint(a,b,c);};DJ.methods=[{prop:"linebreak",name:"linebreak",pkg:"go/printer",typ:$funcType([$Int,$Int,Z,$Bool],[$Bool],false)},{prop:"setComment",name:"setComment",pkg:"go/printer",typ:$funcType([AS],[],false)},{prop:"identList",name:"identList",pkg:"go/printer",typ:$funcType([AY,$Bool],[],false)},{prop:"exprList",name:"exprList",pkg:"go/printer",typ:$funcType([D.Pos,AU,$Int,N,D.Pos],[],false)},{prop:"parameters",name:"parameters",pkg:"go/printer",typ:$funcType([AW],[],false)},{prop:"signature",name:"signature",pkg:"go/printer",typ:$funcType([AW,AW],[],false)},{prop:"isOneLineFieldList",name:"isOneLineFieldList",pkg:"go/printer",typ:$funcType([DG],[$Bool],false)},{prop:"setLineComment",name:"setLineComment",pkg:"go/printer",typ:$funcType([$String],[],false)},{prop:"fieldList",name:"fieldList",pkg:"go/printer",typ:$funcType([AW,$Bool,$Bool],[],false)},{prop:"binaryExpr",name:"binaryExpr",pkg:"go/printer",typ:$funcType([BE,$Int,$Int,$Int],[],false)},{prop:"expr1",name:"expr1",pkg:"go/printer",typ:$funcType([C.Expr,$Int,$Int],[],false)},{prop:"expr0",name:"expr0",pkg:"go/printer",typ:$funcType([C.Expr,$Int],[],false)},{prop:"expr",name:"expr",pkg:"go/printer",typ:$funcType([C.Expr],[],false)},{prop:"stmtList",name:"stmtList",pkg:"go/printer",typ:$funcType([DC,$Int,$Bool],[],false)},{prop:"block",name:"block",pkg:"go/printer",typ:$funcType([CI,$Int],[],false)},{prop:"controlClause",name:"controlClause",pkg:"go/printer",typ:$funcType([$Bool,C.Stmt,C.Expr,C.Stmt],[],false)},{prop:"indentList",name:"indentList",pkg:"go/printer",typ:$funcType([AU],[$Bool],false)},{prop:"stmt",name:"stmt",pkg:"go/printer",typ:$funcType([C.Stmt,$Bool],[],false)},{prop:"valueSpec",name:"valueSpec",pkg:"go/printer",typ:$funcType([CS,$Bool],[],false)},{prop:"spec",name:"spec",pkg:"go/printer",typ:$funcType([C.Spec,$Int,$Bool],[],false)},{prop:"genDecl",name:"genDecl",pkg:"go/printer",typ:$funcType([CW],[],false)},{prop:"nodeSize",name:"nodeSize",pkg:"go/printer",typ:$funcType([C.Node,$Int],[$Int],false)},{prop:"bodySize",name:"bodySize",pkg:"go/printer",typ:$funcType([CI,$Int],[$Int],false)},{prop:"adjBlock",name:"adjBlock",pkg:"go/printer",typ:$funcType([$Int,Z,CI],[],false)},{prop:"distanceFrom",name:"distanceFrom",pkg:"go/printer",typ:$funcType([D.Pos],[$Int],false)},{prop:"funcDecl",name:"funcDecl",pkg:"go/printer",typ:$funcType([CX],[],false)},{prop:"decl",name:"decl",pkg:"go/printer",typ:$funcType([C.Decl],[],false)},{prop:"declList",name:"declList",pkg:"go/printer",typ:$funcType([DD],[],false)},{prop:"file",name:"file",pkg:"go/printer",typ:$funcType([DA],[],false)},{prop:"init",name:"init",pkg:"go/printer",typ:$funcType([DH,DF,DI],[],false)},{prop:"internalError",name:"internalError",pkg:"go/printer",typ:$funcType([AR],[],true)},{prop:"commentsHaveNewline",name:"commentsHaveNewline",pkg:"go/printer",typ:$funcType([BB],[$Bool],false)},{prop:"nextComment",name:"nextComment",pkg:"go/printer",typ:$funcType([],[],false)},{prop:"commentBefore",name:"commentBefore",pkg:"go/printer",typ:$funcType([D.Position],[$Bool],false)},{prop:"commentSizeBefore",name:"commentSizeBefore",pkg:"go/printer",typ:$funcType([D.Position],[$Int],false)},{prop:"recordLine",name:"recordLine",pkg:"go/printer",typ:$funcType([BC],[],false)},{prop:"linesFrom",name:"linesFrom",pkg:"go/printer",typ:$funcType([$Int],[$Int],false)},{prop:"posFor",name:"posFor",pkg:"go/printer",typ:$funcType([D.Pos],[D.Position],false)},{prop:"lineFor",name:"lineFor",pkg:"go/printer",typ:$funcType([D.Pos],[$Int],false)},{prop:"atLineBegin",name:"atLineBegin",pkg:"go/printer",typ:$funcType([D.Position],[],false)},{prop:"writeByte",name:"writeByte",pkg:"go/printer",typ:$funcType([$Uint8,$Int],[],false)},{prop:"writeString",name:"writeString",pkg:"go/printer",typ:$funcType([D.Position,$String,$Bool],[],false)},{prop:"writeCommentPrefix",name:"writeCommentPrefix",pkg:"go/printer",typ:$funcType([D.Position,D.Position,BA,BA,D.Token],[],false)},{prop:"writeComment",name:"writeComment",pkg:"go/printer",typ:$funcType([BA],[],false)},{prop:"writeCommentSuffix",name:"writeCommentSuffix",pkg:"go/printer",typ:$funcType([$Bool],[$Bool,$Bool],false)},{prop:"intersperseComments",name:"intersperseComments",pkg:"go/printer",typ:$funcType([D.Position,D.Token],[$Bool,$Bool],false)},{prop:"writeWhitespace",name:"writeWhitespace",pkg:"go/printer",typ:$funcType([$Int],[],false)},{prop:"print",name:"print",pkg:"go/printer",typ:$funcType([AR],[],true)},{prop:"flush",name:"flush",pkg:"go/printer",typ:$funcType([D.Position,D.Token],[$Bool,$Bool],false)},{prop:"printNode",name:"printNode",pkg:"go/printer",typ:$funcType([$emptyInterface],[$error],false)}];DK.methods=[{prop:"resetSpace",name:"resetSpace",pkg:"go/printer",typ:$funcType([],[],false)},{prop:"Write",name:"Write",pkg:"",typ:$funcType([AQ],[$Int,$error],false)}];DH.methods=[{prop:"fprint",name:"fprint",pkg:"go/printer",typ:$funcType([G.Writer,DF,$emptyInterface,DI],[$error],false)},{prop:"Fprint",name:"Fprint",pkg:"",typ:$funcType([G.Writer,DF,$emptyInterface],[$error],false)}];AB.init([{prop:"cindex",name:"cindex",pkg:"go/printer",typ:$Int,tag:""},{prop:"comment",name:"comment",pkg:"go/printer",typ:AS,tag:""},{prop:"commentOffset",name:"commentOffset",pkg:"go/printer",typ:$Int,tag:""},{prop:"commentNewline",name:"commentNewline",pkg:"go/printer",typ:$Bool,tag:""}]);AC.init([{prop:"Config",name:"",pkg:"",typ:AN,tag:""},{prop:"fset",name:"fset",pkg:"go/printer",typ:DF,tag:""},{prop:"output",name:"output",pkg:"go/printer",typ:AQ,tag:""},{prop:"indent",name:"indent",pkg:"go/printer",typ:$Int,tag:""},{prop:"mode",name:"mode",pkg:"go/printer",typ:AA,tag:""},{prop:"impliedSemi",name:"impliedSemi",pkg:"go/printer",typ:$Bool,tag:""},{prop:"lastTok",name:"lastTok",pkg:"go/printer",typ:D.Token,tag:""},{prop:"prevOpen",name:"prevOpen",pkg:"go/printer",typ:D.Token,tag:""},{prop:"wsbuf",name:"wsbuf",pkg:"go/printer",typ:CY,tag:""},{prop:"pos",name:"pos",pkg:"go/printer",typ:D.Position,tag:""},{prop:"out",name:"out",pkg:"go/printer",typ:D.Position,tag:""},{prop:"last",name:"last",pkg:"go/printer",typ:D.Position,tag:""},{prop:"linePtr",name:"linePtr",pkg:"go/printer",typ:BC,tag:""},{prop:"comments",name:"comments",pkg:"go/printer",typ:AT,tag:""},{prop:"useNodeComments",name:"useNodeComments",pkg:"go/printer",typ:$Bool,tag:""},{prop:"commentInfo",name:"",pkg:"go/printer",typ:AB,tag:""},{prop:"nodeSizes",name:"nodeSizes",pkg:"go/printer",typ:DI,tag:""},{prop:"cachedPos",name:"cachedPos",pkg:"go/printer",typ:D.Pos,tag:""},{prop:"cachedLine",name:"cachedLine",pkg:"go/printer",typ:$Int,tag:""}]);AK.init([{prop:"output",name:"output",pkg:"go/printer",typ:G.Writer,tag:""},{prop:"state",name:"state",pkg:"go/printer",typ:$Int,tag:""},{prop:"space",name:"space",pkg:"go/printer",typ:AQ,tag:""}]);AN.init([{prop:"Mode",name:"Mode",pkg:"",typ:AM,tag:""},{prop:"Tabwidth",name:"Tabwidth",pkg:"",typ:$Int,tag:""},{prop:"Indent",name:"Indent",pkg:"",typ:$Int,tag:""}]);AO.init([{prop:"Node",name:"Node",pkg:"",typ:$emptyInterface,tag:""},{prop:"Comments",name:"Comments",pkg:"",typ:AT,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_printer=function(){while(true){switch($s){case 0:$r=B.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=F.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=G.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}$r=H.$init($BLOCKING);$s=6;case 6:if($r&&$r.$blocking){$r=$r();}$r=I.$init($BLOCKING);$s=7;case 7:if($r&&$r.$blocking){$r=$r();}$r=J.$init($BLOCKING);$s=8;case 8:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=9;case 9:if($r&&$r.$blocking){$r=$r();}$r=K.$init($BLOCKING);$s=10;case 10:if($r&&$r.$blocking){$r=$r();}$r=L.$init($BLOCKING);$s=11;case 11:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=12;case 12:if($r&&$r.$blocking){$r=$r();}AL=new AQ($stringToBytes("\n"));}return;}};$init_printer.$blocking=true;return $init_printer;};return $pkg;})(); +$packages["go/format"]=(function(){var $pkg={},A,B,C,D,E,F,G,H,P,U,I,K,M,N,O;A=$packages["bytes"];B=$packages["fmt"];C=$packages["go/ast"];D=$packages["go/parser"];E=$packages["go/printer"];F=$packages["go/token"];G=$packages["io"];H=$packages["strings"];P=$ptrType(C.File);U=$sliceType($Uint8);K=$pkg.Source=function(a){var a,b,c,d,e,f,g;b=F.NewFileSet();c=M(b,"",a,true);d=c[0];e=c[1];f=c[2];g=c[3];if(!($interfaceIsEqual(g,$ifaceNil))){return[U.nil,g];}if(e===$throwNilPointerError){C.SortImports(b,d);}return N(b,d,e,f,a,I);};M=function(a,b,c,d){var a,b,c,d,e=P.nil,f=$throwNilPointerError,g=0,h=$ifaceNil,i,j,k,l,m;i=D.ParseFile(a,b,c,4);e=i[0];h=i[1];if($interfaceIsEqual(h,$ifaceNil)||!d||!H.Contains(h.Error(),"expected 'package'")){return[e,f,g,h];}j=$appendSlice(new U($stringToBytes("package p;")),c);k=D.ParseFile(a,b,j,4);e=k[0];h=k[1];if($interfaceIsEqual(h,$ifaceNil)){f=(function(l,m){var l,m;l=$subslice(l,(m+10>>0));return A.TrimSpace(l);});return[e,f,g,h];}if(!H.Contains(h.Error(),"expected declaration")){return[e,f,g,h];}l=$append($appendSlice(new U($stringToBytes("package p; func _() {")),c),10,125);m=D.ParseFile(a,b,l,4);e=m[0];h=m[1];if($interfaceIsEqual(h,$ifaceNil)){f=(function(n,o){var n,o;if(o<0){o=0;}n=$subslice(n,((2*o>>0)+21>>0));n=$subslice(n,0,(n.$length-((o+3>>0))>>0));return A.TrimSpace(n);});g=-1;}return[e,f,g,h];};N=function(a,b,c,d,e,f){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;f=$clone(f,E.Config);if(c===$throwNilPointerError){g=$clone(new A.Buffer.ptr(),A.Buffer);h=f.Fprint(g,a,b);if(!($interfaceIsEqual(h,$ifaceNil))){return[U.nil,h];}return[g.Bytes(),$ifaceNil];}i=0;j=0;k=i;l=j;while(true){if(!(l=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+l])))){break;}if(((l<0||l>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+l])===10){k=l+1>>0;}l=l+(1)>>0;}m=U.nil;m=$appendSlice(m,$subslice(e,0,k));n=0;o=false;p=$subslice(e,k,l);q=0;while(true){if(!(q=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+q]);s=r;if(s===32){o=true;}else if(s===9){n=n+(1)>>0;}q++;}if((n===0)&&o){n=1;}t=0;while(true){if(!(t>0;}f.Indent=n+d>>0;u=$clone(new A.Buffer.ptr(),A.Buffer);v=f.Fprint(u,a,b);if(!($interfaceIsEqual(v,$ifaceNil))){return[U.nil,v];}m=$appendSlice(m,c(u.Bytes(),f.Indent));k=e.$length;while(true){if(!(k>0&&O((w=k-1>>0,((w<0||w>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+w]))))){break;}k=k-(1)>>0;}return[$appendSlice(m,$subslice(e,k)),$ifaceNil];};O=function(a){var a;return(a===32)||(a===9)||(a===10)||(a===13);};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_format=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}$r=F.$init($BLOCKING);$s=6;case 6:if($r&&$r.$blocking){$r=$r();}$r=G.$init($BLOCKING);$s=7;case 7:if($r&&$r.$blocking){$r=$r();}$r=H.$init($BLOCKING);$s=8;case 8:if($r&&$r.$blocking){$r=$r();}I=new E.Config.ptr(6,8,0);}return;}};$init_format.$blocking=true;return $init_format;};return $pkg;})(); +$packages["github.com/shurcooL/markdownfmt/markdown"]=(function(){var $pkg={},A,B,F,G,H,C,D,E,I,P,S,T,U,V,W,X,Y,Z,AA,AB,J,K,L,M,N,O,Q,R;A=$packages["bytes"];B=$packages["fmt"];F=$packages["github.com/mattn/go-runewidth"];G=$packages["github.com/russross/blackfriday"];H=$packages["github.com/shurcooL/go/indentwriter"];C=$packages["go/format"];D=$packages["io/ioutil"];E=$packages["strings"];I=$pkg.markdownRenderer=$newType(0,$kindStruct,"markdown.markdownRenderer","markdownRenderer","github.com/shurcooL/markdownfmt/markdown",function(normalTextMarker_,orderedListCounter_,paragraph_,listDepth_,lastNormalText_,headers_,columnAligns_,columnWidths_,cells_){this.$val=this;this.normalTextMarker=normalTextMarker_!==undefined?normalTextMarker_:false;this.orderedListCounter=orderedListCounter_!==undefined?orderedListCounter_:false;this.paragraph=paragraph_!==undefined?paragraph_:false;this.listDepth=listDepth_!==undefined?listDepth_:0;this.lastNormalText=lastNormalText_!==undefined?lastNormalText_:"";this.headers=headers_!==undefined?headers_:U.nil;this.columnAligns=columnAligns_!==undefined?columnAligns_:V.nil;this.columnWidths=columnWidths_!==undefined?columnWidths_:V.nil;this.cells=cells_!==undefined?cells_:U.nil;});P=$pkg.Options=$newType(0,$kindStruct,"markdown.Options","Options","github.com/shurcooL/markdownfmt/markdown",function(){this.$val=this;});S=$sliceType($Uint8);T=$sliceType($emptyInterface);U=$sliceType($String);V=$sliceType($Int);W=$ptrType(A.Buffer);X=$funcType([],[$Bool],false);Y=$ptrType(I);Z=$mapType(W,$Int);AA=$mapType($Int,$Int);AB=$mapType($Int,$Bool);J=function(a,b){var a,b,c=S.nil,d=false,e,f,g,h,i,j,k,l,m,n;e=a;if(e==="Go"||e==="go"){f=C.Source(b);g=f[0];h=f[1];if(!($interfaceIsEqual(h,$ifaceNil))){i=S.nil;j=false;c=i;d=j;return[c,d];}k=g;l=true;c=k;d=l;return[c,d];}else{m=S.nil;n=false;c=m;d=n;return[c,d];}};I.ptr.prototype.BlockCode=function(a,b,c){var a,b,c,d,e,f,g,h,i,j;N(a);d=0;e=E.Fields(c);f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);if(g.charCodeAt(0)===46){g=g.substring(1);}if(g.length===0){f++;continue;}a.WriteString("```");a.WriteString(g);d=d+(1)>>0;break;}if(d===0){a.WriteString("```");}a.WriteString("\n");h=J(c,b);i=h[0];j=h[1];if(j){a.Write(i);}else{a.Write(b);}a.WriteString("```\n");};I.prototype.BlockCode=function(a,b,c){return this.$val.BlockCode(a,b,c);};I.ptr.prototype.BlockQuote=function(a,b){var a,b,c,d,e,f,g;N(a);c=A.Split(b,new S($stringToBytes("\n")));d=c;e=0;while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]);if(f===(c.$length-1>>0)){e++;continue;}a.WriteString(">");if(!((g.$length===0))){a.WriteString(" ");a.Write(g);}a.WriteString("\n");e++;}};I.prototype.BlockQuote=function(a,b){return this.$val.BlockQuote(a,b);};I.ptr.prototype.BlockHtml=function(a,b){var a,b;N(a);a.Write(b);a.WriteByte(10);};I.prototype.BlockHtml=function(a,b){return this.$val.BlockHtml(a,b);};I.ptr.prototype.TitleBlock=function(a,b){var a,b;};I.prototype.TitleBlock=function(a,b){return this.$val.TitleBlock(a,b);};I.ptr.prototype.Header=function(a,b,c,d){var a,b,c,d,e,f,g,h,i;e=a.Len();N(a);if(c>=3){B.Fprint(a,new T([new $String(E.Repeat("#",c)),new $String(" ")]));}f=a.Len();if(!b()){a.Truncate(e);return;}g=c;if(g===1){h=F.StringWidth(a.String().substring(f));B.Fprint(a,new T([new $String("\n"),new $String(E.Repeat("=",h))]));}else if(g===2){i=F.StringWidth(a.String().substring(f));B.Fprint(a,new T([new $String("\n"),new $String(E.Repeat("-",i))]));}a.WriteString("\n");};I.prototype.Header=function(a,b,c,d){return this.$val.Header(a,b,c,d);};I.ptr.prototype.HRule=function(a){var a;N(a);a.WriteString("---\n");};I.prototype.HRule=function(a){return this.$val.HRule(a);};I.ptr.prototype.List=function(a,b,c){var $deferred=[],$err=null,a,b,c,d,e,f;try{$deferFrames.push($deferred);d=this;e=a.Len();N(a);d.listDepth=d.listDepth+(1)>>0;$deferred.push([(function(){d.listDepth=d.listDepth-(1)>>0;}),[]]);if(!(((c&1)===0))){f=d.listDepth;(d.orderedListCounter||$throwRuntimeError("assignment to entry in nil map"))[f]={k:f,v:1};}if(!b()){a.Truncate(e);return;}}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};I.prototype.List=function(a,b,c){return this.$val.List(a,b,c);};I.ptr.prototype.ListItem=function(a,b,c){var a,b,c,d,e,f,g,h,i;d=this;if(!(((c&1)===0))){B.Fprintf(a,"%d.",new T([new $Int((e=d.orderedListCounter[d.listDepth],e!==undefined?e.v:0))]));H.New(a,1).Write(b);f=d.listDepth;(d.orderedListCounter||$throwRuntimeError("assignment to entry in nil map"))[f]={k:f,v:(g=d.orderedListCounter[d.listDepth],g!==undefined?g.v:0)+(1)>>0};}else{a.WriteString("-");H.New(a,1).Write(b);}a.WriteString("\n");if((h=d.paragraph[d.listDepth],h!==undefined?h.v:false)){if((c&8)===0){a.WriteString("\n");}i=d.listDepth;(d.paragraph||$throwRuntimeError("assignment to entry in nil map"))[i]={k:i,v:false};}};I.prototype.ListItem=function(a,b,c){return this.$val.ListItem(a,b,c);};I.ptr.prototype.Paragraph=function(a,b){var a,b,c,d,e;c=this;d=a.Len();N(a);e=c.listDepth;(c.paragraph||$throwRuntimeError("assignment to entry in nil map"))[e]={k:e,v:true};if(!b()){a.Truncate(d);return;}a.WriteString("\n");};I.prototype.Paragraph=function(a,b){return this.$val.Paragraph(a,b);};I.ptr.prototype.Table=function(a,b,c,d){var a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;e=this;N(a);f=e.headers;g=0;while(true){if(!(g=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]);a.WriteByte(124);a.WriteByte(32);a.WriteString(i);j=F.StringWidth(i);while(true){if(!(j<(k=e.columnWidths,((h<0||h>=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+h])))){break;}a.WriteByte(32);j=j+(1)>>0;}a.WriteByte(32);g++;}a.WriteString("|\n");l=e.columnWidths;m=0;while(true){if(!(m=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+m]);a.WriteByte(124);if(!((((p=e.columnAligns,((n<0||n>=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+n]))&1)===0))){a.WriteByte(58);}else{a.WriteByte(45);}while(true){if(!(o>0)){break;}a.WriteByte(45);o=o-(1)>>0;}if(!((((q=e.columnAligns,((n<0||n>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+n]))&2)===0))){a.WriteByte(58);}else{a.WriteByte(45);}m++;}a.WriteString("|\n");r=0;while(true){if(!(r=v.$length)?$throwRuntimeError("index out of range"):v.$array[v.$offset+r]))));r=r+(1)>>0;a.WriteByte(124);a.WriteByte(32);x=(y=e.columnAligns,((u<0||u>=y.$length)?$throwRuntimeError("index out of range"):y.$array[y.$offset+u]));if(x===1){a.Write(w);z=F.StringWidth($bytesToString(w));while(true){if(!(z<(aa=e.columnWidths,((u<0||u>=aa.$length)?$throwRuntimeError("index out of range"):aa.$array[aa.$offset+u])))){break;}a.WriteByte(32);z=z+(1)>>0;}}else if(x===3){ac=(ab=e.columnWidths,((u<0||u>=ab.$length)?$throwRuntimeError("index out of range"):ab.$array[ab.$offset+u]))-F.StringWidth($bytesToString(w))>>0;ad=0;while(true){if(!(ad<(ae=ac/2,(ae===ae&&ae!==1/0&&ae!==-1/0)?ae>>0:$throwRuntimeError("integer divide by zero")))){break;}a.WriteByte(32);ad=ad+(1)>>0;}a.Write(w);af=0;while(true){if(!(af<(ac-((ag=ac/2,(ag===ag&&ag!==1/0&&ag!==-1/0)?ag>>0:$throwRuntimeError("integer divide by zero")))>>0))){break;}a.WriteByte(32);af=af+(1)>>0;}}else if(x===2){ah=F.StringWidth($bytesToString(w));while(true){if(!(ah<(ai=e.columnWidths,((u<0||u>=ai.$length)?$throwRuntimeError("index out of range"):ai.$array[ai.$offset+u])))){break;}a.WriteByte(32);ah=ah+(1)>>0;}a.Write(w);}else{a.Write(w);z=F.StringWidth($bytesToString(w));while(true){if(!(z<(aj=e.columnWidths,((u<0||u>=aj.$length)?$throwRuntimeError("index out of range"):aj.$array[aj.$offset+u])))){break;}a.WriteByte(32);z=z+(1)>>0;}}a.WriteByte(32);t++;}a.WriteString("|\n");}e.headers=U.nil;e.columnAligns=V.nil;e.columnWidths=V.nil;e.cells=U.nil;};I.prototype.Table=function(a,b,c,d){return this.$val.Table(a,b,c,d);};I.ptr.prototype.TableRow=function(a,b){var a,b;};I.prototype.TableRow=function(a,b){return this.$val.TableRow(a,b);};I.ptr.prototype.TableHeaderCell=function(a,b,c){var a,b,c,d,e;d=this;d.columnAligns=$append(d.columnAligns,c);e=F.StringWidth($bytesToString(b));d.columnWidths=$append(d.columnWidths,e);d.headers=$append(d.headers,$bytesToString(b));};I.prototype.TableHeaderCell=function(a,b,c){return this.$val.TableHeaderCell(a,b,c);};I.ptr.prototype.TableCell=function(a,b,c){var a,b,c,d,e,f,g,h,i;d=this;e=F.StringWidth($bytesToString(b));g=(f=d.cells.$length%d.headers.$length,f===f?f:$throwRuntimeError("integer divide by zero"));if(e>(h=d.columnWidths,((g<0||g>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+g]))){(i=d.columnWidths,(g<0||g>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+g]=e);}d.cells=$append(d.cells,$bytesToString(b));};I.prototype.TableCell=function(a,b,c){return this.$val.TableCell(a,b,c);};I.ptr.prototype.Footnotes=function(a,b){var a,b;a.WriteString("");};I.prototype.Footnotes=function(a,b){return this.$val.Footnotes(a,b);};I.ptr.prototype.FootnoteItem=function(a,b,c,d){var a,b,c,d;a.WriteString("");};I.prototype.FootnoteItem=function(a,b,c,d){return this.$val.FootnoteItem(a,b,c,d);};I.ptr.prototype.AutoLink=function(a,b,c){var a,b,c;a.Write(b);};I.prototype.AutoLink=function(a,b,c){return this.$val.AutoLink(a,b,c);};I.ptr.prototype.CodeSpan=function(a,b){var a,b;a.WriteByte(96);a.Write(b);a.WriteByte(96);};I.prototype.CodeSpan=function(a,b){return this.$val.CodeSpan(a,b);};I.ptr.prototype.DoubleEmphasis=function(a,b){var a,b;a.WriteString("**");a.Write(b);a.WriteString("**");};I.prototype.DoubleEmphasis=function(a,b){return this.$val.DoubleEmphasis(a,b);};I.ptr.prototype.Emphasis=function(a,b){var a,b;if(b.$length===0){return;}a.WriteByte(42);a.Write(b);a.WriteByte(42);};I.prototype.Emphasis=function(a,b){return this.$val.Emphasis(a,b);};I.ptr.prototype.Image=function(a,b,c,d){var a,b,c,d;a.WriteString("![");a.Write(d);a.WriteString("](");a.Write(b);a.WriteString(")");};I.prototype.Image=function(a,b,c,d){return this.$val.Image(a,b,c,d);};I.ptr.prototype.LineBreak=function(a){var a;a.WriteString(" \n");};I.prototype.LineBreak=function(a){return this.$val.LineBreak(a);};I.ptr.prototype.Link=function(a,b,c,d){var a,b,c,d;a.WriteString("[");a.Write(d);a.WriteString("](");a.Write(b);a.WriteString(")");};I.prototype.Link=function(a,b,c,d){return this.$val.Link(a,b,c,d);};I.ptr.prototype.RawHtmlTag=function(a,b){var a,b;a.Write(b);};I.prototype.RawHtmlTag=function(a,b){return this.$val.RawHtmlTag(a,b);};I.ptr.prototype.TripleEmphasis=function(a,b){var a,b;a.WriteString("***");a.Write(b);a.WriteString("***");};I.prototype.TripleEmphasis=function(a,b){return this.$val.TripleEmphasis(a,b);};I.ptr.prototype.StrikeThrough=function(a,b){var a,b;a.WriteString("~~");a.Write(b);a.WriteString("~~");};I.prototype.StrikeThrough=function(a,b){return this.$val.StrikeThrough(a,b);};I.ptr.prototype.FootnoteRef=function(a,b,c){var a,b,c;a.WriteString("");};I.prototype.FootnoteRef=function(a,b,c){return this.$val.FootnoteRef(a,b,c);};K=function(a){var a,b,c,d;b=a;c=0;while(true){if(!(c=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+c]);if(d<48||d>57){return false;}c++;}return true;};L=function(a,b){var a,b,c;c=$bytesToString(a);if(c==="\\"||c==="`"||c==="*"||c==="_"||c==="{"||c==="}"||c==="["||c==="]"||c==="("||c===")"||c==="#"||c==="+"||c==="-"){return true;}else if(c==="!"){return false;}else if(c==="."){return K(new S($stringToBytes(b)));}else if(c==="<"||c===">"){return true;}else{return false;}};I.ptr.prototype.Entity=function(a,b){var a,b;a.Write(b);};I.prototype.Entity=function(a,b){return this.$val.Entity(a,b);};I.ptr.prototype.NormalText=function(a,b){var a,b,c,d,e,f;c=this;d=$bytesToString(b);if(L(b,c.lastNormalText)){b=$appendSlice(new S($stringToBytes("\\")),b);}c.lastNormalText=d;if($bytesToString(b)==="\n"){return;}e=M($bytesToString(b));if(e===""){return;}if(c.skipSpaceIfNeededNormalText(a,e)){e=e.substring(1);}a.WriteString(e);if(e.length>=1&&(e.charCodeAt((e.length-1>>0))===32)){f=a;(c.normalTextMarker||$throwRuntimeError("assignment to entry in nil map"))[f.$key()]={k:f,v:a.Len()};}};I.prototype.NormalText=function(a,b){return this.$val.NormalText(a,b);};I.ptr.prototype.DocumentHeader=function(a){var a;};I.prototype.DocumentHeader=function(a){return this.$val.DocumentHeader(a);};I.ptr.prototype.DocumentFooter=function(a){var a;};I.prototype.DocumentFooter=function(a){return this.$val.DocumentFooter(a);};I.ptr.prototype.GetFlags=function(){return 0;};I.prototype.GetFlags=function(){return this.$val.GetFlags();};I.ptr.prototype.skipSpaceIfNeededNormalText=function(a,b){var a,b,c,d,e,f,g,h;c=this;if(!((b.charCodeAt(0)===32))){return false;}d=(e=c.normalTextMarker[a.$key()],e!==undefined?[e.v,true]:[0,false]);f=d[1];if(!f){g=a;(c.normalTextMarker||$throwRuntimeError("assignment to entry in nil map"))[g.$key()]={k:g,v:-1};}return(h=c.normalTextMarker[a.$key()],h!==undefined?h.v:0)===a.Len();};I.prototype.skipSpaceIfNeededNormalText=function(a,b){return this.$val.skipSpaceIfNeededNormalText(a,b);};M=function(a){var a,b,c,d,e;b=S.nil;c=0;d=0;while(true){if(!(d>0;}return $bytesToString(b);};N=function(a){var a;if(a.Len()>0){a.WriteByte(10);}};O=$pkg.NewRenderer=function(){return new I.ptr(new $Map(),new $Map(),new $Map(),0,"",U.nil,V.nil,V.nil,U.nil);};Q=$pkg.Process=function(a,b,c){var a,b,c,d,e,f,g,h;d=R(a,b);e=d[0];f=d[1];if(!($interfaceIsEqual(f,$ifaceNil))){return[S.nil,f];}g=0;g=g|(1);g=g|(2);g=g|(4);g=g|(8);g=g|(16);g=g|(64);h=G.Markdown(e,O(),g);return[h,$ifaceNil];};R=function(a,b){var a,b;if(!(b===S.nil)){return[b,$ifaceNil];}return D.ReadFile(a);};Y.methods=[{prop:"BlockCode",name:"BlockCode",pkg:"",typ:$funcType([W,S,$String],[],false)},{prop:"BlockQuote",name:"BlockQuote",pkg:"",typ:$funcType([W,S],[],false)},{prop:"BlockHtml",name:"BlockHtml",pkg:"",typ:$funcType([W,S],[],false)},{prop:"TitleBlock",name:"TitleBlock",pkg:"",typ:$funcType([W,S],[],false)},{prop:"Header",name:"Header",pkg:"",typ:$funcType([W,X,$Int,$String],[],false)},{prop:"HRule",name:"HRule",pkg:"",typ:$funcType([W],[],false)},{prop:"List",name:"List",pkg:"",typ:$funcType([W,X,$Int],[],false)},{prop:"ListItem",name:"ListItem",pkg:"",typ:$funcType([W,S,$Int],[],false)},{prop:"Paragraph",name:"Paragraph",pkg:"",typ:$funcType([W,X],[],false)},{prop:"Table",name:"Table",pkg:"",typ:$funcType([W,S,S,V],[],false)},{prop:"TableRow",name:"TableRow",pkg:"",typ:$funcType([W,S],[],false)},{prop:"TableHeaderCell",name:"TableHeaderCell",pkg:"",typ:$funcType([W,S,$Int],[],false)},{prop:"TableCell",name:"TableCell",pkg:"",typ:$funcType([W,S,$Int],[],false)},{prop:"Footnotes",name:"Footnotes",pkg:"",typ:$funcType([W,X],[],false)},{prop:"FootnoteItem",name:"FootnoteItem",pkg:"",typ:$funcType([W,S,S,$Int],[],false)},{prop:"AutoLink",name:"AutoLink",pkg:"",typ:$funcType([W,S,$Int],[],false)},{prop:"CodeSpan",name:"CodeSpan",pkg:"",typ:$funcType([W,S],[],false)},{prop:"DoubleEmphasis",name:"DoubleEmphasis",pkg:"",typ:$funcType([W,S],[],false)},{prop:"Emphasis",name:"Emphasis",pkg:"",typ:$funcType([W,S],[],false)},{prop:"Image",name:"Image",pkg:"",typ:$funcType([W,S,S,S],[],false)},{prop:"LineBreak",name:"LineBreak",pkg:"",typ:$funcType([W],[],false)},{prop:"Link",name:"Link",pkg:"",typ:$funcType([W,S,S,S],[],false)},{prop:"RawHtmlTag",name:"RawHtmlTag",pkg:"",typ:$funcType([W,S],[],false)},{prop:"TripleEmphasis",name:"TripleEmphasis",pkg:"",typ:$funcType([W,S],[],false)},{prop:"StrikeThrough",name:"StrikeThrough",pkg:"",typ:$funcType([W,S],[],false)},{prop:"FootnoteRef",name:"FootnoteRef",pkg:"",typ:$funcType([W,S,$Int],[],false)},{prop:"Entity",name:"Entity",pkg:"",typ:$funcType([W,S],[],false)},{prop:"NormalText",name:"NormalText",pkg:"",typ:$funcType([W,S],[],false)},{prop:"DocumentHeader",name:"DocumentHeader",pkg:"",typ:$funcType([W],[],false)},{prop:"DocumentFooter",name:"DocumentFooter",pkg:"",typ:$funcType([W],[],false)},{prop:"GetFlags",name:"GetFlags",pkg:"",typ:$funcType([],[$Int],false)},{prop:"skipSpaceIfNeededNormalText",name:"skipSpaceIfNeededNormalText",pkg:"github.com/shurcooL/markdownfmt/markdown",typ:$funcType([W,$String],[$Bool],false)}];I.init([{prop:"normalTextMarker",name:"normalTextMarker",pkg:"github.com/shurcooL/markdownfmt/markdown",typ:Z,tag:""},{prop:"orderedListCounter",name:"orderedListCounter",pkg:"github.com/shurcooL/markdownfmt/markdown",typ:AA,tag:""},{prop:"paragraph",name:"paragraph",pkg:"github.com/shurcooL/markdownfmt/markdown",typ:AB,tag:""},{prop:"listDepth",name:"listDepth",pkg:"github.com/shurcooL/markdownfmt/markdown",typ:$Int,tag:""},{prop:"lastNormalText",name:"lastNormalText",pkg:"github.com/shurcooL/markdownfmt/markdown",typ:$String,tag:""},{prop:"headers",name:"headers",pkg:"github.com/shurcooL/markdownfmt/markdown",typ:U,tag:""},{prop:"columnAligns",name:"columnAligns",pkg:"github.com/shurcooL/markdownfmt/markdown",typ:V,tag:""},{prop:"columnWidths",name:"columnWidths",pkg:"github.com/shurcooL/markdownfmt/markdown",typ:V,tag:""},{prop:"cells",name:"cells",pkg:"github.com/shurcooL/markdownfmt/markdown",typ:U,tag:""}]);P.init([]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_markdown=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=F.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=G.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=H.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=6;case 6:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=7;case 7:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=8;case 8:if($r&&$r.$blocking){$r=$r();}}return;}};$init_markdown.$blocking=true;return $init_markdown;};return $pkg;})(); +$packages["main"]=(function(){var $pkg={},A,B,D,E,F,C;A=$packages["fmt"];B=$packages["github.com/shurcooL/markdownfmt/markdown"];D=$sliceType($Uint8);E=$ptrType(B.Options);F=$sliceType($emptyInterface);C=function(){var a,b,c,d;a=new D($stringToBytes("Title\n=\n\nThis is a new paragraph. I wonder if I have too many spaces.\nWhat about new paragraph.\nBut the next one...\n\n Is really new.\n\n1. Item one.\n1. Item TWO.\n\n\nFinal paragraph.\n"));b=B.Process("",a,E.nil);c=b[0];d=b[1];if(!($interfaceIsEqual(d,$ifaceNil))){$panic(d);}A.Println(new F([new $String($bytesToString(c))]));};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_main=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}C();}return;}};$init_main.$blocking=true;return $init_main;};return $pkg;})(); +$synthesizeMethods(); +$packages["runtime"].$init()(); +$go($packages["main"].$init, [], true); +$flushConsole(); + +}).call(this); +//# sourceMappingURL=markdownfmt_min.js.map diff --git a/104/build/markdownfmt_min.js.gz b/104/build/markdownfmt_min.js.gz new file mode 100644 index 0000000..2d6c071 Binary files /dev/null and b/104/build/markdownfmt_min.js.gz differ diff --git a/104/build/peg_solitaire_solver b/104/build/peg_solitaire_solver new file mode 100755 index 0000000..2779fe3 Binary files /dev/null and b/104/build/peg_solitaire_solver differ diff --git a/104/build/peg_solitaire_solver.js b/104/build/peg_solitaire_solver.js new file mode 100644 index 0000000..c5bc635 --- /dev/null +++ b/104/build/peg_solitaire_solver.js @@ -0,0 +1,13004 @@ +"use strict"; +(function() { + +Error.stackTraceLimit = Infinity; + +var $global, $module; +if (typeof window !== "undefined") { /* web page */ + $global = window; +} else if (typeof self !== "undefined") { /* web worker */ + $global = self; +} else if (typeof global !== "undefined") { /* Node.js */ + $global = global; + $global.require = require; +} else { /* others (e.g. Nashorn) */ + $global = this; +} + +if ($global === undefined || $global.Array === undefined) { + throw new Error("no global object found"); +} +if (typeof module !== "undefined") { + $module = module; +} + +var $packages = {}, $idCounter = 0; +var $keys = function(m) { return m ? Object.keys(m) : []; }; +var $min = Math.min; +var $mod = function(x, y) { return x % y; }; +var $parseInt = parseInt; +var $parseFloat = function(f) { + if (f !== undefined && f !== null && f.constructor === Number) { + return f; + } + return parseFloat(f); +}; +var $flushConsole = function() {}; +var $throwRuntimeError; /* set by package "runtime" */ +var $throwNilPointerError = function() { $throwRuntimeError("invalid memory address or nil pointer dereference"); }; + +var $mapArray = function(array, f) { + var newArray = new array.constructor(array.length); + for (var i = 0; i < array.length; i++) { + newArray[i] = f(array[i]); + } + return newArray; +}; + +var $methodVal = function(recv, name) { + var vals = recv.$methodVals || {}; + recv.$methodVals = vals; /* noop for primitives */ + var f = vals[name]; + if (f !== undefined) { + return f; + } + var method = recv[name]; + f = function() { + $stackDepthOffset--; + try { + return method.apply(recv, arguments); + } finally { + $stackDepthOffset++; + } + }; + vals[name] = f; + return f; +}; + +var $methodExpr = function(method) { + if (method.$expr === undefined) { + method.$expr = function() { + $stackDepthOffset--; + try { + return Function.call.apply(method, arguments); + } finally { + $stackDepthOffset++; + } + }; + } + return method.$expr; +}; + +var $subslice = function(slice, low, high, max) { + if (low < 0 || high < low || max < high || high > slice.$capacity || max > slice.$capacity) { + $throwRuntimeError("slice bounds out of range"); + } + var s = new slice.constructor(slice.$array); + s.$offset = slice.$offset + low; + s.$length = slice.$length - low; + s.$capacity = slice.$capacity - low; + if (high !== undefined) { + s.$length = high - low; + } + if (max !== undefined) { + s.$capacity = max - low; + } + return s; +}; + +var $sliceToArray = function(slice) { + if (slice.$length === 0) { + return []; + } + if (slice.$array.constructor !== Array) { + return slice.$array.subarray(slice.$offset, slice.$offset + slice.$length); + } + return slice.$array.slice(slice.$offset, slice.$offset + slice.$length); +}; + +var $decodeRune = function(str, pos) { + var c0 = str.charCodeAt(pos); + + if (c0 < 0x80) { + return [c0, 1]; + } + + if (c0 !== c0 || c0 < 0xC0) { + return [0xFFFD, 1]; + } + + var c1 = str.charCodeAt(pos + 1); + if (c1 !== c1 || c1 < 0x80 || 0xC0 <= c1) { + return [0xFFFD, 1]; + } + + if (c0 < 0xE0) { + var r = (c0 & 0x1F) << 6 | (c1 & 0x3F); + if (r <= 0x7F) { + return [0xFFFD, 1]; + } + return [r, 2]; + } + + var c2 = str.charCodeAt(pos + 2); + if (c2 !== c2 || c2 < 0x80 || 0xC0 <= c2) { + return [0xFFFD, 1]; + } + + if (c0 < 0xF0) { + var r = (c0 & 0x0F) << 12 | (c1 & 0x3F) << 6 | (c2 & 0x3F); + if (r <= 0x7FF) { + return [0xFFFD, 1]; + } + if (0xD800 <= r && r <= 0xDFFF) { + return [0xFFFD, 1]; + } + return [r, 3]; + } + + var c3 = str.charCodeAt(pos + 3); + if (c3 !== c3 || c3 < 0x80 || 0xC0 <= c3) { + return [0xFFFD, 1]; + } + + if (c0 < 0xF8) { + var r = (c0 & 0x07) << 18 | (c1 & 0x3F) << 12 | (c2 & 0x3F) << 6 | (c3 & 0x3F); + if (r <= 0xFFFF || 0x10FFFF < r) { + return [0xFFFD, 1]; + } + return [r, 4]; + } + + return [0xFFFD, 1]; +}; + +var $encodeRune = function(r) { + if (r < 0 || r > 0x10FFFF || (0xD800 <= r && r <= 0xDFFF)) { + r = 0xFFFD; + } + if (r <= 0x7F) { + return String.fromCharCode(r); + } + if (r <= 0x7FF) { + return String.fromCharCode(0xC0 | r >> 6, 0x80 | (r & 0x3F)); + } + if (r <= 0xFFFF) { + return String.fromCharCode(0xE0 | r >> 12, 0x80 | (r >> 6 & 0x3F), 0x80 | (r & 0x3F)); + } + return String.fromCharCode(0xF0 | r >> 18, 0x80 | (r >> 12 & 0x3F), 0x80 | (r >> 6 & 0x3F), 0x80 | (r & 0x3F)); +}; + +var $stringToBytes = function(str) { + var array = new Uint8Array(str.length); + for (var i = 0; i < str.length; i++) { + array[i] = str.charCodeAt(i); + } + return array; +}; + +var $bytesToString = function(slice) { + if (slice.$length === 0) { + return ""; + } + var str = ""; + for (var i = 0; i < slice.$length; i += 10000) { + str += String.fromCharCode.apply(null, slice.$array.subarray(slice.$offset + i, slice.$offset + Math.min(slice.$length, i + 10000))); + } + return str; +}; + +var $stringToRunes = function(str) { + var array = new Int32Array(str.length); + var rune, j = 0; + for (var i = 0; i < str.length; i += rune[1], j++) { + rune = $decodeRune(str, i); + array[j] = rune[0]; + } + return array.subarray(0, j); +}; + +var $runesToString = function(slice) { + if (slice.$length === 0) { + return ""; + } + var str = ""; + for (var i = 0; i < slice.$length; i++) { + str += $encodeRune(slice.$array[slice.$offset + i]); + } + return str; +}; + +var $copyString = function(dst, src) { + var n = Math.min(src.length, dst.$length); + for (var i = 0; i < n; i++) { + dst.$array[dst.$offset + i] = src.charCodeAt(i); + } + return n; +}; + +var $copySlice = function(dst, src) { + var n = Math.min(src.$length, dst.$length); + $internalCopy(dst.$array, src.$array, dst.$offset, src.$offset, n, dst.constructor.elem); + return n; +}; + +var $copy = function(dst, src, typ) { + switch (typ.kind) { + case $kindArray: + $internalCopy(dst, src, 0, 0, src.length, typ.elem); + break; + case $kindStruct: + for (var i = 0; i < typ.fields.length; i++) { + var f = typ.fields[i]; + switch (f.typ.kind) { + case $kindArray: + case $kindStruct: + $copy(dst[f.prop], src[f.prop], f.typ); + continue; + default: + dst[f.prop] = src[f.prop]; + continue; + } + } + break; + } +}; + +var $internalCopy = function(dst, src, dstOffset, srcOffset, n, elem) { + if (n === 0 || (dst === src && dstOffset === srcOffset)) { + return; + } + + if (src.subarray) { + dst.set(src.subarray(srcOffset, srcOffset + n), dstOffset); + return; + } + + switch (elem.kind) { + case $kindArray: + case $kindStruct: + if (dst === src && dstOffset > srcOffset) { + for (var i = n - 1; i >= 0; i--) { + $copy(dst[dstOffset + i], src[srcOffset + i], elem); + } + return; + } + for (var i = 0; i < n; i++) { + $copy(dst[dstOffset + i], src[srcOffset + i], elem); + } + return; + } + + if (dst === src && dstOffset > srcOffset) { + for (var i = n - 1; i >= 0; i--) { + dst[dstOffset + i] = src[srcOffset + i]; + } + return; + } + for (var i = 0; i < n; i++) { + dst[dstOffset + i] = src[srcOffset + i]; + } +}; + +var $clone = function(src, type) { + var clone = type.zero(); + $copy(clone, src, type); + return clone; +}; + +var $pointerOfStructConversion = function(obj, type) { + if(obj.$proxies === undefined) { + obj.$proxies = {}; + obj.$proxies[obj.constructor.string] = obj; + } + var proxy = obj.$proxies[type.string]; + if (proxy === undefined) { + var properties = {}; + for (var i = 0; i < type.elem.fields.length; i++) { + (function(fieldProp) { + properties[fieldProp] = { + get: function() { return obj[fieldProp]; }, + set: function(value) { obj[fieldProp] = value; }, + }; + })(type.elem.fields[i].prop); + } + proxy = Object.create(type.prototype, properties); + proxy.$val = proxy; + obj.$proxies[type.string] = proxy; + proxy.$proxies = obj.$proxies; + } + return proxy; +}; + +var $append = function(slice) { + return $internalAppend(slice, arguments, 1, arguments.length - 1); +}; + +var $appendSlice = function(slice, toAppend) { + return $internalAppend(slice, toAppend.$array, toAppend.$offset, toAppend.$length); +}; + +var $internalAppend = function(slice, array, offset, length) { + if (length === 0) { + return slice; + } + + var newArray = slice.$array; + var newOffset = slice.$offset; + var newLength = slice.$length + length; + var newCapacity = slice.$capacity; + + if (newLength > newCapacity) { + newOffset = 0; + newCapacity = Math.max(newLength, slice.$capacity < 1024 ? slice.$capacity * 2 : Math.floor(slice.$capacity * 5 / 4)); + + if (slice.$array.constructor === Array) { + newArray = slice.$array.slice(slice.$offset, slice.$offset + slice.$length); + newArray.length = newCapacity; + var zero = slice.constructor.elem.zero; + for (var i = slice.$length; i < newCapacity; i++) { + newArray[i] = zero(); + } + } else { + newArray = new slice.$array.constructor(newCapacity); + newArray.set(slice.$array.subarray(slice.$offset, slice.$offset + slice.$length)); + } + } + + $internalCopy(newArray, array, newOffset + slice.$length, offset, length, slice.constructor.elem); + + var newSlice = new slice.constructor(newArray); + newSlice.$offset = newOffset; + newSlice.$length = newLength; + newSlice.$capacity = newCapacity; + return newSlice; +}; + +var $equal = function(a, b, type) { + if (type === $js.Object) { + return a === b; + } + switch (type.kind) { + case $kindFloat32: + return $float32IsEqual(a, b); + case $kindComplex64: + return $float32IsEqual(a.$real, b.$real) && $float32IsEqual(a.$imag, b.$imag); + case $kindComplex128: + return a.$real === b.$real && a.$imag === b.$imag; + case $kindInt64: + case $kindUint64: + return a.$high === b.$high && a.$low === b.$low; + case $kindPtr: + if (a.constructor.elem) { + return a === b; + } + return $pointerIsEqual(a, b); + case $kindArray: + if (a.length != b.length) { + return false; + } + for (var i = 0; i < a.length; i++) { + if (!$equal(a[i], b[i], type.elem)) { + return false; + } + } + return true; + case $kindStruct: + for (var i = 0; i < type.fields.length; i++) { + var f = type.fields[i]; + if (!$equal(a[f.prop], b[f.prop], f.typ)) { + return false; + } + } + return true; + case $kindInterface: + return $interfaceIsEqual(a, b); + default: + return a === b; + } +}; + +var $interfaceIsEqual = function(a, b) { + if (a === $ifaceNil || b === $ifaceNil) { + return a === b; + } + if (a.constructor !== b.constructor) { + return false; + } + if (!a.constructor.comparable) { + $throwRuntimeError("comparing uncomparable type " + a.constructor.string); + } + return $equal(a.$val, b.$val, a.constructor); +}; + +var $float32IsEqual = function(a, b) { + if (a === b) { + return true; + } + if (a === 1/0 || b === 1/0 || a === -1/0 || b === -1/0 || a !== a || b !== b) { + return false; + } + var math = $packages["math"]; + return math !== undefined && math.Float32bits(a) === math.Float32bits(b); +}; + +var $pointerIsEqual = function(a, b) { + if (a === b) { + return true; + } + if (a.$get === $throwNilPointerError || b.$get === $throwNilPointerError) { + return a.$get === $throwNilPointerError && b.$get === $throwNilPointerError; + } + var va = a.$get(); + var vb = b.$get(); + if (va !== vb) { + return false; + } + var dummy = va + 1; + a.$set(dummy); + var equal = b.$get() === dummy; + a.$set(va); + return equal; +}; + +var $kindBool = 1; +var $kindInt = 2; +var $kindInt8 = 3; +var $kindInt16 = 4; +var $kindInt32 = 5; +var $kindInt64 = 6; +var $kindUint = 7; +var $kindUint8 = 8; +var $kindUint16 = 9; +var $kindUint32 = 10; +var $kindUint64 = 11; +var $kindUintptr = 12; +var $kindFloat32 = 13; +var $kindFloat64 = 14; +var $kindComplex64 = 15; +var $kindComplex128 = 16; +var $kindArray = 17; +var $kindChan = 18; +var $kindFunc = 19; +var $kindInterface = 20; +var $kindMap = 21; +var $kindPtr = 22; +var $kindSlice = 23; +var $kindString = 24; +var $kindStruct = 25; +var $kindUnsafePointer = 26; + +var $methodSynthesizers = []; +var $addMethodSynthesizer = function(f) { + if ($methodSynthesizers === null) { + f(); + return; + } + $methodSynthesizers.push(f); +}; +var $synthesizeMethods = function() { + $methodSynthesizers.forEach(function(f) { f(); }); + $methodSynthesizers = null; +}; + +var $newType = function(size, kind, string, name, pkg, constructor) { + var typ; + switch(kind) { + case $kindBool: + case $kindInt: + case $kindInt8: + case $kindInt16: + case $kindInt32: + case $kindUint: + case $kindUint8: + case $kindUint16: + case $kindUint32: + case $kindUintptr: + case $kindString: + case $kindUnsafePointer: + typ = function(v) { this.$val = v; }; + typ.prototype.$key = function() { return string + "$" + this.$val; }; + break; + + case $kindFloat32: + case $kindFloat64: + typ = function(v) { this.$val = v; }; + typ.prototype.$key = function() { return string + "$" + $floatKey(this.$val); }; + break; + + case $kindInt64: + typ = function(high, low) { + this.$high = (high + Math.floor(Math.ceil(low) / 4294967296)) >> 0; + this.$low = low >>> 0; + this.$val = this; + }; + typ.prototype.$key = function() { return string + "$" + this.$high + "$" + this.$low; }; + break; + + case $kindUint64: + typ = function(high, low) { + this.$high = (high + Math.floor(Math.ceil(low) / 4294967296)) >>> 0; + this.$low = low >>> 0; + this.$val = this; + }; + typ.prototype.$key = function() { return string + "$" + this.$high + "$" + this.$low; }; + break; + + case $kindComplex64: + case $kindComplex128: + typ = function(real, imag) { + this.$real = real; + this.$imag = imag; + this.$val = this; + }; + typ.prototype.$key = function() { return string + "$" + this.$real + "$" + this.$imag; }; + break; + + case $kindArray: + typ = function(v) { this.$val = v; }; + typ.ptr = $newType(4, $kindPtr, "*" + string, "", "", function(array) { + this.$get = function() { return array; }; + this.$set = function(v) { $copy(this, v, typ); }; + this.$val = array; + }); + typ.init = function(elem, len) { + typ.elem = elem; + typ.len = len; + typ.comparable = elem.comparable; + typ.prototype.$key = function() { + return string + "$" + Array.prototype.join.call($mapArray(this.$val, function(e) { + var key = e.$key ? e.$key() : String(e); + return key.replace(/\\/g, "\\\\").replace(/\$/g, "\\$"); + }), "$"); + }; + typ.ptr.init(typ); + Object.defineProperty(typ.ptr.nil, "nilCheck", { get: $throwNilPointerError }); + }; + break; + + case $kindChan: + typ = function(capacity) { + this.$val = this; + this.$capacity = capacity; + this.$buffer = []; + this.$sendQueue = []; + this.$recvQueue = []; + this.$closed = false; + }; + typ.prototype.$key = function() { + if (this.$id === undefined) { + $idCounter++; + this.$id = $idCounter; + } + return String(this.$id); + }; + typ.init = function(elem, sendOnly, recvOnly) { + typ.elem = elem; + typ.sendOnly = sendOnly; + typ.recvOnly = recvOnly; + typ.nil = new typ(0); + typ.nil.$sendQueue = typ.nil.$recvQueue = { length: 0, push: function() {}, shift: function() { return undefined; }, indexOf: function() { return -1; } }; + }; + break; + + case $kindFunc: + typ = function(v) { this.$val = v; }; + typ.init = function(params, results, variadic) { + typ.params = params; + typ.results = results; + typ.variadic = variadic; + typ.comparable = false; + }; + break; + + case $kindInterface: + typ = { implementedBy: {}, missingMethodFor: {} }; + typ.init = function(methods) { + typ.methods = methods; + methods.forEach(function(m) { + $ifaceNil[m.prop] = $throwNilPointerError; + }); + }; + break; + + case $kindMap: + typ = function(v) { this.$val = v; }; + typ.init = function(key, elem) { + typ.key = key; + typ.elem = elem; + typ.comparable = false; + }; + break; + + case $kindPtr: + typ = constructor || function(getter, setter, target) { + this.$get = getter; + this.$set = setter; + this.$target = target; + this.$val = this; + }; + typ.prototype.$key = function() { + if (this.$id === undefined) { + $idCounter++; + this.$id = $idCounter; + } + return String(this.$id); + }; + typ.init = function(elem) { + typ.elem = elem; + typ.nil = new typ($throwNilPointerError, $throwNilPointerError); + }; + break; + + case $kindSlice: + typ = function(array) { + if (array.constructor !== typ.nativeArray) { + array = new typ.nativeArray(array); + } + this.$array = array; + this.$offset = 0; + this.$length = array.length; + this.$capacity = array.length; + this.$val = this; + }; + typ.init = function(elem) { + typ.elem = elem; + typ.comparable = false; + typ.nativeArray = $nativeArray(elem.kind); + typ.nil = new typ([]); + }; + break; + + case $kindStruct: + typ = function(v) { this.$val = v; }; + typ.ptr = $newType(4, $kindPtr, "*" + string, "", "", constructor); + typ.ptr.elem = typ; + typ.ptr.prototype.$get = function() { return this; }; + typ.ptr.prototype.$set = function(v) { $copy(this, v, typ); }; + typ.init = function(fields) { + typ.fields = fields; + fields.forEach(function(f) { + if (!f.typ.comparable) { + typ.comparable = false; + } + }); + typ.prototype.$key = function() { + var val = this.$val; + return string + "$" + $mapArray(fields, function(f) { + var e = val[f.prop]; + var key = e.$key ? e.$key() : String(e); + return key.replace(/\\/g, "\\\\").replace(/\$/g, "\\$"); + }).join("$"); + }; + /* nil value */ + var properties = {}; + fields.forEach(function(f) { + properties[f.prop] = { get: $throwNilPointerError, set: $throwNilPointerError }; + }); + typ.ptr.nil = Object.create(constructor.prototype, properties); + typ.ptr.nil.$val = typ.ptr.nil; + /* methods for embedded fields */ + $addMethodSynthesizer(function() { + var synthesizeMethod = function(target, m, f) { + if (target.prototype[m.prop] !== undefined) { return; } + target.prototype[m.prop] = function() { + var v = this.$val[f.prop]; + if (f.typ === $js.Object) { + v = new $js.container.ptr(v); + } + if (v.$val === undefined) { + v = new f.typ(v); + } + return v[m.prop].apply(v, arguments); + }; + }; + fields.forEach(function(f) { + if (f.name === "") { + $methodSet(f.typ).forEach(function(m) { + synthesizeMethod(typ, m, f); + synthesizeMethod(typ.ptr, m, f); + }); + $methodSet($ptrType(f.typ)).forEach(function(m) { + synthesizeMethod(typ.ptr, m, f); + }); + } + }); + }); + }; + break; + + default: + $panic(new $String("invalid kind: " + kind)); + } + + switch (kind) { + case $kindBool: + case $kindMap: + typ.zero = function() { return false; }; + break; + + case $kindInt: + case $kindInt8: + case $kindInt16: + case $kindInt32: + case $kindUint: + case $kindUint8 : + case $kindUint16: + case $kindUint32: + case $kindUintptr: + case $kindUnsafePointer: + case $kindFloat32: + case $kindFloat64: + typ.zero = function() { return 0; }; + break; + + case $kindString: + typ.zero = function() { return ""; }; + break; + + case $kindInt64: + case $kindUint64: + case $kindComplex64: + case $kindComplex128: + var zero = new typ(0, 0); + typ.zero = function() { return zero; }; + break; + + case $kindChan: + case $kindPtr: + case $kindSlice: + typ.zero = function() { return typ.nil; }; + break; + + case $kindFunc: + typ.zero = function() { return $throwNilPointerError; }; + break; + + case $kindInterface: + typ.zero = function() { return $ifaceNil; }; + break; + + case $kindArray: + typ.zero = function() { + var arrayClass = $nativeArray(typ.elem.kind); + if (arrayClass !== Array) { + return new arrayClass(typ.len); + } + var array = new Array(typ.len); + for (var i = 0; i < typ.len; i++) { + array[i] = typ.elem.zero(); + } + return array; + }; + break; + + case $kindStruct: + typ.zero = function() { return new typ.ptr(); }; + break; + + default: + $panic(new $String("invalid kind: " + kind)); + } + + typ.size = size; + typ.kind = kind; + typ.string = string; + typ.typeName = name; + typ.pkg = pkg; + typ.methods = []; + typ.methodSetCache = null; + typ.comparable = true; + return typ; +}; + +var $methodSet = function(typ) { + if (typ.methodSetCache !== null) { + return typ.methodSetCache; + } + var base = {}; + + var isPtr = (typ.kind === $kindPtr); + if (isPtr && typ.elem.kind === $kindInterface) { + typ.methodSetCache = []; + return []; + } + + var current = [{typ: isPtr ? typ.elem : typ, indirect: isPtr}]; + + var seen = {}; + + while (current.length > 0) { + var next = []; + var mset = []; + + current.forEach(function(e) { + if (seen[e.typ.string]) { + return; + } + seen[e.typ.string] = true; + + if(e.typ.typeName !== "") { + mset = mset.concat(e.typ.methods); + if (e.indirect) { + mset = mset.concat($ptrType(e.typ).methods); + } + } + + switch (e.typ.kind) { + case $kindStruct: + e.typ.fields.forEach(function(f) { + if (f.name === "") { + var fTyp = f.typ; + var fIsPtr = (fTyp.kind === $kindPtr); + next.push({typ: fIsPtr ? fTyp.elem : fTyp, indirect: e.indirect || fIsPtr}); + } + }); + break; + + case $kindInterface: + mset = mset.concat(e.typ.methods); + break; + } + }); + + mset.forEach(function(m) { + if (base[m.name] === undefined) { + base[m.name] = m; + } + }); + + current = next; + } + + typ.methodSetCache = []; + Object.keys(base).sort().forEach(function(name) { + typ.methodSetCache.push(base[name]); + }); + return typ.methodSetCache; +}; + +var $Bool = $newType( 1, $kindBool, "bool", "bool", "", null); +var $Int = $newType( 4, $kindInt, "int", "int", "", null); +var $Int8 = $newType( 1, $kindInt8, "int8", "int8", "", null); +var $Int16 = $newType( 2, $kindInt16, "int16", "int16", "", null); +var $Int32 = $newType( 4, $kindInt32, "int32", "int32", "", null); +var $Int64 = $newType( 8, $kindInt64, "int64", "int64", "", null); +var $Uint = $newType( 4, $kindUint, "uint", "uint", "", null); +var $Uint8 = $newType( 1, $kindUint8, "uint8", "uint8", "", null); +var $Uint16 = $newType( 2, $kindUint16, "uint16", "uint16", "", null); +var $Uint32 = $newType( 4, $kindUint32, "uint32", "uint32", "", null); +var $Uint64 = $newType( 8, $kindUint64, "uint64", "uint64", "", null); +var $Uintptr = $newType( 4, $kindUintptr, "uintptr", "uintptr", "", null); +var $Float32 = $newType( 4, $kindFloat32, "float32", "float32", "", null); +var $Float64 = $newType( 8, $kindFloat64, "float64", "float64", "", null); +var $Complex64 = $newType( 8, $kindComplex64, "complex64", "complex64", "", null); +var $Complex128 = $newType(16, $kindComplex128, "complex128", "complex128", "", null); +var $String = $newType( 8, $kindString, "string", "string", "", null); +var $UnsafePointer = $newType( 4, $kindUnsafePointer, "unsafe.Pointer", "Pointer", "", null); + +var $nativeArray = function(elemKind) { + switch (elemKind) { + case $kindInt: + return Int32Array; + case $kindInt8: + return Int8Array; + case $kindInt16: + return Int16Array; + case $kindInt32: + return Int32Array; + case $kindUint: + return Uint32Array; + case $kindUint8: + return Uint8Array; + case $kindUint16: + return Uint16Array; + case $kindUint32: + return Uint32Array; + case $kindUintptr: + return Uint32Array; + case $kindFloat32: + return Float32Array; + case $kindFloat64: + return Float64Array; + default: + return Array; + } +}; +var $toNativeArray = function(elemKind, array) { + var nativeArray = $nativeArray(elemKind); + if (nativeArray === Array) { + return array; + } + return new nativeArray(array); +}; +var $arrayTypes = {}; +var $arrayType = function(elem, len) { + var string = "[" + len + "]" + elem.string; + var typ = $arrayTypes[string]; + if (typ === undefined) { + typ = $newType(12, $kindArray, string, "", "", null); + $arrayTypes[string] = typ; + typ.init(elem, len); + } + return typ; +}; + +var $chanType = function(elem, sendOnly, recvOnly) { + var string = (recvOnly ? "<-" : "") + "chan" + (sendOnly ? "<- " : " ") + elem.string; + var field = sendOnly ? "SendChan" : (recvOnly ? "RecvChan" : "Chan"); + var typ = elem[field]; + if (typ === undefined) { + typ = $newType(4, $kindChan, string, "", "", null); + elem[field] = typ; + typ.init(elem, sendOnly, recvOnly); + } + return typ; +}; + +var $funcTypes = {}; +var $funcType = function(params, results, variadic) { + var paramTypes = $mapArray(params, function(p) { return p.string; }); + if (variadic) { + paramTypes[paramTypes.length - 1] = "..." + paramTypes[paramTypes.length - 1].substr(2); + } + var string = "func(" + paramTypes.join(", ") + ")"; + if (results.length === 1) { + string += " " + results[0].string; + } else if (results.length > 1) { + string += " (" + $mapArray(results, function(r) { return r.string; }).join(", ") + ")"; + } + var typ = $funcTypes[string]; + if (typ === undefined) { + typ = $newType(4, $kindFunc, string, "", "", null); + $funcTypes[string] = typ; + typ.init(params, results, variadic); + } + return typ; +}; + +var $interfaceTypes = {}; +var $interfaceType = function(methods) { + var string = "interface {}"; + if (methods.length !== 0) { + string = "interface { " + $mapArray(methods, function(m) { + return (m.pkg !== "" ? m.pkg + "." : "") + m.name + m.typ.string.substr(4); + }).join("; ") + " }"; + } + var typ = $interfaceTypes[string]; + if (typ === undefined) { + typ = $newType(8, $kindInterface, string, "", "", null); + $interfaceTypes[string] = typ; + typ.init(methods); + } + return typ; +}; +var $emptyInterface = $interfaceType([]); +var $ifaceNil = { $key: function() { return "nil"; } }; +var $error = $newType(8, $kindInterface, "error", "error", "", null); +$error.init([{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]); + +var $Map = function() {}; +(function() { + var names = Object.getOwnPropertyNames(Object.prototype); + for (var i = 0; i < names.length; i++) { + $Map.prototype[names[i]] = undefined; + } +})(); +var $mapTypes = {}; +var $mapType = function(key, elem) { + var string = "map[" + key.string + "]" + elem.string; + var typ = $mapTypes[string]; + if (typ === undefined) { + typ = $newType(4, $kindMap, string, "", "", null); + $mapTypes[string] = typ; + typ.init(key, elem); + } + return typ; +}; + +var $ptrType = function(elem) { + var typ = elem.ptr; + if (typ === undefined) { + typ = $newType(4, $kindPtr, "*" + elem.string, "", "", null); + elem.ptr = typ; + typ.init(elem); + } + return typ; +}; + +var $newDataPointer = function(data, constructor) { + if (constructor.elem.kind === $kindStruct) { + return data; + } + return new constructor(function() { return data; }, function(v) { data = v; }); +}; + +var $sliceType = function(elem) { + var typ = elem.Slice; + if (typ === undefined) { + typ = $newType(12, $kindSlice, "[]" + elem.string, "", "", null); + elem.Slice = typ; + typ.init(elem); + } + return typ; +}; +var $makeSlice = function(typ, length, capacity) { + capacity = capacity || length; + var array = new typ.nativeArray(capacity); + if (typ.nativeArray === Array) { + for (var i = 0; i < capacity; i++) { + array[i] = typ.elem.zero(); + } + } + var slice = new typ(array); + slice.$length = length; + return slice; +}; + +var $structTypes = {}; +var $structType = function(fields) { + var string = "struct { " + $mapArray(fields, function(f) { + return f.name + " " + f.typ.string + (f.tag !== "" ? (" \"" + f.tag.replace(/\\/g, "\\\\").replace(/"/g, "\\\"") + "\"") : ""); + }).join("; ") + " }"; + if (fields.length === 0) { + string = "struct {}"; + } + var typ = $structTypes[string]; + if (typ === undefined) { + typ = $newType(0, $kindStruct, string, "", "", function() { + this.$val = this; + for (var i = 0; i < fields.length; i++) { + var f = fields[i]; + var arg = arguments[i]; + this[f.prop] = arg !== undefined ? arg : f.typ.zero(); + } + }); + $structTypes[string] = typ; + typ.init(fields); + } + return typ; +}; + +var $assertType = function(value, type, returnTuple) { + var isInterface = (type.kind === $kindInterface), ok, missingMethod = ""; + if (value === $ifaceNil) { + ok = false; + } else if (!isInterface) { + ok = value.constructor === type; + } else { + var valueTypeString = value.constructor.string; + ok = type.implementedBy[valueTypeString]; + if (ok === undefined) { + ok = true; + var valueMethodSet = $methodSet(value.constructor); + var interfaceMethods = type.methods; + for (var i = 0; i < interfaceMethods.length; i++) { + var tm = interfaceMethods[i]; + var found = false; + for (var j = 0; j < valueMethodSet.length; j++) { + var vm = valueMethodSet[j]; + if (vm.name === tm.name && vm.pkg === tm.pkg && vm.typ === tm.typ) { + found = true; + break; + } + } + if (!found) { + ok = false; + type.missingMethodFor[valueTypeString] = tm.name; + break; + } + } + type.implementedBy[valueTypeString] = ok; + } + if (!ok) { + missingMethod = type.missingMethodFor[valueTypeString]; + } + } + + if (!ok) { + if (returnTuple) { + return [type.zero(), false]; + } + $panic(new $packages["runtime"].TypeAssertionError.ptr("", (value === $ifaceNil ? "" : value.constructor.string), type.string, missingMethod)); + } + + if (!isInterface) { + value = value.$val; + } + if (type === $js.Object) { + value = value.Object; + } + return returnTuple ? [value, true] : value; +}; + +var $coerceFloat32 = function(f) { + var math = $packages["math"]; + if (math === undefined) { + return f; + } + return math.Float32frombits(math.Float32bits(f)); +}; + +var $floatKey = function(f) { + if (f !== f) { + $idCounter++; + return "NaN$" + $idCounter; + } + return String(f); +}; + +var $flatten64 = function(x) { + return x.$high * 4294967296 + x.$low; +}; + +var $shiftLeft64 = function(x, y) { + if (y === 0) { + return x; + } + if (y < 32) { + return new x.constructor(x.$high << y | x.$low >>> (32 - y), (x.$low << y) >>> 0); + } + if (y < 64) { + return new x.constructor(x.$low << (y - 32), 0); + } + return new x.constructor(0, 0); +}; + +var $shiftRightInt64 = function(x, y) { + if (y === 0) { + return x; + } + if (y < 32) { + return new x.constructor(x.$high >> y, (x.$low >>> y | x.$high << (32 - y)) >>> 0); + } + if (y < 64) { + return new x.constructor(x.$high >> 31, (x.$high >> (y - 32)) >>> 0); + } + if (x.$high < 0) { + return new x.constructor(-1, 4294967295); + } + return new x.constructor(0, 0); +}; + +var $shiftRightUint64 = function(x, y) { + if (y === 0) { + return x; + } + if (y < 32) { + return new x.constructor(x.$high >>> y, (x.$low >>> y | x.$high << (32 - y)) >>> 0); + } + if (y < 64) { + return new x.constructor(0, x.$high >>> (y - 32)); + } + return new x.constructor(0, 0); +}; + +var $mul64 = function(x, y) { + var high = 0, low = 0; + if ((y.$low & 1) !== 0) { + high = x.$high; + low = x.$low; + } + for (var i = 1; i < 32; i++) { + if ((y.$low & 1<>> (32 - i); + low += (x.$low << i) >>> 0; + } + } + for (var i = 0; i < 32; i++) { + if ((y.$high & 1< yHigh) || (xHigh === yHigh && xLow > yLow))) { + yHigh = (yHigh << 1 | yLow >>> 31) >>> 0; + yLow = (yLow << 1) >>> 0; + n++; + } + for (var i = 0; i <= n; i++) { + high = high << 1 | low >>> 31; + low = (low << 1) >>> 0; + if ((xHigh > yHigh) || (xHigh === yHigh && xLow >= yLow)) { + xHigh = xHigh - yHigh; + xLow = xLow - yLow; + if (xLow < 0) { + xHigh--; + xLow += 4294967296; + } + low++; + if (low === 4294967296) { + high++; + low = 0; + } + } + yLow = (yLow >>> 1 | yHigh << (32 - 1)) >>> 0; + yHigh = yHigh >>> 1; + } + + if (returnRemainder) { + return new x.constructor(xHigh * rs, xLow * rs); + } + return new x.constructor(high * s, low * s); +}; + +var $divComplex = function(n, d) { + var ninf = n.$real === 1/0 || n.$real === -1/0 || n.$imag === 1/0 || n.$imag === -1/0; + var dinf = d.$real === 1/0 || d.$real === -1/0 || d.$imag === 1/0 || d.$imag === -1/0; + var nnan = !ninf && (n.$real !== n.$real || n.$imag !== n.$imag); + var dnan = !dinf && (d.$real !== d.$real || d.$imag !== d.$imag); + if(nnan || dnan) { + return new n.constructor(0/0, 0/0); + } + if (ninf && !dinf) { + return new n.constructor(1/0, 1/0); + } + if (!ninf && dinf) { + return new n.constructor(0, 0); + } + if (d.$real === 0 && d.$imag === 0) { + if (n.$real === 0 && n.$imag === 0) { + return new n.constructor(0/0, 0/0); + } + return new n.constructor(1/0, 1/0); + } + var a = Math.abs(d.$real); + var b = Math.abs(d.$imag); + if (a <= b) { + var ratio = d.$real / d.$imag; + var denom = d.$real * ratio + d.$imag; + return new n.constructor((n.$real * ratio + n.$imag) / denom, (n.$imag * ratio - n.$real) / denom); + } + var ratio = d.$imag / d.$real; + var denom = d.$imag * ratio + d.$real; + return new n.constructor((n.$imag * ratio + n.$real) / denom, (n.$imag - n.$real * ratio) / denom); +}; + +var $stackDepthOffset = 0; +var $getStackDepth = function() { + var err = new Error(); + if (err.stack === undefined) { + return undefined; + } + return $stackDepthOffset + err.stack.split("\n").length; +}; + +var $deferFrames = [], $skippedDeferFrames = 0, $jumpToDefer = false, $panicStackDepth = null, $panicValue; +var $callDeferred = function(deferred, jsErr) { + if ($skippedDeferFrames !== 0) { + $skippedDeferFrames--; + throw jsErr; + } + if ($jumpToDefer) { + $jumpToDefer = false; + throw jsErr; + } + if (jsErr) { + var newErr = null; + try { + $deferFrames.push(deferred); + $panic(new $js.Error.ptr(jsErr)); + } catch (err) { + newErr = err; + } + $deferFrames.pop(); + $callDeferred(deferred, newErr); + return; + } + + $stackDepthOffset--; + var outerPanicStackDepth = $panicStackDepth; + var outerPanicValue = $panicValue; + + var localPanicValue = $curGoroutine.panicStack.pop(); + if (localPanicValue !== undefined) { + $panicStackDepth = $getStackDepth(); + $panicValue = localPanicValue; + } + + var call, localSkippedDeferFrames = 0; + try { + while (true) { + if (deferred === null) { + deferred = $deferFrames[$deferFrames.length - 1 - localSkippedDeferFrames]; + if (deferred === undefined) { + if (localPanicValue.Object instanceof Error) { + throw localPanicValue.Object; + } + var msg; + if (localPanicValue.constructor === $String) { + msg = localPanicValue.$val; + } else if (localPanicValue.Error !== undefined) { + msg = localPanicValue.Error(); + } else if (localPanicValue.String !== undefined) { + msg = localPanicValue.String(); + } else { + msg = localPanicValue; + } + throw new Error(msg); + } + } + var call = deferred.pop(); + if (call === undefined) { + if (localPanicValue !== undefined) { + localSkippedDeferFrames++; + deferred = null; + continue; + } + return; + } + var r = call[0].apply(undefined, call[1]); + if (r && r.$blocking) { + deferred.push([r, []]); + } + + if (localPanicValue !== undefined && $panicStackDepth === null) { + throw null; /* error was recovered */ + } + } + } finally { + $skippedDeferFrames += localSkippedDeferFrames; + if ($curGoroutine.asleep) { + deferred.push(call); + $jumpToDefer = true; + } + if (localPanicValue !== undefined) { + if ($panicStackDepth !== null) { + $curGoroutine.panicStack.push(localPanicValue); + } + $panicStackDepth = outerPanicStackDepth; + $panicValue = outerPanicValue; + } + $stackDepthOffset++; + } +}; + +var $panic = function(value) { + $curGoroutine.panicStack.push(value); + $callDeferred(null, null); +}; +var $recover = function() { + if ($panicStackDepth === null || ($panicStackDepth !== undefined && $panicStackDepth !== $getStackDepth() - 2)) { + return $ifaceNil; + } + $panicStackDepth = null; + return $panicValue; +}; +var $throw = function(err) { throw err; }; + +var $BLOCKING = new Object(); +var $nonblockingCall = function() { + $panic(new $packages["runtime"].NotSupportedError.ptr("non-blocking call to blocking function, see https://github.com/gopherjs/gopherjs#goroutines")); +}; + +var $dummyGoroutine = { asleep: false, exit: false, panicStack: [] }; +var $curGoroutine = $dummyGoroutine, $totalGoroutines = 0, $awakeGoroutines = 0, $checkForDeadlock = true; +var $go = function(fun, args, direct) { + $totalGoroutines++; + $awakeGoroutines++; + args.push($BLOCKING); + var goroutine = function() { + var rescheduled = false; + try { + $curGoroutine = goroutine; + $skippedDeferFrames = 0; + $jumpToDefer = false; + var r = fun.apply(undefined, args); + if (r && r.$blocking) { + fun = r; + args = []; + $schedule(goroutine, direct); + rescheduled = true; + return; + } + goroutine.exit = true; + } catch (err) { + if (!$curGoroutine.asleep) { + goroutine.exit = true; + throw err; + } + } finally { + $curGoroutine = $dummyGoroutine; + if (goroutine.exit && !rescheduled) { /* also set by runtime.Goexit() */ + $totalGoroutines--; + goroutine.asleep = true; + } + if (goroutine.asleep && !rescheduled) { + $awakeGoroutines--; + if ($awakeGoroutines === 0 && $totalGoroutines !== 0 && $checkForDeadlock) { + console.error("fatal error: all goroutines are asleep - deadlock!"); + } + } + } + }; + goroutine.asleep = false; + goroutine.exit = false; + goroutine.panicStack = []; + $schedule(goroutine, direct); +}; + +var $scheduled = [], $schedulerLoopActive = false; +var $schedule = function(goroutine, direct) { + if (goroutine.asleep) { + goroutine.asleep = false; + $awakeGoroutines++; + } + + if (direct) { + goroutine(); + return; + } + + $scheduled.push(goroutine); + if (!$schedulerLoopActive) { + $schedulerLoopActive = true; + setTimeout(function() { + while (true) { + var r = $scheduled.shift(); + if (r === undefined) { + $schedulerLoopActive = false; + break; + } + r(); + }; + }, 0); + } +}; + +var $send = function(chan, value) { + if (chan.$closed) { + $throwRuntimeError("send on closed channel"); + } + var queuedRecv = chan.$recvQueue.shift(); + if (queuedRecv !== undefined) { + queuedRecv([value, true]); + return; + } + if (chan.$buffer.length < chan.$capacity) { + chan.$buffer.push(value); + return; + } + + var thisGoroutine = $curGoroutine; + chan.$sendQueue.push(function() { + $schedule(thisGoroutine); + return value; + }); + var blocked = false; + var f = function() { + if (blocked) { + if (chan.$closed) { + $throwRuntimeError("send on closed channel"); + } + return; + }; + blocked = true; + $curGoroutine.asleep = true; + throw null; + }; + f.$blocking = true; + return f; +}; +var $recv = function(chan) { + var queuedSend = chan.$sendQueue.shift(); + if (queuedSend !== undefined) { + chan.$buffer.push(queuedSend()); + } + var bufferedValue = chan.$buffer.shift(); + if (bufferedValue !== undefined) { + return [bufferedValue, true]; + } + if (chan.$closed) { + return [chan.constructor.elem.zero(), false]; + } + + var thisGoroutine = $curGoroutine, value; + var queueEntry = function(v) { + value = v; + $schedule(thisGoroutine); + }; + chan.$recvQueue.push(queueEntry); + var blocked = false; + var f = function() { + if (blocked) { + return value; + }; + blocked = true; + $curGoroutine.asleep = true; + throw null; + }; + f.$blocking = true; + return f; +}; +var $close = function(chan) { + if (chan.$closed) { + $throwRuntimeError("close of closed channel"); + } + chan.$closed = true; + while (true) { + var queuedSend = chan.$sendQueue.shift(); + if (queuedSend === undefined) { + break; + } + queuedSend(); /* will panic because of closed channel */ + } + while (true) { + var queuedRecv = chan.$recvQueue.shift(); + if (queuedRecv === undefined) { + break; + } + queuedRecv([chan.constructor.elem.zero(), false]); + } +}; +var $select = function(comms) { + var ready = []; + var selection = -1; + for (var i = 0; i < comms.length; i++) { + var comm = comms[i]; + var chan = comm[0]; + switch (comm.length) { + case 0: /* default */ + selection = i; + break; + case 1: /* recv */ + if (chan.$sendQueue.length !== 0 || chan.$buffer.length !== 0 || chan.$closed) { + ready.push(i); + } + break; + case 2: /* send */ + if (chan.$closed) { + $throwRuntimeError("send on closed channel"); + } + if (chan.$recvQueue.length !== 0 || chan.$buffer.length < chan.$capacity) { + ready.push(i); + } + break; + } + } + + if (ready.length !== 0) { + selection = ready[Math.floor(Math.random() * ready.length)]; + } + if (selection !== -1) { + var comm = comms[selection]; + switch (comm.length) { + case 0: /* default */ + return [selection]; + case 1: /* recv */ + return [selection, $recv(comm[0])]; + case 2: /* send */ + $send(comm[0], comm[1]); + return [selection]; + } + } + + var entries = []; + var thisGoroutine = $curGoroutine; + var removeFromQueues = function() { + for (var i = 0; i < entries.length; i++) { + var entry = entries[i]; + var queue = entry[0]; + var index = queue.indexOf(entry[1]); + if (index !== -1) { + queue.splice(index, 1); + } + } + }; + for (var i = 0; i < comms.length; i++) { + (function(i) { + var comm = comms[i]; + switch (comm.length) { + case 1: /* recv */ + var queueEntry = function(value) { + selection = [i, value]; + removeFromQueues(); + $schedule(thisGoroutine); + }; + entries.push([comm[0].$recvQueue, queueEntry]); + comm[0].$recvQueue.push(queueEntry); + break; + case 2: /* send */ + var queueEntry = function() { + if (comm[0].$closed) { + $throwRuntimeError("send on closed channel"); + } + selection = [i]; + removeFromQueues(); + $schedule(thisGoroutine); + return comm[1]; + }; + entries.push([comm[0].$sendQueue, queueEntry]); + comm[0].$sendQueue.push(queueEntry); + break; + } + })(i); + } + var blocked = false; + var f = function() { + if (blocked) { + return selection; + }; + blocked = true; + $curGoroutine.asleep = true; + throw null; + }; + f.$blocking = true; + return f; +}; + +var $js; + +var $needsExternalization = function(t) { + switch (t.kind) { + case $kindBool: + case $kindInt: + case $kindInt8: + case $kindInt16: + case $kindInt32: + case $kindUint: + case $kindUint8: + case $kindUint16: + case $kindUint32: + case $kindUintptr: + case $kindFloat32: + case $kindFloat64: + return false; + case $kindInterface: + return t !== $js.Object; + default: + return true; + } +}; + +var $externalize = function(v, t) { + if ($js !== undefined && t === $js.Object) { + return v; + } + switch (t.kind) { + case $kindBool: + case $kindInt: + case $kindInt8: + case $kindInt16: + case $kindInt32: + case $kindUint: + case $kindUint8: + case $kindUint16: + case $kindUint32: + case $kindUintptr: + case $kindFloat32: + case $kindFloat64: + return v; + case $kindInt64: + case $kindUint64: + return $flatten64(v); + case $kindArray: + if ($needsExternalization(t.elem)) { + return $mapArray(v, function(e) { return $externalize(e, t.elem); }); + } + return v; + case $kindFunc: + if (v === $throwNilPointerError) { + return null; + } + if (v.$externalizeWrapper === undefined) { + $checkForDeadlock = false; + var convert = false; + for (var i = 0; i < t.params.length; i++) { + convert = convert || (t.params[i] !== $js.Object); + } + for (var i = 0; i < t.results.length; i++) { + convert = convert || $needsExternalization(t.results[i]); + } + v.$externalizeWrapper = v; + if (convert) { + v.$externalizeWrapper = function() { + var args = []; + for (var i = 0; i < t.params.length; i++) { + if (t.variadic && i === t.params.length - 1) { + var vt = t.params[i].elem, varargs = []; + for (var j = i; j < arguments.length; j++) { + varargs.push($internalize(arguments[j], vt)); + } + args.push(new (t.params[i])(varargs)); + break; + } + args.push($internalize(arguments[i], t.params[i])); + } + var result = v.apply(this, args); + switch (t.results.length) { + case 0: + return; + case 1: + return $externalize(result, t.results[0]); + default: + for (var i = 0; i < t.results.length; i++) { + result[i] = $externalize(result[i], t.results[i]); + } + return result; + } + }; + } + } + return v.$externalizeWrapper; + case $kindInterface: + if (v === $ifaceNil) { + return null; + } + return $externalize(v.$val, v.constructor); + case $kindMap: + var m = {}; + var keys = $keys(v); + for (var i = 0; i < keys.length; i++) { + var entry = v[keys[i]]; + m[$externalize(entry.k, t.key)] = $externalize(entry.v, t.elem); + } + return m; + case $kindPtr: + if (v === t.nil) { + return null; + } + return $externalize(v.$get(), t.elem); + case $kindSlice: + if ($needsExternalization(t.elem)) { + return $mapArray($sliceToArray(v), function(e) { return $externalize(e, t.elem); }); + } + return $sliceToArray(v); + case $kindString: + if (v.search(/^[\x00-\x7F]*$/) !== -1) { + return v; + } + var s = "", r; + for (var i = 0; i < v.length; i += r[1]) { + r = $decodeRune(v, i); + s += String.fromCharCode(r[0]); + } + return s; + case $kindStruct: + var timePkg = $packages["time"]; + if (timePkg && v.constructor === timePkg.Time.ptr) { + var milli = $div64(v.UnixNano(), new $Int64(0, 1000000)); + return new Date($flatten64(milli)); + } + + var searchJsObject = function(v, t) { + if (t === $js.Object) { + return v; + } + if (t.kind === $kindPtr && v !== t.nil) { + var o = searchJsObject(v.$get(), t.elem); + if (o !== undefined) { + return o; + } + } + if (t.kind === $kindStruct) { + for (var i = 0; i < t.fields.length; i++) { + var f = t.fields[i]; + var o = searchJsObject(v[f.prop], f.typ); + if (o !== undefined) { + return o; + } + } + } + return undefined; + }; + var o = searchJsObject(v, t); + if (o !== undefined) { + return o; + } + + o = {}; + for (var i = 0; i < t.fields.length; i++) { + var f = t.fields[i]; + if (f.pkg !== "") { /* not exported */ + continue; + } + o[f.name] = $externalize(v[f.prop], f.typ); + } + return o; + } + $panic(new $String("cannot externalize " + t.string)); +}; + +var $internalize = function(v, t, recv) { + if (t === $js.Object) { + return v; + } + switch (t.kind) { + case $kindBool: + return !!v; + case $kindInt: + return parseInt(v); + case $kindInt8: + return parseInt(v) << 24 >> 24; + case $kindInt16: + return parseInt(v) << 16 >> 16; + case $kindInt32: + return parseInt(v) >> 0; + case $kindUint: + return parseInt(v); + case $kindUint8: + return parseInt(v) << 24 >>> 24; + case $kindUint16: + return parseInt(v) << 16 >>> 16; + case $kindUint32: + case $kindUintptr: + return parseInt(v) >>> 0; + case $kindInt64: + case $kindUint64: + return new t(0, v); + case $kindFloat32: + case $kindFloat64: + return parseFloat(v); + case $kindArray: + if (v.length !== t.len) { + $throwRuntimeError("got array with wrong size from JavaScript native"); + } + return $mapArray(v, function(e) { return $internalize(e, t.elem); }); + case $kindFunc: + return function() { + var args = []; + for (var i = 0; i < t.params.length; i++) { + if (t.variadic && i === t.params.length - 1) { + var vt = t.params[i].elem, varargs = arguments[i]; + for (var j = 0; j < varargs.$length; j++) { + args.push($externalize(varargs.$array[varargs.$offset + j], vt)); + } + break; + } + args.push($externalize(arguments[i], t.params[i])); + } + var result = v.apply(recv, args); + switch (t.results.length) { + case 0: + return; + case 1: + return $internalize(result, t.results[0]); + default: + for (var i = 0; i < t.results.length; i++) { + result[i] = $internalize(result[i], t.results[i]); + } + return result; + } + }; + case $kindInterface: + if (t.methods.length !== 0) { + $panic(new $String("cannot internalize " + t.string)); + } + if (v === null) { + return $ifaceNil; + } + switch (v.constructor) { + case Int8Array: + return new ($sliceType($Int8))(v); + case Int16Array: + return new ($sliceType($Int16))(v); + case Int32Array: + return new ($sliceType($Int))(v); + case Uint8Array: + return new ($sliceType($Uint8))(v); + case Uint16Array: + return new ($sliceType($Uint16))(v); + case Uint32Array: + return new ($sliceType($Uint))(v); + case Float32Array: + return new ($sliceType($Float32))(v); + case Float64Array: + return new ($sliceType($Float64))(v); + case Array: + return $internalize(v, $sliceType($emptyInterface)); + case Boolean: + return new $Bool(!!v); + case Date: + var timePkg = $packages["time"]; + if (timePkg) { + return new timePkg.Time(timePkg.Unix(new $Int64(0, 0), new $Int64(0, v.getTime() * 1000000))); + } + case Function: + var funcType = $funcType([$sliceType($emptyInterface)], [$js.Object], true); + return new funcType($internalize(v, funcType)); + case Number: + return new $Float64(parseFloat(v)); + case String: + return new $String($internalize(v, $String)); + default: + if ($global.Node && v instanceof $global.Node) { + return new $js.container.ptr(v); + } + var mapType = $mapType($String, $emptyInterface); + return new mapType($internalize(v, mapType)); + } + case $kindMap: + var m = new $Map(); + var keys = $keys(v); + for (var i = 0; i < keys.length; i++) { + var key = $internalize(keys[i], t.key); + m[key.$key ? key.$key() : key] = { k: key, v: $internalize(v[keys[i]], t.elem) }; + } + return m; + case $kindPtr: + if (t.elem.kind === $kindStruct) { + return $internalize(v, t.elem); + } + case $kindSlice: + return new t($mapArray(v, function(e) { return $internalize(e, t.elem); })); + case $kindString: + v = String(v); + if (v.search(/^[\x00-\x7F]*$/) !== -1) { + return v; + } + var s = ""; + for (var i = 0; i < v.length; i++) { + s += $encodeRune(v.charCodeAt(i)); + } + return s; + case $kindStruct: + var searchJsObject = function(v, t) { + if (t === $js.Object) { + return v; + } + if (t.kind === $kindPtr && t.elem.kind === $kindStruct) { + var o = searchJsObject(v, t.elem); + if (o !== undefined) { + return o; + } + } + if (t.kind === $kindStruct) { + for (var i = 0; i < t.fields.length; i++) { + var f = t.fields[i]; + var o = searchJsObject(v, f.typ); + if (o !== undefined) { + var n = new t.ptr(); + n[f.prop] = o; + return n; + } + } + } + return undefined; + }; + var o = searchJsObject(v, t); + if (o !== undefined) { + return o; + } + } + $panic(new $String("cannot internalize " + t.string)); +}; + +$packages["github.com/gopherjs/gopherjs/js"] = (function() { + var $pkg = {}, Object, container, Error, sliceType$1, ptrType, ptrType$1, init; + Object = $pkg.Object = $newType(8, $kindInterface, "js.Object", "Object", "github.com/gopherjs/gopherjs/js", null); + container = $pkg.container = $newType(0, $kindStruct, "js.container", "container", "github.com/gopherjs/gopherjs/js", function(Object_) { + this.$val = this; + this.Object = Object_ !== undefined ? Object_ : null; + }); + Error = $pkg.Error = $newType(0, $kindStruct, "js.Error", "Error", "github.com/gopherjs/gopherjs/js", function(Object_) { + this.$val = this; + this.Object = Object_ !== undefined ? Object_ : null; + }); + sliceType$1 = $sliceType($emptyInterface); + ptrType = $ptrType(container); + ptrType$1 = $ptrType(Error); + container.ptr.prototype.Get = function(key) { + var c, key; + c = this; + return c.Object[$externalize(key, $String)]; + }; + container.prototype.Get = function(key) { return this.$val.Get(key); }; + container.ptr.prototype.Set = function(key, value) { + var c, key, value; + c = this; + c.Object[$externalize(key, $String)] = $externalize(value, $emptyInterface); + }; + container.prototype.Set = function(key, value) { return this.$val.Set(key, value); }; + container.ptr.prototype.Delete = function(key) { + var c, key; + c = this; + delete c.Object[$externalize(key, $String)]; + }; + container.prototype.Delete = function(key) { return this.$val.Delete(key); }; + container.ptr.prototype.Length = function() { + var c; + c = this; + return $parseInt(c.Object.length); + }; + container.prototype.Length = function() { return this.$val.Length(); }; + container.ptr.prototype.Index = function(i) { + var c, i; + c = this; + return c.Object[i]; + }; + container.prototype.Index = function(i) { return this.$val.Index(i); }; + container.ptr.prototype.SetIndex = function(i, value) { + var c, i, value; + c = this; + c.Object[i] = $externalize(value, $emptyInterface); + }; + container.prototype.SetIndex = function(i, value) { return this.$val.SetIndex(i, value); }; + container.ptr.prototype.Call = function(name, args) { + var args, c, name, obj; + c = this; + return (obj = c.Object, obj[$externalize(name, $String)].apply(obj, $externalize(args, sliceType$1))); + }; + container.prototype.Call = function(name, args) { return this.$val.Call(name, args); }; + container.ptr.prototype.Invoke = function(args) { + var args, c; + c = this; + return c.Object.apply(undefined, $externalize(args, sliceType$1)); + }; + container.prototype.Invoke = function(args) { return this.$val.Invoke(args); }; + container.ptr.prototype.New = function(args) { + var args, c; + c = this; + return new ($global.Function.prototype.bind.apply(c.Object, [undefined].concat($externalize(args, sliceType$1)))); + }; + container.prototype.New = function(args) { return this.$val.New(args); }; + container.ptr.prototype.Bool = function() { + var c; + c = this; + return !!(c.Object); + }; + container.prototype.Bool = function() { return this.$val.Bool(); }; + container.ptr.prototype.String = function() { + var c; + c = this; + return $internalize(c.Object, $String); + }; + container.prototype.String = function() { return this.$val.String(); }; + container.ptr.prototype.Int = function() { + var c; + c = this; + return $parseInt(c.Object) >> 0; + }; + container.prototype.Int = function() { return this.$val.Int(); }; + container.ptr.prototype.Int64 = function() { + var c; + c = this; + return $internalize(c.Object, $Int64); + }; + container.prototype.Int64 = function() { return this.$val.Int64(); }; + container.ptr.prototype.Uint64 = function() { + var c; + c = this; + return $internalize(c.Object, $Uint64); + }; + container.prototype.Uint64 = function() { return this.$val.Uint64(); }; + container.ptr.prototype.Float = function() { + var c; + c = this; + return $parseFloat(c.Object); + }; + container.prototype.Float = function() { return this.$val.Float(); }; + container.ptr.prototype.Interface = function() { + var c; + c = this; + return $internalize(c.Object, $emptyInterface); + }; + container.prototype.Interface = function() { return this.$val.Interface(); }; + container.ptr.prototype.Unsafe = function() { + var c; + c = this; + return c.Object; + }; + container.prototype.Unsafe = function() { return this.$val.Unsafe(); }; + Error.ptr.prototype.Error = function() { + var err; + err = this; + return "JavaScript error: " + $internalize(err.Object.message, $String); + }; + Error.prototype.Error = function() { return this.$val.Error(); }; + Error.ptr.prototype.Stack = function() { + var err; + err = this; + return $internalize(err.Object.stack, $String); + }; + Error.prototype.Stack = function() { return this.$val.Stack(); }; + init = function() { + var _tmp, _tmp$1, c, e; + c = new container.ptr(null); + e = new Error.ptr(null); + + }; + ptrType.methods = [{prop: "Get", name: "Get", pkg: "", typ: $funcType([$String], [Object], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$String, $emptyInterface], [], false)}, {prop: "Delete", name: "Delete", pkg: "", typ: $funcType([$String], [], false)}, {prop: "Length", name: "Length", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([$Int], [Object], false)}, {prop: "SetIndex", name: "SetIndex", pkg: "", typ: $funcType([$Int, $emptyInterface], [], false)}, {prop: "Call", name: "Call", pkg: "", typ: $funcType([$String, sliceType$1], [Object], true)}, {prop: "Invoke", name: "Invoke", pkg: "", typ: $funcType([sliceType$1], [Object], true)}, {prop: "New", name: "New", pkg: "", typ: $funcType([sliceType$1], [Object], true)}, {prop: "Bool", name: "Bool", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Int", name: "Int", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Int64", name: "Int64", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Uint64", name: "Uint64", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "Float", name: "Float", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Interface", name: "Interface", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Unsafe", name: "Unsafe", pkg: "", typ: $funcType([], [$Uintptr], false)}]; + ptrType$1.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Stack", name: "Stack", pkg: "", typ: $funcType([], [$String], false)}]; + Object.init([{prop: "Bool", name: "Bool", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Call", name: "Call", pkg: "", typ: $funcType([$String, sliceType$1], [Object], true)}, {prop: "Delete", name: "Delete", pkg: "", typ: $funcType([$String], [], false)}, {prop: "Float", name: "Float", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$String], [Object], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([$Int], [Object], false)}, {prop: "Int", name: "Int", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Int64", name: "Int64", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Interface", name: "Interface", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Invoke", name: "Invoke", pkg: "", typ: $funcType([sliceType$1], [Object], true)}, {prop: "Length", name: "Length", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([sliceType$1], [Object], true)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$String, $emptyInterface], [], false)}, {prop: "SetIndex", name: "SetIndex", pkg: "", typ: $funcType([$Int, $emptyInterface], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Uint64", name: "Uint64", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "Unsafe", name: "Unsafe", pkg: "", typ: $funcType([], [$Uintptr], false)}]); + container.init([{prop: "Object", name: "", pkg: "", typ: Object, tag: ""}]); + Error.init([{prop: "Object", name: "", pkg: "", typ: Object, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_js = function() { while (true) { switch ($s) { case 0: + init(); + /* */ } return; } }; $init_js.$blocking = true; return $init_js; + }; + return $pkg; +})(); +$packages["runtime"] = (function() { + var $pkg = {}, js, NotSupportedError, TypeAssertionError, errorString, ptrType$5, ptrType$6, init, GOROOT, SetFinalizer; + js = $packages["github.com/gopherjs/gopherjs/js"]; + NotSupportedError = $pkg.NotSupportedError = $newType(0, $kindStruct, "runtime.NotSupportedError", "NotSupportedError", "runtime", function(Feature_) { + this.$val = this; + this.Feature = Feature_ !== undefined ? Feature_ : ""; + }); + TypeAssertionError = $pkg.TypeAssertionError = $newType(0, $kindStruct, "runtime.TypeAssertionError", "TypeAssertionError", "runtime", function(interfaceString_, concreteString_, assertedString_, missingMethod_) { + this.$val = this; + this.interfaceString = interfaceString_ !== undefined ? interfaceString_ : ""; + this.concreteString = concreteString_ !== undefined ? concreteString_ : ""; + this.assertedString = assertedString_ !== undefined ? assertedString_ : ""; + this.missingMethod = missingMethod_ !== undefined ? missingMethod_ : ""; + }); + errorString = $pkg.errorString = $newType(8, $kindString, "runtime.errorString", "errorString", "runtime", null); + ptrType$5 = $ptrType(NotSupportedError); + ptrType$6 = $ptrType(TypeAssertionError); + NotSupportedError.ptr.prototype.Error = function() { + var err; + err = this; + return "not supported by GopherJS: " + err.Feature; + }; + NotSupportedError.prototype.Error = function() { return this.$val.Error(); }; + init = function() { + var e; + $js = $packages[$externalize("github.com/gopherjs/gopherjs/js", $String)]; + $throwRuntimeError = (function(msg) { + var msg; + $panic(new errorString(msg)); + }); + e = $ifaceNil; + e = new TypeAssertionError.ptr("", "", "", ""); + e = new NotSupportedError.ptr(""); + }; + GOROOT = $pkg.GOROOT = function() { + var goroot, process; + process = $global.process; + if (process === undefined) { + return "/"; + } + goroot = process.env.GOROOT; + if (!(goroot === undefined)) { + return $internalize(goroot, $String); + } + return "/usr/local/go"; + }; + SetFinalizer = $pkg.SetFinalizer = function(x, f) { + var f, x; + }; + TypeAssertionError.ptr.prototype.RuntimeError = function() { + }; + TypeAssertionError.prototype.RuntimeError = function() { return this.$val.RuntimeError(); }; + TypeAssertionError.ptr.prototype.Error = function() { + var e, inter; + e = this; + inter = e.interfaceString; + if (inter === "") { + inter = "interface"; + } + if (e.concreteString === "") { + return "interface conversion: " + inter + " is nil, not " + e.assertedString; + } + if (e.missingMethod === "") { + return "interface conversion: " + inter + " is " + e.concreteString + ", not " + e.assertedString; + } + return "interface conversion: " + e.concreteString + " is not " + e.assertedString + ": missing method " + e.missingMethod; + }; + TypeAssertionError.prototype.Error = function() { return this.$val.Error(); }; + errorString.prototype.RuntimeError = function() { + var e; + e = this.$val; + }; + $ptrType(errorString).prototype.RuntimeError = function() { return new errorString(this.$get()).RuntimeError(); }; + errorString.prototype.Error = function() { + var e; + e = this.$val; + return "runtime error: " + e; + }; + $ptrType(errorString).prototype.Error = function() { return new errorString(this.$get()).Error(); }; + ptrType$5.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$6.methods = [{prop: "RuntimeError", name: "RuntimeError", pkg: "", typ: $funcType([], [], false)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + errorString.methods = [{prop: "RuntimeError", name: "RuntimeError", pkg: "", typ: $funcType([], [], false)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + NotSupportedError.init([{prop: "Feature", name: "Feature", pkg: "", typ: $String, tag: ""}]); + TypeAssertionError.init([{prop: "interfaceString", name: "interfaceString", pkg: "runtime", typ: $String, tag: ""}, {prop: "concreteString", name: "concreteString", pkg: "runtime", typ: $String, tag: ""}, {prop: "assertedString", name: "assertedString", pkg: "runtime", typ: $String, tag: ""}, {prop: "missingMethod", name: "missingMethod", pkg: "runtime", typ: $String, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_runtime = function() { while (true) { switch ($s) { case 0: + $r = js.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + init(); + /* */ } return; } }; $init_runtime.$blocking = true; return $init_runtime; + }; + return $pkg; +})(); +$packages["errors"] = (function() { + var $pkg = {}, errorString, ptrType, New; + errorString = $pkg.errorString = $newType(0, $kindStruct, "errors.errorString", "errorString", "errors", function(s_) { + this.$val = this; + this.s = s_ !== undefined ? s_ : ""; + }); + ptrType = $ptrType(errorString); + New = $pkg.New = function(text) { + var text; + return new errorString.ptr(text); + }; + errorString.ptr.prototype.Error = function() { + var e; + e = this; + return e.s; + }; + errorString.prototype.Error = function() { return this.$val.Error(); }; + ptrType.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + errorString.init([{prop: "s", name: "s", pkg: "errors", typ: $String, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_errors = function() { while (true) { switch ($s) { case 0: + /* */ } return; } }; $init_errors.$blocking = true; return $init_errors; + }; + return $pkg; +})(); +$packages["sync/atomic"] = (function() { + var $pkg = {}, js, CompareAndSwapInt32, AddInt32, LoadUint32, StoreInt32, StoreUint32; + js = $packages["github.com/gopherjs/gopherjs/js"]; + CompareAndSwapInt32 = $pkg.CompareAndSwapInt32 = function(addr, old, new$1) { + var addr, new$1, old; + if (addr.$get() === old) { + addr.$set(new$1); + return true; + } + return false; + }; + AddInt32 = $pkg.AddInt32 = function(addr, delta) { + var addr, delta, new$1; + new$1 = addr.$get() + delta >> 0; + addr.$set(new$1); + return new$1; + }; + LoadUint32 = $pkg.LoadUint32 = function(addr) { + var addr; + return addr.$get(); + }; + StoreInt32 = $pkg.StoreInt32 = function(addr, val) { + var addr, val; + addr.$set(val); + }; + StoreUint32 = $pkg.StoreUint32 = function(addr, val) { + var addr, val; + addr.$set(val); + }; + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_atomic = function() { while (true) { switch ($s) { case 0: + $r = js.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + /* */ } return; } }; $init_atomic.$blocking = true; return $init_atomic; + }; + return $pkg; +})(); +$packages["sync"] = (function() { + var $pkg = {}, runtime, atomic, Pool, Mutex, Locker, Once, poolLocal, syncSema, RWMutex, rlocker, ptrType, sliceType, structType, chanType, sliceType$1, ptrType$2, ptrType$3, ptrType$5, sliceType$3, ptrType$7, ptrType$8, funcType, ptrType$10, funcType$1, ptrType$11, arrayType, semWaiters, allPools, runtime_registerPoolCleanup, runtime_Semacquire, runtime_Semrelease, runtime_Syncsemcheck, poolCleanup, init, indexLocal, raceEnable, init$1; + runtime = $packages["runtime"]; + atomic = $packages["sync/atomic"]; + Pool = $pkg.Pool = $newType(0, $kindStruct, "sync.Pool", "Pool", "sync", function(local_, localSize_, store_, New_) { + this.$val = this; + this.local = local_ !== undefined ? local_ : 0; + this.localSize = localSize_ !== undefined ? localSize_ : 0; + this.store = store_ !== undefined ? store_ : sliceType$3.nil; + this.New = New_ !== undefined ? New_ : $throwNilPointerError; + }); + Mutex = $pkg.Mutex = $newType(0, $kindStruct, "sync.Mutex", "Mutex", "sync", function(state_, sema_) { + this.$val = this; + this.state = state_ !== undefined ? state_ : 0; + this.sema = sema_ !== undefined ? sema_ : 0; + }); + Locker = $pkg.Locker = $newType(8, $kindInterface, "sync.Locker", "Locker", "sync", null); + Once = $pkg.Once = $newType(0, $kindStruct, "sync.Once", "Once", "sync", function(m_, done_) { + this.$val = this; + this.m = m_ !== undefined ? m_ : new Mutex.ptr(); + this.done = done_ !== undefined ? done_ : 0; + }); + poolLocal = $pkg.poolLocal = $newType(0, $kindStruct, "sync.poolLocal", "poolLocal", "sync", function(private$0_, shared_, Mutex_, pad_) { + this.$val = this; + this.private$0 = private$0_ !== undefined ? private$0_ : $ifaceNil; + this.shared = shared_ !== undefined ? shared_ : sliceType$3.nil; + this.Mutex = Mutex_ !== undefined ? Mutex_ : new Mutex.ptr(); + this.pad = pad_ !== undefined ? pad_ : arrayType.zero(); + }); + syncSema = $pkg.syncSema = $newType(0, $kindStruct, "sync.syncSema", "syncSema", "sync", function(lock_, head_, tail_) { + this.$val = this; + this.lock = lock_ !== undefined ? lock_ : 0; + this.head = head_ !== undefined ? head_ : 0; + this.tail = tail_ !== undefined ? tail_ : 0; + }); + RWMutex = $pkg.RWMutex = $newType(0, $kindStruct, "sync.RWMutex", "RWMutex", "sync", function(w_, writerSem_, readerSem_, readerCount_, readerWait_) { + this.$val = this; + this.w = w_ !== undefined ? w_ : new Mutex.ptr(); + this.writerSem = writerSem_ !== undefined ? writerSem_ : 0; + this.readerSem = readerSem_ !== undefined ? readerSem_ : 0; + this.readerCount = readerCount_ !== undefined ? readerCount_ : 0; + this.readerWait = readerWait_ !== undefined ? readerWait_ : 0; + }); + rlocker = $pkg.rlocker = $newType(0, $kindStruct, "sync.rlocker", "rlocker", "sync", function(w_, writerSem_, readerSem_, readerCount_, readerWait_) { + this.$val = this; + this.w = w_ !== undefined ? w_ : new Mutex.ptr(); + this.writerSem = writerSem_ !== undefined ? writerSem_ : 0; + this.readerSem = readerSem_ !== undefined ? readerSem_ : 0; + this.readerCount = readerCount_ !== undefined ? readerCount_ : 0; + this.readerWait = readerWait_ !== undefined ? readerWait_ : 0; + }); + ptrType = $ptrType(Pool); + sliceType = $sliceType(ptrType); + structType = $structType([]); + chanType = $chanType(structType, false, false); + sliceType$1 = $sliceType(chanType); + ptrType$2 = $ptrType($Uint32); + ptrType$3 = $ptrType($Int32); + ptrType$5 = $ptrType(poolLocal); + sliceType$3 = $sliceType($emptyInterface); + ptrType$7 = $ptrType(rlocker); + ptrType$8 = $ptrType(RWMutex); + funcType = $funcType([], [$emptyInterface], false); + ptrType$10 = $ptrType(Mutex); + funcType$1 = $funcType([], [], false); + ptrType$11 = $ptrType(Once); + arrayType = $arrayType($Uint8, 128); + Pool.ptr.prototype.Get = function() { + var p, x, x$1, x$2; + p = this; + if (p.store.$length === 0) { + if (!(p.New === $throwNilPointerError)) { + return p.New(); + } + return $ifaceNil; + } + x$2 = (x = p.store, x$1 = p.store.$length - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])); + p.store = $subslice(p.store, 0, (p.store.$length - 1 >> 0)); + return x$2; + }; + Pool.prototype.Get = function() { return this.$val.Get(); }; + Pool.ptr.prototype.Put = function(x) { + var p, x; + p = this; + if ($interfaceIsEqual(x, $ifaceNil)) { + return; + } + p.store = $append(p.store, x); + }; + Pool.prototype.Put = function(x) { return this.$val.Put(x); }; + runtime_registerPoolCleanup = function(cleanup) { + var cleanup; + }; + runtime_Semacquire = function(s, $b) { + var $args = arguments, $r, $s = 0, $this = this, _entry, _key, _r, ch; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_runtime_Semacquire = function() { s: while (true) { switch ($s) { case 0: + /* if (s.$get() === 0) { */ if (s.$get() === 0) {} else { $s = 1; continue; } + ch = new chanType(0); + _key = s; (semWaiters || $throwRuntimeError("assignment to entry in nil map"))[_key.$key()] = { k: _key, v: $append((_entry = semWaiters[s.$key()], _entry !== undefined ? _entry.v : sliceType$1.nil), ch) }; + _r = $recv(ch, $BLOCKING); /* */ $s = 2; case 2: if (_r && _r.$blocking) { _r = _r(); } + _r[0]; + /* } */ case 1: + s.$set(s.$get() - (1) >>> 0); + /* */ case -1: } return; } }; $blocking_runtime_Semacquire.$blocking = true; return $blocking_runtime_Semacquire; + }; + runtime_Semrelease = function(s, $b) { + var $args = arguments, $r, $s = 0, $this = this, _entry, _key, ch, w; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_runtime_Semrelease = function() { s: while (true) { switch ($s) { case 0: + s.$set(s.$get() + (1) >>> 0); + w = (_entry = semWaiters[s.$key()], _entry !== undefined ? _entry.v : sliceType$1.nil); + if (w.$length === 0) { + return; + } + ch = ((0 < 0 || 0 >= w.$length) ? $throwRuntimeError("index out of range") : w.$array[w.$offset + 0]); + w = $subslice(w, 1); + _key = s; (semWaiters || $throwRuntimeError("assignment to entry in nil map"))[_key.$key()] = { k: _key, v: w }; + if (w.$length === 0) { + delete semWaiters[s.$key()]; + } + $r = $send(ch, new structType.ptr(), $BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + /* */ case -1: } return; } }; $blocking_runtime_Semrelease.$blocking = true; return $blocking_runtime_Semrelease; + }; + runtime_Syncsemcheck = function(size) { + var size; + }; + Mutex.ptr.prototype.Lock = function($b) { + var $args = arguments, $r, $s = 0, $this = this, awoke, m, new$1, old; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Lock = function() { s: while (true) { switch ($s) { case 0: + m = $this; + if (atomic.CompareAndSwapInt32(new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m), 0, 1)) { + return; + } + awoke = false; + /* while (true) { */ case 1: + /* if (!(true)) { break; } */ if(!(true)) { $s = 2; continue; } + old = m.state; + new$1 = old | 1; + if (!(((old & 1) === 0))) { + new$1 = old + 4 >> 0; + } + if (awoke) { + new$1 = new$1 & ~(2); + } + /* if (atomic.CompareAndSwapInt32(new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m), old, new$1)) { */ if (atomic.CompareAndSwapInt32(new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m), old, new$1)) {} else { $s = 3; continue; } + if ((old & 1) === 0) { + /* break; */ $s = 2; continue; + } + $r = runtime_Semacquire(new ptrType$2(function() { return this.$target.sema; }, function($v) { this.$target.sema = $v; }, m), $BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + awoke = true; + /* } */ case 3: + /* } */ $s = 1; continue; case 2: + /* */ case -1: } return; } }; $blocking_Lock.$blocking = true; return $blocking_Lock; + }; + Mutex.prototype.Lock = function($b) { return this.$val.Lock($b); }; + Mutex.ptr.prototype.Unlock = function($b) { + var $args = arguments, $r, $s = 0, $this = this, m, new$1, old; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Unlock = function() { s: while (true) { switch ($s) { case 0: + m = $this; + new$1 = atomic.AddInt32(new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m), -1); + if ((((new$1 + 1 >> 0)) & 1) === 0) { + $panic(new $String("sync: unlock of unlocked mutex")); + } + old = new$1; + /* while (true) { */ case 1: + /* if (!(true)) { break; } */ if(!(true)) { $s = 2; continue; } + if (((old >> 2 >> 0) === 0) || !(((old & 3) === 0))) { + return; + } + new$1 = ((old - 4 >> 0)) | 2; + /* if (atomic.CompareAndSwapInt32(new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m), old, new$1)) { */ if (atomic.CompareAndSwapInt32(new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m), old, new$1)) {} else { $s = 3; continue; } + $r = runtime_Semrelease(new ptrType$2(function() { return this.$target.sema; }, function($v) { this.$target.sema = $v; }, m), $BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + return; + /* } */ case 3: + old = m.state; + /* } */ $s = 1; continue; case 2: + /* */ case -1: } return; } }; $blocking_Unlock.$blocking = true; return $blocking_Unlock; + }; + Mutex.prototype.Unlock = function($b) { return this.$val.Unlock($b); }; + Once.ptr.prototype.Do = function(f, $b) { + var $args = arguments, $deferred = [], $err = null, $r, $s = 0, $this = this, o; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Do = function() { try { $deferFrames.push($deferred); s: while (true) { switch ($s) { case 0: + o = $this; + if (atomic.LoadUint32(new ptrType$2(function() { return this.$target.done; }, function($v) { this.$target.done = $v; }, o)) === 1) { + return; + } + $r = o.m.Lock($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $deferred.push([$methodVal(o.m, "Unlock"), [$BLOCKING]]); + if (o.done === 0) { + $deferred.push([atomic.StoreUint32, [new ptrType$2(function() { return this.$target.done; }, function($v) { this.$target.done = $v; }, o), 1, $BLOCKING]]); + f(); + } + /* */ case -1: } return; } } catch(err) { $err = err; } finally { $deferFrames.pop(); if ($curGoroutine.asleep && !$jumpToDefer) { throw null; } $s = -1; $callDeferred($deferred, $err); } }; $blocking_Do.$blocking = true; return $blocking_Do; + }; + Once.prototype.Do = function(f, $b) { return this.$val.Do(f, $b); }; + poolCleanup = function() { + var _i, _i$1, _ref, _ref$1, i, i$1, j, l, p, x; + _ref = allPools; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + p = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + (i < 0 || i >= allPools.$length) ? $throwRuntimeError("index out of range") : allPools.$array[allPools.$offset + i] = ptrType.nil; + i$1 = 0; + while (true) { + if (!(i$1 < (p.localSize >> 0))) { break; } + l = indexLocal(p.local, i$1); + l.private$0 = $ifaceNil; + _ref$1 = l.shared; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + j = _i$1; + (x = l.shared, (j < 0 || j >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + j] = $ifaceNil); + _i$1++; + } + l.shared = sliceType$3.nil; + i$1 = i$1 + (1) >> 0; + } + p.local = 0; + p.localSize = 0; + _i++; + } + allPools = new sliceType([]); + }; + init = function() { + runtime_registerPoolCleanup(poolCleanup); + }; + indexLocal = function(l, i) { + var i, l, x; + return (x = l, (x.nilCheck, ((i < 0 || i >= x.length) ? $throwRuntimeError("index out of range") : x[i]))); + }; + raceEnable = function() { + }; + init$1 = function() { + var s; + s = $clone(new syncSema.ptr(), syncSema); + runtime_Syncsemcheck(12); + }; + RWMutex.ptr.prototype.RLock = function($b) { + var $args = arguments, $r, $s = 0, $this = this, rw; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_RLock = function() { s: while (true) { switch ($s) { case 0: + rw = $this; + /* if (atomic.AddInt32(new ptrType$3(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw), 1) < 0) { */ if (atomic.AddInt32(new ptrType$3(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw), 1) < 0) {} else { $s = 1; continue; } + $r = runtime_Semacquire(new ptrType$2(function() { return this.$target.readerSem; }, function($v) { this.$target.readerSem = $v; }, rw), $BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + /* } */ case 1: + /* */ case -1: } return; } }; $blocking_RLock.$blocking = true; return $blocking_RLock; + }; + RWMutex.prototype.RLock = function($b) { return this.$val.RLock($b); }; + RWMutex.ptr.prototype.RUnlock = function($b) { + var $args = arguments, $r, $s = 0, $this = this, r, rw; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_RUnlock = function() { s: while (true) { switch ($s) { case 0: + rw = $this; + r = atomic.AddInt32(new ptrType$3(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw), -1); + /* if (r < 0) { */ if (r < 0) {} else { $s = 1; continue; } + if (((r + 1 >> 0) === 0) || ((r + 1 >> 0) === -1073741824)) { + raceEnable(); + $panic(new $String("sync: RUnlock of unlocked RWMutex")); + } + /* if (atomic.AddInt32(new ptrType$3(function() { return this.$target.readerWait; }, function($v) { this.$target.readerWait = $v; }, rw), -1) === 0) { */ if (atomic.AddInt32(new ptrType$3(function() { return this.$target.readerWait; }, function($v) { this.$target.readerWait = $v; }, rw), -1) === 0) {} else { $s = 2; continue; } + $r = runtime_Semrelease(new ptrType$2(function() { return this.$target.writerSem; }, function($v) { this.$target.writerSem = $v; }, rw), $BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + /* } */ case 2: + /* } */ case 1: + /* */ case -1: } return; } }; $blocking_RUnlock.$blocking = true; return $blocking_RUnlock; + }; + RWMutex.prototype.RUnlock = function($b) { return this.$val.RUnlock($b); }; + RWMutex.ptr.prototype.Lock = function($b) { + var $args = arguments, $r, $s = 0, $this = this, r, rw; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Lock = function() { s: while (true) { switch ($s) { case 0: + rw = $this; + $r = rw.w.Lock($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + r = atomic.AddInt32(new ptrType$3(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw), -1073741824) + 1073741824 >> 0; + /* if (!((r === 0)) && !((atomic.AddInt32(new ptrType$3(function() { return this.$target.readerWait; }, function($v) { this.$target.readerWait = $v; }, rw), r) === 0))) { */ if (!((r === 0)) && !((atomic.AddInt32(new ptrType$3(function() { return this.$target.readerWait; }, function($v) { this.$target.readerWait = $v; }, rw), r) === 0))) {} else { $s = 2; continue; } + $r = runtime_Semacquire(new ptrType$2(function() { return this.$target.writerSem; }, function($v) { this.$target.writerSem = $v; }, rw), $BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + /* } */ case 2: + /* */ case -1: } return; } }; $blocking_Lock.$blocking = true; return $blocking_Lock; + }; + RWMutex.prototype.Lock = function($b) { return this.$val.Lock($b); }; + RWMutex.ptr.prototype.Unlock = function($b) { + var $args = arguments, $r, $s = 0, $this = this, i, r, rw; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Unlock = function() { s: while (true) { switch ($s) { case 0: + rw = $this; + r = atomic.AddInt32(new ptrType$3(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw), 1073741824); + if (r >= 1073741824) { + raceEnable(); + $panic(new $String("sync: Unlock of unlocked RWMutex")); + } + i = 0; + /* while (true) { */ case 1: + /* if (!(i < (r >> 0))) { break; } */ if(!(i < (r >> 0))) { $s = 2; continue; } + $r = runtime_Semrelease(new ptrType$2(function() { return this.$target.readerSem; }, function($v) { this.$target.readerSem = $v; }, rw), $BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + i = i + (1) >> 0; + /* } */ $s = 1; continue; case 2: + $r = rw.w.Unlock($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + /* */ case -1: } return; } }; $blocking_Unlock.$blocking = true; return $blocking_Unlock; + }; + RWMutex.prototype.Unlock = function($b) { return this.$val.Unlock($b); }; + RWMutex.ptr.prototype.RLocker = function() { + var rw; + rw = this; + return $pointerOfStructConversion(rw, ptrType$7); + }; + RWMutex.prototype.RLocker = function() { return this.$val.RLocker(); }; + rlocker.ptr.prototype.Lock = function($b) { + var $args = arguments, $r, $s = 0, $this = this, r; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Lock = function() { s: while (true) { switch ($s) { case 0: + r = $this; + $r = $pointerOfStructConversion(r, ptrType$8).RLock($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + /* */ case -1: } return; } }; $blocking_Lock.$blocking = true; return $blocking_Lock; + }; + rlocker.prototype.Lock = function($b) { return this.$val.Lock($b); }; + rlocker.ptr.prototype.Unlock = function($b) { + var $args = arguments, $r, $s = 0, $this = this, r; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Unlock = function() { s: while (true) { switch ($s) { case 0: + r = $this; + $r = $pointerOfStructConversion(r, ptrType$8).RUnlock($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + /* */ case -1: } return; } }; $blocking_Unlock.$blocking = true; return $blocking_Unlock; + }; + rlocker.prototype.Unlock = function($b) { return this.$val.Unlock($b); }; + ptrType.methods = [{prop: "Get", name: "Get", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Put", name: "Put", pkg: "", typ: $funcType([$emptyInterface], [], false)}, {prop: "getSlow", name: "getSlow", pkg: "sync", typ: $funcType([], [$emptyInterface], false)}, {prop: "pin", name: "pin", pkg: "sync", typ: $funcType([], [ptrType$5], false)}, {prop: "pinSlow", name: "pinSlow", pkg: "sync", typ: $funcType([], [ptrType$5], false)}]; + ptrType$10.methods = [{prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}]; + ptrType$11.methods = [{prop: "Do", name: "Do", pkg: "", typ: $funcType([funcType$1], [], false)}]; + ptrType$8.methods = [{prop: "RLock", name: "RLock", pkg: "", typ: $funcType([], [], false)}, {prop: "RUnlock", name: "RUnlock", pkg: "", typ: $funcType([], [], false)}, {prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}, {prop: "RLocker", name: "RLocker", pkg: "", typ: $funcType([], [Locker], false)}]; + ptrType$7.methods = [{prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}]; + Pool.init([{prop: "local", name: "local", pkg: "sync", typ: $UnsafePointer, tag: ""}, {prop: "localSize", name: "localSize", pkg: "sync", typ: $Uintptr, tag: ""}, {prop: "store", name: "store", pkg: "sync", typ: sliceType$3, tag: ""}, {prop: "New", name: "New", pkg: "", typ: funcType, tag: ""}]); + Mutex.init([{prop: "state", name: "state", pkg: "sync", typ: $Int32, tag: ""}, {prop: "sema", name: "sema", pkg: "sync", typ: $Uint32, tag: ""}]); + Locker.init([{prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}]); + Once.init([{prop: "m", name: "m", pkg: "sync", typ: Mutex, tag: ""}, {prop: "done", name: "done", pkg: "sync", typ: $Uint32, tag: ""}]); + poolLocal.init([{prop: "private$0", name: "private", pkg: "sync", typ: $emptyInterface, tag: ""}, {prop: "shared", name: "shared", pkg: "sync", typ: sliceType$3, tag: ""}, {prop: "Mutex", name: "", pkg: "", typ: Mutex, tag: ""}, {prop: "pad", name: "pad", pkg: "sync", typ: arrayType, tag: ""}]); + syncSema.init([{prop: "lock", name: "lock", pkg: "sync", typ: $Uintptr, tag: ""}, {prop: "head", name: "head", pkg: "sync", typ: $UnsafePointer, tag: ""}, {prop: "tail", name: "tail", pkg: "sync", typ: $UnsafePointer, tag: ""}]); + RWMutex.init([{prop: "w", name: "w", pkg: "sync", typ: Mutex, tag: ""}, {prop: "writerSem", name: "writerSem", pkg: "sync", typ: $Uint32, tag: ""}, {prop: "readerSem", name: "readerSem", pkg: "sync", typ: $Uint32, tag: ""}, {prop: "readerCount", name: "readerCount", pkg: "sync", typ: $Int32, tag: ""}, {prop: "readerWait", name: "readerWait", pkg: "sync", typ: $Int32, tag: ""}]); + rlocker.init([{prop: "w", name: "w", pkg: "sync", typ: Mutex, tag: ""}, {prop: "writerSem", name: "writerSem", pkg: "sync", typ: $Uint32, tag: ""}, {prop: "readerSem", name: "readerSem", pkg: "sync", typ: $Uint32, tag: ""}, {prop: "readerCount", name: "readerCount", pkg: "sync", typ: $Int32, tag: ""}, {prop: "readerWait", name: "readerWait", pkg: "sync", typ: $Int32, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_sync = function() { while (true) { switch ($s) { case 0: + $r = runtime.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = atomic.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + allPools = sliceType.nil; + semWaiters = new $Map(); + init(); + init$1(); + /* */ } return; } }; $init_sync.$blocking = true; return $init_sync; + }; + return $pkg; +})(); +$packages["io"] = (function() { + var $pkg = {}, errors, runtime, sync, RuneReader, errWhence, errOffset; + errors = $packages["errors"]; + runtime = $packages["runtime"]; + sync = $packages["sync"]; + RuneReader = $pkg.RuneReader = $newType(8, $kindInterface, "io.RuneReader", "RuneReader", "io", null); + RuneReader.init([{prop: "ReadRune", name: "ReadRune", pkg: "", typ: $funcType([], [$Int32, $Int, $error], false)}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_io = function() { while (true) { switch ($s) { case 0: + $r = errors.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = runtime.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = sync.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $pkg.ErrShortWrite = errors.New("short write"); + $pkg.ErrShortBuffer = errors.New("short buffer"); + $pkg.EOF = errors.New("EOF"); + $pkg.ErrUnexpectedEOF = errors.New("unexpected EOF"); + $pkg.ErrNoProgress = errors.New("multiple Read calls return no data or error"); + errWhence = errors.New("Seek: invalid whence"); + errOffset = errors.New("Seek: invalid offset"); + $pkg.ErrClosedPipe = errors.New("io: read/write on closed pipe"); + /* */ } return; } }; $init_io.$blocking = true; return $init_io; + }; + return $pkg; +})(); +$packages["math"] = (function() { + var $pkg = {}, js, arrayType, math, zero, posInf, negInf, nan, pow10tab, init, IsInf, Ldexp, Float32bits, Float32frombits, Float64bits, init$1; + js = $packages["github.com/gopherjs/gopherjs/js"]; + arrayType = $arrayType($Float64, 70); + init = function() { + Float32bits(0); + Float32frombits(0); + }; + IsInf = $pkg.IsInf = function(f, sign) { + var f, sign; + if (f === posInf) { + return sign >= 0; + } + if (f === negInf) { + return sign <= 0; + } + return false; + }; + Ldexp = $pkg.Ldexp = function(frac, exp$1) { + var exp$1, frac; + if (frac === 0) { + return frac; + } + if (exp$1 >= 1024) { + return frac * $parseFloat(math.pow(2, 1023)) * $parseFloat(math.pow(2, exp$1 - 1023 >> 0)); + } + if (exp$1 <= -1024) { + return frac * $parseFloat(math.pow(2, -1023)) * $parseFloat(math.pow(2, exp$1 + 1023 >> 0)); + } + return frac * $parseFloat(math.pow(2, exp$1)); + }; + Float32bits = $pkg.Float32bits = function(f) { + var e, f, r, s; + if (f === 0) { + if (1 / f === negInf) { + return 2147483648; + } + return 0; + } + if (!(f === f)) { + return 2143289344; + } + s = 0; + if (f < 0) { + s = 2147483648; + f = -f; + } + e = 150; + while (true) { + if (!(f >= 1.6777216e+07)) { break; } + f = f / (2); + e = e + (1) >>> 0; + if (e === 255) { + if (f >= 8.388608e+06) { + f = posInf; + } + break; + } + } + while (true) { + if (!(f < 8.388608e+06)) { break; } + e = e - (1) >>> 0; + if (e === 0) { + break; + } + f = f * (2); + } + r = $parseFloat($mod(f, 2)); + if ((r > 0.5 && r < 1) || r >= 1.5) { + f = f + (1); + } + return (((s | (e << 23 >>> 0)) >>> 0) | (((f >> 0) & ~8388608))) >>> 0; + }; + Float32frombits = $pkg.Float32frombits = function(b) { + var b, e, m, s; + s = 1; + if (!((((b & 2147483648) >>> 0) === 0))) { + s = -1; + } + e = (((b >>> 23 >>> 0)) & 255) >>> 0; + m = (b & 8388607) >>> 0; + if (e === 255) { + if (m === 0) { + return s / 0; + } + return nan; + } + if (!((e === 0))) { + m = m + (8388608) >>> 0; + } + if (e === 0) { + e = 1; + } + return Ldexp(m, ((e >> 0) - 127 >> 0) - 23 >> 0) * s; + }; + Float64bits = $pkg.Float64bits = function(f) { + var e, f, s, x, x$1, x$2, x$3; + if (f === 0) { + if (1 / f === negInf) { + return new $Uint64(2147483648, 0); + } + return new $Uint64(0, 0); + } + if (!((f === f))) { + return new $Uint64(2146959360, 1); + } + s = new $Uint64(0, 0); + if (f < 0) { + s = new $Uint64(2147483648, 0); + f = -f; + } + e = 1075; + while (true) { + if (!(f >= 9.007199254740992e+15)) { break; } + f = f / (2); + e = e + (1) >>> 0; + if (e === 2047) { + break; + } + } + while (true) { + if (!(f < 4.503599627370496e+15)) { break; } + e = e - (1) >>> 0; + if (e === 0) { + break; + } + f = f * (2); + } + return (x = (x$1 = $shiftLeft64(new $Uint64(0, e), 52), new $Uint64(s.$high | x$1.$high, (s.$low | x$1.$low) >>> 0)), x$2 = (x$3 = new $Uint64(0, f), new $Uint64(x$3.$high &~ 1048576, (x$3.$low &~ 0) >>> 0)), new $Uint64(x.$high | x$2.$high, (x.$low | x$2.$low) >>> 0)); + }; + init$1 = function() { + var _q, i, m, x; + pow10tab[0] = 1; + pow10tab[1] = 10; + i = 2; + while (true) { + if (!(i < 70)) { break; } + m = (_q = i / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + (i < 0 || i >= pow10tab.length) ? $throwRuntimeError("index out of range") : pow10tab[i] = ((m < 0 || m >= pow10tab.length) ? $throwRuntimeError("index out of range") : pow10tab[m]) * (x = i - m >> 0, ((x < 0 || x >= pow10tab.length) ? $throwRuntimeError("index out of range") : pow10tab[x])); + i = i + (1) >> 0; + } + }; + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_math = function() { while (true) { switch ($s) { case 0: + $r = js.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + pow10tab = arrayType.zero(); + math = $global.Math; + zero = 0; + posInf = 1 / zero; + negInf = -1 / zero; + nan = 0 / zero; + init(); + init$1(); + /* */ } return; } }; $init_math.$blocking = true; return $init_math; + }; + return $pkg; +})(); +$packages["unicode"] = (function() { + var $pkg = {}; + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_unicode = function() { while (true) { switch ($s) { case 0: + /* */ } return; } }; $init_unicode.$blocking = true; return $init_unicode; + }; + return $pkg; +})(); +$packages["unicode/utf8"] = (function() { + var $pkg = {}, decodeRuneInternal, decodeRuneInStringInternal, DecodeRune, DecodeRuneInString, RuneLen, EncodeRune, RuneCount, RuneCountInString; + decodeRuneInternal = function(p) { + var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$44, _tmp$45, _tmp$46, _tmp$47, _tmp$48, _tmp$49, _tmp$5, _tmp$50, _tmp$6, _tmp$7, _tmp$8, _tmp$9, c0, c1, c2, c3, n, p, r = 0, short$1 = false, size = 0; + n = p.$length; + if (n < 1) { + _tmp = 65533; _tmp$1 = 0; _tmp$2 = true; r = _tmp; size = _tmp$1; short$1 = _tmp$2; + return [r, size, short$1]; + } + c0 = ((0 < 0 || 0 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 0]); + if (c0 < 128) { + _tmp$3 = (c0 >> 0); _tmp$4 = 1; _tmp$5 = false; r = _tmp$3; size = _tmp$4; short$1 = _tmp$5; + return [r, size, short$1]; + } + if (c0 < 192) { + _tmp$6 = 65533; _tmp$7 = 1; _tmp$8 = false; r = _tmp$6; size = _tmp$7; short$1 = _tmp$8; + return [r, size, short$1]; + } + if (n < 2) { + _tmp$9 = 65533; _tmp$10 = 1; _tmp$11 = true; r = _tmp$9; size = _tmp$10; short$1 = _tmp$11; + return [r, size, short$1]; + } + c1 = ((1 < 0 || 1 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 1]); + if (c1 < 128 || 192 <= c1) { + _tmp$12 = 65533; _tmp$13 = 1; _tmp$14 = false; r = _tmp$12; size = _tmp$13; short$1 = _tmp$14; + return [r, size, short$1]; + } + if (c0 < 224) { + r = ((((c0 & 31) >>> 0) >> 0) << 6 >> 0) | (((c1 & 63) >>> 0) >> 0); + if (r <= 127) { + _tmp$15 = 65533; _tmp$16 = 1; _tmp$17 = false; r = _tmp$15; size = _tmp$16; short$1 = _tmp$17; + return [r, size, short$1]; + } + _tmp$18 = r; _tmp$19 = 2; _tmp$20 = false; r = _tmp$18; size = _tmp$19; short$1 = _tmp$20; + return [r, size, short$1]; + } + if (n < 3) { + _tmp$21 = 65533; _tmp$22 = 1; _tmp$23 = true; r = _tmp$21; size = _tmp$22; short$1 = _tmp$23; + return [r, size, short$1]; + } + c2 = ((2 < 0 || 2 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 2]); + if (c2 < 128 || 192 <= c2) { + _tmp$24 = 65533; _tmp$25 = 1; _tmp$26 = false; r = _tmp$24; size = _tmp$25; short$1 = _tmp$26; + return [r, size, short$1]; + } + if (c0 < 240) { + r = (((((c0 & 15) >>> 0) >> 0) << 12 >> 0) | ((((c1 & 63) >>> 0) >> 0) << 6 >> 0)) | (((c2 & 63) >>> 0) >> 0); + if (r <= 2047) { + _tmp$27 = 65533; _tmp$28 = 1; _tmp$29 = false; r = _tmp$27; size = _tmp$28; short$1 = _tmp$29; + return [r, size, short$1]; + } + if (55296 <= r && r <= 57343) { + _tmp$30 = 65533; _tmp$31 = 1; _tmp$32 = false; r = _tmp$30; size = _tmp$31; short$1 = _tmp$32; + return [r, size, short$1]; + } + _tmp$33 = r; _tmp$34 = 3; _tmp$35 = false; r = _tmp$33; size = _tmp$34; short$1 = _tmp$35; + return [r, size, short$1]; + } + if (n < 4) { + _tmp$36 = 65533; _tmp$37 = 1; _tmp$38 = true; r = _tmp$36; size = _tmp$37; short$1 = _tmp$38; + return [r, size, short$1]; + } + c3 = ((3 < 0 || 3 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 3]); + if (c3 < 128 || 192 <= c3) { + _tmp$39 = 65533; _tmp$40 = 1; _tmp$41 = false; r = _tmp$39; size = _tmp$40; short$1 = _tmp$41; + return [r, size, short$1]; + } + if (c0 < 248) { + r = ((((((c0 & 7) >>> 0) >> 0) << 18 >> 0) | ((((c1 & 63) >>> 0) >> 0) << 12 >> 0)) | ((((c2 & 63) >>> 0) >> 0) << 6 >> 0)) | (((c3 & 63) >>> 0) >> 0); + if (r <= 65535 || 1114111 < r) { + _tmp$42 = 65533; _tmp$43 = 1; _tmp$44 = false; r = _tmp$42; size = _tmp$43; short$1 = _tmp$44; + return [r, size, short$1]; + } + _tmp$45 = r; _tmp$46 = 4; _tmp$47 = false; r = _tmp$45; size = _tmp$46; short$1 = _tmp$47; + return [r, size, short$1]; + } + _tmp$48 = 65533; _tmp$49 = 1; _tmp$50 = false; r = _tmp$48; size = _tmp$49; short$1 = _tmp$50; + return [r, size, short$1]; + }; + decodeRuneInStringInternal = function(s) { + var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$44, _tmp$45, _tmp$46, _tmp$47, _tmp$48, _tmp$49, _tmp$5, _tmp$50, _tmp$6, _tmp$7, _tmp$8, _tmp$9, c0, c1, c2, c3, n, r = 0, s, short$1 = false, size = 0; + n = s.length; + if (n < 1) { + _tmp = 65533; _tmp$1 = 0; _tmp$2 = true; r = _tmp; size = _tmp$1; short$1 = _tmp$2; + return [r, size, short$1]; + } + c0 = s.charCodeAt(0); + if (c0 < 128) { + _tmp$3 = (c0 >> 0); _tmp$4 = 1; _tmp$5 = false; r = _tmp$3; size = _tmp$4; short$1 = _tmp$5; + return [r, size, short$1]; + } + if (c0 < 192) { + _tmp$6 = 65533; _tmp$7 = 1; _tmp$8 = false; r = _tmp$6; size = _tmp$7; short$1 = _tmp$8; + return [r, size, short$1]; + } + if (n < 2) { + _tmp$9 = 65533; _tmp$10 = 1; _tmp$11 = true; r = _tmp$9; size = _tmp$10; short$1 = _tmp$11; + return [r, size, short$1]; + } + c1 = s.charCodeAt(1); + if (c1 < 128 || 192 <= c1) { + _tmp$12 = 65533; _tmp$13 = 1; _tmp$14 = false; r = _tmp$12; size = _tmp$13; short$1 = _tmp$14; + return [r, size, short$1]; + } + if (c0 < 224) { + r = ((((c0 & 31) >>> 0) >> 0) << 6 >> 0) | (((c1 & 63) >>> 0) >> 0); + if (r <= 127) { + _tmp$15 = 65533; _tmp$16 = 1; _tmp$17 = false; r = _tmp$15; size = _tmp$16; short$1 = _tmp$17; + return [r, size, short$1]; + } + _tmp$18 = r; _tmp$19 = 2; _tmp$20 = false; r = _tmp$18; size = _tmp$19; short$1 = _tmp$20; + return [r, size, short$1]; + } + if (n < 3) { + _tmp$21 = 65533; _tmp$22 = 1; _tmp$23 = true; r = _tmp$21; size = _tmp$22; short$1 = _tmp$23; + return [r, size, short$1]; + } + c2 = s.charCodeAt(2); + if (c2 < 128 || 192 <= c2) { + _tmp$24 = 65533; _tmp$25 = 1; _tmp$26 = false; r = _tmp$24; size = _tmp$25; short$1 = _tmp$26; + return [r, size, short$1]; + } + if (c0 < 240) { + r = (((((c0 & 15) >>> 0) >> 0) << 12 >> 0) | ((((c1 & 63) >>> 0) >> 0) << 6 >> 0)) | (((c2 & 63) >>> 0) >> 0); + if (r <= 2047) { + _tmp$27 = 65533; _tmp$28 = 1; _tmp$29 = false; r = _tmp$27; size = _tmp$28; short$1 = _tmp$29; + return [r, size, short$1]; + } + if (55296 <= r && r <= 57343) { + _tmp$30 = 65533; _tmp$31 = 1; _tmp$32 = false; r = _tmp$30; size = _tmp$31; short$1 = _tmp$32; + return [r, size, short$1]; + } + _tmp$33 = r; _tmp$34 = 3; _tmp$35 = false; r = _tmp$33; size = _tmp$34; short$1 = _tmp$35; + return [r, size, short$1]; + } + if (n < 4) { + _tmp$36 = 65533; _tmp$37 = 1; _tmp$38 = true; r = _tmp$36; size = _tmp$37; short$1 = _tmp$38; + return [r, size, short$1]; + } + c3 = s.charCodeAt(3); + if (c3 < 128 || 192 <= c3) { + _tmp$39 = 65533; _tmp$40 = 1; _tmp$41 = false; r = _tmp$39; size = _tmp$40; short$1 = _tmp$41; + return [r, size, short$1]; + } + if (c0 < 248) { + r = ((((((c0 & 7) >>> 0) >> 0) << 18 >> 0) | ((((c1 & 63) >>> 0) >> 0) << 12 >> 0)) | ((((c2 & 63) >>> 0) >> 0) << 6 >> 0)) | (((c3 & 63) >>> 0) >> 0); + if (r <= 65535 || 1114111 < r) { + _tmp$42 = 65533; _tmp$43 = 1; _tmp$44 = false; r = _tmp$42; size = _tmp$43; short$1 = _tmp$44; + return [r, size, short$1]; + } + _tmp$45 = r; _tmp$46 = 4; _tmp$47 = false; r = _tmp$45; size = _tmp$46; short$1 = _tmp$47; + return [r, size, short$1]; + } + _tmp$48 = 65533; _tmp$49 = 1; _tmp$50 = false; r = _tmp$48; size = _tmp$49; short$1 = _tmp$50; + return [r, size, short$1]; + }; + DecodeRune = $pkg.DecodeRune = function(p) { + var _tuple, p, r = 0, size = 0; + _tuple = decodeRuneInternal(p); r = _tuple[0]; size = _tuple[1]; + return [r, size]; + }; + DecodeRuneInString = $pkg.DecodeRuneInString = function(s) { + var _tuple, r = 0, s, size = 0; + _tuple = decodeRuneInStringInternal(s); r = _tuple[0]; size = _tuple[1]; + return [r, size]; + }; + RuneLen = $pkg.RuneLen = function(r) { + var r; + if (r < 0) { + return -1; + } else if (r <= 127) { + return 1; + } else if (r <= 2047) { + return 2; + } else if (55296 <= r && r <= 57343) { + return -1; + } else if (r <= 65535) { + return 3; + } else if (r <= 1114111) { + return 4; + } + return -1; + }; + EncodeRune = $pkg.EncodeRune = function(p, r) { + var i, p, r; + i = (r >>> 0); + if (i <= 127) { + (0 < 0 || 0 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 0] = (r << 24 >>> 24); + return 1; + } else if (i <= 2047) { + (0 < 0 || 0 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 0] = (192 | ((r >> 6 >> 0) << 24 >>> 24)) >>> 0; + (1 < 0 || 1 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 1] = (128 | (((r << 24 >>> 24) & 63) >>> 0)) >>> 0; + return 2; + } else if (i > 1114111 || 55296 <= i && i <= 57343) { + r = 65533; + (0 < 0 || 0 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 0] = (224 | ((r >> 12 >> 0) << 24 >>> 24)) >>> 0; + (1 < 0 || 1 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 1] = (128 | ((((r >> 6 >> 0) << 24 >>> 24) & 63) >>> 0)) >>> 0; + (2 < 0 || 2 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 2] = (128 | (((r << 24 >>> 24) & 63) >>> 0)) >>> 0; + return 3; + } else if (i <= 65535) { + (0 < 0 || 0 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 0] = (224 | ((r >> 12 >> 0) << 24 >>> 24)) >>> 0; + (1 < 0 || 1 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 1] = (128 | ((((r >> 6 >> 0) << 24 >>> 24) & 63) >>> 0)) >>> 0; + (2 < 0 || 2 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 2] = (128 | (((r << 24 >>> 24) & 63) >>> 0)) >>> 0; + return 3; + } else { + (0 < 0 || 0 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 0] = (240 | ((r >> 18 >> 0) << 24 >>> 24)) >>> 0; + (1 < 0 || 1 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 1] = (128 | ((((r >> 12 >> 0) << 24 >>> 24) & 63) >>> 0)) >>> 0; + (2 < 0 || 2 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 2] = (128 | ((((r >> 6 >> 0) << 24 >>> 24) & 63) >>> 0)) >>> 0; + (3 < 0 || 3 >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + 3] = (128 | (((r << 24 >>> 24) & 63) >>> 0)) >>> 0; + return 4; + } + }; + RuneCount = $pkg.RuneCount = function(p) { + var _tuple, i, n, p, size; + i = 0; + n = 0; + n = 0; + while (true) { + if (!(i < p.$length)) { break; } + if (((i < 0 || i >= p.$length) ? $throwRuntimeError("index out of range") : p.$array[p.$offset + i]) < 128) { + i = i + (1) >> 0; + } else { + _tuple = DecodeRune($subslice(p, i)); size = _tuple[1]; + i = i + (size) >> 0; + } + n = n + (1) >> 0; + } + return n; + }; + RuneCountInString = $pkg.RuneCountInString = function(s) { + var _i, _ref, _rune, n = 0, s; + _ref = s; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + n = n + (1) >> 0; + _i += _rune[1]; + } + return n; + }; + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_utf8 = function() { while (true) { switch ($s) { case 0: + /* */ } return; } }; $init_utf8.$blocking = true; return $init_utf8; + }; + return $pkg; +})(); +$packages["bytes"] = (function() { + var $pkg = {}, errors, io, unicode, utf8, IndexByte; + errors = $packages["errors"]; + io = $packages["io"]; + unicode = $packages["unicode"]; + utf8 = $packages["unicode/utf8"]; + IndexByte = $pkg.IndexByte = function(s, c) { + var _i, _ref, b, c, i, s; + _ref = s; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + b = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (b === c) { + return i; + } + _i++; + } + return -1; + }; + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_bytes = function() { while (true) { switch ($s) { case 0: + $r = errors.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = io.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = unicode.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = utf8.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $pkg.ErrTooLarge = errors.New("bytes.Buffer: too large"); + /* */ } return; } }; $init_bytes.$blocking = true; return $init_bytes; + }; + return $pkg; +})(); +$packages["syscall"] = (function() { + var $pkg = {}, bytes, errors, js, runtime, sync, mmapper, Errno, _C_int, Timespec, Stat_t, Dirent, sliceType, sliceType$1, ptrType, sliceType$4, ptrType$10, arrayType$2, sliceType$9, arrayType$3, arrayType$4, structType, ptrType$24, mapType, funcType, funcType$1, ptrType$28, arrayType$8, arrayType$10, arrayType$12, warningPrinted, lineBuffer, syscallModule, alreadyTriedToLoad, minusOne, envOnce, envLock, env, envs, mapper, errors$1, init, printWarning, printToConsole, use, runtime_envs, syscall, Syscall, Syscall6, BytePtrFromString, copyenv, Getenv, itoa, uitoa, ByteSliceFromString, ReadDirent, Sysctl, nametomib, ParseDirent, Read, Write, sysctl, Close, Fchdir, Fchmod, Fchown, Fstat, Fsync, Ftruncate, Getdirentries, Lstat, Pread, Pwrite, read, Seek, write, mmap, munmap; + bytes = $packages["bytes"]; + errors = $packages["errors"]; + js = $packages["github.com/gopherjs/gopherjs/js"]; + runtime = $packages["runtime"]; + sync = $packages["sync"]; + mmapper = $pkg.mmapper = $newType(0, $kindStruct, "syscall.mmapper", "mmapper", "syscall", function(Mutex_, active_, mmap_, munmap_) { + this.$val = this; + this.Mutex = Mutex_ !== undefined ? Mutex_ : new sync.Mutex.ptr(); + this.active = active_ !== undefined ? active_ : false; + this.mmap = mmap_ !== undefined ? mmap_ : $throwNilPointerError; + this.munmap = munmap_ !== undefined ? munmap_ : $throwNilPointerError; + }); + Errno = $pkg.Errno = $newType(4, $kindUintptr, "syscall.Errno", "Errno", "syscall", null); + _C_int = $pkg._C_int = $newType(4, $kindInt32, "syscall._C_int", "_C_int", "syscall", null); + Timespec = $pkg.Timespec = $newType(0, $kindStruct, "syscall.Timespec", "Timespec", "syscall", function(Sec_, Nsec_) { + this.$val = this; + this.Sec = Sec_ !== undefined ? Sec_ : new $Int64(0, 0); + this.Nsec = Nsec_ !== undefined ? Nsec_ : new $Int64(0, 0); + }); + Stat_t = $pkg.Stat_t = $newType(0, $kindStruct, "syscall.Stat_t", "Stat_t", "syscall", function(Dev_, Mode_, Nlink_, Ino_, Uid_, Gid_, Rdev_, Pad_cgo_0_, Atimespec_, Mtimespec_, Ctimespec_, Birthtimespec_, Size_, Blocks_, Blksize_, Flags_, Gen_, Lspare_, Qspare_) { + this.$val = this; + this.Dev = Dev_ !== undefined ? Dev_ : 0; + this.Mode = Mode_ !== undefined ? Mode_ : 0; + this.Nlink = Nlink_ !== undefined ? Nlink_ : 0; + this.Ino = Ino_ !== undefined ? Ino_ : new $Uint64(0, 0); + this.Uid = Uid_ !== undefined ? Uid_ : 0; + this.Gid = Gid_ !== undefined ? Gid_ : 0; + this.Rdev = Rdev_ !== undefined ? Rdev_ : 0; + this.Pad_cgo_0 = Pad_cgo_0_ !== undefined ? Pad_cgo_0_ : arrayType$3.zero(); + this.Atimespec = Atimespec_ !== undefined ? Atimespec_ : new Timespec.ptr(); + this.Mtimespec = Mtimespec_ !== undefined ? Mtimespec_ : new Timespec.ptr(); + this.Ctimespec = Ctimespec_ !== undefined ? Ctimespec_ : new Timespec.ptr(); + this.Birthtimespec = Birthtimespec_ !== undefined ? Birthtimespec_ : new Timespec.ptr(); + this.Size = Size_ !== undefined ? Size_ : new $Int64(0, 0); + this.Blocks = Blocks_ !== undefined ? Blocks_ : new $Int64(0, 0); + this.Blksize = Blksize_ !== undefined ? Blksize_ : 0; + this.Flags = Flags_ !== undefined ? Flags_ : 0; + this.Gen = Gen_ !== undefined ? Gen_ : 0; + this.Lspare = Lspare_ !== undefined ? Lspare_ : 0; + this.Qspare = Qspare_ !== undefined ? Qspare_ : arrayType$8.zero(); + }); + Dirent = $pkg.Dirent = $newType(0, $kindStruct, "syscall.Dirent", "Dirent", "syscall", function(Ino_, Seekoff_, Reclen_, Namlen_, Type_, Name_, Pad_cgo_0_) { + this.$val = this; + this.Ino = Ino_ !== undefined ? Ino_ : new $Uint64(0, 0); + this.Seekoff = Seekoff_ !== undefined ? Seekoff_ : new $Uint64(0, 0); + this.Reclen = Reclen_ !== undefined ? Reclen_ : 0; + this.Namlen = Namlen_ !== undefined ? Namlen_ : 0; + this.Type = Type_ !== undefined ? Type_ : 0; + this.Name = Name_ !== undefined ? Name_ : arrayType$10.zero(); + this.Pad_cgo_0 = Pad_cgo_0_ !== undefined ? Pad_cgo_0_ : arrayType$12.zero(); + }); + sliceType = $sliceType($Uint8); + sliceType$1 = $sliceType($String); + ptrType = $ptrType($Uint8); + sliceType$4 = $sliceType(_C_int); + ptrType$10 = $ptrType($Uintptr); + arrayType$2 = $arrayType($Uint8, 32); + sliceType$9 = $sliceType($Uint8); + arrayType$3 = $arrayType($Uint8, 4); + arrayType$4 = $arrayType(_C_int, 14); + structType = $structType([{prop: "addr", name: "addr", pkg: "syscall", typ: $Uintptr, tag: ""}, {prop: "len", name: "len", pkg: "syscall", typ: $Int, tag: ""}, {prop: "cap", name: "cap", pkg: "syscall", typ: $Int, tag: ""}]); + ptrType$24 = $ptrType(mmapper); + mapType = $mapType(ptrType, sliceType); + funcType = $funcType([$Uintptr, $Uintptr, $Int, $Int, $Int, $Int64], [$Uintptr, $error], false); + funcType$1 = $funcType([$Uintptr, $Uintptr], [$error], false); + ptrType$28 = $ptrType(Timespec); + arrayType$8 = $arrayType($Int64, 2); + arrayType$10 = $arrayType($Int8, 1024); + arrayType$12 = $arrayType($Uint8, 3); + init = function() { + $flushConsole = (function() { + if (!((lineBuffer.$length === 0))) { + $global.console.log($externalize($bytesToString(lineBuffer), $String)); + lineBuffer = sliceType.nil; + } + }); + }; + printWarning = function() { + if (!warningPrinted) { + console.log("warning: system calls not available, see https://github.com/gopherjs/gopherjs/blob/master/doc/syscalls.md"); + } + warningPrinted = true; + }; + printToConsole = function(b) { + var b, goPrintToConsole, i; + goPrintToConsole = $global.goPrintToConsole; + if (!(goPrintToConsole === undefined)) { + goPrintToConsole(b); + return; + } + lineBuffer = $appendSlice(lineBuffer, b); + while (true) { + if (!(true)) { break; } + i = bytes.IndexByte(lineBuffer, 10); + if (i === -1) { + break; + } + $global.console.log($externalize($bytesToString($subslice(lineBuffer, 0, i)), $String)); + lineBuffer = $subslice(lineBuffer, (i + 1 >> 0)); + } + }; + use = function(p) { + var p; + }; + runtime_envs = function() { + var envkeys, envs$1, i, jsEnv, key, process; + process = $global.process; + if (process === undefined) { + return sliceType$1.nil; + } + jsEnv = process.env; + envkeys = $global.Object.keys(jsEnv); + envs$1 = $makeSlice(sliceType$1, $parseInt(envkeys.length)); + i = 0; + while (true) { + if (!(i < $parseInt(envkeys.length))) { break; } + key = $internalize(envkeys[i], $String); + (i < 0 || i >= envs$1.$length) ? $throwRuntimeError("index out of range") : envs$1.$array[envs$1.$offset + i] = key + "=" + $internalize(jsEnv[$externalize(key, $String)], $String); + i = i + (1) >> 0; + } + return envs$1; + }; + syscall = function(name) { + var $deferred = [], $err = null, name, require; + /* */ try { $deferFrames.push($deferred); + $deferred.push([(function() { + $recover(); + }), []]); + if (syscallModule === null) { + if (alreadyTriedToLoad) { + return null; + } + alreadyTriedToLoad = true; + require = $global.require; + if (require === undefined) { + $panic(new $String("")); + } + syscallModule = require($externalize("syscall", $String)); + } + return syscallModule[$externalize(name, $String)]; + /* */ } catch(err) { $err = err; return null; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + Syscall = $pkg.Syscall = function(trap, a1, a2, a3) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, a1, a2, a3, array, err = 0, f, r, r1 = 0, r2 = 0, slice, trap; + f = syscall("Syscall"); + if (!(f === null)) { + r = f(trap, a1, a2, a3); + _tmp = (($parseInt(r[0]) >> 0) >>> 0); _tmp$1 = (($parseInt(r[1]) >> 0) >>> 0); _tmp$2 = (($parseInt(r[2]) >> 0) >>> 0); r1 = _tmp; r2 = _tmp$1; err = _tmp$2; + return [r1, r2, err]; + } + if ((trap === 4) && ((a1 === 1) || (a1 === 2))) { + array = a2; + slice = $makeSlice(sliceType, $parseInt(array.length)); + slice.$array = array; + printToConsole(slice); + _tmp$3 = ($parseInt(array.length) >>> 0); _tmp$4 = 0; _tmp$5 = 0; r1 = _tmp$3; r2 = _tmp$4; err = _tmp$5; + return [r1, r2, err]; + } + printWarning(); + _tmp$6 = (minusOne >>> 0); _tmp$7 = 0; _tmp$8 = 13; r1 = _tmp$6; r2 = _tmp$7; err = _tmp$8; + return [r1, r2, err]; + }; + Syscall6 = $pkg.Syscall6 = function(trap, a1, a2, a3, a4, a5, a6) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, a1, a2, a3, a4, a5, a6, err = 0, f, r, r1 = 0, r2 = 0, trap; + f = syscall("Syscall6"); + if (!(f === null)) { + r = f(trap, a1, a2, a3, a4, a5, a6); + _tmp = (($parseInt(r[0]) >> 0) >>> 0); _tmp$1 = (($parseInt(r[1]) >> 0) >>> 0); _tmp$2 = (($parseInt(r[2]) >> 0) >>> 0); r1 = _tmp; r2 = _tmp$1; err = _tmp$2; + return [r1, r2, err]; + } + if (!((trap === 202))) { + printWarning(); + } + _tmp$3 = (minusOne >>> 0); _tmp$4 = 0; _tmp$5 = 13; r1 = _tmp$3; r2 = _tmp$4; err = _tmp$5; + return [r1, r2, err]; + }; + BytePtrFromString = $pkg.BytePtrFromString = function(s) { + var _i, _ref, array, b, i, s; + array = new ($global.Uint8Array)(s.length + 1 >> 0); + _ref = new sliceType($stringToBytes(s)); + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + b = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (b === 0) { + return [ptrType.nil, new Errno(22)]; + } + array[i] = b; + _i++; + } + array[s.length] = 0; + return [array, $ifaceNil]; + }; + copyenv = function() { + var _entry, _i, _key, _ref, _tuple, i, j, key, ok, s; + env = new $Map(); + _ref = envs; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + s = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + j = 0; + while (true) { + if (!(j < s.length)) { break; } + if (s.charCodeAt(j) === 61) { + key = s.substring(0, j); + _tuple = (_entry = env[key], _entry !== undefined ? [_entry.v, true] : [0, false]); ok = _tuple[1]; + if (!ok) { + _key = key; (env || $throwRuntimeError("assignment to entry in nil map"))[_key] = { k: _key, v: i }; + } else { + (i < 0 || i >= envs.$length) ? $throwRuntimeError("index out of range") : envs.$array[envs.$offset + i] = ""; + } + break; + } + j = j + (1) >> 0; + } + _i++; + } + }; + Getenv = $pkg.Getenv = function(key, $b) { + var $args = arguments, $deferred = [], $err = null, $r, $s = 0, $this = this, _entry, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, found = false, i, i$1, ok, s, value = ""; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Getenv = function() { try { $deferFrames.push($deferred); s: while (true) { switch ($s) { case 0: + $r = envOnce.Do(copyenv, $BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + if (key.length === 0) { + _tmp = ""; _tmp$1 = false; value = _tmp; found = _tmp$1; + return [value, found]; + } + $r = envLock.RLock($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $deferred.push([$methodVal(envLock, "RUnlock"), [$BLOCKING]]); + _tuple = (_entry = env[key], _entry !== undefined ? [_entry.v, true] : [0, false]); i = _tuple[0]; ok = _tuple[1]; + if (!ok) { + _tmp$2 = ""; _tmp$3 = false; value = _tmp$2; found = _tmp$3; + return [value, found]; + } + s = ((i < 0 || i >= envs.$length) ? $throwRuntimeError("index out of range") : envs.$array[envs.$offset + i]); + i$1 = 0; + while (true) { + if (!(i$1 < s.length)) { break; } + if (s.charCodeAt(i$1) === 61) { + _tmp$4 = s.substring((i$1 + 1 >> 0)); _tmp$5 = true; value = _tmp$4; found = _tmp$5; + return [value, found]; + } + i$1 = i$1 + (1) >> 0; + } + _tmp$6 = ""; _tmp$7 = false; value = _tmp$6; found = _tmp$7; + return [value, found]; + /* */ case -1: } return; } } catch(err) { $err = err; } finally { $deferFrames.pop(); if ($curGoroutine.asleep && !$jumpToDefer) { throw null; } $s = -1; $callDeferred($deferred, $err); return [value, found]; } }; $blocking_Getenv.$blocking = true; return $blocking_Getenv; + }; + itoa = function(val) { + var val; + if (val < 0) { + return "-" + uitoa((-val >>> 0)); + } + return uitoa((val >>> 0)); + }; + uitoa = function(val) { + var _q, _r, buf, i, val; + buf = $clone(arrayType$2.zero(), arrayType$2); + i = 31; + while (true) { + if (!(val >= 10)) { break; } + (i < 0 || i >= buf.length) ? $throwRuntimeError("index out of range") : buf[i] = (((_r = val % 10, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) + 48 >>> 0) << 24 >>> 24); + i = i - (1) >> 0; + val = (_q = val / (10), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); + } + (i < 0 || i >= buf.length) ? $throwRuntimeError("index out of range") : buf[i] = ((val + 48 >>> 0) << 24 >>> 24); + return $bytesToString($subslice(new sliceType(buf), i)); + }; + ByteSliceFromString = $pkg.ByteSliceFromString = function(s) { + var a, i, s; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + if (s.charCodeAt(i) === 0) { + return [sliceType.nil, new Errno(22)]; + } + i = i + (1) >> 0; + } + a = $makeSlice(sliceType, (s.length + 1 >> 0)); + $copyString(a, s); + return [a, $ifaceNil]; + }; + Timespec.ptr.prototype.Unix = function() { + var _tmp, _tmp$1, nsec = new $Int64(0, 0), sec = new $Int64(0, 0), ts; + ts = this; + _tmp = ts.Sec; _tmp$1 = ts.Nsec; sec = _tmp; nsec = _tmp$1; + return [sec, nsec]; + }; + Timespec.prototype.Unix = function() { return this.$val.Unix(); }; + Timespec.ptr.prototype.Nano = function() { + var ts, x, x$1; + ts = this; + return (x = $mul64(ts.Sec, new $Int64(0, 1000000000)), x$1 = ts.Nsec, new $Int64(x.$high + x$1.$high, x.$low + x$1.$low)); + }; + Timespec.prototype.Nano = function() { return this.$val.Nano(); }; + ReadDirent = $pkg.ReadDirent = function(fd, buf) { + var _tuple, base, buf, err = $ifaceNil, fd, n = 0; + base = new Uint8Array(8); + _tuple = Getdirentries(fd, buf, base); n = _tuple[0]; err = _tuple[1]; + if (true && ($interfaceIsEqual(err, new Errno(22)) || $interfaceIsEqual(err, new Errno(2)))) { + err = $ifaceNil; + } + return [n, err]; + }; + Sysctl = $pkg.Sysctl = function(name) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, buf, err = $ifaceNil, mib, n, name, value = "", x; + _tuple = nametomib(name); mib = _tuple[0]; err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = ""; _tmp$1 = err; value = _tmp; err = _tmp$1; + return [value, err]; + } + n = 0; + err = sysctl(mib, ptrType.nil, new ptrType$10(function() { return n; }, function($v) { n = $v; }), ptrType.nil, 0); + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$2 = ""; _tmp$3 = err; value = _tmp$2; err = _tmp$3; + return [value, err]; + } + if (n === 0) { + _tmp$4 = ""; _tmp$5 = $ifaceNil; value = _tmp$4; err = _tmp$5; + return [value, err]; + } + buf = $makeSlice(sliceType, n); + err = sysctl(mib, new ptrType(function() { return ((0 < 0 || 0 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + 0]); }, function($v) { (0 < 0 || 0 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + 0] = $v; }, buf), new ptrType$10(function() { return n; }, function($v) { n = $v; }), ptrType.nil, 0); + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$6 = ""; _tmp$7 = err; value = _tmp$6; err = _tmp$7; + return [value, err]; + } + if (n > 0 && ((x = n - 1 >>> 0, ((x < 0 || x >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + x])) === 0)) { + n = n - (1) >>> 0; + } + _tmp$8 = $bytesToString($subslice(buf, 0, n)); _tmp$9 = $ifaceNil; value = _tmp$8; err = _tmp$9; + return [value, err]; + }; + nametomib = function(name) { + var _q, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, buf, bytes$1, err = $ifaceNil, mib = sliceType$4.nil, n, name, p; + buf = $clone(arrayType$4.zero(), arrayType$4); + n = 48; + p = $sliceToArray(new sliceType$9(buf)); + _tuple = ByteSliceFromString(name); bytes$1 = _tuple[0]; err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = sliceType$4.nil; _tmp$1 = err; mib = _tmp; err = _tmp$1; + return [mib, err]; + } + err = sysctl(new sliceType$4([0, 3]), p, new ptrType$10(function() { return n; }, function($v) { n = $v; }), new ptrType(function() { return ((0 < 0 || 0 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + 0]); }, function($v) { (0 < 0 || 0 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + 0] = $v; }, bytes$1), (name.length >>> 0)); + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$2 = sliceType$4.nil; _tmp$3 = err; mib = _tmp$2; err = _tmp$3; + return [mib, err]; + } + _tmp$4 = $subslice(new sliceType$4(buf), 0, (_q = n / 4, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero"))); _tmp$5 = $ifaceNil; mib = _tmp$4; err = _tmp$5; + return [mib, err]; + }; + ParseDirent = $pkg.ParseDirent = function(buf, max, names) { + var _array, _struct, _tmp, _tmp$1, _tmp$2, _view, buf, bytes$1, consumed = 0, count = 0, dirent, max, name, names, newnames = sliceType$1.nil, origlen, x; + origlen = buf.$length; + while (true) { + if (!(!((max === 0)) && buf.$length > 0)) { break; } + dirent = [undefined]; + dirent[0] = (_array = $sliceToArray(buf), _struct = new Dirent.ptr(), _view = new DataView(_array.buffer, _array.byteOffset), _struct.Ino = new $Uint64(_view.getUint32(4, true), _view.getUint32(0, true)), _struct.Seekoff = new $Uint64(_view.getUint32(12, true), _view.getUint32(8, true)), _struct.Reclen = _view.getUint16(16, true), _struct.Namlen = _view.getUint16(18, true), _struct.Type = _view.getUint8(20, true), _struct.Name = new ($nativeArray($kindInt8))(_array.buffer, $min(_array.byteOffset + 21, _array.buffer.byteLength)), _struct.Pad_cgo_0 = new ($nativeArray($kindUint8))(_array.buffer, $min(_array.byteOffset + 1045, _array.buffer.byteLength)), _struct); + if (dirent[0].Reclen === 0) { + buf = sliceType.nil; + break; + } + buf = $subslice(buf, dirent[0].Reclen); + if ((x = dirent[0].Ino, (x.$high === 0 && x.$low === 0))) { + continue; + } + bytes$1 = $sliceToArray(new sliceType$9(dirent[0].Name)); + name = $bytesToString($subslice(new sliceType(bytes$1), 0, dirent[0].Namlen)); + if (name === "." || name === "..") { + continue; + } + max = max - (1) >> 0; + count = count + (1) >> 0; + names = $append(names, name); + } + _tmp = origlen - buf.$length >> 0; _tmp$1 = count; _tmp$2 = names; consumed = _tmp; count = _tmp$1; newnames = _tmp$2; + return [consumed, count, newnames]; + }; + mmapper.ptr.prototype.Mmap = function(fd, offset, length, prot, flags, $b) { + var $args = arguments, $deferred = [], $err = null, $r, $s = 0, $this = this, _key, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, addr, b, data = sliceType.nil, err = $ifaceNil, errno, m, p, sl, x, x$1; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Mmap = function() { try { $deferFrames.push($deferred); s: while (true) { switch ($s) { case 0: + m = $this; + if (length <= 0) { + _tmp = sliceType.nil; _tmp$1 = new Errno(22); data = _tmp; err = _tmp$1; + return [data, err]; + } + _tuple = m.mmap(0, (length >>> 0), prot, flags, fd, offset); addr = _tuple[0]; errno = _tuple[1]; + if (!($interfaceIsEqual(errno, $ifaceNil))) { + _tmp$2 = sliceType.nil; _tmp$3 = errno; data = _tmp$2; err = _tmp$3; + return [data, err]; + } + sl = new structType.ptr(addr, length, length); + b = sl; + p = new ptrType(function() { return (x$1 = b.$capacity - 1 >> 0, ((x$1 < 0 || x$1 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + x$1])); }, function($v) { (x = b.$capacity - 1 >> 0, (x < 0 || x >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + x] = $v); }, b); + $r = m.Mutex.Lock($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $deferred.push([$methodVal(m.Mutex, "Unlock"), [$BLOCKING]]); + _key = p; (m.active || $throwRuntimeError("assignment to entry in nil map"))[_key.$key()] = { k: _key, v: b }; + _tmp$4 = b; _tmp$5 = $ifaceNil; data = _tmp$4; err = _tmp$5; + return [data, err]; + /* */ case -1: } return; } } catch(err) { $err = err; } finally { $deferFrames.pop(); if ($curGoroutine.asleep && !$jumpToDefer) { throw null; } $s = -1; $callDeferred($deferred, $err); return [data, err]; } }; $blocking_Mmap.$blocking = true; return $blocking_Mmap; + }; + mmapper.prototype.Mmap = function(fd, offset, length, prot, flags, $b) { return this.$val.Mmap(fd, offset, length, prot, flags, $b); }; + mmapper.ptr.prototype.Munmap = function(data, $b) { + var $args = arguments, $deferred = [], $err = null, $r, $s = 0, $this = this, _entry, b, err = $ifaceNil, errno, m, p, x, x$1; + /* */ if($b !== $BLOCKING) { $nonblockingCall(); }; var $blocking_Munmap = function() { try { $deferFrames.push($deferred); s: while (true) { switch ($s) { case 0: + m = $this; + if ((data.$length === 0) || !((data.$length === data.$capacity))) { + err = new Errno(22); + return err; + } + p = new ptrType(function() { return (x$1 = data.$capacity - 1 >> 0, ((x$1 < 0 || x$1 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + x$1])); }, function($v) { (x = data.$capacity - 1 >> 0, (x < 0 || x >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + x] = $v); }, data); + $r = m.Mutex.Lock($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $deferred.push([$methodVal(m.Mutex, "Unlock"), [$BLOCKING]]); + b = (_entry = m.active[p.$key()], _entry !== undefined ? _entry.v : sliceType.nil); + if (b === sliceType.nil || !($pointerIsEqual(new ptrType(function() { return ((0 < 0 || 0 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + 0]); }, function($v) { (0 < 0 || 0 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + 0] = $v; }, b), new ptrType(function() { return ((0 < 0 || 0 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + 0]); }, function($v) { (0 < 0 || 0 >= this.$target.$length) ? $throwRuntimeError("index out of range") : this.$target.$array[this.$target.$offset + 0] = $v; }, data)))) { + err = new Errno(22); + return err; + } + errno = m.munmap($sliceToArray(b), (b.$length >>> 0)); + if (!($interfaceIsEqual(errno, $ifaceNil))) { + err = errno; + return err; + } + delete m.active[p.$key()]; + err = $ifaceNil; + return err; + /* */ case -1: } return; } } catch(err) { $err = err; } finally { $deferFrames.pop(); if ($curGoroutine.asleep && !$jumpToDefer) { throw null; } $s = -1; $callDeferred($deferred, $err); return err; } }; $blocking_Munmap.$blocking = true; return $blocking_Munmap; + }; + mmapper.prototype.Munmap = function(data, $b) { return this.$val.Munmap(data, $b); }; + Errno.prototype.Error = function() { + var e, s; + e = this.$val; + if (0 <= (e >> 0) && (e >> 0) < 106) { + s = ((e < 0 || e >= errors$1.length) ? $throwRuntimeError("index out of range") : errors$1[e]); + if (!(s === "")) { + return s; + } + } + return "errno " + itoa((e >> 0)); + }; + $ptrType(Errno).prototype.Error = function() { return new Errno(this.$get()).Error(); }; + Errno.prototype.Temporary = function() { + var e; + e = this.$val; + return (e === 4) || (e === 24) || (e === 54) || (e === 53) || new Errno(e).Timeout(); + }; + $ptrType(Errno).prototype.Temporary = function() { return new Errno(this.$get()).Temporary(); }; + Errno.prototype.Timeout = function() { + var e; + e = this.$val; + return (e === 35) || (e === 35) || (e === 60); + }; + $ptrType(Errno).prototype.Timeout = function() { return new Errno(this.$get()).Timeout(); }; + Read = $pkg.Read = function(fd, p) { + var _tuple, err = $ifaceNil, fd, n = 0, p; + _tuple = read(fd, p); n = _tuple[0]; err = _tuple[1]; + return [n, err]; + }; + Write = $pkg.Write = function(fd, p) { + var _tuple, err = $ifaceNil, fd, n = 0, p; + _tuple = write(fd, p); n = _tuple[0]; err = _tuple[1]; + return [n, err]; + }; + sysctl = function(mib, old, oldlen, new$1, newlen) { + var _p0, _tuple, e1, err = $ifaceNil, mib, new$1, newlen, old, oldlen; + _p0 = 0; + if (mib.$length > 0) { + _p0 = $sliceToArray(mib); + } else { + _p0 = new Uint8Array(0); + } + _tuple = Syscall6(202, _p0, (mib.$length >>> 0), old, oldlen, new$1, newlen); e1 = _tuple[2]; + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + Close = $pkg.Close = function(fd) { + var _tuple, e1, err = $ifaceNil, fd; + _tuple = Syscall(6, (fd >>> 0), 0, 0); e1 = _tuple[2]; + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + Fchdir = $pkg.Fchdir = function(fd) { + var _tuple, e1, err = $ifaceNil, fd; + _tuple = Syscall(13, (fd >>> 0), 0, 0); e1 = _tuple[2]; + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + Fchmod = $pkg.Fchmod = function(fd, mode) { + var _tuple, e1, err = $ifaceNil, fd, mode; + _tuple = Syscall(124, (fd >>> 0), (mode >>> 0), 0); e1 = _tuple[2]; + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + Fchown = $pkg.Fchown = function(fd, uid, gid) { + var _tuple, e1, err = $ifaceNil, fd, gid, uid; + _tuple = Syscall(123, (fd >>> 0), (uid >>> 0), (gid >>> 0)); e1 = _tuple[2]; + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + Fstat = $pkg.Fstat = function(fd, stat) { + var _array, _struct, _tuple, _view, e1, err = $ifaceNil, fd, stat; + _array = new Uint8Array(144); + _tuple = Syscall(339, (fd >>> 0), _array, 0); e1 = _tuple[2]; + _struct = stat, _view = new DataView(_array.buffer, _array.byteOffset), _struct.Dev = _view.getInt32(0, true), _struct.Mode = _view.getUint16(4, true), _struct.Nlink = _view.getUint16(6, true), _struct.Ino = new $Uint64(_view.getUint32(12, true), _view.getUint32(8, true)), _struct.Uid = _view.getUint32(16, true), _struct.Gid = _view.getUint32(20, true), _struct.Rdev = _view.getInt32(24, true), _struct.Pad_cgo_0 = new ($nativeArray($kindUint8))(_array.buffer, $min(_array.byteOffset + 28, _array.buffer.byteLength)), _struct.Atimespec.Sec = new $Int64(_view.getUint32(36, true), _view.getUint32(32, true)), _struct.Atimespec.Nsec = new $Int64(_view.getUint32(44, true), _view.getUint32(40, true)), _struct.Mtimespec.Sec = new $Int64(_view.getUint32(52, true), _view.getUint32(48, true)), _struct.Mtimespec.Nsec = new $Int64(_view.getUint32(60, true), _view.getUint32(56, true)), _struct.Ctimespec.Sec = new $Int64(_view.getUint32(68, true), _view.getUint32(64, true)), _struct.Ctimespec.Nsec = new $Int64(_view.getUint32(76, true), _view.getUint32(72, true)), _struct.Birthtimespec.Sec = new $Int64(_view.getUint32(84, true), _view.getUint32(80, true)), _struct.Birthtimespec.Nsec = new $Int64(_view.getUint32(92, true), _view.getUint32(88, true)), _struct.Size = new $Int64(_view.getUint32(100, true), _view.getUint32(96, true)), _struct.Blocks = new $Int64(_view.getUint32(108, true), _view.getUint32(104, true)), _struct.Blksize = _view.getInt32(112, true), _struct.Flags = _view.getUint32(116, true), _struct.Gen = _view.getUint32(120, true), _struct.Lspare = _view.getInt32(124, true), _struct.Qspare = new ($nativeArray($kindInt64))(_array.buffer, $min(_array.byteOffset + 128, _array.buffer.byteLength)); + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + Fsync = $pkg.Fsync = function(fd) { + var _tuple, e1, err = $ifaceNil, fd; + _tuple = Syscall(95, (fd >>> 0), 0, 0); e1 = _tuple[2]; + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + Ftruncate = $pkg.Ftruncate = function(fd, length) { + var _tuple, e1, err = $ifaceNil, fd, length; + _tuple = Syscall(201, (fd >>> 0), (length.$low >>> 0), 0); e1 = _tuple[2]; + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + Getdirentries = $pkg.Getdirentries = function(fd, buf, basep) { + var _p0, _tuple, basep, buf, e1, err = $ifaceNil, fd, n = 0, r0; + _p0 = 0; + if (buf.$length > 0) { + _p0 = $sliceToArray(buf); + } else { + _p0 = new Uint8Array(0); + } + _tuple = Syscall6(344, (fd >>> 0), _p0, (buf.$length >>> 0), basep, 0, 0); r0 = _tuple[0]; e1 = _tuple[2]; + n = (r0 >> 0); + if (!((e1 === 0))) { + err = new Errno(e1); + } + return [n, err]; + }; + Lstat = $pkg.Lstat = function(path, stat) { + var _array, _p0, _struct, _tuple, _tuple$1, _view, e1, err = $ifaceNil, path, stat; + _p0 = ptrType.nil; + _tuple = BytePtrFromString(path); _p0 = _tuple[0]; err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return err; + } + _array = new Uint8Array(144); + _tuple$1 = Syscall(340, _p0, _array, 0); e1 = _tuple$1[2]; + _struct = stat, _view = new DataView(_array.buffer, _array.byteOffset), _struct.Dev = _view.getInt32(0, true), _struct.Mode = _view.getUint16(4, true), _struct.Nlink = _view.getUint16(6, true), _struct.Ino = new $Uint64(_view.getUint32(12, true), _view.getUint32(8, true)), _struct.Uid = _view.getUint32(16, true), _struct.Gid = _view.getUint32(20, true), _struct.Rdev = _view.getInt32(24, true), _struct.Pad_cgo_0 = new ($nativeArray($kindUint8))(_array.buffer, $min(_array.byteOffset + 28, _array.buffer.byteLength)), _struct.Atimespec.Sec = new $Int64(_view.getUint32(36, true), _view.getUint32(32, true)), _struct.Atimespec.Nsec = new $Int64(_view.getUint32(44, true), _view.getUint32(40, true)), _struct.Mtimespec.Sec = new $Int64(_view.getUint32(52, true), _view.getUint32(48, true)), _struct.Mtimespec.Nsec = new $Int64(_view.getUint32(60, true), _view.getUint32(56, true)), _struct.Ctimespec.Sec = new $Int64(_view.getUint32(68, true), _view.getUint32(64, true)), _struct.Ctimespec.Nsec = new $Int64(_view.getUint32(76, true), _view.getUint32(72, true)), _struct.Birthtimespec.Sec = new $Int64(_view.getUint32(84, true), _view.getUint32(80, true)), _struct.Birthtimespec.Nsec = new $Int64(_view.getUint32(92, true), _view.getUint32(88, true)), _struct.Size = new $Int64(_view.getUint32(100, true), _view.getUint32(96, true)), _struct.Blocks = new $Int64(_view.getUint32(108, true), _view.getUint32(104, true)), _struct.Blksize = _view.getInt32(112, true), _struct.Flags = _view.getUint32(116, true), _struct.Gen = _view.getUint32(120, true), _struct.Lspare = _view.getInt32(124, true), _struct.Qspare = new ($nativeArray($kindInt64))(_array.buffer, $min(_array.byteOffset + 128, _array.buffer.byteLength)); + use(_p0); + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + Pread = $pkg.Pread = function(fd, p, offset) { + var _p0, _tuple, e1, err = $ifaceNil, fd, n = 0, offset, p, r0; + _p0 = 0; + if (p.$length > 0) { + _p0 = $sliceToArray(p); + } else { + _p0 = new Uint8Array(0); + } + _tuple = Syscall6(153, (fd >>> 0), _p0, (p.$length >>> 0), (offset.$low >>> 0), 0, 0); r0 = _tuple[0]; e1 = _tuple[2]; + n = (r0 >> 0); + if (!((e1 === 0))) { + err = new Errno(e1); + } + return [n, err]; + }; + Pwrite = $pkg.Pwrite = function(fd, p, offset) { + var _p0, _tuple, e1, err = $ifaceNil, fd, n = 0, offset, p, r0; + _p0 = 0; + if (p.$length > 0) { + _p0 = $sliceToArray(p); + } else { + _p0 = new Uint8Array(0); + } + _tuple = Syscall6(154, (fd >>> 0), _p0, (p.$length >>> 0), (offset.$low >>> 0), 0, 0); r0 = _tuple[0]; e1 = _tuple[2]; + n = (r0 >> 0); + if (!((e1 === 0))) { + err = new Errno(e1); + } + return [n, err]; + }; + read = function(fd, p) { + var _p0, _tuple, e1, err = $ifaceNil, fd, n = 0, p, r0; + _p0 = 0; + if (p.$length > 0) { + _p0 = $sliceToArray(p); + } else { + _p0 = new Uint8Array(0); + } + _tuple = Syscall(3, (fd >>> 0), _p0, (p.$length >>> 0)); r0 = _tuple[0]; e1 = _tuple[2]; + n = (r0 >> 0); + if (!((e1 === 0))) { + err = new Errno(e1); + } + return [n, err]; + }; + Seek = $pkg.Seek = function(fd, offset, whence) { + var _tuple, e1, err = $ifaceNil, fd, newoffset = new $Int64(0, 0), offset, r0, whence; + _tuple = Syscall(199, (fd >>> 0), (offset.$low >>> 0), (whence >>> 0)); r0 = _tuple[0]; e1 = _tuple[2]; + newoffset = new $Int64(0, r0.constructor === Number ? r0 : 1); + if (!((e1 === 0))) { + err = new Errno(e1); + } + return [newoffset, err]; + }; + write = function(fd, p) { + var _p0, _tuple, e1, err = $ifaceNil, fd, n = 0, p, r0; + _p0 = 0; + if (p.$length > 0) { + _p0 = $sliceToArray(p); + } else { + _p0 = new Uint8Array(0); + } + _tuple = Syscall(4, (fd >>> 0), _p0, (p.$length >>> 0)); r0 = _tuple[0]; e1 = _tuple[2]; + n = (r0 >> 0); + if (!((e1 === 0))) { + err = new Errno(e1); + } + return [n, err]; + }; + mmap = function(addr, length, prot, flag, fd, pos) { + var _tuple, addr, e1, err = $ifaceNil, fd, flag, length, pos, prot, r0, ret = 0; + _tuple = Syscall6(197, addr, length, (prot >>> 0), (flag >>> 0), (fd >>> 0), (pos.$low >>> 0)); r0 = _tuple[0]; e1 = _tuple[2]; + ret = r0; + if (!((e1 === 0))) { + err = new Errno(e1); + } + return [ret, err]; + }; + munmap = function(addr, length) { + var _tuple, addr, e1, err = $ifaceNil, length; + _tuple = Syscall(73, addr, length, 0); e1 = _tuple[2]; + if (!((e1 === 0))) { + err = new Errno(e1); + } + return err; + }; + ptrType$24.methods = [{prop: "Mmap", name: "Mmap", pkg: "", typ: $funcType([$Int, $Int64, $Int, $Int, $Int], [sliceType, $error], false)}, {prop: "Munmap", name: "Munmap", pkg: "", typ: $funcType([sliceType], [$error], false)}]; + Errno.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}]; + ptrType$28.methods = [{prop: "Unix", name: "Unix", pkg: "", typ: $funcType([], [$Int64, $Int64], false)}, {prop: "Nano", name: "Nano", pkg: "", typ: $funcType([], [$Int64], false)}]; + mmapper.init([{prop: "Mutex", name: "", pkg: "", typ: sync.Mutex, tag: ""}, {prop: "active", name: "active", pkg: "syscall", typ: mapType, tag: ""}, {prop: "mmap", name: "mmap", pkg: "syscall", typ: funcType, tag: ""}, {prop: "munmap", name: "munmap", pkg: "syscall", typ: funcType$1, tag: ""}]); + Timespec.init([{prop: "Sec", name: "Sec", pkg: "", typ: $Int64, tag: ""}, {prop: "Nsec", name: "Nsec", pkg: "", typ: $Int64, tag: ""}]); + Stat_t.init([{prop: "Dev", name: "Dev", pkg: "", typ: $Int32, tag: ""}, {prop: "Mode", name: "Mode", pkg: "", typ: $Uint16, tag: ""}, {prop: "Nlink", name: "Nlink", pkg: "", typ: $Uint16, tag: ""}, {prop: "Ino", name: "Ino", pkg: "", typ: $Uint64, tag: ""}, {prop: "Uid", name: "Uid", pkg: "", typ: $Uint32, tag: ""}, {prop: "Gid", name: "Gid", pkg: "", typ: $Uint32, tag: ""}, {prop: "Rdev", name: "Rdev", pkg: "", typ: $Int32, tag: ""}, {prop: "Pad_cgo_0", name: "Pad_cgo_0", pkg: "", typ: arrayType$3, tag: ""}, {prop: "Atimespec", name: "Atimespec", pkg: "", typ: Timespec, tag: ""}, {prop: "Mtimespec", name: "Mtimespec", pkg: "", typ: Timespec, tag: ""}, {prop: "Ctimespec", name: "Ctimespec", pkg: "", typ: Timespec, tag: ""}, {prop: "Birthtimespec", name: "Birthtimespec", pkg: "", typ: Timespec, tag: ""}, {prop: "Size", name: "Size", pkg: "", typ: $Int64, tag: ""}, {prop: "Blocks", name: "Blocks", pkg: "", typ: $Int64, tag: ""}, {prop: "Blksize", name: "Blksize", pkg: "", typ: $Int32, tag: ""}, {prop: "Flags", name: "Flags", pkg: "", typ: $Uint32, tag: ""}, {prop: "Gen", name: "Gen", pkg: "", typ: $Uint32, tag: ""}, {prop: "Lspare", name: "Lspare", pkg: "", typ: $Int32, tag: ""}, {prop: "Qspare", name: "Qspare", pkg: "", typ: arrayType$8, tag: ""}]); + Dirent.init([{prop: "Ino", name: "Ino", pkg: "", typ: $Uint64, tag: ""}, {prop: "Seekoff", name: "Seekoff", pkg: "", typ: $Uint64, tag: ""}, {prop: "Reclen", name: "Reclen", pkg: "", typ: $Uint16, tag: ""}, {prop: "Namlen", name: "Namlen", pkg: "", typ: $Uint16, tag: ""}, {prop: "Type", name: "Type", pkg: "", typ: $Uint8, tag: ""}, {prop: "Name", name: "Name", pkg: "", typ: arrayType$10, tag: ""}, {prop: "Pad_cgo_0", name: "Pad_cgo_0", pkg: "", typ: arrayType$12, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_syscall = function() { while (true) { switch ($s) { case 0: + $r = bytes.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = errors.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = js.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = runtime.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = sync.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + lineBuffer = sliceType.nil; + envOnce = new sync.Once.ptr(); + envLock = new sync.RWMutex.ptr(); + env = false; + warningPrinted = false; + syscallModule = null; + alreadyTriedToLoad = false; + minusOne = -1; + envs = runtime_envs(); + $pkg.Stdin = 0; + $pkg.Stdout = 1; + $pkg.Stderr = 2; + errors$1 = $toNativeArray($kindString, ["", "operation not permitted", "no such file or directory", "no such process", "interrupted system call", "input/output error", "device not configured", "argument list too long", "exec format error", "bad file descriptor", "no child processes", "resource deadlock avoided", "cannot allocate memory", "permission denied", "bad address", "block device required", "resource busy", "file exists", "cross-device link", "operation not supported by device", "not a directory", "is a directory", "invalid argument", "too many open files in system", "too many open files", "inappropriate ioctl for device", "text file busy", "file too large", "no space left on device", "illegal seek", "read-only file system", "too many links", "broken pipe", "numerical argument out of domain", "result too large", "resource temporarily unavailable", "operation now in progress", "operation already in progress", "socket operation on non-socket", "destination address required", "message too long", "protocol wrong type for socket", "protocol not available", "protocol not supported", "socket type not supported", "operation not supported", "protocol family not supported", "address family not supported by protocol family", "address already in use", "can't assign requested address", "network is down", "network is unreachable", "network dropped connection on reset", "software caused connection abort", "connection reset by peer", "no buffer space available", "socket is already connected", "socket is not connected", "can't send after socket shutdown", "too many references: can't splice", "operation timed out", "connection refused", "too many levels of symbolic links", "file name too long", "host is down", "no route to host", "directory not empty", "too many processes", "too many users", "disc quota exceeded", "stale NFS file handle", "too many levels of remote in path", "RPC struct is bad", "RPC version wrong", "RPC prog. not avail", "program version wrong", "bad procedure for program", "no locks available", "function not implemented", "inappropriate file type or format", "authentication error", "need authenticator", "device power is off", "device error", "value too large to be stored in data type", "bad executable (or shared library)", "bad CPU type in executable", "shared library version mismatch", "malformed Mach-o file", "operation canceled", "identifier removed", "no message of desired type", "illegal byte sequence", "attribute not found", "bad message", "EMULTIHOP (Reserved)", "no message available on STREAM", "ENOLINK (Reserved)", "no STREAM resources", "not a STREAM", "protocol error", "STREAM ioctl timeout", "operation not supported on socket", "policy not found", "state not recoverable", "previous owner died"]); + mapper = new mmapper.ptr(new sync.Mutex.ptr(), new $Map(), mmap, munmap); + init(); + /* */ } return; } }; $init_syscall.$blocking = true; return $init_syscall; + }; + return $pkg; +})(); +$packages["github.com/gopherjs/gopherjs/nosync"] = (function() { + var $pkg = {}, Once, funcType, ptrType$3; + Once = $pkg.Once = $newType(0, $kindStruct, "nosync.Once", "Once", "github.com/gopherjs/gopherjs/nosync", function(doing_, done_) { + this.$val = this; + this.doing = doing_ !== undefined ? doing_ : false; + this.done = done_ !== undefined ? done_ : false; + }); + funcType = $funcType([], [], false); + ptrType$3 = $ptrType(Once); + Once.ptr.prototype.Do = function(f) { + var $deferred = [], $err = null, f, o; + /* */ try { $deferFrames.push($deferred); + o = this; + if (o.done) { + return; + } + if (o.doing) { + $panic(new $String("nosync: Do called within f")); + } + o.doing = true; + $deferred.push([(function() { + o.doing = false; + o.done = true; + }), []]); + f(); + /* */ } catch(err) { $err = err; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + Once.prototype.Do = function(f) { return this.$val.Do(f); }; + ptrType$3.methods = [{prop: "Do", name: "Do", pkg: "", typ: $funcType([funcType], [], false)}]; + Once.init([{prop: "doing", name: "doing", pkg: "github.com/gopherjs/gopherjs/nosync", typ: $Bool, tag: ""}, {prop: "done", name: "done", pkg: "github.com/gopherjs/gopherjs/nosync", typ: $Bool, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_nosync = function() { while (true) { switch ($s) { case 0: + /* */ } return; } }; $init_nosync.$blocking = true; return $init_nosync; + }; + return $pkg; +})(); +$packages["strings"] = (function() { + var $pkg = {}, errors, js, io, unicode, utf8, IndexByte; + errors = $packages["errors"]; + js = $packages["github.com/gopherjs/gopherjs/js"]; + io = $packages["io"]; + unicode = $packages["unicode"]; + utf8 = $packages["unicode/utf8"]; + IndexByte = $pkg.IndexByte = function(s, c) { + var c, s; + return $parseInt(s.indexOf($global.String.fromCharCode(c))) >> 0; + }; + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_strings = function() { while (true) { switch ($s) { case 0: + $r = errors.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = js.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = io.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = unicode.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = utf8.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + /* */ } return; } }; $init_strings.$blocking = true; return $init_strings; + }; + return $pkg; +})(); +$packages["time"] = (function() { + var $pkg = {}, errors, js, nosync, runtime, strings, syscall, ParseError, Time, Month, Weekday, Duration, Location, zone, zoneTrans, sliceType, sliceType$1, sliceType$2, ptrType, arrayType, sliceType$3, arrayType$1, arrayType$2, ptrType$1, ptrType$2, ptrType$5, std0x, longDayNames, shortDayNames, shortMonthNames, longMonthNames, atoiError, errBad, errLeadingInt, months, days, daysBefore, utcLoc, localLoc, localOnce, zoneinfo, badData, zoneDirs, _tuple, _r, initLocal, startsWithLowerCase, nextStdChunk, match, lookup, appendUint, atoi, formatNano, quote, isDigit, getnum, cutspace, skip, Parse, parse, parseTimeZone, parseGMT, parseNanoseconds, leadingInt, absWeekday, absClock, fmtFrac, fmtInt, absDate, Unix, isLeap, norm, Date, div, FixedZone; + errors = $packages["errors"]; + js = $packages["github.com/gopherjs/gopherjs/js"]; + nosync = $packages["github.com/gopherjs/gopherjs/nosync"]; + runtime = $packages["runtime"]; + strings = $packages["strings"]; + syscall = $packages["syscall"]; + ParseError = $pkg.ParseError = $newType(0, $kindStruct, "time.ParseError", "ParseError", "time", function(Layout_, Value_, LayoutElem_, ValueElem_, Message_) { + this.$val = this; + this.Layout = Layout_ !== undefined ? Layout_ : ""; + this.Value = Value_ !== undefined ? Value_ : ""; + this.LayoutElem = LayoutElem_ !== undefined ? LayoutElem_ : ""; + this.ValueElem = ValueElem_ !== undefined ? ValueElem_ : ""; + this.Message = Message_ !== undefined ? Message_ : ""; + }); + Time = $pkg.Time = $newType(0, $kindStruct, "time.Time", "Time", "time", function(sec_, nsec_, loc_) { + this.$val = this; + this.sec = sec_ !== undefined ? sec_ : new $Int64(0, 0); + this.nsec = nsec_ !== undefined ? nsec_ : 0; + this.loc = loc_ !== undefined ? loc_ : ptrType$1.nil; + }); + Month = $pkg.Month = $newType(4, $kindInt, "time.Month", "Month", "time", null); + Weekday = $pkg.Weekday = $newType(4, $kindInt, "time.Weekday", "Weekday", "time", null); + Duration = $pkg.Duration = $newType(8, $kindInt64, "time.Duration", "Duration", "time", null); + Location = $pkg.Location = $newType(0, $kindStruct, "time.Location", "Location", "time", function(name_, zone_, tx_, cacheStart_, cacheEnd_, cacheZone_) { + this.$val = this; + this.name = name_ !== undefined ? name_ : ""; + this.zone = zone_ !== undefined ? zone_ : sliceType$1.nil; + this.tx = tx_ !== undefined ? tx_ : sliceType$2.nil; + this.cacheStart = cacheStart_ !== undefined ? cacheStart_ : new $Int64(0, 0); + this.cacheEnd = cacheEnd_ !== undefined ? cacheEnd_ : new $Int64(0, 0); + this.cacheZone = cacheZone_ !== undefined ? cacheZone_ : ptrType.nil; + }); + zone = $pkg.zone = $newType(0, $kindStruct, "time.zone", "zone", "time", function(name_, offset_, isDST_) { + this.$val = this; + this.name = name_ !== undefined ? name_ : ""; + this.offset = offset_ !== undefined ? offset_ : 0; + this.isDST = isDST_ !== undefined ? isDST_ : false; + }); + zoneTrans = $pkg.zoneTrans = $newType(0, $kindStruct, "time.zoneTrans", "zoneTrans", "time", function(when_, index_, isstd_, isutc_) { + this.$val = this; + this.when = when_ !== undefined ? when_ : new $Int64(0, 0); + this.index = index_ !== undefined ? index_ : 0; + this.isstd = isstd_ !== undefined ? isstd_ : false; + this.isutc = isutc_ !== undefined ? isutc_ : false; + }); + sliceType = $sliceType($String); + sliceType$1 = $sliceType(zone); + sliceType$2 = $sliceType(zoneTrans); + ptrType = $ptrType(zone); + arrayType = $arrayType($Uint8, 32); + sliceType$3 = $sliceType($Uint8); + arrayType$1 = $arrayType($Uint8, 9); + arrayType$2 = $arrayType($Uint8, 64); + ptrType$1 = $ptrType(Location); + ptrType$2 = $ptrType(ParseError); + ptrType$5 = $ptrType(Time); + initLocal = function() { + var d, i, j, s; + d = new ($global.Date)(); + s = $internalize(d, $String); + i = strings.IndexByte(s, 40); + j = strings.IndexByte(s, 41); + if ((i === -1) || (j === -1)) { + localLoc.name = "UTC"; + return; + } + localLoc.name = s.substring((i + 1 >> 0), j); + localLoc.zone = new sliceType$1([new zone.ptr(localLoc.name, ($parseInt(d.getTimezoneOffset()) >> 0) * -60 >> 0, false)]); + }; + startsWithLowerCase = function(str) { + var c, str; + if (str.length === 0) { + return false; + } + c = str.charCodeAt(0); + return 97 <= c && c <= 122; + }; + nextStdChunk = function(layout) { + var _ref, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$44, _tmp$45, _tmp$46, _tmp$47, _tmp$48, _tmp$49, _tmp$5, _tmp$50, _tmp$51, _tmp$52, _tmp$53, _tmp$54, _tmp$55, _tmp$56, _tmp$57, _tmp$58, _tmp$59, _tmp$6, _tmp$60, _tmp$61, _tmp$62, _tmp$63, _tmp$64, _tmp$65, _tmp$66, _tmp$67, _tmp$68, _tmp$69, _tmp$7, _tmp$70, _tmp$71, _tmp$72, _tmp$73, _tmp$74, _tmp$75, _tmp$76, _tmp$77, _tmp$78, _tmp$79, _tmp$8, _tmp$80, _tmp$9, c, ch, i, j, layout, prefix = "", std = 0, std$1, suffix = "", x; + i = 0; + while (true) { + if (!(i < layout.length)) { break; } + c = (layout.charCodeAt(i) >> 0); + _ref = c; + if (_ref === 74) { + if (layout.length >= (i + 3 >> 0) && layout.substring(i, (i + 3 >> 0)) === "Jan") { + if (layout.length >= (i + 7 >> 0) && layout.substring(i, (i + 7 >> 0)) === "January") { + _tmp = layout.substring(0, i); _tmp$1 = 257; _tmp$2 = layout.substring((i + 7 >> 0)); prefix = _tmp; std = _tmp$1; suffix = _tmp$2; + return [prefix, std, suffix]; + } + if (!startsWithLowerCase(layout.substring((i + 3 >> 0)))) { + _tmp$3 = layout.substring(0, i); _tmp$4 = 258; _tmp$5 = layout.substring((i + 3 >> 0)); prefix = _tmp$3; std = _tmp$4; suffix = _tmp$5; + return [prefix, std, suffix]; + } + } + } else if (_ref === 77) { + if (layout.length >= (i + 3 >> 0)) { + if (layout.substring(i, (i + 3 >> 0)) === "Mon") { + if (layout.length >= (i + 6 >> 0) && layout.substring(i, (i + 6 >> 0)) === "Monday") { + _tmp$6 = layout.substring(0, i); _tmp$7 = 261; _tmp$8 = layout.substring((i + 6 >> 0)); prefix = _tmp$6; std = _tmp$7; suffix = _tmp$8; + return [prefix, std, suffix]; + } + if (!startsWithLowerCase(layout.substring((i + 3 >> 0)))) { + _tmp$9 = layout.substring(0, i); _tmp$10 = 262; _tmp$11 = layout.substring((i + 3 >> 0)); prefix = _tmp$9; std = _tmp$10; suffix = _tmp$11; + return [prefix, std, suffix]; + } + } + if (layout.substring(i, (i + 3 >> 0)) === "MST") { + _tmp$12 = layout.substring(0, i); _tmp$13 = 21; _tmp$14 = layout.substring((i + 3 >> 0)); prefix = _tmp$12; std = _tmp$13; suffix = _tmp$14; + return [prefix, std, suffix]; + } + } + } else if (_ref === 48) { + if (layout.length >= (i + 2 >> 0) && 49 <= layout.charCodeAt((i + 1 >> 0)) && layout.charCodeAt((i + 1 >> 0)) <= 54) { + _tmp$15 = layout.substring(0, i); _tmp$16 = (x = layout.charCodeAt((i + 1 >> 0)) - 49 << 24 >>> 24, ((x < 0 || x >= std0x.length) ? $throwRuntimeError("index out of range") : std0x[x])); _tmp$17 = layout.substring((i + 2 >> 0)); prefix = _tmp$15; std = _tmp$16; suffix = _tmp$17; + return [prefix, std, suffix]; + } + } else if (_ref === 49) { + if (layout.length >= (i + 2 >> 0) && (layout.charCodeAt((i + 1 >> 0)) === 53)) { + _tmp$18 = layout.substring(0, i); _tmp$19 = 522; _tmp$20 = layout.substring((i + 2 >> 0)); prefix = _tmp$18; std = _tmp$19; suffix = _tmp$20; + return [prefix, std, suffix]; + } + _tmp$21 = layout.substring(0, i); _tmp$22 = 259; _tmp$23 = layout.substring((i + 1 >> 0)); prefix = _tmp$21; std = _tmp$22; suffix = _tmp$23; + return [prefix, std, suffix]; + } else if (_ref === 50) { + if (layout.length >= (i + 4 >> 0) && layout.substring(i, (i + 4 >> 0)) === "2006") { + _tmp$24 = layout.substring(0, i); _tmp$25 = 273; _tmp$26 = layout.substring((i + 4 >> 0)); prefix = _tmp$24; std = _tmp$25; suffix = _tmp$26; + return [prefix, std, suffix]; + } + _tmp$27 = layout.substring(0, i); _tmp$28 = 263; _tmp$29 = layout.substring((i + 1 >> 0)); prefix = _tmp$27; std = _tmp$28; suffix = _tmp$29; + return [prefix, std, suffix]; + } else if (_ref === 95) { + if (layout.length >= (i + 2 >> 0) && (layout.charCodeAt((i + 1 >> 0)) === 50)) { + _tmp$30 = layout.substring(0, i); _tmp$31 = 264; _tmp$32 = layout.substring((i + 2 >> 0)); prefix = _tmp$30; std = _tmp$31; suffix = _tmp$32; + return [prefix, std, suffix]; + } + } else if (_ref === 51) { + _tmp$33 = layout.substring(0, i); _tmp$34 = 523; _tmp$35 = layout.substring((i + 1 >> 0)); prefix = _tmp$33; std = _tmp$34; suffix = _tmp$35; + return [prefix, std, suffix]; + } else if (_ref === 52) { + _tmp$36 = layout.substring(0, i); _tmp$37 = 525; _tmp$38 = layout.substring((i + 1 >> 0)); prefix = _tmp$36; std = _tmp$37; suffix = _tmp$38; + return [prefix, std, suffix]; + } else if (_ref === 53) { + _tmp$39 = layout.substring(0, i); _tmp$40 = 527; _tmp$41 = layout.substring((i + 1 >> 0)); prefix = _tmp$39; std = _tmp$40; suffix = _tmp$41; + return [prefix, std, suffix]; + } else if (_ref === 80) { + if (layout.length >= (i + 2 >> 0) && (layout.charCodeAt((i + 1 >> 0)) === 77)) { + _tmp$42 = layout.substring(0, i); _tmp$43 = 531; _tmp$44 = layout.substring((i + 2 >> 0)); prefix = _tmp$42; std = _tmp$43; suffix = _tmp$44; + return [prefix, std, suffix]; + } + } else if (_ref === 112) { + if (layout.length >= (i + 2 >> 0) && (layout.charCodeAt((i + 1 >> 0)) === 109)) { + _tmp$45 = layout.substring(0, i); _tmp$46 = 532; _tmp$47 = layout.substring((i + 2 >> 0)); prefix = _tmp$45; std = _tmp$46; suffix = _tmp$47; + return [prefix, std, suffix]; + } + } else if (_ref === 45) { + if (layout.length >= (i + 7 >> 0) && layout.substring(i, (i + 7 >> 0)) === "-070000") { + _tmp$48 = layout.substring(0, i); _tmp$49 = 27; _tmp$50 = layout.substring((i + 7 >> 0)); prefix = _tmp$48; std = _tmp$49; suffix = _tmp$50; + return [prefix, std, suffix]; + } + if (layout.length >= (i + 9 >> 0) && layout.substring(i, (i + 9 >> 0)) === "-07:00:00") { + _tmp$51 = layout.substring(0, i); _tmp$52 = 30; _tmp$53 = layout.substring((i + 9 >> 0)); prefix = _tmp$51; std = _tmp$52; suffix = _tmp$53; + return [prefix, std, suffix]; + } + if (layout.length >= (i + 5 >> 0) && layout.substring(i, (i + 5 >> 0)) === "-0700") { + _tmp$54 = layout.substring(0, i); _tmp$55 = 26; _tmp$56 = layout.substring((i + 5 >> 0)); prefix = _tmp$54; std = _tmp$55; suffix = _tmp$56; + return [prefix, std, suffix]; + } + if (layout.length >= (i + 6 >> 0) && layout.substring(i, (i + 6 >> 0)) === "-07:00") { + _tmp$57 = layout.substring(0, i); _tmp$58 = 29; _tmp$59 = layout.substring((i + 6 >> 0)); prefix = _tmp$57; std = _tmp$58; suffix = _tmp$59; + return [prefix, std, suffix]; + } + if (layout.length >= (i + 3 >> 0) && layout.substring(i, (i + 3 >> 0)) === "-07") { + _tmp$60 = layout.substring(0, i); _tmp$61 = 28; _tmp$62 = layout.substring((i + 3 >> 0)); prefix = _tmp$60; std = _tmp$61; suffix = _tmp$62; + return [prefix, std, suffix]; + } + } else if (_ref === 90) { + if (layout.length >= (i + 7 >> 0) && layout.substring(i, (i + 7 >> 0)) === "Z070000") { + _tmp$63 = layout.substring(0, i); _tmp$64 = 23; _tmp$65 = layout.substring((i + 7 >> 0)); prefix = _tmp$63; std = _tmp$64; suffix = _tmp$65; + return [prefix, std, suffix]; + } + if (layout.length >= (i + 9 >> 0) && layout.substring(i, (i + 9 >> 0)) === "Z07:00:00") { + _tmp$66 = layout.substring(0, i); _tmp$67 = 25; _tmp$68 = layout.substring((i + 9 >> 0)); prefix = _tmp$66; std = _tmp$67; suffix = _tmp$68; + return [prefix, std, suffix]; + } + if (layout.length >= (i + 5 >> 0) && layout.substring(i, (i + 5 >> 0)) === "Z0700") { + _tmp$69 = layout.substring(0, i); _tmp$70 = 22; _tmp$71 = layout.substring((i + 5 >> 0)); prefix = _tmp$69; std = _tmp$70; suffix = _tmp$71; + return [prefix, std, suffix]; + } + if (layout.length >= (i + 6 >> 0) && layout.substring(i, (i + 6 >> 0)) === "Z07:00") { + _tmp$72 = layout.substring(0, i); _tmp$73 = 24; _tmp$74 = layout.substring((i + 6 >> 0)); prefix = _tmp$72; std = _tmp$73; suffix = _tmp$74; + return [prefix, std, suffix]; + } + } else if (_ref === 46) { + if ((i + 1 >> 0) < layout.length && ((layout.charCodeAt((i + 1 >> 0)) === 48) || (layout.charCodeAt((i + 1 >> 0)) === 57))) { + ch = layout.charCodeAt((i + 1 >> 0)); + j = i + 1 >> 0; + while (true) { + if (!(j < layout.length && (layout.charCodeAt(j) === ch))) { break; } + j = j + (1) >> 0; + } + if (!isDigit(layout, j)) { + std$1 = 31; + if (layout.charCodeAt((i + 1 >> 0)) === 57) { + std$1 = 32; + } + std$1 = std$1 | ((((j - ((i + 1 >> 0)) >> 0)) << 16 >> 0)); + _tmp$75 = layout.substring(0, i); _tmp$76 = std$1; _tmp$77 = layout.substring(j); prefix = _tmp$75; std = _tmp$76; suffix = _tmp$77; + return [prefix, std, suffix]; + } + } + } + i = i + (1) >> 0; + } + _tmp$78 = layout; _tmp$79 = 0; _tmp$80 = ""; prefix = _tmp$78; std = _tmp$79; suffix = _tmp$80; + return [prefix, std, suffix]; + }; + match = function(s1, s2) { + var c1, c2, i, s1, s2; + i = 0; + while (true) { + if (!(i < s1.length)) { break; } + c1 = s1.charCodeAt(i); + c2 = s2.charCodeAt(i); + if (!((c1 === c2))) { + c1 = (c1 | (32)) >>> 0; + c2 = (c2 | (32)) >>> 0; + if (!((c1 === c2)) || c1 < 97 || c1 > 122) { + return false; + } + } + i = i + (1) >> 0; + } + return true; + }; + lookup = function(tab, val) { + var _i, _ref, i, tab, v, val; + _ref = tab; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + v = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (val.length >= v.length && match(val.substring(0, v.length), v)) { + return [i, val.substring(v.length), $ifaceNil]; + } + _i++; + } + return [-1, val, errBad]; + }; + appendUint = function(b, x, pad) { + var _q, _q$1, _r$1, _r$2, b, buf, n, pad, x; + if (x < 10) { + if (!((pad === 0))) { + b = $append(b, pad); + } + return $append(b, ((48 + x >>> 0) << 24 >>> 24)); + } + if (x < 100) { + b = $append(b, ((48 + (_q = x / 10, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")) >>> 0) << 24 >>> 24)); + b = $append(b, ((48 + (_r$1 = x % 10, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) >>> 0) << 24 >>> 24)); + return b; + } + buf = $clone(arrayType.zero(), arrayType); + n = 32; + if (x === 0) { + return $append(b, 48); + } + while (true) { + if (!(x >= 10)) { break; } + n = n - (1) >> 0; + (n < 0 || n >= buf.length) ? $throwRuntimeError("index out of range") : buf[n] = (((_r$2 = x % 10, _r$2 === _r$2 ? _r$2 : $throwRuntimeError("integer divide by zero")) + 48 >>> 0) << 24 >>> 24); + x = (_q$1 = x / (10), (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >>> 0 : $throwRuntimeError("integer divide by zero")); + } + n = n - (1) >> 0; + (n < 0 || n >= buf.length) ? $throwRuntimeError("index out of range") : buf[n] = ((x + 48 >>> 0) << 24 >>> 24); + return $appendSlice(b, $subslice(new sliceType$3(buf), n)); + }; + atoi = function(s) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple$1, err = $ifaceNil, neg, q, rem, s, x = 0; + neg = false; + if (!(s === "") && ((s.charCodeAt(0) === 45) || (s.charCodeAt(0) === 43))) { + neg = s.charCodeAt(0) === 45; + s = s.substring(1); + } + _tuple$1 = leadingInt(s); q = _tuple$1[0]; rem = _tuple$1[1]; err = _tuple$1[2]; + x = ((q.$low + ((q.$high >> 31) * 4294967296)) >> 0); + if (!($interfaceIsEqual(err, $ifaceNil)) || !(rem === "")) { + _tmp = 0; _tmp$1 = atoiError; x = _tmp; err = _tmp$1; + return [x, err]; + } + if (neg) { + x = -x; + } + _tmp$2 = x; _tmp$3 = $ifaceNil; x = _tmp$2; err = _tmp$3; + return [x, err]; + }; + formatNano = function(b, nanosec, n, trim) { + var _q, _r$1, b, buf, n, nanosec, start, trim, u, x; + u = nanosec; + buf = $clone(arrayType$1.zero(), arrayType$1); + start = 9; + while (true) { + if (!(start > 0)) { break; } + start = start - (1) >> 0; + (start < 0 || start >= buf.length) ? $throwRuntimeError("index out of range") : buf[start] = (((_r$1 = u % 10, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) + 48 >>> 0) << 24 >>> 24); + u = (_q = u / (10), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); + } + if (n > 9) { + n = 9; + } + if (trim) { + while (true) { + if (!(n > 0 && ((x = n - 1 >> 0, ((x < 0 || x >= buf.length) ? $throwRuntimeError("index out of range") : buf[x])) === 48))) { break; } + n = n - (1) >> 0; + } + if (n === 0) { + return b; + } + } + b = $append(b, 46); + return $appendSlice(b, $subslice(new sliceType$3(buf), 0, n)); + }; + Time.ptr.prototype.String = function() { + var t; + t = $clone(this, Time); + return t.Format("2006-01-02 15:04:05.999999999 -0700 MST"); + }; + Time.prototype.String = function() { return this.$val.String(); }; + Time.ptr.prototype.Format = function(layout) { + var _q, _q$1, _q$2, _q$3, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _ref, _tuple$1, _tuple$2, _tuple$3, _tuple$4, abs, absoffset, b, buf, day, hour, hr, hr$1, layout, m, max, min, month, name, offset, prefix, s, sec, std, suffix, t, y, y$1, year, zone$1, zone$2; + t = $clone(this, Time); + _tuple$1 = t.locabs(); name = _tuple$1[0]; offset = _tuple$1[1]; abs = _tuple$1[2]; + year = -1; + month = 0; + day = 0; + hour = -1; + min = 0; + sec = 0; + b = sliceType$3.nil; + buf = $clone(arrayType$2.zero(), arrayType$2); + max = layout.length + 10 >> 0; + if (max <= 64) { + b = $subslice(new sliceType$3(buf), 0, 0); + } else { + b = $makeSlice(sliceType$3, 0, max); + } + while (true) { + if (!(!(layout === ""))) { break; } + _tuple$2 = nextStdChunk(layout); prefix = _tuple$2[0]; std = _tuple$2[1]; suffix = _tuple$2[2]; + if (!(prefix === "")) { + b = $appendSlice(b, new sliceType$3($stringToBytes(prefix))); + } + if (std === 0) { + break; + } + layout = suffix; + if (year < 0 && !(((std & 256) === 0))) { + _tuple$3 = absDate(abs, true); year = _tuple$3[0]; month = _tuple$3[1]; day = _tuple$3[2]; + } + if (hour < 0 && !(((std & 512) === 0))) { + _tuple$4 = absClock(abs); hour = _tuple$4[0]; min = _tuple$4[1]; sec = _tuple$4[2]; + } + _ref = std & 65535; + switch (0) { default: if (_ref === 274) { + y = year; + if (y < 0) { + y = -y; + } + b = appendUint(b, ((_r$1 = y % 100, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) >>> 0), 48); + } else if (_ref === 273) { + y$1 = year; + if (year <= -1000) { + b = $append(b, 45); + y$1 = -y$1; + } else if (year <= -100) { + b = $appendSlice(b, new sliceType$3($stringToBytes("-0"))); + y$1 = -y$1; + } else if (year <= -10) { + b = $appendSlice(b, new sliceType$3($stringToBytes("-00"))); + y$1 = -y$1; + } else if (year < 0) { + b = $appendSlice(b, new sliceType$3($stringToBytes("-000"))); + y$1 = -y$1; + } else if (year < 10) { + b = $appendSlice(b, new sliceType$3($stringToBytes("000"))); + } else if (year < 100) { + b = $appendSlice(b, new sliceType$3($stringToBytes("00"))); + } else if (year < 1000) { + b = $append(b, 48); + } + b = appendUint(b, (y$1 >>> 0), 0); + } else if (_ref === 258) { + b = $appendSlice(b, new sliceType$3($stringToBytes(new Month(month).String().substring(0, 3)))); + } else if (_ref === 257) { + m = new Month(month).String(); + b = $appendSlice(b, new sliceType$3($stringToBytes(m))); + } else if (_ref === 259) { + b = appendUint(b, (month >>> 0), 0); + } else if (_ref === 260) { + b = appendUint(b, (month >>> 0), 48); + } else if (_ref === 262) { + b = $appendSlice(b, new sliceType$3($stringToBytes(new Weekday(absWeekday(abs)).String().substring(0, 3)))); + } else if (_ref === 261) { + s = new Weekday(absWeekday(abs)).String(); + b = $appendSlice(b, new sliceType$3($stringToBytes(s))); + } else if (_ref === 263) { + b = appendUint(b, (day >>> 0), 0); + } else if (_ref === 264) { + b = appendUint(b, (day >>> 0), 32); + } else if (_ref === 265) { + b = appendUint(b, (day >>> 0), 48); + } else if (_ref === 522) { + b = appendUint(b, (hour >>> 0), 48); + } else if (_ref === 523) { + hr = (_r$2 = hour % 12, _r$2 === _r$2 ? _r$2 : $throwRuntimeError("integer divide by zero")); + if (hr === 0) { + hr = 12; + } + b = appendUint(b, (hr >>> 0), 0); + } else if (_ref === 524) { + hr$1 = (_r$3 = hour % 12, _r$3 === _r$3 ? _r$3 : $throwRuntimeError("integer divide by zero")); + if (hr$1 === 0) { + hr$1 = 12; + } + b = appendUint(b, (hr$1 >>> 0), 48); + } else if (_ref === 525) { + b = appendUint(b, (min >>> 0), 0); + } else if (_ref === 526) { + b = appendUint(b, (min >>> 0), 48); + } else if (_ref === 527) { + b = appendUint(b, (sec >>> 0), 0); + } else if (_ref === 528) { + b = appendUint(b, (sec >>> 0), 48); + } else if (_ref === 531) { + if (hour >= 12) { + b = $appendSlice(b, new sliceType$3($stringToBytes("PM"))); + } else { + b = $appendSlice(b, new sliceType$3($stringToBytes("AM"))); + } + } else if (_ref === 532) { + if (hour >= 12) { + b = $appendSlice(b, new sliceType$3($stringToBytes("pm"))); + } else { + b = $appendSlice(b, new sliceType$3($stringToBytes("am"))); + } + } else if (_ref === 22 || _ref === 24 || _ref === 23 || _ref === 25 || _ref === 26 || _ref === 29 || _ref === 27 || _ref === 30) { + if ((offset === 0) && ((std === 22) || (std === 24) || (std === 23) || (std === 25))) { + b = $append(b, 90); + break; + } + zone$1 = (_q = offset / 60, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + absoffset = offset; + if (zone$1 < 0) { + b = $append(b, 45); + zone$1 = -zone$1; + absoffset = -absoffset; + } else { + b = $append(b, 43); + } + b = appendUint(b, ((_q$1 = zone$1 / 60, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")) >>> 0), 48); + if ((std === 24) || (std === 29) || (std === 25) || (std === 30)) { + b = $append(b, 58); + } + b = appendUint(b, ((_r$4 = zone$1 % 60, _r$4 === _r$4 ? _r$4 : $throwRuntimeError("integer divide by zero")) >>> 0), 48); + if ((std === 23) || (std === 27) || (std === 30) || (std === 25)) { + if ((std === 30) || (std === 25)) { + b = $append(b, 58); + } + b = appendUint(b, ((_r$5 = absoffset % 60, _r$5 === _r$5 ? _r$5 : $throwRuntimeError("integer divide by zero")) >>> 0), 48); + } + } else if (_ref === 21) { + if (!(name === "")) { + b = $appendSlice(b, new sliceType$3($stringToBytes(name))); + break; + } + zone$2 = (_q$2 = offset / 60, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero")); + if (zone$2 < 0) { + b = $append(b, 45); + zone$2 = -zone$2; + } else { + b = $append(b, 43); + } + b = appendUint(b, ((_q$3 = zone$2 / 60, (_q$3 === _q$3 && _q$3 !== 1/0 && _q$3 !== -1/0) ? _q$3 >> 0 : $throwRuntimeError("integer divide by zero")) >>> 0), 48); + b = appendUint(b, ((_r$6 = zone$2 % 60, _r$6 === _r$6 ? _r$6 : $throwRuntimeError("integer divide by zero")) >>> 0), 48); + } else if (_ref === 31 || _ref === 32) { + b = formatNano(b, (t.Nanosecond() >>> 0), std >> 16 >> 0, (std & 65535) === 32); + } } + } + return $bytesToString(b); + }; + Time.prototype.Format = function(layout) { return this.$val.Format(layout); }; + quote = function(s) { + var s; + return "\"" + s + "\""; + }; + ParseError.ptr.prototype.Error = function() { + var e; + e = this; + if (e.Message === "") { + return "parsing time " + quote(e.Value) + " as " + quote(e.Layout) + ": cannot parse " + quote(e.ValueElem) + " as " + quote(e.LayoutElem); + } + return "parsing time " + quote(e.Value) + e.Message; + }; + ParseError.prototype.Error = function() { return this.$val.Error(); }; + isDigit = function(s, i) { + var c, i, s; + if (s.length <= i) { + return false; + } + c = s.charCodeAt(i); + return 48 <= c && c <= 57; + }; + getnum = function(s, fixed) { + var fixed, s; + if (!isDigit(s, 0)) { + return [0, s, errBad]; + } + if (!isDigit(s, 1)) { + if (fixed) { + return [0, s, errBad]; + } + return [((s.charCodeAt(0) - 48 << 24 >>> 24) >> 0), s.substring(1), $ifaceNil]; + } + return [(((s.charCodeAt(0) - 48 << 24 >>> 24) >> 0) * 10 >> 0) + ((s.charCodeAt(1) - 48 << 24 >>> 24) >> 0) >> 0, s.substring(2), $ifaceNil]; + }; + cutspace = function(s) { + var s; + while (true) { + if (!(s.length > 0 && (s.charCodeAt(0) === 32))) { break; } + s = s.substring(1); + } + return s; + }; + skip = function(value, prefix) { + var prefix, value; + while (true) { + if (!(prefix.length > 0)) { break; } + if (prefix.charCodeAt(0) === 32) { + if (value.length > 0 && !((value.charCodeAt(0) === 32))) { + return [value, errBad]; + } + prefix = cutspace(prefix); + value = cutspace(value); + continue; + } + if ((value.length === 0) || !((value.charCodeAt(0) === prefix.charCodeAt(0)))) { + return [value, errBad]; + } + prefix = prefix.substring(1); + value = value.substring(1); + } + return [value, $ifaceNil]; + }; + Parse = $pkg.Parse = function(layout, value) { + var layout, value; + return parse(layout, value, $pkg.UTC, $pkg.Local); + }; + parse = function(layout, value, defaultLocation, local) { + var _ref, _ref$1, _ref$2, _ref$3, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$13, _tuple$14, _tuple$15, _tuple$16, _tuple$17, _tuple$18, _tuple$19, _tuple$2, _tuple$20, _tuple$21, _tuple$22, _tuple$23, _tuple$24, _tuple$25, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, alayout, amSet, avalue, day, defaultLocation, err, hour, hour$1, hr, i, layout, local, min, min$1, mm, month, n, n$1, name, ndigit, nsec, offset, offset$1, ok, ok$1, p, pmSet, prefix, rangeErrString, sec, seconds, sign, ss, std, stdstr, suffix, t, t$1, value, x, x$1, x$2, x$3, x$4, x$5, year, z, zoneName, zoneOffset; + _tmp = layout; _tmp$1 = value; alayout = _tmp; avalue = _tmp$1; + rangeErrString = ""; + amSet = false; + pmSet = false; + year = 0; + month = 1; + day = 1; + hour = 0; + min = 0; + sec = 0; + nsec = 0; + z = ptrType$1.nil; + zoneOffset = -1; + zoneName = ""; + while (true) { + if (!(true)) { break; } + err = $ifaceNil; + _tuple$1 = nextStdChunk(layout); prefix = _tuple$1[0]; std = _tuple$1[1]; suffix = _tuple$1[2]; + stdstr = layout.substring(prefix.length, (layout.length - suffix.length >> 0)); + _tuple$2 = skip(value, prefix); value = _tuple$2[0]; err = _tuple$2[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new Time.ptr(new $Int64(0, 0), 0, ptrType$1.nil), new ParseError.ptr(alayout, avalue, prefix, value, "")]; + } + if (std === 0) { + if (!((value.length === 0))) { + return [new Time.ptr(new $Int64(0, 0), 0, ptrType$1.nil), new ParseError.ptr(alayout, avalue, "", value, ": extra text: " + value)]; + } + break; + } + layout = suffix; + p = ""; + _ref = std & 65535; + switch (0) { default: if (_ref === 274) { + if (value.length < 2) { + err = errBad; + break; + } + _tmp$2 = value.substring(0, 2); _tmp$3 = value.substring(2); p = _tmp$2; value = _tmp$3; + _tuple$3 = atoi(p); year = _tuple$3[0]; err = _tuple$3[1]; + if (year >= 69) { + year = year + (1900) >> 0; + } else { + year = year + (2000) >> 0; + } + } else if (_ref === 273) { + if (value.length < 4 || !isDigit(value, 0)) { + err = errBad; + break; + } + _tmp$4 = value.substring(0, 4); _tmp$5 = value.substring(4); p = _tmp$4; value = _tmp$5; + _tuple$4 = atoi(p); year = _tuple$4[0]; err = _tuple$4[1]; + } else if (_ref === 258) { + _tuple$5 = lookup(shortMonthNames, value); month = _tuple$5[0]; value = _tuple$5[1]; err = _tuple$5[2]; + } else if (_ref === 257) { + _tuple$6 = lookup(longMonthNames, value); month = _tuple$6[0]; value = _tuple$6[1]; err = _tuple$6[2]; + } else if (_ref === 259 || _ref === 260) { + _tuple$7 = getnum(value, std === 260); month = _tuple$7[0]; value = _tuple$7[1]; err = _tuple$7[2]; + if (month <= 0 || 12 < month) { + rangeErrString = "month"; + } + } else if (_ref === 262) { + _tuple$8 = lookup(shortDayNames, value); value = _tuple$8[1]; err = _tuple$8[2]; + } else if (_ref === 261) { + _tuple$9 = lookup(longDayNames, value); value = _tuple$9[1]; err = _tuple$9[2]; + } else if (_ref === 263 || _ref === 264 || _ref === 265) { + if ((std === 264) && value.length > 0 && (value.charCodeAt(0) === 32)) { + value = value.substring(1); + } + _tuple$10 = getnum(value, std === 265); day = _tuple$10[0]; value = _tuple$10[1]; err = _tuple$10[2]; + if (day < 0 || 31 < day) { + rangeErrString = "day"; + } + } else if (_ref === 522) { + _tuple$11 = getnum(value, false); hour = _tuple$11[0]; value = _tuple$11[1]; err = _tuple$11[2]; + if (hour < 0 || 24 <= hour) { + rangeErrString = "hour"; + } + } else if (_ref === 523 || _ref === 524) { + _tuple$12 = getnum(value, std === 524); hour = _tuple$12[0]; value = _tuple$12[1]; err = _tuple$12[2]; + if (hour < 0 || 12 < hour) { + rangeErrString = "hour"; + } + } else if (_ref === 525 || _ref === 526) { + _tuple$13 = getnum(value, std === 526); min = _tuple$13[0]; value = _tuple$13[1]; err = _tuple$13[2]; + if (min < 0 || 60 <= min) { + rangeErrString = "minute"; + } + } else if (_ref === 527 || _ref === 528) { + _tuple$14 = getnum(value, std === 528); sec = _tuple$14[0]; value = _tuple$14[1]; err = _tuple$14[2]; + if (sec < 0 || 60 <= sec) { + rangeErrString = "second"; + } + if (value.length >= 2 && (value.charCodeAt(0) === 46) && isDigit(value, 1)) { + _tuple$15 = nextStdChunk(layout); std = _tuple$15[1]; + std = std & (65535); + if ((std === 31) || (std === 32)) { + break; + } + n = 2; + while (true) { + if (!(n < value.length && isDigit(value, n))) { break; } + n = n + (1) >> 0; + } + _tuple$16 = parseNanoseconds(value, n); nsec = _tuple$16[0]; rangeErrString = _tuple$16[1]; err = _tuple$16[2]; + value = value.substring(n); + } + } else if (_ref === 531) { + if (value.length < 2) { + err = errBad; + break; + } + _tmp$6 = value.substring(0, 2); _tmp$7 = value.substring(2); p = _tmp$6; value = _tmp$7; + _ref$1 = p; + if (_ref$1 === "PM") { + pmSet = true; + } else if (_ref$1 === "AM") { + amSet = true; + } else { + err = errBad; + } + } else if (_ref === 532) { + if (value.length < 2) { + err = errBad; + break; + } + _tmp$8 = value.substring(0, 2); _tmp$9 = value.substring(2); p = _tmp$8; value = _tmp$9; + _ref$2 = p; + if (_ref$2 === "pm") { + pmSet = true; + } else if (_ref$2 === "am") { + amSet = true; + } else { + err = errBad; + } + } else if (_ref === 22 || _ref === 24 || _ref === 23 || _ref === 25 || _ref === 26 || _ref === 28 || _ref === 29 || _ref === 27 || _ref === 30) { + if (((std === 22) || (std === 24)) && value.length >= 1 && (value.charCodeAt(0) === 90)) { + value = value.substring(1); + z = $pkg.UTC; + break; + } + _tmp$10 = ""; _tmp$11 = ""; _tmp$12 = ""; _tmp$13 = ""; sign = _tmp$10; hour$1 = _tmp$11; min$1 = _tmp$12; seconds = _tmp$13; + if ((std === 24) || (std === 29)) { + if (value.length < 6) { + err = errBad; + break; + } + if (!((value.charCodeAt(3) === 58))) { + err = errBad; + break; + } + _tmp$14 = value.substring(0, 1); _tmp$15 = value.substring(1, 3); _tmp$16 = value.substring(4, 6); _tmp$17 = "00"; _tmp$18 = value.substring(6); sign = _tmp$14; hour$1 = _tmp$15; min$1 = _tmp$16; seconds = _tmp$17; value = _tmp$18; + } else if (std === 28) { + if (value.length < 3) { + err = errBad; + break; + } + _tmp$19 = value.substring(0, 1); _tmp$20 = value.substring(1, 3); _tmp$21 = "00"; _tmp$22 = "00"; _tmp$23 = value.substring(3); sign = _tmp$19; hour$1 = _tmp$20; min$1 = _tmp$21; seconds = _tmp$22; value = _tmp$23; + } else if ((std === 25) || (std === 30)) { + if (value.length < 9) { + err = errBad; + break; + } + if (!((value.charCodeAt(3) === 58)) || !((value.charCodeAt(6) === 58))) { + err = errBad; + break; + } + _tmp$24 = value.substring(0, 1); _tmp$25 = value.substring(1, 3); _tmp$26 = value.substring(4, 6); _tmp$27 = value.substring(7, 9); _tmp$28 = value.substring(9); sign = _tmp$24; hour$1 = _tmp$25; min$1 = _tmp$26; seconds = _tmp$27; value = _tmp$28; + } else if ((std === 23) || (std === 27)) { + if (value.length < 7) { + err = errBad; + break; + } + _tmp$29 = value.substring(0, 1); _tmp$30 = value.substring(1, 3); _tmp$31 = value.substring(3, 5); _tmp$32 = value.substring(5, 7); _tmp$33 = value.substring(7); sign = _tmp$29; hour$1 = _tmp$30; min$1 = _tmp$31; seconds = _tmp$32; value = _tmp$33; + } else { + if (value.length < 5) { + err = errBad; + break; + } + _tmp$34 = value.substring(0, 1); _tmp$35 = value.substring(1, 3); _tmp$36 = value.substring(3, 5); _tmp$37 = "00"; _tmp$38 = value.substring(5); sign = _tmp$34; hour$1 = _tmp$35; min$1 = _tmp$36; seconds = _tmp$37; value = _tmp$38; + } + _tmp$39 = 0; _tmp$40 = 0; _tmp$41 = 0; hr = _tmp$39; mm = _tmp$40; ss = _tmp$41; + _tuple$17 = atoi(hour$1); hr = _tuple$17[0]; err = _tuple$17[1]; + if ($interfaceIsEqual(err, $ifaceNil)) { + _tuple$18 = atoi(min$1); mm = _tuple$18[0]; err = _tuple$18[1]; + } + if ($interfaceIsEqual(err, $ifaceNil)) { + _tuple$19 = atoi(seconds); ss = _tuple$19[0]; err = _tuple$19[1]; + } + zoneOffset = ((((hr * 60 >> 0) + mm >> 0)) * 60 >> 0) + ss >> 0; + _ref$3 = sign.charCodeAt(0); + if (_ref$3 === 43) { + } else if (_ref$3 === 45) { + zoneOffset = -zoneOffset; + } else { + err = errBad; + } + } else if (_ref === 21) { + if (value.length >= 3 && value.substring(0, 3) === "UTC") { + z = $pkg.UTC; + value = value.substring(3); + break; + } + _tuple$20 = parseTimeZone(value); n$1 = _tuple$20[0]; ok = _tuple$20[1]; + if (!ok) { + err = errBad; + break; + } + _tmp$42 = value.substring(0, n$1); _tmp$43 = value.substring(n$1); zoneName = _tmp$42; value = _tmp$43; + } else if (_ref === 31) { + ndigit = 1 + ((std >> 16 >> 0)) >> 0; + if (value.length < ndigit) { + err = errBad; + break; + } + _tuple$21 = parseNanoseconds(value, ndigit); nsec = _tuple$21[0]; rangeErrString = _tuple$21[1]; err = _tuple$21[2]; + value = value.substring(ndigit); + } else if (_ref === 32) { + if (value.length < 2 || !((value.charCodeAt(0) === 46)) || value.charCodeAt(1) < 48 || 57 < value.charCodeAt(1)) { + break; + } + i = 0; + while (true) { + if (!(i < 9 && (i + 1 >> 0) < value.length && 48 <= value.charCodeAt((i + 1 >> 0)) && value.charCodeAt((i + 1 >> 0)) <= 57)) { break; } + i = i + (1) >> 0; + } + _tuple$22 = parseNanoseconds(value, 1 + i >> 0); nsec = _tuple$22[0]; rangeErrString = _tuple$22[1]; err = _tuple$22[2]; + value = value.substring((1 + i >> 0)); + } } + if (!(rangeErrString === "")) { + return [new Time.ptr(new $Int64(0, 0), 0, ptrType$1.nil), new ParseError.ptr(alayout, avalue, stdstr, value, ": " + rangeErrString + " out of range")]; + } + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [new Time.ptr(new $Int64(0, 0), 0, ptrType$1.nil), new ParseError.ptr(alayout, avalue, stdstr, value, "")]; + } + } + if (pmSet && hour < 12) { + hour = hour + (12) >> 0; + } else if (amSet && (hour === 12)) { + hour = 0; + } + if (!(z === ptrType$1.nil)) { + return [Date(year, (month >> 0), day, hour, min, sec, nsec, z), $ifaceNil]; + } + if (!((zoneOffset === -1))) { + t = $clone(Date(year, (month >> 0), day, hour, min, sec, nsec, $pkg.UTC), Time); + t.sec = (x = t.sec, x$1 = new $Int64(0, zoneOffset), new $Int64(x.$high - x$1.$high, x.$low - x$1.$low)); + _tuple$23 = local.lookup((x$2 = t.sec, new $Int64(x$2.$high + -15, x$2.$low + 2288912640))); name = _tuple$23[0]; offset = _tuple$23[1]; + if ((offset === zoneOffset) && (zoneName === "" || name === zoneName)) { + t.loc = local; + return [t, $ifaceNil]; + } + t.loc = FixedZone(zoneName, zoneOffset); + return [t, $ifaceNil]; + } + if (!(zoneName === "")) { + t$1 = $clone(Date(year, (month >> 0), day, hour, min, sec, nsec, $pkg.UTC), Time); + _tuple$24 = local.lookupName(zoneName, (x$3 = t$1.sec, new $Int64(x$3.$high + -15, x$3.$low + 2288912640))); offset$1 = _tuple$24[0]; ok$1 = _tuple$24[2]; + if (ok$1) { + t$1.sec = (x$4 = t$1.sec, x$5 = new $Int64(0, offset$1), new $Int64(x$4.$high - x$5.$high, x$4.$low - x$5.$low)); + t$1.loc = local; + return [t$1, $ifaceNil]; + } + if (zoneName.length > 3 && zoneName.substring(0, 3) === "GMT") { + _tuple$25 = atoi(zoneName.substring(3)); offset$1 = _tuple$25[0]; + offset$1 = offset$1 * (3600) >> 0; + } + t$1.loc = FixedZone(zoneName, offset$1); + return [t$1, $ifaceNil]; + } + return [Date(year, (month >> 0), day, hour, min, sec, nsec, defaultLocation), $ifaceNil]; + }; + parseTimeZone = function(value) { + var _ref, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, c, length = 0, nUpper, ok = false, value; + if (value.length < 3) { + _tmp = 0; _tmp$1 = false; length = _tmp; ok = _tmp$1; + return [length, ok]; + } + if (value.length >= 4 && (value.substring(0, 4) === "ChST" || value.substring(0, 4) === "MeST")) { + _tmp$2 = 4; _tmp$3 = true; length = _tmp$2; ok = _tmp$3; + return [length, ok]; + } + if (value.substring(0, 3) === "GMT") { + length = parseGMT(value); + _tmp$4 = length; _tmp$5 = true; length = _tmp$4; ok = _tmp$5; + return [length, ok]; + } + nUpper = 0; + nUpper = 0; + while (true) { + if (!(nUpper < 6)) { break; } + if (nUpper >= value.length) { + break; + } + c = value.charCodeAt(nUpper); + if (c < 65 || 90 < c) { + break; + } + nUpper = nUpper + (1) >> 0; + } + _ref = nUpper; + if (_ref === 0 || _ref === 1 || _ref === 2 || _ref === 6) { + _tmp$6 = 0; _tmp$7 = false; length = _tmp$6; ok = _tmp$7; + return [length, ok]; + } else if (_ref === 5) { + if (value.charCodeAt(4) === 84) { + _tmp$8 = 5; _tmp$9 = true; length = _tmp$8; ok = _tmp$9; + return [length, ok]; + } + } else if (_ref === 4) { + if (value.charCodeAt(3) === 84) { + _tmp$10 = 4; _tmp$11 = true; length = _tmp$10; ok = _tmp$11; + return [length, ok]; + } + } else if (_ref === 3) { + _tmp$12 = 3; _tmp$13 = true; length = _tmp$12; ok = _tmp$13; + return [length, ok]; + } + _tmp$14 = 0; _tmp$15 = false; length = _tmp$14; ok = _tmp$15; + return [length, ok]; + }; + parseGMT = function(value) { + var _tuple$1, err, rem, sign, value, x; + value = value.substring(3); + if (value.length === 0) { + return 3; + } + sign = value.charCodeAt(0); + if (!((sign === 45)) && !((sign === 43))) { + return 3; + } + _tuple$1 = leadingInt(value.substring(1)); x = _tuple$1[0]; rem = _tuple$1[1]; err = _tuple$1[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return 3; + } + if (sign === 45) { + x = new $Int64(-x.$high, -x.$low); + } + if ((x.$high === 0 && x.$low === 0) || (x.$high < -1 || (x.$high === -1 && x.$low < 4294967282)) || (0 < x.$high || (0 === x.$high && 12 < x.$low))) { + return 3; + } + return (3 + value.length >> 0) - rem.length >> 0; + }; + parseNanoseconds = function(value, nbytes) { + var _tuple$1, err = $ifaceNil, i, nbytes, ns = 0, rangeErrString = "", scaleDigits, value; + if (!((value.charCodeAt(0) === 46))) { + err = errBad; + return [ns, rangeErrString, err]; + } + _tuple$1 = atoi(value.substring(1, nbytes)); ns = _tuple$1[0]; err = _tuple$1[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return [ns, rangeErrString, err]; + } + if (ns < 0 || 1000000000 <= ns) { + rangeErrString = "fractional second"; + return [ns, rangeErrString, err]; + } + scaleDigits = 10 - nbytes >> 0; + i = 0; + while (true) { + if (!(i < scaleDigits)) { break; } + ns = ns * (10) >> 0; + i = i + (1) >> 0; + } + return [ns, rangeErrString, err]; + }; + leadingInt = function(s) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, c, err = $ifaceNil, i, rem = "", s, x = new $Int64(0, 0), x$1, x$2, x$3; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + c = s.charCodeAt(i); + if (c < 48 || c > 57) { + break; + } + if ((x.$high > 214748364 || (x.$high === 214748364 && x.$low >= 3435973835))) { + _tmp = new $Int64(0, 0); _tmp$1 = ""; _tmp$2 = errLeadingInt; x = _tmp; rem = _tmp$1; err = _tmp$2; + return [x, rem, err]; + } + x = (x$1 = (x$2 = $mul64(x, new $Int64(0, 10)), x$3 = new $Int64(0, c), new $Int64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)), new $Int64(x$1.$high - 0, x$1.$low - 48)); + i = i + (1) >> 0; + } + _tmp$3 = x; _tmp$4 = s.substring(i); _tmp$5 = $ifaceNil; x = _tmp$3; rem = _tmp$4; err = _tmp$5; + return [x, rem, err]; + }; + Time.ptr.prototype.After = function(u) { + var t, u, x, x$1, x$2, x$3; + t = $clone(this, Time); + u = $clone(u, Time); + return (x = t.sec, x$1 = u.sec, (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low > x$1.$low))) || (x$2 = t.sec, x$3 = u.sec, (x$2.$high === x$3.$high && x$2.$low === x$3.$low)) && t.nsec > u.nsec; + }; + Time.prototype.After = function(u) { return this.$val.After(u); }; + Time.ptr.prototype.Before = function(u) { + var t, u, x, x$1, x$2, x$3; + t = $clone(this, Time); + u = $clone(u, Time); + return (x = t.sec, x$1 = u.sec, (x.$high < x$1.$high || (x.$high === x$1.$high && x.$low < x$1.$low))) || (x$2 = t.sec, x$3 = u.sec, (x$2.$high === x$3.$high && x$2.$low === x$3.$low)) && t.nsec < u.nsec; + }; + Time.prototype.Before = function(u) { return this.$val.Before(u); }; + Time.ptr.prototype.Equal = function(u) { + var t, u, x, x$1; + t = $clone(this, Time); + u = $clone(u, Time); + return (x = t.sec, x$1 = u.sec, (x.$high === x$1.$high && x.$low === x$1.$low)) && (t.nsec === u.nsec); + }; + Time.prototype.Equal = function(u) { return this.$val.Equal(u); }; + Month.prototype.String = function() { + var m, x; + m = this.$val; + return (x = m - 1 >> 0, ((x < 0 || x >= months.length) ? $throwRuntimeError("index out of range") : months[x])); + }; + $ptrType(Month).prototype.String = function() { return new Month(this.$get()).String(); }; + Weekday.prototype.String = function() { + var d; + d = this.$val; + return ((d < 0 || d >= days.length) ? $throwRuntimeError("index out of range") : days[d]); + }; + $ptrType(Weekday).prototype.String = function() { return new Weekday(this.$get()).String(); }; + Time.ptr.prototype.IsZero = function() { + var t, x; + t = $clone(this, Time); + return (x = t.sec, (x.$high === 0 && x.$low === 0)) && (t.nsec === 0); + }; + Time.prototype.IsZero = function() { return this.$val.IsZero(); }; + Time.ptr.prototype.abs = function() { + var _tuple$1, l, offset, sec, t, x, x$1, x$2, x$3, x$4, x$5; + t = $clone(this, Time); + l = t.loc; + if (l === ptrType$1.nil || l === localLoc) { + l = l.get(); + } + sec = (x = t.sec, new $Int64(x.$high + -15, x.$low + 2288912640)); + if (!(l === utcLoc)) { + if (!(l.cacheZone === ptrType.nil) && (x$1 = l.cacheStart, (x$1.$high < sec.$high || (x$1.$high === sec.$high && x$1.$low <= sec.$low))) && (x$2 = l.cacheEnd, (sec.$high < x$2.$high || (sec.$high === x$2.$high && sec.$low < x$2.$low)))) { + sec = (x$3 = new $Int64(0, l.cacheZone.offset), new $Int64(sec.$high + x$3.$high, sec.$low + x$3.$low)); + } else { + _tuple$1 = l.lookup(sec); offset = _tuple$1[1]; + sec = (x$4 = new $Int64(0, offset), new $Int64(sec.$high + x$4.$high, sec.$low + x$4.$low)); + } + } + return (x$5 = new $Int64(sec.$high + 2147483646, sec.$low + 450480384), new $Uint64(x$5.$high, x$5.$low)); + }; + Time.prototype.abs = function() { return this.$val.abs(); }; + Time.ptr.prototype.locabs = function() { + var _tuple$1, abs = new $Uint64(0, 0), l, name = "", offset = 0, sec, t, x, x$1, x$2, x$3, x$4; + t = $clone(this, Time); + l = t.loc; + if (l === ptrType$1.nil || l === localLoc) { + l = l.get(); + } + sec = (x = t.sec, new $Int64(x.$high + -15, x.$low + 2288912640)); + if (!(l === utcLoc)) { + if (!(l.cacheZone === ptrType.nil) && (x$1 = l.cacheStart, (x$1.$high < sec.$high || (x$1.$high === sec.$high && x$1.$low <= sec.$low))) && (x$2 = l.cacheEnd, (sec.$high < x$2.$high || (sec.$high === x$2.$high && sec.$low < x$2.$low)))) { + name = l.cacheZone.name; + offset = l.cacheZone.offset; + } else { + _tuple$1 = l.lookup(sec); name = _tuple$1[0]; offset = _tuple$1[1]; + } + sec = (x$3 = new $Int64(0, offset), new $Int64(sec.$high + x$3.$high, sec.$low + x$3.$low)); + } else { + name = "UTC"; + } + abs = (x$4 = new $Int64(sec.$high + 2147483646, sec.$low + 450480384), new $Uint64(x$4.$high, x$4.$low)); + return [name, offset, abs]; + }; + Time.prototype.locabs = function() { return this.$val.locabs(); }; + Time.ptr.prototype.Date = function() { + var _tuple$1, day = 0, month = 0, t, year = 0; + t = $clone(this, Time); + _tuple$1 = t.date(true); year = _tuple$1[0]; month = _tuple$1[1]; day = _tuple$1[2]; + return [year, month, day]; + }; + Time.prototype.Date = function() { return this.$val.Date(); }; + Time.ptr.prototype.Year = function() { + var _tuple$1, t, year; + t = $clone(this, Time); + _tuple$1 = t.date(false); year = _tuple$1[0]; + return year; + }; + Time.prototype.Year = function() { return this.$val.Year(); }; + Time.ptr.prototype.Month = function() { + var _tuple$1, month, t; + t = $clone(this, Time); + _tuple$1 = t.date(true); month = _tuple$1[1]; + return month; + }; + Time.prototype.Month = function() { return this.$val.Month(); }; + Time.ptr.prototype.Day = function() { + var _tuple$1, day, t; + t = $clone(this, Time); + _tuple$1 = t.date(true); day = _tuple$1[2]; + return day; + }; + Time.prototype.Day = function() { return this.$val.Day(); }; + Time.ptr.prototype.Weekday = function() { + var t; + t = $clone(this, Time); + return absWeekday(t.abs()); + }; + Time.prototype.Weekday = function() { return this.$val.Weekday(); }; + absWeekday = function(abs) { + var _q, abs, sec; + sec = $div64((new $Uint64(abs.$high + 0, abs.$low + 86400)), new $Uint64(0, 604800), true); + return ((_q = (sec.$low >> 0) / 86400, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0); + }; + Time.ptr.prototype.ISOWeek = function() { + var _q, _r$1, _r$2, _r$3, _tuple$1, day, dec31wday, jan1wday, month, t, wday, week = 0, yday, year = 0; + t = $clone(this, Time); + _tuple$1 = t.date(true); year = _tuple$1[0]; month = _tuple$1[1]; day = _tuple$1[2]; yday = _tuple$1[3]; + wday = (_r$1 = ((t.Weekday() + 6 >> 0) >> 0) % 7, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")); + week = (_q = (((yday - wday >> 0) + 7 >> 0)) / 7, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + jan1wday = (_r$2 = (((wday - yday >> 0) + 371 >> 0)) % 7, _r$2 === _r$2 ? _r$2 : $throwRuntimeError("integer divide by zero")); + if (1 <= jan1wday && jan1wday <= 3) { + week = week + (1) >> 0; + } + if (week === 0) { + year = year - (1) >> 0; + week = 52; + if ((jan1wday === 4) || ((jan1wday === 5) && isLeap(year))) { + week = week + (1) >> 0; + } + } + if ((month === 12) && day >= 29 && wday < 3) { + dec31wday = (_r$3 = (((wday + 31 >> 0) - day >> 0)) % 7, _r$3 === _r$3 ? _r$3 : $throwRuntimeError("integer divide by zero")); + if (0 <= dec31wday && dec31wday <= 2) { + year = year + (1) >> 0; + week = 1; + } + } + return [year, week]; + }; + Time.prototype.ISOWeek = function() { return this.$val.ISOWeek(); }; + Time.ptr.prototype.Clock = function() { + var _tuple$1, hour = 0, min = 0, sec = 0, t; + t = $clone(this, Time); + _tuple$1 = absClock(t.abs()); hour = _tuple$1[0]; min = _tuple$1[1]; sec = _tuple$1[2]; + return [hour, min, sec]; + }; + Time.prototype.Clock = function() { return this.$val.Clock(); }; + absClock = function(abs) { + var _q, _q$1, abs, hour = 0, min = 0, sec = 0; + sec = ($div64(abs, new $Uint64(0, 86400), true).$low >> 0); + hour = (_q = sec / 3600, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + sec = sec - ((hour * 3600 >> 0)) >> 0; + min = (_q$1 = sec / 60, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")); + sec = sec - ((min * 60 >> 0)) >> 0; + return [hour, min, sec]; + }; + Time.ptr.prototype.Hour = function() { + var _q, t; + t = $clone(this, Time); + return (_q = ($div64(t.abs(), new $Uint64(0, 86400), true).$low >> 0) / 3600, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + }; + Time.prototype.Hour = function() { return this.$val.Hour(); }; + Time.ptr.prototype.Minute = function() { + var _q, t; + t = $clone(this, Time); + return (_q = ($div64(t.abs(), new $Uint64(0, 3600), true).$low >> 0) / 60, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + }; + Time.prototype.Minute = function() { return this.$val.Minute(); }; + Time.ptr.prototype.Second = function() { + var t; + t = $clone(this, Time); + return ($div64(t.abs(), new $Uint64(0, 60), true).$low >> 0); + }; + Time.prototype.Second = function() { return this.$val.Second(); }; + Time.ptr.prototype.Nanosecond = function() { + var t; + t = $clone(this, Time); + return (t.nsec >> 0); + }; + Time.prototype.Nanosecond = function() { return this.$val.Nanosecond(); }; + Time.ptr.prototype.YearDay = function() { + var _tuple$1, t, yday; + t = $clone(this, Time); + _tuple$1 = t.date(false); yday = _tuple$1[3]; + return yday + 1 >> 0; + }; + Time.prototype.YearDay = function() { return this.$val.YearDay(); }; + Duration.prototype.String = function() { + var _tuple$1, _tuple$2, buf, d, neg, prec, u, w; + d = this; + buf = $clone(arrayType.zero(), arrayType); + w = 32; + u = new $Uint64(d.$high, d.$low); + neg = (d.$high < 0 || (d.$high === 0 && d.$low < 0)); + if (neg) { + u = new $Uint64(-u.$high, -u.$low); + } + if ((u.$high < 0 || (u.$high === 0 && u.$low < 1000000000))) { + prec = 0; + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 115; + w = w - (1) >> 0; + if ((u.$high === 0 && u.$low === 0)) { + return "0"; + } else if ((u.$high < 0 || (u.$high === 0 && u.$low < 1000))) { + prec = 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 110; + } else if ((u.$high < 0 || (u.$high === 0 && u.$low < 1000000))) { + prec = 3; + w = w - (1) >> 0; + $copyString($subslice(new sliceType$3(buf), w), "\xC2\xB5"); + } else { + prec = 6; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 109; + } + _tuple$1 = fmtFrac($subslice(new sliceType$3(buf), 0, w), u, prec); w = _tuple$1[0]; u = _tuple$1[1]; + w = fmtInt($subslice(new sliceType$3(buf), 0, w), u); + } else { + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 115; + _tuple$2 = fmtFrac($subslice(new sliceType$3(buf), 0, w), u, 9); w = _tuple$2[0]; u = _tuple$2[1]; + w = fmtInt($subslice(new sliceType$3(buf), 0, w), $div64(u, new $Uint64(0, 60), true)); + u = $div64(u, (new $Uint64(0, 60)), false); + if ((u.$high > 0 || (u.$high === 0 && u.$low > 0))) { + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 109; + w = fmtInt($subslice(new sliceType$3(buf), 0, w), $div64(u, new $Uint64(0, 60), true)); + u = $div64(u, (new $Uint64(0, 60)), false); + if ((u.$high > 0 || (u.$high === 0 && u.$low > 0))) { + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 104; + w = fmtInt($subslice(new sliceType$3(buf), 0, w), u); + } + } + } + if (neg) { + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 45; + } + return $bytesToString($subslice(new sliceType$3(buf), w)); + }; + $ptrType(Duration).prototype.String = function() { return this.$get().String(); }; + fmtFrac = function(buf, v, prec) { + var _tmp, _tmp$1, buf, digit, i, nv = new $Uint64(0, 0), nw = 0, prec, print, v, w; + w = buf.$length; + print = false; + i = 0; + while (true) { + if (!(i < prec)) { break; } + digit = $div64(v, new $Uint64(0, 10), true); + print = print || !((digit.$high === 0 && digit.$low === 0)); + if (print) { + w = w - (1) >> 0; + (w < 0 || w >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + w] = (digit.$low << 24 >>> 24) + 48 << 24 >>> 24; + } + v = $div64(v, (new $Uint64(0, 10)), false); + i = i + (1) >> 0; + } + if (print) { + w = w - (1) >> 0; + (w < 0 || w >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + w] = 46; + } + _tmp = w; _tmp$1 = v; nw = _tmp; nv = _tmp$1; + return [nw, nv]; + }; + fmtInt = function(buf, v) { + var buf, v, w; + w = buf.$length; + if ((v.$high === 0 && v.$low === 0)) { + w = w - (1) >> 0; + (w < 0 || w >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + w] = 48; + } else { + while (true) { + if (!((v.$high > 0 || (v.$high === 0 && v.$low > 0)))) { break; } + w = w - (1) >> 0; + (w < 0 || w >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + w] = ($div64(v, new $Uint64(0, 10), true).$low << 24 >>> 24) + 48 << 24 >>> 24; + v = $div64(v, (new $Uint64(0, 10)), false); + } + } + return w; + }; + Duration.prototype.Nanoseconds = function() { + var d; + d = this; + return new $Int64(d.$high, d.$low); + }; + $ptrType(Duration).prototype.Nanoseconds = function() { return this.$get().Nanoseconds(); }; + Duration.prototype.Seconds = function() { + var d, nsec, sec; + d = this; + sec = $div64(d, new Duration(0, 1000000000), false); + nsec = $div64(d, new Duration(0, 1000000000), true); + return $flatten64(sec) + $flatten64(nsec) * 1e-09; + }; + $ptrType(Duration).prototype.Seconds = function() { return this.$get().Seconds(); }; + Duration.prototype.Minutes = function() { + var d, min, nsec; + d = this; + min = $div64(d, new Duration(13, 4165425152), false); + nsec = $div64(d, new Duration(13, 4165425152), true); + return $flatten64(min) + $flatten64(nsec) * 1.6666666666666667e-11; + }; + $ptrType(Duration).prototype.Minutes = function() { return this.$get().Minutes(); }; + Duration.prototype.Hours = function() { + var d, hour, nsec; + d = this; + hour = $div64(d, new Duration(838, 817405952), false); + nsec = $div64(d, new Duration(838, 817405952), true); + return $flatten64(hour) + $flatten64(nsec) * 2.777777777777778e-13; + }; + $ptrType(Duration).prototype.Hours = function() { return this.$get().Hours(); }; + Time.ptr.prototype.Add = function(d) { + var d, nsec, t, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7; + t = $clone(this, Time); + t.sec = (x = t.sec, x$1 = (x$2 = $div64(d, new Duration(0, 1000000000), false), new $Int64(x$2.$high, x$2.$low)), new $Int64(x.$high + x$1.$high, x.$low + x$1.$low)); + nsec = t.nsec + ((x$3 = $div64(d, new Duration(0, 1000000000), true), x$3.$low + ((x$3.$high >> 31) * 4294967296)) >> 0) >> 0; + if (nsec >= 1000000000) { + t.sec = (x$4 = t.sec, x$5 = new $Int64(0, 1), new $Int64(x$4.$high + x$5.$high, x$4.$low + x$5.$low)); + nsec = nsec - (1000000000) >> 0; + } else if (nsec < 0) { + t.sec = (x$6 = t.sec, x$7 = new $Int64(0, 1), new $Int64(x$6.$high - x$7.$high, x$6.$low - x$7.$low)); + nsec = nsec + (1000000000) >> 0; + } + t.nsec = nsec; + return t; + }; + Time.prototype.Add = function(d) { return this.$val.Add(d); }; + Time.ptr.prototype.Sub = function(u) { + var d, t, u, x, x$1, x$2, x$3, x$4; + t = $clone(this, Time); + u = $clone(u, Time); + d = (x = $mul64((x$1 = (x$2 = t.sec, x$3 = u.sec, new $Int64(x$2.$high - x$3.$high, x$2.$low - x$3.$low)), new Duration(x$1.$high, x$1.$low)), new Duration(0, 1000000000)), x$4 = new Duration(0, (t.nsec - u.nsec >> 0)), new Duration(x.$high + x$4.$high, x.$low + x$4.$low)); + if (u.Add(d).Equal(t)) { + return d; + } else if (t.Before(u)) { + return new Duration(-2147483648, 0); + } else { + return new Duration(2147483647, 4294967295); + } + }; + Time.prototype.Sub = function(u) { return this.$val.Sub(u); }; + Time.ptr.prototype.AddDate = function(years, months$1, days$1) { + var _tuple$1, _tuple$2, day, days$1, hour, min, month, months$1, sec, t, year, years; + t = $clone(this, Time); + _tuple$1 = t.Date(); year = _tuple$1[0]; month = _tuple$1[1]; day = _tuple$1[2]; + _tuple$2 = t.Clock(); hour = _tuple$2[0]; min = _tuple$2[1]; sec = _tuple$2[2]; + return Date(year + years >> 0, month + (months$1 >> 0) >> 0, day + days$1 >> 0, hour, min, sec, (t.nsec >> 0), t.loc); + }; + Time.prototype.AddDate = function(years, months$1, days$1) { return this.$val.AddDate(years, months$1, days$1); }; + Time.ptr.prototype.date = function(full) { + var _tuple$1, day = 0, full, month = 0, t, yday = 0, year = 0; + t = $clone(this, Time); + _tuple$1 = absDate(t.abs(), full); year = _tuple$1[0]; month = _tuple$1[1]; day = _tuple$1[2]; yday = _tuple$1[3]; + return [year, month, day, yday]; + }; + Time.prototype.date = function(full) { return this.$val.date(full); }; + absDate = function(abs, full) { + var _q, abs, begin, d, day = 0, end, full, month = 0, n, x, x$1, x$10, x$11, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, y, yday = 0, year = 0; + d = $div64(abs, new $Uint64(0, 86400), false); + n = $div64(d, new $Uint64(0, 146097), false); + y = $mul64(new $Uint64(0, 400), n); + d = (x = $mul64(new $Uint64(0, 146097), n), new $Uint64(d.$high - x.$high, d.$low - x.$low)); + n = $div64(d, new $Uint64(0, 36524), false); + n = (x$1 = $shiftRightUint64(n, 2), new $Uint64(n.$high - x$1.$high, n.$low - x$1.$low)); + y = (x$2 = $mul64(new $Uint64(0, 100), n), new $Uint64(y.$high + x$2.$high, y.$low + x$2.$low)); + d = (x$3 = $mul64(new $Uint64(0, 36524), n), new $Uint64(d.$high - x$3.$high, d.$low - x$3.$low)); + n = $div64(d, new $Uint64(0, 1461), false); + y = (x$4 = $mul64(new $Uint64(0, 4), n), new $Uint64(y.$high + x$4.$high, y.$low + x$4.$low)); + d = (x$5 = $mul64(new $Uint64(0, 1461), n), new $Uint64(d.$high - x$5.$high, d.$low - x$5.$low)); + n = $div64(d, new $Uint64(0, 365), false); + n = (x$6 = $shiftRightUint64(n, 2), new $Uint64(n.$high - x$6.$high, n.$low - x$6.$low)); + y = (x$7 = n, new $Uint64(y.$high + x$7.$high, y.$low + x$7.$low)); + d = (x$8 = $mul64(new $Uint64(0, 365), n), new $Uint64(d.$high - x$8.$high, d.$low - x$8.$low)); + year = ((x$9 = (x$10 = new $Int64(y.$high, y.$low), new $Int64(x$10.$high + -69, x$10.$low + 4075721025)), x$9.$low + ((x$9.$high >> 31) * 4294967296)) >> 0); + yday = (d.$low >> 0); + if (!full) { + return [year, month, day, yday]; + } + day = yday; + if (isLeap(year)) { + if (day > 59) { + day = day - (1) >> 0; + } else if (day === 59) { + month = 2; + day = 29; + return [year, month, day, yday]; + } + } + month = ((_q = day / 31, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0); + end = ((x$11 = month + 1 >> 0, ((x$11 < 0 || x$11 >= daysBefore.length) ? $throwRuntimeError("index out of range") : daysBefore[x$11])) >> 0); + begin = 0; + if (day >= end) { + month = month + (1) >> 0; + begin = end; + } else { + begin = (((month < 0 || month >= daysBefore.length) ? $throwRuntimeError("index out of range") : daysBefore[month]) >> 0); + } + month = month + (1) >> 0; + day = (day - begin >> 0) + 1 >> 0; + return [year, month, day, yday]; + }; + Time.ptr.prototype.UTC = function() { + var t; + t = $clone(this, Time); + t.loc = $pkg.UTC; + return t; + }; + Time.prototype.UTC = function() { return this.$val.UTC(); }; + Time.ptr.prototype.Local = function() { + var t; + t = $clone(this, Time); + t.loc = $pkg.Local; + return t; + }; + Time.prototype.Local = function() { return this.$val.Local(); }; + Time.ptr.prototype.In = function(loc) { + var loc, t; + t = $clone(this, Time); + if (loc === ptrType$1.nil) { + $panic(new $String("time: missing Location in call to Time.In")); + } + t.loc = loc; + return t; + }; + Time.prototype.In = function(loc) { return this.$val.In(loc); }; + Time.ptr.prototype.Location = function() { + var l, t; + t = $clone(this, Time); + l = t.loc; + if (l === ptrType$1.nil) { + l = $pkg.UTC; + } + return l; + }; + Time.prototype.Location = function() { return this.$val.Location(); }; + Time.ptr.prototype.Zone = function() { + var _tuple$1, name = "", offset = 0, t, x; + t = $clone(this, Time); + _tuple$1 = t.loc.lookup((x = t.sec, new $Int64(x.$high + -15, x.$low + 2288912640))); name = _tuple$1[0]; offset = _tuple$1[1]; + return [name, offset]; + }; + Time.prototype.Zone = function() { return this.$val.Zone(); }; + Time.ptr.prototype.Unix = function() { + var t, x; + t = $clone(this, Time); + return (x = t.sec, new $Int64(x.$high + -15, x.$low + 2288912640)); + }; + Time.prototype.Unix = function() { return this.$val.Unix(); }; + Time.ptr.prototype.UnixNano = function() { + var t, x, x$1, x$2; + t = $clone(this, Time); + return (x = $mul64(((x$1 = t.sec, new $Int64(x$1.$high + -15, x$1.$low + 2288912640))), new $Int64(0, 1000000000)), x$2 = new $Int64(0, t.nsec), new $Int64(x.$high + x$2.$high, x.$low + x$2.$low)); + }; + Time.prototype.UnixNano = function() { return this.$val.UnixNano(); }; + Time.ptr.prototype.MarshalBinary = function() { + var _q, _r$1, _tuple$1, enc, offset, offsetMin, t; + t = $clone(this, Time); + offsetMin = 0; + if (t.Location() === utcLoc) { + offsetMin = -1; + } else { + _tuple$1 = t.Zone(); offset = _tuple$1[1]; + if (!(((_r$1 = offset % 60, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) === 0))) { + return [sliceType$3.nil, errors.New("Time.MarshalBinary: zone offset has fractional minute")]; + } + offset = (_q = offset / (60), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + if (offset < -32768 || (offset === -1) || offset > 32767) { + return [sliceType$3.nil, errors.New("Time.MarshalBinary: unexpected zone offset")]; + } + offsetMin = (offset << 16 >> 16); + } + enc = new sliceType$3([1, ($shiftRightInt64(t.sec, 56).$low << 24 >>> 24), ($shiftRightInt64(t.sec, 48).$low << 24 >>> 24), ($shiftRightInt64(t.sec, 40).$low << 24 >>> 24), ($shiftRightInt64(t.sec, 32).$low << 24 >>> 24), ($shiftRightInt64(t.sec, 24).$low << 24 >>> 24), ($shiftRightInt64(t.sec, 16).$low << 24 >>> 24), ($shiftRightInt64(t.sec, 8).$low << 24 >>> 24), (t.sec.$low << 24 >>> 24), ((t.nsec >> 24 >> 0) << 24 >>> 24), ((t.nsec >> 16 >> 0) << 24 >>> 24), ((t.nsec >> 8 >> 0) << 24 >>> 24), (t.nsec << 24 >>> 24), ((offsetMin >> 8 << 16 >> 16) << 24 >>> 24), (offsetMin << 24 >>> 24)]); + return [enc, $ifaceNil]; + }; + Time.prototype.MarshalBinary = function() { return this.$val.MarshalBinary(); }; + Time.ptr.prototype.UnmarshalBinary = function(data$1) { + var _tuple$1, buf, data$1, localoff, offset, t, x, x$1, x$10, x$11, x$12, x$13, x$14, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + t = this; + buf = data$1; + if (buf.$length === 0) { + return errors.New("Time.UnmarshalBinary: no data"); + } + if (!((((0 < 0 || 0 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 0]) === 1))) { + return errors.New("Time.UnmarshalBinary: unsupported version"); + } + if (!((buf.$length === 15))) { + return errors.New("Time.UnmarshalBinary: invalid length"); + } + buf = $subslice(buf, 1); + t.sec = (x = (x$1 = (x$2 = (x$3 = (x$4 = (x$5 = (x$6 = new $Int64(0, ((7 < 0 || 7 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 7])), x$7 = $shiftLeft64(new $Int64(0, ((6 < 0 || 6 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 6])), 8), new $Int64(x$6.$high | x$7.$high, (x$6.$low | x$7.$low) >>> 0)), x$8 = $shiftLeft64(new $Int64(0, ((5 < 0 || 5 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 5])), 16), new $Int64(x$5.$high | x$8.$high, (x$5.$low | x$8.$low) >>> 0)), x$9 = $shiftLeft64(new $Int64(0, ((4 < 0 || 4 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 4])), 24), new $Int64(x$4.$high | x$9.$high, (x$4.$low | x$9.$low) >>> 0)), x$10 = $shiftLeft64(new $Int64(0, ((3 < 0 || 3 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 3])), 32), new $Int64(x$3.$high | x$10.$high, (x$3.$low | x$10.$low) >>> 0)), x$11 = $shiftLeft64(new $Int64(0, ((2 < 0 || 2 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 2])), 40), new $Int64(x$2.$high | x$11.$high, (x$2.$low | x$11.$low) >>> 0)), x$12 = $shiftLeft64(new $Int64(0, ((1 < 0 || 1 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 1])), 48), new $Int64(x$1.$high | x$12.$high, (x$1.$low | x$12.$low) >>> 0)), x$13 = $shiftLeft64(new $Int64(0, ((0 < 0 || 0 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 0])), 56), new $Int64(x.$high | x$13.$high, (x.$low | x$13.$low) >>> 0)); + buf = $subslice(buf, 8); + t.nsec = (((((3 < 0 || 3 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 3]) >> 0) | ((((2 < 0 || 2 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 2]) >> 0) << 8 >> 0)) | ((((1 < 0 || 1 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 1]) >> 0) << 16 >> 0)) | ((((0 < 0 || 0 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 0]) >> 0) << 24 >> 0); + buf = $subslice(buf, 4); + offset = (((((1 < 0 || 1 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 1]) << 16 >> 16) | ((((0 < 0 || 0 >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + 0]) << 16 >> 16) << 8 << 16 >> 16)) >> 0) * 60 >> 0; + if (offset === -60) { + t.loc = utcLoc; + } else { + _tuple$1 = $pkg.Local.lookup((x$14 = t.sec, new $Int64(x$14.$high + -15, x$14.$low + 2288912640))); localoff = _tuple$1[1]; + if (offset === localoff) { + t.loc = $pkg.Local; + } else { + t.loc = FixedZone("", offset); + } + } + return $ifaceNil; + }; + Time.prototype.UnmarshalBinary = function(data$1) { return this.$val.UnmarshalBinary(data$1); }; + Time.ptr.prototype.GobEncode = function() { + var t; + t = $clone(this, Time); + return t.MarshalBinary(); + }; + Time.prototype.GobEncode = function() { return this.$val.GobEncode(); }; + Time.ptr.prototype.GobDecode = function(data$1) { + var data$1, t; + t = this; + return t.UnmarshalBinary(data$1); + }; + Time.prototype.GobDecode = function(data$1) { return this.$val.GobDecode(data$1); }; + Time.ptr.prototype.MarshalJSON = function() { + var t, y; + t = $clone(this, Time); + y = t.Year(); + if (y < 0 || y >= 10000) { + return [sliceType$3.nil, errors.New("Time.MarshalJSON: year outside of range [0,9999]")]; + } + return [new sliceType$3($stringToBytes(t.Format("\"2006-01-02T15:04:05.999999999Z07:00\""))), $ifaceNil]; + }; + Time.prototype.MarshalJSON = function() { return this.$val.MarshalJSON(); }; + Time.ptr.prototype.UnmarshalJSON = function(data$1) { + var _tuple$1, data$1, err = $ifaceNil, t; + t = this; + _tuple$1 = Parse("\"2006-01-02T15:04:05Z07:00\"", $bytesToString(data$1)); $copy(t, _tuple$1[0], Time); err = _tuple$1[1]; + return err; + }; + Time.prototype.UnmarshalJSON = function(data$1) { return this.$val.UnmarshalJSON(data$1); }; + Time.ptr.prototype.MarshalText = function() { + var t, y; + t = $clone(this, Time); + y = t.Year(); + if (y < 0 || y >= 10000) { + return [sliceType$3.nil, errors.New("Time.MarshalText: year outside of range [0,9999]")]; + } + return [new sliceType$3($stringToBytes(t.Format("2006-01-02T15:04:05.999999999Z07:00"))), $ifaceNil]; + }; + Time.prototype.MarshalText = function() { return this.$val.MarshalText(); }; + Time.ptr.prototype.UnmarshalText = function(data$1) { + var _tuple$1, data$1, err = $ifaceNil, t; + t = this; + _tuple$1 = Parse("2006-01-02T15:04:05Z07:00", $bytesToString(data$1)); $copy(t, _tuple$1[0], Time); err = _tuple$1[1]; + return err; + }; + Time.prototype.UnmarshalText = function(data$1) { return this.$val.UnmarshalText(data$1); }; + Unix = $pkg.Unix = function(sec, nsec) { + var n, nsec, sec, x, x$1, x$2, x$3; + if ((nsec.$high < 0 || (nsec.$high === 0 && nsec.$low < 0)) || (nsec.$high > 0 || (nsec.$high === 0 && nsec.$low >= 1000000000))) { + n = $div64(nsec, new $Int64(0, 1000000000), false); + sec = (x = n, new $Int64(sec.$high + x.$high, sec.$low + x.$low)); + nsec = (x$1 = $mul64(n, new $Int64(0, 1000000000)), new $Int64(nsec.$high - x$1.$high, nsec.$low - x$1.$low)); + if ((nsec.$high < 0 || (nsec.$high === 0 && nsec.$low < 0))) { + nsec = (x$2 = new $Int64(0, 1000000000), new $Int64(nsec.$high + x$2.$high, nsec.$low + x$2.$low)); + sec = (x$3 = new $Int64(0, 1), new $Int64(sec.$high - x$3.$high, sec.$low - x$3.$low)); + } + } + return new Time.ptr(new $Int64(sec.$high + 14, sec.$low + 2006054656), ((nsec.$low + ((nsec.$high >> 31) * 4294967296)) >> 0), $pkg.Local); + }; + isLeap = function(year) { + var _r$1, _r$2, _r$3, year; + return ((_r$1 = year % 4, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) === 0) && (!(((_r$2 = year % 100, _r$2 === _r$2 ? _r$2 : $throwRuntimeError("integer divide by zero")) === 0)) || ((_r$3 = year % 400, _r$3 === _r$3 ? _r$3 : $throwRuntimeError("integer divide by zero")) === 0)); + }; + norm = function(hi, lo, base) { + var _q, _q$1, _tmp, _tmp$1, base, hi, lo, n, n$1, nhi = 0, nlo = 0; + if (lo < 0) { + n = (_q = ((-lo - 1 >> 0)) / base, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) + 1 >> 0; + hi = hi - (n) >> 0; + lo = lo + ((n * base >> 0)) >> 0; + } + if (lo >= base) { + n$1 = (_q$1 = lo / base, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")); + hi = hi + (n$1) >> 0; + lo = lo - ((n$1 * base >> 0)) >> 0; + } + _tmp = hi; _tmp$1 = lo; nhi = _tmp; nlo = _tmp$1; + return [nhi, nlo]; + }; + Date = $pkg.Date = function(year, month, day, hour, min, sec, nsec, loc) { + var _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, abs, d, day, end, hour, loc, m, min, month, n, nsec, offset, sec, start, unix, utc, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, y, year; + if (loc === ptrType$1.nil) { + $panic(new $String("time: missing Location in call to Date")); + } + m = (month >> 0) - 1 >> 0; + _tuple$1 = norm(year, m, 12); year = _tuple$1[0]; m = _tuple$1[1]; + month = (m >> 0) + 1 >> 0; + _tuple$2 = norm(sec, nsec, 1000000000); sec = _tuple$2[0]; nsec = _tuple$2[1]; + _tuple$3 = norm(min, sec, 60); min = _tuple$3[0]; sec = _tuple$3[1]; + _tuple$4 = norm(hour, min, 60); hour = _tuple$4[0]; min = _tuple$4[1]; + _tuple$5 = norm(day, hour, 24); day = _tuple$5[0]; hour = _tuple$5[1]; + y = (x = (x$1 = new $Int64(0, year), new $Int64(x$1.$high - -69, x$1.$low - 4075721025)), new $Uint64(x.$high, x.$low)); + n = $div64(y, new $Uint64(0, 400), false); + y = (x$2 = $mul64(new $Uint64(0, 400), n), new $Uint64(y.$high - x$2.$high, y.$low - x$2.$low)); + d = $mul64(new $Uint64(0, 146097), n); + n = $div64(y, new $Uint64(0, 100), false); + y = (x$3 = $mul64(new $Uint64(0, 100), n), new $Uint64(y.$high - x$3.$high, y.$low - x$3.$low)); + d = (x$4 = $mul64(new $Uint64(0, 36524), n), new $Uint64(d.$high + x$4.$high, d.$low + x$4.$low)); + n = $div64(y, new $Uint64(0, 4), false); + y = (x$5 = $mul64(new $Uint64(0, 4), n), new $Uint64(y.$high - x$5.$high, y.$low - x$5.$low)); + d = (x$6 = $mul64(new $Uint64(0, 1461), n), new $Uint64(d.$high + x$6.$high, d.$low + x$6.$low)); + n = y; + d = (x$7 = $mul64(new $Uint64(0, 365), n), new $Uint64(d.$high + x$7.$high, d.$low + x$7.$low)); + d = (x$8 = new $Uint64(0, (x$9 = month - 1 >> 0, ((x$9 < 0 || x$9 >= daysBefore.length) ? $throwRuntimeError("index out of range") : daysBefore[x$9]))), new $Uint64(d.$high + x$8.$high, d.$low + x$8.$low)); + if (isLeap(year) && month >= 3) { + d = (x$10 = new $Uint64(0, 1), new $Uint64(d.$high + x$10.$high, d.$low + x$10.$low)); + } + d = (x$11 = new $Uint64(0, (day - 1 >> 0)), new $Uint64(d.$high + x$11.$high, d.$low + x$11.$low)); + abs = $mul64(d, new $Uint64(0, 86400)); + abs = (x$12 = new $Uint64(0, (((hour * 3600 >> 0) + (min * 60 >> 0) >> 0) + sec >> 0)), new $Uint64(abs.$high + x$12.$high, abs.$low + x$12.$low)); + unix = (x$13 = new $Int64(abs.$high, abs.$low), new $Int64(x$13.$high + -2147483647, x$13.$low + 3844486912)); + _tuple$6 = loc.lookup(unix); offset = _tuple$6[1]; start = _tuple$6[3]; end = _tuple$6[4]; + if (!((offset === 0))) { + utc = (x$14 = new $Int64(0, offset), new $Int64(unix.$high - x$14.$high, unix.$low - x$14.$low)); + if ((utc.$high < start.$high || (utc.$high === start.$high && utc.$low < start.$low))) { + _tuple$7 = loc.lookup(new $Int64(start.$high - 0, start.$low - 1)); offset = _tuple$7[1]; + } else if ((utc.$high > end.$high || (utc.$high === end.$high && utc.$low >= end.$low))) { + _tuple$8 = loc.lookup(end); offset = _tuple$8[1]; + } + unix = (x$15 = new $Int64(0, offset), new $Int64(unix.$high - x$15.$high, unix.$low - x$15.$low)); + } + return new Time.ptr(new $Int64(unix.$high + 14, unix.$low + 2006054656), (nsec >> 0), loc); + }; + Time.ptr.prototype.Truncate = function(d) { + var _tuple$1, d, r, t; + t = $clone(this, Time); + if ((d.$high < 0 || (d.$high === 0 && d.$low <= 0))) { + return t; + } + _tuple$1 = div(t, d); r = _tuple$1[1]; + return t.Add(new Duration(-r.$high, -r.$low)); + }; + Time.prototype.Truncate = function(d) { return this.$val.Truncate(d); }; + Time.ptr.prototype.Round = function(d) { + var _tuple$1, d, r, t, x; + t = $clone(this, Time); + if ((d.$high < 0 || (d.$high === 0 && d.$low <= 0))) { + return t; + } + _tuple$1 = div(t, d); r = _tuple$1[1]; + if ((x = new Duration(r.$high + r.$high, r.$low + r.$low), (x.$high < d.$high || (x.$high === d.$high && x.$low < d.$low)))) { + return t.Add(new Duration(-r.$high, -r.$low)); + } + return t.Add(new Duration(d.$high - r.$high, d.$low - r.$low)); + }; + Time.prototype.Round = function(d) { return this.$val.Round(d); }; + div = function(t, d) { + var _q, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, d, d0, d1, d1$1, neg, nsec, qmod2 = 0, r = new Duration(0, 0), sec, t, tmp, u0, u0x, u1, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + t = $clone(t, Time); + neg = false; + nsec = t.nsec; + if ((x = t.sec, (x.$high < 0 || (x.$high === 0 && x.$low < 0)))) { + neg = true; + t.sec = (x$1 = t.sec, new $Int64(-x$1.$high, -x$1.$low)); + nsec = -nsec; + if (nsec < 0) { + nsec = nsec + (1000000000) >> 0; + t.sec = (x$2 = t.sec, x$3 = new $Int64(0, 1), new $Int64(x$2.$high - x$3.$high, x$2.$low - x$3.$low)); + } + } + if ((d.$high < 0 || (d.$high === 0 && d.$low < 1000000000)) && (x$4 = $div64(new Duration(0, 1000000000), (new Duration(d.$high + d.$high, d.$low + d.$low)), true), (x$4.$high === 0 && x$4.$low === 0))) { + qmod2 = ((_q = nsec / ((d.$low + ((d.$high >> 31) * 4294967296)) >> 0), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0) & 1; + r = new Duration(0, (_r$1 = nsec % ((d.$low + ((d.$high >> 31) * 4294967296)) >> 0), _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero"))); + } else if ((x$5 = $div64(d, new Duration(0, 1000000000), true), (x$5.$high === 0 && x$5.$low === 0))) { + d1 = (x$6 = $div64(d, new Duration(0, 1000000000), false), new $Int64(x$6.$high, x$6.$low)); + qmod2 = ((x$7 = $div64(t.sec, d1, false), x$7.$low + ((x$7.$high >> 31) * 4294967296)) >> 0) & 1; + r = (x$8 = $mul64((x$9 = $div64(t.sec, d1, true), new Duration(x$9.$high, x$9.$low)), new Duration(0, 1000000000)), x$10 = new Duration(0, nsec), new Duration(x$8.$high + x$10.$high, x$8.$low + x$10.$low)); + } else { + sec = (x$11 = t.sec, new $Uint64(x$11.$high, x$11.$low)); + tmp = $mul64(($shiftRightUint64(sec, 32)), new $Uint64(0, 1000000000)); + u1 = $shiftRightUint64(tmp, 32); + u0 = $shiftLeft64(tmp, 32); + tmp = $mul64(new $Uint64(sec.$high & 0, (sec.$low & 4294967295) >>> 0), new $Uint64(0, 1000000000)); + _tmp = u0; _tmp$1 = new $Uint64(u0.$high + tmp.$high, u0.$low + tmp.$low); u0x = _tmp; u0 = _tmp$1; + if ((u0.$high < u0x.$high || (u0.$high === u0x.$high && u0.$low < u0x.$low))) { + u1 = (x$12 = new $Uint64(0, 1), new $Uint64(u1.$high + x$12.$high, u1.$low + x$12.$low)); + } + _tmp$2 = u0; _tmp$3 = (x$13 = new $Uint64(0, nsec), new $Uint64(u0.$high + x$13.$high, u0.$low + x$13.$low)); u0x = _tmp$2; u0 = _tmp$3; + if ((u0.$high < u0x.$high || (u0.$high === u0x.$high && u0.$low < u0x.$low))) { + u1 = (x$14 = new $Uint64(0, 1), new $Uint64(u1.$high + x$14.$high, u1.$low + x$14.$low)); + } + d1$1 = new $Uint64(d.$high, d.$low); + while (true) { + if (!(!((x$15 = $shiftRightUint64(d1$1, 63), (x$15.$high === 0 && x$15.$low === 1))))) { break; } + d1$1 = $shiftLeft64(d1$1, (1)); + } + d0 = new $Uint64(0, 0); + while (true) { + if (!(true)) { break; } + qmod2 = 0; + if ((u1.$high > d1$1.$high || (u1.$high === d1$1.$high && u1.$low > d1$1.$low)) || (u1.$high === d1$1.$high && u1.$low === d1$1.$low) && (u0.$high > d0.$high || (u0.$high === d0.$high && u0.$low >= d0.$low))) { + qmod2 = 1; + _tmp$4 = u0; _tmp$5 = new $Uint64(u0.$high - d0.$high, u0.$low - d0.$low); u0x = _tmp$4; u0 = _tmp$5; + if ((u0.$high > u0x.$high || (u0.$high === u0x.$high && u0.$low > u0x.$low))) { + u1 = (x$16 = new $Uint64(0, 1), new $Uint64(u1.$high - x$16.$high, u1.$low - x$16.$low)); + } + u1 = (x$17 = d1$1, new $Uint64(u1.$high - x$17.$high, u1.$low - x$17.$low)); + } + if ((d1$1.$high === 0 && d1$1.$low === 0) && (x$18 = new $Uint64(d.$high, d.$low), (d0.$high === x$18.$high && d0.$low === x$18.$low))) { + break; + } + d0 = $shiftRightUint64(d0, (1)); + d0 = (x$19 = $shiftLeft64((new $Uint64(d1$1.$high & 0, (d1$1.$low & 1) >>> 0)), 63), new $Uint64(d0.$high | x$19.$high, (d0.$low | x$19.$low) >>> 0)); + d1$1 = $shiftRightUint64(d1$1, (1)); + } + r = new Duration(u0.$high, u0.$low); + } + if (neg && !((r.$high === 0 && r.$low === 0))) { + qmod2 = (qmod2 ^ (1)) >> 0; + r = new Duration(d.$high - r.$high, d.$low - r.$low); + } + return [qmod2, r]; + }; + Location.ptr.prototype.get = function() { + var l; + l = this; + if (l === ptrType$1.nil) { + return utcLoc; + } + if (l === localLoc) { + localOnce.Do(initLocal); + } + return l; + }; + Location.prototype.get = function() { return this.$val.get(); }; + Location.ptr.prototype.String = function() { + var l; + l = this; + return l.get().name; + }; + Location.prototype.String = function() { return this.$val.String(); }; + FixedZone = $pkg.FixedZone = function(name, offset) { + var l, name, offset, x; + l = new Location.ptr(name, new sliceType$1([new zone.ptr(name, offset, false)]), new sliceType$2([new zoneTrans.ptr(new $Int64(-2147483648, 0), 0, false, false)]), new $Int64(-2147483648, 0), new $Int64(2147483647, 4294967295), ptrType.nil); + l.cacheZone = (x = l.zone, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])); + return l; + }; + Location.ptr.prototype.lookup = function(sec) { + var _q, end = new $Int64(0, 0), hi, isDST = false, l, lim, lo, m, name = "", offset = 0, sec, start = new $Int64(0, 0), tx, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, zone$1, zone$2, zone$3; + l = this; + l = l.get(); + if (l.zone.$length === 0) { + name = "UTC"; + offset = 0; + isDST = false; + start = new $Int64(-2147483648, 0); + end = new $Int64(2147483647, 4294967295); + return [name, offset, isDST, start, end]; + } + zone$1 = l.cacheZone; + if (!(zone$1 === ptrType.nil) && (x = l.cacheStart, (x.$high < sec.$high || (x.$high === sec.$high && x.$low <= sec.$low))) && (x$1 = l.cacheEnd, (sec.$high < x$1.$high || (sec.$high === x$1.$high && sec.$low < x$1.$low)))) { + name = zone$1.name; + offset = zone$1.offset; + isDST = zone$1.isDST; + start = l.cacheStart; + end = l.cacheEnd; + return [name, offset, isDST, start, end]; + } + if ((l.tx.$length === 0) || (x$2 = (x$3 = l.tx, ((0 < 0 || 0 >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + 0])).when, (sec.$high < x$2.$high || (sec.$high === x$2.$high && sec.$low < x$2.$low)))) { + zone$2 = (x$4 = l.zone, x$5 = l.lookupFirstZone(), ((x$5 < 0 || x$5 >= x$4.$length) ? $throwRuntimeError("index out of range") : x$4.$array[x$4.$offset + x$5])); + name = zone$2.name; + offset = zone$2.offset; + isDST = zone$2.isDST; + start = new $Int64(-2147483648, 0); + if (l.tx.$length > 0) { + end = (x$6 = l.tx, ((0 < 0 || 0 >= x$6.$length) ? $throwRuntimeError("index out of range") : x$6.$array[x$6.$offset + 0])).when; + } else { + end = new $Int64(2147483647, 4294967295); + } + return [name, offset, isDST, start, end]; + } + tx = l.tx; + end = new $Int64(2147483647, 4294967295); + lo = 0; + hi = tx.$length; + while (true) { + if (!((hi - lo >> 0) > 1)) { break; } + m = lo + (_q = ((hi - lo >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0; + lim = ((m < 0 || m >= tx.$length) ? $throwRuntimeError("index out of range") : tx.$array[tx.$offset + m]).when; + if ((sec.$high < lim.$high || (sec.$high === lim.$high && sec.$low < lim.$low))) { + end = lim; + hi = m; + } else { + lo = m; + } + } + zone$3 = (x$7 = l.zone, x$8 = ((lo < 0 || lo >= tx.$length) ? $throwRuntimeError("index out of range") : tx.$array[tx.$offset + lo]).index, ((x$8 < 0 || x$8 >= x$7.$length) ? $throwRuntimeError("index out of range") : x$7.$array[x$7.$offset + x$8])); + name = zone$3.name; + offset = zone$3.offset; + isDST = zone$3.isDST; + start = ((lo < 0 || lo >= tx.$length) ? $throwRuntimeError("index out of range") : tx.$array[tx.$offset + lo]).when; + return [name, offset, isDST, start, end]; + }; + Location.prototype.lookup = function(sec) { return this.$val.lookup(sec); }; + Location.ptr.prototype.lookupFirstZone = function() { + var _i, _ref, l, x, x$1, x$2, x$3, x$4, x$5, zi, zi$1; + l = this; + if (!l.firstZoneUsed()) { + return 0; + } + if (l.tx.$length > 0 && (x = l.zone, x$1 = (x$2 = l.tx, ((0 < 0 || 0 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + 0])).index, ((x$1 < 0 || x$1 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + x$1])).isDST) { + zi = ((x$3 = l.tx, ((0 < 0 || 0 >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + 0])).index >> 0) - 1 >> 0; + while (true) { + if (!(zi >= 0)) { break; } + if (!(x$4 = l.zone, ((zi < 0 || zi >= x$4.$length) ? $throwRuntimeError("index out of range") : x$4.$array[x$4.$offset + zi])).isDST) { + return zi; + } + zi = zi - (1) >> 0; + } + } + _ref = l.zone; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + zi$1 = _i; + if (!(x$5 = l.zone, ((zi$1 < 0 || zi$1 >= x$5.$length) ? $throwRuntimeError("index out of range") : x$5.$array[x$5.$offset + zi$1])).isDST) { + return zi$1; + } + _i++; + } + return 0; + }; + Location.prototype.lookupFirstZone = function() { return this.$val.lookupFirstZone(); }; + Location.ptr.prototype.firstZoneUsed = function() { + var _i, _ref, l, tx; + l = this; + _ref = l.tx; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + tx = $clone(((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]), zoneTrans); + if (tx.index === 0) { + return true; + } + _i++; + } + return false; + }; + Location.prototype.firstZoneUsed = function() { return this.$val.firstZoneUsed(); }; + Location.ptr.prototype.lookupName = function(name, unix) { + var _i, _i$1, _ref, _ref$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple$1, i, i$1, isDST = false, isDST$1, l, nam, name, offset = 0, offset$1, ok = false, unix, x, x$1, x$2, zone$1, zone$2; + l = this; + l = l.get(); + _ref = l.zone; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + zone$1 = (x = l.zone, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + if (zone$1.name === name) { + _tuple$1 = l.lookup((x$1 = new $Int64(0, zone$1.offset), new $Int64(unix.$high - x$1.$high, unix.$low - x$1.$low))); nam = _tuple$1[0]; offset$1 = _tuple$1[1]; isDST$1 = _tuple$1[2]; + if (nam === zone$1.name) { + _tmp = offset$1; _tmp$1 = isDST$1; _tmp$2 = true; offset = _tmp; isDST = _tmp$1; ok = _tmp$2; + return [offset, isDST, ok]; + } + } + _i++; + } + _ref$1 = l.zone; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i$1 = _i$1; + zone$2 = (x$2 = l.zone, ((i$1 < 0 || i$1 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + i$1])); + if (zone$2.name === name) { + _tmp$3 = zone$2.offset; _tmp$4 = zone$2.isDST; _tmp$5 = true; offset = _tmp$3; isDST = _tmp$4; ok = _tmp$5; + return [offset, isDST, ok]; + } + _i$1++; + } + return [offset, isDST, ok]; + }; + Location.prototype.lookupName = function(name, unix) { return this.$val.lookupName(name, unix); }; + ptrType$2.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + Time.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "After", name: "After", pkg: "", typ: $funcType([Time], [$Bool], false)}, {prop: "Before", name: "Before", pkg: "", typ: $funcType([Time], [$Bool], false)}, {prop: "Equal", name: "Equal", pkg: "", typ: $funcType([Time], [$Bool], false)}, {prop: "IsZero", name: "IsZero", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "abs", name: "abs", pkg: "time", typ: $funcType([], [$Uint64], false)}, {prop: "locabs", name: "locabs", pkg: "time", typ: $funcType([], [$String, $Int, $Uint64], false)}, {prop: "Date", name: "Date", pkg: "", typ: $funcType([], [$Int, Month, $Int], false)}, {prop: "Year", name: "Year", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Month", name: "Month", pkg: "", typ: $funcType([], [Month], false)}, {prop: "Day", name: "Day", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Weekday", name: "Weekday", pkg: "", typ: $funcType([], [Weekday], false)}, {prop: "ISOWeek", name: "ISOWeek", pkg: "", typ: $funcType([], [$Int, $Int], false)}, {prop: "Clock", name: "Clock", pkg: "", typ: $funcType([], [$Int, $Int, $Int], false)}, {prop: "Hour", name: "Hour", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Minute", name: "Minute", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Second", name: "Second", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Nanosecond", name: "Nanosecond", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "YearDay", name: "YearDay", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([Duration], [Time], false)}, {prop: "Sub", name: "Sub", pkg: "", typ: $funcType([Time], [Duration], false)}, {prop: "AddDate", name: "AddDate", pkg: "", typ: $funcType([$Int, $Int, $Int], [Time], false)}, {prop: "date", name: "date", pkg: "time", typ: $funcType([$Bool], [$Int, Month, $Int, $Int], false)}, {prop: "UTC", name: "UTC", pkg: "", typ: $funcType([], [Time], false)}, {prop: "Local", name: "Local", pkg: "", typ: $funcType([], [Time], false)}, {prop: "In", name: "In", pkg: "", typ: $funcType([ptrType$1], [Time], false)}, {prop: "Location", name: "Location", pkg: "", typ: $funcType([], [ptrType$1], false)}, {prop: "Zone", name: "Zone", pkg: "", typ: $funcType([], [$String, $Int], false)}, {prop: "Unix", name: "Unix", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "UnixNano", name: "UnixNano", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "MarshalBinary", name: "MarshalBinary", pkg: "", typ: $funcType([], [sliceType$3, $error], false)}, {prop: "GobEncode", name: "GobEncode", pkg: "", typ: $funcType([], [sliceType$3, $error], false)}, {prop: "MarshalJSON", name: "MarshalJSON", pkg: "", typ: $funcType([], [sliceType$3, $error], false)}, {prop: "MarshalText", name: "MarshalText", pkg: "", typ: $funcType([], [sliceType$3, $error], false)}, {prop: "Truncate", name: "Truncate", pkg: "", typ: $funcType([Duration], [Time], false)}, {prop: "Round", name: "Round", pkg: "", typ: $funcType([Duration], [Time], false)}]; + ptrType$5.methods = [{prop: "UnmarshalBinary", name: "UnmarshalBinary", pkg: "", typ: $funcType([sliceType$3], [$error], false)}, {prop: "GobDecode", name: "GobDecode", pkg: "", typ: $funcType([sliceType$3], [$error], false)}, {prop: "UnmarshalJSON", name: "UnmarshalJSON", pkg: "", typ: $funcType([sliceType$3], [$error], false)}, {prop: "UnmarshalText", name: "UnmarshalText", pkg: "", typ: $funcType([sliceType$3], [$error], false)}]; + Month.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + Weekday.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + Duration.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Nanoseconds", name: "Nanoseconds", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Seconds", name: "Seconds", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Minutes", name: "Minutes", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Hours", name: "Hours", pkg: "", typ: $funcType([], [$Float64], false)}]; + ptrType$1.methods = [{prop: "get", name: "get", pkg: "time", typ: $funcType([], [ptrType$1], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "lookup", name: "lookup", pkg: "time", typ: $funcType([$Int64], [$String, $Int, $Bool, $Int64, $Int64], false)}, {prop: "lookupFirstZone", name: "lookupFirstZone", pkg: "time", typ: $funcType([], [$Int], false)}, {prop: "firstZoneUsed", name: "firstZoneUsed", pkg: "time", typ: $funcType([], [$Bool], false)}, {prop: "lookupName", name: "lookupName", pkg: "time", typ: $funcType([$String, $Int64], [$Int, $Bool, $Bool], false)}]; + ParseError.init([{prop: "Layout", name: "Layout", pkg: "", typ: $String, tag: ""}, {prop: "Value", name: "Value", pkg: "", typ: $String, tag: ""}, {prop: "LayoutElem", name: "LayoutElem", pkg: "", typ: $String, tag: ""}, {prop: "ValueElem", name: "ValueElem", pkg: "", typ: $String, tag: ""}, {prop: "Message", name: "Message", pkg: "", typ: $String, tag: ""}]); + Time.init([{prop: "sec", name: "sec", pkg: "time", typ: $Int64, tag: ""}, {prop: "nsec", name: "nsec", pkg: "time", typ: $Int32, tag: ""}, {prop: "loc", name: "loc", pkg: "time", typ: ptrType$1, tag: ""}]); + Location.init([{prop: "name", name: "name", pkg: "time", typ: $String, tag: ""}, {prop: "zone", name: "zone", pkg: "time", typ: sliceType$1, tag: ""}, {prop: "tx", name: "tx", pkg: "time", typ: sliceType$2, tag: ""}, {prop: "cacheStart", name: "cacheStart", pkg: "time", typ: $Int64, tag: ""}, {prop: "cacheEnd", name: "cacheEnd", pkg: "time", typ: $Int64, tag: ""}, {prop: "cacheZone", name: "cacheZone", pkg: "time", typ: ptrType, tag: ""}]); + zone.init([{prop: "name", name: "name", pkg: "time", typ: $String, tag: ""}, {prop: "offset", name: "offset", pkg: "time", typ: $Int, tag: ""}, {prop: "isDST", name: "isDST", pkg: "time", typ: $Bool, tag: ""}]); + zoneTrans.init([{prop: "when", name: "when", pkg: "time", typ: $Int64, tag: ""}, {prop: "index", name: "index", pkg: "time", typ: $Uint8, tag: ""}, {prop: "isstd", name: "isstd", pkg: "time", typ: $Bool, tag: ""}, {prop: "isutc", name: "isutc", pkg: "time", typ: $Bool, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_time = function() { while (true) { switch ($s) { case 0: + $r = errors.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = js.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = nosync.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = runtime.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = strings.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + $r = syscall.$init($BLOCKING); /* */ $s = 6; case 6: if ($r && $r.$blocking) { $r = $r(); } + localLoc = new Location.ptr(); + localOnce = new nosync.Once.ptr(); + std0x = $toNativeArray($kindInt, [260, 265, 524, 526, 528, 274]); + longDayNames = new sliceType(["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]); + shortDayNames = new sliceType(["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]); + shortMonthNames = new sliceType(["---", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]); + longMonthNames = new sliceType(["---", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]); + atoiError = errors.New("time: invalid number"); + errBad = errors.New("bad value for field"); + errLeadingInt = errors.New("time: bad [0-9]*"); + months = $toNativeArray($kindString, ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]); + days = $toNativeArray($kindString, ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]); + daysBefore = $toNativeArray($kindInt32, [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365]); + utcLoc = new Location.ptr("UTC", sliceType$1.nil, sliceType$2.nil, new $Int64(0, 0), new $Int64(0, 0), ptrType.nil); + $pkg.UTC = utcLoc; + $pkg.Local = localLoc; + _r = syscall.Getenv("ZONEINFO", $BLOCKING); /* */ $s = 7; case 7: if (_r && _r.$blocking) { _r = _r(); } + _tuple = _r; zoneinfo = _tuple[0]; + badData = errors.New("malformed time zone information"); + zoneDirs = new sliceType(["/usr/share/zoneinfo/", "/usr/share/lib/zoneinfo/", "/usr/lib/locale/TZ/", runtime.GOROOT() + "/lib/time/zoneinfo.zip"]); + /* */ } return; } }; $init_time.$blocking = true; return $init_time; + }; + return $pkg; +})(); +$packages["os"] = (function() { + var $pkg = {}, errors, js, io, runtime, sync, atomic, syscall, time, PathError, SyscallError, LinkError, File, file, dirInfo, FileInfo, FileMode, fileStat, sliceType, ptrType, sliceType$1, sliceType$2, ptrType$2, ptrType$3, ptrType$4, arrayType, ptrType$11, funcType$1, ptrType$12, ptrType$14, ptrType$15, errFinished, lstat, useSyscallwd, supportsCloseOnExec, runtime_args, init, NewSyscallError, IsNotExist, isNotExist, fixCount, sigpipe, syscallMode, NewFile, epipecheck, Lstat, basename, init$1, useSyscallwdDarwin, init$2, fileInfoFromStat, timespecToTime, init$3; + errors = $packages["errors"]; + js = $packages["github.com/gopherjs/gopherjs/js"]; + io = $packages["io"]; + runtime = $packages["runtime"]; + sync = $packages["sync"]; + atomic = $packages["sync/atomic"]; + syscall = $packages["syscall"]; + time = $packages["time"]; + PathError = $pkg.PathError = $newType(0, $kindStruct, "os.PathError", "PathError", "os", function(Op_, Path_, Err_) { + this.$val = this; + this.Op = Op_ !== undefined ? Op_ : ""; + this.Path = Path_ !== undefined ? Path_ : ""; + this.Err = Err_ !== undefined ? Err_ : $ifaceNil; + }); + SyscallError = $pkg.SyscallError = $newType(0, $kindStruct, "os.SyscallError", "SyscallError", "os", function(Syscall_, Err_) { + this.$val = this; + this.Syscall = Syscall_ !== undefined ? Syscall_ : ""; + this.Err = Err_ !== undefined ? Err_ : $ifaceNil; + }); + LinkError = $pkg.LinkError = $newType(0, $kindStruct, "os.LinkError", "LinkError", "os", function(Op_, Old_, New_, Err_) { + this.$val = this; + this.Op = Op_ !== undefined ? Op_ : ""; + this.Old = Old_ !== undefined ? Old_ : ""; + this.New = New_ !== undefined ? New_ : ""; + this.Err = Err_ !== undefined ? Err_ : $ifaceNil; + }); + File = $pkg.File = $newType(0, $kindStruct, "os.File", "File", "os", function(file_) { + this.$val = this; + this.file = file_ !== undefined ? file_ : ptrType$11.nil; + }); + file = $pkg.file = $newType(0, $kindStruct, "os.file", "file", "os", function(fd_, name_, dirinfo_, nepipe_) { + this.$val = this; + this.fd = fd_ !== undefined ? fd_ : 0; + this.name = name_ !== undefined ? name_ : ""; + this.dirinfo = dirinfo_ !== undefined ? dirinfo_ : ptrType.nil; + this.nepipe = nepipe_ !== undefined ? nepipe_ : 0; + }); + dirInfo = $pkg.dirInfo = $newType(0, $kindStruct, "os.dirInfo", "dirInfo", "os", function(buf_, nbuf_, bufp_) { + this.$val = this; + this.buf = buf_ !== undefined ? buf_ : sliceType$1.nil; + this.nbuf = nbuf_ !== undefined ? nbuf_ : 0; + this.bufp = bufp_ !== undefined ? bufp_ : 0; + }); + FileInfo = $pkg.FileInfo = $newType(8, $kindInterface, "os.FileInfo", "FileInfo", "os", null); + FileMode = $pkg.FileMode = $newType(4, $kindUint32, "os.FileMode", "FileMode", "os", null); + fileStat = $pkg.fileStat = $newType(0, $kindStruct, "os.fileStat", "fileStat", "os", function(name_, size_, mode_, modTime_, sys_) { + this.$val = this; + this.name = name_ !== undefined ? name_ : ""; + this.size = size_ !== undefined ? size_ : new $Int64(0, 0); + this.mode = mode_ !== undefined ? mode_ : 0; + this.modTime = modTime_ !== undefined ? modTime_ : new time.Time.ptr(); + this.sys = sys_ !== undefined ? sys_ : $ifaceNil; + }); + sliceType = $sliceType($String); + ptrType = $ptrType(dirInfo); + sliceType$1 = $sliceType($Uint8); + sliceType$2 = $sliceType(FileInfo); + ptrType$2 = $ptrType(File); + ptrType$3 = $ptrType(PathError); + ptrType$4 = $ptrType(LinkError); + arrayType = $arrayType($Uint8, 32); + ptrType$11 = $ptrType(file); + funcType$1 = $funcType([ptrType$11], [$error], false); + ptrType$12 = $ptrType($Int32); + ptrType$14 = $ptrType(fileStat); + ptrType$15 = $ptrType(SyscallError); + runtime_args = function() { + return $pkg.Args; + }; + init = function() { + var argv, i, process; + process = $global.process; + if (!(process === undefined)) { + argv = process.argv; + $pkg.Args = $makeSlice(sliceType, ($parseInt(argv.length) - 1 >> 0)); + i = 0; + while (true) { + if (!(i < ($parseInt(argv.length) - 1 >> 0))) { break; } + (i < 0 || i >= $pkg.Args.$length) ? $throwRuntimeError("index out of range") : $pkg.Args.$array[$pkg.Args.$offset + i] = $internalize(argv[(i + 1 >> 0)], $String); + i = i + (1) >> 0; + } + } + if ($pkg.Args.$length === 0) { + $pkg.Args = new sliceType(["?"]); + } + }; + File.ptr.prototype.readdirnames = function(n) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, _tuple$2, d, err = $ifaceNil, errno, f, n, names = sliceType.nil, nb, nc, size; + f = this; + if (f.file.dirinfo === ptrType.nil) { + f.file.dirinfo = new dirInfo.ptr(); + f.file.dirinfo.buf = $makeSlice(sliceType$1, 4096); + } + d = f.file.dirinfo; + size = n; + if (size <= 0) { + size = 100; + n = -1; + } + names = $makeSlice(sliceType, 0, size); + while (true) { + if (!(!((n === 0)))) { break; } + if (d.bufp >= d.nbuf) { + d.bufp = 0; + errno = $ifaceNil; + _tuple$1 = syscall.ReadDirent(f.file.fd, d.buf); + _tuple = fixCount(_tuple$1[0], _tuple$1[1]); d.nbuf = _tuple[0]; errno = _tuple[1]; + if (!($interfaceIsEqual(errno, $ifaceNil))) { + _tmp = names; _tmp$1 = NewSyscallError("readdirent", errno); names = _tmp; err = _tmp$1; + return [names, err]; + } + if (d.nbuf <= 0) { + break; + } + } + _tmp$2 = 0; _tmp$3 = 0; nb = _tmp$2; nc = _tmp$3; + _tuple$2 = syscall.ParseDirent($subslice(d.buf, d.bufp, d.nbuf), n, names); nb = _tuple$2[0]; nc = _tuple$2[1]; names = _tuple$2[2]; + d.bufp = d.bufp + (nb) >> 0; + n = n - (nc) >> 0; + } + if (n >= 0 && (names.$length === 0)) { + _tmp$4 = names; _tmp$5 = io.EOF; names = _tmp$4; err = _tmp$5; + return [names, err]; + } + _tmp$6 = names; _tmp$7 = $ifaceNil; names = _tmp$6; err = _tmp$7; + return [names, err]; + }; + File.prototype.readdirnames = function(n) { return this.$val.readdirnames(n); }; + File.ptr.prototype.Readdir = function(n) { + var _tmp, _tmp$1, _tuple, err = $ifaceNil, f, fi = sliceType$2.nil, n; + f = this; + if (f === ptrType$2.nil) { + _tmp = sliceType$2.nil; _tmp$1 = $pkg.ErrInvalid; fi = _tmp; err = _tmp$1; + return [fi, err]; + } + _tuple = f.readdir(n); fi = _tuple[0]; err = _tuple[1]; + return [fi, err]; + }; + File.prototype.Readdir = function(n) { return this.$val.Readdir(n); }; + File.ptr.prototype.Readdirnames = function(n) { + var _tmp, _tmp$1, _tuple, err = $ifaceNil, f, n, names = sliceType.nil; + f = this; + if (f === ptrType$2.nil) { + _tmp = sliceType.nil; _tmp$1 = $pkg.ErrInvalid; names = _tmp; err = _tmp$1; + return [names, err]; + } + _tuple = f.readdirnames(n); names = _tuple[0]; err = _tuple[1]; + return [names, err]; + }; + File.prototype.Readdirnames = function(n) { return this.$val.Readdirnames(n); }; + PathError.ptr.prototype.Error = function() { + var e; + e = this; + return e.Op + " " + e.Path + ": " + e.Err.Error(); + }; + PathError.prototype.Error = function() { return this.$val.Error(); }; + SyscallError.ptr.prototype.Error = function() { + var e; + e = this; + return e.Syscall + ": " + e.Err.Error(); + }; + SyscallError.prototype.Error = function() { return this.$val.Error(); }; + NewSyscallError = $pkg.NewSyscallError = function(syscall$1, err) { + var err, syscall$1; + if ($interfaceIsEqual(err, $ifaceNil)) { + return $ifaceNil; + } + return new SyscallError.ptr(syscall$1, err); + }; + IsNotExist = $pkg.IsNotExist = function(err) { + var err; + return isNotExist(err); + }; + isNotExist = function(err) { + var _ref, err, pe; + _ref = err; + if (_ref === $ifaceNil) { + pe = _ref; + return false; + } else if ($assertType(_ref, ptrType$3, true)[1]) { + pe = _ref.$val; + err = pe.Err; + } else if ($assertType(_ref, ptrType$4, true)[1]) { + pe = _ref.$val; + err = pe.Err; + } + return $interfaceIsEqual(err, new syscall.Errno(2)) || $interfaceIsEqual(err, $pkg.ErrNotExist); + }; + File.ptr.prototype.Name = function() { + var f; + f = this; + return f.file.name; + }; + File.prototype.Name = function() { return this.$val.Name(); }; + LinkError.ptr.prototype.Error = function() { + var e; + e = this; + return e.Op + " " + e.Old + " " + e.New + ": " + e.Err.Error(); + }; + LinkError.prototype.Error = function() { return this.$val.Error(); }; + File.ptr.prototype.Read = function(b) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, e, err = $ifaceNil, f, n = 0; + f = this; + if (f === ptrType$2.nil) { + _tmp = 0; _tmp$1 = $pkg.ErrInvalid; n = _tmp; err = _tmp$1; + return [n, err]; + } + _tuple = f.read(b); n = _tuple[0]; e = _tuple[1]; + if (n < 0) { + n = 0; + } + if ((n === 0) && b.$length > 0 && $interfaceIsEqual(e, $ifaceNil)) { + _tmp$2 = 0; _tmp$3 = io.EOF; n = _tmp$2; err = _tmp$3; + return [n, err]; + } + if (!($interfaceIsEqual(e, $ifaceNil))) { + err = new PathError.ptr("read", f.file.name, e); + } + _tmp$4 = n; _tmp$5 = err; n = _tmp$4; err = _tmp$5; + return [n, err]; + }; + File.prototype.Read = function(b) { return this.$val.Read(b); }; + File.ptr.prototype.ReadAt = function(b, off) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, e, err = $ifaceNil, f, m, n = 0, off, x; + f = this; + if (f === ptrType$2.nil) { + _tmp = 0; _tmp$1 = $pkg.ErrInvalid; n = _tmp; err = _tmp$1; + return [n, err]; + } + while (true) { + if (!(b.$length > 0)) { break; } + _tuple = f.pread(b, off); m = _tuple[0]; e = _tuple[1]; + if ((m === 0) && $interfaceIsEqual(e, $ifaceNil)) { + _tmp$2 = n; _tmp$3 = io.EOF; n = _tmp$2; err = _tmp$3; + return [n, err]; + } + if (!($interfaceIsEqual(e, $ifaceNil))) { + err = new PathError.ptr("read", f.file.name, e); + break; + } + n = n + (m) >> 0; + b = $subslice(b, m); + off = (x = new $Int64(0, m), new $Int64(off.$high + x.$high, off.$low + x.$low)); + } + return [n, err]; + }; + File.prototype.ReadAt = function(b, off) { return this.$val.ReadAt(b, off); }; + File.ptr.prototype.Write = function(b) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, e, err = $ifaceNil, f, n = 0; + f = this; + if (f === ptrType$2.nil) { + _tmp = 0; _tmp$1 = $pkg.ErrInvalid; n = _tmp; err = _tmp$1; + return [n, err]; + } + _tuple = f.write(b); n = _tuple[0]; e = _tuple[1]; + if (n < 0) { + n = 0; + } + if (!((n === b.$length))) { + err = io.ErrShortWrite; + } + epipecheck(f, e); + if (!($interfaceIsEqual(e, $ifaceNil))) { + err = new PathError.ptr("write", f.file.name, e); + } + _tmp$2 = n; _tmp$3 = err; n = _tmp$2; err = _tmp$3; + return [n, err]; + }; + File.prototype.Write = function(b) { return this.$val.Write(b); }; + File.ptr.prototype.WriteAt = function(b, off) { + var _tmp, _tmp$1, _tuple, b, e, err = $ifaceNil, f, m, n = 0, off, x; + f = this; + if (f === ptrType$2.nil) { + _tmp = 0; _tmp$1 = $pkg.ErrInvalid; n = _tmp; err = _tmp$1; + return [n, err]; + } + while (true) { + if (!(b.$length > 0)) { break; } + _tuple = f.pwrite(b, off); m = _tuple[0]; e = _tuple[1]; + if (!($interfaceIsEqual(e, $ifaceNil))) { + err = new PathError.ptr("write", f.file.name, e); + break; + } + n = n + (m) >> 0; + b = $subslice(b, m); + off = (x = new $Int64(0, m), new $Int64(off.$high + x.$high, off.$low + x.$low)); + } + return [n, err]; + }; + File.prototype.WriteAt = function(b, off) { return this.$val.WriteAt(b, off); }; + File.ptr.prototype.Seek = function(offset, whence) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, e, err = $ifaceNil, f, offset, r, ret = new $Int64(0, 0), whence; + f = this; + if (f === ptrType$2.nil) { + _tmp = new $Int64(0, 0); _tmp$1 = $pkg.ErrInvalid; ret = _tmp; err = _tmp$1; + return [ret, err]; + } + _tuple = f.seek(offset, whence); r = _tuple[0]; e = _tuple[1]; + if ($interfaceIsEqual(e, $ifaceNil) && !(f.file.dirinfo === ptrType.nil) && !((r.$high === 0 && r.$low === 0))) { + e = new syscall.Errno(21); + } + if (!($interfaceIsEqual(e, $ifaceNil))) { + _tmp$2 = new $Int64(0, 0); _tmp$3 = new PathError.ptr("seek", f.file.name, e); ret = _tmp$2; err = _tmp$3; + return [ret, err]; + } + _tmp$4 = r; _tmp$5 = $ifaceNil; ret = _tmp$4; err = _tmp$5; + return [ret, err]; + }; + File.prototype.Seek = function(offset, whence) { return this.$val.Seek(offset, whence); }; + File.ptr.prototype.WriteString = function(s) { + var _tmp, _tmp$1, _tuple, err = $ifaceNil, f, ret = 0, s; + f = this; + if (f === ptrType$2.nil) { + _tmp = 0; _tmp$1 = $pkg.ErrInvalid; ret = _tmp; err = _tmp$1; + return [ret, err]; + } + _tuple = f.Write(new sliceType$1($stringToBytes(s))); ret = _tuple[0]; err = _tuple[1]; + return [ret, err]; + }; + File.prototype.WriteString = function(s) { return this.$val.WriteString(s); }; + File.ptr.prototype.Chdir = function() { + var e, f; + f = this; + if (f === ptrType$2.nil) { + return $pkg.ErrInvalid; + } + e = syscall.Fchdir(f.file.fd); + if (!($interfaceIsEqual(e, $ifaceNil))) { + return new PathError.ptr("chdir", f.file.name, e); + } + return $ifaceNil; + }; + File.prototype.Chdir = function() { return this.$val.Chdir(); }; + fixCount = function(n, err) { + var err, n; + if (n < 0) { + n = 0; + } + return [n, err]; + }; + sigpipe = function() { + $panic("Native function not implemented: os.sigpipe"); + }; + syscallMode = function(i) { + var i, o = 0; + o = (o | ((new FileMode(i).Perm() >>> 0))) >>> 0; + if (!((((i & 8388608) >>> 0) === 0))) { + o = (o | (2048)) >>> 0; + } + if (!((((i & 4194304) >>> 0) === 0))) { + o = (o | (1024)) >>> 0; + } + if (!((((i & 1048576) >>> 0) === 0))) { + o = (o | (512)) >>> 0; + } + return o; + }; + File.ptr.prototype.Chmod = function(mode) { + var e, f, mode; + f = this; + if (f === ptrType$2.nil) { + return $pkg.ErrInvalid; + } + e = syscall.Fchmod(f.file.fd, syscallMode(mode)); + if (!($interfaceIsEqual(e, $ifaceNil))) { + return new PathError.ptr("chmod", f.file.name, e); + } + return $ifaceNil; + }; + File.prototype.Chmod = function(mode) { return this.$val.Chmod(mode); }; + File.ptr.prototype.Chown = function(uid, gid) { + var e, f, gid, uid; + f = this; + if (f === ptrType$2.nil) { + return $pkg.ErrInvalid; + } + e = syscall.Fchown(f.file.fd, uid, gid); + if (!($interfaceIsEqual(e, $ifaceNil))) { + return new PathError.ptr("chown", f.file.name, e); + } + return $ifaceNil; + }; + File.prototype.Chown = function(uid, gid) { return this.$val.Chown(uid, gid); }; + File.ptr.prototype.Truncate = function(size) { + var e, f, size; + f = this; + if (f === ptrType$2.nil) { + return $pkg.ErrInvalid; + } + e = syscall.Ftruncate(f.file.fd, size); + if (!($interfaceIsEqual(e, $ifaceNil))) { + return new PathError.ptr("truncate", f.file.name, e); + } + return $ifaceNil; + }; + File.prototype.Truncate = function(size) { return this.$val.Truncate(size); }; + File.ptr.prototype.Sync = function() { + var e, err = $ifaceNil, f; + f = this; + if (f === ptrType$2.nil) { + err = $pkg.ErrInvalid; + return err; + } + e = syscall.Fsync(f.file.fd); + if (!($interfaceIsEqual(e, $ifaceNil))) { + err = NewSyscallError("fsync", e); + return err; + } + err = $ifaceNil; + return err; + }; + File.prototype.Sync = function() { return this.$val.Sync(); }; + File.ptr.prototype.Fd = function() { + var f; + f = this; + if (f === ptrType$2.nil) { + return 4294967295; + } + return (f.file.fd >>> 0); + }; + File.prototype.Fd = function() { return this.$val.Fd(); }; + NewFile = $pkg.NewFile = function(fd, name) { + var f, fd, fdi, name; + fdi = (fd >> 0); + if (fdi < 0) { + return ptrType$2.nil; + } + f = new File.ptr(new file.ptr(fdi, name, ptrType.nil, 0)); + runtime.SetFinalizer(f.file, new funcType$1($methodExpr(ptrType$11.prototype.close))); + return f; + }; + epipecheck = function(file$1, e) { + var e, file$1; + if ($interfaceIsEqual(e, new syscall.Errno(32))) { + if (atomic.AddInt32(new ptrType$12(function() { return this.$target.file.nepipe; }, function($v) { this.$target.file.nepipe = $v; }, file$1), 1) >= 10) { + sigpipe(); + } + } else { + atomic.StoreInt32(new ptrType$12(function() { return this.$target.file.nepipe; }, function($v) { this.$target.file.nepipe = $v; }, file$1), 0); + } + }; + File.ptr.prototype.Close = function() { + var f; + f = this; + if (f === ptrType$2.nil) { + return $pkg.ErrInvalid; + } + return f.file.close(); + }; + File.prototype.Close = function() { return this.$val.Close(); }; + file.ptr.prototype.close = function() { + var e, err, file$1; + file$1 = this; + if (file$1 === ptrType$11.nil || file$1.fd < 0) { + return new syscall.Errno(22); + } + err = $ifaceNil; + e = syscall.Close(file$1.fd); + if (!($interfaceIsEqual(e, $ifaceNil))) { + err = new PathError.ptr("close", file$1.name, e); + } + file$1.fd = -1; + runtime.SetFinalizer(file$1, $ifaceNil); + return err; + }; + file.prototype.close = function() { return this.$val.close(); }; + File.ptr.prototype.Stat = function() { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, err = $ifaceNil, f, fi = $ifaceNil, stat; + f = this; + if (f === ptrType$2.nil) { + _tmp = $ifaceNil; _tmp$1 = $pkg.ErrInvalid; fi = _tmp; err = _tmp$1; + return [fi, err]; + } + stat = $clone(new syscall.Stat_t.ptr(), syscall.Stat_t); + err = syscall.Fstat(f.file.fd, stat); + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp$2 = $ifaceNil; _tmp$3 = new PathError.ptr("stat", f.file.name, err); fi = _tmp$2; err = _tmp$3; + return [fi, err]; + } + _tmp$4 = fileInfoFromStat(stat, f.file.name); _tmp$5 = $ifaceNil; fi = _tmp$4; err = _tmp$5; + return [fi, err]; + }; + File.prototype.Stat = function() { return this.$val.Stat(); }; + Lstat = $pkg.Lstat = function(name) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, err = $ifaceNil, fi = $ifaceNil, name, stat; + stat = $clone(new syscall.Stat_t.ptr(), syscall.Stat_t); + err = syscall.Lstat(name, stat); + if (!($interfaceIsEqual(err, $ifaceNil))) { + _tmp = $ifaceNil; _tmp$1 = new PathError.ptr("lstat", name, err); fi = _tmp; err = _tmp$1; + return [fi, err]; + } + _tmp$2 = fileInfoFromStat(stat, name); _tmp$3 = $ifaceNil; fi = _tmp$2; err = _tmp$3; + return [fi, err]; + }; + File.ptr.prototype.readdir = function(n) { + var _i, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, dirname, err = $ifaceNil, f, fi = sliceType$2.nil, filename, fip, lerr, n, names; + f = this; + dirname = f.file.name; + if (dirname === "") { + dirname = "."; + } + _tuple = f.Readdirnames(n); names = _tuple[0]; err = _tuple[1]; + fi = $makeSlice(sliceType$2, 0, names.$length); + _ref = names; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + filename = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + _tuple$1 = lstat(dirname + "/" + filename); fip = _tuple$1[0]; lerr = _tuple$1[1]; + if (IsNotExist(lerr)) { + _i++; + continue; + } + if (!($interfaceIsEqual(lerr, $ifaceNil))) { + _tmp = fi; _tmp$1 = lerr; fi = _tmp; err = _tmp$1; + return [fi, err]; + } + fi = $append(fi, fip); + _i++; + } + _tmp$2 = fi; _tmp$3 = err; fi = _tmp$2; err = _tmp$3; + return [fi, err]; + }; + File.prototype.readdir = function(n) { return this.$val.readdir(n); }; + File.ptr.prototype.read = function(b) { + var _tuple, _tuple$1, b, err = $ifaceNil, f, n = 0; + f = this; + if (true && b.$length > 1073741824) { + b = $subslice(b, 0, 1073741824); + } + _tuple$1 = syscall.Read(f.file.fd, b); + _tuple = fixCount(_tuple$1[0], _tuple$1[1]); n = _tuple[0]; err = _tuple[1]; + return [n, err]; + }; + File.prototype.read = function(b) { return this.$val.read(b); }; + File.ptr.prototype.pread = function(b, off) { + var _tuple, _tuple$1, b, err = $ifaceNil, f, n = 0, off; + f = this; + if (true && b.$length > 1073741824) { + b = $subslice(b, 0, 1073741824); + } + _tuple$1 = syscall.Pread(f.file.fd, b, off); + _tuple = fixCount(_tuple$1[0], _tuple$1[1]); n = _tuple[0]; err = _tuple[1]; + return [n, err]; + }; + File.prototype.pread = function(b, off) { return this.$val.pread(b, off); }; + File.ptr.prototype.write = function(b) { + var _tmp, _tmp$1, _tuple, _tuple$1, b, bcap, err = $ifaceNil, err$1, f, m, n = 0; + f = this; + while (true) { + if (!(true)) { break; } + bcap = b; + if (true && bcap.$length > 1073741824) { + bcap = $subslice(bcap, 0, 1073741824); + } + _tuple$1 = syscall.Write(f.file.fd, bcap); + _tuple = fixCount(_tuple$1[0], _tuple$1[1]); m = _tuple[0]; err$1 = _tuple[1]; + n = n + (m) >> 0; + if (0 < m && m < bcap.$length || $interfaceIsEqual(err$1, new syscall.Errno(4))) { + b = $subslice(b, m); + continue; + } + if (true && !((bcap.$length === b.$length)) && $interfaceIsEqual(err$1, $ifaceNil)) { + b = $subslice(b, m); + continue; + } + _tmp = n; _tmp$1 = err$1; n = _tmp; err = _tmp$1; + return [n, err]; + } + }; + File.prototype.write = function(b) { return this.$val.write(b); }; + File.ptr.prototype.pwrite = function(b, off) { + var _tuple, _tuple$1, b, err = $ifaceNil, f, n = 0, off; + f = this; + if (true && b.$length > 1073741824) { + b = $subslice(b, 0, 1073741824); + } + _tuple$1 = syscall.Pwrite(f.file.fd, b, off); + _tuple = fixCount(_tuple$1[0], _tuple$1[1]); n = _tuple[0]; err = _tuple[1]; + return [n, err]; + }; + File.prototype.pwrite = function(b, off) { return this.$val.pwrite(b, off); }; + File.ptr.prototype.seek = function(offset, whence) { + var _tuple, err = $ifaceNil, f, offset, ret = new $Int64(0, 0), whence; + f = this; + _tuple = syscall.Seek(f.file.fd, offset, whence); ret = _tuple[0]; err = _tuple[1]; + return [ret, err]; + }; + File.prototype.seek = function(offset, whence) { return this.$val.seek(offset, whence); }; + basename = function(name) { + var i, name; + i = name.length - 1 >> 0; + while (true) { + if (!(i > 0 && (name.charCodeAt(i) === 47))) { break; } + name = name.substring(0, i); + i = i - (1) >> 0; + } + i = i - (1) >> 0; + while (true) { + if (!(i >= 0)) { break; } + if (name.charCodeAt(i) === 47) { + name = name.substring((i + 1 >> 0)); + break; + } + i = i - (1) >> 0; + } + return name; + }; + init$1 = function() { + useSyscallwd = useSyscallwdDarwin; + }; + useSyscallwdDarwin = function(err) { + var err; + return !($interfaceIsEqual(err, new syscall.Errno(45))); + }; + init$2 = function() { + $pkg.Args = runtime_args(); + }; + fileInfoFromStat = function(st, name) { + var _ref, fs, name, st; + fs = new fileStat.ptr(basename(name), st.Size, 0, $clone(timespecToTime(st.Mtimespec), time.Time), st); + fs.mode = (((st.Mode & 511) >>> 0) >>> 0); + _ref = (st.Mode & 61440) >>> 0; + if (_ref === 24576 || _ref === 57344) { + fs.mode = (fs.mode | (67108864)) >>> 0; + } else if (_ref === 8192) { + fs.mode = (fs.mode | (69206016)) >>> 0; + } else if (_ref === 16384) { + fs.mode = (fs.mode | (2147483648)) >>> 0; + } else if (_ref === 4096) { + fs.mode = (fs.mode | (33554432)) >>> 0; + } else if (_ref === 40960) { + fs.mode = (fs.mode | (134217728)) >>> 0; + } else if (_ref === 32768) { + } else if (_ref === 49152) { + fs.mode = (fs.mode | (16777216)) >>> 0; + } + if (!((((st.Mode & 1024) >>> 0) === 0))) { + fs.mode = (fs.mode | (4194304)) >>> 0; + } + if (!((((st.Mode & 2048) >>> 0) === 0))) { + fs.mode = (fs.mode | (8388608)) >>> 0; + } + if (!((((st.Mode & 512) >>> 0) === 0))) { + fs.mode = (fs.mode | (1048576)) >>> 0; + } + return fs; + }; + timespecToTime = function(ts) { + var ts; + ts = $clone(ts, syscall.Timespec); + return time.Unix(ts.Sec, ts.Nsec); + }; + init$3 = function() { + var _i, _ref, _rune, _tuple, err, i, osver; + _tuple = syscall.Sysctl("kern.osrelease"); osver = _tuple[0]; err = _tuple[1]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + return; + } + i = 0; + _ref = osver; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + i = _i; + if (!((osver.charCodeAt(i) === 46))) { + _i += _rune[1]; + continue; + } + _i += _rune[1]; + } + if (i > 2 || (i === 2) && osver.charCodeAt(0) >= 49 && osver.charCodeAt(1) >= 49) { + supportsCloseOnExec = true; + } + }; + FileMode.prototype.String = function() { + var _i, _i$1, _ref, _ref$1, _rune, _rune$1, buf, c, c$1, i, i$1, m, w, y, y$1; + m = this.$val; + buf = $clone(arrayType.zero(), arrayType); + w = 0; + _ref = "dalTLDpSugct"; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + i = _i; + c = _rune[0]; + if (!((((m & (((y = ((31 - i >> 0) >>> 0), y < 32 ? (1 << y) : 0) >>> 0))) >>> 0) === 0))) { + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = (c << 24 >>> 24); + w = w + (1) >> 0; + } + _i += _rune[1]; + } + if (w === 0) { + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 45; + w = w + (1) >> 0; + } + _ref$1 = "rwxrwxrwx"; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.length)) { break; } + _rune$1 = $decodeRune(_ref$1, _i$1); + i$1 = _i$1; + c$1 = _rune$1[0]; + if (!((((m & (((y$1 = ((8 - i$1 >> 0) >>> 0), y$1 < 32 ? (1 << y$1) : 0) >>> 0))) >>> 0) === 0))) { + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = (c$1 << 24 >>> 24); + } else { + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 45; + } + w = w + (1) >> 0; + _i$1 += _rune$1[1]; + } + return $bytesToString($subslice(new sliceType$1(buf), 0, w)); + }; + $ptrType(FileMode).prototype.String = function() { return new FileMode(this.$get()).String(); }; + FileMode.prototype.IsDir = function() { + var m; + m = this.$val; + return !((((m & 2147483648) >>> 0) === 0)); + }; + $ptrType(FileMode).prototype.IsDir = function() { return new FileMode(this.$get()).IsDir(); }; + FileMode.prototype.IsRegular = function() { + var m; + m = this.$val; + return ((m & 2399141888) >>> 0) === 0; + }; + $ptrType(FileMode).prototype.IsRegular = function() { return new FileMode(this.$get()).IsRegular(); }; + FileMode.prototype.Perm = function() { + var m; + m = this.$val; + return (m & 511) >>> 0; + }; + $ptrType(FileMode).prototype.Perm = function() { return new FileMode(this.$get()).Perm(); }; + fileStat.ptr.prototype.Name = function() { + var fs; + fs = this; + return fs.name; + }; + fileStat.prototype.Name = function() { return this.$val.Name(); }; + fileStat.ptr.prototype.IsDir = function() { + var fs; + fs = this; + return new FileMode(fs.Mode()).IsDir(); + }; + fileStat.prototype.IsDir = function() { return this.$val.IsDir(); }; + fileStat.ptr.prototype.Size = function() { + var fs; + fs = this; + return fs.size; + }; + fileStat.prototype.Size = function() { return this.$val.Size(); }; + fileStat.ptr.prototype.Mode = function() { + var fs; + fs = this; + return fs.mode; + }; + fileStat.prototype.Mode = function() { return this.$val.Mode(); }; + fileStat.ptr.prototype.ModTime = function() { + var fs; + fs = this; + return fs.modTime; + }; + fileStat.prototype.ModTime = function() { return this.$val.ModTime(); }; + fileStat.ptr.prototype.Sys = function() { + var fs; + fs = this; + return fs.sys; + }; + fileStat.prototype.Sys = function() { return this.$val.Sys(); }; + ptrType$3.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$15.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$4.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$2.methods = [{prop: "readdirnames", name: "readdirnames", pkg: "os", typ: $funcType([$Int], [sliceType, $error], false)}, {prop: "Readdir", name: "Readdir", pkg: "", typ: $funcType([$Int], [sliceType$2, $error], false)}, {prop: "Readdirnames", name: "Readdirnames", pkg: "", typ: $funcType([$Int], [sliceType, $error], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "ReadAt", name: "ReadAt", pkg: "", typ: $funcType([sliceType$1, $Int64], [$Int, $error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "WriteAt", name: "WriteAt", pkg: "", typ: $funcType([sliceType$1, $Int64], [$Int, $error], false)}, {prop: "Seek", name: "Seek", pkg: "", typ: $funcType([$Int64, $Int], [$Int64, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}, {prop: "Chdir", name: "Chdir", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Chmod", name: "Chmod", pkg: "", typ: $funcType([FileMode], [$error], false)}, {prop: "Chown", name: "Chown", pkg: "", typ: $funcType([$Int, $Int], [$error], false)}, {prop: "Truncate", name: "Truncate", pkg: "", typ: $funcType([$Int64], [$error], false)}, {prop: "Sync", name: "Sync", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Fd", name: "Fd", pkg: "", typ: $funcType([], [$Uintptr], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Stat", name: "Stat", pkg: "", typ: $funcType([], [FileInfo, $error], false)}, {prop: "readdir", name: "readdir", pkg: "os", typ: $funcType([$Int], [sliceType$2, $error], false)}, {prop: "read", name: "read", pkg: "os", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "pread", name: "pread", pkg: "os", typ: $funcType([sliceType$1, $Int64], [$Int, $error], false)}, {prop: "write", name: "write", pkg: "os", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "pwrite", name: "pwrite", pkg: "os", typ: $funcType([sliceType$1, $Int64], [$Int, $error], false)}, {prop: "seek", name: "seek", pkg: "os", typ: $funcType([$Int64, $Int], [$Int64, $error], false)}]; + ptrType$11.methods = [{prop: "close", name: "close", pkg: "os", typ: $funcType([], [$error], false)}]; + FileMode.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "IsDir", name: "IsDir", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsRegular", name: "IsRegular", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Perm", name: "Perm", pkg: "", typ: $funcType([], [FileMode], false)}]; + ptrType$14.methods = [{prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "IsDir", name: "IsDir", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Mode", name: "Mode", pkg: "", typ: $funcType([], [FileMode], false)}, {prop: "ModTime", name: "ModTime", pkg: "", typ: $funcType([], [time.Time], false)}, {prop: "Sys", name: "Sys", pkg: "", typ: $funcType([], [$emptyInterface], false)}]; + PathError.init([{prop: "Op", name: "Op", pkg: "", typ: $String, tag: ""}, {prop: "Path", name: "Path", pkg: "", typ: $String, tag: ""}, {prop: "Err", name: "Err", pkg: "", typ: $error, tag: ""}]); + SyscallError.init([{prop: "Syscall", name: "Syscall", pkg: "", typ: $String, tag: ""}, {prop: "Err", name: "Err", pkg: "", typ: $error, tag: ""}]); + LinkError.init([{prop: "Op", name: "Op", pkg: "", typ: $String, tag: ""}, {prop: "Old", name: "Old", pkg: "", typ: $String, tag: ""}, {prop: "New", name: "New", pkg: "", typ: $String, tag: ""}, {prop: "Err", name: "Err", pkg: "", typ: $error, tag: ""}]); + File.init([{prop: "file", name: "", pkg: "os", typ: ptrType$11, tag: ""}]); + file.init([{prop: "fd", name: "fd", pkg: "os", typ: $Int, tag: ""}, {prop: "name", name: "name", pkg: "os", typ: $String, tag: ""}, {prop: "dirinfo", name: "dirinfo", pkg: "os", typ: ptrType, tag: ""}, {prop: "nepipe", name: "nepipe", pkg: "os", typ: $Int32, tag: ""}]); + dirInfo.init([{prop: "buf", name: "buf", pkg: "os", typ: sliceType$1, tag: ""}, {prop: "nbuf", name: "nbuf", pkg: "os", typ: $Int, tag: ""}, {prop: "bufp", name: "bufp", pkg: "os", typ: $Int, tag: ""}]); + FileInfo.init([{prop: "IsDir", name: "IsDir", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "ModTime", name: "ModTime", pkg: "", typ: $funcType([], [time.Time], false)}, {prop: "Mode", name: "Mode", pkg: "", typ: $funcType([], [FileMode], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Sys", name: "Sys", pkg: "", typ: $funcType([], [$emptyInterface], false)}]); + fileStat.init([{prop: "name", name: "name", pkg: "os", typ: $String, tag: ""}, {prop: "size", name: "size", pkg: "os", typ: $Int64, tag: ""}, {prop: "mode", name: "mode", pkg: "os", typ: FileMode, tag: ""}, {prop: "modTime", name: "modTime", pkg: "os", typ: time.Time, tag: ""}, {prop: "sys", name: "sys", pkg: "os", typ: $emptyInterface, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_os = function() { while (true) { switch ($s) { case 0: + $r = errors.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = js.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = io.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = runtime.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = sync.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + $r = atomic.$init($BLOCKING); /* */ $s = 6; case 6: if ($r && $r.$blocking) { $r = $r(); } + $r = syscall.$init($BLOCKING); /* */ $s = 7; case 7: if ($r && $r.$blocking) { $r = $r(); } + $r = time.$init($BLOCKING); /* */ $s = 8; case 8: if ($r && $r.$blocking) { $r = $r(); } + $pkg.Args = sliceType.nil; + supportsCloseOnExec = false; + $pkg.ErrInvalid = errors.New("invalid argument"); + $pkg.ErrPermission = errors.New("permission denied"); + $pkg.ErrExist = errors.New("file already exists"); + $pkg.ErrNotExist = errors.New("file does not exist"); + errFinished = errors.New("os: process already finished"); + $pkg.Stdin = NewFile((syscall.Stdin >>> 0), "/dev/stdin"); + $pkg.Stdout = NewFile((syscall.Stdout >>> 0), "/dev/stdout"); + $pkg.Stderr = NewFile((syscall.Stderr >>> 0), "/dev/stderr"); + useSyscallwd = (function(param) { + var param; + return true; + }); + lstat = Lstat; + init(); + init$1(); + init$2(); + init$3(); + /* */ } return; } }; $init_os.$blocking = true; return $init_os; + }; + return $pkg; +})(); +$packages["strconv"] = (function() { + var $pkg = {}, errors, math, utf8, decimal, leftCheat, extFloat, floatInfo, decimalSlice, sliceType$3, sliceType$4, sliceType$5, sliceType$6, arrayType, arrayType$1, ptrType$1, arrayType$2, arrayType$3, arrayType$4, arrayType$5, arrayType$6, ptrType$2, ptrType$3, ptrType$4, optimize, leftcheats, smallPowersOfTen, powersOfTen, uint64pow10, float32info, float64info, isPrint16, isNotPrint16, isPrint32, isNotPrint32, shifts, digitZero, trim, rightShift, prefixIsLessThan, leftShift, shouldRoundUp, frexp10Many, adjustLastDigitFixed, adjustLastDigit, AppendFloat, genericFtoa, bigFtoa, formatDigits, roundShortest, fmtE, fmtF, fmtB, max, FormatInt, Itoa, formatBits, quoteWith, Quote, QuoteToASCII, QuoteRune, AppendQuoteRune, QuoteRuneToASCII, AppendQuoteRuneToASCII, CanBackquote, unhex, UnquoteChar, Unquote, contains, bsearch16, bsearch32, IsPrint; + errors = $packages["errors"]; + math = $packages["math"]; + utf8 = $packages["unicode/utf8"]; + decimal = $pkg.decimal = $newType(0, $kindStruct, "strconv.decimal", "decimal", "strconv", function(d_, nd_, dp_, neg_, trunc_) { + this.$val = this; + this.d = d_ !== undefined ? d_ : arrayType$6.zero(); + this.nd = nd_ !== undefined ? nd_ : 0; + this.dp = dp_ !== undefined ? dp_ : 0; + this.neg = neg_ !== undefined ? neg_ : false; + this.trunc = trunc_ !== undefined ? trunc_ : false; + }); + leftCheat = $pkg.leftCheat = $newType(0, $kindStruct, "strconv.leftCheat", "leftCheat", "strconv", function(delta_, cutoff_) { + this.$val = this; + this.delta = delta_ !== undefined ? delta_ : 0; + this.cutoff = cutoff_ !== undefined ? cutoff_ : ""; + }); + extFloat = $pkg.extFloat = $newType(0, $kindStruct, "strconv.extFloat", "extFloat", "strconv", function(mant_, exp_, neg_) { + this.$val = this; + this.mant = mant_ !== undefined ? mant_ : new $Uint64(0, 0); + this.exp = exp_ !== undefined ? exp_ : 0; + this.neg = neg_ !== undefined ? neg_ : false; + }); + floatInfo = $pkg.floatInfo = $newType(0, $kindStruct, "strconv.floatInfo", "floatInfo", "strconv", function(mantbits_, expbits_, bias_) { + this.$val = this; + this.mantbits = mantbits_ !== undefined ? mantbits_ : 0; + this.expbits = expbits_ !== undefined ? expbits_ : 0; + this.bias = bias_ !== undefined ? bias_ : 0; + }); + decimalSlice = $pkg.decimalSlice = $newType(0, $kindStruct, "strconv.decimalSlice", "decimalSlice", "strconv", function(d_, nd_, dp_, neg_) { + this.$val = this; + this.d = d_ !== undefined ? d_ : sliceType$6.nil; + this.nd = nd_ !== undefined ? nd_ : 0; + this.dp = dp_ !== undefined ? dp_ : 0; + this.neg = neg_ !== undefined ? neg_ : false; + }); + sliceType$3 = $sliceType(leftCheat); + sliceType$4 = $sliceType($Uint16); + sliceType$5 = $sliceType($Uint32); + sliceType$6 = $sliceType($Uint8); + arrayType = $arrayType($Uint8, 24); + arrayType$1 = $arrayType($Uint8, 32); + ptrType$1 = $ptrType(floatInfo); + arrayType$2 = $arrayType($Uint8, 3); + arrayType$3 = $arrayType($Uint8, 50); + arrayType$4 = $arrayType($Uint8, 65); + arrayType$5 = $arrayType($Uint8, 4); + arrayType$6 = $arrayType($Uint8, 800); + ptrType$2 = $ptrType(decimal); + ptrType$3 = $ptrType(decimalSlice); + ptrType$4 = $ptrType(extFloat); + decimal.ptr.prototype.String = function() { + var a, buf, n, w; + a = this; + n = 10 + a.nd >> 0; + if (a.dp > 0) { + n = n + (a.dp) >> 0; + } + if (a.dp < 0) { + n = n + (-a.dp) >> 0; + } + buf = $makeSlice(sliceType$6, n); + w = 0; + if (a.nd === 0) { + return "0"; + } else if (a.dp <= 0) { + (w < 0 || w >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + w] = 48; + w = w + (1) >> 0; + (w < 0 || w >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + w] = 46; + w = w + (1) >> 0; + w = w + (digitZero($subslice(buf, w, (w + -a.dp >> 0)))) >> 0; + w = w + ($copySlice($subslice(buf, w), $subslice(new sliceType$6(a.d), 0, a.nd))) >> 0; + } else if (a.dp < a.nd) { + w = w + ($copySlice($subslice(buf, w), $subslice(new sliceType$6(a.d), 0, a.dp))) >> 0; + (w < 0 || w >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + w] = 46; + w = w + (1) >> 0; + w = w + ($copySlice($subslice(buf, w), $subslice(new sliceType$6(a.d), a.dp, a.nd))) >> 0; + } else { + w = w + ($copySlice($subslice(buf, w), $subslice(new sliceType$6(a.d), 0, a.nd))) >> 0; + w = w + (digitZero($subslice(buf, w, ((w + a.dp >> 0) - a.nd >> 0)))) >> 0; + } + return $bytesToString($subslice(buf, 0, w)); + }; + decimal.prototype.String = function() { return this.$val.String(); }; + digitZero = function(dst) { + var _i, _ref, dst, i; + _ref = dst; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + (i < 0 || i >= dst.$length) ? $throwRuntimeError("index out of range") : dst.$array[dst.$offset + i] = 48; + _i++; + } + return dst.$length; + }; + trim = function(a) { + var a, x, x$1; + while (true) { + if (!(a.nd > 0 && ((x = a.d, x$1 = a.nd - 1 >> 0, ((x$1 < 0 || x$1 >= x.length) ? $throwRuntimeError("index out of range") : x[x$1])) === 48))) { break; } + a.nd = a.nd - (1) >> 0; + } + if (a.nd === 0) { + a.dp = 0; + } + }; + decimal.ptr.prototype.Assign = function(v) { + var a, buf, n, v, v1, x, x$1, x$2; + a = this; + buf = $clone(arrayType.zero(), arrayType); + n = 0; + while (true) { + if (!((v.$high > 0 || (v.$high === 0 && v.$low > 0)))) { break; } + v1 = $div64(v, new $Uint64(0, 10), false); + v = (x = $mul64(new $Uint64(0, 10), v1), new $Uint64(v.$high - x.$high, v.$low - x.$low)); + (n < 0 || n >= buf.length) ? $throwRuntimeError("index out of range") : buf[n] = (new $Uint64(v.$high + 0, v.$low + 48).$low << 24 >>> 24); + n = n + (1) >> 0; + v = v1; + } + a.nd = 0; + n = n - (1) >> 0; + while (true) { + if (!(n >= 0)) { break; } + (x$1 = a.d, x$2 = a.nd, (x$2 < 0 || x$2 >= x$1.length) ? $throwRuntimeError("index out of range") : x$1[x$2] = ((n < 0 || n >= buf.length) ? $throwRuntimeError("index out of range") : buf[n])); + a.nd = a.nd + (1) >> 0; + n = n - (1) >> 0; + } + a.dp = a.nd; + trim(a); + }; + decimal.prototype.Assign = function(v) { return this.$val.Assign(v); }; + rightShift = function(a, k) { + var a, c, c$1, dig, dig$1, k, n, r, w, x, x$1, x$2, x$3, y, y$1; + r = 0; + w = 0; + n = 0; + while (true) { + if (!(((n >> $min(k, 31)) >> 0) === 0)) { break; } + if (r >= a.nd) { + if (n === 0) { + a.nd = 0; + return; + } + while (true) { + if (!(((n >> $min(k, 31)) >> 0) === 0)) { break; } + n = n * 10 >> 0; + r = r + (1) >> 0; + } + break; + } + c = ((x = a.d, ((r < 0 || r >= x.length) ? $throwRuntimeError("index out of range") : x[r])) >> 0); + n = ((n * 10 >> 0) + c >> 0) - 48 >> 0; + r = r + (1) >> 0; + } + a.dp = a.dp - ((r - 1 >> 0)) >> 0; + while (true) { + if (!(r < a.nd)) { break; } + c$1 = ((x$1 = a.d, ((r < 0 || r >= x$1.length) ? $throwRuntimeError("index out of range") : x$1[r])) >> 0); + dig = (n >> $min(k, 31)) >> 0; + n = n - (((y = k, y < 32 ? (dig << y) : 0) >> 0)) >> 0; + (x$2 = a.d, (w < 0 || w >= x$2.length) ? $throwRuntimeError("index out of range") : x$2[w] = ((dig + 48 >> 0) << 24 >>> 24)); + w = w + (1) >> 0; + n = ((n * 10 >> 0) + c$1 >> 0) - 48 >> 0; + r = r + (1) >> 0; + } + while (true) { + if (!(n > 0)) { break; } + dig$1 = (n >> $min(k, 31)) >> 0; + n = n - (((y$1 = k, y$1 < 32 ? (dig$1 << y$1) : 0) >> 0)) >> 0; + if (w < 800) { + (x$3 = a.d, (w < 0 || w >= x$3.length) ? $throwRuntimeError("index out of range") : x$3[w] = ((dig$1 + 48 >> 0) << 24 >>> 24)); + w = w + (1) >> 0; + } else if (dig$1 > 0) { + a.trunc = true; + } + n = n * 10 >> 0; + } + a.nd = w; + trim(a); + }; + prefixIsLessThan = function(b, s) { + var b, i, s; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + if (i >= b.$length) { + return true; + } + if (!((((i < 0 || i >= b.$length) ? $throwRuntimeError("index out of range") : b.$array[b.$offset + i]) === s.charCodeAt(i)))) { + return ((i < 0 || i >= b.$length) ? $throwRuntimeError("index out of range") : b.$array[b.$offset + i]) < s.charCodeAt(i); + } + i = i + (1) >> 0; + } + return false; + }; + leftShift = function(a, k) { + var _q, _q$1, a, delta, k, n, quo, quo$1, r, rem, rem$1, w, x, x$1, x$2, y; + delta = ((k < 0 || k >= leftcheats.$length) ? $throwRuntimeError("index out of range") : leftcheats.$array[leftcheats.$offset + k]).delta; + if (prefixIsLessThan($subslice(new sliceType$6(a.d), 0, a.nd), ((k < 0 || k >= leftcheats.$length) ? $throwRuntimeError("index out of range") : leftcheats.$array[leftcheats.$offset + k]).cutoff)) { + delta = delta - (1) >> 0; + } + r = a.nd; + w = a.nd + delta >> 0; + n = 0; + r = r - (1) >> 0; + while (true) { + if (!(r >= 0)) { break; } + n = n + (((y = k, y < 32 ? (((((x = a.d, ((r < 0 || r >= x.length) ? $throwRuntimeError("index out of range") : x[r])) >> 0) - 48 >> 0)) << y) : 0) >> 0)) >> 0; + quo = (_q = n / 10, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + rem = n - (10 * quo >> 0) >> 0; + w = w - (1) >> 0; + if (w < 800) { + (x$1 = a.d, (w < 0 || w >= x$1.length) ? $throwRuntimeError("index out of range") : x$1[w] = ((rem + 48 >> 0) << 24 >>> 24)); + } else if (!((rem === 0))) { + a.trunc = true; + } + n = quo; + r = r - (1) >> 0; + } + while (true) { + if (!(n > 0)) { break; } + quo$1 = (_q$1 = n / 10, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")); + rem$1 = n - (10 * quo$1 >> 0) >> 0; + w = w - (1) >> 0; + if (w < 800) { + (x$2 = a.d, (w < 0 || w >= x$2.length) ? $throwRuntimeError("index out of range") : x$2[w] = ((rem$1 + 48 >> 0) << 24 >>> 24)); + } else if (!((rem$1 === 0))) { + a.trunc = true; + } + n = quo$1; + } + a.nd = a.nd + (delta) >> 0; + if (a.nd >= 800) { + a.nd = 800; + } + a.dp = a.dp + (delta) >> 0; + trim(a); + }; + decimal.ptr.prototype.Shift = function(k) { + var a, k; + a = this; + if (a.nd === 0) { + } else if (k > 0) { + while (true) { + if (!(k > 27)) { break; } + leftShift(a, 27); + k = k - (27) >> 0; + } + leftShift(a, (k >>> 0)); + } else if (k < 0) { + while (true) { + if (!(k < -27)) { break; } + rightShift(a, 27); + k = k + (27) >> 0; + } + rightShift(a, (-k >>> 0)); + } + }; + decimal.prototype.Shift = function(k) { return this.$val.Shift(k); }; + shouldRoundUp = function(a, nd) { + var _r, a, nd, x, x$1, x$2, x$3; + if (nd < 0 || nd >= a.nd) { + return false; + } + if (((x = a.d, ((nd < 0 || nd >= x.length) ? $throwRuntimeError("index out of range") : x[nd])) === 53) && ((nd + 1 >> 0) === a.nd)) { + if (a.trunc) { + return true; + } + return nd > 0 && !(((_r = (((x$1 = a.d, x$2 = nd - 1 >> 0, ((x$2 < 0 || x$2 >= x$1.length) ? $throwRuntimeError("index out of range") : x$1[x$2])) - 48 << 24 >>> 24)) % 2, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) === 0)); + } + return (x$3 = a.d, ((nd < 0 || nd >= x$3.length) ? $throwRuntimeError("index out of range") : x$3[nd])) >= 53; + }; + decimal.ptr.prototype.Round = function(nd) { + var a, nd; + a = this; + if (nd < 0 || nd >= a.nd) { + return; + } + if (shouldRoundUp(a, nd)) { + a.RoundUp(nd); + } else { + a.RoundDown(nd); + } + }; + decimal.prototype.Round = function(nd) { return this.$val.Round(nd); }; + decimal.ptr.prototype.RoundDown = function(nd) { + var a, nd; + a = this; + if (nd < 0 || nd >= a.nd) { + return; + } + a.nd = nd; + trim(a); + }; + decimal.prototype.RoundDown = function(nd) { return this.$val.RoundDown(nd); }; + decimal.ptr.prototype.RoundUp = function(nd) { + var a, c, i, nd, x, x$1, x$2; + a = this; + if (nd < 0 || nd >= a.nd) { + return; + } + i = nd - 1 >> 0; + while (true) { + if (!(i >= 0)) { break; } + c = (x = a.d, ((i < 0 || i >= x.length) ? $throwRuntimeError("index out of range") : x[i])); + if (c < 57) { + (x$2 = a.d, (i < 0 || i >= x$2.length) ? $throwRuntimeError("index out of range") : x$2[i] = (x$1 = a.d, ((i < 0 || i >= x$1.length) ? $throwRuntimeError("index out of range") : x$1[i])) + (1) << 24 >>> 24); + a.nd = i + 1 >> 0; + return; + } + i = i - (1) >> 0; + } + a.d[0] = 49; + a.nd = 1; + a.dp = a.dp + (1) >> 0; + }; + decimal.prototype.RoundUp = function(nd) { return this.$val.RoundUp(nd); }; + decimal.ptr.prototype.RoundedInteger = function() { + var a, i, n, x, x$1, x$2, x$3; + a = this; + if (a.dp > 20) { + return new $Uint64(4294967295, 4294967295); + } + i = 0; + n = new $Uint64(0, 0); + i = 0; + while (true) { + if (!(i < a.dp && i < a.nd)) { break; } + n = (x = $mul64(n, new $Uint64(0, 10)), x$1 = new $Uint64(0, ((x$2 = a.d, ((i < 0 || i >= x$2.length) ? $throwRuntimeError("index out of range") : x$2[i])) - 48 << 24 >>> 24)), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); + i = i + (1) >> 0; + } + while (true) { + if (!(i < a.dp)) { break; } + n = $mul64(n, (new $Uint64(0, 10))); + i = i + (1) >> 0; + } + if (shouldRoundUp(a, a.dp)) { + n = (x$3 = new $Uint64(0, 1), new $Uint64(n.$high + x$3.$high, n.$low + x$3.$low)); + } + return n; + }; + decimal.prototype.RoundedInteger = function() { return this.$val.RoundedInteger(); }; + extFloat.ptr.prototype.AssignComputeBounds = function(mant, exp, neg, flt) { + var _tmp, _tmp$1, exp, expBiased, f, flt, lower = new extFloat.ptr(), mant, neg, upper = new extFloat.ptr(), x, x$1, x$2, x$3, x$4; + f = this; + f.mant = mant; + f.exp = exp - (flt.mantbits >> 0) >> 0; + f.neg = neg; + if (f.exp <= 0 && (x = $shiftLeft64(($shiftRightUint64(mant, (-f.exp >>> 0))), (-f.exp >>> 0)), (mant.$high === x.$high && mant.$low === x.$low))) { + f.mant = $shiftRightUint64(f.mant, ((-f.exp >>> 0))); + f.exp = 0; + _tmp = $clone(f, extFloat); _tmp$1 = $clone(f, extFloat); $copy(lower, _tmp, extFloat); $copy(upper, _tmp$1, extFloat); + return [lower, upper]; + } + expBiased = exp - flt.bias >> 0; + $copy(upper, new extFloat.ptr((x$1 = $mul64(new $Uint64(0, 2), f.mant), new $Uint64(x$1.$high + 0, x$1.$low + 1)), f.exp - 1 >> 0, f.neg), extFloat); + if (!((x$2 = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), (mant.$high === x$2.$high && mant.$low === x$2.$low))) || (expBiased === 1)) { + $copy(lower, new extFloat.ptr((x$3 = $mul64(new $Uint64(0, 2), f.mant), new $Uint64(x$3.$high - 0, x$3.$low - 1)), f.exp - 1 >> 0, f.neg), extFloat); + } else { + $copy(lower, new extFloat.ptr((x$4 = $mul64(new $Uint64(0, 4), f.mant), new $Uint64(x$4.$high - 0, x$4.$low - 1)), f.exp - 2 >> 0, f.neg), extFloat); + } + return [lower, upper]; + }; + extFloat.prototype.AssignComputeBounds = function(mant, exp, neg, flt) { return this.$val.AssignComputeBounds(mant, exp, neg, flt); }; + extFloat.ptr.prototype.Normalize = function() { + var _tmp, _tmp$1, _tmp$2, _tmp$3, exp, f, mant, shift = 0, x, x$1, x$2, x$3, x$4, x$5; + f = this; + _tmp = f.mant; _tmp$1 = f.exp; mant = _tmp; exp = _tmp$1; + if ((mant.$high === 0 && mant.$low === 0)) { + shift = 0; + return shift; + } + if ((x = $shiftRightUint64(mant, 32), (x.$high === 0 && x.$low === 0))) { + mant = $shiftLeft64(mant, (32)); + exp = exp - (32) >> 0; + } + if ((x$1 = $shiftRightUint64(mant, 48), (x$1.$high === 0 && x$1.$low === 0))) { + mant = $shiftLeft64(mant, (16)); + exp = exp - (16) >> 0; + } + if ((x$2 = $shiftRightUint64(mant, 56), (x$2.$high === 0 && x$2.$low === 0))) { + mant = $shiftLeft64(mant, (8)); + exp = exp - (8) >> 0; + } + if ((x$3 = $shiftRightUint64(mant, 60), (x$3.$high === 0 && x$3.$low === 0))) { + mant = $shiftLeft64(mant, (4)); + exp = exp - (4) >> 0; + } + if ((x$4 = $shiftRightUint64(mant, 62), (x$4.$high === 0 && x$4.$low === 0))) { + mant = $shiftLeft64(mant, (2)); + exp = exp - (2) >> 0; + } + if ((x$5 = $shiftRightUint64(mant, 63), (x$5.$high === 0 && x$5.$low === 0))) { + mant = $shiftLeft64(mant, (1)); + exp = exp - (1) >> 0; + } + shift = ((f.exp - exp >> 0) >>> 0); + _tmp$2 = mant; _tmp$3 = exp; f.mant = _tmp$2; f.exp = _tmp$3; + return shift; + }; + extFloat.prototype.Normalize = function() { return this.$val.Normalize(); }; + extFloat.ptr.prototype.Multiply = function(g) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, cross1, cross2, f, fhi, flo, g, ghi, glo, rem, x, x$1, x$10, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + f = this; + g = $clone(g, extFloat); + _tmp = $shiftRightUint64(f.mant, 32); _tmp$1 = new $Uint64(0, (f.mant.$low >>> 0)); fhi = _tmp; flo = _tmp$1; + _tmp$2 = $shiftRightUint64(g.mant, 32); _tmp$3 = new $Uint64(0, (g.mant.$low >>> 0)); ghi = _tmp$2; glo = _tmp$3; + cross1 = $mul64(fhi, glo); + cross2 = $mul64(flo, ghi); + f.mant = (x = (x$1 = $mul64(fhi, ghi), x$2 = $shiftRightUint64(cross1, 32), new $Uint64(x$1.$high + x$2.$high, x$1.$low + x$2.$low)), x$3 = $shiftRightUint64(cross2, 32), new $Uint64(x.$high + x$3.$high, x.$low + x$3.$low)); + rem = (x$4 = (x$5 = new $Uint64(0, (cross1.$low >>> 0)), x$6 = new $Uint64(0, (cross2.$low >>> 0)), new $Uint64(x$5.$high + x$6.$high, x$5.$low + x$6.$low)), x$7 = $shiftRightUint64(($mul64(flo, glo)), 32), new $Uint64(x$4.$high + x$7.$high, x$4.$low + x$7.$low)); + rem = (x$8 = new $Uint64(0, 2147483648), new $Uint64(rem.$high + x$8.$high, rem.$low + x$8.$low)); + f.mant = (x$9 = f.mant, x$10 = ($shiftRightUint64(rem, 32)), new $Uint64(x$9.$high + x$10.$high, x$9.$low + x$10.$low)); + f.exp = (f.exp + g.exp >> 0) + 64 >> 0; + }; + extFloat.prototype.Multiply = function(g) { return this.$val.Multiply(g); }; + extFloat.ptr.prototype.AssignDecimal = function(mantissa, exp10, neg, trunc, flt) { + var _q, _r, adjExp, denormalExp, errors$1, exp10, extrabits, f, flt, halfway, i, mant_extra, mantissa, neg, ok = false, shift, trunc, x, x$1, x$10, x$11, x$12, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, y; + f = this; + errors$1 = 0; + if (trunc) { + errors$1 = errors$1 + (4) >> 0; + } + f.mant = mantissa; + f.exp = 0; + f.neg = neg; + i = (_q = ((exp10 - -348 >> 0)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + if (exp10 < -348 || i >= 87) { + ok = false; + return ok; + } + adjExp = (_r = ((exp10 - -348 >> 0)) % 8, _r === _r ? _r : $throwRuntimeError("integer divide by zero")); + if (adjExp < 19 && (x = (x$1 = 19 - adjExp >> 0, ((x$1 < 0 || x$1 >= uint64pow10.length) ? $throwRuntimeError("index out of range") : uint64pow10[x$1])), (mantissa.$high < x.$high || (mantissa.$high === x.$high && mantissa.$low < x.$low)))) { + f.mant = $mul64(f.mant, (((adjExp < 0 || adjExp >= uint64pow10.length) ? $throwRuntimeError("index out of range") : uint64pow10[adjExp]))); + f.Normalize(); + } else { + f.Normalize(); + f.Multiply(((adjExp < 0 || adjExp >= smallPowersOfTen.length) ? $throwRuntimeError("index out of range") : smallPowersOfTen[adjExp])); + errors$1 = errors$1 + (4) >> 0; + } + f.Multiply(((i < 0 || i >= powersOfTen.length) ? $throwRuntimeError("index out of range") : powersOfTen[i])); + if (errors$1 > 0) { + errors$1 = errors$1 + (1) >> 0; + } + errors$1 = errors$1 + (4) >> 0; + shift = f.Normalize(); + errors$1 = (y = (shift), y < 32 ? (errors$1 << y) : 0) >> 0; + denormalExp = flt.bias - 63 >> 0; + extrabits = 0; + if (f.exp <= denormalExp) { + extrabits = (((63 - flt.mantbits >>> 0) + 1 >>> 0) + ((denormalExp - f.exp >> 0) >>> 0) >>> 0); + } else { + extrabits = (63 - flt.mantbits >>> 0); + } + halfway = $shiftLeft64(new $Uint64(0, 1), ((extrabits - 1 >>> 0))); + mant_extra = (x$2 = f.mant, x$3 = (x$4 = $shiftLeft64(new $Uint64(0, 1), extrabits), new $Uint64(x$4.$high - 0, x$4.$low - 1)), new $Uint64(x$2.$high & x$3.$high, (x$2.$low & x$3.$low) >>> 0)); + if ((x$5 = (x$6 = new $Int64(halfway.$high, halfway.$low), x$7 = new $Int64(0, errors$1), new $Int64(x$6.$high - x$7.$high, x$6.$low - x$7.$low)), x$8 = new $Int64(mant_extra.$high, mant_extra.$low), (x$5.$high < x$8.$high || (x$5.$high === x$8.$high && x$5.$low < x$8.$low))) && (x$9 = new $Int64(mant_extra.$high, mant_extra.$low), x$10 = (x$11 = new $Int64(halfway.$high, halfway.$low), x$12 = new $Int64(0, errors$1), new $Int64(x$11.$high + x$12.$high, x$11.$low + x$12.$low)), (x$9.$high < x$10.$high || (x$9.$high === x$10.$high && x$9.$low < x$10.$low)))) { + ok = false; + return ok; + } + ok = true; + return ok; + }; + extFloat.prototype.AssignDecimal = function(mantissa, exp10, neg, trunc, flt) { return this.$val.AssignDecimal(mantissa, exp10, neg, trunc, flt); }; + extFloat.ptr.prototype.frexp10 = function() { + var _q, _q$1, _tmp, _tmp$1, approxExp10, exp, exp10 = 0, f, i, index = 0; + f = this; + approxExp10 = (_q = (((-46 - f.exp >> 0)) * 28 >> 0) / 93, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + i = (_q$1 = ((approxExp10 - -348 >> 0)) / 8, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")); + Loop: + while (true) { + if (!(true)) { break; } + exp = (f.exp + ((i < 0 || i >= powersOfTen.length) ? $throwRuntimeError("index out of range") : powersOfTen[i]).exp >> 0) + 64 >> 0; + if (exp < -60) { + i = i + (1) >> 0; + } else if (exp > -32) { + i = i - (1) >> 0; + } else { + break Loop; + } + } + f.Multiply(((i < 0 || i >= powersOfTen.length) ? $throwRuntimeError("index out of range") : powersOfTen[i])); + _tmp = -((-348 + (i * 8 >> 0) >> 0)); _tmp$1 = i; exp10 = _tmp; index = _tmp$1; + return [exp10, index]; + }; + extFloat.prototype.frexp10 = function() { return this.$val.frexp10(); }; + frexp10Many = function(a, b, c) { + var _tuple, a, b, c, exp10 = 0, i; + _tuple = c.frexp10(); exp10 = _tuple[0]; i = _tuple[1]; + a.Multiply(((i < 0 || i >= powersOfTen.length) ? $throwRuntimeError("index out of range") : powersOfTen[i])); + b.Multiply(((i < 0 || i >= powersOfTen.length) ? $throwRuntimeError("index out of range") : powersOfTen[i])); + return exp10; + }; + extFloat.ptr.prototype.FixedDecimal = function(d, n) { + var _q, _q$1, _tmp, _tmp$1, _tuple, buf, d, digit, exp10, f, fraction, i, i$1, i$2, integer, integerDigits, n, nd, needed, nonAsciiName, ok, pos, pow, pow10, rest, shift, v, v1, x, x$1, x$10, x$11, x$12, x$13, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + f = this; + if ((x = f.mant, (x.$high === 0 && x.$low === 0))) { + d.nd = 0; + d.dp = 0; + d.neg = f.neg; + return true; + } + if (n === 0) { + $panic(new $String("strconv: internal error: extFloat.FixedDecimal called with n == 0")); + } + f.Normalize(); + _tuple = f.frexp10(); exp10 = _tuple[0]; + shift = (-f.exp >>> 0); + integer = ($shiftRightUint64(f.mant, shift).$low >>> 0); + fraction = (x$1 = f.mant, x$2 = $shiftLeft64(new $Uint64(0, integer), shift), new $Uint64(x$1.$high - x$2.$high, x$1.$low - x$2.$low)); + nonAsciiName = new $Uint64(0, 1); + needed = n; + integerDigits = 0; + pow10 = new $Uint64(0, 1); + _tmp = 0; _tmp$1 = new $Uint64(0, 1); i = _tmp; pow = _tmp$1; + while (true) { + if (!(i < 20)) { break; } + if ((x$3 = new $Uint64(0, integer), (pow.$high > x$3.$high || (pow.$high === x$3.$high && pow.$low > x$3.$low)))) { + integerDigits = i; + break; + } + pow = $mul64(pow, (new $Uint64(0, 10))); + i = i + (1) >> 0; + } + rest = integer; + if (integerDigits > needed) { + pow10 = (x$4 = integerDigits - needed >> 0, ((x$4 < 0 || x$4 >= uint64pow10.length) ? $throwRuntimeError("index out of range") : uint64pow10[x$4])); + integer = (_q = integer / ((pow10.$low >>> 0)), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); + rest = rest - ((x$5 = (pow10.$low >>> 0), (((integer >>> 16 << 16) * x$5 >>> 0) + (integer << 16 >>> 16) * x$5) >>> 0)) >>> 0; + } else { + rest = 0; + } + buf = $clone(arrayType$1.zero(), arrayType$1); + pos = 32; + v = integer; + while (true) { + if (!(v > 0)) { break; } + v1 = (_q$1 = v / 10, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >>> 0 : $throwRuntimeError("integer divide by zero")); + v = v - (((((10 >>> 16 << 16) * v1 >>> 0) + (10 << 16 >>> 16) * v1) >>> 0)) >>> 0; + pos = pos - (1) >> 0; + (pos < 0 || pos >= buf.length) ? $throwRuntimeError("index out of range") : buf[pos] = ((v + 48 >>> 0) << 24 >>> 24); + v = v1; + } + i$1 = pos; + while (true) { + if (!(i$1 < 32)) { break; } + (x$6 = d.d, x$7 = i$1 - pos >> 0, (x$7 < 0 || x$7 >= x$6.$length) ? $throwRuntimeError("index out of range") : x$6.$array[x$6.$offset + x$7] = ((i$1 < 0 || i$1 >= buf.length) ? $throwRuntimeError("index out of range") : buf[i$1])); + i$1 = i$1 + (1) >> 0; + } + nd = 32 - pos >> 0; + d.nd = nd; + d.dp = integerDigits + exp10 >> 0; + needed = needed - (nd) >> 0; + if (needed > 0) { + if (!((rest === 0)) || !((pow10.$high === 0 && pow10.$low === 1))) { + $panic(new $String("strconv: internal error, rest != 0 but needed > 0")); + } + while (true) { + if (!(needed > 0)) { break; } + fraction = $mul64(fraction, (new $Uint64(0, 10))); + nonAsciiName = $mul64(nonAsciiName, (new $Uint64(0, 10))); + if ((x$8 = $mul64(new $Uint64(0, 2), nonAsciiName), x$9 = $shiftLeft64(new $Uint64(0, 1), shift), (x$8.$high > x$9.$high || (x$8.$high === x$9.$high && x$8.$low > x$9.$low)))) { + return false; + } + digit = $shiftRightUint64(fraction, shift); + (x$10 = d.d, (nd < 0 || nd >= x$10.$length) ? $throwRuntimeError("index out of range") : x$10.$array[x$10.$offset + nd] = (new $Uint64(digit.$high + 0, digit.$low + 48).$low << 24 >>> 24)); + fraction = (x$11 = $shiftLeft64(digit, shift), new $Uint64(fraction.$high - x$11.$high, fraction.$low - x$11.$low)); + nd = nd + (1) >> 0; + needed = needed - (1) >> 0; + } + d.nd = nd; + } + ok = adjustLastDigitFixed(d, (x$12 = $shiftLeft64(new $Uint64(0, rest), shift), new $Uint64(x$12.$high | fraction.$high, (x$12.$low | fraction.$low) >>> 0)), pow10, shift, nonAsciiName); + if (!ok) { + return false; + } + i$2 = d.nd - 1 >> 0; + while (true) { + if (!(i$2 >= 0)) { break; } + if (!(((x$13 = d.d, ((i$2 < 0 || i$2 >= x$13.$length) ? $throwRuntimeError("index out of range") : x$13.$array[x$13.$offset + i$2])) === 48))) { + d.nd = i$2 + 1 >> 0; + break; + } + i$2 = i$2 - (1) >> 0; + } + return true; + }; + extFloat.prototype.FixedDecimal = function(d, n) { return this.$val.FixedDecimal(d, n); }; + adjustLastDigitFixed = function(d, num, den, shift, nonAsciiName) { + var d, den, i, nonAsciiName, num, shift, x, x$1, x$10, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + if ((x = $shiftLeft64(den, shift), (num.$high > x.$high || (num.$high === x.$high && num.$low > x.$low)))) { + $panic(new $String("strconv: num > den< x$2.$high || (x$1.$high === x$2.$high && x$1.$low > x$2.$low)))) { + $panic(new $String("strconv: \xCE\xB5 > (den< x$6.$high || (x$5.$high === x$6.$high && x$5.$low > x$6.$low)))) { + i = d.nd - 1 >> 0; + while (true) { + if (!(i >= 0)) { break; } + if ((x$7 = d.d, ((i < 0 || i >= x$7.$length) ? $throwRuntimeError("index out of range") : x$7.$array[x$7.$offset + i])) === 57) { + d.nd = d.nd - (1) >> 0; + } else { + break; + } + i = i - (1) >> 0; + } + if (i < 0) { + (x$8 = d.d, (0 < 0 || 0 >= x$8.$length) ? $throwRuntimeError("index out of range") : x$8.$array[x$8.$offset + 0] = 49); + d.nd = 1; + d.dp = d.dp + (1) >> 0; + } else { + (x$10 = d.d, (i < 0 || i >= x$10.$length) ? $throwRuntimeError("index out of range") : x$10.$array[x$10.$offset + i] = (x$9 = d.d, ((i < 0 || i >= x$9.$length) ? $throwRuntimeError("index out of range") : x$9.$array[x$9.$offset + i])) + (1) << 24 >>> 24); + } + return true; + } + return false; + }; + extFloat.ptr.prototype.ShortestDecimal = function(d, lower, upper) { + var _q, _tmp, _tmp$1, _tmp$2, _tmp$3, allowance, buf, currentDiff, d, digit, digit$1, exp10, f, fraction, i, i$1, i$2, integer, integerDigits, lower, multiplier, n, nd, pow, pow$1, shift, targetDiff, upper, v, v1, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + f = this; + if ((x = f.mant, (x.$high === 0 && x.$low === 0))) { + d.nd = 0; + d.dp = 0; + d.neg = f.neg; + return true; + } + if ((f.exp === 0) && $equal(lower, f, extFloat) && $equal(lower, upper, extFloat)) { + buf = $clone(arrayType.zero(), arrayType); + n = 23; + v = f.mant; + while (true) { + if (!((v.$high > 0 || (v.$high === 0 && v.$low > 0)))) { break; } + v1 = $div64(v, new $Uint64(0, 10), false); + v = (x$1 = $mul64(new $Uint64(0, 10), v1), new $Uint64(v.$high - x$1.$high, v.$low - x$1.$low)); + (n < 0 || n >= buf.length) ? $throwRuntimeError("index out of range") : buf[n] = (new $Uint64(v.$high + 0, v.$low + 48).$low << 24 >>> 24); + n = n - (1) >> 0; + v = v1; + } + nd = (24 - n >> 0) - 1 >> 0; + i = 0; + while (true) { + if (!(i < nd)) { break; } + (x$3 = d.d, (i < 0 || i >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + i] = (x$2 = (n + 1 >> 0) + i >> 0, ((x$2 < 0 || x$2 >= buf.length) ? $throwRuntimeError("index out of range") : buf[x$2]))); + i = i + (1) >> 0; + } + _tmp = nd; _tmp$1 = nd; d.nd = _tmp; d.dp = _tmp$1; + while (true) { + if (!(d.nd > 0 && ((x$4 = d.d, x$5 = d.nd - 1 >> 0, ((x$5 < 0 || x$5 >= x$4.$length) ? $throwRuntimeError("index out of range") : x$4.$array[x$4.$offset + x$5])) === 48))) { break; } + d.nd = d.nd - (1) >> 0; + } + if (d.nd === 0) { + d.dp = 0; + } + d.neg = f.neg; + return true; + } + upper.Normalize(); + if (f.exp > upper.exp) { + f.mant = $shiftLeft64(f.mant, (((f.exp - upper.exp >> 0) >>> 0))); + f.exp = upper.exp; + } + if (lower.exp > upper.exp) { + lower.mant = $shiftLeft64(lower.mant, (((lower.exp - upper.exp >> 0) >>> 0))); + lower.exp = upper.exp; + } + exp10 = frexp10Many(lower, f, upper); + upper.mant = (x$6 = upper.mant, x$7 = new $Uint64(0, 1), new $Uint64(x$6.$high + x$7.$high, x$6.$low + x$7.$low)); + lower.mant = (x$8 = lower.mant, x$9 = new $Uint64(0, 1), new $Uint64(x$8.$high - x$9.$high, x$8.$low - x$9.$low)); + shift = (-upper.exp >>> 0); + integer = ($shiftRightUint64(upper.mant, shift).$low >>> 0); + fraction = (x$10 = upper.mant, x$11 = $shiftLeft64(new $Uint64(0, integer), shift), new $Uint64(x$10.$high - x$11.$high, x$10.$low - x$11.$low)); + allowance = (x$12 = upper.mant, x$13 = lower.mant, new $Uint64(x$12.$high - x$13.$high, x$12.$low - x$13.$low)); + targetDiff = (x$14 = upper.mant, x$15 = f.mant, new $Uint64(x$14.$high - x$15.$high, x$14.$low - x$15.$low)); + integerDigits = 0; + _tmp$2 = 0; _tmp$3 = new $Uint64(0, 1); i$1 = _tmp$2; pow = _tmp$3; + while (true) { + if (!(i$1 < 20)) { break; } + if ((x$16 = new $Uint64(0, integer), (pow.$high > x$16.$high || (pow.$high === x$16.$high && pow.$low > x$16.$low)))) { + integerDigits = i$1; + break; + } + pow = $mul64(pow, (new $Uint64(0, 10))); + i$1 = i$1 + (1) >> 0; + } + i$2 = 0; + while (true) { + if (!(i$2 < integerDigits)) { break; } + pow$1 = (x$17 = (integerDigits - i$2 >> 0) - 1 >> 0, ((x$17 < 0 || x$17 >= uint64pow10.length) ? $throwRuntimeError("index out of range") : uint64pow10[x$17])); + digit = (_q = integer / (pow$1.$low >>> 0), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); + (x$18 = d.d, (i$2 < 0 || i$2 >= x$18.$length) ? $throwRuntimeError("index out of range") : x$18.$array[x$18.$offset + i$2] = ((digit + 48 >>> 0) << 24 >>> 24)); + integer = integer - ((x$19 = (pow$1.$low >>> 0), (((digit >>> 16 << 16) * x$19 >>> 0) + (digit << 16 >>> 16) * x$19) >>> 0)) >>> 0; + currentDiff = (x$20 = $shiftLeft64(new $Uint64(0, integer), shift), new $Uint64(x$20.$high + fraction.$high, x$20.$low + fraction.$low)); + if ((currentDiff.$high < allowance.$high || (currentDiff.$high === allowance.$high && currentDiff.$low < allowance.$low))) { + d.nd = i$2 + 1 >> 0; + d.dp = integerDigits + exp10 >> 0; + d.neg = f.neg; + return adjustLastDigit(d, currentDiff, targetDiff, allowance, $shiftLeft64(pow$1, shift), new $Uint64(0, 2)); + } + i$2 = i$2 + (1) >> 0; + } + d.nd = integerDigits; + d.dp = d.nd + exp10 >> 0; + d.neg = f.neg; + digit$1 = 0; + multiplier = new $Uint64(0, 1); + while (true) { + if (!(true)) { break; } + fraction = $mul64(fraction, (new $Uint64(0, 10))); + multiplier = $mul64(multiplier, (new $Uint64(0, 10))); + digit$1 = ($shiftRightUint64(fraction, shift).$low >> 0); + (x$21 = d.d, x$22 = d.nd, (x$22 < 0 || x$22 >= x$21.$length) ? $throwRuntimeError("index out of range") : x$21.$array[x$21.$offset + x$22] = ((digit$1 + 48 >> 0) << 24 >>> 24)); + d.nd = d.nd + (1) >> 0; + fraction = (x$23 = $shiftLeft64(new $Uint64(0, digit$1), shift), new $Uint64(fraction.$high - x$23.$high, fraction.$low - x$23.$low)); + if ((x$24 = $mul64(allowance, multiplier), (fraction.$high < x$24.$high || (fraction.$high === x$24.$high && fraction.$low < x$24.$low)))) { + return adjustLastDigit(d, fraction, $mul64(targetDiff, multiplier), $mul64(allowance, multiplier), $shiftLeft64(new $Uint64(0, 1), shift), $mul64(multiplier, new $Uint64(0, 2))); + } + } + }; + extFloat.prototype.ShortestDecimal = function(d, lower, upper) { return this.$val.ShortestDecimal(d, lower, upper); }; + adjustLastDigit = function(d, currentDiff, targetDiff, maxDiff, ulpDecimal, ulpBinary) { + var _index, currentDiff, d, maxDiff, targetDiff, ulpBinary, ulpDecimal, x, x$1, x$10, x$11, x$12, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + if ((x = $mul64(new $Uint64(0, 2), ulpBinary), (ulpDecimal.$high < x.$high || (ulpDecimal.$high === x.$high && ulpDecimal.$low < x.$low)))) { + return false; + } + while (true) { + if (!((x$1 = (x$2 = (x$3 = $div64(ulpDecimal, new $Uint64(0, 2), false), new $Uint64(currentDiff.$high + x$3.$high, currentDiff.$low + x$3.$low)), new $Uint64(x$2.$high + ulpBinary.$high, x$2.$low + ulpBinary.$low)), (x$1.$high < targetDiff.$high || (x$1.$high === targetDiff.$high && x$1.$low < targetDiff.$low))))) { break; } + _index = d.nd - 1 >> 0; + (x$5 = d.d, (_index < 0 || _index >= x$5.$length) ? $throwRuntimeError("index out of range") : x$5.$array[x$5.$offset + _index] = (x$4 = d.d, ((_index < 0 || _index >= x$4.$length) ? $throwRuntimeError("index out of range") : x$4.$array[x$4.$offset + _index])) - (1) << 24 >>> 24); + currentDiff = (x$6 = ulpDecimal, new $Uint64(currentDiff.$high + x$6.$high, currentDiff.$low + x$6.$low)); + } + if ((x$7 = new $Uint64(currentDiff.$high + ulpDecimal.$high, currentDiff.$low + ulpDecimal.$low), x$8 = (x$9 = (x$10 = $div64(ulpDecimal, new $Uint64(0, 2), false), new $Uint64(targetDiff.$high + x$10.$high, targetDiff.$low + x$10.$low)), new $Uint64(x$9.$high + ulpBinary.$high, x$9.$low + ulpBinary.$low)), (x$7.$high < x$8.$high || (x$7.$high === x$8.$high && x$7.$low <= x$8.$low)))) { + return false; + } + if ((currentDiff.$high < ulpBinary.$high || (currentDiff.$high === ulpBinary.$high && currentDiff.$low < ulpBinary.$low)) || (x$11 = new $Uint64(maxDiff.$high - ulpBinary.$high, maxDiff.$low - ulpBinary.$low), (currentDiff.$high > x$11.$high || (currentDiff.$high === x$11.$high && currentDiff.$low > x$11.$low)))) { + return false; + } + if ((d.nd === 1) && ((x$12 = d.d, ((0 < 0 || 0 >= x$12.$length) ? $throwRuntimeError("index out of range") : x$12.$array[x$12.$offset + 0])) === 48)) { + d.nd = 0; + d.dp = 0; + } + return true; + }; + AppendFloat = $pkg.AppendFloat = function(dst, f, fmt, prec, bitSize) { + var bitSize, dst, f, fmt, prec; + return genericFtoa(dst, f, fmt, prec, bitSize); + }; + genericFtoa = function(dst, val, fmt, prec, bitSize) { + var _ref, _ref$1, _ref$2, _ref$3, _tuple, bitSize, bits, buf, buf$1, digits, digs, dst, exp, f, f$1, flt, fmt, lower, mant, neg, ok, prec, s, shortest, upper, val, x, x$1, x$2, x$3, y, y$1; + bits = new $Uint64(0, 0); + flt = ptrType$1.nil; + _ref = bitSize; + if (_ref === 32) { + bits = new $Uint64(0, math.Float32bits(val)); + flt = float32info; + } else if (_ref === 64) { + bits = math.Float64bits(val); + flt = float64info; + } else { + $panic(new $String("strconv: illegal AppendFloat/FormatFloat bitSize")); + } + neg = !((x = $shiftRightUint64(bits, ((flt.expbits + flt.mantbits >>> 0))), (x.$high === 0 && x.$low === 0))); + exp = ($shiftRightUint64(bits, flt.mantbits).$low >> 0) & ((((y = flt.expbits, y < 32 ? (1 << y) : 0) >> 0) - 1 >> 0)); + mant = (x$1 = (x$2 = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), new $Uint64(x$2.$high - 0, x$2.$low - 1)), new $Uint64(bits.$high & x$1.$high, (bits.$low & x$1.$low) >>> 0)); + _ref$1 = exp; + if (_ref$1 === (((y$1 = flt.expbits, y$1 < 32 ? (1 << y$1) : 0) >> 0) - 1 >> 0)) { + s = ""; + if (!((mant.$high === 0 && mant.$low === 0))) { + s = "NaN"; + } else if (neg) { + s = "-Inf"; + } else { + s = "+Inf"; + } + return $appendSlice(dst, new sliceType$6($stringToBytes(s))); + } else if (_ref$1 === 0) { + exp = exp + (1) >> 0; + } else { + mant = (x$3 = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), new $Uint64(mant.$high | x$3.$high, (mant.$low | x$3.$low) >>> 0)); + } + exp = exp + (flt.bias) >> 0; + if (fmt === 98) { + return fmtB(dst, neg, mant, exp, flt); + } + if (!optimize) { + return bigFtoa(dst, prec, fmt, neg, mant, exp, flt); + } + digs = $clone(new decimalSlice.ptr(), decimalSlice); + ok = false; + shortest = prec < 0; + if (shortest) { + f = new extFloat.ptr(); + _tuple = f.AssignComputeBounds(mant, exp, neg, flt); lower = $clone(_tuple[0], extFloat); upper = $clone(_tuple[1], extFloat); + buf = $clone(arrayType$1.zero(), arrayType$1); + digs.d = new sliceType$6(buf); + ok = f.ShortestDecimal(digs, lower, upper); + if (!ok) { + return bigFtoa(dst, prec, fmt, neg, mant, exp, flt); + } + _ref$2 = fmt; + if (_ref$2 === 101 || _ref$2 === 69) { + prec = digs.nd - 1 >> 0; + } else if (_ref$2 === 102) { + prec = max(digs.nd - digs.dp >> 0, 0); + } else if (_ref$2 === 103 || _ref$2 === 71) { + prec = digs.nd; + } + } else if (!((fmt === 102))) { + digits = prec; + _ref$3 = fmt; + if (_ref$3 === 101 || _ref$3 === 69) { + digits = digits + (1) >> 0; + } else if (_ref$3 === 103 || _ref$3 === 71) { + if (prec === 0) { + prec = 1; + } + digits = prec; + } + if (digits <= 15) { + buf$1 = $clone(arrayType.zero(), arrayType); + digs.d = new sliceType$6(buf$1); + f$1 = new extFloat.ptr(mant, exp - (flt.mantbits >> 0) >> 0, neg); + ok = f$1.FixedDecimal(digs, digits); + } + } + if (!ok) { + return bigFtoa(dst, prec, fmt, neg, mant, exp, flt); + } + return formatDigits(dst, shortest, neg, digs, prec, fmt); + }; + bigFtoa = function(dst, prec, fmt, neg, mant, exp, flt) { + var _ref, _ref$1, d, digs, dst, exp, flt, fmt, mant, neg, prec, shortest; + d = new decimal.ptr(); + d.Assign(mant); + d.Shift(exp - (flt.mantbits >> 0) >> 0); + digs = $clone(new decimalSlice.ptr(), decimalSlice); + shortest = prec < 0; + if (shortest) { + roundShortest(d, mant, exp, flt); + $copy(digs, new decimalSlice.ptr(new sliceType$6(d.d), d.nd, d.dp, false), decimalSlice); + _ref = fmt; + if (_ref === 101 || _ref === 69) { + prec = digs.nd - 1 >> 0; + } else if (_ref === 102) { + prec = max(digs.nd - digs.dp >> 0, 0); + } else if (_ref === 103 || _ref === 71) { + prec = digs.nd; + } + } else { + _ref$1 = fmt; + if (_ref$1 === 101 || _ref$1 === 69) { + d.Round(prec + 1 >> 0); + } else if (_ref$1 === 102) { + d.Round(d.dp + prec >> 0); + } else if (_ref$1 === 103 || _ref$1 === 71) { + if (prec === 0) { + prec = 1; + } + d.Round(prec); + } + $copy(digs, new decimalSlice.ptr(new sliceType$6(d.d), d.nd, d.dp, false), decimalSlice); + } + return formatDigits(dst, shortest, neg, digs, prec, fmt); + }; + formatDigits = function(dst, shortest, neg, digs, prec, fmt) { + var _ref, digs, dst, eprec, exp, fmt, neg, prec, shortest; + digs = $clone(digs, decimalSlice); + _ref = fmt; + if (_ref === 101 || _ref === 69) { + return fmtE(dst, neg, digs, prec, fmt); + } else if (_ref === 102) { + return fmtF(dst, neg, digs, prec); + } else if (_ref === 103 || _ref === 71) { + eprec = prec; + if (eprec > digs.nd && digs.nd >= digs.dp) { + eprec = digs.nd; + } + if (shortest) { + eprec = 6; + } + exp = digs.dp - 1 >> 0; + if (exp < -4 || exp >= eprec) { + if (prec > digs.nd) { + prec = digs.nd; + } + return fmtE(dst, neg, digs, prec - 1 >> 0, (fmt + 101 << 24 >>> 24) - 103 << 24 >>> 24); + } + if (prec > digs.dp) { + prec = digs.nd; + } + return fmtF(dst, neg, digs, max(prec - digs.dp >> 0, 0)); + } + return $append(dst, 37, fmt); + }; + roundShortest = function(d, mant, exp, flt) { + var _tmp, _tmp$1, _tmp$2, d, exp, explo, flt, i, inclusive, l, lower, m, mant, mantlo, minexp, okdown, okup, u, upper, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7; + if ((mant.$high === 0 && mant.$low === 0)) { + d.nd = 0; + return; + } + minexp = flt.bias + 1 >> 0; + if (exp > minexp && (332 * ((d.dp - d.nd >> 0)) >> 0) >= (100 * ((exp - (flt.mantbits >> 0) >> 0)) >> 0)) { + return; + } + upper = new decimal.ptr(); + upper.Assign((x = $mul64(mant, new $Uint64(0, 2)), new $Uint64(x.$high + 0, x.$low + 1))); + upper.Shift((exp - (flt.mantbits >> 0) >> 0) - 1 >> 0); + mantlo = new $Uint64(0, 0); + explo = 0; + if ((x$1 = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), (mant.$high > x$1.$high || (mant.$high === x$1.$high && mant.$low > x$1.$low))) || (exp === minexp)) { + mantlo = new $Uint64(mant.$high - 0, mant.$low - 1); + explo = exp; + } else { + mantlo = (x$2 = $mul64(mant, new $Uint64(0, 2)), new $Uint64(x$2.$high - 0, x$2.$low - 1)); + explo = exp - 1 >> 0; + } + lower = new decimal.ptr(); + lower.Assign((x$3 = $mul64(mantlo, new $Uint64(0, 2)), new $Uint64(x$3.$high + 0, x$3.$low + 1))); + lower.Shift((explo - (flt.mantbits >> 0) >> 0) - 1 >> 0); + inclusive = (x$4 = $div64(mant, new $Uint64(0, 2), true), (x$4.$high === 0 && x$4.$low === 0)); + i = 0; + while (true) { + if (!(i < d.nd)) { break; } + _tmp = 0; _tmp$1 = 0; _tmp$2 = 0; l = _tmp; m = _tmp$1; u = _tmp$2; + if (i < lower.nd) { + l = (x$5 = lower.d, ((i < 0 || i >= x$5.length) ? $throwRuntimeError("index out of range") : x$5[i])); + } else { + l = 48; + } + m = (x$6 = d.d, ((i < 0 || i >= x$6.length) ? $throwRuntimeError("index out of range") : x$6[i])); + if (i < upper.nd) { + u = (x$7 = upper.d, ((i < 0 || i >= x$7.length) ? $throwRuntimeError("index out of range") : x$7[i])); + } else { + u = 48; + } + okdown = !((l === m)) || (inclusive && (l === m) && ((i + 1 >> 0) === lower.nd)); + okup = !((m === u)) && (inclusive || (m + 1 << 24 >>> 24) < u || (i + 1 >> 0) < upper.nd); + if (okdown && okup) { + d.Round(i + 1 >> 0); + return; + } else if (okdown) { + d.RoundDown(i + 1 >> 0); + return; + } else if (okup) { + d.RoundUp(i + 1 >> 0); + return; + } + i = i + (1) >> 0; + } + }; + fmtE = function(dst, neg, d, prec, fmt) { + var _q, _r, _ref, buf, ch, d, dst, exp, fmt, i, i$1, m, neg, prec, x, x$1; + d = $clone(d, decimalSlice); + if (neg) { + dst = $append(dst, 45); + } + ch = 48; + if (!((d.nd === 0))) { + ch = (x = d.d, ((0 < 0 || 0 >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + 0])); + } + dst = $append(dst, ch); + if (prec > 0) { + dst = $append(dst, 46); + i = 1; + m = ((d.nd + prec >> 0) + 1 >> 0) - max(d.nd, prec + 1 >> 0) >> 0; + while (true) { + if (!(i < m)) { break; } + dst = $append(dst, (x$1 = d.d, ((i < 0 || i >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + i]))); + i = i + (1) >> 0; + } + while (true) { + if (!(i <= prec)) { break; } + dst = $append(dst, 48); + i = i + (1) >> 0; + } + } + dst = $append(dst, fmt); + exp = d.dp - 1 >> 0; + if (d.nd === 0) { + exp = 0; + } + if (exp < 0) { + ch = 45; + exp = -exp; + } else { + ch = 43; + } + dst = $append(dst, ch); + buf = $clone(arrayType$2.zero(), arrayType$2); + i$1 = 3; + while (true) { + if (!(exp >= 10)) { break; } + i$1 = i$1 - (1) >> 0; + (i$1 < 0 || i$1 >= buf.length) ? $throwRuntimeError("index out of range") : buf[i$1] = (((_r = exp % 10, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) + 48 >> 0) << 24 >>> 24); + exp = (_q = exp / (10), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + } + i$1 = i$1 - (1) >> 0; + (i$1 < 0 || i$1 >= buf.length) ? $throwRuntimeError("index out of range") : buf[i$1] = ((exp + 48 >> 0) << 24 >>> 24); + _ref = i$1; + if (_ref === 0) { + dst = $append(dst, buf[0], buf[1], buf[2]); + } else if (_ref === 1) { + dst = $append(dst, buf[1], buf[2]); + } else if (_ref === 2) { + dst = $append(dst, 48, buf[2]); + } + return dst; + }; + fmtF = function(dst, neg, d, prec) { + var ch, d, dst, i, i$1, j, neg, prec, x, x$1; + d = $clone(d, decimalSlice); + if (neg) { + dst = $append(dst, 45); + } + if (d.dp > 0) { + i = 0; + i = 0; + while (true) { + if (!(i < d.dp && i < d.nd)) { break; } + dst = $append(dst, (x = d.d, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i]))); + i = i + (1) >> 0; + } + while (true) { + if (!(i < d.dp)) { break; } + dst = $append(dst, 48); + i = i + (1) >> 0; + } + } else { + dst = $append(dst, 48); + } + if (prec > 0) { + dst = $append(dst, 46); + i$1 = 0; + while (true) { + if (!(i$1 < prec)) { break; } + ch = 48; + j = d.dp + i$1 >> 0; + if (0 <= j && j < d.nd) { + ch = (x$1 = d.d, ((j < 0 || j >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + j])); + } + dst = $append(dst, ch); + i$1 = i$1 + (1) >> 0; + } + } + return dst; + }; + fmtB = function(dst, neg, mant, exp, flt) { + var _q, _r, buf, dst, esign, exp, flt, mant, n, neg, w, x; + buf = $clone(arrayType$3.zero(), arrayType$3); + w = 50; + exp = exp - ((flt.mantbits >> 0)) >> 0; + esign = 43; + if (exp < 0) { + esign = 45; + exp = -exp; + } + n = 0; + while (true) { + if (!(exp > 0 || n < 1)) { break; } + n = n + (1) >> 0; + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = (((_r = exp % 10, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) + 48 >> 0) << 24 >>> 24); + exp = (_q = exp / (10), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); + } + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = esign; + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 112; + n = 0; + while (true) { + if (!((mant.$high > 0 || (mant.$high === 0 && mant.$low > 0)) || n < 1)) { break; } + n = n + (1) >> 0; + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = ((x = $div64(mant, new $Uint64(0, 10), true), new $Uint64(x.$high + 0, x.$low + 48)).$low << 24 >>> 24); + mant = $div64(mant, (new $Uint64(0, 10)), false); + } + if (neg) { + w = w - (1) >> 0; + (w < 0 || w >= buf.length) ? $throwRuntimeError("index out of range") : buf[w] = 45; + } + return $appendSlice(dst, $subslice(new sliceType$6(buf), w)); + }; + max = function(a, b) { + var a, b; + if (a > b) { + return a; + } + return b; + }; + FormatInt = $pkg.FormatInt = function(i, base) { + var _tuple, base, i, s; + _tuple = formatBits(sliceType$6.nil, new $Uint64(i.$high, i.$low), base, (i.$high < 0 || (i.$high === 0 && i.$low < 0)), false); s = _tuple[1]; + return s; + }; + Itoa = $pkg.Itoa = function(i) { + var i; + return FormatInt(new $Int64(0, i), 10); + }; + formatBits = function(dst, u, base, neg, append_) { + var a, append_, b, b$1, base, d = sliceType$6.nil, dst, i, j, m, neg, q, q$1, s = "", s$1, u, x, x$1, x$2, x$3; + if (base < 2 || base > 36) { + $panic(new $String("strconv: illegal AppendInt/FormatInt base")); + } + a = $clone(arrayType$4.zero(), arrayType$4); + i = 65; + if (neg) { + u = new $Uint64(-u.$high, -u.$low); + } + if (base === 10) { + while (true) { + if (!((u.$high > 0 || (u.$high === 0 && u.$low >= 100)))) { break; } + i = i - (2) >> 0; + q = $div64(u, new $Uint64(0, 100), false); + j = ((x = $mul64(q, new $Uint64(0, 100)), new $Uint64(u.$high - x.$high, u.$low - x.$low)).$low >>> 0); + (x$1 = i + 1 >> 0, (x$1 < 0 || x$1 >= a.length) ? $throwRuntimeError("index out of range") : a[x$1] = "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789".charCodeAt(j)); + (x$2 = i + 0 >> 0, (x$2 < 0 || x$2 >= a.length) ? $throwRuntimeError("index out of range") : a[x$2] = "0000000000111111111122222222223333333333444444444455555555556666666666777777777788888888889999999999".charCodeAt(j)); + u = q; + } + if ((u.$high > 0 || (u.$high === 0 && u.$low >= 10))) { + i = i - (1) >> 0; + q$1 = $div64(u, new $Uint64(0, 10), false); + (i < 0 || i >= a.length) ? $throwRuntimeError("index out of range") : a[i] = "0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt(((x$3 = $mul64(q$1, new $Uint64(0, 10)), new $Uint64(u.$high - x$3.$high, u.$low - x$3.$low)).$low >>> 0)); + u = q$1; + } + } else { + s$1 = ((base < 0 || base >= shifts.length) ? $throwRuntimeError("index out of range") : shifts[base]); + if (s$1 > 0) { + b = new $Uint64(0, base); + m = (b.$low >>> 0) - 1 >>> 0; + while (true) { + if (!((u.$high > b.$high || (u.$high === b.$high && u.$low >= b.$low)))) { break; } + i = i - (1) >> 0; + (i < 0 || i >= a.length) ? $throwRuntimeError("index out of range") : a[i] = "0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt((((u.$low >>> 0) & m) >>> 0)); + u = $shiftRightUint64(u, (s$1)); + } + } else { + b$1 = new $Uint64(0, base); + while (true) { + if (!((u.$high > b$1.$high || (u.$high === b$1.$high && u.$low >= b$1.$low)))) { break; } + i = i - (1) >> 0; + (i < 0 || i >= a.length) ? $throwRuntimeError("index out of range") : a[i] = "0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt(($div64(u, b$1, true).$low >>> 0)); + u = $div64(u, (b$1), false); + } + } + } + i = i - (1) >> 0; + (i < 0 || i >= a.length) ? $throwRuntimeError("index out of range") : a[i] = "0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt((u.$low >>> 0)); + if (neg) { + i = i - (1) >> 0; + (i < 0 || i >= a.length) ? $throwRuntimeError("index out of range") : a[i] = 45; + } + if (append_) { + d = $appendSlice(dst, $subslice(new sliceType$6(a), i)); + return [d, s]; + } + s = $bytesToString($subslice(new sliceType$6(a), i)); + return [d, s]; + }; + quoteWith = function(s, quote, ASCIIonly) { + var ASCIIonly, _q, _ref, _tuple, buf, n, quote, r, runeTmp, s, s$1, s$2, width; + runeTmp = $clone(arrayType$5.zero(), arrayType$5); + buf = $makeSlice(sliceType$6, 0, (_q = (3 * s.length >> 0) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))); + buf = $append(buf, quote); + width = 0; + while (true) { + if (!(s.length > 0)) { break; } + r = (s.charCodeAt(0) >> 0); + width = 1; + if (r >= 128) { + _tuple = utf8.DecodeRuneInString(s); r = _tuple[0]; width = _tuple[1]; + } + if ((width === 1) && (r === 65533)) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\x"))); + buf = $append(buf, "0123456789abcdef".charCodeAt((s.charCodeAt(0) >>> 4 << 24 >>> 24))); + buf = $append(buf, "0123456789abcdef".charCodeAt(((s.charCodeAt(0) & 15) >>> 0))); + s = s.substring(width); + continue; + } + if ((r === (quote >> 0)) || (r === 92)) { + buf = $append(buf, 92); + buf = $append(buf, (r << 24 >>> 24)); + s = s.substring(width); + continue; + } + if (ASCIIonly) { + if (r < 128 && IsPrint(r)) { + buf = $append(buf, (r << 24 >>> 24)); + s = s.substring(width); + continue; + } + } else if (IsPrint(r)) { + n = utf8.EncodeRune(new sliceType$6(runeTmp), r); + buf = $appendSlice(buf, $subslice(new sliceType$6(runeTmp), 0, n)); + s = s.substring(width); + continue; + } + _ref = r; + if (_ref === 7) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\a"))); + } else if (_ref === 8) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\b"))); + } else if (_ref === 12) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\f"))); + } else if (_ref === 10) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\n"))); + } else if (_ref === 13) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\r"))); + } else if (_ref === 9) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\t"))); + } else if (_ref === 11) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\v"))); + } else { + if (r < 32) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\x"))); + buf = $append(buf, "0123456789abcdef".charCodeAt((s.charCodeAt(0) >>> 4 << 24 >>> 24))); + buf = $append(buf, "0123456789abcdef".charCodeAt(((s.charCodeAt(0) & 15) >>> 0))); + } else if (r > 1114111) { + r = 65533; + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\u"))); + s$1 = 12; + while (true) { + if (!(s$1 >= 0)) { break; } + buf = $append(buf, "0123456789abcdef".charCodeAt((((r >> $min((s$1 >>> 0), 31)) >> 0) & 15))); + s$1 = s$1 - (4) >> 0; + } + } else if (r < 65536) { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\u"))); + s$1 = 12; + while (true) { + if (!(s$1 >= 0)) { break; } + buf = $append(buf, "0123456789abcdef".charCodeAt((((r >> $min((s$1 >>> 0), 31)) >> 0) & 15))); + s$1 = s$1 - (4) >> 0; + } + } else { + buf = $appendSlice(buf, new sliceType$6($stringToBytes("\\U"))); + s$2 = 28; + while (true) { + if (!(s$2 >= 0)) { break; } + buf = $append(buf, "0123456789abcdef".charCodeAt((((r >> $min((s$2 >>> 0), 31)) >> 0) & 15))); + s$2 = s$2 - (4) >> 0; + } + } + } + s = s.substring(width); + } + buf = $append(buf, quote); + return $bytesToString(buf); + }; + Quote = $pkg.Quote = function(s) { + var s; + return quoteWith(s, 34, false); + }; + QuoteToASCII = $pkg.QuoteToASCII = function(s) { + var s; + return quoteWith(s, 34, true); + }; + QuoteRune = $pkg.QuoteRune = function(r) { + var r; + return quoteWith($encodeRune(r), 39, false); + }; + AppendQuoteRune = $pkg.AppendQuoteRune = function(dst, r) { + var dst, r; + return $appendSlice(dst, new sliceType$6($stringToBytes(QuoteRune(r)))); + }; + QuoteRuneToASCII = $pkg.QuoteRuneToASCII = function(r) { + var r; + return quoteWith($encodeRune(r), 39, true); + }; + AppendQuoteRuneToASCII = $pkg.AppendQuoteRuneToASCII = function(dst, r) { + var dst, r; + return $appendSlice(dst, new sliceType$6($stringToBytes(QuoteRuneToASCII(r)))); + }; + CanBackquote = $pkg.CanBackquote = function(s) { + var _tuple, r, s, wid; + while (true) { + if (!(s.length > 0)) { break; } + _tuple = utf8.DecodeRuneInString(s); r = _tuple[0]; wid = _tuple[1]; + s = s.substring(wid); + if (wid > 1) { + if (r === 65279) { + return false; + } + continue; + } + if (r === 65533) { + return false; + } + if ((r < 32 && !((r === 9))) || (r === 96) || (r === 127)) { + return false; + } + } + return true; + }; + unhex = function(b) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, b, c, ok = false, v = 0; + c = (b >> 0); + if (48 <= c && c <= 57) { + _tmp = c - 48 >> 0; _tmp$1 = true; v = _tmp; ok = _tmp$1; + return [v, ok]; + } else if (97 <= c && c <= 102) { + _tmp$2 = (c - 97 >> 0) + 10 >> 0; _tmp$3 = true; v = _tmp$2; ok = _tmp$3; + return [v, ok]; + } else if (65 <= c && c <= 70) { + _tmp$4 = (c - 65 >> 0) + 10 >> 0; _tmp$5 = true; v = _tmp$4; ok = _tmp$5; + return [v, ok]; + } + return [v, ok]; + }; + UnquoteChar = $pkg.UnquoteChar = function(s, quote) { + var _ref, _ref$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, c, c$1, err = $ifaceNil, j, j$1, multibyte = false, n, ok, quote, r, s, size, tail = "", v, v$1, value = 0, x, x$1; + c = s.charCodeAt(0); + if ((c === quote) && ((quote === 39) || (quote === 34))) { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } else if (c >= 128) { + _tuple = utf8.DecodeRuneInString(s); r = _tuple[0]; size = _tuple[1]; + _tmp = r; _tmp$1 = true; _tmp$2 = s.substring(size); _tmp$3 = $ifaceNil; value = _tmp; multibyte = _tmp$1; tail = _tmp$2; err = _tmp$3; + return [value, multibyte, tail, err]; + } else if (!((c === 92))) { + _tmp$4 = (s.charCodeAt(0) >> 0); _tmp$5 = false; _tmp$6 = s.substring(1); _tmp$7 = $ifaceNil; value = _tmp$4; multibyte = _tmp$5; tail = _tmp$6; err = _tmp$7; + return [value, multibyte, tail, err]; + } + if (s.length <= 1) { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } + c$1 = s.charCodeAt(1); + s = s.substring(2); + _ref = c$1; + switch (0) { default: if (_ref === 97) { + value = 7; + } else if (_ref === 98) { + value = 8; + } else if (_ref === 102) { + value = 12; + } else if (_ref === 110) { + value = 10; + } else if (_ref === 114) { + value = 13; + } else if (_ref === 116) { + value = 9; + } else if (_ref === 118) { + value = 11; + } else if (_ref === 120 || _ref === 117 || _ref === 85) { + n = 0; + _ref$1 = c$1; + if (_ref$1 === 120) { + n = 2; + } else if (_ref$1 === 117) { + n = 4; + } else if (_ref$1 === 85) { + n = 8; + } + v = 0; + if (s.length < n) { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } + j = 0; + while (true) { + if (!(j < n)) { break; } + _tuple$1 = unhex(s.charCodeAt(j)); x = _tuple$1[0]; ok = _tuple$1[1]; + if (!ok) { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } + v = (v << 4 >> 0) | x; + j = j + (1) >> 0; + } + s = s.substring(n); + if (c$1 === 120) { + value = v; + break; + } + if (v > 1114111) { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } + value = v; + multibyte = true; + } else if (_ref === 48 || _ref === 49 || _ref === 50 || _ref === 51 || _ref === 52 || _ref === 53 || _ref === 54 || _ref === 55) { + v$1 = (c$1 >> 0) - 48 >> 0; + if (s.length < 2) { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } + j$1 = 0; + while (true) { + if (!(j$1 < 2)) { break; } + x$1 = (s.charCodeAt(j$1) >> 0) - 48 >> 0; + if (x$1 < 0 || x$1 > 7) { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } + v$1 = ((v$1 << 3 >> 0)) | x$1; + j$1 = j$1 + (1) >> 0; + } + s = s.substring(2); + if (v$1 > 255) { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } + value = v$1; + } else if (_ref === 92) { + value = 92; + } else if (_ref === 39 || _ref === 34) { + if (!((c$1 === quote))) { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } + value = (c$1 >> 0); + } else { + err = $pkg.ErrSyntax; + return [value, multibyte, tail, err]; + } } + tail = s; + return [value, multibyte, tail, err]; + }; + Unquote = $pkg.Unquote = function(s) { + var _q, _ref, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, buf, c, err = $ifaceNil, err$1, multibyte, n, n$1, quote, r, runeTmp, s, size, ss, t = ""; + n = s.length; + if (n < 2) { + _tmp = ""; _tmp$1 = $pkg.ErrSyntax; t = _tmp; err = _tmp$1; + return [t, err]; + } + quote = s.charCodeAt(0); + if (!((quote === s.charCodeAt((n - 1 >> 0))))) { + _tmp$2 = ""; _tmp$3 = $pkg.ErrSyntax; t = _tmp$2; err = _tmp$3; + return [t, err]; + } + s = s.substring(1, (n - 1 >> 0)); + if (quote === 96) { + if (contains(s, 96)) { + _tmp$4 = ""; _tmp$5 = $pkg.ErrSyntax; t = _tmp$4; err = _tmp$5; + return [t, err]; + } + _tmp$6 = s; _tmp$7 = $ifaceNil; t = _tmp$6; err = _tmp$7; + return [t, err]; + } + if (!((quote === 34)) && !((quote === 39))) { + _tmp$8 = ""; _tmp$9 = $pkg.ErrSyntax; t = _tmp$8; err = _tmp$9; + return [t, err]; + } + if (contains(s, 10)) { + _tmp$10 = ""; _tmp$11 = $pkg.ErrSyntax; t = _tmp$10; err = _tmp$11; + return [t, err]; + } + if (!contains(s, 92) && !contains(s, quote)) { + _ref = quote; + if (_ref === 34) { + _tmp$12 = s; _tmp$13 = $ifaceNil; t = _tmp$12; err = _tmp$13; + return [t, err]; + } else if (_ref === 39) { + _tuple = utf8.DecodeRuneInString(s); r = _tuple[0]; size = _tuple[1]; + if ((size === s.length) && (!((r === 65533)) || !((size === 1)))) { + _tmp$14 = s; _tmp$15 = $ifaceNil; t = _tmp$14; err = _tmp$15; + return [t, err]; + } + } + } + runeTmp = $clone(arrayType$5.zero(), arrayType$5); + buf = $makeSlice(sliceType$6, 0, (_q = (3 * s.length >> 0) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))); + while (true) { + if (!(s.length > 0)) { break; } + _tuple$1 = UnquoteChar(s, quote); c = _tuple$1[0]; multibyte = _tuple$1[1]; ss = _tuple$1[2]; err$1 = _tuple$1[3]; + if (!($interfaceIsEqual(err$1, $ifaceNil))) { + _tmp$16 = ""; _tmp$17 = err$1; t = _tmp$16; err = _tmp$17; + return [t, err]; + } + s = ss; + if (c < 128 || !multibyte) { + buf = $append(buf, (c << 24 >>> 24)); + } else { + n$1 = utf8.EncodeRune(new sliceType$6(runeTmp), c); + buf = $appendSlice(buf, $subslice(new sliceType$6(runeTmp), 0, n$1)); + } + if ((quote === 39) && !((s.length === 0))) { + _tmp$18 = ""; _tmp$19 = $pkg.ErrSyntax; t = _tmp$18; err = _tmp$19; + return [t, err]; + } + } + _tmp$20 = $bytesToString(buf); _tmp$21 = $ifaceNil; t = _tmp$20; err = _tmp$21; + return [t, err]; + }; + contains = function(s, c) { + var c, i, s; + i = 0; + while (true) { + if (!(i < s.length)) { break; } + if (s.charCodeAt(i) === c) { + return true; + } + i = i + (1) >> 0; + } + return false; + }; + bsearch16 = function(a, x) { + var _q, _tmp, _tmp$1, a, h, i, j, x; + _tmp = 0; _tmp$1 = a.$length; i = _tmp; j = _tmp$1; + while (true) { + if (!(i < j)) { break; } + h = i + (_q = ((j - i >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0; + if (((h < 0 || h >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + h]) < x) { + i = h + 1 >> 0; + } else { + j = h; + } + } + return i; + }; + bsearch32 = function(a, x) { + var _q, _tmp, _tmp$1, a, h, i, j, x; + _tmp = 0; _tmp$1 = a.$length; i = _tmp; j = _tmp$1; + while (true) { + if (!(i < j)) { break; } + h = i + (_q = ((j - i >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0; + if (((h < 0 || h >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + h]) < x) { + i = h + 1 >> 0; + } else { + j = h; + } + } + return i; + }; + IsPrint = $pkg.IsPrint = function(r) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, i, i$1, isNotPrint, isNotPrint$1, isPrint, isPrint$1, j, j$1, r, rr, rr$1, x, x$1, x$2, x$3; + if (r <= 255) { + if (32 <= r && r <= 126) { + return true; + } + if (161 <= r && r <= 255) { + return !((r === 173)); + } + return false; + } + if (0 <= r && r < 65536) { + _tmp = (r << 16 >>> 16); _tmp$1 = isPrint16; _tmp$2 = isNotPrint16; rr = _tmp; isPrint = _tmp$1; isNotPrint = _tmp$2; + i = bsearch16(isPrint, rr); + if (i >= isPrint.$length || rr < (x = i & ~1, ((x < 0 || x >= isPrint.$length) ? $throwRuntimeError("index out of range") : isPrint.$array[isPrint.$offset + x])) || (x$1 = i | 1, ((x$1 < 0 || x$1 >= isPrint.$length) ? $throwRuntimeError("index out of range") : isPrint.$array[isPrint.$offset + x$1])) < rr) { + return false; + } + j = bsearch16(isNotPrint, rr); + return j >= isNotPrint.$length || !((((j < 0 || j >= isNotPrint.$length) ? $throwRuntimeError("index out of range") : isNotPrint.$array[isNotPrint.$offset + j]) === rr)); + } + _tmp$3 = (r >>> 0); _tmp$4 = isPrint32; _tmp$5 = isNotPrint32; rr$1 = _tmp$3; isPrint$1 = _tmp$4; isNotPrint$1 = _tmp$5; + i$1 = bsearch32(isPrint$1, rr$1); + if (i$1 >= isPrint$1.$length || rr$1 < (x$2 = i$1 & ~1, ((x$2 < 0 || x$2 >= isPrint$1.$length) ? $throwRuntimeError("index out of range") : isPrint$1.$array[isPrint$1.$offset + x$2])) || (x$3 = i$1 | 1, ((x$3 < 0 || x$3 >= isPrint$1.$length) ? $throwRuntimeError("index out of range") : isPrint$1.$array[isPrint$1.$offset + x$3])) < rr$1) { + return false; + } + if (r >= 131072) { + return true; + } + r = r - (65536) >> 0; + j$1 = bsearch16(isNotPrint$1, (r << 16 >>> 16)); + return j$1 >= isNotPrint$1.$length || !((((j$1 < 0 || j$1 >= isNotPrint$1.$length) ? $throwRuntimeError("index out of range") : isNotPrint$1.$array[isNotPrint$1.$offset + j$1]) === (r << 16 >>> 16))); + }; + ptrType$2.methods = [{prop: "set", name: "set", pkg: "strconv", typ: $funcType([$String], [$Bool], false)}, {prop: "floatBits", name: "floatBits", pkg: "strconv", typ: $funcType([ptrType$1], [$Uint64, $Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Assign", name: "Assign", pkg: "", typ: $funcType([$Uint64], [], false)}, {prop: "Shift", name: "Shift", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Round", name: "Round", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "RoundDown", name: "RoundDown", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "RoundUp", name: "RoundUp", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "RoundedInteger", name: "RoundedInteger", pkg: "", typ: $funcType([], [$Uint64], false)}]; + ptrType$4.methods = [{prop: "floatBits", name: "floatBits", pkg: "strconv", typ: $funcType([ptrType$1], [$Uint64, $Bool], false)}, {prop: "AssignComputeBounds", name: "AssignComputeBounds", pkg: "", typ: $funcType([$Uint64, $Int, $Bool, ptrType$1], [extFloat, extFloat], false)}, {prop: "Normalize", name: "Normalize", pkg: "", typ: $funcType([], [$Uint], false)}, {prop: "Multiply", name: "Multiply", pkg: "", typ: $funcType([extFloat], [], false)}, {prop: "AssignDecimal", name: "AssignDecimal", pkg: "", typ: $funcType([$Uint64, $Int, $Bool, $Bool, ptrType$1], [$Bool], false)}, {prop: "frexp10", name: "frexp10", pkg: "strconv", typ: $funcType([], [$Int, $Int], false)}, {prop: "FixedDecimal", name: "FixedDecimal", pkg: "", typ: $funcType([ptrType$3, $Int], [$Bool], false)}, {prop: "ShortestDecimal", name: "ShortestDecimal", pkg: "", typ: $funcType([ptrType$3, ptrType$4, ptrType$4], [$Bool], false)}]; + decimal.init([{prop: "d", name: "d", pkg: "strconv", typ: arrayType$6, tag: ""}, {prop: "nd", name: "nd", pkg: "strconv", typ: $Int, tag: ""}, {prop: "dp", name: "dp", pkg: "strconv", typ: $Int, tag: ""}, {prop: "neg", name: "neg", pkg: "strconv", typ: $Bool, tag: ""}, {prop: "trunc", name: "trunc", pkg: "strconv", typ: $Bool, tag: ""}]); + leftCheat.init([{prop: "delta", name: "delta", pkg: "strconv", typ: $Int, tag: ""}, {prop: "cutoff", name: "cutoff", pkg: "strconv", typ: $String, tag: ""}]); + extFloat.init([{prop: "mant", name: "mant", pkg: "strconv", typ: $Uint64, tag: ""}, {prop: "exp", name: "exp", pkg: "strconv", typ: $Int, tag: ""}, {prop: "neg", name: "neg", pkg: "strconv", typ: $Bool, tag: ""}]); + floatInfo.init([{prop: "mantbits", name: "mantbits", pkg: "strconv", typ: $Uint, tag: ""}, {prop: "expbits", name: "expbits", pkg: "strconv", typ: $Uint, tag: ""}, {prop: "bias", name: "bias", pkg: "strconv", typ: $Int, tag: ""}]); + decimalSlice.init([{prop: "d", name: "d", pkg: "strconv", typ: sliceType$6, tag: ""}, {prop: "nd", name: "nd", pkg: "strconv", typ: $Int, tag: ""}, {prop: "dp", name: "dp", pkg: "strconv", typ: $Int, tag: ""}, {prop: "neg", name: "neg", pkg: "strconv", typ: $Bool, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_strconv = function() { while (true) { switch ($s) { case 0: + $r = errors.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = math.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = utf8.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + optimize = true; + $pkg.ErrRange = errors.New("value out of range"); + $pkg.ErrSyntax = errors.New("invalid syntax"); + leftcheats = new sliceType$3([new leftCheat.ptr(0, ""), new leftCheat.ptr(1, "5"), new leftCheat.ptr(1, "25"), new leftCheat.ptr(1, "125"), new leftCheat.ptr(2, "625"), new leftCheat.ptr(2, "3125"), new leftCheat.ptr(2, "15625"), new leftCheat.ptr(3, "78125"), new leftCheat.ptr(3, "390625"), new leftCheat.ptr(3, "1953125"), new leftCheat.ptr(4, "9765625"), new leftCheat.ptr(4, "48828125"), new leftCheat.ptr(4, "244140625"), new leftCheat.ptr(4, "1220703125"), new leftCheat.ptr(5, "6103515625"), new leftCheat.ptr(5, "30517578125"), new leftCheat.ptr(5, "152587890625"), new leftCheat.ptr(6, "762939453125"), new leftCheat.ptr(6, "3814697265625"), new leftCheat.ptr(6, "19073486328125"), new leftCheat.ptr(7, "95367431640625"), new leftCheat.ptr(7, "476837158203125"), new leftCheat.ptr(7, "2384185791015625"), new leftCheat.ptr(7, "11920928955078125"), new leftCheat.ptr(8, "59604644775390625"), new leftCheat.ptr(8, "298023223876953125"), new leftCheat.ptr(8, "1490116119384765625"), new leftCheat.ptr(9, "7450580596923828125")]); + smallPowersOfTen = $toNativeArray($kindStruct, [new extFloat.ptr(new $Uint64(2147483648, 0), -63, false), new extFloat.ptr(new $Uint64(2684354560, 0), -60, false), new extFloat.ptr(new $Uint64(3355443200, 0), -57, false), new extFloat.ptr(new $Uint64(4194304000, 0), -54, false), new extFloat.ptr(new $Uint64(2621440000, 0), -50, false), new extFloat.ptr(new $Uint64(3276800000, 0), -47, false), new extFloat.ptr(new $Uint64(4096000000, 0), -44, false), new extFloat.ptr(new $Uint64(2560000000, 0), -40, false)]); + powersOfTen = $toNativeArray($kindStruct, [new extFloat.ptr(new $Uint64(4203730336, 136053384), -1220, false), new extFloat.ptr(new $Uint64(3132023167, 2722021238), -1193, false), new extFloat.ptr(new $Uint64(2333539104, 810921078), -1166, false), new extFloat.ptr(new $Uint64(3477244234, 1573795306), -1140, false), new extFloat.ptr(new $Uint64(2590748842, 1432697645), -1113, false), new extFloat.ptr(new $Uint64(3860516611, 1025131999), -1087, false), new extFloat.ptr(new $Uint64(2876309015, 3348809418), -1060, false), new extFloat.ptr(new $Uint64(4286034428, 3200048207), -1034, false), new extFloat.ptr(new $Uint64(3193344495, 1097586188), -1007, false), new extFloat.ptr(new $Uint64(2379227053, 2424306748), -980, false), new extFloat.ptr(new $Uint64(3545324584, 827693699), -954, false), new extFloat.ptr(new $Uint64(2641472655, 2913388981), -927, false), new extFloat.ptr(new $Uint64(3936100983, 602835915), -901, false), new extFloat.ptr(new $Uint64(2932623761, 1081627501), -874, false), new extFloat.ptr(new $Uint64(2184974969, 1572261463), -847, false), new extFloat.ptr(new $Uint64(3255866422, 1308317239), -821, false), new extFloat.ptr(new $Uint64(2425809519, 944281679), -794, false), new extFloat.ptr(new $Uint64(3614737867, 629291719), -768, false), new extFloat.ptr(new $Uint64(2693189581, 2545915892), -741, false), new extFloat.ptr(new $Uint64(4013165208, 388672741), -715, false), new extFloat.ptr(new $Uint64(2990041083, 708162190), -688, false), new extFloat.ptr(new $Uint64(2227754207, 3536207675), -661, false), new extFloat.ptr(new $Uint64(3319612455, 450088378), -635, false), new extFloat.ptr(new $Uint64(2473304014, 3139815830), -608, false), new extFloat.ptr(new $Uint64(3685510180, 2103616900), -582, false), new extFloat.ptr(new $Uint64(2745919064, 224385782), -555, false), new extFloat.ptr(new $Uint64(4091738259, 3737383206), -529, false), new extFloat.ptr(new $Uint64(3048582568, 2868871352), -502, false), new extFloat.ptr(new $Uint64(2271371013, 1820084875), -475, false), new extFloat.ptr(new $Uint64(3384606560, 885076051), -449, false), new extFloat.ptr(new $Uint64(2521728396, 2444895829), -422, false), new extFloat.ptr(new $Uint64(3757668132, 1881767613), -396, false), new extFloat.ptr(new $Uint64(2799680927, 3102062735), -369, false), new extFloat.ptr(new $Uint64(4171849679, 2289335700), -343, false), new extFloat.ptr(new $Uint64(3108270227, 2410191823), -316, false), new extFloat.ptr(new $Uint64(2315841784, 3205436779), -289, false), new extFloat.ptr(new $Uint64(3450873173, 1697722806), -263, false), new extFloat.ptr(new $Uint64(2571100870, 3497754540), -236, false), new extFloat.ptr(new $Uint64(3831238852, 707476230), -210, false), new extFloat.ptr(new $Uint64(2854495385, 1769181907), -183, false), new extFloat.ptr(new $Uint64(4253529586, 2197867022), -157, false), new extFloat.ptr(new $Uint64(3169126500, 2450594539), -130, false), new extFloat.ptr(new $Uint64(2361183241, 1867548876), -103, false), new extFloat.ptr(new $Uint64(3518437208, 3793315116), -77, false), new extFloat.ptr(new $Uint64(2621440000, 0), -50, false), new extFloat.ptr(new $Uint64(3906250000, 0), -24, false), new extFloat.ptr(new $Uint64(2910383045, 2892103680), 3, false), new extFloat.ptr(new $Uint64(2168404344, 4170451332), 30, false), new extFloat.ptr(new $Uint64(3231174267, 3372684723), 56, false), new extFloat.ptr(new $Uint64(2407412430, 2078956656), 83, false), new extFloat.ptr(new $Uint64(3587324068, 2884206696), 109, false), new extFloat.ptr(new $Uint64(2672764710, 395977285), 136, false), new extFloat.ptr(new $Uint64(3982729777, 3569679143), 162, false), new extFloat.ptr(new $Uint64(2967364920, 2361961896), 189, false), new extFloat.ptr(new $Uint64(2210859150, 447440347), 216, false), new extFloat.ptr(new $Uint64(3294436857, 1114709402), 242, false), new extFloat.ptr(new $Uint64(2454546732, 2786846552), 269, false), new extFloat.ptr(new $Uint64(3657559652, 443583978), 295, false), new extFloat.ptr(new $Uint64(2725094297, 2599384906), 322, false), new extFloat.ptr(new $Uint64(4060706939, 3028118405), 348, false), new extFloat.ptr(new $Uint64(3025462433, 2044532855), 375, false), new extFloat.ptr(new $Uint64(2254145170, 1536935362), 402, false), new extFloat.ptr(new $Uint64(3358938053, 3365297469), 428, false), new extFloat.ptr(new $Uint64(2502603868, 4204241075), 455, false), new extFloat.ptr(new $Uint64(3729170365, 2577424355), 481, false), new extFloat.ptr(new $Uint64(2778448436, 3677981733), 508, false), new extFloat.ptr(new $Uint64(4140210802, 2744688476), 534, false), new extFloat.ptr(new $Uint64(3084697427, 1424604878), 561, false), new extFloat.ptr(new $Uint64(2298278679, 4062331362), 588, false), new extFloat.ptr(new $Uint64(3424702107, 3546052773), 614, false), new extFloat.ptr(new $Uint64(2551601907, 2065781727), 641, false), new extFloat.ptr(new $Uint64(3802183132, 2535403578), 667, false), new extFloat.ptr(new $Uint64(2832847187, 1558426518), 694, false), new extFloat.ptr(new $Uint64(4221271257, 2762425404), 720, false), new extFloat.ptr(new $Uint64(3145092172, 2812560400), 747, false), new extFloat.ptr(new $Uint64(2343276271, 3057687578), 774, false), new extFloat.ptr(new $Uint64(3491753744, 2790753324), 800, false), new extFloat.ptr(new $Uint64(2601559269, 3918606633), 827, false), new extFloat.ptr(new $Uint64(3876625403, 2711358621), 853, false), new extFloat.ptr(new $Uint64(2888311001, 1648096297), 880, false), new extFloat.ptr(new $Uint64(2151959390, 2057817989), 907, false), new extFloat.ptr(new $Uint64(3206669376, 61660461), 933, false), new extFloat.ptr(new $Uint64(2389154863, 1581580175), 960, false), new extFloat.ptr(new $Uint64(3560118173, 2626467905), 986, false), new extFloat.ptr(new $Uint64(2652494738, 3034782633), 1013, false), new extFloat.ptr(new $Uint64(3952525166, 3135207385), 1039, false), new extFloat.ptr(new $Uint64(2944860731, 2616258155), 1066, false)]); + uint64pow10 = $toNativeArray($kindUint64, [new $Uint64(0, 1), new $Uint64(0, 10), new $Uint64(0, 100), new $Uint64(0, 1000), new $Uint64(0, 10000), new $Uint64(0, 100000), new $Uint64(0, 1000000), new $Uint64(0, 10000000), new $Uint64(0, 100000000), new $Uint64(0, 1000000000), new $Uint64(2, 1410065408), new $Uint64(23, 1215752192), new $Uint64(232, 3567587328), new $Uint64(2328, 1316134912), new $Uint64(23283, 276447232), new $Uint64(232830, 2764472320), new $Uint64(2328306, 1874919424), new $Uint64(23283064, 1569325056), new $Uint64(232830643, 2808348672), new $Uint64(2328306436, 2313682944)]); + float32info = new floatInfo.ptr(23, 8, -127); + float64info = new floatInfo.ptr(52, 11, -1023); + isPrint16 = new sliceType$4([32, 126, 161, 887, 890, 895, 900, 1366, 1369, 1418, 1421, 1479, 1488, 1514, 1520, 1524, 1542, 1563, 1566, 1805, 1808, 1866, 1869, 1969, 1984, 2042, 2048, 2093, 2096, 2139, 2142, 2142, 2208, 2226, 2276, 2444, 2447, 2448, 2451, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2531, 2534, 2555, 2561, 2570, 2575, 2576, 2579, 2617, 2620, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2654, 2662, 2677, 2689, 2745, 2748, 2765, 2768, 2768, 2784, 2787, 2790, 2801, 2817, 2828, 2831, 2832, 2835, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2915, 2918, 2935, 2946, 2954, 2958, 2965, 2969, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3021, 3024, 3024, 3031, 3031, 3046, 3066, 3072, 3129, 3133, 3149, 3157, 3161, 3168, 3171, 3174, 3183, 3192, 3257, 3260, 3277, 3285, 3286, 3294, 3299, 3302, 3314, 3329, 3386, 3389, 3406, 3415, 3415, 3424, 3427, 3430, 3445, 3449, 3455, 3458, 3478, 3482, 3517, 3520, 3526, 3530, 3530, 3535, 3551, 3558, 3567, 3570, 3572, 3585, 3642, 3647, 3675, 3713, 3716, 3719, 3722, 3725, 3725, 3732, 3751, 3754, 3773, 3776, 3789, 3792, 3801, 3804, 3807, 3840, 3948, 3953, 4058, 4096, 4295, 4301, 4301, 4304, 4685, 4688, 4701, 4704, 4749, 4752, 4789, 4792, 4805, 4808, 4885, 4888, 4954, 4957, 4988, 4992, 5017, 5024, 5108, 5120, 5788, 5792, 5880, 5888, 5908, 5920, 5942, 5952, 5971, 5984, 6003, 6016, 6109, 6112, 6121, 6128, 6137, 6144, 6157, 6160, 6169, 6176, 6263, 6272, 6314, 6320, 6389, 6400, 6443, 6448, 6459, 6464, 6464, 6468, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6618, 6622, 6683, 6686, 6780, 6783, 6793, 6800, 6809, 6816, 6829, 6832, 6846, 6912, 6987, 6992, 7036, 7040, 7155, 7164, 7223, 7227, 7241, 7245, 7295, 7360, 7367, 7376, 7417, 7424, 7669, 7676, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8061, 8064, 8147, 8150, 8175, 8178, 8190, 8208, 8231, 8240, 8286, 8304, 8305, 8308, 8348, 8352, 8381, 8400, 8432, 8448, 8585, 8592, 9210, 9216, 9254, 9280, 9290, 9312, 11123, 11126, 11157, 11160, 11193, 11197, 11217, 11264, 11507, 11513, 11559, 11565, 11565, 11568, 11623, 11631, 11632, 11647, 11670, 11680, 11842, 11904, 12019, 12032, 12245, 12272, 12283, 12289, 12438, 12441, 12543, 12549, 12589, 12593, 12730, 12736, 12771, 12784, 19893, 19904, 40908, 40960, 42124, 42128, 42182, 42192, 42539, 42560, 42743, 42752, 42925, 42928, 42929, 42999, 43051, 43056, 43065, 43072, 43127, 43136, 43204, 43214, 43225, 43232, 43259, 43264, 43347, 43359, 43388, 43392, 43481, 43486, 43574, 43584, 43597, 43600, 43609, 43612, 43714, 43739, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43871, 43876, 43877, 43968, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64449, 64467, 64831, 64848, 64911, 64914, 64967, 65008, 65021, 65024, 65049, 65056, 65069, 65072, 65131, 65136, 65276, 65281, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65504, 65518, 65532, 65533]); + isNotPrint16 = new sliceType$4([173, 907, 909, 930, 1328, 1376, 1416, 1424, 1757, 2111, 2436, 2473, 2481, 2526, 2564, 2601, 2609, 2612, 2615, 2621, 2653, 2692, 2702, 2706, 2729, 2737, 2740, 2758, 2762, 2820, 2857, 2865, 2868, 2910, 2948, 2961, 2971, 2973, 3017, 3076, 3085, 3089, 3113, 3141, 3145, 3159, 3200, 3204, 3213, 3217, 3241, 3252, 3269, 3273, 3295, 3312, 3332, 3341, 3345, 3397, 3401, 3460, 3506, 3516, 3541, 3543, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3770, 3781, 3783, 3912, 3992, 4029, 4045, 4294, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823, 4881, 5760, 5901, 5997, 6001, 6431, 6751, 7415, 8024, 8026, 8028, 8030, 8117, 8133, 8156, 8181, 8335, 11209, 11311, 11359, 11558, 11687, 11695, 11703, 11711, 11719, 11727, 11735, 11743, 11930, 12352, 12687, 12831, 13055, 42654, 42895, 43470, 43519, 43815, 43823, 64311, 64317, 64319, 64322, 64325, 65107, 65127, 65141, 65511]); + isPrint32 = new sliceType$5([65536, 65613, 65616, 65629, 65664, 65786, 65792, 65794, 65799, 65843, 65847, 65932, 65936, 65947, 65952, 65952, 66000, 66045, 66176, 66204, 66208, 66256, 66272, 66299, 66304, 66339, 66352, 66378, 66384, 66426, 66432, 66499, 66504, 66517, 66560, 66717, 66720, 66729, 66816, 66855, 66864, 66915, 66927, 66927, 67072, 67382, 67392, 67413, 67424, 67431, 67584, 67589, 67592, 67640, 67644, 67644, 67647, 67742, 67751, 67759, 67840, 67867, 67871, 67897, 67903, 67903, 67968, 68023, 68030, 68031, 68096, 68102, 68108, 68147, 68152, 68154, 68159, 68167, 68176, 68184, 68192, 68255, 68288, 68326, 68331, 68342, 68352, 68405, 68409, 68437, 68440, 68466, 68472, 68497, 68505, 68508, 68521, 68527, 68608, 68680, 69216, 69246, 69632, 69709, 69714, 69743, 69759, 69825, 69840, 69864, 69872, 69881, 69888, 69955, 69968, 70006, 70016, 70088, 70093, 70093, 70096, 70106, 70113, 70132, 70144, 70205, 70320, 70378, 70384, 70393, 70401, 70412, 70415, 70416, 70419, 70457, 70460, 70468, 70471, 70472, 70475, 70477, 70487, 70487, 70493, 70499, 70502, 70508, 70512, 70516, 70784, 70855, 70864, 70873, 71040, 71093, 71096, 71113, 71168, 71236, 71248, 71257, 71296, 71351, 71360, 71369, 71840, 71922, 71935, 71935, 72384, 72440, 73728, 74648, 74752, 74868, 77824, 78894, 92160, 92728, 92736, 92777, 92782, 92783, 92880, 92909, 92912, 92917, 92928, 92997, 93008, 93047, 93053, 93071, 93952, 94020, 94032, 94078, 94095, 94111, 110592, 110593, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 113820, 113823, 118784, 119029, 119040, 119078, 119081, 119154, 119163, 119261, 119296, 119365, 119552, 119638, 119648, 119665, 119808, 119967, 119970, 119970, 119973, 119974, 119977, 120074, 120077, 120134, 120138, 120485, 120488, 120779, 120782, 120831, 124928, 125124, 125127, 125142, 126464, 126500, 126503, 126523, 126530, 126530, 126535, 126548, 126551, 126564, 126567, 126619, 126625, 126651, 126704, 126705, 126976, 127019, 127024, 127123, 127136, 127150, 127153, 127221, 127232, 127244, 127248, 127339, 127344, 127386, 127462, 127490, 127504, 127546, 127552, 127560, 127568, 127569, 127744, 127788, 127792, 127869, 127872, 127950, 127956, 127991, 128000, 128330, 128336, 128578, 128581, 128719, 128736, 128748, 128752, 128755, 128768, 128883, 128896, 128980, 129024, 129035, 129040, 129095, 129104, 129113, 129120, 129159, 129168, 129197, 131072, 173782, 173824, 177972, 177984, 178205, 194560, 195101, 917760, 917999]); + isNotPrint32 = new sliceType$4([12, 39, 59, 62, 926, 2057, 2102, 2134, 2564, 2580, 2584, 4285, 4405, 4626, 4868, 4905, 4913, 4916, 9327, 27231, 27482, 27490, 54357, 54429, 54445, 54458, 54460, 54468, 54534, 54549, 54557, 54586, 54591, 54597, 54609, 60932, 60960, 60963, 60968, 60979, 60984, 60986, 61000, 61002, 61004, 61008, 61011, 61016, 61018, 61020, 61022, 61024, 61027, 61035, 61043, 61048, 61053, 61055, 61066, 61092, 61098, 61632, 61648, 61743, 62719, 62842, 62884]); + shifts = $toNativeArray($kindUint, [0, 0, 1, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0]); + /* */ } return; } }; $init_strconv.$blocking = true; return $init_strconv; + }; + return $pkg; +})(); +$packages["reflect"] = (function() { + var $pkg = {}, js, math, runtime, strconv, sync, mapIter, Type, Kind, rtype, typeAlg, method, uncommonType, ChanDir, arrayType, chanType, funcType, imethod, interfaceType, mapType, ptrType, sliceType, structField, structType, Method, StructField, StructTag, fieldScan, Value, flag, ValueError, nonEmptyInterface, ptrType$1, sliceType$1, ptrType$3, arrayType$1, ptrType$4, ptrType$5, sliceType$2, sliceType$3, sliceType$4, sliceType$5, structType$5, sliceType$6, ptrType$6, arrayType$2, structType$6, ptrType$7, sliceType$7, ptrType$8, ptrType$9, ptrType$10, ptrType$11, sliceType$9, sliceType$10, ptrType$12, ptrType$17, sliceType$12, sliceType$13, funcType$2, funcType$3, funcType$4, arrayType$3, ptrType$20, initialized, stringPtrMap, jsObject, jsContainer, kindNames, uint8Type, init, jsType, reflectType, setKindType, newStringPtr, isWrapped, copyStruct, makeValue, MakeSlice, TypeOf, ValueOf, SliceOf, Zero, unsafe_New, makeInt, memmove, mapaccess, mapassign, mapdelete, mapiterinit, mapiterkey, mapiternext, maplen, cvtDirect, methodReceiver, valueInterface, ifaceE2I, methodName, makeMethodValue, wrapJsObject, unwrapJsObject, PtrTo, implements$1, directlyAssignable, haveIdenticalUnderlyingType, toType, ifaceIndir, overflowFloat32, New, convertOp, makeFloat, makeComplex, makeString, makeBytes, makeRunes, cvtInt, cvtUint, cvtFloatInt, cvtFloatUint, cvtIntFloat, cvtUintFloat, cvtFloat, cvtComplex, cvtIntString, cvtUintString, cvtBytesString, cvtStringBytes, cvtRunesString, cvtStringRunes, cvtT2I, cvtI2I; + js = $packages["github.com/gopherjs/gopherjs/js"]; + math = $packages["math"]; + runtime = $packages["runtime"]; + strconv = $packages["strconv"]; + sync = $packages["sync"]; + mapIter = $pkg.mapIter = $newType(0, $kindStruct, "reflect.mapIter", "mapIter", "reflect", function(t_, m_, keys_, i_) { + this.$val = this; + this.t = t_ !== undefined ? t_ : $ifaceNil; + this.m = m_ !== undefined ? m_ : null; + this.keys = keys_ !== undefined ? keys_ : null; + this.i = i_ !== undefined ? i_ : 0; + }); + Type = $pkg.Type = $newType(8, $kindInterface, "reflect.Type", "Type", "reflect", null); + Kind = $pkg.Kind = $newType(4, $kindUint, "reflect.Kind", "Kind", "reflect", null); + rtype = $pkg.rtype = $newType(0, $kindStruct, "reflect.rtype", "rtype", "reflect", function(size_, hash_, _$2_, align_, fieldAlign_, kind_, alg_, gc_, string_, uncommonType_, ptrToThis_, zero_) { + this.$val = this; + this.size = size_ !== undefined ? size_ : 0; + this.hash = hash_ !== undefined ? hash_ : 0; + this._$2 = _$2_ !== undefined ? _$2_ : 0; + this.align = align_ !== undefined ? align_ : 0; + this.fieldAlign = fieldAlign_ !== undefined ? fieldAlign_ : 0; + this.kind = kind_ !== undefined ? kind_ : 0; + this.alg = alg_ !== undefined ? alg_ : ptrType$3.nil; + this.gc = gc_ !== undefined ? gc_ : arrayType$1.zero(); + this.string = string_ !== undefined ? string_ : ptrType$4.nil; + this.uncommonType = uncommonType_ !== undefined ? uncommonType_ : ptrType$5.nil; + this.ptrToThis = ptrToThis_ !== undefined ? ptrToThis_ : ptrType$1.nil; + this.zero = zero_ !== undefined ? zero_ : 0; + }); + typeAlg = $pkg.typeAlg = $newType(0, $kindStruct, "reflect.typeAlg", "typeAlg", "reflect", function(hash_, equal_) { + this.$val = this; + this.hash = hash_ !== undefined ? hash_ : $throwNilPointerError; + this.equal = equal_ !== undefined ? equal_ : $throwNilPointerError; + }); + method = $pkg.method = $newType(0, $kindStruct, "reflect.method", "method", "reflect", function(name_, pkgPath_, mtyp_, typ_, ifn_, tfn_) { + this.$val = this; + this.name = name_ !== undefined ? name_ : ptrType$4.nil; + this.pkgPath = pkgPath_ !== undefined ? pkgPath_ : ptrType$4.nil; + this.mtyp = mtyp_ !== undefined ? mtyp_ : ptrType$1.nil; + this.typ = typ_ !== undefined ? typ_ : ptrType$1.nil; + this.ifn = ifn_ !== undefined ? ifn_ : 0; + this.tfn = tfn_ !== undefined ? tfn_ : 0; + }); + uncommonType = $pkg.uncommonType = $newType(0, $kindStruct, "reflect.uncommonType", "uncommonType", "reflect", function(name_, pkgPath_, methods_) { + this.$val = this; + this.name = name_ !== undefined ? name_ : ptrType$4.nil; + this.pkgPath = pkgPath_ !== undefined ? pkgPath_ : ptrType$4.nil; + this.methods = methods_ !== undefined ? methods_ : sliceType$2.nil; + }); + ChanDir = $pkg.ChanDir = $newType(4, $kindInt, "reflect.ChanDir", "ChanDir", "reflect", null); + arrayType = $pkg.arrayType = $newType(0, $kindStruct, "reflect.arrayType", "arrayType", "reflect", function(rtype_, elem_, slice_, len_) { + this.$val = this; + this.rtype = rtype_ !== undefined ? rtype_ : new rtype.ptr(); + this.elem = elem_ !== undefined ? elem_ : ptrType$1.nil; + this.slice = slice_ !== undefined ? slice_ : ptrType$1.nil; + this.len = len_ !== undefined ? len_ : 0; + }); + chanType = $pkg.chanType = $newType(0, $kindStruct, "reflect.chanType", "chanType", "reflect", function(rtype_, elem_, dir_) { + this.$val = this; + this.rtype = rtype_ !== undefined ? rtype_ : new rtype.ptr(); + this.elem = elem_ !== undefined ? elem_ : ptrType$1.nil; + this.dir = dir_ !== undefined ? dir_ : 0; + }); + funcType = $pkg.funcType = $newType(0, $kindStruct, "reflect.funcType", "funcType", "reflect", function(rtype_, dotdotdot_, in$2_, out_) { + this.$val = this; + this.rtype = rtype_ !== undefined ? rtype_ : new rtype.ptr(); + this.dotdotdot = dotdotdot_ !== undefined ? dotdotdot_ : false; + this.in$2 = in$2_ !== undefined ? in$2_ : sliceType$3.nil; + this.out = out_ !== undefined ? out_ : sliceType$3.nil; + }); + imethod = $pkg.imethod = $newType(0, $kindStruct, "reflect.imethod", "imethod", "reflect", function(name_, pkgPath_, typ_) { + this.$val = this; + this.name = name_ !== undefined ? name_ : ptrType$4.nil; + this.pkgPath = pkgPath_ !== undefined ? pkgPath_ : ptrType$4.nil; + this.typ = typ_ !== undefined ? typ_ : ptrType$1.nil; + }); + interfaceType = $pkg.interfaceType = $newType(0, $kindStruct, "reflect.interfaceType", "interfaceType", "reflect", function(rtype_, methods_) { + this.$val = this; + this.rtype = rtype_ !== undefined ? rtype_ : new rtype.ptr(); + this.methods = methods_ !== undefined ? methods_ : sliceType$4.nil; + }); + mapType = $pkg.mapType = $newType(0, $kindStruct, "reflect.mapType", "mapType", "reflect", function(rtype_, key_, elem_, bucket_, hmap_, keysize_, indirectkey_, valuesize_, indirectvalue_, bucketsize_) { + this.$val = this; + this.rtype = rtype_ !== undefined ? rtype_ : new rtype.ptr(); + this.key = key_ !== undefined ? key_ : ptrType$1.nil; + this.elem = elem_ !== undefined ? elem_ : ptrType$1.nil; + this.bucket = bucket_ !== undefined ? bucket_ : ptrType$1.nil; + this.hmap = hmap_ !== undefined ? hmap_ : ptrType$1.nil; + this.keysize = keysize_ !== undefined ? keysize_ : 0; + this.indirectkey = indirectkey_ !== undefined ? indirectkey_ : 0; + this.valuesize = valuesize_ !== undefined ? valuesize_ : 0; + this.indirectvalue = indirectvalue_ !== undefined ? indirectvalue_ : 0; + this.bucketsize = bucketsize_ !== undefined ? bucketsize_ : 0; + }); + ptrType = $pkg.ptrType = $newType(0, $kindStruct, "reflect.ptrType", "ptrType", "reflect", function(rtype_, elem_) { + this.$val = this; + this.rtype = rtype_ !== undefined ? rtype_ : new rtype.ptr(); + this.elem = elem_ !== undefined ? elem_ : ptrType$1.nil; + }); + sliceType = $pkg.sliceType = $newType(0, $kindStruct, "reflect.sliceType", "sliceType", "reflect", function(rtype_, elem_) { + this.$val = this; + this.rtype = rtype_ !== undefined ? rtype_ : new rtype.ptr(); + this.elem = elem_ !== undefined ? elem_ : ptrType$1.nil; + }); + structField = $pkg.structField = $newType(0, $kindStruct, "reflect.structField", "structField", "reflect", function(name_, pkgPath_, typ_, tag_, offset_) { + this.$val = this; + this.name = name_ !== undefined ? name_ : ptrType$4.nil; + this.pkgPath = pkgPath_ !== undefined ? pkgPath_ : ptrType$4.nil; + this.typ = typ_ !== undefined ? typ_ : ptrType$1.nil; + this.tag = tag_ !== undefined ? tag_ : ptrType$4.nil; + this.offset = offset_ !== undefined ? offset_ : 0; + }); + structType = $pkg.structType = $newType(0, $kindStruct, "reflect.structType", "structType", "reflect", function(rtype_, fields_) { + this.$val = this; + this.rtype = rtype_ !== undefined ? rtype_ : new rtype.ptr(); + this.fields = fields_ !== undefined ? fields_ : sliceType$5.nil; + }); + Method = $pkg.Method = $newType(0, $kindStruct, "reflect.Method", "Method", "reflect", function(Name_, PkgPath_, Type_, Func_, Index_) { + this.$val = this; + this.Name = Name_ !== undefined ? Name_ : ""; + this.PkgPath = PkgPath_ !== undefined ? PkgPath_ : ""; + this.Type = Type_ !== undefined ? Type_ : $ifaceNil; + this.Func = Func_ !== undefined ? Func_ : new Value.ptr(); + this.Index = Index_ !== undefined ? Index_ : 0; + }); + StructField = $pkg.StructField = $newType(0, $kindStruct, "reflect.StructField", "StructField", "reflect", function(Name_, PkgPath_, Type_, Tag_, Offset_, Index_, Anonymous_) { + this.$val = this; + this.Name = Name_ !== undefined ? Name_ : ""; + this.PkgPath = PkgPath_ !== undefined ? PkgPath_ : ""; + this.Type = Type_ !== undefined ? Type_ : $ifaceNil; + this.Tag = Tag_ !== undefined ? Tag_ : ""; + this.Offset = Offset_ !== undefined ? Offset_ : 0; + this.Index = Index_ !== undefined ? Index_ : sliceType$9.nil; + this.Anonymous = Anonymous_ !== undefined ? Anonymous_ : false; + }); + StructTag = $pkg.StructTag = $newType(8, $kindString, "reflect.StructTag", "StructTag", "reflect", null); + fieldScan = $pkg.fieldScan = $newType(0, $kindStruct, "reflect.fieldScan", "fieldScan", "reflect", function(typ_, index_) { + this.$val = this; + this.typ = typ_ !== undefined ? typ_ : ptrType$12.nil; + this.index = index_ !== undefined ? index_ : sliceType$9.nil; + }); + Value = $pkg.Value = $newType(0, $kindStruct, "reflect.Value", "Value", "reflect", function(typ_, ptr_, flag_) { + this.$val = this; + this.typ = typ_ !== undefined ? typ_ : ptrType$1.nil; + this.ptr = ptr_ !== undefined ? ptr_ : 0; + this.flag = flag_ !== undefined ? flag_ : 0; + }); + flag = $pkg.flag = $newType(4, $kindUintptr, "reflect.flag", "flag", "reflect", null); + ValueError = $pkg.ValueError = $newType(0, $kindStruct, "reflect.ValueError", "ValueError", "reflect", function(Method_, Kind_) { + this.$val = this; + this.Method = Method_ !== undefined ? Method_ : ""; + this.Kind = Kind_ !== undefined ? Kind_ : 0; + }); + nonEmptyInterface = $pkg.nonEmptyInterface = $newType(0, $kindStruct, "reflect.nonEmptyInterface", "nonEmptyInterface", "reflect", function(itab_, word_) { + this.$val = this; + this.itab = itab_ !== undefined ? itab_ : ptrType$7.nil; + this.word = word_ !== undefined ? word_ : 0; + }); + ptrType$1 = $ptrType(rtype); + sliceType$1 = $sliceType($String); + ptrType$3 = $ptrType(typeAlg); + arrayType$1 = $arrayType($UnsafePointer, 2); + ptrType$4 = $ptrType($String); + ptrType$5 = $ptrType(uncommonType); + sliceType$2 = $sliceType(method); + sliceType$3 = $sliceType(ptrType$1); + sliceType$4 = $sliceType(imethod); + sliceType$5 = $sliceType(structField); + structType$5 = $structType([{prop: "str", name: "str", pkg: "reflect", typ: $String, tag: ""}]); + sliceType$6 = $sliceType(Value); + ptrType$6 = $ptrType(nonEmptyInterface); + arrayType$2 = $arrayType($UnsafePointer, 100000); + structType$6 = $structType([{prop: "ityp", name: "ityp", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "typ", name: "typ", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "link", name: "link", pkg: "reflect", typ: $UnsafePointer, tag: ""}, {prop: "bad", name: "bad", pkg: "reflect", typ: $Int32, tag: ""}, {prop: "unused", name: "unused", pkg: "reflect", typ: $Int32, tag: ""}, {prop: "fun", name: "fun", pkg: "reflect", typ: arrayType$2, tag: ""}]); + ptrType$7 = $ptrType(structType$6); + sliceType$7 = $sliceType(js.Object); + ptrType$8 = $ptrType($Uint8); + ptrType$9 = $ptrType(method); + ptrType$10 = $ptrType(interfaceType); + ptrType$11 = $ptrType(imethod); + sliceType$9 = $sliceType($Int); + sliceType$10 = $sliceType(fieldScan); + ptrType$12 = $ptrType(structType); + ptrType$17 = $ptrType($UnsafePointer); + sliceType$12 = $sliceType($Uint8); + sliceType$13 = $sliceType($Int32); + funcType$2 = $funcType([$String], [$Bool], false); + funcType$3 = $funcType([$UnsafePointer, $Uintptr, $Uintptr], [$Uintptr], false); + funcType$4 = $funcType([$UnsafePointer, $UnsafePointer, $Uintptr], [$Bool], false); + arrayType$3 = $arrayType($Uintptr, 2); + ptrType$20 = $ptrType(ValueError); + init = function() { + var used, x, x$1, x$10, x$11, x$12, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; + used = (function(i) { + var i; + }); + used((x = new rtype.ptr(0, 0, 0, 0, 0, 0, ptrType$3.nil, arrayType$1.zero(), ptrType$4.nil, ptrType$5.nil, ptrType$1.nil, 0), new x.constructor.elem(x))); + used((x$1 = new uncommonType.ptr(ptrType$4.nil, ptrType$4.nil, sliceType$2.nil), new x$1.constructor.elem(x$1))); + used((x$2 = new method.ptr(ptrType$4.nil, ptrType$4.nil, ptrType$1.nil, ptrType$1.nil, 0, 0), new x$2.constructor.elem(x$2))); + used((x$3 = new arrayType.ptr(new rtype.ptr(), ptrType$1.nil, ptrType$1.nil, 0), new x$3.constructor.elem(x$3))); + used((x$4 = new chanType.ptr(new rtype.ptr(), ptrType$1.nil, 0), new x$4.constructor.elem(x$4))); + used((x$5 = new funcType.ptr(new rtype.ptr(), false, sliceType$3.nil, sliceType$3.nil), new x$5.constructor.elem(x$5))); + used((x$6 = new interfaceType.ptr(new rtype.ptr(), sliceType$4.nil), new x$6.constructor.elem(x$6))); + used((x$7 = new mapType.ptr(new rtype.ptr(), ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, 0, 0, 0, 0, 0), new x$7.constructor.elem(x$7))); + used((x$8 = new ptrType.ptr(new rtype.ptr(), ptrType$1.nil), new x$8.constructor.elem(x$8))); + used((x$9 = new sliceType.ptr(new rtype.ptr(), ptrType$1.nil), new x$9.constructor.elem(x$9))); + used((x$10 = new structType.ptr(new rtype.ptr(), sliceType$5.nil), new x$10.constructor.elem(x$10))); + used((x$11 = new imethod.ptr(ptrType$4.nil, ptrType$4.nil, ptrType$1.nil), new x$11.constructor.elem(x$11))); + used((x$12 = new structField.ptr(ptrType$4.nil, ptrType$4.nil, ptrType$1.nil, ptrType$4.nil, 0), new x$12.constructor.elem(x$12))); + initialized = true; + uint8Type = $assertType(TypeOf(new $Uint8(0)), ptrType$1); + }; + jsType = function(typ) { + var typ; + return typ.jsType; + }; + reflectType = function(typ) { + var _i, _i$1, _i$2, _i$3, _i$4, _ref, _ref$1, _ref$2, _ref$3, _ref$4, _ref$5, dir, f, fields, i, i$1, i$2, i$3, i$4, imethods, in$1, m, m$1, methodSet, methods, out, params, reflectFields, reflectMethods, results, rt, t, typ; + if (typ.reflectType === undefined) { + rt = new rtype.ptr((($parseInt(typ.size) >> 0) >>> 0), 0, 0, 0, 0, (($parseInt(typ.kind) >> 0) << 24 >>> 24), ptrType$3.nil, arrayType$1.zero(), newStringPtr(typ.string), ptrType$5.nil, ptrType$1.nil, 0); + rt.jsType = typ; + typ.reflectType = rt; + methodSet = $methodSet(typ); + if (!($internalize(typ.typeName, $String) === "") || !(($parseInt(methodSet.length) === 0))) { + reflectMethods = $makeSlice(sliceType$2, $parseInt(methodSet.length)); + _ref = reflectMethods; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + m = methodSet[i]; + t = m.typ; + $copy(((i < 0 || i >= reflectMethods.$length) ? $throwRuntimeError("index out of range") : reflectMethods.$array[reflectMethods.$offset + i]), new method.ptr(newStringPtr(m.name), newStringPtr(m.pkg), reflectType(t), reflectType($funcType(new ($global.Array)(typ).concat(t.params), t.results, t.variadic)), 0, 0), method); + _i++; + } + rt.uncommonType = new uncommonType.ptr(newStringPtr(typ.typeName), newStringPtr(typ.pkg), reflectMethods); + rt.uncommonType.jsType = typ; + } + _ref$1 = rt.Kind(); + if (_ref$1 === 17) { + setKindType(rt, new arrayType.ptr(new rtype.ptr(), reflectType(typ.elem), ptrType$1.nil, (($parseInt(typ.len) >> 0) >>> 0))); + } else if (_ref$1 === 18) { + dir = 3; + if (!!(typ.sendOnly)) { + dir = 2; + } + if (!!(typ.recvOnly)) { + dir = 1; + } + setKindType(rt, new chanType.ptr(new rtype.ptr(), reflectType(typ.elem), (dir >>> 0))); + } else if (_ref$1 === 19) { + params = typ.params; + in$1 = $makeSlice(sliceType$3, $parseInt(params.length)); + _ref$2 = in$1; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$2.$length)) { break; } + i$1 = _i$1; + (i$1 < 0 || i$1 >= in$1.$length) ? $throwRuntimeError("index out of range") : in$1.$array[in$1.$offset + i$1] = reflectType(params[i$1]); + _i$1++; + } + results = typ.results; + out = $makeSlice(sliceType$3, $parseInt(results.length)); + _ref$3 = out; + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$3.$length)) { break; } + i$2 = _i$2; + (i$2 < 0 || i$2 >= out.$length) ? $throwRuntimeError("index out of range") : out.$array[out.$offset + i$2] = reflectType(results[i$2]); + _i$2++; + } + setKindType(rt, new funcType.ptr($clone(rt, rtype), !!(typ.variadic), in$1, out)); + } else if (_ref$1 === 20) { + methods = typ.methods; + imethods = $makeSlice(sliceType$4, $parseInt(methods.length)); + _ref$4 = imethods; + _i$3 = 0; + while (true) { + if (!(_i$3 < _ref$4.$length)) { break; } + i$3 = _i$3; + m$1 = methods[i$3]; + $copy(((i$3 < 0 || i$3 >= imethods.$length) ? $throwRuntimeError("index out of range") : imethods.$array[imethods.$offset + i$3]), new imethod.ptr(newStringPtr(m$1.name), newStringPtr(m$1.pkg), reflectType(m$1.typ)), imethod); + _i$3++; + } + setKindType(rt, new interfaceType.ptr($clone(rt, rtype), imethods)); + } else if (_ref$1 === 21) { + setKindType(rt, new mapType.ptr(new rtype.ptr(), reflectType(typ.key), reflectType(typ.elem), ptrType$1.nil, ptrType$1.nil, 0, 0, 0, 0, 0)); + } else if (_ref$1 === 22) { + setKindType(rt, new ptrType.ptr(new rtype.ptr(), reflectType(typ.elem))); + } else if (_ref$1 === 23) { + setKindType(rt, new sliceType.ptr(new rtype.ptr(), reflectType(typ.elem))); + } else if (_ref$1 === 25) { + fields = typ.fields; + reflectFields = $makeSlice(sliceType$5, $parseInt(fields.length)); + _ref$5 = reflectFields; + _i$4 = 0; + while (true) { + if (!(_i$4 < _ref$5.$length)) { break; } + i$4 = _i$4; + f = fields[i$4]; + $copy(((i$4 < 0 || i$4 >= reflectFields.$length) ? $throwRuntimeError("index out of range") : reflectFields.$array[reflectFields.$offset + i$4]), new structField.ptr(newStringPtr(f.name), newStringPtr(f.pkg), reflectType(f.typ), newStringPtr(f.tag), (i$4 >>> 0)), structField); + _i$4++; + } + setKindType(rt, new structType.ptr($clone(rt, rtype), reflectFields)); + } + } + return typ.reflectType; + }; + setKindType = function(rt, kindType) { + var kindType, rt; + rt.kindType = kindType; + kindType.rtype = rt; + }; + newStringPtr = function(strObj) { + var _entry, _key, _tuple, c, ok, ptr, str, strObj; + c = $clone(new structType$5.ptr(), structType$5); + c.str = strObj; + str = c.str; + if (str === "") { + return ptrType$4.nil; + } + _tuple = (_entry = stringPtrMap[str], _entry !== undefined ? [_entry.v, true] : [ptrType$4.nil, false]); ptr = _tuple[0]; ok = _tuple[1]; + if (!ok) { + ptr = new ptrType$4(function() { return str; }, function($v) { str = $v; }); + _key = str; (stringPtrMap || $throwRuntimeError("assignment to entry in nil map"))[_key] = { k: _key, v: ptr }; + } + return ptr; + }; + isWrapped = function(typ) { + var _ref, typ; + _ref = typ.Kind(); + if (_ref === 1 || _ref === 2 || _ref === 3 || _ref === 4 || _ref === 5 || _ref === 7 || _ref === 8 || _ref === 9 || _ref === 10 || _ref === 12 || _ref === 13 || _ref === 14 || _ref === 17 || _ref === 21 || _ref === 19 || _ref === 24 || _ref === 25) { + return true; + } else if (_ref === 22) { + return typ.Elem().Kind() === 17; + } + return false; + }; + copyStruct = function(dst, src, typ) { + var dst, fields, i, prop, src, typ; + fields = jsType(typ).fields; + i = 0; + while (true) { + if (!(i < $parseInt(fields.length))) { break; } + prop = $internalize(fields[i].prop, $String); + dst[$externalize(prop, $String)] = src[$externalize(prop, $String)]; + i = i + (1) >> 0; + } + }; + makeValue = function(t, v, fl) { + var fl, rt, t, v; + rt = t.common(); + if ((t.Kind() === 17) || (t.Kind() === 25) || (t.Kind() === 22)) { + return new Value.ptr(rt, v, (fl | (t.Kind() >>> 0)) >>> 0); + } + return new Value.ptr(rt, $newDataPointer(v, jsType(rt.ptrTo())), (((fl | (t.Kind() >>> 0)) >>> 0) | 64) >>> 0); + }; + MakeSlice = $pkg.MakeSlice = function(typ, len, cap) { + var cap, len, typ; + if (!((typ.Kind() === 23))) { + $panic(new $String("reflect.MakeSlice of non-slice type")); + } + if (len < 0) { + $panic(new $String("reflect.MakeSlice: negative len")); + } + if (cap < 0) { + $panic(new $String("reflect.MakeSlice: negative cap")); + } + if (len > cap) { + $panic(new $String("reflect.MakeSlice: len > cap")); + } + return makeValue(typ, $makeSlice(jsType(typ), len, cap, (function() { + return jsType(typ.Elem()).zero(); + })), 0); + }; + TypeOf = $pkg.TypeOf = function(i) { + var i; + if (!initialized) { + return new rtype.ptr(0, 0, 0, 0, 0, 0, ptrType$3.nil, arrayType$1.zero(), ptrType$4.nil, ptrType$5.nil, ptrType$1.nil, 0); + } + if ($interfaceIsEqual(i, $ifaceNil)) { + return $ifaceNil; + } + return reflectType(i.constructor); + }; + ValueOf = $pkg.ValueOf = function(i) { + var i; + if ($interfaceIsEqual(i, $ifaceNil)) { + return new Value.ptr(ptrType$1.nil, 0, 0); + } + return makeValue(reflectType(i.constructor), i.$val, 0); + }; + rtype.ptr.prototype.ptrTo = function() { + var t; + t = this; + return reflectType($ptrType(jsType(t))); + }; + rtype.prototype.ptrTo = function() { return this.$val.ptrTo(); }; + SliceOf = $pkg.SliceOf = function(t) { + var t; + return reflectType($sliceType(jsType(t))); + }; + Zero = $pkg.Zero = function(typ) { + var typ; + return makeValue(typ, jsType(typ).zero(), 0); + }; + unsafe_New = function(typ) { + var _ref, typ; + _ref = typ.Kind(); + if (_ref === 25) { + return new (jsType(typ).ptr)(); + } else if (_ref === 17) { + return jsType(typ).zero(); + } else { + return $newDataPointer(jsType(typ).zero(), jsType(typ.ptrTo())); + } + }; + makeInt = function(f, bits, t) { + var _ref, bits, f, ptr, t, typ; + typ = t.common(); + ptr = unsafe_New(typ); + _ref = typ.Kind(); + if (_ref === 3) { + ptr.$set((bits.$low << 24 >> 24)); + } else if (_ref === 4) { + ptr.$set((bits.$low << 16 >> 16)); + } else if (_ref === 2 || _ref === 5) { + ptr.$set((bits.$low >> 0)); + } else if (_ref === 6) { + ptr.$set(new $Int64(bits.$high, bits.$low)); + } else if (_ref === 8) { + ptr.$set((bits.$low << 24 >>> 24)); + } else if (_ref === 9) { + ptr.$set((bits.$low << 16 >>> 16)); + } else if (_ref === 7 || _ref === 10 || _ref === 12) { + ptr.$set((bits.$low >>> 0)); + } else if (_ref === 11) { + ptr.$set(bits); + } + return new Value.ptr(typ, ptr, (((f | 64) >>> 0) | (typ.Kind() >>> 0)) >>> 0); + }; + memmove = function(adst, asrc, n) { + var adst, asrc, n; + adst.$set(asrc.$get()); + }; + mapaccess = function(t, m, key) { + var entry, k, key, m, t; + k = key.$get(); + if (!(k.$key === undefined)) { + k = k.$key(); + } + entry = m[$externalize($internalize(k, $String), $String)]; + if (entry === undefined) { + return 0; + } + return $newDataPointer(entry.v, jsType(PtrTo(t.Elem()))); + }; + mapassign = function(t, m, key, val) { + var entry, et, jsVal, k, key, kv, m, newVal, t, val; + kv = key.$get(); + k = kv; + if (!(k.$key === undefined)) { + k = k.$key(); + } + jsVal = val.$get(); + et = t.Elem(); + if (et.Kind() === 25) { + newVal = jsType(et).zero(); + copyStruct(newVal, jsVal, et); + jsVal = newVal; + } + entry = new ($global.Object)(); + entry.k = kv; + entry.v = jsVal; + m[$externalize($internalize(k, $String), $String)] = entry; + }; + mapdelete = function(t, m, key) { + var k, key, m, t; + k = key.$get(); + if (!(k.$key === undefined)) { + k = k.$key(); + } + delete m[$externalize($internalize(k, $String), $String)]; + }; + mapiterinit = function(t, m) { + var m, t; + return new mapIter.ptr(t, m, $keys(m), 0); + }; + mapiterkey = function(it) { + var it, iter, k; + iter = it; + k = iter.keys[iter.i]; + return $newDataPointer(iter.m[$externalize($internalize(k, $String), $String)].k, jsType(PtrTo(iter.t.Key()))); + }; + mapiternext = function(it) { + var it, iter; + iter = it; + iter.i = iter.i + (1) >> 0; + }; + maplen = function(m) { + var m; + return $parseInt($keys(m).length); + }; + cvtDirect = function(v, typ) { + var _ref, k, slice, srcVal, typ, v, val; + v = v; + srcVal = v.object(); + if (srcVal === jsType(v.typ).nil) { + return makeValue(typ, jsType(typ).nil, v.flag); + } + val = null; + k = typ.Kind(); + _ref = k; + switch (0) { default: if (_ref === 18) { + val = new (jsType(typ))(); + } else if (_ref === 23) { + slice = new (jsType(typ))(srcVal.$array); + slice.$offset = srcVal.$offset; + slice.$length = srcVal.$length; + slice.$capacity = srcVal.$capacity; + val = $newDataPointer(slice, jsType(PtrTo(typ))); + } else if (_ref === 22) { + if (typ.Elem().Kind() === 25) { + if ($interfaceIsEqual(typ.Elem(), v.typ.Elem())) { + val = srcVal; + break; + } + val = new (jsType(typ))(); + copyStruct(val, srcVal, typ.Elem()); + break; + } + val = new (jsType(typ))(srcVal.$get, srcVal.$set); + } else if (_ref === 25) { + val = new (jsType(typ).ptr)(); + copyStruct(val, srcVal, typ); + } else if (_ref === 17 || _ref === 19 || _ref === 20 || _ref === 21 || _ref === 24) { + val = v.ptr; + } else { + $panic(new ValueError.ptr("reflect.Convert", k)); + } } + return new Value.ptr(typ.common(), val, (((v.flag & 96) >>> 0) | (typ.Kind() >>> 0)) >>> 0); + }; + methodReceiver = function(op, v, i) { + var fn = 0, i, iface, m, m$1, op, prop, rcvr, rcvrtype = ptrType$1.nil, t = ptrType$1.nil, tt, ut, v, x, x$1; + v = v; + prop = ""; + if (v.typ.Kind() === 20) { + tt = v.typ.kindType; + if (i < 0 || i >= tt.methods.$length) { + $panic(new $String("reflect: internal error: invalid method index")); + } + m = (x = tt.methods, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + if (!($pointerIsEqual(m.pkgPath, ptrType$4.nil))) { + $panic(new $String("reflect: " + op + " of unexported method")); + } + iface = $pointerOfStructConversion(v.ptr, ptrType$6); + if (iface.itab === ptrType$7.nil) { + $panic(new $String("reflect: " + op + " of method on nil interface value")); + } + t = m.typ; + prop = m.name.$get(); + } else { + ut = v.typ.uncommonType.uncommon(); + if (ut === ptrType$5.nil || i < 0 || i >= ut.methods.$length) { + $panic(new $String("reflect: internal error: invalid method index")); + } + m$1 = (x$1 = ut.methods, ((i < 0 || i >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + i])); + if (!($pointerIsEqual(m$1.pkgPath, ptrType$4.nil))) { + $panic(new $String("reflect: " + op + " of unexported method")); + } + t = m$1.mtyp; + prop = $internalize($methodSet(jsType(v.typ))[i].prop, $String); + } + rcvr = v.object(); + if (isWrapped(v.typ)) { + rcvr = new (jsType(v.typ))(rcvr); + } + fn = rcvr[$externalize(prop, $String)]; + return [rcvrtype, t, fn]; + }; + valueInterface = function(v, safe) { + var safe, v; + v = v; + if (v.flag === 0) { + $panic(new ValueError.ptr("reflect.Value.Interface", 0)); + } + if (safe && !((((v.flag & 32) >>> 0) === 0))) { + $panic(new $String("reflect.Value.Interface: cannot return value obtained from unexported field or method")); + } + if (!((((v.flag & 256) >>> 0) === 0))) { + v = makeMethodValue("Interface", v); + } + if (isWrapped(v.typ)) { + return new (jsType(v.typ))(v.object()); + } + return v.object(); + }; + ifaceE2I = function(t, src, dst) { + var dst, src, t; + dst.$set(src); + }; + methodName = function() { + return "?FIXME?"; + }; + makeMethodValue = function(op, v) { + var _tuple, fn, fv, op, rcvr, v; + v = v; + if (((v.flag & 256) >>> 0) === 0) { + $panic(new $String("reflect: internal error: invalid use of makePartialFunc")); + } + _tuple = methodReceiver(op, v, (v.flag >> 0) >> 9 >> 0); fn = _tuple[2]; + rcvr = v.object(); + if (isWrapped(v.typ)) { + rcvr = new (jsType(v.typ))(rcvr); + } + fv = (function() { + return fn.apply(rcvr, $externalize(new ($sliceType(js.Object))($global.Array.prototype.slice.call(arguments, [])), sliceType$7)); + }); + return new Value.ptr(v.Type().common(), fv, (((v.flag & 32) >>> 0) | 19) >>> 0); + }; + rtype.ptr.prototype.pointers = function() { + var _ref, t; + t = this; + _ref = t.Kind(); + if (_ref === 22 || _ref === 21 || _ref === 18 || _ref === 19 || _ref === 25 || _ref === 17) { + return true; + } else { + return false; + } + }; + rtype.prototype.pointers = function() { return this.$val.pointers(); }; + rtype.ptr.prototype.Comparable = function() { + var _ref, i, t; + t = this; + _ref = t.Kind(); + if (_ref === 19 || _ref === 23 || _ref === 21) { + return false; + } else if (_ref === 17) { + return t.Elem().Comparable(); + } else if (_ref === 25) { + i = 0; + while (true) { + if (!(i < t.NumField())) { break; } + if (!t.Field(i).Type.Comparable()) { + return false; + } + i = i + (1) >> 0; + } + } + return true; + }; + rtype.prototype.Comparable = function() { return this.$val.Comparable(); }; + uncommonType.ptr.prototype.Method = function(i) { + var fl, fn, i, m = new Method.ptr(), mt, p, prop, t, x; + t = this; + if (t === ptrType$5.nil || i < 0 || i >= t.methods.$length) { + $panic(new $String("reflect: Method index out of range")); + } + p = (x = t.methods, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + if (!($pointerIsEqual(p.name, ptrType$4.nil))) { + m.Name = p.name.$get(); + } + fl = 19; + if (!($pointerIsEqual(p.pkgPath, ptrType$4.nil))) { + m.PkgPath = p.pkgPath.$get(); + fl = (fl | (32)) >>> 0; + } + mt = p.typ; + m.Type = mt; + prop = $internalize($methodSet(t.jsType)[i].prop, $String); + fn = (function(rcvr) { + var rcvr; + return rcvr[$externalize(prop, $String)].apply(rcvr, $externalize($subslice(new ($sliceType(js.Object))($global.Array.prototype.slice.call(arguments, [])), 1), sliceType$7)); + }); + m.Func = new Value.ptr(mt, fn, fl); + m.Index = i; + return m; + }; + uncommonType.prototype.Method = function(i) { return this.$val.Method(i); }; + Value.ptr.prototype.object = function() { + var _ref, newVal, v, val; + v = this; + if ((v.typ.Kind() === 17) || (v.typ.Kind() === 25)) { + return v.ptr; + } + if (!((((v.flag & 64) >>> 0) === 0))) { + val = v.ptr.$get(); + if (!(val === $ifaceNil) && !(val.constructor === jsType(v.typ))) { + _ref = v.typ.Kind(); + switch (0) { default: if (_ref === 11 || _ref === 6) { + val = new (jsType(v.typ))(val.$high, val.$low); + } else if (_ref === 15 || _ref === 16) { + val = new (jsType(v.typ))(val.$real, val.$imag); + } else if (_ref === 23) { + if (val === val.constructor.nil) { + val = jsType(v.typ).nil; + break; + } + newVal = new (jsType(v.typ))(val.$array); + newVal.$offset = val.$offset; + newVal.$length = val.$length; + newVal.$capacity = val.$capacity; + val = newVal; + } } + } + return val; + } + return v.ptr; + }; + Value.prototype.object = function() { return this.$val.object(); }; + Value.ptr.prototype.call = function(op, in$1) { + var _i, _i$1, _i$2, _ref, _ref$1, _ref$2, _ref$3, _tmp, _tmp$1, _tuple, arg, argsArray, elem, fn, i, i$1, i$2, i$3, in$1, isSlice, m, n, nin, nout, op, origIn, rcvr, results, ret, slice, t, targ, v, x, x$1, x$2, xt, xt$1; + v = this; + t = v.typ; + fn = 0; + rcvr = null; + if (!((((v.flag & 256) >>> 0) === 0))) { + _tuple = methodReceiver(op, v, (v.flag >> 0) >> 9 >> 0); t = _tuple[1]; fn = _tuple[2]; + rcvr = v.object(); + if (isWrapped(v.typ)) { + rcvr = new (jsType(v.typ))(rcvr); + } + } else { + fn = v.object(); + } + if (fn === 0) { + $panic(new $String("reflect.Value.Call: call of nil function")); + } + isSlice = op === "CallSlice"; + n = t.NumIn(); + if (isSlice) { + if (!t.IsVariadic()) { + $panic(new $String("reflect: CallSlice of non-variadic function")); + } + if (in$1.$length < n) { + $panic(new $String("reflect: CallSlice with too few input arguments")); + } + if (in$1.$length > n) { + $panic(new $String("reflect: CallSlice with too many input arguments")); + } + } else { + if (t.IsVariadic()) { + n = n - (1) >> 0; + } + if (in$1.$length < n) { + $panic(new $String("reflect: Call with too few input arguments")); + } + if (!t.IsVariadic() && in$1.$length > n) { + $panic(new $String("reflect: Call with too many input arguments")); + } + } + _ref = in$1; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + x = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (x.Kind() === 0) { + $panic(new $String("reflect: " + op + " using zero Value argument")); + } + _i++; + } + i = 0; + while (true) { + if (!(i < n)) { break; } + _tmp = ((i < 0 || i >= in$1.$length) ? $throwRuntimeError("index out of range") : in$1.$array[in$1.$offset + i]).Type(); _tmp$1 = t.In(i); xt = _tmp; targ = _tmp$1; + if (!xt.AssignableTo(targ)) { + $panic(new $String("reflect: " + op + " using " + xt.String() + " as type " + targ.String())); + } + i = i + (1) >> 0; + } + if (!isSlice && t.IsVariadic()) { + m = in$1.$length - n >> 0; + slice = MakeSlice(t.In(n), m, m); + elem = t.In(n).Elem(); + i$1 = 0; + while (true) { + if (!(i$1 < m)) { break; } + x$2 = (x$1 = n + i$1 >> 0, ((x$1 < 0 || x$1 >= in$1.$length) ? $throwRuntimeError("index out of range") : in$1.$array[in$1.$offset + x$1])); + xt$1 = x$2.Type(); + if (!xt$1.AssignableTo(elem)) { + $panic(new $String("reflect: cannot use " + xt$1.String() + " as type " + elem.String() + " in " + op)); + } + slice.Index(i$1).Set(x$2); + i$1 = i$1 + (1) >> 0; + } + origIn = in$1; + in$1 = $makeSlice(sliceType$6, (n + 1 >> 0)); + $copySlice($subslice(in$1, 0, n), origIn); + (n < 0 || n >= in$1.$length) ? $throwRuntimeError("index out of range") : in$1.$array[in$1.$offset + n] = slice; + } + nin = in$1.$length; + if (!((nin === t.NumIn()))) { + $panic(new $String("reflect.Value.Call: wrong argument count")); + } + nout = t.NumOut(); + argsArray = new ($global.Array)(t.NumIn()); + _ref$1 = in$1; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i$2 = _i$1; + arg = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i$1]); + argsArray[i$2] = unwrapJsObject(t.In(i$2), arg.assignTo("reflect.Value.Call", t.In(i$2).common(), 0).object()); + _i$1++; + } + results = fn.apply(rcvr, argsArray); + _ref$2 = nout; + if (_ref$2 === 0) { + return sliceType$6.nil; + } else if (_ref$2 === 1) { + return new sliceType$6([$clone(makeValue(t.Out(0), wrapJsObject(t.Out(0), results), 0), Value)]); + } else { + ret = $makeSlice(sliceType$6, nout); + _ref$3 = ret; + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$3.$length)) { break; } + i$3 = _i$2; + (i$3 < 0 || i$3 >= ret.$length) ? $throwRuntimeError("index out of range") : ret.$array[ret.$offset + i$3] = makeValue(t.Out(i$3), wrapJsObject(t.Out(i$3), results[i$3]), 0); + _i$2++; + } + return ret; + } + }; + Value.prototype.call = function(op, in$1) { return this.$val.call(op, in$1); }; + Value.ptr.prototype.Cap = function() { + var _ref, k, v; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 17) { + return v.typ.Len(); + } else if (_ref === 18 || _ref === 23) { + return $parseInt(v.object().$capacity) >> 0; + } + $panic(new ValueError.ptr("reflect.Value.Cap", k)); + }; + Value.prototype.Cap = function() { return this.$val.Cap(); }; + wrapJsObject = function(typ, val) { + var typ, val; + if ($interfaceIsEqual(typ, reflectType(jsObject))) { + return new (jsContainer)(val); + } + return val; + }; + unwrapJsObject = function(typ, val) { + var typ, val; + if ($interfaceIsEqual(typ, reflectType(jsObject))) { + return val.Object; + } + return val; + }; + Value.ptr.prototype.Elem = function() { + var _ref, fl, k, tt, typ, v, val, val$1; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 20) { + val = v.object(); + if (val === $ifaceNil) { + return new Value.ptr(ptrType$1.nil, 0, 0); + } + typ = reflectType(val.constructor); + return makeValue(typ, val.$val, (v.flag & 32) >>> 0); + } else if (_ref === 22) { + if (v.IsNil()) { + return new Value.ptr(ptrType$1.nil, 0, 0); + } + val$1 = v.object(); + tt = v.typ.kindType; + fl = (((((v.flag & 32) >>> 0) | 64) >>> 0) | 128) >>> 0; + fl = (fl | ((tt.elem.Kind() >>> 0))) >>> 0; + return new Value.ptr(tt.elem, wrapJsObject(tt.elem, val$1), fl); + } else { + $panic(new ValueError.ptr("reflect.Value.Elem", k)); + } + }; + Value.prototype.Elem = function() { return this.$val.Elem(); }; + Value.ptr.prototype.Field = function(i) { + var field, fl, i, prop, s, tt, typ, v, x; + v = this; + new flag(v.flag).mustBe(25); + tt = v.typ.kindType; + if (i < 0 || i >= tt.fields.$length) { + $panic(new $String("reflect: Field index out of range")); + } + field = (x = tt.fields, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + prop = $internalize(jsType(v.typ).fields[i].prop, $String); + typ = field.typ; + fl = (v.flag & 224) >>> 0; + if (!($pointerIsEqual(field.pkgPath, ptrType$4.nil))) { + fl = (fl | (32)) >>> 0; + } + fl = (fl | ((typ.Kind() >>> 0))) >>> 0; + s = v.ptr; + if (!((((fl & 64) >>> 0) === 0)) && !((typ.Kind() === 17)) && !((typ.Kind() === 25))) { + return new Value.ptr(typ, new (jsType(PtrTo(typ)))((function() { + return wrapJsObject(typ, s[$externalize(prop, $String)]); + }), (function(v$1) { + var v$1; + s[$externalize(prop, $String)] = unwrapJsObject(typ, v$1); + })), fl); + } + return makeValue(typ, wrapJsObject(typ, s[$externalize(prop, $String)]), fl); + }; + Value.prototype.Field = function(i) { return this.$val.Field(i); }; + Value.ptr.prototype.Index = function(i) { + var _ref, a, a$1, c, fl, fl$1, fl$2, i, k, s, str, tt, tt$1, typ, typ$1, v; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 17) { + tt = v.typ.kindType; + if (i < 0 || i > (tt.len >> 0)) { + $panic(new $String("reflect: array index out of range")); + } + typ = tt.elem; + fl = (v.flag & 224) >>> 0; + fl = (fl | ((typ.Kind() >>> 0))) >>> 0; + a = v.ptr; + if (!((((fl & 64) >>> 0) === 0)) && !((typ.Kind() === 17)) && !((typ.Kind() === 25))) { + return new Value.ptr(typ, new (jsType(PtrTo(typ)))((function() { + return wrapJsObject(typ, a[i]); + }), (function(v$1) { + var v$1; + a[i] = unwrapJsObject(typ, v$1); + })), fl); + } + return makeValue(typ, wrapJsObject(typ, a[i]), fl); + } else if (_ref === 23) { + s = v.object(); + if (i < 0 || i >= ($parseInt(s.$length) >> 0)) { + $panic(new $String("reflect: slice index out of range")); + } + tt$1 = v.typ.kindType; + typ$1 = tt$1.elem; + fl$1 = (192 | ((v.flag & 32) >>> 0)) >>> 0; + fl$1 = (fl$1 | ((typ$1.Kind() >>> 0))) >>> 0; + i = i + (($parseInt(s.$offset) >> 0)) >> 0; + a$1 = s.$array; + if (!((((fl$1 & 64) >>> 0) === 0)) && !((typ$1.Kind() === 17)) && !((typ$1.Kind() === 25))) { + return new Value.ptr(typ$1, new (jsType(PtrTo(typ$1)))((function() { + return wrapJsObject(typ$1, a$1[i]); + }), (function(v$1) { + var v$1; + a$1[i] = unwrapJsObject(typ$1, v$1); + })), fl$1); + } + return makeValue(typ$1, wrapJsObject(typ$1, a$1[i]), fl$1); + } else if (_ref === 24) { + str = v.ptr.$get(); + if (i < 0 || i >= str.length) { + $panic(new $String("reflect: string index out of range")); + } + fl$2 = (((v.flag & 32) >>> 0) | 8) >>> 0; + c = str.charCodeAt(i); + return new Value.ptr(uint8Type, new ptrType$8(function() { return c; }, function($v) { c = $v; }), (fl$2 | 64) >>> 0); + } else { + $panic(new ValueError.ptr("reflect.Value.Index", k)); + } + }; + Value.prototype.Index = function(i) { return this.$val.Index(i); }; + Value.ptr.prototype.IsNil = function() { + var _ref, k, v; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 18 || _ref === 22 || _ref === 23) { + return v.object() === jsType(v.typ).nil; + } else if (_ref === 19) { + return v.object() === $throwNilPointerError; + } else if (_ref === 21) { + return v.object() === false; + } else if (_ref === 20) { + return v.object() === $ifaceNil; + } else { + $panic(new ValueError.ptr("reflect.Value.IsNil", k)); + } + }; + Value.prototype.IsNil = function() { return this.$val.IsNil(); }; + Value.ptr.prototype.Len = function() { + var _ref, k, v; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 17 || _ref === 24) { + return $parseInt(v.object().length); + } else if (_ref === 23) { + return $parseInt(v.object().$length) >> 0; + } else if (_ref === 18) { + return $parseInt(v.object().$buffer.length) >> 0; + } else if (_ref === 21) { + return $parseInt($keys(v.object()).length); + } else { + $panic(new ValueError.ptr("reflect.Value.Len", k)); + } + }; + Value.prototype.Len = function() { return this.$val.Len(); }; + Value.ptr.prototype.Pointer = function() { + var _ref, k, v; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 18 || _ref === 21 || _ref === 22 || _ref === 26) { + if (v.IsNil()) { + return 0; + } + return v.object(); + } else if (_ref === 19) { + if (v.IsNil()) { + return 0; + } + return 1; + } else if (_ref === 23) { + if (v.IsNil()) { + return 0; + } + return v.object().$array; + } else { + $panic(new ValueError.ptr("reflect.Value.Pointer", k)); + } + }; + Value.prototype.Pointer = function() { return this.$val.Pointer(); }; + Value.ptr.prototype.Set = function(x) { + var _ref, v, x; + v = this; + x = x; + new flag(v.flag).mustBeAssignable(); + new flag(x.flag).mustBeExported(); + x = x.assignTo("reflect.Set", v.typ, 0); + if (!((((v.flag & 64) >>> 0) === 0))) { + _ref = v.typ.Kind(); + if (_ref === 17) { + $copy(v.ptr, x.ptr, jsType(v.typ)); + } else if (_ref === 20) { + v.ptr.$set(valueInterface(x, false)); + } else if (_ref === 25) { + copyStruct(v.ptr, x.ptr, v.typ); + } else { + v.ptr.$set(x.object()); + } + return; + } + v.ptr = x.ptr; + }; + Value.prototype.Set = function(x) { return this.$val.Set(x); }; + Value.ptr.prototype.SetCap = function(n) { + var n, newSlice, s, v; + v = this; + new flag(v.flag).mustBeAssignable(); + new flag(v.flag).mustBe(23); + s = v.ptr.$get(); + if (n < ($parseInt(s.$length) >> 0) || n > ($parseInt(s.$capacity) >> 0)) { + $panic(new $String("reflect: slice capacity out of range in SetCap")); + } + newSlice = new (jsType(v.typ))(s.$array); + newSlice.$offset = s.$offset; + newSlice.$length = s.$length; + newSlice.$capacity = n; + v.ptr.$set(newSlice); + }; + Value.prototype.SetCap = function(n) { return this.$val.SetCap(n); }; + Value.ptr.prototype.SetLen = function(n) { + var n, newSlice, s, v; + v = this; + new flag(v.flag).mustBeAssignable(); + new flag(v.flag).mustBe(23); + s = v.ptr.$get(); + if (n < 0 || n > ($parseInt(s.$capacity) >> 0)) { + $panic(new $String("reflect: slice length out of range in SetLen")); + } + newSlice = new (jsType(v.typ))(s.$array); + newSlice.$offset = s.$offset; + newSlice.$length = n; + newSlice.$capacity = s.$capacity; + v.ptr.$set(newSlice); + }; + Value.prototype.SetLen = function(n) { return this.$val.SetLen(n); }; + Value.ptr.prototype.Slice = function(i, j) { + var _ref, cap, i, j, kind, s, str, tt, typ, v; + v = this; + cap = 0; + typ = $ifaceNil; + s = null; + kind = new flag(v.flag).kind(); + _ref = kind; + if (_ref === 17) { + if (((v.flag & 128) >>> 0) === 0) { + $panic(new $String("reflect.Value.Slice: slice of unaddressable array")); + } + tt = v.typ.kindType; + cap = (tt.len >> 0); + typ = SliceOf(tt.elem); + s = new (jsType(typ))(v.object()); + } else if (_ref === 23) { + typ = v.typ; + s = v.object(); + cap = $parseInt(s.$capacity) >> 0; + } else if (_ref === 24) { + str = v.ptr.$get(); + if (i < 0 || j < i || j > str.length) { + $panic(new $String("reflect.Value.Slice: string slice index out of bounds")); + } + return ValueOf(new $String(str.substring(i, j))); + } else { + $panic(new ValueError.ptr("reflect.Value.Slice", kind)); + } + if (i < 0 || j < i || j > cap) { + $panic(new $String("reflect.Value.Slice: slice index out of bounds")); + } + return makeValue(typ, $subslice(s, i, j), (v.flag & 32) >>> 0); + }; + Value.prototype.Slice = function(i, j) { return this.$val.Slice(i, j); }; + Value.ptr.prototype.Slice3 = function(i, j, k) { + var _ref, cap, i, j, k, kind, s, tt, typ, v; + v = this; + cap = 0; + typ = $ifaceNil; + s = null; + kind = new flag(v.flag).kind(); + _ref = kind; + if (_ref === 17) { + if (((v.flag & 128) >>> 0) === 0) { + $panic(new $String("reflect.Value.Slice: slice of unaddressable array")); + } + tt = v.typ.kindType; + cap = (tt.len >> 0); + typ = SliceOf(tt.elem); + s = new (jsType(typ))(v.object()); + } else if (_ref === 23) { + typ = v.typ; + s = v.object(); + cap = $parseInt(s.$capacity) >> 0; + } else { + $panic(new ValueError.ptr("reflect.Value.Slice3", kind)); + } + if (i < 0 || j < i || k < j || k > cap) { + $panic(new $String("reflect.Value.Slice3: slice index out of bounds")); + } + return makeValue(typ, $subslice(s, i, j, k), (v.flag & 32) >>> 0); + }; + Value.prototype.Slice3 = function(i, j, k) { return this.$val.Slice3(i, j, k); }; + Value.ptr.prototype.Close = function() { + var v; + v = this; + new flag(v.flag).mustBe(18); + new flag(v.flag).mustBeExported(); + $close(v.object()); + }; + Value.prototype.Close = function() { return this.$val.Close(); }; + Value.ptr.prototype.TrySend = function(x) { + var c, tt, v, x; + v = this; + x = x; + new flag(v.flag).mustBe(18); + new flag(v.flag).mustBeExported(); + tt = v.typ.kindType; + if (((tt.dir >> 0) & 2) === 0) { + $panic(new $String("reflect: send on recv-only channel")); + } + new flag(x.flag).mustBeExported(); + c = v.object(); + if (!!!(c.$closed) && ($parseInt(c.$recvQueue.length) === 0) && ($parseInt(c.$buffer.length) === ($parseInt(c.$capacity) >> 0))) { + return false; + } + x = x.assignTo("reflect.Value.Send", tt.elem, 0); + $send(c, x.object()); + return true; + }; + Value.prototype.TrySend = function(x) { return this.$val.TrySend(x); }; + Value.ptr.prototype.Send = function(x) { + var v, x; + v = this; + x = x; + $panic(new runtime.NotSupportedError.ptr("reflect.Value.Send, use reflect.Value.TrySend if possible")); + }; + Value.prototype.Send = function(x) { return this.$val.Send(x); }; + Value.ptr.prototype.TryRecv = function() { + var _tmp, _tmp$1, _tmp$2, _tmp$3, ok = false, res, tt, v, x = new Value.ptr(); + v = this; + new flag(v.flag).mustBe(18); + new flag(v.flag).mustBeExported(); + tt = v.typ.kindType; + if (((tt.dir >> 0) & 1) === 0) { + $panic(new $String("reflect: recv on send-only channel")); + } + res = $recv(v.object()); + if (res.constructor === $global.Function) { + _tmp = new Value.ptr(ptrType$1.nil, 0, 0); _tmp$1 = false; x = _tmp; ok = _tmp$1; + return [x, ok]; + } + _tmp$2 = makeValue(tt.elem, res[0], 0); _tmp$3 = !!(res[1]); x = _tmp$2; ok = _tmp$3; + return [x, ok]; + }; + Value.prototype.TryRecv = function() { return this.$val.TryRecv(); }; + Value.ptr.prototype.Recv = function() { + var ok = false, v, x = new Value.ptr(); + v = this; + $panic(new runtime.NotSupportedError.ptr("reflect.Value.Recv, use reflect.Value.TryRecv if possible")); + }; + Value.prototype.Recv = function() { return this.$val.Recv(); }; + Kind.prototype.String = function() { + var k; + k = this.$val; + if ((k >> 0) < kindNames.$length) { + return ((k < 0 || k >= kindNames.$length) ? $throwRuntimeError("index out of range") : kindNames.$array[kindNames.$offset + k]); + } + return "kind" + strconv.Itoa((k >> 0)); + }; + $ptrType(Kind).prototype.String = function() { return new Kind(this.$get()).String(); }; + uncommonType.ptr.prototype.uncommon = function() { + var t; + t = this; + return t; + }; + uncommonType.prototype.uncommon = function() { return this.$val.uncommon(); }; + uncommonType.ptr.prototype.PkgPath = function() { + var t; + t = this; + if (t === ptrType$5.nil || $pointerIsEqual(t.pkgPath, ptrType$4.nil)) { + return ""; + } + return t.pkgPath.$get(); + }; + uncommonType.prototype.PkgPath = function() { return this.$val.PkgPath(); }; + uncommonType.ptr.prototype.Name = function() { + var t; + t = this; + if (t === ptrType$5.nil || $pointerIsEqual(t.name, ptrType$4.nil)) { + return ""; + } + return t.name.$get(); + }; + uncommonType.prototype.Name = function() { return this.$val.Name(); }; + rtype.ptr.prototype.String = function() { + var t; + t = this; + return t.string.$get(); + }; + rtype.prototype.String = function() { return this.$val.String(); }; + rtype.ptr.prototype.Size = function() { + var t; + t = this; + return t.size; + }; + rtype.prototype.Size = function() { return this.$val.Size(); }; + rtype.ptr.prototype.Bits = function() { + var k, t; + t = this; + if (t === ptrType$1.nil) { + $panic(new $String("reflect: Bits of nil Type")); + } + k = t.Kind(); + if (k < 2 || k > 16) { + $panic(new $String("reflect: Bits of non-arithmetic Type " + t.String())); + } + return (t.size >> 0) * 8 >> 0; + }; + rtype.prototype.Bits = function() { return this.$val.Bits(); }; + rtype.ptr.prototype.Align = function() { + var t; + t = this; + return (t.align >> 0); + }; + rtype.prototype.Align = function() { return this.$val.Align(); }; + rtype.ptr.prototype.FieldAlign = function() { + var t; + t = this; + return (t.fieldAlign >> 0); + }; + rtype.prototype.FieldAlign = function() { return this.$val.FieldAlign(); }; + rtype.ptr.prototype.Kind = function() { + var t; + t = this; + return (((t.kind & 31) >>> 0) >>> 0); + }; + rtype.prototype.Kind = function() { return this.$val.Kind(); }; + rtype.ptr.prototype.common = function() { + var t; + t = this; + return t; + }; + rtype.prototype.common = function() { return this.$val.common(); }; + uncommonType.ptr.prototype.NumMethod = function() { + var t; + t = this; + if (t === ptrType$5.nil) { + return 0; + } + return t.methods.$length; + }; + uncommonType.prototype.NumMethod = function() { return this.$val.NumMethod(); }; + uncommonType.ptr.prototype.MethodByName = function(name) { + var _i, _ref, _tmp, _tmp$1, i, m = new Method.ptr(), name, ok = false, p, t, x; + t = this; + if (t === ptrType$5.nil) { + return [m, ok]; + } + p = ptrType$9.nil; + _ref = t.methods; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + p = (x = t.methods, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + if (!($pointerIsEqual(p.name, ptrType$4.nil)) && p.name.$get() === name) { + _tmp = $clone(t.Method(i), Method); _tmp$1 = true; $copy(m, _tmp, Method); ok = _tmp$1; + return [m, ok]; + } + _i++; + } + return [m, ok]; + }; + uncommonType.prototype.MethodByName = function(name) { return this.$val.MethodByName(name); }; + rtype.ptr.prototype.NumMethod = function() { + var t, tt; + t = this; + if (t.Kind() === 20) { + tt = t.kindType; + return tt.NumMethod(); + } + return t.uncommonType.NumMethod(); + }; + rtype.prototype.NumMethod = function() { return this.$val.NumMethod(); }; + rtype.ptr.prototype.Method = function(i) { + var i, m = new Method.ptr(), t, tt; + t = this; + if (t.Kind() === 20) { + tt = t.kindType; + $copy(m, tt.Method(i), Method); + return m; + } + $copy(m, t.uncommonType.Method(i), Method); + return m; + }; + rtype.prototype.Method = function(i) { return this.$val.Method(i); }; + rtype.ptr.prototype.MethodByName = function(name) { + var _tuple, _tuple$1, m = new Method.ptr(), name, ok = false, t, tt; + t = this; + if (t.Kind() === 20) { + tt = t.kindType; + _tuple = tt.MethodByName(name); $copy(m, _tuple[0], Method); ok = _tuple[1]; + return [m, ok]; + } + _tuple$1 = t.uncommonType.MethodByName(name); $copy(m, _tuple$1[0], Method); ok = _tuple$1[1]; + return [m, ok]; + }; + rtype.prototype.MethodByName = function(name) { return this.$val.MethodByName(name); }; + rtype.ptr.prototype.PkgPath = function() { + var t; + t = this; + return t.uncommonType.PkgPath(); + }; + rtype.prototype.PkgPath = function() { return this.$val.PkgPath(); }; + rtype.ptr.prototype.Name = function() { + var t; + t = this; + return t.uncommonType.Name(); + }; + rtype.prototype.Name = function() { return this.$val.Name(); }; + rtype.ptr.prototype.ChanDir = function() { + var t, tt; + t = this; + if (!((t.Kind() === 18))) { + $panic(new $String("reflect: ChanDir of non-chan type")); + } + tt = t.kindType; + return (tt.dir >> 0); + }; + rtype.prototype.ChanDir = function() { return this.$val.ChanDir(); }; + rtype.ptr.prototype.IsVariadic = function() { + var t, tt; + t = this; + if (!((t.Kind() === 19))) { + $panic(new $String("reflect: IsVariadic of non-func type")); + } + tt = t.kindType; + return tt.dotdotdot; + }; + rtype.prototype.IsVariadic = function() { return this.$val.IsVariadic(); }; + rtype.ptr.prototype.Elem = function() { + var _ref, t, tt, tt$1, tt$2, tt$3, tt$4; + t = this; + _ref = t.Kind(); + if (_ref === 17) { + tt = t.kindType; + return toType(tt.elem); + } else if (_ref === 18) { + tt$1 = t.kindType; + return toType(tt$1.elem); + } else if (_ref === 21) { + tt$2 = t.kindType; + return toType(tt$2.elem); + } else if (_ref === 22) { + tt$3 = t.kindType; + return toType(tt$3.elem); + } else if (_ref === 23) { + tt$4 = t.kindType; + return toType(tt$4.elem); + } + $panic(new $String("reflect: Elem of invalid type")); + }; + rtype.prototype.Elem = function() { return this.$val.Elem(); }; + rtype.ptr.prototype.Field = function(i) { + var i, t, tt; + t = this; + if (!((t.Kind() === 25))) { + $panic(new $String("reflect: Field of non-struct type")); + } + tt = t.kindType; + return tt.Field(i); + }; + rtype.prototype.Field = function(i) { return this.$val.Field(i); }; + rtype.ptr.prototype.FieldByIndex = function(index) { + var index, t, tt; + t = this; + if (!((t.Kind() === 25))) { + $panic(new $String("reflect: FieldByIndex of non-struct type")); + } + tt = t.kindType; + return tt.FieldByIndex(index); + }; + rtype.prototype.FieldByIndex = function(index) { return this.$val.FieldByIndex(index); }; + rtype.ptr.prototype.FieldByName = function(name) { + var name, t, tt; + t = this; + if (!((t.Kind() === 25))) { + $panic(new $String("reflect: FieldByName of non-struct type")); + } + tt = t.kindType; + return tt.FieldByName(name); + }; + rtype.prototype.FieldByName = function(name) { return this.$val.FieldByName(name); }; + rtype.ptr.prototype.FieldByNameFunc = function(match) { + var match, t, tt; + t = this; + if (!((t.Kind() === 25))) { + $panic(new $String("reflect: FieldByNameFunc of non-struct type")); + } + tt = t.kindType; + return tt.FieldByNameFunc(match); + }; + rtype.prototype.FieldByNameFunc = function(match) { return this.$val.FieldByNameFunc(match); }; + rtype.ptr.prototype.In = function(i) { + var i, t, tt, x; + t = this; + if (!((t.Kind() === 19))) { + $panic(new $String("reflect: In of non-func type")); + } + tt = t.kindType; + return toType((x = tt.in$2, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i]))); + }; + rtype.prototype.In = function(i) { return this.$val.In(i); }; + rtype.ptr.prototype.Key = function() { + var t, tt; + t = this; + if (!((t.Kind() === 21))) { + $panic(new $String("reflect: Key of non-map type")); + } + tt = t.kindType; + return toType(tt.key); + }; + rtype.prototype.Key = function() { return this.$val.Key(); }; + rtype.ptr.prototype.Len = function() { + var t, tt; + t = this; + if (!((t.Kind() === 17))) { + $panic(new $String("reflect: Len of non-array type")); + } + tt = t.kindType; + return (tt.len >> 0); + }; + rtype.prototype.Len = function() { return this.$val.Len(); }; + rtype.ptr.prototype.NumField = function() { + var t, tt; + t = this; + if (!((t.Kind() === 25))) { + $panic(new $String("reflect: NumField of non-struct type")); + } + tt = t.kindType; + return tt.fields.$length; + }; + rtype.prototype.NumField = function() { return this.$val.NumField(); }; + rtype.ptr.prototype.NumIn = function() { + var t, tt; + t = this; + if (!((t.Kind() === 19))) { + $panic(new $String("reflect: NumIn of non-func type")); + } + tt = t.kindType; + return tt.in$2.$length; + }; + rtype.prototype.NumIn = function() { return this.$val.NumIn(); }; + rtype.ptr.prototype.NumOut = function() { + var t, tt; + t = this; + if (!((t.Kind() === 19))) { + $panic(new $String("reflect: NumOut of non-func type")); + } + tt = t.kindType; + return tt.out.$length; + }; + rtype.prototype.NumOut = function() { return this.$val.NumOut(); }; + rtype.ptr.prototype.Out = function(i) { + var i, t, tt, x; + t = this; + if (!((t.Kind() === 19))) { + $panic(new $String("reflect: Out of non-func type")); + } + tt = t.kindType; + return toType((x = tt.out, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i]))); + }; + rtype.prototype.Out = function(i) { return this.$val.Out(i); }; + ChanDir.prototype.String = function() { + var _ref, d; + d = this.$val; + _ref = d; + if (_ref === 2) { + return "chan<-"; + } else if (_ref === 1) { + return "<-chan"; + } else if (_ref === 3) { + return "chan"; + } + return "ChanDir" + strconv.Itoa((d >> 0)); + }; + $ptrType(ChanDir).prototype.String = function() { return new ChanDir(this.$get()).String(); }; + interfaceType.ptr.prototype.Method = function(i) { + var i, m = new Method.ptr(), p, t, x; + t = this; + if (i < 0 || i >= t.methods.$length) { + return m; + } + p = (x = t.methods, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + m.Name = p.name.$get(); + if (!($pointerIsEqual(p.pkgPath, ptrType$4.nil))) { + m.PkgPath = p.pkgPath.$get(); + } + m.Type = toType(p.typ); + m.Index = i; + return m; + }; + interfaceType.prototype.Method = function(i) { return this.$val.Method(i); }; + interfaceType.ptr.prototype.NumMethod = function() { + var t; + t = this; + return t.methods.$length; + }; + interfaceType.prototype.NumMethod = function() { return this.$val.NumMethod(); }; + interfaceType.ptr.prototype.MethodByName = function(name) { + var _i, _ref, _tmp, _tmp$1, i, m = new Method.ptr(), name, ok = false, p, t, x; + t = this; + if (t === ptrType$10.nil) { + return [m, ok]; + } + p = ptrType$11.nil; + _ref = t.methods; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + p = (x = t.methods, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + if (p.name.$get() === name) { + _tmp = $clone(t.Method(i), Method); _tmp$1 = true; $copy(m, _tmp, Method); ok = _tmp$1; + return [m, ok]; + } + _i++; + } + return [m, ok]; + }; + interfaceType.prototype.MethodByName = function(name) { return this.$val.MethodByName(name); }; + StructTag.prototype.Get = function(key) { + var _tuple, i, key, name, qvalue, tag, value; + tag = this.$val; + while (true) { + if (!(!(tag === ""))) { break; } + i = 0; + while (true) { + if (!(i < tag.length && (tag.charCodeAt(i) === 32))) { break; } + i = i + (1) >> 0; + } + tag = tag.substring(i); + if (tag === "") { + break; + } + i = 0; + while (true) { + if (!(i < tag.length && !((tag.charCodeAt(i) === 32)) && !((tag.charCodeAt(i) === 58)) && !((tag.charCodeAt(i) === 34)))) { break; } + i = i + (1) >> 0; + } + if ((i + 1 >> 0) >= tag.length || !((tag.charCodeAt(i) === 58)) || !((tag.charCodeAt((i + 1 >> 0)) === 34))) { + break; + } + name = tag.substring(0, i); + tag = tag.substring((i + 1 >> 0)); + i = 1; + while (true) { + if (!(i < tag.length && !((tag.charCodeAt(i) === 34)))) { break; } + if (tag.charCodeAt(i) === 92) { + i = i + (1) >> 0; + } + i = i + (1) >> 0; + } + if (i >= tag.length) { + break; + } + qvalue = tag.substring(0, (i + 1 >> 0)); + tag = tag.substring((i + 1 >> 0)); + if (key === name) { + _tuple = strconv.Unquote(qvalue); value = _tuple[0]; + return value; + } + } + return ""; + }; + $ptrType(StructTag).prototype.Get = function(key) { return new StructTag(this.$get()).Get(key); }; + structType.ptr.prototype.Field = function(i) { + var f = new StructField.ptr(), i, p, t, t$1, x; + t = this; + if (i < 0 || i >= t.fields.$length) { + return f; + } + p = (x = t.fields, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + f.Type = toType(p.typ); + if (!($pointerIsEqual(p.name, ptrType$4.nil))) { + f.Name = p.name.$get(); + } else { + t$1 = f.Type; + if (t$1.Kind() === 22) { + t$1 = t$1.Elem(); + } + f.Name = t$1.Name(); + f.Anonymous = true; + } + if (!($pointerIsEqual(p.pkgPath, ptrType$4.nil))) { + f.PkgPath = p.pkgPath.$get(); + } + if (!($pointerIsEqual(p.tag, ptrType$4.nil))) { + f.Tag = p.tag.$get(); + } + f.Offset = p.offset; + f.Index = new sliceType$9([i]); + return f; + }; + structType.prototype.Field = function(i) { return this.$val.Field(i); }; + structType.ptr.prototype.FieldByIndex = function(index) { + var _i, _ref, f = new StructField.ptr(), ft, i, index, t, x; + t = this; + f.Type = toType(t.rtype); + _ref = index; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + x = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (i > 0) { + ft = f.Type; + if ((ft.Kind() === 22) && (ft.Elem().Kind() === 25)) { + ft = ft.Elem(); + } + f.Type = ft; + } + $copy(f, f.Type.Field(x), StructField); + _i++; + } + return f; + }; + structType.prototype.FieldByIndex = function(index) { return this.$val.FieldByIndex(index); }; + structType.ptr.prototype.FieldByNameFunc = function(match) { + var _entry, _entry$1, _entry$2, _entry$3, _i, _i$1, _key, _key$1, _key$2, _key$3, _key$4, _key$5, _map, _map$1, _ref, _ref$1, _tmp, _tmp$1, _tmp$2, _tmp$3, count, current, f, fname, i, index, match, next, nextCount, ntyp, ok = false, result = new StructField.ptr(), scan, styp, t, t$1, visited, x; + t = this; + current = new sliceType$10([]); + next = new sliceType$10([new fieldScan.ptr(t, sliceType$9.nil)]); + nextCount = false; + visited = (_map = new $Map(), _map); + while (true) { + if (!(next.$length > 0)) { break; } + _tmp = next; _tmp$1 = $subslice(current, 0, 0); current = _tmp; next = _tmp$1; + count = nextCount; + nextCount = false; + _ref = current; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + scan = $clone(((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]), fieldScan); + t$1 = scan.typ; + if ((_entry = visited[t$1.$key()], _entry !== undefined ? _entry.v : false)) { + _i++; + continue; + } + _key$1 = t$1; (visited || $throwRuntimeError("assignment to entry in nil map"))[_key$1.$key()] = { k: _key$1, v: true }; + _ref$1 = t$1.fields; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$1.$length)) { break; } + i = _i$1; + f = (x = t$1.fields, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + fname = ""; + ntyp = ptrType$1.nil; + if (!($pointerIsEqual(f.name, ptrType$4.nil))) { + fname = f.name.$get(); + } else { + ntyp = f.typ; + if (ntyp.Kind() === 22) { + ntyp = ntyp.Elem().common(); + } + fname = ntyp.Name(); + } + if (match(fname)) { + if ((_entry$1 = count[t$1.$key()], _entry$1 !== undefined ? _entry$1.v : 0) > 1 || ok) { + _tmp$2 = new StructField.ptr("", "", $ifaceNil, "", 0, sliceType$9.nil, false); _tmp$3 = false; $copy(result, _tmp$2, StructField); ok = _tmp$3; + return [result, ok]; + } + $copy(result, t$1.Field(i), StructField); + result.Index = sliceType$9.nil; + result.Index = $appendSlice(result.Index, scan.index); + result.Index = $append(result.Index, i); + ok = true; + _i$1++; + continue; + } + if (ok || ntyp === ptrType$1.nil || !((ntyp.Kind() === 25))) { + _i$1++; + continue; + } + styp = ntyp.kindType; + if ((_entry$2 = nextCount[styp.$key()], _entry$2 !== undefined ? _entry$2.v : 0) > 0) { + _key$2 = styp; (nextCount || $throwRuntimeError("assignment to entry in nil map"))[_key$2.$key()] = { k: _key$2, v: 2 }; + _i$1++; + continue; + } + if (nextCount === false) { + nextCount = (_map$1 = new $Map(), _map$1); + } + _key$4 = styp; (nextCount || $throwRuntimeError("assignment to entry in nil map"))[_key$4.$key()] = { k: _key$4, v: 1 }; + if ((_entry$3 = count[t$1.$key()], _entry$3 !== undefined ? _entry$3.v : 0) > 1) { + _key$5 = styp; (nextCount || $throwRuntimeError("assignment to entry in nil map"))[_key$5.$key()] = { k: _key$5, v: 2 }; + } + index = sliceType$9.nil; + index = $appendSlice(index, scan.index); + index = $append(index, i); + next = $append(next, new fieldScan.ptr(styp, index)); + _i$1++; + } + _i++; + } + if (ok) { + break; + } + } + return [result, ok]; + }; + structType.prototype.FieldByNameFunc = function(match) { return this.$val.FieldByNameFunc(match); }; + structType.ptr.prototype.FieldByName = function(name) { + var _i, _ref, _tmp, _tmp$1, _tuple, f = new StructField.ptr(), hasAnon, i, name, present = false, t, tf, x; + t = this; + hasAnon = false; + if (!(name === "")) { + _ref = t.fields; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + tf = (x = t.fields, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + if ($pointerIsEqual(tf.name, ptrType$4.nil)) { + hasAnon = true; + _i++; + continue; + } + if (tf.name.$get() === name) { + _tmp = $clone(t.Field(i), StructField); _tmp$1 = true; $copy(f, _tmp, StructField); present = _tmp$1; + return [f, present]; + } + _i++; + } + } + if (!hasAnon) { + return [f, present]; + } + _tuple = t.FieldByNameFunc((function(s) { + var s; + return s === name; + })); $copy(f, _tuple[0], StructField); present = _tuple[1]; + return [f, present]; + }; + structType.prototype.FieldByName = function(name) { return this.$val.FieldByName(name); }; + PtrTo = $pkg.PtrTo = function(t) { + var t; + return $assertType(t, ptrType$1).ptrTo(); + }; + rtype.ptr.prototype.Implements = function(u) { + var t, u; + t = this; + if ($interfaceIsEqual(u, $ifaceNil)) { + $panic(new $String("reflect: nil type passed to Type.Implements")); + } + if (!((u.Kind() === 20))) { + $panic(new $String("reflect: non-interface type passed to Type.Implements")); + } + return implements$1($assertType(u, ptrType$1), t); + }; + rtype.prototype.Implements = function(u) { return this.$val.Implements(u); }; + rtype.ptr.prototype.AssignableTo = function(u) { + var t, u, uu; + t = this; + if ($interfaceIsEqual(u, $ifaceNil)) { + $panic(new $String("reflect: nil type passed to Type.AssignableTo")); + } + uu = $assertType(u, ptrType$1); + return directlyAssignable(uu, t) || implements$1(uu, t); + }; + rtype.prototype.AssignableTo = function(u) { return this.$val.AssignableTo(u); }; + rtype.ptr.prototype.ConvertibleTo = function(u) { + var t, u, uu; + t = this; + if ($interfaceIsEqual(u, $ifaceNil)) { + $panic(new $String("reflect: nil type passed to Type.ConvertibleTo")); + } + uu = $assertType(u, ptrType$1); + return !(convertOp(uu, t) === $throwNilPointerError); + }; + rtype.prototype.ConvertibleTo = function(u) { return this.$val.ConvertibleTo(u); }; + implements$1 = function(T, V) { + var T, V, i, i$1, j, j$1, t, tm, tm$1, v, v$1, vm, vm$1, x, x$1, x$2, x$3; + if (!((T.Kind() === 20))) { + return false; + } + t = T.kindType; + if (t.methods.$length === 0) { + return true; + } + if (V.Kind() === 20) { + v = V.kindType; + i = 0; + j = 0; + while (true) { + if (!(j < v.methods.$length)) { break; } + tm = (x = t.methods, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + vm = (x$1 = v.methods, ((j < 0 || j >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + j])); + if ($pointerIsEqual(vm.name, tm.name) && $pointerIsEqual(vm.pkgPath, tm.pkgPath) && vm.typ === tm.typ) { + i = i + (1) >> 0; + if (i >= t.methods.$length) { + return true; + } + } + j = j + (1) >> 0; + } + return false; + } + v$1 = V.uncommonType.uncommon(); + if (v$1 === ptrType$5.nil) { + return false; + } + i$1 = 0; + j$1 = 0; + while (true) { + if (!(j$1 < v$1.methods.$length)) { break; } + tm$1 = (x$2 = t.methods, ((i$1 < 0 || i$1 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + i$1])); + vm$1 = (x$3 = v$1.methods, ((j$1 < 0 || j$1 >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + j$1])); + if ($pointerIsEqual(vm$1.name, tm$1.name) && $pointerIsEqual(vm$1.pkgPath, tm$1.pkgPath) && vm$1.mtyp === tm$1.typ) { + i$1 = i$1 + (1) >> 0; + if (i$1 >= t.methods.$length) { + return true; + } + } + j$1 = j$1 + (1) >> 0; + } + return false; + }; + directlyAssignable = function(T, V) { + var T, V; + if (T === V) { + return true; + } + if (!(T.Name() === "") && !(V.Name() === "") || !((T.Kind() === V.Kind()))) { + return false; + } + return haveIdenticalUnderlyingType(T, V); + }; + haveIdenticalUnderlyingType = function(T, V) { + var T, V, _i, _i$1, _i$2, _ref, _ref$1, _ref$2, _ref$3, i, i$1, i$2, kind, t, t$1, t$2, tf, typ, typ$1, v, v$1, v$2, vf, x, x$1, x$2, x$3; + if (T === V) { + return true; + } + kind = T.Kind(); + if (!((kind === V.Kind()))) { + return false; + } + if (1 <= kind && kind <= 16 || (kind === 24) || (kind === 26)) { + return true; + } + _ref = kind; + if (_ref === 17) { + return $interfaceIsEqual(T.Elem(), V.Elem()) && (T.Len() === V.Len()); + } else if (_ref === 18) { + if ((V.ChanDir() === 3) && $interfaceIsEqual(T.Elem(), V.Elem())) { + return true; + } + return (V.ChanDir() === T.ChanDir()) && $interfaceIsEqual(T.Elem(), V.Elem()); + } else if (_ref === 19) { + t = T.kindType; + v = V.kindType; + if (!(t.dotdotdot === v.dotdotdot) || !((t.in$2.$length === v.in$2.$length)) || !((t.out.$length === v.out.$length))) { + return false; + } + _ref$1 = t.in$2; + _i = 0; + while (true) { + if (!(_i < _ref$1.$length)) { break; } + i = _i; + typ = ((_i < 0 || _i >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i]); + if (!(typ === (x = v.in$2, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])))) { + return false; + } + _i++; + } + _ref$2 = t.out; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$2.$length)) { break; } + i$1 = _i$1; + typ$1 = ((_i$1 < 0 || _i$1 >= _ref$2.$length) ? $throwRuntimeError("index out of range") : _ref$2.$array[_ref$2.$offset + _i$1]); + if (!(typ$1 === (x$1 = v.out, ((i$1 < 0 || i$1 >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + i$1])))) { + return false; + } + _i$1++; + } + return true; + } else if (_ref === 20) { + t$1 = T.kindType; + v$1 = V.kindType; + if ((t$1.methods.$length === 0) && (v$1.methods.$length === 0)) { + return true; + } + return false; + } else if (_ref === 21) { + return $interfaceIsEqual(T.Key(), V.Key()) && $interfaceIsEqual(T.Elem(), V.Elem()); + } else if (_ref === 22 || _ref === 23) { + return $interfaceIsEqual(T.Elem(), V.Elem()); + } else if (_ref === 25) { + t$2 = T.kindType; + v$2 = V.kindType; + if (!((t$2.fields.$length === v$2.fields.$length))) { + return false; + } + _ref$3 = t$2.fields; + _i$2 = 0; + while (true) { + if (!(_i$2 < _ref$3.$length)) { break; } + i$2 = _i$2; + tf = (x$2 = t$2.fields, ((i$2 < 0 || i$2 >= x$2.$length) ? $throwRuntimeError("index out of range") : x$2.$array[x$2.$offset + i$2])); + vf = (x$3 = v$2.fields, ((i$2 < 0 || i$2 >= x$3.$length) ? $throwRuntimeError("index out of range") : x$3.$array[x$3.$offset + i$2])); + if (!($pointerIsEqual(tf.name, vf.name)) && ($pointerIsEqual(tf.name, ptrType$4.nil) || $pointerIsEqual(vf.name, ptrType$4.nil) || !(tf.name.$get() === vf.name.$get()))) { + return false; + } + if (!($pointerIsEqual(tf.pkgPath, vf.pkgPath)) && ($pointerIsEqual(tf.pkgPath, ptrType$4.nil) || $pointerIsEqual(vf.pkgPath, ptrType$4.nil) || !(tf.pkgPath.$get() === vf.pkgPath.$get()))) { + return false; + } + if (!(tf.typ === vf.typ)) { + return false; + } + if (!($pointerIsEqual(tf.tag, vf.tag)) && ($pointerIsEqual(tf.tag, ptrType$4.nil) || $pointerIsEqual(vf.tag, ptrType$4.nil) || !(tf.tag.$get() === vf.tag.$get()))) { + return false; + } + if (!((tf.offset === vf.offset))) { + return false; + } + _i$2++; + } + return true; + } + return false; + }; + toType = function(t) { + var t; + if (t === ptrType$1.nil) { + return $ifaceNil; + } + return t; + }; + ifaceIndir = function(t) { + var t; + return ((t.kind & 32) >>> 0) === 0; + }; + flag.prototype.kind = function() { + var f; + f = this.$val; + return (((f & 31) >>> 0) >>> 0); + }; + $ptrType(flag).prototype.kind = function() { return new flag(this.$get()).kind(); }; + Value.ptr.prototype.pointer = function() { + var v; + v = this; + if (!((v.typ.size === 4)) || !v.typ.pointers()) { + $panic(new $String("can't call pointer on a non-pointer Value")); + } + if (!((((v.flag & 64) >>> 0) === 0))) { + return v.ptr.$get(); + } + return v.ptr; + }; + Value.prototype.pointer = function() { return this.$val.pointer(); }; + ValueError.ptr.prototype.Error = function() { + var e; + e = this; + if (e.Kind === 0) { + return "reflect: call of " + e.Method + " on zero Value"; + } + return "reflect: call of " + e.Method + " on " + new Kind(e.Kind).String() + " Value"; + }; + ValueError.prototype.Error = function() { return this.$val.Error(); }; + flag.prototype.mustBe = function(expected) { + var expected, f; + f = this.$val; + if (!((new flag(f).kind() === expected))) { + $panic(new ValueError.ptr(methodName(), new flag(f).kind())); + } + }; + $ptrType(flag).prototype.mustBe = function(expected) { return new flag(this.$get()).mustBe(expected); }; + flag.prototype.mustBeExported = function() { + var f; + f = this.$val; + if (f === 0) { + $panic(new ValueError.ptr(methodName(), 0)); + } + if (!((((f & 32) >>> 0) === 0))) { + $panic(new $String("reflect: " + methodName() + " using value obtained using unexported field")); + } + }; + $ptrType(flag).prototype.mustBeExported = function() { return new flag(this.$get()).mustBeExported(); }; + flag.prototype.mustBeAssignable = function() { + var f; + f = this.$val; + if (f === 0) { + $panic(new ValueError.ptr(methodName(), 0)); + } + if (!((((f & 32) >>> 0) === 0))) { + $panic(new $String("reflect: " + methodName() + " using value obtained using unexported field")); + } + if (((f & 128) >>> 0) === 0) { + $panic(new $String("reflect: " + methodName() + " using unaddressable value")); + } + }; + $ptrType(flag).prototype.mustBeAssignable = function() { return new flag(this.$get()).mustBeAssignable(); }; + Value.ptr.prototype.Addr = function() { + var v; + v = this; + if (((v.flag & 128) >>> 0) === 0) { + $panic(new $String("reflect.Value.Addr of unaddressable value")); + } + return new Value.ptr(v.typ.ptrTo(), v.ptr, ((((v.flag & 32) >>> 0)) | 22) >>> 0); + }; + Value.prototype.Addr = function() { return this.$val.Addr(); }; + Value.ptr.prototype.Bool = function() { + var v; + v = this; + new flag(v.flag).mustBe(1); + return v.ptr.$get(); + }; + Value.prototype.Bool = function() { return this.$val.Bool(); }; + Value.ptr.prototype.Bytes = function() { + var v; + v = this; + new flag(v.flag).mustBe(23); + if (!((v.typ.Elem().Kind() === 8))) { + $panic(new $String("reflect.Value.Bytes of non-byte slice")); + } + return v.ptr.$get(); + }; + Value.prototype.Bytes = function() { return this.$val.Bytes(); }; + Value.ptr.prototype.runes = function() { + var v; + v = this; + new flag(v.flag).mustBe(23); + if (!((v.typ.Elem().Kind() === 5))) { + $panic(new $String("reflect.Value.Bytes of non-rune slice")); + } + return v.ptr.$get(); + }; + Value.prototype.runes = function() { return this.$val.runes(); }; + Value.ptr.prototype.CanAddr = function() { + var v; + v = this; + return !((((v.flag & 128) >>> 0) === 0)); + }; + Value.prototype.CanAddr = function() { return this.$val.CanAddr(); }; + Value.ptr.prototype.CanSet = function() { + var v; + v = this; + return ((v.flag & 160) >>> 0) === 128; + }; + Value.prototype.CanSet = function() { return this.$val.CanSet(); }; + Value.ptr.prototype.Call = function(in$1) { + var in$1, v; + v = this; + new flag(v.flag).mustBe(19); + new flag(v.flag).mustBeExported(); + return v.call("Call", in$1); + }; + Value.prototype.Call = function(in$1) { return this.$val.Call(in$1); }; + Value.ptr.prototype.CallSlice = function(in$1) { + var in$1, v; + v = this; + new flag(v.flag).mustBe(19); + new flag(v.flag).mustBeExported(); + return v.call("CallSlice", in$1); + }; + Value.prototype.CallSlice = function(in$1) { return this.$val.CallSlice(in$1); }; + Value.ptr.prototype.Complex = function() { + var _ref, k, v, x; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 15) { + return (x = v.ptr.$get(), new $Complex128(x.$real, x.$imag)); + } else if (_ref === 16) { + return v.ptr.$get(); + } + $panic(new ValueError.ptr("reflect.Value.Complex", new flag(v.flag).kind())); + }; + Value.prototype.Complex = function() { return this.$val.Complex(); }; + Value.ptr.prototype.FieldByIndex = function(index) { + var _i, _ref, i, index, v, x; + v = this; + if (index.$length === 1) { + return v.Field(((0 < 0 || 0 >= index.$length) ? $throwRuntimeError("index out of range") : index.$array[index.$offset + 0])); + } + new flag(v.flag).mustBe(25); + _ref = index; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + x = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (i > 0) { + if ((v.Kind() === 22) && (v.typ.Elem().Kind() === 25)) { + if (v.IsNil()) { + $panic(new $String("reflect: indirection through nil pointer to embedded struct")); + } + v = v.Elem(); + } + } + v = v.Field(x); + _i++; + } + return v; + }; + Value.prototype.FieldByIndex = function(index) { return this.$val.FieldByIndex(index); }; + Value.ptr.prototype.FieldByName = function(name) { + var _tuple, f, name, ok, v; + v = this; + new flag(v.flag).mustBe(25); + _tuple = v.typ.FieldByName(name); f = $clone(_tuple[0], StructField); ok = _tuple[1]; + if (ok) { + return v.FieldByIndex(f.Index); + } + return new Value.ptr(ptrType$1.nil, 0, 0); + }; + Value.prototype.FieldByName = function(name) { return this.$val.FieldByName(name); }; + Value.ptr.prototype.FieldByNameFunc = function(match) { + var _tuple, f, match, ok, v; + v = this; + _tuple = v.typ.FieldByNameFunc(match); f = $clone(_tuple[0], StructField); ok = _tuple[1]; + if (ok) { + return v.FieldByIndex(f.Index); + } + return new Value.ptr(ptrType$1.nil, 0, 0); + }; + Value.prototype.FieldByNameFunc = function(match) { return this.$val.FieldByNameFunc(match); }; + Value.ptr.prototype.Float = function() { + var _ref, k, v; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 13) { + return $coerceFloat32(v.ptr.$get()); + } else if (_ref === 14) { + return v.ptr.$get(); + } + $panic(new ValueError.ptr("reflect.Value.Float", new flag(v.flag).kind())); + }; + Value.prototype.Float = function() { return this.$val.Float(); }; + Value.ptr.prototype.Int = function() { + var _ref, k, p, v; + v = this; + k = new flag(v.flag).kind(); + p = v.ptr; + _ref = k; + if (_ref === 2) { + return new $Int64(0, p.$get()); + } else if (_ref === 3) { + return new $Int64(0, p.$get()); + } else if (_ref === 4) { + return new $Int64(0, p.$get()); + } else if (_ref === 5) { + return new $Int64(0, p.$get()); + } else if (_ref === 6) { + return p.$get(); + } + $panic(new ValueError.ptr("reflect.Value.Int", new flag(v.flag).kind())); + }; + Value.prototype.Int = function() { return this.$val.Int(); }; + Value.ptr.prototype.CanInterface = function() { + var v; + v = this; + if (v.flag === 0) { + $panic(new ValueError.ptr("reflect.Value.CanInterface", 0)); + } + return ((v.flag & 32) >>> 0) === 0; + }; + Value.prototype.CanInterface = function() { return this.$val.CanInterface(); }; + Value.ptr.prototype.Interface = function() { + var i = $ifaceNil, v; + v = this; + i = valueInterface(v, true); + return i; + }; + Value.prototype.Interface = function() { return this.$val.Interface(); }; + Value.ptr.prototype.InterfaceData = function() { + var v; + v = this; + new flag(v.flag).mustBe(20); + return v.ptr; + }; + Value.prototype.InterfaceData = function() { return this.$val.InterfaceData(); }; + Value.ptr.prototype.IsValid = function() { + var v; + v = this; + return !((v.flag === 0)); + }; + Value.prototype.IsValid = function() { return this.$val.IsValid(); }; + Value.ptr.prototype.Kind = function() { + var v; + v = this; + return new flag(v.flag).kind(); + }; + Value.prototype.Kind = function() { return this.$val.Kind(); }; + Value.ptr.prototype.MapIndex = function(key) { + var c, e, fl, k, key, tt, typ, v; + v = this; + key = key; + new flag(v.flag).mustBe(21); + tt = v.typ.kindType; + key = key.assignTo("reflect.Value.MapIndex", tt.key, 0); + k = 0; + if (!((((key.flag & 64) >>> 0) === 0))) { + k = key.ptr; + } else { + k = new ptrType$17(function() { return this.$target.ptr; }, function($v) { this.$target.ptr = $v; }, key); + } + e = mapaccess(v.typ, v.pointer(), k); + if (e === 0) { + return new Value.ptr(ptrType$1.nil, 0, 0); + } + typ = tt.elem; + fl = ((((v.flag | key.flag) >>> 0)) & 32) >>> 0; + fl = (fl | ((typ.Kind() >>> 0))) >>> 0; + if (ifaceIndir(typ)) { + c = unsafe_New(typ); + memmove(c, e, typ.size); + return new Value.ptr(typ, c, (fl | 64) >>> 0); + } else { + return new Value.ptr(typ, e.$get(), fl); + } + }; + Value.prototype.MapIndex = function(key) { return this.$val.MapIndex(key); }; + Value.ptr.prototype.MapKeys = function() { + var a, c, fl, i, it, key, keyType, m, mlen, tt, v; + v = this; + new flag(v.flag).mustBe(21); + tt = v.typ.kindType; + keyType = tt.key; + fl = (((v.flag & 32) >>> 0) | (keyType.Kind() >>> 0)) >>> 0; + m = v.pointer(); + mlen = 0; + if (!(m === 0)) { + mlen = maplen(m); + } + it = mapiterinit(v.typ, m); + a = $makeSlice(sliceType$6, mlen); + i = 0; + i = 0; + while (true) { + if (!(i < a.$length)) { break; } + key = mapiterkey(it); + if (key === 0) { + break; + } + if (ifaceIndir(keyType)) { + c = unsafe_New(keyType); + memmove(c, key, keyType.size); + (i < 0 || i >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + i] = new Value.ptr(keyType, c, (fl | 64) >>> 0); + } else { + (i < 0 || i >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + i] = new Value.ptr(keyType, key.$get(), fl); + } + mapiternext(it); + i = i + (1) >> 0; + } + return $subslice(a, 0, i); + }; + Value.prototype.MapKeys = function() { return this.$val.MapKeys(); }; + Value.ptr.prototype.Method = function(i) { + var fl, i, v; + v = this; + if (v.typ === ptrType$1.nil) { + $panic(new ValueError.ptr("reflect.Value.Method", 0)); + } + if (!((((v.flag & 256) >>> 0) === 0)) || (i >>> 0) >= (v.typ.NumMethod() >>> 0)) { + $panic(new $String("reflect: Method index out of range")); + } + if ((v.typ.Kind() === 20) && v.IsNil()) { + $panic(new $String("reflect: Method on nil interface value")); + } + fl = (v.flag & 96) >>> 0; + fl = (fl | (19)) >>> 0; + fl = (fl | (((((i >>> 0) << 9 >>> 0) | 256) >>> 0))) >>> 0; + return new Value.ptr(v.typ, v.ptr, fl); + }; + Value.prototype.Method = function(i) { return this.$val.Method(i); }; + Value.ptr.prototype.NumMethod = function() { + var v; + v = this; + if (v.typ === ptrType$1.nil) { + $panic(new ValueError.ptr("reflect.Value.NumMethod", 0)); + } + if (!((((v.flag & 256) >>> 0) === 0))) { + return 0; + } + return v.typ.NumMethod(); + }; + Value.prototype.NumMethod = function() { return this.$val.NumMethod(); }; + Value.ptr.prototype.MethodByName = function(name) { + var _tuple, m, name, ok, v; + v = this; + if (v.typ === ptrType$1.nil) { + $panic(new ValueError.ptr("reflect.Value.MethodByName", 0)); + } + if (!((((v.flag & 256) >>> 0) === 0))) { + return new Value.ptr(ptrType$1.nil, 0, 0); + } + _tuple = v.typ.MethodByName(name); m = $clone(_tuple[0], Method); ok = _tuple[1]; + if (!ok) { + return new Value.ptr(ptrType$1.nil, 0, 0); + } + return v.Method(m.Index); + }; + Value.prototype.MethodByName = function(name) { return this.$val.MethodByName(name); }; + Value.ptr.prototype.NumField = function() { + var tt, v; + v = this; + new flag(v.flag).mustBe(25); + tt = v.typ.kindType; + return tt.fields.$length; + }; + Value.prototype.NumField = function() { return this.$val.NumField(); }; + Value.ptr.prototype.OverflowComplex = function(x) { + var _ref, k, v, x; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 15) { + return overflowFloat32(x.$real) || overflowFloat32(x.$imag); + } else if (_ref === 16) { + return false; + } + $panic(new ValueError.ptr("reflect.Value.OverflowComplex", new flag(v.flag).kind())); + }; + Value.prototype.OverflowComplex = function(x) { return this.$val.OverflowComplex(x); }; + Value.ptr.prototype.OverflowFloat = function(x) { + var _ref, k, v, x; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 13) { + return overflowFloat32(x); + } else if (_ref === 14) { + return false; + } + $panic(new ValueError.ptr("reflect.Value.OverflowFloat", new flag(v.flag).kind())); + }; + Value.prototype.OverflowFloat = function(x) { return this.$val.OverflowFloat(x); }; + overflowFloat32 = function(x) { + var x; + if (x < 0) { + x = -x; + } + return 3.4028234663852886e+38 < x && x <= 1.7976931348623157e+308; + }; + Value.ptr.prototype.OverflowInt = function(x) { + var _ref, bitSize, k, trunc, v, x, x$1; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 2 || _ref === 3 || _ref === 4 || _ref === 5 || _ref === 6) { + bitSize = (x$1 = v.typ.size, (((x$1 >>> 16 << 16) * 8 >>> 0) + (x$1 << 16 >>> 16) * 8) >>> 0); + trunc = $shiftRightInt64(($shiftLeft64(x, ((64 - bitSize >>> 0)))), ((64 - bitSize >>> 0))); + return !((x.$high === trunc.$high && x.$low === trunc.$low)); + } + $panic(new ValueError.ptr("reflect.Value.OverflowInt", new flag(v.flag).kind())); + }; + Value.prototype.OverflowInt = function(x) { return this.$val.OverflowInt(x); }; + Value.ptr.prototype.OverflowUint = function(x) { + var _ref, bitSize, k, trunc, v, x, x$1; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 7 || _ref === 12 || _ref === 8 || _ref === 9 || _ref === 10 || _ref === 11) { + bitSize = (x$1 = v.typ.size, (((x$1 >>> 16 << 16) * 8 >>> 0) + (x$1 << 16 >>> 16) * 8) >>> 0); + trunc = $shiftRightUint64(($shiftLeft64(x, ((64 - bitSize >>> 0)))), ((64 - bitSize >>> 0))); + return !((x.$high === trunc.$high && x.$low === trunc.$low)); + } + $panic(new ValueError.ptr("reflect.Value.OverflowUint", new flag(v.flag).kind())); + }; + Value.prototype.OverflowUint = function(x) { return this.$val.OverflowUint(x); }; + Value.ptr.prototype.SetBool = function(x) { + var v, x; + v = this; + new flag(v.flag).mustBeAssignable(); + new flag(v.flag).mustBe(1); + v.ptr.$set(x); + }; + Value.prototype.SetBool = function(x) { return this.$val.SetBool(x); }; + Value.ptr.prototype.SetBytes = function(x) { + var v, x; + v = this; + new flag(v.flag).mustBeAssignable(); + new flag(v.flag).mustBe(23); + if (!((v.typ.Elem().Kind() === 8))) { + $panic(new $String("reflect.Value.SetBytes of non-byte slice")); + } + v.ptr.$set(x); + }; + Value.prototype.SetBytes = function(x) { return this.$val.SetBytes(x); }; + Value.ptr.prototype.setRunes = function(x) { + var v, x; + v = this; + new flag(v.flag).mustBeAssignable(); + new flag(v.flag).mustBe(23); + if (!((v.typ.Elem().Kind() === 5))) { + $panic(new $String("reflect.Value.setRunes of non-rune slice")); + } + v.ptr.$set(x); + }; + Value.prototype.setRunes = function(x) { return this.$val.setRunes(x); }; + Value.ptr.prototype.SetComplex = function(x) { + var _ref, k, v, x; + v = this; + new flag(v.flag).mustBeAssignable(); + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 15) { + v.ptr.$set(new $Complex64(x.$real, x.$imag)); + } else if (_ref === 16) { + v.ptr.$set(x); + } else { + $panic(new ValueError.ptr("reflect.Value.SetComplex", new flag(v.flag).kind())); + } + }; + Value.prototype.SetComplex = function(x) { return this.$val.SetComplex(x); }; + Value.ptr.prototype.SetFloat = function(x) { + var _ref, k, v, x; + v = this; + new flag(v.flag).mustBeAssignable(); + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 13) { + v.ptr.$set(x); + } else if (_ref === 14) { + v.ptr.$set(x); + } else { + $panic(new ValueError.ptr("reflect.Value.SetFloat", new flag(v.flag).kind())); + } + }; + Value.prototype.SetFloat = function(x) { return this.$val.SetFloat(x); }; + Value.ptr.prototype.SetInt = function(x) { + var _ref, k, v, x; + v = this; + new flag(v.flag).mustBeAssignable(); + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 2) { + v.ptr.$set(((x.$low + ((x.$high >> 31) * 4294967296)) >> 0)); + } else if (_ref === 3) { + v.ptr.$set(((x.$low + ((x.$high >> 31) * 4294967296)) << 24 >> 24)); + } else if (_ref === 4) { + v.ptr.$set(((x.$low + ((x.$high >> 31) * 4294967296)) << 16 >> 16)); + } else if (_ref === 5) { + v.ptr.$set(((x.$low + ((x.$high >> 31) * 4294967296)) >> 0)); + } else if (_ref === 6) { + v.ptr.$set(x); + } else { + $panic(new ValueError.ptr("reflect.Value.SetInt", new flag(v.flag).kind())); + } + }; + Value.prototype.SetInt = function(x) { return this.$val.SetInt(x); }; + Value.ptr.prototype.SetMapIndex = function(key, val) { + var e, k, key, tt, v, val; + v = this; + val = val; + key = key; + new flag(v.flag).mustBe(21); + new flag(v.flag).mustBeExported(); + new flag(key.flag).mustBeExported(); + tt = v.typ.kindType; + key = key.assignTo("reflect.Value.SetMapIndex", tt.key, 0); + k = 0; + if (!((((key.flag & 64) >>> 0) === 0))) { + k = key.ptr; + } else { + k = new ptrType$17(function() { return this.$target.ptr; }, function($v) { this.$target.ptr = $v; }, key); + } + if (val.typ === ptrType$1.nil) { + mapdelete(v.typ, v.pointer(), k); + return; + } + new flag(val.flag).mustBeExported(); + val = val.assignTo("reflect.Value.SetMapIndex", tt.elem, 0); + e = 0; + if (!((((val.flag & 64) >>> 0) === 0))) { + e = val.ptr; + } else { + e = new ptrType$17(function() { return this.$target.ptr; }, function($v) { this.$target.ptr = $v; }, val); + } + mapassign(v.typ, v.pointer(), k, e); + }; + Value.prototype.SetMapIndex = function(key, val) { return this.$val.SetMapIndex(key, val); }; + Value.ptr.prototype.SetUint = function(x) { + var _ref, k, v, x; + v = this; + new flag(v.flag).mustBeAssignable(); + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 7) { + v.ptr.$set((x.$low >>> 0)); + } else if (_ref === 8) { + v.ptr.$set((x.$low << 24 >>> 24)); + } else if (_ref === 9) { + v.ptr.$set((x.$low << 16 >>> 16)); + } else if (_ref === 10) { + v.ptr.$set((x.$low >>> 0)); + } else if (_ref === 11) { + v.ptr.$set(x); + } else if (_ref === 12) { + v.ptr.$set((x.$low >>> 0)); + } else { + $panic(new ValueError.ptr("reflect.Value.SetUint", new flag(v.flag).kind())); + } + }; + Value.prototype.SetUint = function(x) { return this.$val.SetUint(x); }; + Value.ptr.prototype.SetPointer = function(x) { + var v, x; + v = this; + new flag(v.flag).mustBeAssignable(); + new flag(v.flag).mustBe(26); + v.ptr.$set(x); + }; + Value.prototype.SetPointer = function(x) { return this.$val.SetPointer(x); }; + Value.ptr.prototype.SetString = function(x) { + var v, x; + v = this; + new flag(v.flag).mustBeAssignable(); + new flag(v.flag).mustBe(24); + v.ptr.$set(x); + }; + Value.prototype.SetString = function(x) { return this.$val.SetString(x); }; + Value.ptr.prototype.String = function() { + var _ref, k, v; + v = this; + k = new flag(v.flag).kind(); + _ref = k; + if (_ref === 0) { + return ""; + } else if (_ref === 24) { + return v.ptr.$get(); + } + return "<" + v.Type().String() + " Value>"; + }; + Value.prototype.String = function() { return this.$val.String(); }; + Value.ptr.prototype.Type = function() { + var f, i, m, m$1, tt, ut, v, x, x$1; + v = this; + f = v.flag; + if (f === 0) { + $panic(new ValueError.ptr("reflect.Value.Type", 0)); + } + if (((f & 256) >>> 0) === 0) { + return v.typ; + } + i = (v.flag >> 0) >> 9 >> 0; + if (v.typ.Kind() === 20) { + tt = v.typ.kindType; + if ((i >>> 0) >= (tt.methods.$length >>> 0)) { + $panic(new $String("reflect: internal error: invalid method index")); + } + m = (x = tt.methods, ((i < 0 || i >= x.$length) ? $throwRuntimeError("index out of range") : x.$array[x.$offset + i])); + return m.typ; + } + ut = v.typ.uncommonType.uncommon(); + if (ut === ptrType$5.nil || (i >>> 0) >= (ut.methods.$length >>> 0)) { + $panic(new $String("reflect: internal error: invalid method index")); + } + m$1 = (x$1 = ut.methods, ((i < 0 || i >= x$1.$length) ? $throwRuntimeError("index out of range") : x$1.$array[x$1.$offset + i])); + return m$1.mtyp; + }; + Value.prototype.Type = function() { return this.$val.Type(); }; + Value.ptr.prototype.Uint = function() { + var _ref, k, p, v, x; + v = this; + k = new flag(v.flag).kind(); + p = v.ptr; + _ref = k; + if (_ref === 7) { + return new $Uint64(0, p.$get()); + } else if (_ref === 8) { + return new $Uint64(0, p.$get()); + } else if (_ref === 9) { + return new $Uint64(0, p.$get()); + } else if (_ref === 10) { + return new $Uint64(0, p.$get()); + } else if (_ref === 11) { + return p.$get(); + } else if (_ref === 12) { + return (x = p.$get(), new $Uint64(0, x.constructor === Number ? x : 1)); + } + $panic(new ValueError.ptr("reflect.Value.Uint", new flag(v.flag).kind())); + }; + Value.prototype.Uint = function() { return this.$val.Uint(); }; + Value.ptr.prototype.UnsafeAddr = function() { + var v; + v = this; + if (v.typ === ptrType$1.nil) { + $panic(new ValueError.ptr("reflect.Value.UnsafeAddr", 0)); + } + if (((v.flag & 128) >>> 0) === 0) { + $panic(new $String("reflect.Value.UnsafeAddr of unaddressable value")); + } + return v.ptr; + }; + Value.prototype.UnsafeAddr = function() { return this.$val.UnsafeAddr(); }; + New = $pkg.New = function(typ) { + var fl, ptr, typ; + if ($interfaceIsEqual(typ, $ifaceNil)) { + $panic(new $String("reflect: New(nil)")); + } + ptr = unsafe_New($assertType(typ, ptrType$1)); + fl = 22; + return new Value.ptr(typ.common().ptrTo(), ptr, fl); + }; + Value.ptr.prototype.assignTo = function(context, dst, target) { + var context, dst, fl, target, v, x; + v = this; + if (!((((v.flag & 256) >>> 0) === 0))) { + v = makeMethodValue(context, v); + } + if (directlyAssignable(dst, v.typ)) { + v.typ = dst; + fl = (v.flag & 224) >>> 0; + fl = (fl | ((dst.Kind() >>> 0))) >>> 0; + return new Value.ptr(dst, v.ptr, fl); + } else if (implements$1(dst, v.typ)) { + if (target === 0) { + target = unsafe_New(dst); + } + x = valueInterface(v, false); + if (dst.NumMethod() === 0) { + target.$set(x); + } else { + ifaceE2I(dst, x, target); + } + return new Value.ptr(dst, target, 84); + } + $panic(new $String(context + ": value of type " + v.typ.String() + " is not assignable to type " + dst.String())); + }; + Value.prototype.assignTo = function(context, dst, target) { return this.$val.assignTo(context, dst, target); }; + Value.ptr.prototype.Convert = function(t) { + var op, t, v; + v = this; + if (!((((v.flag & 256) >>> 0) === 0))) { + v = makeMethodValue("Convert", v); + } + op = convertOp(t.common(), v.typ); + if (op === $throwNilPointerError) { + $panic(new $String("reflect.Value.Convert: value of type " + v.typ.String() + " cannot be converted to type " + t.String())); + } + return op(v, t); + }; + Value.prototype.Convert = function(t) { return this.$val.Convert(t); }; + convertOp = function(dst, src) { + var _ref, _ref$1, _ref$2, _ref$3, _ref$4, _ref$5, _ref$6, dst, src; + _ref = src.Kind(); + if (_ref === 2 || _ref === 3 || _ref === 4 || _ref === 5 || _ref === 6) { + _ref$1 = dst.Kind(); + if (_ref$1 === 2 || _ref$1 === 3 || _ref$1 === 4 || _ref$1 === 5 || _ref$1 === 6 || _ref$1 === 7 || _ref$1 === 8 || _ref$1 === 9 || _ref$1 === 10 || _ref$1 === 11 || _ref$1 === 12) { + return cvtInt; + } else if (_ref$1 === 13 || _ref$1 === 14) { + return cvtIntFloat; + } else if (_ref$1 === 24) { + return cvtIntString; + } + } else if (_ref === 7 || _ref === 8 || _ref === 9 || _ref === 10 || _ref === 11 || _ref === 12) { + _ref$2 = dst.Kind(); + if (_ref$2 === 2 || _ref$2 === 3 || _ref$2 === 4 || _ref$2 === 5 || _ref$2 === 6 || _ref$2 === 7 || _ref$2 === 8 || _ref$2 === 9 || _ref$2 === 10 || _ref$2 === 11 || _ref$2 === 12) { + return cvtUint; + } else if (_ref$2 === 13 || _ref$2 === 14) { + return cvtUintFloat; + } else if (_ref$2 === 24) { + return cvtUintString; + } + } else if (_ref === 13 || _ref === 14) { + _ref$3 = dst.Kind(); + if (_ref$3 === 2 || _ref$3 === 3 || _ref$3 === 4 || _ref$3 === 5 || _ref$3 === 6) { + return cvtFloatInt; + } else if (_ref$3 === 7 || _ref$3 === 8 || _ref$3 === 9 || _ref$3 === 10 || _ref$3 === 11 || _ref$3 === 12) { + return cvtFloatUint; + } else if (_ref$3 === 13 || _ref$3 === 14) { + return cvtFloat; + } + } else if (_ref === 15 || _ref === 16) { + _ref$4 = dst.Kind(); + if (_ref$4 === 15 || _ref$4 === 16) { + return cvtComplex; + } + } else if (_ref === 24) { + if ((dst.Kind() === 23) && dst.Elem().PkgPath() === "") { + _ref$5 = dst.Elem().Kind(); + if (_ref$5 === 8) { + return cvtStringBytes; + } else if (_ref$5 === 5) { + return cvtStringRunes; + } + } + } else if (_ref === 23) { + if ((dst.Kind() === 24) && src.Elem().PkgPath() === "") { + _ref$6 = src.Elem().Kind(); + if (_ref$6 === 8) { + return cvtBytesString; + } else if (_ref$6 === 5) { + return cvtRunesString; + } + } + } + if (haveIdenticalUnderlyingType(dst, src)) { + return cvtDirect; + } + if ((dst.Kind() === 22) && dst.Name() === "" && (src.Kind() === 22) && src.Name() === "" && haveIdenticalUnderlyingType(dst.Elem().common(), src.Elem().common())) { + return cvtDirect; + } + if (implements$1(dst, src)) { + if (src.Kind() === 20) { + return cvtI2I; + } + return cvtT2I; + } + return $throwNilPointerError; + }; + makeFloat = function(f, v, t) { + var _ref, f, ptr, t, typ, v; + typ = t.common(); + ptr = unsafe_New(typ); + _ref = typ.size; + if (_ref === 4) { + ptr.$set(v); + } else if (_ref === 8) { + ptr.$set(v); + } + return new Value.ptr(typ, ptr, (((f | 64) >>> 0) | (typ.Kind() >>> 0)) >>> 0); + }; + makeComplex = function(f, v, t) { + var _ref, f, ptr, t, typ, v; + typ = t.common(); + ptr = unsafe_New(typ); + _ref = typ.size; + if (_ref === 8) { + ptr.$set(new $Complex64(v.$real, v.$imag)); + } else if (_ref === 16) { + ptr.$set(v); + } + return new Value.ptr(typ, ptr, (((f | 64) >>> 0) | (typ.Kind() >>> 0)) >>> 0); + }; + makeString = function(f, v, t) { + var f, ret, t, v; + ret = New(t).Elem(); + ret.SetString(v); + ret.flag = ((ret.flag & ~128) | f) >>> 0; + return ret; + }; + makeBytes = function(f, v, t) { + var f, ret, t, v; + ret = New(t).Elem(); + ret.SetBytes(v); + ret.flag = ((ret.flag & ~128) | f) >>> 0; + return ret; + }; + makeRunes = function(f, v, t) { + var f, ret, t, v; + ret = New(t).Elem(); + ret.setRunes(v); + ret.flag = ((ret.flag & ~128) | f) >>> 0; + return ret; + }; + cvtInt = function(v, t) { + var t, v, x; + v = v; + return makeInt((v.flag & 32) >>> 0, (x = v.Int(), new $Uint64(x.$high, x.$low)), t); + }; + cvtUint = function(v, t) { + var t, v; + v = v; + return makeInt((v.flag & 32) >>> 0, v.Uint(), t); + }; + cvtFloatInt = function(v, t) { + var t, v, x; + v = v; + return makeInt((v.flag & 32) >>> 0, (x = new $Int64(0, v.Float()), new $Uint64(x.$high, x.$low)), t); + }; + cvtFloatUint = function(v, t) { + var t, v; + v = v; + return makeInt((v.flag & 32) >>> 0, new $Uint64(0, v.Float()), t); + }; + cvtIntFloat = function(v, t) { + var t, v; + v = v; + return makeFloat((v.flag & 32) >>> 0, $flatten64(v.Int()), t); + }; + cvtUintFloat = function(v, t) { + var t, v; + v = v; + return makeFloat((v.flag & 32) >>> 0, $flatten64(v.Uint()), t); + }; + cvtFloat = function(v, t) { + var t, v; + v = v; + return makeFloat((v.flag & 32) >>> 0, v.Float(), t); + }; + cvtComplex = function(v, t) { + var t, v; + v = v; + return makeComplex((v.flag & 32) >>> 0, v.Complex(), t); + }; + cvtIntString = function(v, t) { + var t, v; + v = v; + return makeString((v.flag & 32) >>> 0, $encodeRune(v.Int().$low), t); + }; + cvtUintString = function(v, t) { + var t, v; + v = v; + return makeString((v.flag & 32) >>> 0, $encodeRune(v.Uint().$low), t); + }; + cvtBytesString = function(v, t) { + var t, v; + v = v; + return makeString((v.flag & 32) >>> 0, $bytesToString(v.Bytes()), t); + }; + cvtStringBytes = function(v, t) { + var t, v; + v = v; + return makeBytes((v.flag & 32) >>> 0, new sliceType$12($stringToBytes(v.String())), t); + }; + cvtRunesString = function(v, t) { + var t, v; + v = v; + return makeString((v.flag & 32) >>> 0, $runesToString(v.runes()), t); + }; + cvtStringRunes = function(v, t) { + var t, v; + v = v; + return makeRunes((v.flag & 32) >>> 0, new sliceType$13($stringToRunes(v.String())), t); + }; + cvtT2I = function(v, typ) { + var target, typ, v, x; + v = v; + target = unsafe_New(typ.common()); + x = valueInterface(v, false); + if (typ.NumMethod() === 0) { + target.$set(x); + } else { + ifaceE2I($assertType(typ, ptrType$1), x, target); + } + return new Value.ptr(typ.common(), target, (((((v.flag & 32) >>> 0) | 64) >>> 0) | 20) >>> 0); + }; + cvtI2I = function(v, typ) { + var ret, typ, v; + v = v; + if (v.IsNil()) { + ret = Zero(typ); + ret.flag = (ret.flag | (((v.flag & 32) >>> 0))) >>> 0; + return ret; + } + return cvtT2I(v.Elem(), typ); + }; + Kind.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$1.methods = [{prop: "ptrTo", name: "ptrTo", pkg: "reflect", typ: $funcType([], [ptrType$1], false)}, {prop: "pointers", name: "pointers", pkg: "reflect", typ: $funcType([], [$Bool], false)}, {prop: "Comparable", name: "Comparable", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Uintptr], false)}, {prop: "Bits", name: "Bits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Align", name: "Align", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "FieldAlign", name: "FieldAlign", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Kind", name: "Kind", pkg: "", typ: $funcType([], [Kind], false)}, {prop: "common", name: "common", pkg: "reflect", typ: $funcType([], [ptrType$1], false)}, {prop: "NumMethod", name: "NumMethod", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Method", name: "Method", pkg: "", typ: $funcType([$Int], [Method], false)}, {prop: "MethodByName", name: "MethodByName", pkg: "", typ: $funcType([$String], [Method, $Bool], false)}, {prop: "PkgPath", name: "PkgPath", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "ChanDir", name: "ChanDir", pkg: "", typ: $funcType([], [ChanDir], false)}, {prop: "IsVariadic", name: "IsVariadic", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Elem", name: "Elem", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Field", name: "Field", pkg: "", typ: $funcType([$Int], [StructField], false)}, {prop: "FieldByIndex", name: "FieldByIndex", pkg: "", typ: $funcType([sliceType$9], [StructField], false)}, {prop: "FieldByName", name: "FieldByName", pkg: "", typ: $funcType([$String], [StructField, $Bool], false)}, {prop: "FieldByNameFunc", name: "FieldByNameFunc", pkg: "", typ: $funcType([funcType$2], [StructField, $Bool], false)}, {prop: "In", name: "In", pkg: "", typ: $funcType([$Int], [Type], false)}, {prop: "Key", name: "Key", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumField", name: "NumField", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumIn", name: "NumIn", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumOut", name: "NumOut", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Out", name: "Out", pkg: "", typ: $funcType([$Int], [Type], false)}, {prop: "Implements", name: "Implements", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "AssignableTo", name: "AssignableTo", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "ConvertibleTo", name: "ConvertibleTo", pkg: "", typ: $funcType([Type], [$Bool], false)}]; + ptrType$5.methods = [{prop: "Method", name: "Method", pkg: "", typ: $funcType([$Int], [Method], false)}, {prop: "uncommon", name: "uncommon", pkg: "reflect", typ: $funcType([], [ptrType$5], false)}, {prop: "PkgPath", name: "PkgPath", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "NumMethod", name: "NumMethod", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "MethodByName", name: "MethodByName", pkg: "", typ: $funcType([$String], [Method, $Bool], false)}]; + ChanDir.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$10.methods = [{prop: "Method", name: "Method", pkg: "", typ: $funcType([$Int], [Method], false)}, {prop: "NumMethod", name: "NumMethod", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "MethodByName", name: "MethodByName", pkg: "", typ: $funcType([$String], [Method, $Bool], false)}]; + ptrType$12.methods = [{prop: "Field", name: "Field", pkg: "", typ: $funcType([$Int], [StructField], false)}, {prop: "FieldByIndex", name: "FieldByIndex", pkg: "", typ: $funcType([sliceType$9], [StructField], false)}, {prop: "FieldByNameFunc", name: "FieldByNameFunc", pkg: "", typ: $funcType([funcType$2], [StructField, $Bool], false)}, {prop: "FieldByName", name: "FieldByName", pkg: "", typ: $funcType([$String], [StructField, $Bool], false)}]; + StructTag.methods = [{prop: "Get", name: "Get", pkg: "", typ: $funcType([$String], [$String], false)}]; + Value.methods = [{prop: "object", name: "object", pkg: "reflect", typ: $funcType([], [js.Object], false)}, {prop: "call", name: "call", pkg: "reflect", typ: $funcType([$String, sliceType$6], [sliceType$6], false)}, {prop: "Cap", name: "Cap", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Elem", name: "Elem", pkg: "", typ: $funcType([], [Value], false)}, {prop: "Field", name: "Field", pkg: "", typ: $funcType([$Int], [Value], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([$Int], [Value], false)}, {prop: "IsNil", name: "IsNil", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Pointer", name: "Pointer", pkg: "", typ: $funcType([], [$Uintptr], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([Value], [], false)}, {prop: "SetCap", name: "SetCap", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "SetLen", name: "SetLen", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Slice", name: "Slice", pkg: "", typ: $funcType([$Int, $Int], [Value], false)}, {prop: "Slice3", name: "Slice3", pkg: "", typ: $funcType([$Int, $Int, $Int], [Value], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [], false)}, {prop: "TrySend", name: "TrySend", pkg: "", typ: $funcType([Value], [$Bool], false)}, {prop: "Send", name: "Send", pkg: "", typ: $funcType([Value], [], false)}, {prop: "TryRecv", name: "TryRecv", pkg: "", typ: $funcType([], [Value, $Bool], false)}, {prop: "Recv", name: "Recv", pkg: "", typ: $funcType([], [Value, $Bool], false)}, {prop: "pointer", name: "pointer", pkg: "reflect", typ: $funcType([], [$UnsafePointer], false)}, {prop: "Addr", name: "Addr", pkg: "", typ: $funcType([], [Value], false)}, {prop: "Bool", name: "Bool", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([], [sliceType$12], false)}, {prop: "runes", name: "runes", pkg: "reflect", typ: $funcType([], [sliceType$13], false)}, {prop: "CanAddr", name: "CanAddr", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "CanSet", name: "CanSet", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Call", name: "Call", pkg: "", typ: $funcType([sliceType$6], [sliceType$6], false)}, {prop: "CallSlice", name: "CallSlice", pkg: "", typ: $funcType([sliceType$6], [sliceType$6], false)}, {prop: "Complex", name: "Complex", pkg: "", typ: $funcType([], [$Complex128], false)}, {prop: "FieldByIndex", name: "FieldByIndex", pkg: "", typ: $funcType([sliceType$9], [Value], false)}, {prop: "FieldByName", name: "FieldByName", pkg: "", typ: $funcType([$String], [Value], false)}, {prop: "FieldByNameFunc", name: "FieldByNameFunc", pkg: "", typ: $funcType([funcType$2], [Value], false)}, {prop: "Float", name: "Float", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Int", name: "Int", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "CanInterface", name: "CanInterface", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Interface", name: "Interface", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "InterfaceData", name: "InterfaceData", pkg: "", typ: $funcType([], [arrayType$3], false)}, {prop: "IsValid", name: "IsValid", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Kind", name: "Kind", pkg: "", typ: $funcType([], [Kind], false)}, {prop: "MapIndex", name: "MapIndex", pkg: "", typ: $funcType([Value], [Value], false)}, {prop: "MapKeys", name: "MapKeys", pkg: "", typ: $funcType([], [sliceType$6], false)}, {prop: "Method", name: "Method", pkg: "", typ: $funcType([$Int], [Value], false)}, {prop: "NumMethod", name: "NumMethod", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "MethodByName", name: "MethodByName", pkg: "", typ: $funcType([$String], [Value], false)}, {prop: "NumField", name: "NumField", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "OverflowComplex", name: "OverflowComplex", pkg: "", typ: $funcType([$Complex128], [$Bool], false)}, {prop: "OverflowFloat", name: "OverflowFloat", pkg: "", typ: $funcType([$Float64], [$Bool], false)}, {prop: "OverflowInt", name: "OverflowInt", pkg: "", typ: $funcType([$Int64], [$Bool], false)}, {prop: "OverflowUint", name: "OverflowUint", pkg: "", typ: $funcType([$Uint64], [$Bool], false)}, {prop: "recv", name: "recv", pkg: "reflect", typ: $funcType([$Bool], [Value, $Bool], false)}, {prop: "send", name: "send", pkg: "reflect", typ: $funcType([Value, $Bool], [$Bool], false)}, {prop: "SetBool", name: "SetBool", pkg: "", typ: $funcType([$Bool], [], false)}, {prop: "SetBytes", name: "SetBytes", pkg: "", typ: $funcType([sliceType$12], [], false)}, {prop: "setRunes", name: "setRunes", pkg: "reflect", typ: $funcType([sliceType$13], [], false)}, {prop: "SetComplex", name: "SetComplex", pkg: "", typ: $funcType([$Complex128], [], false)}, {prop: "SetFloat", name: "SetFloat", pkg: "", typ: $funcType([$Float64], [], false)}, {prop: "SetInt", name: "SetInt", pkg: "", typ: $funcType([$Int64], [], false)}, {prop: "SetMapIndex", name: "SetMapIndex", pkg: "", typ: $funcType([Value, Value], [], false)}, {prop: "SetUint", name: "SetUint", pkg: "", typ: $funcType([$Uint64], [], false)}, {prop: "SetPointer", name: "SetPointer", pkg: "", typ: $funcType([$UnsafePointer], [], false)}, {prop: "SetString", name: "SetString", pkg: "", typ: $funcType([$String], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Type", name: "Type", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Uint", name: "Uint", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "UnsafeAddr", name: "UnsafeAddr", pkg: "", typ: $funcType([], [$Uintptr], false)}, {prop: "assignTo", name: "assignTo", pkg: "reflect", typ: $funcType([$String, ptrType$1, $UnsafePointer], [Value], false)}, {prop: "Convert", name: "Convert", pkg: "", typ: $funcType([Type], [Value], false)}]; + flag.methods = [{prop: "kind", name: "kind", pkg: "reflect", typ: $funcType([], [Kind], false)}, {prop: "mustBe", name: "mustBe", pkg: "reflect", typ: $funcType([Kind], [], false)}, {prop: "mustBeExported", name: "mustBeExported", pkg: "reflect", typ: $funcType([], [], false)}, {prop: "mustBeAssignable", name: "mustBeAssignable", pkg: "reflect", typ: $funcType([], [], false)}]; + ptrType$20.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + mapIter.init([{prop: "t", name: "t", pkg: "reflect", typ: Type, tag: ""}, {prop: "m", name: "m", pkg: "reflect", typ: js.Object, tag: ""}, {prop: "keys", name: "keys", pkg: "reflect", typ: js.Object, tag: ""}, {prop: "i", name: "i", pkg: "reflect", typ: $Int, tag: ""}]); + Type.init([{prop: "Align", name: "Align", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "AssignableTo", name: "AssignableTo", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "Bits", name: "Bits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "ChanDir", name: "ChanDir", pkg: "", typ: $funcType([], [ChanDir], false)}, {prop: "Comparable", name: "Comparable", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "ConvertibleTo", name: "ConvertibleTo", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "Elem", name: "Elem", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Field", name: "Field", pkg: "", typ: $funcType([$Int], [StructField], false)}, {prop: "FieldAlign", name: "FieldAlign", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "FieldByIndex", name: "FieldByIndex", pkg: "", typ: $funcType([sliceType$9], [StructField], false)}, {prop: "FieldByName", name: "FieldByName", pkg: "", typ: $funcType([$String], [StructField, $Bool], false)}, {prop: "FieldByNameFunc", name: "FieldByNameFunc", pkg: "", typ: $funcType([funcType$2], [StructField, $Bool], false)}, {prop: "Implements", name: "Implements", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "In", name: "In", pkg: "", typ: $funcType([$Int], [Type], false)}, {prop: "IsVariadic", name: "IsVariadic", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Key", name: "Key", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Kind", name: "Kind", pkg: "", typ: $funcType([], [Kind], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Method", name: "Method", pkg: "", typ: $funcType([$Int], [Method], false)}, {prop: "MethodByName", name: "MethodByName", pkg: "", typ: $funcType([$String], [Method, $Bool], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "NumField", name: "NumField", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumIn", name: "NumIn", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumMethod", name: "NumMethod", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumOut", name: "NumOut", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Out", name: "Out", pkg: "", typ: $funcType([$Int], [Type], false)}, {prop: "PkgPath", name: "PkgPath", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Uintptr], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "common", name: "common", pkg: "reflect", typ: $funcType([], [ptrType$1], false)}, {prop: "uncommon", name: "uncommon", pkg: "reflect", typ: $funcType([], [ptrType$5], false)}]); + rtype.init([{prop: "size", name: "size", pkg: "reflect", typ: $Uintptr, tag: ""}, {prop: "hash", name: "hash", pkg: "reflect", typ: $Uint32, tag: ""}, {prop: "_$2", name: "_", pkg: "reflect", typ: $Uint8, tag: ""}, {prop: "align", name: "align", pkg: "reflect", typ: $Uint8, tag: ""}, {prop: "fieldAlign", name: "fieldAlign", pkg: "reflect", typ: $Uint8, tag: ""}, {prop: "kind", name: "kind", pkg: "reflect", typ: $Uint8, tag: ""}, {prop: "alg", name: "alg", pkg: "reflect", typ: ptrType$3, tag: ""}, {prop: "gc", name: "gc", pkg: "reflect", typ: arrayType$1, tag: ""}, {prop: "string", name: "string", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "uncommonType", name: "", pkg: "reflect", typ: ptrType$5, tag: ""}, {prop: "ptrToThis", name: "ptrToThis", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "zero", name: "zero", pkg: "reflect", typ: $UnsafePointer, tag: ""}]); + typeAlg.init([{prop: "hash", name: "hash", pkg: "reflect", typ: funcType$3, tag: ""}, {prop: "equal", name: "equal", pkg: "reflect", typ: funcType$4, tag: ""}]); + method.init([{prop: "name", name: "name", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "pkgPath", name: "pkgPath", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "mtyp", name: "mtyp", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "typ", name: "typ", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "ifn", name: "ifn", pkg: "reflect", typ: $UnsafePointer, tag: ""}, {prop: "tfn", name: "tfn", pkg: "reflect", typ: $UnsafePointer, tag: ""}]); + uncommonType.init([{prop: "name", name: "name", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "pkgPath", name: "pkgPath", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "methods", name: "methods", pkg: "reflect", typ: sliceType$2, tag: ""}]); + arrayType.init([{prop: "rtype", name: "", pkg: "reflect", typ: rtype, tag: "reflect:\"array\""}, {prop: "elem", name: "elem", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "slice", name: "slice", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "len", name: "len", pkg: "reflect", typ: $Uintptr, tag: ""}]); + chanType.init([{prop: "rtype", name: "", pkg: "reflect", typ: rtype, tag: "reflect:\"chan\""}, {prop: "elem", name: "elem", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "dir", name: "dir", pkg: "reflect", typ: $Uintptr, tag: ""}]); + funcType.init([{prop: "rtype", name: "", pkg: "reflect", typ: rtype, tag: "reflect:\"func\""}, {prop: "dotdotdot", name: "dotdotdot", pkg: "reflect", typ: $Bool, tag: ""}, {prop: "in$2", name: "in", pkg: "reflect", typ: sliceType$3, tag: ""}, {prop: "out", name: "out", pkg: "reflect", typ: sliceType$3, tag: ""}]); + imethod.init([{prop: "name", name: "name", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "pkgPath", name: "pkgPath", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "typ", name: "typ", pkg: "reflect", typ: ptrType$1, tag: ""}]); + interfaceType.init([{prop: "rtype", name: "", pkg: "reflect", typ: rtype, tag: "reflect:\"interface\""}, {prop: "methods", name: "methods", pkg: "reflect", typ: sliceType$4, tag: ""}]); + mapType.init([{prop: "rtype", name: "", pkg: "reflect", typ: rtype, tag: "reflect:\"map\""}, {prop: "key", name: "key", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "elem", name: "elem", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "bucket", name: "bucket", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "hmap", name: "hmap", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "keysize", name: "keysize", pkg: "reflect", typ: $Uint8, tag: ""}, {prop: "indirectkey", name: "indirectkey", pkg: "reflect", typ: $Uint8, tag: ""}, {prop: "valuesize", name: "valuesize", pkg: "reflect", typ: $Uint8, tag: ""}, {prop: "indirectvalue", name: "indirectvalue", pkg: "reflect", typ: $Uint8, tag: ""}, {prop: "bucketsize", name: "bucketsize", pkg: "reflect", typ: $Uint16, tag: ""}]); + ptrType.init([{prop: "rtype", name: "", pkg: "reflect", typ: rtype, tag: "reflect:\"ptr\""}, {prop: "elem", name: "elem", pkg: "reflect", typ: ptrType$1, tag: ""}]); + sliceType.init([{prop: "rtype", name: "", pkg: "reflect", typ: rtype, tag: "reflect:\"slice\""}, {prop: "elem", name: "elem", pkg: "reflect", typ: ptrType$1, tag: ""}]); + structField.init([{prop: "name", name: "name", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "pkgPath", name: "pkgPath", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "typ", name: "typ", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "tag", name: "tag", pkg: "reflect", typ: ptrType$4, tag: ""}, {prop: "offset", name: "offset", pkg: "reflect", typ: $Uintptr, tag: ""}]); + structType.init([{prop: "rtype", name: "", pkg: "reflect", typ: rtype, tag: "reflect:\"struct\""}, {prop: "fields", name: "fields", pkg: "reflect", typ: sliceType$5, tag: ""}]); + Method.init([{prop: "Name", name: "Name", pkg: "", typ: $String, tag: ""}, {prop: "PkgPath", name: "PkgPath", pkg: "", typ: $String, tag: ""}, {prop: "Type", name: "Type", pkg: "", typ: Type, tag: ""}, {prop: "Func", name: "Func", pkg: "", typ: Value, tag: ""}, {prop: "Index", name: "Index", pkg: "", typ: $Int, tag: ""}]); + StructField.init([{prop: "Name", name: "Name", pkg: "", typ: $String, tag: ""}, {prop: "PkgPath", name: "PkgPath", pkg: "", typ: $String, tag: ""}, {prop: "Type", name: "Type", pkg: "", typ: Type, tag: ""}, {prop: "Tag", name: "Tag", pkg: "", typ: StructTag, tag: ""}, {prop: "Offset", name: "Offset", pkg: "", typ: $Uintptr, tag: ""}, {prop: "Index", name: "Index", pkg: "", typ: sliceType$9, tag: ""}, {prop: "Anonymous", name: "Anonymous", pkg: "", typ: $Bool, tag: ""}]); + fieldScan.init([{prop: "typ", name: "typ", pkg: "reflect", typ: ptrType$12, tag: ""}, {prop: "index", name: "index", pkg: "reflect", typ: sliceType$9, tag: ""}]); + Value.init([{prop: "typ", name: "typ", pkg: "reflect", typ: ptrType$1, tag: ""}, {prop: "ptr", name: "ptr", pkg: "reflect", typ: $UnsafePointer, tag: ""}, {prop: "flag", name: "", pkg: "reflect", typ: flag, tag: ""}]); + ValueError.init([{prop: "Method", name: "Method", pkg: "", typ: $String, tag: ""}, {prop: "Kind", name: "Kind", pkg: "", typ: Kind, tag: ""}]); + nonEmptyInterface.init([{prop: "itab", name: "itab", pkg: "reflect", typ: ptrType$7, tag: ""}, {prop: "word", name: "word", pkg: "reflect", typ: $UnsafePointer, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_reflect = function() { while (true) { switch ($s) { case 0: + $r = js.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = math.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = runtime.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = strconv.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = sync.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + initialized = false; + stringPtrMap = new $Map(); + jsObject = $js.Object; + jsContainer = $js.container.ptr; + kindNames = new sliceType$1(["invalid", "bool", "int", "int8", "int16", "int32", "int64", "uint", "uint8", "uint16", "uint32", "uint64", "uintptr", "float32", "float64", "complex64", "complex128", "array", "chan", "func", "interface", "map", "ptr", "slice", "string", "struct", "unsafe.Pointer"]); + uint8Type = $assertType(TypeOf(new $Uint8(0)), ptrType$1); + init(); + /* */ } return; } }; $init_reflect.$blocking = true; return $init_reflect; + }; + return $pkg; +})(); +$packages["fmt"] = (function() { + var $pkg = {}, errors, io, math, os, reflect, strconv, sync, utf8, fmtFlags, fmt, State, Formatter, Stringer, GoStringer, buffer, pp, runeUnreader, scanError, ss, ssave, sliceType, sliceType$1, arrayType, sliceType$2, ptrType, ptrType$1, ptrType$2, ptrType$5, arrayType$1, arrayType$2, ptrType$25, funcType, padZeroBytes, padSpaceBytes, trueBytes, falseBytes, commaSpaceBytes, nilAngleBytes, nilParenBytes, nilBytes, mapBytes, percentBangBytes, panicBytes, irparenBytes, bytesBytes, ppFree, intBits, uintptrBits, byteType, space, ssFree, complexError, boolError, init, doPrec, newPrinter, Fprintln, Println, getField, isSpace, notSpace, indexRune; + errors = $packages["errors"]; + io = $packages["io"]; + math = $packages["math"]; + os = $packages["os"]; + reflect = $packages["reflect"]; + strconv = $packages["strconv"]; + sync = $packages["sync"]; + utf8 = $packages["unicode/utf8"]; + fmtFlags = $pkg.fmtFlags = $newType(0, $kindStruct, "fmt.fmtFlags", "fmtFlags", "fmt", function(widPresent_, precPresent_, minus_, plus_, sharp_, space_, unicode_, uniQuote_, zero_, plusV_, sharpV_) { + this.$val = this; + this.widPresent = widPresent_ !== undefined ? widPresent_ : false; + this.precPresent = precPresent_ !== undefined ? precPresent_ : false; + this.minus = minus_ !== undefined ? minus_ : false; + this.plus = plus_ !== undefined ? plus_ : false; + this.sharp = sharp_ !== undefined ? sharp_ : false; + this.space = space_ !== undefined ? space_ : false; + this.unicode = unicode_ !== undefined ? unicode_ : false; + this.uniQuote = uniQuote_ !== undefined ? uniQuote_ : false; + this.zero = zero_ !== undefined ? zero_ : false; + this.plusV = plusV_ !== undefined ? plusV_ : false; + this.sharpV = sharpV_ !== undefined ? sharpV_ : false; + }); + fmt = $pkg.fmt = $newType(0, $kindStruct, "fmt.fmt", "fmt", "fmt", function(intbuf_, buf_, wid_, prec_, fmtFlags_) { + this.$val = this; + this.intbuf = intbuf_ !== undefined ? intbuf_ : arrayType$2.zero(); + this.buf = buf_ !== undefined ? buf_ : ptrType$1.nil; + this.wid = wid_ !== undefined ? wid_ : 0; + this.prec = prec_ !== undefined ? prec_ : 0; + this.fmtFlags = fmtFlags_ !== undefined ? fmtFlags_ : new fmtFlags.ptr(); + }); + State = $pkg.State = $newType(8, $kindInterface, "fmt.State", "State", "fmt", null); + Formatter = $pkg.Formatter = $newType(8, $kindInterface, "fmt.Formatter", "Formatter", "fmt", null); + Stringer = $pkg.Stringer = $newType(8, $kindInterface, "fmt.Stringer", "Stringer", "fmt", null); + GoStringer = $pkg.GoStringer = $newType(8, $kindInterface, "fmt.GoStringer", "GoStringer", "fmt", null); + buffer = $pkg.buffer = $newType(12, $kindSlice, "fmt.buffer", "buffer", "fmt", null); + pp = $pkg.pp = $newType(0, $kindStruct, "fmt.pp", "pp", "fmt", function(n_, panicking_, erroring_, buf_, arg_, value_, reordered_, goodArgNum_, runeBuf_, fmt_) { + this.$val = this; + this.n = n_ !== undefined ? n_ : 0; + this.panicking = panicking_ !== undefined ? panicking_ : false; + this.erroring = erroring_ !== undefined ? erroring_ : false; + this.buf = buf_ !== undefined ? buf_ : buffer.nil; + this.arg = arg_ !== undefined ? arg_ : $ifaceNil; + this.value = value_ !== undefined ? value_ : new reflect.Value.ptr(); + this.reordered = reordered_ !== undefined ? reordered_ : false; + this.goodArgNum = goodArgNum_ !== undefined ? goodArgNum_ : false; + this.runeBuf = runeBuf_ !== undefined ? runeBuf_ : arrayType$1.zero(); + this.fmt = fmt_ !== undefined ? fmt_ : new fmt.ptr(); + }); + runeUnreader = $pkg.runeUnreader = $newType(8, $kindInterface, "fmt.runeUnreader", "runeUnreader", "fmt", null); + scanError = $pkg.scanError = $newType(0, $kindStruct, "fmt.scanError", "scanError", "fmt", function(err_) { + this.$val = this; + this.err = err_ !== undefined ? err_ : $ifaceNil; + }); + ss = $pkg.ss = $newType(0, $kindStruct, "fmt.ss", "ss", "fmt", function(rr_, buf_, peekRune_, prevRune_, count_, atEOF_, ssave_) { + this.$val = this; + this.rr = rr_ !== undefined ? rr_ : $ifaceNil; + this.buf = buf_ !== undefined ? buf_ : buffer.nil; + this.peekRune = peekRune_ !== undefined ? peekRune_ : 0; + this.prevRune = prevRune_ !== undefined ? prevRune_ : 0; + this.count = count_ !== undefined ? count_ : 0; + this.atEOF = atEOF_ !== undefined ? atEOF_ : false; + this.ssave = ssave_ !== undefined ? ssave_ : new ssave.ptr(); + }); + ssave = $pkg.ssave = $newType(0, $kindStruct, "fmt.ssave", "ssave", "fmt", function(validSave_, nlIsEnd_, nlIsSpace_, argLimit_, limit_, maxWid_) { + this.$val = this; + this.validSave = validSave_ !== undefined ? validSave_ : false; + this.nlIsEnd = nlIsEnd_ !== undefined ? nlIsEnd_ : false; + this.nlIsSpace = nlIsSpace_ !== undefined ? nlIsSpace_ : false; + this.argLimit = argLimit_ !== undefined ? argLimit_ : 0; + this.limit = limit_ !== undefined ? limit_ : 0; + this.maxWid = maxWid_ !== undefined ? maxWid_ : 0; + }); + sliceType = $sliceType($Uint8); + sliceType$1 = $sliceType($emptyInterface); + arrayType = $arrayType($Uint16, 2); + sliceType$2 = $sliceType(arrayType); + ptrType = $ptrType(pp); + ptrType$1 = $ptrType(buffer); + ptrType$2 = $ptrType(reflect.rtype); + ptrType$5 = $ptrType(ss); + arrayType$1 = $arrayType($Uint8, 4); + arrayType$2 = $arrayType($Uint8, 65); + ptrType$25 = $ptrType(fmt); + funcType = $funcType([$Int32], [$Bool], false); + init = function() { + var i; + i = 0; + while (true) { + if (!(i < 65)) { break; } + (i < 0 || i >= padZeroBytes.$length) ? $throwRuntimeError("index out of range") : padZeroBytes.$array[padZeroBytes.$offset + i] = 48; + (i < 0 || i >= padSpaceBytes.$length) ? $throwRuntimeError("index out of range") : padSpaceBytes.$array[padSpaceBytes.$offset + i] = 32; + i = i + (1) >> 0; + } + }; + fmt.ptr.prototype.clearflags = function() { + var f; + f = this; + $copy(f.fmtFlags, new fmtFlags.ptr(false, false, false, false, false, false, false, false, false, false, false), fmtFlags); + }; + fmt.prototype.clearflags = function() { return this.$val.clearflags(); }; + fmt.ptr.prototype.init = function(buf) { + var buf, f; + f = this; + f.buf = buf; + f.clearflags(); + }; + fmt.prototype.init = function(buf) { return this.$val.init(buf); }; + fmt.ptr.prototype.computePadding = function(width) { + var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, f, left, leftWidth = 0, padding = sliceType.nil, rightWidth = 0, w, width; + f = this; + left = !f.fmtFlags.minus; + w = f.wid; + if (w < 0) { + left = false; + w = -w; + } + w = w - (width) >> 0; + if (w > 0) { + if (left && f.fmtFlags.zero) { + _tmp = padZeroBytes; _tmp$1 = w; _tmp$2 = 0; padding = _tmp; leftWidth = _tmp$1; rightWidth = _tmp$2; + return [padding, leftWidth, rightWidth]; + } + if (left) { + _tmp$3 = padSpaceBytes; _tmp$4 = w; _tmp$5 = 0; padding = _tmp$3; leftWidth = _tmp$4; rightWidth = _tmp$5; + return [padding, leftWidth, rightWidth]; + } else { + _tmp$6 = padSpaceBytes; _tmp$7 = 0; _tmp$8 = w; padding = _tmp$6; leftWidth = _tmp$7; rightWidth = _tmp$8; + return [padding, leftWidth, rightWidth]; + } + } + return [padding, leftWidth, rightWidth]; + }; + fmt.prototype.computePadding = function(width) { return this.$val.computePadding(width); }; + fmt.ptr.prototype.writePadding = function(n, padding) { + var f, m, n, padding; + f = this; + while (true) { + if (!(n > 0)) { break; } + m = n; + if (m > 65) { + m = 65; + } + f.buf.Write($subslice(padding, 0, m)); + n = n - (m) >> 0; + } + }; + fmt.prototype.writePadding = function(n, padding) { return this.$val.writePadding(n, padding); }; + fmt.ptr.prototype.pad = function(b) { + var _tuple, b, f, left, padding, right; + f = this; + if (!f.fmtFlags.widPresent || (f.wid === 0)) { + f.buf.Write(b); + return; + } + _tuple = f.computePadding(utf8.RuneCount(b)); padding = _tuple[0]; left = _tuple[1]; right = _tuple[2]; + if (left > 0) { + f.writePadding(left, padding); + } + f.buf.Write(b); + if (right > 0) { + f.writePadding(right, padding); + } + }; + fmt.prototype.pad = function(b) { return this.$val.pad(b); }; + fmt.ptr.prototype.padString = function(s) { + var _tuple, f, left, padding, right, s; + f = this; + if (!f.fmtFlags.widPresent || (f.wid === 0)) { + f.buf.WriteString(s); + return; + } + _tuple = f.computePadding(utf8.RuneCountInString(s)); padding = _tuple[0]; left = _tuple[1]; right = _tuple[2]; + if (left > 0) { + f.writePadding(left, padding); + } + f.buf.WriteString(s); + if (right > 0) { + f.writePadding(right, padding); + } + }; + fmt.prototype.padString = function(s) { return this.$val.padString(s); }; + fmt.ptr.prototype.fmt_boolean = function(v) { + var f, v; + f = this; + if (v) { + f.pad(trueBytes); + } else { + f.pad(falseBytes); + } + }; + fmt.prototype.fmt_boolean = function(v) { return this.$val.fmt_boolean(v); }; + fmt.ptr.prototype.integer = function(a, base, signedness, digits) { + var _ref, _ref$1, a, base, buf, digits, f, i, j, negative, next, prec, runeWidth, signedness, ua, width, width$1, x, x$1, x$2, x$3; + f = this; + if (f.fmtFlags.precPresent && (f.prec === 0) && (a.$high === 0 && a.$low === 0)) { + return; + } + buf = $subslice(new sliceType(f.intbuf), 0); + if (f.fmtFlags.widPresent) { + width = f.wid; + if ((base.$high === 0 && base.$low === 16) && f.fmtFlags.sharp) { + width = width + (2) >> 0; + } + if (width > 65) { + buf = $makeSlice(sliceType, width); + } + } + negative = signedness === true && (a.$high < 0 || (a.$high === 0 && a.$low < 0)); + if (negative) { + a = new $Int64(-a.$high, -a.$low); + } + prec = 0; + if (f.fmtFlags.precPresent) { + prec = f.prec; + f.fmtFlags.zero = false; + } else if (f.fmtFlags.zero && f.fmtFlags.widPresent && !f.fmtFlags.minus && f.wid > 0) { + prec = f.wid; + if (negative || f.fmtFlags.plus || f.fmtFlags.space) { + prec = prec - (1) >> 0; + } + } + i = buf.$length; + ua = new $Uint64(a.$high, a.$low); + _ref = base; + if ((_ref.$high === 0 && _ref.$low === 10)) { + while (true) { + if (!((ua.$high > 0 || (ua.$high === 0 && ua.$low >= 10)))) { break; } + i = i - (1) >> 0; + next = $div64(ua, new $Uint64(0, 10), false); + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = ((x = new $Uint64(0 + ua.$high, 48 + ua.$low), x$1 = $mul64(next, new $Uint64(0, 10)), new $Uint64(x.$high - x$1.$high, x.$low - x$1.$low)).$low << 24 >>> 24); + ua = next; + } + } else if ((_ref.$high === 0 && _ref.$low === 16)) { + while (true) { + if (!((ua.$high > 0 || (ua.$high === 0 && ua.$low >= 16)))) { break; } + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = digits.charCodeAt($flatten64(new $Uint64(ua.$high & 0, (ua.$low & 15) >>> 0))); + ua = $shiftRightUint64(ua, (4)); + } + } else if ((_ref.$high === 0 && _ref.$low === 8)) { + while (true) { + if (!((ua.$high > 0 || (ua.$high === 0 && ua.$low >= 8)))) { break; } + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = ((x$2 = new $Uint64(ua.$high & 0, (ua.$low & 7) >>> 0), new $Uint64(0 + x$2.$high, 48 + x$2.$low)).$low << 24 >>> 24); + ua = $shiftRightUint64(ua, (3)); + } + } else if ((_ref.$high === 0 && _ref.$low === 2)) { + while (true) { + if (!((ua.$high > 0 || (ua.$high === 0 && ua.$low >= 2)))) { break; } + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = ((x$3 = new $Uint64(ua.$high & 0, (ua.$low & 1) >>> 0), new $Uint64(0 + x$3.$high, 48 + x$3.$low)).$low << 24 >>> 24); + ua = $shiftRightUint64(ua, (1)); + } + } else { + $panic(new $String("fmt: unknown base; can't happen")); + } + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = digits.charCodeAt($flatten64(ua)); + while (true) { + if (!(i > 0 && prec > (buf.$length - i >> 0))) { break; } + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = 48; + } + if (f.fmtFlags.sharp) { + _ref$1 = base; + if ((_ref$1.$high === 0 && _ref$1.$low === 8)) { + if (!((((i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i]) === 48))) { + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = 48; + } + } else if ((_ref$1.$high === 0 && _ref$1.$low === 16)) { + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = (120 + digits.charCodeAt(10) << 24 >>> 24) - 97 << 24 >>> 24; + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = 48; + } + } + if (f.fmtFlags.unicode) { + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = 43; + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = 85; + } + if (negative) { + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = 45; + } else if (f.fmtFlags.plus) { + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = 43; + } else if (f.fmtFlags.space) { + i = i - (1) >> 0; + (i < 0 || i >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + i] = 32; + } + if (f.fmtFlags.unicode && f.fmtFlags.uniQuote && (a.$high > 0 || (a.$high === 0 && a.$low >= 0)) && (a.$high < 0 || (a.$high === 0 && a.$low <= 1114111)) && strconv.IsPrint(((a.$low + ((a.$high >> 31) * 4294967296)) >> 0))) { + runeWidth = utf8.RuneLen(((a.$low + ((a.$high >> 31) * 4294967296)) >> 0)); + width$1 = (2 + runeWidth >> 0) + 1 >> 0; + $copySlice($subslice(buf, (i - width$1 >> 0)), $subslice(buf, i)); + i = i - (width$1) >> 0; + j = buf.$length - width$1 >> 0; + (j < 0 || j >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + j] = 32; + j = j + (1) >> 0; + (j < 0 || j >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + j] = 39; + j = j + (1) >> 0; + utf8.EncodeRune($subslice(buf, j), ((a.$low + ((a.$high >> 31) * 4294967296)) >> 0)); + j = j + (runeWidth) >> 0; + (j < 0 || j >= buf.$length) ? $throwRuntimeError("index out of range") : buf.$array[buf.$offset + j] = 39; + } + f.pad($subslice(buf, i)); + }; + fmt.prototype.integer = function(a, base, signedness, digits) { return this.$val.integer(a, base, signedness, digits); }; + fmt.ptr.prototype.truncate = function(s) { + var _i, _ref, _rune, f, i, n, s; + f = this; + if (f.fmtFlags.precPresent && f.prec < utf8.RuneCountInString(s)) { + n = f.prec; + _ref = s; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + i = _i; + if (n === 0) { + s = s.substring(0, i); + break; + } + n = n - (1) >> 0; + _i += _rune[1]; + } + } + return s; + }; + fmt.prototype.truncate = function(s) { return this.$val.truncate(s); }; + fmt.ptr.prototype.fmt_s = function(s) { + var f, s; + f = this; + s = f.truncate(s); + f.padString(s); + }; + fmt.prototype.fmt_s = function(s) { return this.$val.fmt_s(s); }; + fmt.ptr.prototype.fmt_sbx = function(s, b, digits) { + var b, buf, c, digits, f, i, n, s, x; + f = this; + n = b.$length; + if (b === sliceType.nil) { + n = s.length; + } + x = (digits.charCodeAt(10) - 97 << 24 >>> 24) + 120 << 24 >>> 24; + buf = sliceType.nil; + i = 0; + while (true) { + if (!(i < n)) { break; } + if (i > 0 && f.fmtFlags.space) { + buf = $append(buf, 32); + } + if (f.fmtFlags.sharp && (f.fmtFlags.space || (i === 0))) { + buf = $append(buf, 48, x); + } + c = 0; + if (b === sliceType.nil) { + c = s.charCodeAt(i); + } else { + c = ((i < 0 || i >= b.$length) ? $throwRuntimeError("index out of range") : b.$array[b.$offset + i]); + } + buf = $append(buf, digits.charCodeAt((c >>> 4 << 24 >>> 24)), digits.charCodeAt(((c & 15) >>> 0))); + i = i + (1) >> 0; + } + f.pad(buf); + }; + fmt.prototype.fmt_sbx = function(s, b, digits) { return this.$val.fmt_sbx(s, b, digits); }; + fmt.ptr.prototype.fmt_sx = function(s, digits) { + var digits, f, s; + f = this; + if (f.fmtFlags.precPresent && f.prec < s.length) { + s = s.substring(0, f.prec); + } + f.fmt_sbx(s, sliceType.nil, digits); + }; + fmt.prototype.fmt_sx = function(s, digits) { return this.$val.fmt_sx(s, digits); }; + fmt.ptr.prototype.fmt_bx = function(b, digits) { + var b, digits, f; + f = this; + if (f.fmtFlags.precPresent && f.prec < b.$length) { + b = $subslice(b, 0, f.prec); + } + f.fmt_sbx("", b, digits); + }; + fmt.prototype.fmt_bx = function(b, digits) { return this.$val.fmt_bx(b, digits); }; + fmt.ptr.prototype.fmt_q = function(s) { + var f, quoted, s; + f = this; + s = f.truncate(s); + quoted = ""; + if (f.fmtFlags.sharp && strconv.CanBackquote(s)) { + quoted = "`" + s + "`"; + } else { + if (f.fmtFlags.plus) { + quoted = strconv.QuoteToASCII(s); + } else { + quoted = strconv.Quote(s); + } + } + f.padString(quoted); + }; + fmt.prototype.fmt_q = function(s) { return this.$val.fmt_q(s); }; + fmt.ptr.prototype.fmt_qc = function(c) { + var c, f, quoted; + f = this; + quoted = sliceType.nil; + if (f.fmtFlags.plus) { + quoted = strconv.AppendQuoteRuneToASCII($subslice(new sliceType(f.intbuf), 0, 0), ((c.$low + ((c.$high >> 31) * 4294967296)) >> 0)); + } else { + quoted = strconv.AppendQuoteRune($subslice(new sliceType(f.intbuf), 0, 0), ((c.$low + ((c.$high >> 31) * 4294967296)) >> 0)); + } + f.pad(quoted); + }; + fmt.prototype.fmt_qc = function(c) { return this.$val.fmt_qc(c); }; + doPrec = function(f, def) { + var def, f; + if (f.fmtFlags.precPresent) { + return f.prec; + } + return def; + }; + fmt.ptr.prototype.formatFloat = function(v, verb, prec, n) { + var $deferred = [], $err = null, f, n, num, prec, v, verb; + /* */ try { $deferFrames.push($deferred); + f = this; + num = strconv.AppendFloat($subslice(new sliceType(f.intbuf), 0, 1), v, verb, prec, n); + if ((((1 < 0 || 1 >= num.$length) ? $throwRuntimeError("index out of range") : num.$array[num.$offset + 1]) === 45) || (((1 < 0 || 1 >= num.$length) ? $throwRuntimeError("index out of range") : num.$array[num.$offset + 1]) === 43)) { + num = $subslice(num, 1); + } else { + (0 < 0 || 0 >= num.$length) ? $throwRuntimeError("index out of range") : num.$array[num.$offset + 0] = 43; + } + if (math.IsInf(v, 0)) { + if (f.fmtFlags.zero) { + $deferred.push([(function() { + f.fmtFlags.zero = true; + }), []]); + f.fmtFlags.zero = false; + } + } + if (f.fmtFlags.zero && f.fmtFlags.widPresent && f.wid > num.$length) { + if (f.fmtFlags.space && v >= 0) { + f.buf.WriteByte(32); + f.wid = f.wid - (1) >> 0; + } else if (f.fmtFlags.plus || v < 0) { + f.buf.WriteByte(((0 < 0 || 0 >= num.$length) ? $throwRuntimeError("index out of range") : num.$array[num.$offset + 0])); + f.wid = f.wid - (1) >> 0; + } + f.pad($subslice(num, 1)); + return; + } + if (f.fmtFlags.space && (((0 < 0 || 0 >= num.$length) ? $throwRuntimeError("index out of range") : num.$array[num.$offset + 0]) === 43)) { + (0 < 0 || 0 >= num.$length) ? $throwRuntimeError("index out of range") : num.$array[num.$offset + 0] = 32; + f.pad(num); + return; + } + if (f.fmtFlags.plus || (((0 < 0 || 0 >= num.$length) ? $throwRuntimeError("index out of range") : num.$array[num.$offset + 0]) === 45) || math.IsInf(v, 0)) { + f.pad(num); + return; + } + f.pad($subslice(num, 1)); + /* */ } catch(err) { $err = err; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); } + }; + fmt.prototype.formatFloat = function(v, verb, prec, n) { return this.$val.formatFloat(v, verb, prec, n); }; + fmt.ptr.prototype.fmt_e64 = function(v) { + var f, v; + f = this; + f.formatFloat(v, 101, doPrec(f, 6), 64); + }; + fmt.prototype.fmt_e64 = function(v) { return this.$val.fmt_e64(v); }; + fmt.ptr.prototype.fmt_E64 = function(v) { + var f, v; + f = this; + f.formatFloat(v, 69, doPrec(f, 6), 64); + }; + fmt.prototype.fmt_E64 = function(v) { return this.$val.fmt_E64(v); }; + fmt.ptr.prototype.fmt_f64 = function(v) { + var f, v; + f = this; + f.formatFloat(v, 102, doPrec(f, 6), 64); + }; + fmt.prototype.fmt_f64 = function(v) { return this.$val.fmt_f64(v); }; + fmt.ptr.prototype.fmt_g64 = function(v) { + var f, v; + f = this; + f.formatFloat(v, 103, doPrec(f, -1), 64); + }; + fmt.prototype.fmt_g64 = function(v) { return this.$val.fmt_g64(v); }; + fmt.ptr.prototype.fmt_G64 = function(v) { + var f, v; + f = this; + f.formatFloat(v, 71, doPrec(f, -1), 64); + }; + fmt.prototype.fmt_G64 = function(v) { return this.$val.fmt_G64(v); }; + fmt.ptr.prototype.fmt_fb64 = function(v) { + var f, v; + f = this; + f.formatFloat(v, 98, 0, 64); + }; + fmt.prototype.fmt_fb64 = function(v) { return this.$val.fmt_fb64(v); }; + fmt.ptr.prototype.fmt_e32 = function(v) { + var f, v; + f = this; + f.formatFloat($coerceFloat32(v), 101, doPrec(f, 6), 32); + }; + fmt.prototype.fmt_e32 = function(v) { return this.$val.fmt_e32(v); }; + fmt.ptr.prototype.fmt_E32 = function(v) { + var f, v; + f = this; + f.formatFloat($coerceFloat32(v), 69, doPrec(f, 6), 32); + }; + fmt.prototype.fmt_E32 = function(v) { return this.$val.fmt_E32(v); }; + fmt.ptr.prototype.fmt_f32 = function(v) { + var f, v; + f = this; + f.formatFloat($coerceFloat32(v), 102, doPrec(f, 6), 32); + }; + fmt.prototype.fmt_f32 = function(v) { return this.$val.fmt_f32(v); }; + fmt.ptr.prototype.fmt_g32 = function(v) { + var f, v; + f = this; + f.formatFloat($coerceFloat32(v), 103, doPrec(f, -1), 32); + }; + fmt.prototype.fmt_g32 = function(v) { return this.$val.fmt_g32(v); }; + fmt.ptr.prototype.fmt_G32 = function(v) { + var f, v; + f = this; + f.formatFloat($coerceFloat32(v), 71, doPrec(f, -1), 32); + }; + fmt.prototype.fmt_G32 = function(v) { return this.$val.fmt_G32(v); }; + fmt.ptr.prototype.fmt_fb32 = function(v) { + var f, v; + f = this; + f.formatFloat($coerceFloat32(v), 98, 0, 32); + }; + fmt.prototype.fmt_fb32 = function(v) { return this.$val.fmt_fb32(v); }; + fmt.ptr.prototype.fmt_c64 = function(v, verb) { + var f, v, verb; + f = this; + f.fmt_complex($coerceFloat32(v.$real), $coerceFloat32(v.$imag), 32, verb); + }; + fmt.prototype.fmt_c64 = function(v, verb) { return this.$val.fmt_c64(v, verb); }; + fmt.ptr.prototype.fmt_c128 = function(v, verb) { + var f, v, verb; + f = this; + f.fmt_complex(v.$real, v.$imag, 64, verb); + }; + fmt.prototype.fmt_c128 = function(v, verb) { return this.$val.fmt_c128(v, verb); }; + fmt.ptr.prototype.fmt_complex = function(r, j, size, verb) { + var _ref, f, i, j, oldPlus, oldSpace, oldWid, r, size, verb; + f = this; + f.buf.WriteByte(40); + oldPlus = f.fmtFlags.plus; + oldSpace = f.fmtFlags.space; + oldWid = f.wid; + i = 0; + while (true) { + if (!(true)) { break; } + _ref = verb; + if (_ref === 98) { + f.formatFloat(r, 98, 0, size); + } else if (_ref === 101) { + f.formatFloat(r, 101, doPrec(f, 6), size); + } else if (_ref === 69) { + f.formatFloat(r, 69, doPrec(f, 6), size); + } else if (_ref === 102 || _ref === 70) { + f.formatFloat(r, 102, doPrec(f, 6), size); + } else if (_ref === 103) { + f.formatFloat(r, 103, doPrec(f, -1), size); + } else if (_ref === 71) { + f.formatFloat(r, 71, doPrec(f, -1), size); + } + if (!((i === 0))) { + break; + } + f.fmtFlags.plus = true; + f.fmtFlags.space = false; + f.wid = oldWid; + r = j; + i = i + (1) >> 0; + } + f.fmtFlags.space = oldSpace; + f.fmtFlags.plus = oldPlus; + f.wid = oldWid; + f.buf.Write(irparenBytes); + }; + fmt.prototype.fmt_complex = function(r, j, size, verb) { return this.$val.fmt_complex(r, j, size, verb); }; + $ptrType(buffer).prototype.Write = function(p) { + var _tmp, _tmp$1, b, err = $ifaceNil, n = 0, p; + b = this; + b.$set($appendSlice(b.$get(), p)); + _tmp = p.$length; _tmp$1 = $ifaceNil; n = _tmp; err = _tmp$1; + return [n, err]; + }; + $ptrType(buffer).prototype.WriteString = function(s) { + var _tmp, _tmp$1, b, err = $ifaceNil, n = 0, s; + b = this; + b.$set($appendSlice(b.$get(), new buffer($stringToBytes(s)))); + _tmp = s.length; _tmp$1 = $ifaceNil; n = _tmp; err = _tmp$1; + return [n, err]; + }; + $ptrType(buffer).prototype.WriteByte = function(c) { + var b, c; + b = this; + b.$set($append(b.$get(), c)); + return $ifaceNil; + }; + $ptrType(buffer).prototype.WriteRune = function(r) { + var b, bp, n, r, w, x; + bp = this; + if (r < 128) { + bp.$set($append(bp.$get(), (r << 24 >>> 24))); + return $ifaceNil; + } + b = bp.$get(); + n = b.$length; + while (true) { + if (!((n + 4 >> 0) > b.$capacity)) { break; } + b = $append(b, 0); + } + w = utf8.EncodeRune((x = $subslice(b, n, (n + 4 >> 0)), $subslice(new sliceType(x.$array), x.$offset, x.$offset + x.$length)), r); + bp.$set($subslice(b, 0, (n + w >> 0))); + return $ifaceNil; + }; + newPrinter = function() { + var p; + p = $assertType(ppFree.Get(), ptrType); + p.panicking = false; + p.erroring = false; + p.fmt.init(new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p)); + return p; + }; + pp.ptr.prototype.free = function() { + var p; + p = this; + if (p.buf.$capacity > 1024) { + return; + } + p.buf = $subslice(p.buf, 0, 0); + p.arg = $ifaceNil; + p.value = new reflect.Value.ptr(ptrType$2.nil, 0, 0); + ppFree.Put(p); + }; + pp.prototype.free = function() { return this.$val.free(); }; + pp.ptr.prototype.Width = function() { + var _tmp, _tmp$1, ok = false, p, wid = 0; + p = this; + _tmp = p.fmt.wid; _tmp$1 = p.fmt.fmtFlags.widPresent; wid = _tmp; ok = _tmp$1; + return [wid, ok]; + }; + pp.prototype.Width = function() { return this.$val.Width(); }; + pp.ptr.prototype.Precision = function() { + var _tmp, _tmp$1, ok = false, p, prec = 0; + p = this; + _tmp = p.fmt.prec; _tmp$1 = p.fmt.fmtFlags.precPresent; prec = _tmp; ok = _tmp$1; + return [prec, ok]; + }; + pp.prototype.Precision = function() { return this.$val.Precision(); }; + pp.ptr.prototype.Flag = function(b) { + var _ref, b, p; + p = this; + _ref = b; + if (_ref === 45) { + return p.fmt.fmtFlags.minus; + } else if (_ref === 43) { + return p.fmt.fmtFlags.plus; + } else if (_ref === 35) { + return p.fmt.fmtFlags.sharp; + } else if (_ref === 32) { + return p.fmt.fmtFlags.space; + } else if (_ref === 48) { + return p.fmt.fmtFlags.zero; + } + return false; + }; + pp.prototype.Flag = function(b) { return this.$val.Flag(b); }; + pp.ptr.prototype.add = function(c) { + var c, p; + p = this; + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteRune(c); + }; + pp.prototype.add = function(c) { return this.$val.add(c); }; + pp.ptr.prototype.Write = function(b) { + var _tuple, b, err = $ifaceNil, p, ret = 0; + p = this; + _tuple = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(b); ret = _tuple[0]; err = _tuple[1]; + return [ret, err]; + }; + pp.prototype.Write = function(b) { return this.$val.Write(b); }; + Fprintln = $pkg.Fprintln = function(w, a) { + var _tuple, a, err = $ifaceNil, n = 0, p, w, x; + p = newPrinter(); + p.doPrint(a, true, true); + _tuple = w.Write((x = p.buf, $subslice(new sliceType(x.$array), x.$offset, x.$offset + x.$length))); n = _tuple[0]; err = _tuple[1]; + p.free(); + return [n, err]; + }; + Println = $pkg.Println = function(a) { + var _tuple, a, err = $ifaceNil, n = 0; + _tuple = Fprintln(os.Stdout, a); n = _tuple[0]; err = _tuple[1]; + return [n, err]; + }; + getField = function(v, i) { + var i, v, val; + v = v; + val = v.Field(i); + if ((val.Kind() === 20) && !val.IsNil()) { + val = val.Elem(); + } + return val; + }; + pp.ptr.prototype.unknownType = function(v) { + var p, v; + p = this; + v = v; + if (!v.IsValid()) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(nilAngleBytes); + return; + } + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(63); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(v.Type().String()); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(63); + }; + pp.prototype.unknownType = function(v) { return this.$val.unknownType(v); }; + pp.ptr.prototype.badVerb = function(verb) { + var p, verb; + p = this; + p.erroring = true; + p.add(37); + p.add(33); + p.add(verb); + p.add(40); + if (!($interfaceIsEqual(p.arg, $ifaceNil))) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(reflect.TypeOf(p.arg).String()); + p.add(61); + p.printArg(p.arg, 118, 0); + } else if (p.value.IsValid()) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(p.value.Type().String()); + p.add(61); + p.printValue(p.value, 118, 0); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(nilAngleBytes); + } + p.add(41); + p.erroring = false; + }; + pp.prototype.badVerb = function(verb) { return this.$val.badVerb(verb); }; + pp.ptr.prototype.fmtBool = function(v, verb) { + var _ref, p, v, verb; + p = this; + _ref = verb; + if (_ref === 116 || _ref === 118) { + p.fmt.fmt_boolean(v); + } else { + p.badVerb(verb); + } + }; + pp.prototype.fmtBool = function(v, verb) { return this.$val.fmtBool(v, verb); }; + pp.ptr.prototype.fmtC = function(c) { + var c, p, r, w, x; + p = this; + r = ((c.$low + ((c.$high >> 31) * 4294967296)) >> 0); + if (!((x = new $Int64(0, r), (x.$high === c.$high && x.$low === c.$low)))) { + r = 65533; + } + w = utf8.EncodeRune($subslice(new sliceType(p.runeBuf), 0, 4), r); + p.fmt.pad($subslice(new sliceType(p.runeBuf), 0, w)); + }; + pp.prototype.fmtC = function(c) { return this.$val.fmtC(c); }; + pp.ptr.prototype.fmtInt64 = function(v, verb) { + var _ref, p, v, verb; + p = this; + _ref = verb; + if (_ref === 98) { + p.fmt.integer(v, new $Uint64(0, 2), true, "0123456789abcdef"); + } else if (_ref === 99) { + p.fmtC(v); + } else if (_ref === 100 || _ref === 118) { + p.fmt.integer(v, new $Uint64(0, 10), true, "0123456789abcdef"); + } else if (_ref === 111) { + p.fmt.integer(v, new $Uint64(0, 8), true, "0123456789abcdef"); + } else if (_ref === 113) { + if ((0 < v.$high || (0 === v.$high && 0 <= v.$low)) && (v.$high < 0 || (v.$high === 0 && v.$low <= 1114111))) { + p.fmt.fmt_qc(v); + } else { + p.badVerb(verb); + } + } else if (_ref === 120) { + p.fmt.integer(v, new $Uint64(0, 16), true, "0123456789abcdef"); + } else if (_ref === 85) { + p.fmtUnicode(v); + } else if (_ref === 88) { + p.fmt.integer(v, new $Uint64(0, 16), true, "0123456789ABCDEF"); + } else { + p.badVerb(verb); + } + }; + pp.prototype.fmtInt64 = function(v, verb) { return this.$val.fmtInt64(v, verb); }; + pp.ptr.prototype.fmt0x64 = function(v, leading0x) { + var leading0x, p, sharp, v; + p = this; + sharp = p.fmt.fmtFlags.sharp; + p.fmt.fmtFlags.sharp = leading0x; + p.fmt.integer(new $Int64(v.$high, v.$low), new $Uint64(0, 16), false, "0123456789abcdef"); + p.fmt.fmtFlags.sharp = sharp; + }; + pp.prototype.fmt0x64 = function(v, leading0x) { return this.$val.fmt0x64(v, leading0x); }; + pp.ptr.prototype.fmtUnicode = function(v) { + var p, prec, precPresent, sharp, v; + p = this; + precPresent = p.fmt.fmtFlags.precPresent; + sharp = p.fmt.fmtFlags.sharp; + p.fmt.fmtFlags.sharp = false; + prec = p.fmt.prec; + if (!precPresent) { + p.fmt.prec = 4; + p.fmt.fmtFlags.precPresent = true; + } + p.fmt.fmtFlags.unicode = true; + p.fmt.fmtFlags.uniQuote = sharp; + p.fmt.integer(v, new $Uint64(0, 16), false, "0123456789ABCDEF"); + p.fmt.fmtFlags.unicode = false; + p.fmt.fmtFlags.uniQuote = false; + p.fmt.prec = prec; + p.fmt.fmtFlags.precPresent = precPresent; + p.fmt.fmtFlags.sharp = sharp; + }; + pp.prototype.fmtUnicode = function(v) { return this.$val.fmtUnicode(v); }; + pp.ptr.prototype.fmtUint64 = function(v, verb) { + var _ref, p, v, verb; + p = this; + _ref = verb; + if (_ref === 98) { + p.fmt.integer(new $Int64(v.$high, v.$low), new $Uint64(0, 2), false, "0123456789abcdef"); + } else if (_ref === 99) { + p.fmtC(new $Int64(v.$high, v.$low)); + } else if (_ref === 100) { + p.fmt.integer(new $Int64(v.$high, v.$low), new $Uint64(0, 10), false, "0123456789abcdef"); + } else if (_ref === 118) { + if (p.fmt.fmtFlags.sharpV) { + p.fmt0x64(v, true); + } else { + p.fmt.integer(new $Int64(v.$high, v.$low), new $Uint64(0, 10), false, "0123456789abcdef"); + } + } else if (_ref === 111) { + p.fmt.integer(new $Int64(v.$high, v.$low), new $Uint64(0, 8), false, "0123456789abcdef"); + } else if (_ref === 113) { + if ((0 < v.$high || (0 === v.$high && 0 <= v.$low)) && (v.$high < 0 || (v.$high === 0 && v.$low <= 1114111))) { + p.fmt.fmt_qc(new $Int64(v.$high, v.$low)); + } else { + p.badVerb(verb); + } + } else if (_ref === 120) { + p.fmt.integer(new $Int64(v.$high, v.$low), new $Uint64(0, 16), false, "0123456789abcdef"); + } else if (_ref === 88) { + p.fmt.integer(new $Int64(v.$high, v.$low), new $Uint64(0, 16), false, "0123456789ABCDEF"); + } else if (_ref === 85) { + p.fmtUnicode(new $Int64(v.$high, v.$low)); + } else { + p.badVerb(verb); + } + }; + pp.prototype.fmtUint64 = function(v, verb) { return this.$val.fmtUint64(v, verb); }; + pp.ptr.prototype.fmtFloat32 = function(v, verb) { + var _ref, p, v, verb; + p = this; + _ref = verb; + if (_ref === 98) { + p.fmt.fmt_fb32(v); + } else if (_ref === 101) { + p.fmt.fmt_e32(v); + } else if (_ref === 69) { + p.fmt.fmt_E32(v); + } else if (_ref === 102 || _ref === 70) { + p.fmt.fmt_f32(v); + } else if (_ref === 103 || _ref === 118) { + p.fmt.fmt_g32(v); + } else if (_ref === 71) { + p.fmt.fmt_G32(v); + } else { + p.badVerb(verb); + } + }; + pp.prototype.fmtFloat32 = function(v, verb) { return this.$val.fmtFloat32(v, verb); }; + pp.ptr.prototype.fmtFloat64 = function(v, verb) { + var _ref, p, v, verb; + p = this; + _ref = verb; + if (_ref === 98) { + p.fmt.fmt_fb64(v); + } else if (_ref === 101) { + p.fmt.fmt_e64(v); + } else if (_ref === 69) { + p.fmt.fmt_E64(v); + } else if (_ref === 102 || _ref === 70) { + p.fmt.fmt_f64(v); + } else if (_ref === 103 || _ref === 118) { + p.fmt.fmt_g64(v); + } else if (_ref === 71) { + p.fmt.fmt_G64(v); + } else { + p.badVerb(verb); + } + }; + pp.prototype.fmtFloat64 = function(v, verb) { return this.$val.fmtFloat64(v, verb); }; + pp.ptr.prototype.fmtComplex64 = function(v, verb) { + var _ref, p, v, verb; + p = this; + _ref = verb; + if (_ref === 98 || _ref === 101 || _ref === 69 || _ref === 102 || _ref === 70 || _ref === 103 || _ref === 71) { + p.fmt.fmt_c64(v, verb); + } else if (_ref === 118) { + p.fmt.fmt_c64(v, 103); + } else { + p.badVerb(verb); + } + }; + pp.prototype.fmtComplex64 = function(v, verb) { return this.$val.fmtComplex64(v, verb); }; + pp.ptr.prototype.fmtComplex128 = function(v, verb) { + var _ref, p, v, verb; + p = this; + _ref = verb; + if (_ref === 98 || _ref === 101 || _ref === 69 || _ref === 102 || _ref === 70 || _ref === 103 || _ref === 71) { + p.fmt.fmt_c128(v, verb); + } else if (_ref === 118) { + p.fmt.fmt_c128(v, 103); + } else { + p.badVerb(verb); + } + }; + pp.prototype.fmtComplex128 = function(v, verb) { return this.$val.fmtComplex128(v, verb); }; + pp.ptr.prototype.fmtString = function(v, verb) { + var _ref, p, v, verb; + p = this; + _ref = verb; + if (_ref === 118) { + if (p.fmt.fmtFlags.sharpV) { + p.fmt.fmt_q(v); + } else { + p.fmt.fmt_s(v); + } + } else if (_ref === 115) { + p.fmt.fmt_s(v); + } else if (_ref === 120) { + p.fmt.fmt_sx(v, "0123456789abcdef"); + } else if (_ref === 88) { + p.fmt.fmt_sx(v, "0123456789ABCDEF"); + } else if (_ref === 113) { + p.fmt.fmt_q(v); + } else { + p.badVerb(verb); + } + }; + pp.prototype.fmtString = function(v, verb) { return this.$val.fmtString(v, verb); }; + pp.ptr.prototype.fmtBytes = function(v, verb, typ, depth) { + var _i, _ref, _ref$1, c, depth, i, p, typ, v, verb; + p = this; + if ((verb === 118) || (verb === 100)) { + if (p.fmt.fmtFlags.sharpV) { + if (v === sliceType.nil) { + if ($interfaceIsEqual(typ, $ifaceNil)) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString("[]byte(nil)"); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(typ.String()); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(nilParenBytes); + } + return; + } + if ($interfaceIsEqual(typ, $ifaceNil)) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(bytesBytes); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(typ.String()); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(123); + } + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(91); + } + _ref = v; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + i = _i; + c = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (i > 0) { + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(commaSpaceBytes); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(32); + } + } + p.printArg(new $Uint8(c), 118, depth + 1 >> 0); + _i++; + } + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(125); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(93); + } + return; + } + _ref$1 = verb; + if (_ref$1 === 115) { + p.fmt.fmt_s($bytesToString(v)); + } else if (_ref$1 === 120) { + p.fmt.fmt_bx(v, "0123456789abcdef"); + } else if (_ref$1 === 88) { + p.fmt.fmt_bx(v, "0123456789ABCDEF"); + } else if (_ref$1 === 113) { + p.fmt.fmt_q($bytesToString(v)); + } else { + p.badVerb(verb); + } + }; + pp.prototype.fmtBytes = function(v, verb, typ, depth) { return this.$val.fmtBytes(v, verb, typ, depth); }; + pp.ptr.prototype.fmtPointer = function(value, verb) { + var _ref, _ref$1, p, u, use0x64, value, verb; + p = this; + value = value; + use0x64 = true; + _ref = verb; + if (_ref === 112 || _ref === 118) { + } else if (_ref === 98 || _ref === 100 || _ref === 111 || _ref === 120 || _ref === 88) { + use0x64 = false; + } else { + p.badVerb(verb); + return; + } + u = 0; + _ref$1 = value.Kind(); + if (_ref$1 === 18 || _ref$1 === 19 || _ref$1 === 21 || _ref$1 === 22 || _ref$1 === 23 || _ref$1 === 26) { + u = value.Pointer(); + } else { + p.badVerb(verb); + return; + } + if (p.fmt.fmtFlags.sharpV) { + p.add(40); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(value.Type().String()); + p.add(41); + p.add(40); + if (u === 0) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(nilBytes); + } else { + p.fmt0x64(new $Uint64(0, u.constructor === Number ? u : 1), true); + } + p.add(41); + } else if ((verb === 118) && (u === 0)) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(nilAngleBytes); + } else { + if (use0x64) { + p.fmt0x64(new $Uint64(0, u.constructor === Number ? u : 1), !p.fmt.fmtFlags.sharp); + } else { + p.fmtUint64(new $Uint64(0, u.constructor === Number ? u : 1), verb); + } + } + }; + pp.prototype.fmtPointer = function(value, verb) { return this.$val.fmtPointer(value, verb); }; + pp.ptr.prototype.catchPanic = function(arg, verb) { + var arg, err, p, v, verb; + p = this; + err = $recover(); + if (!($interfaceIsEqual(err, $ifaceNil))) { + v = reflect.ValueOf(arg); + if ((v.Kind() === 22) && v.IsNil()) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(nilAngleBytes); + return; + } + if (p.panicking) { + $panic(err); + } + p.fmt.clearflags(); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(percentBangBytes); + p.add(verb); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(panicBytes); + p.panicking = true; + p.printArg(err, 118, 0); + p.panicking = false; + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(41); + } + }; + pp.prototype.catchPanic = function(arg, verb) { return this.$val.catchPanic(arg, verb); }; + pp.ptr.prototype.clearSpecialFlags = function() { + var p, plusV = false, sharpV = false; + p = this; + plusV = p.fmt.fmtFlags.plusV; + if (plusV) { + p.fmt.fmtFlags.plus = true; + p.fmt.fmtFlags.plusV = false; + } + sharpV = p.fmt.fmtFlags.sharpV; + if (sharpV) { + p.fmt.fmtFlags.sharp = true; + p.fmt.fmtFlags.sharpV = false; + } + return [plusV, sharpV]; + }; + pp.prototype.clearSpecialFlags = function() { return this.$val.clearSpecialFlags(); }; + pp.ptr.prototype.restoreSpecialFlags = function(plusV, sharpV) { + var p, plusV, sharpV; + p = this; + if (plusV) { + p.fmt.fmtFlags.plus = false; + p.fmt.fmtFlags.plusV = true; + } + if (sharpV) { + p.fmt.fmtFlags.sharp = false; + p.fmt.fmtFlags.sharpV = true; + } + }; + pp.prototype.restoreSpecialFlags = function(plusV, sharpV) { return this.$val.restoreSpecialFlags(plusV, sharpV); }; + pp.ptr.prototype.handleMethods = function(verb, depth) { + var $deferred = [], $err = null, _ref, _ref$1, _tuple, _tuple$1, _tuple$2, depth, formatter, handled = false, ok, ok$1, p, stringer, v, verb; + /* */ try { $deferFrames.push($deferred); + p = this; + if (p.erroring) { + return handled; + } + _tuple = $assertType(p.arg, Formatter, true); formatter = _tuple[0]; ok = _tuple[1]; + if (ok) { + handled = true; + _tuple$1 = p.clearSpecialFlags(); + $deferred.push([$methodVal(p, "restoreSpecialFlags"), [_tuple$1[0], _tuple$1[1]]]); + $deferred.push([$methodVal(p, "catchPanic"), [p.arg, verb]]); + formatter.Format(p, verb); + return handled; + } + if (p.fmt.fmtFlags.sharpV) { + _tuple$2 = $assertType(p.arg, GoStringer, true); stringer = _tuple$2[0]; ok$1 = _tuple$2[1]; + if (ok$1) { + handled = true; + $deferred.push([$methodVal(p, "catchPanic"), [p.arg, verb]]); + p.fmt.fmt_s(stringer.GoString()); + return handled; + } + } else { + _ref = verb; + if (_ref === 118 || _ref === 115 || _ref === 120 || _ref === 88 || _ref === 113) { + _ref$1 = p.arg; + if ($assertType(_ref$1, $error, true)[1]) { + v = _ref$1; + handled = true; + $deferred.push([$methodVal(p, "catchPanic"), [p.arg, verb]]); + p.printArg(new $String(v.Error()), verb, depth); + return handled; + } else if ($assertType(_ref$1, Stringer, true)[1]) { + v = _ref$1; + handled = true; + $deferred.push([$methodVal(p, "catchPanic"), [p.arg, verb]]); + p.printArg(new $String(v.String()), verb, depth); + return handled; + } + } + } + handled = false; + return handled; + /* */ } catch(err) { $err = err; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); return handled; } + }; + pp.prototype.handleMethods = function(verb, depth) { return this.$val.handleMethods(verb, depth); }; + pp.ptr.prototype.printArg = function(arg, verb, depth) { + var _ref, _ref$1, arg, depth, f, handled, p, verb, wasString = false; + p = this; + p.arg = arg; + p.value = new reflect.Value.ptr(ptrType$2.nil, 0, 0); + if ($interfaceIsEqual(arg, $ifaceNil)) { + if ((verb === 84) || (verb === 118)) { + p.fmt.pad(nilAngleBytes); + } else { + p.badVerb(verb); + } + wasString = false; + return wasString; + } + _ref = verb; + if (_ref === 84) { + p.printArg(new $String(reflect.TypeOf(arg).String()), 115, 0); + wasString = false; + return wasString; + } else if (_ref === 112) { + p.fmtPointer(reflect.ValueOf(arg), verb); + wasString = false; + return wasString; + } + _ref$1 = arg; + if ($assertType(_ref$1, $Bool, true)[1]) { + f = _ref$1.$val; + p.fmtBool(f, verb); + } else if ($assertType(_ref$1, $Float32, true)[1]) { + f = _ref$1.$val; + p.fmtFloat32(f, verb); + } else if ($assertType(_ref$1, $Float64, true)[1]) { + f = _ref$1.$val; + p.fmtFloat64(f, verb); + } else if ($assertType(_ref$1, $Complex64, true)[1]) { + f = _ref$1.$val; + p.fmtComplex64(f, verb); + } else if ($assertType(_ref$1, $Complex128, true)[1]) { + f = _ref$1.$val; + p.fmtComplex128(f, verb); + } else if ($assertType(_ref$1, $Int, true)[1]) { + f = _ref$1.$val; + p.fmtInt64(new $Int64(0, f), verb); + } else if ($assertType(_ref$1, $Int8, true)[1]) { + f = _ref$1.$val; + p.fmtInt64(new $Int64(0, f), verb); + } else if ($assertType(_ref$1, $Int16, true)[1]) { + f = _ref$1.$val; + p.fmtInt64(new $Int64(0, f), verb); + } else if ($assertType(_ref$1, $Int32, true)[1]) { + f = _ref$1.$val; + p.fmtInt64(new $Int64(0, f), verb); + } else if ($assertType(_ref$1, $Int64, true)[1]) { + f = _ref$1.$val; + p.fmtInt64(f, verb); + } else if ($assertType(_ref$1, $Uint, true)[1]) { + f = _ref$1.$val; + p.fmtUint64(new $Uint64(0, f), verb); + } else if ($assertType(_ref$1, $Uint8, true)[1]) { + f = _ref$1.$val; + p.fmtUint64(new $Uint64(0, f), verb); + } else if ($assertType(_ref$1, $Uint16, true)[1]) { + f = _ref$1.$val; + p.fmtUint64(new $Uint64(0, f), verb); + } else if ($assertType(_ref$1, $Uint32, true)[1]) { + f = _ref$1.$val; + p.fmtUint64(new $Uint64(0, f), verb); + } else if ($assertType(_ref$1, $Uint64, true)[1]) { + f = _ref$1.$val; + p.fmtUint64(f, verb); + } else if ($assertType(_ref$1, $Uintptr, true)[1]) { + f = _ref$1.$val; + p.fmtUint64(new $Uint64(0, f.constructor === Number ? f : 1), verb); + } else if ($assertType(_ref$1, $String, true)[1]) { + f = _ref$1.$val; + p.fmtString(f, verb); + wasString = (verb === 115) || (verb === 118); + } else if ($assertType(_ref$1, sliceType, true)[1]) { + f = _ref$1.$val; + p.fmtBytes(f, verb, $ifaceNil, depth); + wasString = verb === 115; + } else { + f = _ref$1; + handled = p.handleMethods(verb, depth); + if (handled) { + wasString = false; + return wasString; + } + wasString = p.printReflectValue(reflect.ValueOf(arg), verb, depth); + return wasString; + } + p.arg = $ifaceNil; + return wasString; + }; + pp.prototype.printArg = function(arg, verb, depth) { return this.$val.printArg(arg, verb, depth); }; + pp.ptr.prototype.printValue = function(value, verb, depth) { + var _ref, depth, handled, p, value, verb, wasString = false; + p = this; + value = value; + if (!value.IsValid()) { + if ((verb === 84) || (verb === 118)) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(nilAngleBytes); + } else { + p.badVerb(verb); + } + wasString = false; + return wasString; + } + _ref = verb; + if (_ref === 84) { + p.printArg(new $String(value.Type().String()), 115, 0); + wasString = false; + return wasString; + } else if (_ref === 112) { + p.fmtPointer(value, verb); + wasString = false; + return wasString; + } + p.arg = $ifaceNil; + if (value.CanInterface()) { + p.arg = value.Interface(); + } + handled = p.handleMethods(verb, depth); + if (handled) { + wasString = false; + return wasString; + } + wasString = p.printReflectValue(value, verb, depth); + return wasString; + }; + pp.prototype.printValue = function(value, verb, depth) { return this.$val.printValue(value, verb, depth); }; + pp.ptr.prototype.printReflectValue = function(value, verb, depth) { + var _i, _i$1, _ref, _ref$1, _ref$2, _ref$3, a, bytes, depth, f, f$1, i, i$1, i$2, i$3, key, keys, oldValue, p, t, typ, v, v$1, value, value$1, verb, wasString = false, x; + p = this; + value = value; + oldValue = p.value; + p.value = value; + f = value; + _ref = f.Kind(); + BigSwitch: + switch (0) { default: if (_ref === 1) { + p.fmtBool(f.Bool(), verb); + } else if (_ref === 2 || _ref === 3 || _ref === 4 || _ref === 5 || _ref === 6) { + p.fmtInt64(f.Int(), verb); + } else if (_ref === 7 || _ref === 8 || _ref === 9 || _ref === 10 || _ref === 11 || _ref === 12) { + p.fmtUint64(f.Uint(), verb); + } else if (_ref === 13 || _ref === 14) { + if (f.Type().Size() === 4) { + p.fmtFloat32(f.Float(), verb); + } else { + p.fmtFloat64(f.Float(), verb); + } + } else if (_ref === 15 || _ref === 16) { + if (f.Type().Size() === 8) { + p.fmtComplex64((x = f.Complex(), new $Complex64(x.$real, x.$imag)), verb); + } else { + p.fmtComplex128(f.Complex(), verb); + } + } else if (_ref === 24) { + p.fmtString(f.String(), verb); + } else if (_ref === 21) { + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(f.Type().String()); + if (f.IsNil()) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString("(nil)"); + break; + } + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(123); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(mapBytes); + } + keys = f.MapKeys(); + _ref$1 = keys; + _i = 0; + while (true) { + if (!(_i < _ref$1.$length)) { break; } + i = _i; + key = ((_i < 0 || _i >= _ref$1.$length) ? $throwRuntimeError("index out of range") : _ref$1.$array[_ref$1.$offset + _i]); + if (i > 0) { + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(commaSpaceBytes); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(32); + } + } + p.printValue(key, verb, depth + 1 >> 0); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(58); + p.printValue(f.MapIndex(key), verb, depth + 1 >> 0); + _i++; + } + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(125); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(93); + } + } else if (_ref === 25) { + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(value.Type().String()); + } + p.add(123); + v = f; + t = v.Type(); + i$1 = 0; + while (true) { + if (!(i$1 < v.NumField())) { break; } + if (i$1 > 0) { + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(commaSpaceBytes); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(32); + } + } + if (p.fmt.fmtFlags.plusV || p.fmt.fmtFlags.sharpV) { + f$1 = $clone(t.Field(i$1), reflect.StructField); + if (!(f$1.Name === "")) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(f$1.Name); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(58); + } + } + p.printValue(getField(v, i$1), verb, depth + 1 >> 0); + i$1 = i$1 + (1) >> 0; + } + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(125); + } else if (_ref === 20) { + value$1 = f.Elem(); + if (!value$1.IsValid()) { + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(f.Type().String()); + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(nilParenBytes); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(nilAngleBytes); + } + } else { + wasString = p.printValue(value$1, verb, depth + 1 >> 0); + } + } else if (_ref === 17 || _ref === 23) { + typ = f.Type(); + if ((typ.Elem().Kind() === 8) && ($interfaceIsEqual(typ.Elem(), byteType) || (verb === 115) || (verb === 113) || (verb === 120))) { + bytes = sliceType.nil; + if (f.Kind() === 23) { + bytes = f.Bytes(); + } else if (f.CanAddr()) { + bytes = f.Slice(0, f.Len()).Bytes(); + } else { + bytes = $makeSlice(sliceType, f.Len()); + _ref$2 = bytes; + _i$1 = 0; + while (true) { + if (!(_i$1 < _ref$2.$length)) { break; } + i$2 = _i$1; + (i$2 < 0 || i$2 >= bytes.$length) ? $throwRuntimeError("index out of range") : bytes.$array[bytes.$offset + i$2] = (f.Index(i$2).Uint().$low << 24 >>> 24); + _i$1++; + } + } + p.fmtBytes(bytes, verb, typ, depth); + wasString = verb === 115; + break; + } + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString(value.Type().String()); + if ((f.Kind() === 23) && f.IsNil()) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteString("(nil)"); + break; + } + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(123); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(91); + } + i$3 = 0; + while (true) { + if (!(i$3 < f.Len())) { break; } + if (i$3 > 0) { + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).Write(commaSpaceBytes); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(32); + } + } + p.printValue(f.Index(i$3), verb, depth + 1 >> 0); + i$3 = i$3 + (1) >> 0; + } + if (p.fmt.fmtFlags.sharpV) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(125); + } else { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(93); + } + } else if (_ref === 22) { + v$1 = f.Pointer(); + if (!((v$1 === 0)) && (depth === 0)) { + a = f.Elem(); + _ref$3 = a.Kind(); + if (_ref$3 === 17 || _ref$3 === 23) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(38); + p.printValue(a, verb, depth + 1 >> 0); + break BigSwitch; + } else if (_ref$3 === 25) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(38); + p.printValue(a, verb, depth + 1 >> 0); + break BigSwitch; + } else if (_ref$3 === 21) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(38); + p.printValue(a, verb, depth + 1 >> 0); + break BigSwitch; + } + } + p.fmtPointer(value, verb); + } else if (_ref === 18 || _ref === 19 || _ref === 26) { + p.fmtPointer(value, verb); + } else { + p.unknownType(f); + } } + p.value = oldValue; + wasString = wasString; + return wasString; + }; + pp.prototype.printReflectValue = function(value, verb, depth) { return this.$val.printReflectValue(value, verb, depth); }; + pp.ptr.prototype.doPrint = function(a, addspace, addnewline) { + var a, addnewline, addspace, arg, argNum, isString, p, prevString; + p = this; + prevString = false; + argNum = 0; + while (true) { + if (!(argNum < a.$length)) { break; } + p.fmt.clearflags(); + arg = ((argNum < 0 || argNum >= a.$length) ? $throwRuntimeError("index out of range") : a.$array[a.$offset + argNum]); + if (argNum > 0) { + isString = !($interfaceIsEqual(arg, $ifaceNil)) && (reflect.TypeOf(arg).Kind() === 24); + if (addspace || !isString && !prevString) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(32); + } + } + prevString = p.printArg(arg, 118, 0); + argNum = argNum + (1) >> 0; + } + if (addnewline) { + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p).WriteByte(10); + } + }; + pp.prototype.doPrint = function(a, addspace, addnewline) { return this.$val.doPrint(a, addspace, addnewline); }; + ss.ptr.prototype.Read = function(buf) { + var _tmp, _tmp$1, buf, err = $ifaceNil, n = 0, s; + s = this; + _tmp = 0; _tmp$1 = errors.New("ScanState's Read should not be called. Use ReadRune"); n = _tmp; err = _tmp$1; + return [n, err]; + }; + ss.prototype.Read = function(buf) { return this.$val.Read(buf); }; + ss.ptr.prototype.ReadRune = function() { + var _tuple, err = $ifaceNil, r = 0, s, size = 0; + s = this; + if (s.peekRune >= 0) { + s.count = s.count + (1) >> 0; + r = s.peekRune; + size = utf8.RuneLen(r); + s.prevRune = r; + s.peekRune = -1; + return [r, size, err]; + } + if (s.atEOF || s.ssave.nlIsEnd && (s.prevRune === 10) || s.count >= s.ssave.argLimit) { + err = io.EOF; + return [r, size, err]; + } + _tuple = s.rr.ReadRune(); r = _tuple[0]; size = _tuple[1]; err = _tuple[2]; + if ($interfaceIsEqual(err, $ifaceNil)) { + s.count = s.count + (1) >> 0; + s.prevRune = r; + } else if ($interfaceIsEqual(err, io.EOF)) { + s.atEOF = true; + } + return [r, size, err]; + }; + ss.prototype.ReadRune = function() { return this.$val.ReadRune(); }; + ss.ptr.prototype.Width = function() { + var _tmp, _tmp$1, _tmp$2, _tmp$3, ok = false, s, wid = 0; + s = this; + if (s.ssave.maxWid === 1073741824) { + _tmp = 0; _tmp$1 = false; wid = _tmp; ok = _tmp$1; + return [wid, ok]; + } + _tmp$2 = s.ssave.maxWid; _tmp$3 = true; wid = _tmp$2; ok = _tmp$3; + return [wid, ok]; + }; + ss.prototype.Width = function() { return this.$val.Width(); }; + ss.ptr.prototype.getRune = function() { + var _tuple, err, r = 0, s; + s = this; + _tuple = s.ReadRune(); r = _tuple[0]; err = _tuple[2]; + if (!($interfaceIsEqual(err, $ifaceNil))) { + if ($interfaceIsEqual(err, io.EOF)) { + r = -1; + return r; + } + s.error(err); + } + return r; + }; + ss.prototype.getRune = function() { return this.$val.getRune(); }; + ss.ptr.prototype.UnreadRune = function() { + var _tuple, ok, s, u; + s = this; + _tuple = $assertType(s.rr, runeUnreader, true); u = _tuple[0]; ok = _tuple[1]; + if (ok) { + u.UnreadRune(); + } else { + s.peekRune = s.prevRune; + } + s.prevRune = -1; + s.count = s.count - (1) >> 0; + return $ifaceNil; + }; + ss.prototype.UnreadRune = function() { return this.$val.UnreadRune(); }; + ss.ptr.prototype.error = function(err) { + var err, s, x; + s = this; + $panic((x = new scanError.ptr(err), new x.constructor.elem(x))); + }; + ss.prototype.error = function(err) { return this.$val.error(err); }; + ss.ptr.prototype.errorString = function(err) { + var err, s, x; + s = this; + $panic((x = new scanError.ptr(errors.New(err)), new x.constructor.elem(x))); + }; + ss.prototype.errorString = function(err) { return this.$val.errorString(err); }; + ss.ptr.prototype.Token = function(skipSpace, f) { + var $deferred = [], $err = null, err = $ifaceNil, f, s, skipSpace, tok = sliceType.nil; + /* */ try { $deferFrames.push($deferred); + s = this; + $deferred.push([(function() { + var _tuple, e, ok, se; + e = $recover(); + if (!($interfaceIsEqual(e, $ifaceNil))) { + _tuple = $assertType(e, scanError, true); se = $clone(_tuple[0], scanError); ok = _tuple[1]; + if (ok) { + err = se.err; + } else { + $panic(e); + } + } + }), []]); + if (f === $throwNilPointerError) { + f = notSpace; + } + s.buf = $subslice(s.buf, 0, 0); + tok = s.token(skipSpace, f); + return [tok, err]; + /* */ } catch(err) { $err = err; } finally { $deferFrames.pop(); $callDeferred($deferred, $err); return [tok, err]; } + }; + ss.prototype.Token = function(skipSpace, f) { return this.$val.Token(skipSpace, f); }; + isSpace = function(r) { + var _i, _ref, r, rng, rx; + if (r >= 65536) { + return false; + } + rx = (r << 16 >>> 16); + _ref = space; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + rng = $clone(((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]), arrayType); + if (rx < rng[0]) { + return false; + } + if (rx <= rng[1]) { + return true; + } + _i++; + } + return false; + }; + notSpace = function(r) { + var r; + return !isSpace(r); + }; + ss.ptr.prototype.SkipSpace = function() { + var s; + s = this; + s.skipSpace(false); + }; + ss.prototype.SkipSpace = function() { return this.$val.SkipSpace(); }; + ss.ptr.prototype.free = function(old) { + var old, s; + s = this; + old = $clone(old, ssave); + if (old.validSave) { + $copy(s.ssave, old, ssave); + return; + } + if (s.buf.$capacity > 1024) { + return; + } + s.buf = $subslice(s.buf, 0, 0); + s.rr = $ifaceNil; + ssFree.Put(s); + }; + ss.prototype.free = function(old) { return this.$val.free(old); }; + ss.ptr.prototype.skipSpace = function(stopAtNewline) { + var r, s, stopAtNewline; + s = this; + while (true) { + if (!(true)) { break; } + r = s.getRune(); + if (r === -1) { + return; + } + if ((r === 13) && s.peek("\n")) { + continue; + } + if (r === 10) { + if (stopAtNewline) { + break; + } + if (s.ssave.nlIsSpace) { + continue; + } + s.errorString("unexpected newline"); + return; + } + if (!isSpace(r)) { + s.UnreadRune(); + break; + } + } + }; + ss.prototype.skipSpace = function(stopAtNewline) { return this.$val.skipSpace(stopAtNewline); }; + ss.ptr.prototype.token = function(skipSpace, f) { + var f, r, s, skipSpace, x; + s = this; + if (skipSpace) { + s.skipSpace(false); + } + while (true) { + if (!(true)) { break; } + r = s.getRune(); + if (r === -1) { + break; + } + if (!f(r)) { + s.UnreadRune(); + break; + } + new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, s).WriteRune(r); + } + return (x = s.buf, $subslice(new sliceType(x.$array), x.$offset, x.$offset + x.$length)); + }; + ss.prototype.token = function(skipSpace, f) { return this.$val.token(skipSpace, f); }; + indexRune = function(s, r) { + var _i, _ref, _rune, c, i, r, s; + _ref = s; + _i = 0; + while (true) { + if (!(_i < _ref.length)) { break; } + _rune = $decodeRune(_ref, _i); + i = _i; + c = _rune[0]; + if (c === r) { + return i; + } + _i += _rune[1]; + } + return -1; + }; + ss.ptr.prototype.peek = function(ok) { + var ok, r, s; + s = this; + r = s.getRune(); + if (!((r === -1))) { + s.UnreadRune(); + } + return indexRune(ok, r) >= 0; + }; + ss.prototype.peek = function(ok) { return this.$val.peek(ok); }; + ptrType$25.methods = [{prop: "clearflags", name: "clearflags", pkg: "fmt", typ: $funcType([], [], false)}, {prop: "init", name: "init", pkg: "fmt", typ: $funcType([ptrType$1], [], false)}, {prop: "computePadding", name: "computePadding", pkg: "fmt", typ: $funcType([$Int], [sliceType, $Int, $Int], false)}, {prop: "writePadding", name: "writePadding", pkg: "fmt", typ: $funcType([$Int, sliceType], [], false)}, {prop: "pad", name: "pad", pkg: "fmt", typ: $funcType([sliceType], [], false)}, {prop: "padString", name: "padString", pkg: "fmt", typ: $funcType([$String], [], false)}, {prop: "fmt_boolean", name: "fmt_boolean", pkg: "fmt", typ: $funcType([$Bool], [], false)}, {prop: "integer", name: "integer", pkg: "fmt", typ: $funcType([$Int64, $Uint64, $Bool, $String], [], false)}, {prop: "truncate", name: "truncate", pkg: "fmt", typ: $funcType([$String], [$String], false)}, {prop: "fmt_s", name: "fmt_s", pkg: "fmt", typ: $funcType([$String], [], false)}, {prop: "fmt_sbx", name: "fmt_sbx", pkg: "fmt", typ: $funcType([$String, sliceType, $String], [], false)}, {prop: "fmt_sx", name: "fmt_sx", pkg: "fmt", typ: $funcType([$String, $String], [], false)}, {prop: "fmt_bx", name: "fmt_bx", pkg: "fmt", typ: $funcType([sliceType, $String], [], false)}, {prop: "fmt_q", name: "fmt_q", pkg: "fmt", typ: $funcType([$String], [], false)}, {prop: "fmt_qc", name: "fmt_qc", pkg: "fmt", typ: $funcType([$Int64], [], false)}, {prop: "formatFloat", name: "formatFloat", pkg: "fmt", typ: $funcType([$Float64, $Uint8, $Int, $Int], [], false)}, {prop: "fmt_e64", name: "fmt_e64", pkg: "fmt", typ: $funcType([$Float64], [], false)}, {prop: "fmt_E64", name: "fmt_E64", pkg: "fmt", typ: $funcType([$Float64], [], false)}, {prop: "fmt_f64", name: "fmt_f64", pkg: "fmt", typ: $funcType([$Float64], [], false)}, {prop: "fmt_g64", name: "fmt_g64", pkg: "fmt", typ: $funcType([$Float64], [], false)}, {prop: "fmt_G64", name: "fmt_G64", pkg: "fmt", typ: $funcType([$Float64], [], false)}, {prop: "fmt_fb64", name: "fmt_fb64", pkg: "fmt", typ: $funcType([$Float64], [], false)}, {prop: "fmt_e32", name: "fmt_e32", pkg: "fmt", typ: $funcType([$Float32], [], false)}, {prop: "fmt_E32", name: "fmt_E32", pkg: "fmt", typ: $funcType([$Float32], [], false)}, {prop: "fmt_f32", name: "fmt_f32", pkg: "fmt", typ: $funcType([$Float32], [], false)}, {prop: "fmt_g32", name: "fmt_g32", pkg: "fmt", typ: $funcType([$Float32], [], false)}, {prop: "fmt_G32", name: "fmt_G32", pkg: "fmt", typ: $funcType([$Float32], [], false)}, {prop: "fmt_fb32", name: "fmt_fb32", pkg: "fmt", typ: $funcType([$Float32], [], false)}, {prop: "fmt_c64", name: "fmt_c64", pkg: "fmt", typ: $funcType([$Complex64, $Int32], [], false)}, {prop: "fmt_c128", name: "fmt_c128", pkg: "fmt", typ: $funcType([$Complex128, $Int32], [], false)}, {prop: "fmt_complex", name: "fmt_complex", pkg: "fmt", typ: $funcType([$Float64, $Float64, $Int, $Int32], [], false)}]; + ptrType$1.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}, {prop: "WriteByte", name: "WriteByte", pkg: "", typ: $funcType([$Uint8], [$error], false)}, {prop: "WriteRune", name: "WriteRune", pkg: "", typ: $funcType([$Int32], [$error], false)}]; + ptrType.methods = [{prop: "free", name: "free", pkg: "fmt", typ: $funcType([], [], false)}, {prop: "Width", name: "Width", pkg: "", typ: $funcType([], [$Int, $Bool], false)}, {prop: "Precision", name: "Precision", pkg: "", typ: $funcType([], [$Int, $Bool], false)}, {prop: "Flag", name: "Flag", pkg: "", typ: $funcType([$Int], [$Bool], false)}, {prop: "add", name: "add", pkg: "fmt", typ: $funcType([$Int32], [], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "unknownType", name: "unknownType", pkg: "fmt", typ: $funcType([reflect.Value], [], false)}, {prop: "badVerb", name: "badVerb", pkg: "fmt", typ: $funcType([$Int32], [], false)}, {prop: "fmtBool", name: "fmtBool", pkg: "fmt", typ: $funcType([$Bool, $Int32], [], false)}, {prop: "fmtC", name: "fmtC", pkg: "fmt", typ: $funcType([$Int64], [], false)}, {prop: "fmtInt64", name: "fmtInt64", pkg: "fmt", typ: $funcType([$Int64, $Int32], [], false)}, {prop: "fmt0x64", name: "fmt0x64", pkg: "fmt", typ: $funcType([$Uint64, $Bool], [], false)}, {prop: "fmtUnicode", name: "fmtUnicode", pkg: "fmt", typ: $funcType([$Int64], [], false)}, {prop: "fmtUint64", name: "fmtUint64", pkg: "fmt", typ: $funcType([$Uint64, $Int32], [], false)}, {prop: "fmtFloat32", name: "fmtFloat32", pkg: "fmt", typ: $funcType([$Float32, $Int32], [], false)}, {prop: "fmtFloat64", name: "fmtFloat64", pkg: "fmt", typ: $funcType([$Float64, $Int32], [], false)}, {prop: "fmtComplex64", name: "fmtComplex64", pkg: "fmt", typ: $funcType([$Complex64, $Int32], [], false)}, {prop: "fmtComplex128", name: "fmtComplex128", pkg: "fmt", typ: $funcType([$Complex128, $Int32], [], false)}, {prop: "fmtString", name: "fmtString", pkg: "fmt", typ: $funcType([$String, $Int32], [], false)}, {prop: "fmtBytes", name: "fmtBytes", pkg: "fmt", typ: $funcType([sliceType, $Int32, reflect.Type, $Int], [], false)}, {prop: "fmtPointer", name: "fmtPointer", pkg: "fmt", typ: $funcType([reflect.Value, $Int32], [], false)}, {prop: "catchPanic", name: "catchPanic", pkg: "fmt", typ: $funcType([$emptyInterface, $Int32], [], false)}, {prop: "clearSpecialFlags", name: "clearSpecialFlags", pkg: "fmt", typ: $funcType([], [$Bool, $Bool], false)}, {prop: "restoreSpecialFlags", name: "restoreSpecialFlags", pkg: "fmt", typ: $funcType([$Bool, $Bool], [], false)}, {prop: "handleMethods", name: "handleMethods", pkg: "fmt", typ: $funcType([$Int32, $Int], [$Bool], false)}, {prop: "printArg", name: "printArg", pkg: "fmt", typ: $funcType([$emptyInterface, $Int32, $Int], [$Bool], false)}, {prop: "printValue", name: "printValue", pkg: "fmt", typ: $funcType([reflect.Value, $Int32, $Int], [$Bool], false)}, {prop: "printReflectValue", name: "printReflectValue", pkg: "fmt", typ: $funcType([reflect.Value, $Int32, $Int], [$Bool], false)}, {prop: "argNumber", name: "argNumber", pkg: "fmt", typ: $funcType([$Int, $String, $Int, $Int], [$Int, $Int, $Bool], false)}, {prop: "doPrintf", name: "doPrintf", pkg: "fmt", typ: $funcType([$String, sliceType$1], [], false)}, {prop: "doPrint", name: "doPrint", pkg: "fmt", typ: $funcType([sliceType$1, $Bool, $Bool], [], false)}]; + ptrType$5.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "ReadRune", name: "ReadRune", pkg: "", typ: $funcType([], [$Int32, $Int, $error], false)}, {prop: "Width", name: "Width", pkg: "", typ: $funcType([], [$Int, $Bool], false)}, {prop: "getRune", name: "getRune", pkg: "fmt", typ: $funcType([], [$Int32], false)}, {prop: "mustReadRune", name: "mustReadRune", pkg: "fmt", typ: $funcType([], [$Int32], false)}, {prop: "UnreadRune", name: "UnreadRune", pkg: "", typ: $funcType([], [$error], false)}, {prop: "error", name: "error", pkg: "fmt", typ: $funcType([$error], [], false)}, {prop: "errorString", name: "errorString", pkg: "fmt", typ: $funcType([$String], [], false)}, {prop: "Token", name: "Token", pkg: "", typ: $funcType([$Bool, funcType], [sliceType, $error], false)}, {prop: "SkipSpace", name: "SkipSpace", pkg: "", typ: $funcType([], [], false)}, {prop: "free", name: "free", pkg: "fmt", typ: $funcType([ssave], [], false)}, {prop: "skipSpace", name: "skipSpace", pkg: "fmt", typ: $funcType([$Bool], [], false)}, {prop: "token", name: "token", pkg: "fmt", typ: $funcType([$Bool, funcType], [sliceType], false)}, {prop: "consume", name: "consume", pkg: "fmt", typ: $funcType([$String, $Bool], [$Bool], false)}, {prop: "peek", name: "peek", pkg: "fmt", typ: $funcType([$String], [$Bool], false)}, {prop: "notEOF", name: "notEOF", pkg: "fmt", typ: $funcType([], [], false)}, {prop: "accept", name: "accept", pkg: "fmt", typ: $funcType([$String], [$Bool], false)}, {prop: "okVerb", name: "okVerb", pkg: "fmt", typ: $funcType([$Int32, $String, $String], [$Bool], false)}, {prop: "scanBool", name: "scanBool", pkg: "fmt", typ: $funcType([$Int32], [$Bool], false)}, {prop: "getBase", name: "getBase", pkg: "fmt", typ: $funcType([$Int32], [$Int, $String], false)}, {prop: "scanNumber", name: "scanNumber", pkg: "fmt", typ: $funcType([$String, $Bool], [$String], false)}, {prop: "scanRune", name: "scanRune", pkg: "fmt", typ: $funcType([$Int], [$Int64], false)}, {prop: "scanBasePrefix", name: "scanBasePrefix", pkg: "fmt", typ: $funcType([], [$Int, $String, $Bool], false)}, {prop: "scanInt", name: "scanInt", pkg: "fmt", typ: $funcType([$Int32, $Int], [$Int64], false)}, {prop: "scanUint", name: "scanUint", pkg: "fmt", typ: $funcType([$Int32, $Int], [$Uint64], false)}, {prop: "floatToken", name: "floatToken", pkg: "fmt", typ: $funcType([], [$String], false)}, {prop: "complexTokens", name: "complexTokens", pkg: "fmt", typ: $funcType([], [$String, $String], false)}, {prop: "convertFloat", name: "convertFloat", pkg: "fmt", typ: $funcType([$String, $Int], [$Float64], false)}, {prop: "scanComplex", name: "scanComplex", pkg: "fmt", typ: $funcType([$Int32, $Int], [$Complex128], false)}, {prop: "convertString", name: "convertString", pkg: "fmt", typ: $funcType([$Int32], [$String], false)}, {prop: "quotedString", name: "quotedString", pkg: "fmt", typ: $funcType([], [$String], false)}, {prop: "hexDigit", name: "hexDigit", pkg: "fmt", typ: $funcType([$Int32], [$Int], false)}, {prop: "hexByte", name: "hexByte", pkg: "fmt", typ: $funcType([], [$Uint8, $Bool], false)}, {prop: "hexString", name: "hexString", pkg: "fmt", typ: $funcType([], [$String], false)}, {prop: "scanOne", name: "scanOne", pkg: "fmt", typ: $funcType([$Int32, $emptyInterface], [], false)}, {prop: "doScan", name: "doScan", pkg: "fmt", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "advance", name: "advance", pkg: "fmt", typ: $funcType([$String], [$Int], false)}, {prop: "doScanf", name: "doScanf", pkg: "fmt", typ: $funcType([$String, sliceType$1], [$Int, $error], false)}]; + fmtFlags.init([{prop: "widPresent", name: "widPresent", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "precPresent", name: "precPresent", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "minus", name: "minus", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "plus", name: "plus", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "sharp", name: "sharp", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "space", name: "space", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "unicode", name: "unicode", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "uniQuote", name: "uniQuote", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "zero", name: "zero", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "plusV", name: "plusV", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "sharpV", name: "sharpV", pkg: "fmt", typ: $Bool, tag: ""}]); + fmt.init([{prop: "intbuf", name: "intbuf", pkg: "fmt", typ: arrayType$2, tag: ""}, {prop: "buf", name: "buf", pkg: "fmt", typ: ptrType$1, tag: ""}, {prop: "wid", name: "wid", pkg: "fmt", typ: $Int, tag: ""}, {prop: "prec", name: "prec", pkg: "fmt", typ: $Int, tag: ""}, {prop: "fmtFlags", name: "", pkg: "fmt", typ: fmtFlags, tag: ""}]); + State.init([{prop: "Flag", name: "Flag", pkg: "", typ: $funcType([$Int], [$Bool], false)}, {prop: "Precision", name: "Precision", pkg: "", typ: $funcType([], [$Int, $Bool], false)}, {prop: "Width", name: "Width", pkg: "", typ: $funcType([], [$Int, $Bool], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}]); + Formatter.init([{prop: "Format", name: "Format", pkg: "", typ: $funcType([State, $Int32], [], false)}]); + Stringer.init([{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]); + GoStringer.init([{prop: "GoString", name: "GoString", pkg: "", typ: $funcType([], [$String], false)}]); + buffer.init($Uint8); + pp.init([{prop: "n", name: "n", pkg: "fmt", typ: $Int, tag: ""}, {prop: "panicking", name: "panicking", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "erroring", name: "erroring", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "buf", name: "buf", pkg: "fmt", typ: buffer, tag: ""}, {prop: "arg", name: "arg", pkg: "fmt", typ: $emptyInterface, tag: ""}, {prop: "value", name: "value", pkg: "fmt", typ: reflect.Value, tag: ""}, {prop: "reordered", name: "reordered", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "goodArgNum", name: "goodArgNum", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "runeBuf", name: "runeBuf", pkg: "fmt", typ: arrayType$1, tag: ""}, {prop: "fmt", name: "fmt", pkg: "fmt", typ: fmt, tag: ""}]); + runeUnreader.init([{prop: "UnreadRune", name: "UnreadRune", pkg: "", typ: $funcType([], [$error], false)}]); + scanError.init([{prop: "err", name: "err", pkg: "fmt", typ: $error, tag: ""}]); + ss.init([{prop: "rr", name: "rr", pkg: "fmt", typ: io.RuneReader, tag: ""}, {prop: "buf", name: "buf", pkg: "fmt", typ: buffer, tag: ""}, {prop: "peekRune", name: "peekRune", pkg: "fmt", typ: $Int32, tag: ""}, {prop: "prevRune", name: "prevRune", pkg: "fmt", typ: $Int32, tag: ""}, {prop: "count", name: "count", pkg: "fmt", typ: $Int, tag: ""}, {prop: "atEOF", name: "atEOF", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "ssave", name: "", pkg: "fmt", typ: ssave, tag: ""}]); + ssave.init([{prop: "validSave", name: "validSave", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "nlIsEnd", name: "nlIsEnd", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "nlIsSpace", name: "nlIsSpace", pkg: "fmt", typ: $Bool, tag: ""}, {prop: "argLimit", name: "argLimit", pkg: "fmt", typ: $Int, tag: ""}, {prop: "limit", name: "limit", pkg: "fmt", typ: $Int, tag: ""}, {prop: "maxWid", name: "maxWid", pkg: "fmt", typ: $Int, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_fmt = function() { while (true) { switch ($s) { case 0: + $r = errors.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + $r = io.$init($BLOCKING); /* */ $s = 2; case 2: if ($r && $r.$blocking) { $r = $r(); } + $r = math.$init($BLOCKING); /* */ $s = 3; case 3: if ($r && $r.$blocking) { $r = $r(); } + $r = os.$init($BLOCKING); /* */ $s = 4; case 4: if ($r && $r.$blocking) { $r = $r(); } + $r = reflect.$init($BLOCKING); /* */ $s = 5; case 5: if ($r && $r.$blocking) { $r = $r(); } + $r = strconv.$init($BLOCKING); /* */ $s = 6; case 6: if ($r && $r.$blocking) { $r = $r(); } + $r = sync.$init($BLOCKING); /* */ $s = 7; case 7: if ($r && $r.$blocking) { $r = $r(); } + $r = utf8.$init($BLOCKING); /* */ $s = 8; case 8: if ($r && $r.$blocking) { $r = $r(); } + padZeroBytes = $makeSlice(sliceType, 65); + padSpaceBytes = $makeSlice(sliceType, 65); + trueBytes = new sliceType($stringToBytes("true")); + falseBytes = new sliceType($stringToBytes("false")); + commaSpaceBytes = new sliceType($stringToBytes(", ")); + nilAngleBytes = new sliceType($stringToBytes("")); + nilParenBytes = new sliceType($stringToBytes("(nil)")); + nilBytes = new sliceType($stringToBytes("nil")); + mapBytes = new sliceType($stringToBytes("map[")); + percentBangBytes = new sliceType($stringToBytes("%!")); + panicBytes = new sliceType($stringToBytes("(PANIC=")); + irparenBytes = new sliceType($stringToBytes("i)")); + bytesBytes = new sliceType($stringToBytes("[]byte{")); + ppFree = new sync.Pool.ptr(0, 0, sliceType$1.nil, (function() { + return new pp.ptr(); + })); + intBits = reflect.TypeOf(new $Int(0)).Bits(); + uintptrBits = reflect.TypeOf(new $Uintptr(0)).Bits(); + byteType = reflect.TypeOf(new $Uint8(0)); + space = new sliceType$2([$toNativeArray($kindUint16, [9, 13]), $toNativeArray($kindUint16, [32, 32]), $toNativeArray($kindUint16, [133, 133]), $toNativeArray($kindUint16, [160, 160]), $toNativeArray($kindUint16, [5760, 5760]), $toNativeArray($kindUint16, [8192, 8202]), $toNativeArray($kindUint16, [8232, 8233]), $toNativeArray($kindUint16, [8239, 8239]), $toNativeArray($kindUint16, [8287, 8287]), $toNativeArray($kindUint16, [12288, 12288])]); + ssFree = new sync.Pool.ptr(0, 0, sliceType$1.nil, (function() { + return new ss.ptr(); + })); + complexError = errors.New("syntax error scanning complex number"); + boolError = errors.New("syntax error scanning boolean"); + init(); + /* */ } return; } }; $init_fmt.$blocking = true; return $init_fmt; + }; + return $pkg; +})(); +$packages["main"] = (function() { + var $pkg = {}, fmt, sliceType, sliceType$1, board, center, moves, init, move, unmove, solve, main; + fmt = $packages["fmt"]; + sliceType = $sliceType($Int32); + sliceType$1 = $sliceType($emptyInterface); + init = function() { + var _i, _ref, field, n, pos; + n = 0; + _ref = board; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + pos = _i; + field = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (field === 9675) { + center = pos; + n = n + (1) >> 0; + } + _i++; + } + if (!((n === 1))) { + center = -1; + } + }; + move = function(pos, dir) { + var dir, pos, x, x$1, x$2, x$3; + moves = moves + (1) >> 0; + if ((((pos < 0 || pos >= board.$length) ? $throwRuntimeError("index out of range") : board.$array[board.$offset + pos]) === 9679) && ((x = pos + dir >> 0, ((x < 0 || x >= board.$length) ? $throwRuntimeError("index out of range") : board.$array[board.$offset + x])) === 9679) && ((x$1 = pos + (2 * dir >> 0) >> 0, ((x$1 < 0 || x$1 >= board.$length) ? $throwRuntimeError("index out of range") : board.$array[board.$offset + x$1])) === 9675)) { + (pos < 0 || pos >= board.$length) ? $throwRuntimeError("index out of range") : board.$array[board.$offset + pos] = 9675; + (x$2 = pos + dir >> 0, (x$2 < 0 || x$2 >= board.$length) ? $throwRuntimeError("index out of range") : board.$array[board.$offset + x$2] = 9675); + (x$3 = pos + (2 * dir >> 0) >> 0, (x$3 < 0 || x$3 >= board.$length) ? $throwRuntimeError("index out of range") : board.$array[board.$offset + x$3] = 9679); + return true; + } + return false; + }; + unmove = function(pos, dir) { + var dir, pos, x, x$1; + (pos < 0 || pos >= board.$length) ? $throwRuntimeError("index out of range") : board.$array[board.$offset + pos] = 9679; + (x = pos + dir >> 0, (x < 0 || x >= board.$length) ? $throwRuntimeError("index out of range") : board.$array[board.$offset + x] = 9679); + (x$1 = pos + (2 * dir >> 0) >> 0, (x$1 < 0 || x$1 >= board.$length) ? $throwRuntimeError("index out of range") : board.$array[board.$offset + x$1] = 9675); + }; + solve = function() { + var _i, _i$1, _ref, _ref$1, _tmp, _tmp$1, dir, field, last, n, pos; + _tmp = 0; _tmp$1 = 0; last = _tmp; n = _tmp$1; + _ref = board; + _i = 0; + while (true) { + if (!(_i < _ref.$length)) { break; } + pos = _i; + field = ((_i < 0 || _i >= _ref.$length) ? $throwRuntimeError("index out of range") : _ref.$array[_ref.$offset + _i]); + if (field === 9679) { + _ref$1 = $toNativeArray($kindInt, [-1, -12, 1, 12]); + _i$1 = 0; + while (true) { + if (!(_i$1 < 4)) { break; } + dir = ((_i$1 < 0 || _i$1 >= _ref$1.length) ? $throwRuntimeError("index out of range") : _ref$1[_i$1]); + if (move(pos, dir)) { + if (solve()) { + unmove(pos, dir); + fmt.Println(new sliceType$1([new $String($runesToString(board))])); + return true; + } + unmove(pos, dir); + } + _i$1++; + } + last = pos; + n = n + (1) >> 0; + } + _i++; + } + if ((n === 1) && (center < 0 || (last === center))) { + fmt.Println(new sliceType$1([new $String($runesToString(board))])); + return true; + } + return false; + }; + main = function() { + if (!solve()) { + fmt.Println(new sliceType$1([new $String("no solution found")])); + } + fmt.Println(new sliceType$1([new $Int(moves), new $String("moves tried")])); + }; + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_main = function() { while (true) { switch ($s) { case 0: + $r = fmt.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + center = 0; + moves = 0; + board = new sliceType($stringToRunes("...........\n...........\n....\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F....\n....\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F....\n..\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F..\n..\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8B\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F..\n..\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F..\n....\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F....\n....\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F....\n...........\n...........\n")); + init(); + main(); + /* */ } return; } }; $init_main.$blocking = true; return $init_main; + }; + return $pkg; +})(); +$synthesizeMethods(); +$packages["runtime"].$init()(); +$go($packages["main"].$init, [], true); +$flushConsole(); + +}).call(this); +//# sourceMappingURL=peg_solitaire_solver.js.map diff --git a/104/build/peg_solitaire_solver.js.gz b/104/build/peg_solitaire_solver.js.gz new file mode 100644 index 0000000..25ccc4e Binary files /dev/null and b/104/build/peg_solitaire_solver.js.gz differ diff --git a/104/build/peg_solitaire_solver_min.js b/104/build/peg_solitaire_solver_min.js new file mode 100644 index 0000000..24f33f8 --- /dev/null +++ b/104/build/peg_solitaire_solver_min.js @@ -0,0 +1,30 @@ +"use strict"; +(function() { + +Error.stackTraceLimit=Infinity;var $global,$module;if(typeof window!=="undefined"){$global=window;}else if(typeof self!=="undefined"){$global=self;}else if(typeof global!=="undefined"){$global=global;$global.require=require;}else{$global=this;}if($global===undefined||$global.Array===undefined){throw new Error("no global object found");}if(typeof module!=="undefined"){$module=module;}var $packages={},$idCounter=0;var $keys=function(m){return m?Object.keys(m):[];};var $min=Math.min;var $mod=function(x,y){return x%y;};var $parseInt=parseInt;var $parseFloat=function(f){if(f!==undefined&&f!==null&&f.constructor===Number){return f;}return parseFloat(f);};var $flushConsole=function(){};var $throwRuntimeError;var $throwNilPointerError=function(){$throwRuntimeError("invalid memory address or nil pointer dereference");};var $mapArray=function(array,f){var newArray=new array.constructor(array.length);for(var i=0;islice.$capacity||max>slice.$capacity){$throwRuntimeError("slice bounds out of range");}var s=new slice.constructor(slice.$array);s.$offset=slice.$offset+low;s.$length=slice.$length-low;s.$capacity=slice.$capacity-low;if(high!==undefined){s.$length=high-low;}if(max!==undefined){s.$capacity=max-low;}return s;};var $sliceToArray=function(slice){if(slice.$length===0){return[];}if(slice.$array.constructor!==Array){return slice.$array.subarray(slice.$offset,slice.$offset+slice.$length);}return slice.$array.slice(slice.$offset,slice.$offset+slice.$length);};var $decodeRune=function(str,pos){var c0=str.charCodeAt(pos);if(c0<0x80){return[c0,1];}if(c0!==c0||c0<0xC0){return[0xFFFD,1];}var c1=str.charCodeAt(pos+1);if(c1!==c1||c1<0x80||0xC0<=c1){return[0xFFFD,1];}if(c0<0xE0){var r=(c0&0x1F)<<6|(c1&0x3F);if(r<=0x7F){return[0xFFFD,1];}return[r,2];}var c2=str.charCodeAt(pos+2);if(c2!==c2||c2<0x80||0xC0<=c2){return[0xFFFD,1];}if(c0<0xF0){var r=(c0&0x0F)<<12|(c1&0x3F)<<6|(c2&0x3F);if(r<=0x7FF){return[0xFFFD,1];}if(0xD800<=r&&r<=0xDFFF){return[0xFFFD,1];}return[r,3];}var c3=str.charCodeAt(pos+3);if(c3!==c3||c3<0x80||0xC0<=c3){return[0xFFFD,1];}if(c0<0xF8){var r=(c0&0x07)<<18|(c1&0x3F)<<12|(c2&0x3F)<<6|(c3&0x3F);if(r<=0xFFFF||0x10FFFF0x10FFFF||(0xD800<=r&&r<=0xDFFF)){r=0xFFFD;}if(r<=0x7F){return String.fromCharCode(r);}if(r<=0x7FF){return String.fromCharCode(0xC0|r>>6,0x80|(r&0x3F));}if(r<=0xFFFF){return String.fromCharCode(0xE0|r>>12,0x80|(r>>6&0x3F),0x80|(r&0x3F));}return String.fromCharCode(0xF0|r>>18,0x80|(r>>12&0x3F),0x80|(r>>6&0x3F),0x80|(r&0x3F));};var $stringToBytes=function(str){var array=new Uint8Array(str.length);for(var i=0;isrcOffset){for(var i=n-1;i>=0;i--){$copy(dst[dstOffset+i],src[srcOffset+i],elem);}return;}for(var i=0;isrcOffset){for(var i=n-1;i>=0;i--){dst[dstOffset+i]=src[srcOffset+i];}return;}for(var i=0;inewCapacity){newOffset=0;newCapacity=Math.max(newLength,slice.$capacity<1024?slice.$capacity*2:Math.floor(slice.$capacity*5/4));if(slice.$array.constructor===Array){newArray=slice.$array.slice(slice.$offset,slice.$offset+slice.$length);newArray.length=newCapacity;var zero=slice.constructor.elem.zero;for(var i=slice.$length;i>0;this.$low=low>>>0;this.$val=this;};typ.prototype.$key=function(){return string+"$"+this.$high+"$"+this.$low;};break;case $kindUint64:typ=function(high,low){this.$high=(high+Math.floor(Math.ceil(low)/4294967296))>>>0;this.$low=low>>>0;this.$val=this;};typ.prototype.$key=function(){return string+"$"+this.$high+"$"+this.$low;};break;case $kindComplex64:case $kindComplex128:typ=function(real,imag){this.$real=real;this.$imag=imag;this.$val=this;};typ.prototype.$key=function(){return string+"$"+this.$real+"$"+this.$imag;};break;case $kindArray:typ=function(v){this.$val=v;};typ.ptr=$newType(4,$kindPtr,"*"+string,"","",function(array){this.$get=function(){return array;};this.$set=function(v){$copy(this,v,typ);};this.$val=array;});typ.init=function(elem,len){typ.elem=elem;typ.len=len;typ.comparable=elem.comparable;typ.prototype.$key=function(){return string+"$"+Array.prototype.join.call($mapArray(this.$val,function(e){var key=e.$key?e.$key():String(e);return key.replace(/\\/g,"\\\\").replace(/\$/g,"\\$");}),"$");};typ.ptr.init(typ);Object.defineProperty(typ.ptr.nil,"nilCheck",{get:$throwNilPointerError});};break;case $kindChan:typ=function(capacity){this.$val=this;this.$capacity=capacity;this.$buffer=[];this.$sendQueue=[];this.$recvQueue=[];this.$closed=false;};typ.prototype.$key=function(){if(this.$id===undefined){$idCounter++;this.$id=$idCounter;}return String(this.$id);};typ.init=function(elem,sendOnly,recvOnly){typ.elem=elem;typ.sendOnly=sendOnly;typ.recvOnly=recvOnly;typ.nil=new typ(0);typ.nil.$sendQueue=typ.nil.$recvQueue={length:0,push:function(){},shift:function(){return undefined;},indexOf:function(){return-1;}};};break;case $kindFunc:typ=function(v){this.$val=v;};typ.init=function(params,results,variadic){typ.params=params;typ.results=results;typ.variadic=variadic;typ.comparable=false;};break;case $kindInterface:typ={implementedBy:{},missingMethodFor:{}};typ.init=function(methods){typ.methods=methods;methods.forEach(function(m){$ifaceNil[m.prop]=$throwNilPointerError;});};break;case $kindMap:typ=function(v){this.$val=v;};typ.init=function(key,elem){typ.key=key;typ.elem=elem;typ.comparable=false;};break;case $kindPtr:typ=constructor||function(getter,setter,target){this.$get=getter;this.$set=setter;this.$target=target;this.$val=this;};typ.prototype.$key=function(){if(this.$id===undefined){$idCounter++;this.$id=$idCounter;}return String(this.$id);};typ.init=function(elem){typ.elem=elem;typ.nil=new typ($throwNilPointerError,$throwNilPointerError);};break;case $kindSlice:typ=function(array){if(array.constructor!==typ.nativeArray){array=new typ.nativeArray(array);}this.$array=array;this.$offset=0;this.$length=array.length;this.$capacity=array.length;this.$val=this;};typ.init=function(elem){typ.elem=elem;typ.comparable=false;typ.nativeArray=$nativeArray(elem.kind);typ.nil=new typ([]);};break;case $kindStruct:typ=function(v){this.$val=v;};typ.ptr=$newType(4,$kindPtr,"*"+string,"","",constructor);typ.ptr.elem=typ;typ.ptr.prototype.$get=function(){return this;};typ.ptr.prototype.$set=function(v){$copy(this,v,typ);};typ.init=function(fields){typ.fields=fields;fields.forEach(function(f){if(!f.typ.comparable){typ.comparable=false;}});typ.prototype.$key=function(){var val=this.$val;return string+"$"+$mapArray(fields,function(f){var e=val[f.prop];var key=e.$key?e.$key():String(e);return key.replace(/\\/g,"\\\\").replace(/\$/g,"\\$");}).join("$");};var properties={};fields.forEach(function(f){properties[f.prop]={get:$throwNilPointerError,set:$throwNilPointerError};});typ.ptr.nil=Object.create(constructor.prototype,properties);typ.ptr.nil.$val=typ.ptr.nil;$addMethodSynthesizer(function(){var synthesizeMethod=function(target,m,f){if(target.prototype[m.prop]!==undefined){return;}target.prototype[m.prop]=function(){var v=this.$val[f.prop];if(f.typ===$js.Object){v=new $js.container.ptr(v);}if(v.$val===undefined){v=new f.typ(v);}return v[m.prop].apply(v,arguments);};};fields.forEach(function(f){if(f.name===""){$methodSet(f.typ).forEach(function(m){synthesizeMethod(typ,m,f);synthesizeMethod(typ.ptr,m,f);});$methodSet($ptrType(f.typ)).forEach(function(m){synthesizeMethod(typ.ptr,m,f);});}});});};break;default:$panic(new $String("invalid kind: "+kind));}switch(kind){case $kindBool:case $kindMap:typ.zero=function(){return false;};break;case $kindInt:case $kindInt8:case $kindInt16:case $kindInt32:case $kindUint:case $kindUint8:case $kindUint16:case $kindUint32:case $kindUintptr:case $kindUnsafePointer:case $kindFloat32:case $kindFloat64:typ.zero=function(){return 0;};break;case $kindString:typ.zero=function(){return"";};break;case $kindInt64:case $kindUint64:case $kindComplex64:case $kindComplex128:var zero=new typ(0,0);typ.zero=function(){return zero;};break;case $kindChan:case $kindPtr:case $kindSlice:typ.zero=function(){return typ.nil;};break;case $kindFunc:typ.zero=function(){return $throwNilPointerError;};break;case $kindInterface:typ.zero=function(){return $ifaceNil;};break;case $kindArray:typ.zero=function(){var arrayClass=$nativeArray(typ.elem.kind);if(arrayClass!==Array){return new arrayClass(typ.len);}var array=new Array(typ.len);for(var i=0;i0){var next=[];var mset=[];current.forEach(function(e){if(seen[e.typ.string]){return;}seen[e.typ.string]=true;if(e.typ.typeName!==""){mset=mset.concat(e.typ.methods);if(e.indirect){mset=mset.concat($ptrType(e.typ).methods);}}switch(e.typ.kind){case $kindStruct:e.typ.fields.forEach(function(f){if(f.name===""){var fTyp=f.typ;var fIsPtr=(fTyp.kind===$kindPtr);next.push({typ:fIsPtr?fTyp.elem:fTyp,indirect:e.indirect||fIsPtr});}});break;case $kindInterface:mset=mset.concat(e.typ.methods);break;}});mset.forEach(function(m){if(base[m.name]===undefined){base[m.name]=m;}});current=next;}typ.methodSetCache=[];Object.keys(base).sort().forEach(function(name){typ.methodSetCache.push(base[name]);});return typ.methodSetCache;};var $Bool=$newType(1,$kindBool,"bool","bool","",null);var $Int=$newType(4,$kindInt,"int","int","",null);var $Int8=$newType(1,$kindInt8,"int8","int8","",null);var $Int16=$newType(2,$kindInt16,"int16","int16","",null);var $Int32=$newType(4,$kindInt32,"int32","int32","",null);var $Int64=$newType(8,$kindInt64,"int64","int64","",null);var $Uint=$newType(4,$kindUint,"uint","uint","",null);var $Uint8=$newType(1,$kindUint8,"uint8","uint8","",null);var $Uint16=$newType(2,$kindUint16,"uint16","uint16","",null);var $Uint32=$newType(4,$kindUint32,"uint32","uint32","",null);var $Uint64=$newType(8,$kindUint64,"uint64","uint64","",null);var $Uintptr=$newType(4,$kindUintptr,"uintptr","uintptr","",null);var $Float32=$newType(4,$kindFloat32,"float32","float32","",null);var $Float64=$newType(8,$kindFloat64,"float64","float64","",null);var $Complex64=$newType(8,$kindComplex64,"complex64","complex64","",null);var $Complex128=$newType(16,$kindComplex128,"complex128","complex128","",null);var $String=$newType(8,$kindString,"string","string","",null);var $UnsafePointer=$newType(4,$kindUnsafePointer,"unsafe.Pointer","Pointer","",null);var $nativeArray=function(elemKind){switch(elemKind){case $kindInt:return Int32Array;case $kindInt8:return Int8Array;case $kindInt16:return Int16Array;case $kindInt32:return Int32Array;case $kindUint:return Uint32Array;case $kindUint8:return Uint8Array;case $kindUint16:return Uint16Array;case $kindUint32:return Uint32Array;case $kindUintptr:return Uint32Array;case $kindFloat32:return Float32Array;case $kindFloat64:return Float64Array;default:return Array;}};var $toNativeArray=function(elemKind,array){var nativeArray=$nativeArray(elemKind);if(nativeArray===Array){return array;}return new nativeArray(array);};var $arrayTypes={};var $arrayType=function(elem,len){var string="["+len+"]"+elem.string;var typ=$arrayTypes[string];if(typ===undefined){typ=$newType(12,$kindArray,string,"","",null);$arrayTypes[string]=typ;typ.init(elem,len);}return typ;};var $chanType=function(elem,sendOnly,recvOnly){var string=(recvOnly?"<-":"")+"chan"+(sendOnly?"<- ":" ")+elem.string;var field=sendOnly?"SendChan":(recvOnly?"RecvChan":"Chan");var typ=elem[field];if(typ===undefined){typ=$newType(4,$kindChan,string,"","",null);elem[field]=typ;typ.init(elem,sendOnly,recvOnly);}return typ;};var $funcTypes={};var $funcType=function(params,results,variadic){var paramTypes=$mapArray(params,function(p){return p.string;});if(variadic){paramTypes[paramTypes.length-1]="..."+paramTypes[paramTypes.length-1].substr(2);}var string="func("+paramTypes.join(", ")+")";if(results.length===1){string+=" "+results[0].string;}else if(results.length>1){string+=" ("+$mapArray(results,function(r){return r.string;}).join(", ")+")";}var typ=$funcTypes[string];if(typ===undefined){typ=$newType(4,$kindFunc,string,"","",null);$funcTypes[string]=typ;typ.init(params,results,variadic);}return typ;};var $interfaceTypes={};var $interfaceType=function(methods){var string="interface {}";if(methods.length!==0){string="interface { "+$mapArray(methods,function(m){return(m.pkg!==""?m.pkg+".":"")+m.name+m.typ.string.substr(4);}).join("; ")+" }";}var typ=$interfaceTypes[string];if(typ===undefined){typ=$newType(8,$kindInterface,string,"","",null);$interfaceTypes[string]=typ;typ.init(methods);}return typ;};var $emptyInterface=$interfaceType([]);var $ifaceNil={$key:function(){return"nil";}};var $error=$newType(8,$kindInterface,"error","error","",null);$error.init([{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}]);var $Map=function(){};(function(){var names=Object.getOwnPropertyNames(Object.prototype);for(var i=0;i>>(32-y),(x.$low<>>0);}if(y<64){return new x.constructor(x.$low<<(y-32),0);}return new x.constructor(0,0);};var $shiftRightInt64=function(x,y){if(y===0){return x;}if(y<32){return new x.constructor(x.$high>>y,(x.$low>>>y|x.$high<<(32-y))>>>0);}if(y<64){return new x.constructor(x.$high>>31,(x.$high>>(y-32))>>>0);}if(x.$high<0){return new x.constructor(-1,4294967295);}return new x.constructor(0,0);};var $shiftRightUint64=function(x,y){if(y===0){return x;}if(y<32){return new x.constructor(x.$high>>>y,(x.$low>>>y|x.$high<<(32-y))>>>0);}if(y<64){return new x.constructor(0,x.$high>>>(y-32));}return new x.constructor(0,0);};var $mul64=function(x,y){var high=0,low=0;if((y.$low&1)!==0){high=x.$high;low=x.$low;}for(var i=1;i<32;i++){if((y.$low&1<>>(32-i);low+=(x.$low<>>0;}}for(var i=0;i<32;i++){if((y.$high&1<yHigh)||(xHigh===yHigh&&xLow>yLow))){yHigh=(yHigh<<1|yLow>>>31)>>>0;yLow=(yLow<<1)>>>0;n++;}for(var i=0;i<=n;i++){high=high<<1|low>>>31;low=(low<<1)>>>0;if((xHigh>yHigh)||(xHigh===yHigh&&xLow>=yLow)){xHigh=xHigh-yHigh;xLow=xLow-yLow;if(xLow<0){xHigh--;xLow+=4294967296;}low++;if(low===4294967296){high++;low=0;}}yLow=(yLow>>>1|yHigh<<(32-1))>>>0;yHigh=yHigh>>>1;}if(returnRemainder){return new x.constructor(xHigh*rs,xLow*rs);}return new x.constructor(high*s,low*s);};var $divComplex=function(n,d){var ninf=n.$real===1/0||n.$real===-1/0||n.$imag===1/0||n.$imag===-1/0;var dinf=d.$real===1/0||d.$real===-1/0||d.$imag===1/0||d.$imag===-1/0;var nnan=!ninf&&(n.$real!==n.$real||n.$imag!==n.$imag);var dnan=!dinf&&(d.$real!==d.$real||d.$imag!==d.$imag);if(nnan||dnan){return new n.constructor(0/0,0/0);}if(ninf&&!dinf){return new n.constructor(1/0,1/0);}if(!ninf&&dinf){return new n.constructor(0,0);}if(d.$real===0&&d.$imag===0){if(n.$real===0&&n.$imag===0){return new n.constructor(0/0,0/0);}return new n.constructor(1/0,1/0);}var a=Math.abs(d.$real);var b=Math.abs(d.$imag);if(a<=b){var ratio=d.$real/d.$imag;var denom=d.$real*ratio+d.$imag;return new n.constructor((n.$real*ratio+n.$imag)/denom,(n.$imag*ratio-n.$real)/denom);}var ratio=d.$imag/d.$real;var denom=d.$imag*ratio+d.$real;return new n.constructor((n.$imag*ratio+n.$real)/denom,(n.$imag-n.$real*ratio)/denom);};var $stackDepthOffset=0;var $getStackDepth=function(){var err=new Error();if(err.stack===undefined){return undefined;}return $stackDepthOffset+err.stack.split("\n").length;};var $deferFrames=[],$skippedDeferFrames=0,$jumpToDefer=false,$panicStackDepth=null,$panicValue;var $callDeferred=function(deferred,jsErr){if($skippedDeferFrames!==0){$skippedDeferFrames--;throw jsErr;}if($jumpToDefer){$jumpToDefer=false;throw jsErr;}if(jsErr){var newErr=null;try{$deferFrames.push(deferred);$panic(new $js.Error.ptr(jsErr));}catch(err){newErr=err;}$deferFrames.pop();$callDeferred(deferred,newErr);return;}$stackDepthOffset--;var outerPanicStackDepth=$panicStackDepth;var outerPanicValue=$panicValue;var localPanicValue=$curGoroutine.panicStack.pop();if(localPanicValue!==undefined){$panicStackDepth=$getStackDepth();$panicValue=localPanicValue;}var call,localSkippedDeferFrames=0;try{while(true){if(deferred===null){deferred=$deferFrames[$deferFrames.length-1-localSkippedDeferFrames];if(deferred===undefined){if(localPanicValue.Object instanceof Error){throw localPanicValue.Object;}var msg;if(localPanicValue.constructor===$String){msg=localPanicValue.$val;}else if(localPanicValue.Error!==undefined){msg=localPanicValue.Error();}else if(localPanicValue.String!==undefined){msg=localPanicValue.String();}else{msg=localPanicValue;}throw new Error(msg);}}var call=deferred.pop();if(call===undefined){if(localPanicValue!==undefined){localSkippedDeferFrames++;deferred=null;continue;}return;}var r=call[0].apply(undefined,call[1]);if(r&&r.$blocking){deferred.push([r,[]]);}if(localPanicValue!==undefined&&$panicStackDepth===null){throw null;}}}finally{$skippedDeferFrames+=localSkippedDeferFrames;if($curGoroutine.asleep){deferred.push(call);$jumpToDefer=true;}if(localPanicValue!==undefined){if($panicStackDepth!==null){$curGoroutine.panicStack.push(localPanicValue);}$panicStackDepth=outerPanicStackDepth;$panicValue=outerPanicValue;}$stackDepthOffset++;}};var $panic=function(value){$curGoroutine.panicStack.push(value);$callDeferred(null,null);};var $recover=function(){if($panicStackDepth===null||($panicStackDepth!==undefined&&$panicStackDepth!==$getStackDepth()-2)){return $ifaceNil;}$panicStackDepth=null;return $panicValue;};var $throw=function(err){throw err;};var $BLOCKING=new Object();var $nonblockingCall=function(){$panic(new $packages["runtime"].NotSupportedError.ptr("non-blocking call to blocking function, see https://github.com/gopherjs/gopherjs#goroutines"));};var $dummyGoroutine={asleep:false,exit:false,panicStack:[]};var $curGoroutine=$dummyGoroutine,$totalGoroutines=0,$awakeGoroutines=0,$checkForDeadlock=true;var $go=function(fun,args,direct){$totalGoroutines++;$awakeGoroutines++;args.push($BLOCKING);var goroutine=function(){var rescheduled=false;try{$curGoroutine=goroutine;$skippedDeferFrames=0;$jumpToDefer=false;var r=fun.apply(undefined,args);if(r&&r.$blocking){fun=r;args=[];$schedule(goroutine,direct);rescheduled=true;return;}goroutine.exit=true;}catch(err){if(!$curGoroutine.asleep){goroutine.exit=true;throw err;}}finally{$curGoroutine=$dummyGoroutine;if(goroutine.exit&&!rescheduled){$totalGoroutines--;goroutine.asleep=true;}if(goroutine.asleep&&!rescheduled){$awakeGoroutines--;if($awakeGoroutines===0&&$totalGoroutines!==0&&$checkForDeadlock){console.error("fatal error: all goroutines are asleep - deadlock!");}}}};goroutine.asleep=false;goroutine.exit=false;goroutine.panicStack=[];$schedule(goroutine,direct);};var $scheduled=[],$schedulerLoopActive=false;var $schedule=function(goroutine,direct){if(goroutine.asleep){goroutine.asleep=false;$awakeGoroutines++;}if(direct){goroutine();return;}$scheduled.push(goroutine);if(!$schedulerLoopActive){$schedulerLoopActive=true;setTimeout(function(){while(true){var r=$scheduled.shift();if(r===undefined){$schedulerLoopActive=false;break;}r();};},0);}};var $send=function(chan,value){if(chan.$closed){$throwRuntimeError("send on closed channel");}var queuedRecv=chan.$recvQueue.shift();if(queuedRecv!==undefined){queuedRecv([value,true]);return;}if(chan.$buffer.length>24;case $kindInt16:return parseInt(v)<<16>>16;case $kindInt32:return parseInt(v)>>0;case $kindUint:return parseInt(v);case $kindUint8:return parseInt(v)<<24>>>24;case $kindUint16:return parseInt(v)<<16>>>16;case $kindUint32:case $kindUintptr:return parseInt(v)>>>0;case $kindInt64:case $kindUint64:return new t(0,v);case $kindFloat32:case $kindFloat64:return parseFloat(v);case $kindArray:if(v.length!==t.len){$throwRuntimeError("got array with wrong size from JavaScript native");}return $mapArray(v,function(e){return $internalize(e,t.elem);});case $kindFunc:return function(){var args=[];for(var i=0;i>0;};B.prototype.Int=function(){return this.$val.Int();};B.ptr.prototype.Int64=function(){var a;a=this;return $internalize(a.Object,$Int64);};B.prototype.Int64=function(){return this.$val.Int64();};B.ptr.prototype.Uint64=function(){var a;a=this;return $internalize(a.Object,$Uint64);};B.prototype.Uint64=function(){return this.$val.Uint64();};B.ptr.prototype.Float=function(){var a;a=this;return $parseFloat(a.Object);};B.prototype.Float=function(){return this.$val.Float();};B.ptr.prototype.Interface=function(){var a;a=this;return $internalize(a.Object,$emptyInterface);};B.prototype.Interface=function(){return this.$val.Interface();};B.ptr.prototype.Unsafe=function(){var a;a=this;return a.Object;};B.prototype.Unsafe=function(){return this.$val.Unsafe();};C.ptr.prototype.Error=function(){var a;a=this;return"JavaScript error: "+$internalize(a.Object.message,$String);};C.prototype.Error=function(){return this.$val.Error();};C.ptr.prototype.Stack=function(){var a;a=this;return $internalize(a.Object.stack,$String);};C.prototype.Stack=function(){return this.$val.Stack();};K=function(){var a,b,c,d;a=new B.ptr(null);b=new C.ptr(null);};P.methods=[{prop:"Get",name:"Get",pkg:"",typ:$funcType([$String],[A],false)},{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String,$emptyInterface],[],false)},{prop:"Delete",name:"Delete",pkg:"",typ:$funcType([$String],[],false)},{prop:"Length",name:"Length",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Index",name:"Index",pkg:"",typ:$funcType([$Int],[A],false)},{prop:"SetIndex",name:"SetIndex",pkg:"",typ:$funcType([$Int,$emptyInterface],[],false)},{prop:"Call",name:"Call",pkg:"",typ:$funcType([$String,M],[A],true)},{prop:"Invoke",name:"Invoke",pkg:"",typ:$funcType([M],[A],true)},{prop:"New",name:"New",pkg:"",typ:$funcType([M],[A],true)},{prop:"Bool",name:"Bool",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Int",name:"Int",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Int64",name:"Int64",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Uint64",name:"Uint64",pkg:"",typ:$funcType([],[$Uint64],false)},{prop:"Float",name:"Float",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Interface",name:"Interface",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"Unsafe",name:"Unsafe",pkg:"",typ:$funcType([],[$Uintptr],false)}];Q.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)},{prop:"Stack",name:"Stack",pkg:"",typ:$funcType([],[$String],false)}];A.init([{prop:"Bool",name:"Bool",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Call",name:"Call",pkg:"",typ:$funcType([$String,M],[A],true)},{prop:"Delete",name:"Delete",pkg:"",typ:$funcType([$String],[],false)},{prop:"Float",name:"Float",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Get",name:"Get",pkg:"",typ:$funcType([$String],[A],false)},{prop:"Index",name:"Index",pkg:"",typ:$funcType([$Int],[A],false)},{prop:"Int",name:"Int",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Int64",name:"Int64",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Interface",name:"Interface",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"Invoke",name:"Invoke",pkg:"",typ:$funcType([M],[A],true)},{prop:"Length",name:"Length",pkg:"",typ:$funcType([],[$Int],false)},{prop:"New",name:"New",pkg:"",typ:$funcType([M],[A],true)},{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String,$emptyInterface],[],false)},{prop:"SetIndex",name:"SetIndex",pkg:"",typ:$funcType([$Int,$emptyInterface],[],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Uint64",name:"Uint64",pkg:"",typ:$funcType([],[$Uint64],false)},{prop:"Unsafe",name:"Unsafe",pkg:"",typ:$funcType([],[$Uintptr],false)}]);B.init([{prop:"Object",name:"",pkg:"",typ:A,tag:""}]);C.init([{prop:"Object",name:"",pkg:"",typ:A,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_js=function(){while(true){switch($s){case 0:K();}return;}};$init_js.$blocking=true;return $init_js;};return $pkg;})(); +$packages["runtime"]=(function(){var $pkg={},A,C,X,Z,AO,AS,D,E,P;A=$packages["github.com/gopherjs/gopherjs/js"];C=$pkg.NotSupportedError=$newType(0,$kindStruct,"runtime.NotSupportedError","NotSupportedError","runtime",function(Feature_){this.$val=this;this.Feature=Feature_!==undefined?Feature_:"";});X=$pkg.TypeAssertionError=$newType(0,$kindStruct,"runtime.TypeAssertionError","TypeAssertionError","runtime",function(interfaceString_,concreteString_,assertedString_,missingMethod_){this.$val=this;this.interfaceString=interfaceString_!==undefined?interfaceString_:"";this.concreteString=concreteString_!==undefined?concreteString_:"";this.assertedString=assertedString_!==undefined?assertedString_:"";this.missingMethod=missingMethod_!==undefined?missingMethod_:"";});Z=$pkg.errorString=$newType(8,$kindString,"runtime.errorString","errorString","runtime",null);AO=$ptrType(C);AS=$ptrType(X);C.ptr.prototype.Error=function(){var a;a=this;return"not supported by GopherJS: "+a.Feature;};C.prototype.Error=function(){return this.$val.Error();};D=function(){var a;$js=$packages[$externalize("github.com/gopherjs/gopherjs/js",$String)];$throwRuntimeError=(function(a){var a;$panic(new Z(a));});a=$ifaceNil;a=new X.ptr("","","","");a=new C.ptr("");};E=$pkg.GOROOT=function(){var a,b;a=$global.process;if(a===undefined){return"/";}b=a.env.GOROOT;if(!(b===undefined)){return $internalize(b,$String);}return"/usr/local/go";};P=$pkg.SetFinalizer=function(a,b){var a,b;};X.ptr.prototype.RuntimeError=function(){};X.prototype.RuntimeError=function(){return this.$val.RuntimeError();};X.ptr.prototype.Error=function(){var a,b;a=this;b=a.interfaceString;if(b===""){b="interface";}if(a.concreteString===""){return"interface conversion: "+b+" is nil, not "+a.assertedString;}if(a.missingMethod===""){return"interface conversion: "+b+" is "+a.concreteString+", not "+a.assertedString;}return"interface conversion: "+a.concreteString+" is not "+a.assertedString+": missing method "+a.missingMethod;};X.prototype.Error=function(){return this.$val.Error();};Z.prototype.RuntimeError=function(){var a;a=this.$val;};$ptrType(Z).prototype.RuntimeError=function(){return new Z(this.$get()).RuntimeError();};Z.prototype.Error=function(){var a;a=this.$val;return"runtime error: "+a;};$ptrType(Z).prototype.Error=function(){return new Z(this.$get()).Error();};AO.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];AS.methods=[{prop:"RuntimeError",name:"RuntimeError",pkg:"",typ:$funcType([],[],false)},{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];Z.methods=[{prop:"RuntimeError",name:"RuntimeError",pkg:"",typ:$funcType([],[],false)},{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];C.init([{prop:"Feature",name:"Feature",pkg:"",typ:$String,tag:""}]);X.init([{prop:"interfaceString",name:"interfaceString",pkg:"runtime",typ:$String,tag:""},{prop:"concreteString",name:"concreteString",pkg:"runtime",typ:$String,tag:""},{prop:"assertedString",name:"assertedString",pkg:"runtime",typ:$String,tag:""},{prop:"missingMethod",name:"missingMethod",pkg:"runtime",typ:$String,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_runtime=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}D();}return;}};$init_runtime.$blocking=true;return $init_runtime;};return $pkg;})(); +$packages["errors"]=(function(){var $pkg={},B,C,A;B=$pkg.errorString=$newType(0,$kindStruct,"errors.errorString","errorString","errors",function(s_){this.$val=this;this.s=s_!==undefined?s_:"";});C=$ptrType(B);A=$pkg.New=function(a){var a;return new B.ptr(a);};B.ptr.prototype.Error=function(){var a;a=this;return a.s;};B.prototype.Error=function(){return this.$val.Error();};C.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];B.init([{prop:"s",name:"s",pkg:"errors",typ:$String,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_errors=function(){while(true){switch($s){case 0:}return;}};$init_errors.$blocking=true;return $init_errors;};return $pkg;})(); +$packages["sync/atomic"]=(function(){var $pkg={},A,H,N,U,Y,AA;A=$packages["github.com/gopherjs/gopherjs/js"];H=$pkg.CompareAndSwapInt32=function(ad,ae,af){var ad,ae,af;if(ad.$get()===ae){ad.$set(af);return true;}return false;};N=$pkg.AddInt32=function(ad,ae){var ad,ae,af;af=ad.$get()+ae>>0;ad.$set(af);return af;};U=$pkg.LoadUint32=function(ad){var ad;return ad.$get();};Y=$pkg.StoreInt32=function(ad,ae){var ad,ae;ad.$set(ae);};AA=$pkg.StoreUint32=function(ad,ae){var ad,ae;ad.$set(ae);};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_atomic=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}}return;}};$init_atomic.$blocking=true;return $init_atomic;};return $pkg;})(); +$packages["sync"]=(function(){var $pkg={},B,A,C,L,M,N,O,AD,AH,AI,AK,AL,AM,AN,AO,AQ,AR,AT,AW,AX,AY,AZ,BB,BC,BD,BE,E,R,D,F,G,H,P,S,T,AA,AG;B=$packages["runtime"];A=$packages["sync/atomic"];C=$pkg.Pool=$newType(0,$kindStruct,"sync.Pool","Pool","sync",function(local_,localSize_,store_,New_){this.$val=this;this.local=local_!==undefined?local_:0;this.localSize=localSize_!==undefined?localSize_:0;this.store=store_!==undefined?store_:AW.nil;this.New=New_!==undefined?New_:$throwNilPointerError;});L=$pkg.Mutex=$newType(0,$kindStruct,"sync.Mutex","Mutex","sync",function(state_,sema_){this.$val=this;this.state=state_!==undefined?state_:0;this.sema=sema_!==undefined?sema_:0;});M=$pkg.Locker=$newType(8,$kindInterface,"sync.Locker","Locker","sync",null);N=$pkg.Once=$newType(0,$kindStruct,"sync.Once","Once","sync",function(m_,done_){this.$val=this;this.m=m_!==undefined?m_:new L.ptr();this.done=done_!==undefined?done_:0;});O=$pkg.poolLocal=$newType(0,$kindStruct,"sync.poolLocal","poolLocal","sync",function(private$0_,shared_,Mutex_,pad_){this.$val=this;this.private$0=private$0_!==undefined?private$0_:$ifaceNil;this.shared=shared_!==undefined?shared_:AW.nil;this.Mutex=Mutex_!==undefined?Mutex_:new L.ptr();this.pad=pad_!==undefined?pad_:BE.zero();});AD=$pkg.syncSema=$newType(0,$kindStruct,"sync.syncSema","syncSema","sync",function(lock_,head_,tail_){this.$val=this;this.lock=lock_!==undefined?lock_:0;this.head=head_!==undefined?head_:0;this.tail=tail_!==undefined?tail_:0;});AH=$pkg.RWMutex=$newType(0,$kindStruct,"sync.RWMutex","RWMutex","sync",function(w_,writerSem_,readerSem_,readerCount_,readerWait_){this.$val=this;this.w=w_!==undefined?w_:new L.ptr();this.writerSem=writerSem_!==undefined?writerSem_:0;this.readerSem=readerSem_!==undefined?readerSem_:0;this.readerCount=readerCount_!==undefined?readerCount_:0;this.readerWait=readerWait_!==undefined?readerWait_:0;});AI=$pkg.rlocker=$newType(0,$kindStruct,"sync.rlocker","rlocker","sync",function(w_,writerSem_,readerSem_,readerCount_,readerWait_){this.$val=this;this.w=w_!==undefined?w_:new L.ptr();this.writerSem=writerSem_!==undefined?writerSem_:0;this.readerSem=readerSem_!==undefined?readerSem_:0;this.readerCount=readerCount_!==undefined?readerCount_:0;this.readerWait=readerWait_!==undefined?readerWait_:0;});AK=$ptrType(C);AL=$sliceType(AK);AM=$structType([]);AN=$chanType(AM,false,false);AO=$sliceType(AN);AQ=$ptrType($Uint32);AR=$ptrType($Int32);AT=$ptrType(O);AW=$sliceType($emptyInterface);AX=$ptrType(AI);AY=$ptrType(AH);AZ=$funcType([],[$emptyInterface],false);BB=$ptrType(L);BC=$funcType([],[],false);BD=$ptrType(N);BE=$arrayType($Uint8,128);C.ptr.prototype.Get=function(){var f,g,h,i;f=this;if(f.store.$length===0){if(!(f.New===$throwNilPointerError)){return f.New();}return $ifaceNil;}i=(g=f.store,h=f.store.$length-1>>0,((h<0||h>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]));f.store=$subslice(f.store,0,(f.store.$length-1>>0));return i;};C.prototype.Get=function(){return this.$val.Get();};C.ptr.prototype.Put=function(f){var f,g;g=this;if($interfaceIsEqual(f,$ifaceNil)){return;}g.store=$append(g.store,f);};C.prototype.Put=function(f){return this.$val.Put(f);};D=function(f){var f;};F=function(f,$b){var $args=arguments,$r,$s=0,$this=this,g,h,i,j;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:if(f.$get()===0){}else{$s=1;continue;}g=new AN(0);h=f;(E||$throwRuntimeError("assignment to entry in nil map"))[h.$key()]={k:h,v:$append((i=E[f.$key()],i!==undefined?i.v:AO.nil),g)};j=$recv(g,$BLOCKING);$s=2;case 2:if(j&&j.$blocking){j=j();}j[0];case 1:f.$set(f.$get()-(1)>>>0);case-1:}return;}};$f.$blocking=true;return $f;};G=function(f,$b){var $args=arguments,$r,$s=0,$this=this,g,h,i,j;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:f.$set(f.$get()+(1)>>>0);h=(g=E[f.$key()],g!==undefined?g.v:AO.nil);if(h.$length===0){return;}i=((0<0||0>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+0]);h=$subslice(h,1);j=f;(E||$throwRuntimeError("assignment to entry in nil map"))[j.$key()]={k:j,v:h};if(h.$length===0){delete E[f.$key()];}$r=$send(i,new AM.ptr(),$BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}case-1:}return;}};$f.$blocking=true;return $f;};H=function(f){var f;};L.ptr.prototype.Lock=function($b){var $args=arguments,$r,$s=0,$this=this,f,g,h,i;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:f=$this;if(A.CompareAndSwapInt32(new AR(function(){return this.$target.state;},function($v){this.$target.state=$v;},f),0,1)){return;}g=false;case 1:if(!(true)){$s=2;continue;}h=f.state;i=h|1;if(!(((h&1)===0))){i=h+4>>0;}if(g){i=i&~(2);}if(A.CompareAndSwapInt32(new AR(function(){return this.$target.state;},function($v){this.$target.state=$v;},f),h,i)){}else{$s=3;continue;}if((h&1)===0){$s=2;continue;}$r=F(new AQ(function(){return this.$target.sema;},function($v){this.$target.sema=$v;},f),$BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}g=true;case 3:$s=1;continue;case 2:case-1:}return;}};$f.$blocking=true;return $f;};L.prototype.Lock=function($b){return this.$val.Lock($b);};L.ptr.prototype.Unlock=function($b){var $args=arguments,$r,$s=0,$this=this,f,g,h;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:f=$this;g=A.AddInt32(new AR(function(){return this.$target.state;},function($v){this.$target.state=$v;},f),-1);if((((g+1>>0))&1)===0){$panic(new $String("sync: unlock of unlocked mutex"));}h=g;case 1:if(!(true)){$s=2;continue;}if(((h>>2>>0)===0)||!(((h&3)===0))){return;}g=((h-4>>0))|2;if(A.CompareAndSwapInt32(new AR(function(){return this.$target.state;},function($v){this.$target.state=$v;},f),h,g)){}else{$s=3;continue;}$r=G(new AQ(function(){return this.$target.sema;},function($v){this.$target.sema=$v;},f),$BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}return;case 3:h=f.state;$s=1;continue;case 2:case-1:}return;}};$f.$blocking=true;return $f;};L.prototype.Unlock=function($b){return this.$val.Unlock($b);};N.ptr.prototype.Do=function(f,$b){var $args=arguments,$deferred=[],$err=null,$r,$s=0,$this=this,g;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){try{$deferFrames.push($deferred);s:while(true){switch($s){case 0:g=$this;if(A.LoadUint32(new AQ(function(){return this.$target.done;},function($v){this.$target.done=$v;},g))===1){return;}$r=g.m.Lock($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$deferred.push([$methodVal(g.m,"Unlock"),[$BLOCKING]]);if(g.done===0){$deferred.push([A.StoreUint32,[new AQ(function(){return this.$target.done;},function($v){this.$target.done=$v;},g),1,$BLOCKING]]);f();}case-1:}return;}}catch(err){$err=err;}finally{$deferFrames.pop();if($curGoroutine.asleep&&!$jumpToDefer){throw null;}$s=-1;$callDeferred($deferred,$err);}};$f.$blocking=true;return $f;};N.prototype.Do=function(f,$b){return this.$val.Do(f,$b);};P=function(){var f,g,h,i,j,k,l,m,n,o;f=R;g=0;while(true){if(!(g=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]);(h<0||h>=R.$length)?$throwRuntimeError("index out of range"):R.$array[R.$offset+h]=AK.nil;j=0;while(true){if(!(j<(i.localSize>>0))){break;}k=T(i.local,j);k.private$0=$ifaceNil;l=k.shared;m=0;while(true){if(!(m=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+n]=$ifaceNil);m++;}k.shared=AW.nil;j=j+(1)>>0;}i.local=0;i.localSize=0;g++;}R=new AL([]);};S=function(){D(P);};T=function(f,g){var f,g,h;return(h=f,(h.nilCheck,((g<0||g>=h.length)?$throwRuntimeError("index out of range"):h[g])));};AA=function(){};AG=function(){var f;f=$clone(new AD.ptr(),AD);H(12);};AH.ptr.prototype.RLock=function($b){var $args=arguments,$r,$s=0,$this=this,f;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:f=$this;if(A.AddInt32(new AR(function(){return this.$target.readerCount;},function($v){this.$target.readerCount=$v;},f),1)<0){}else{$s=1;continue;}$r=F(new AQ(function(){return this.$target.readerSem;},function($v){this.$target.readerSem=$v;},f),$BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}case 1:case-1:}return;}};$f.$blocking=true;return $f;};AH.prototype.RLock=function($b){return this.$val.RLock($b);};AH.ptr.prototype.RUnlock=function($b){var $args=arguments,$r,$s=0,$this=this,f,g;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:f=$this;g=A.AddInt32(new AR(function(){return this.$target.readerCount;},function($v){this.$target.readerCount=$v;},f),-1);if(g<0){}else{$s=1;continue;}if(((g+1>>0)===0)||((g+1>>0)===-1073741824)){AA();$panic(new $String("sync: RUnlock of unlocked RWMutex"));}if(A.AddInt32(new AR(function(){return this.$target.readerWait;},function($v){this.$target.readerWait=$v;},f),-1)===0){}else{$s=2;continue;}$r=G(new AQ(function(){return this.$target.writerSem;},function($v){this.$target.writerSem=$v;},f),$BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}case 2:case 1:case-1:}return;}};$f.$blocking=true;return $f;};AH.prototype.RUnlock=function($b){return this.$val.RUnlock($b);};AH.ptr.prototype.Lock=function($b){var $args=arguments,$r,$s=0,$this=this,f,g;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:f=$this;$r=f.w.Lock($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}g=A.AddInt32(new AR(function(){return this.$target.readerCount;},function($v){this.$target.readerCount=$v;},f),-1073741824)+1073741824>>0;if(!((g===0))&&!((A.AddInt32(new AR(function(){return this.$target.readerWait;},function($v){this.$target.readerWait=$v;},f),g)===0))){}else{$s=2;continue;}$r=F(new AQ(function(){return this.$target.writerSem;},function($v){this.$target.writerSem=$v;},f),$BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}case 2:case-1:}return;}};$f.$blocking=true;return $f;};AH.prototype.Lock=function($b){return this.$val.Lock($b);};AH.ptr.prototype.Unlock=function($b){var $args=arguments,$r,$s=0,$this=this,f,g,h;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:f=$this;g=A.AddInt32(new AR(function(){return this.$target.readerCount;},function($v){this.$target.readerCount=$v;},f),1073741824);if(g>=1073741824){AA();$panic(new $String("sync: Unlock of unlocked RWMutex"));}h=0;case 1:if(!(h<(g>>0))){$s=2;continue;}$r=G(new AQ(function(){return this.$target.readerSem;},function($v){this.$target.readerSem=$v;},f),$BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}h=h+(1)>>0;$s=1;continue;case 2:$r=f.w.Unlock($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}case-1:}return;}};$f.$blocking=true;return $f;};AH.prototype.Unlock=function($b){return this.$val.Unlock($b);};AH.ptr.prototype.RLocker=function(){var f;f=this;return $pointerOfStructConversion(f,AX);};AH.prototype.RLocker=function(){return this.$val.RLocker();};AI.ptr.prototype.Lock=function($b){var $args=arguments,$r,$s=0,$this=this,f;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:f=$this;$r=$pointerOfStructConversion(f,AY).RLock($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}case-1:}return;}};$f.$blocking=true;return $f;};AI.prototype.Lock=function($b){return this.$val.Lock($b);};AI.ptr.prototype.Unlock=function($b){var $args=arguments,$r,$s=0,$this=this,f;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){s:while(true){switch($s){case 0:f=$this;$r=$pointerOfStructConversion(f,AY).RUnlock($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}case-1:}return;}};$f.$blocking=true;return $f;};AI.prototype.Unlock=function($b){return this.$val.Unlock($b);};AK.methods=[{prop:"Get",name:"Get",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"Put",name:"Put",pkg:"",typ:$funcType([$emptyInterface],[],false)},{prop:"getSlow",name:"getSlow",pkg:"sync",typ:$funcType([],[$emptyInterface],false)},{prop:"pin",name:"pin",pkg:"sync",typ:$funcType([],[AT],false)},{prop:"pinSlow",name:"pinSlow",pkg:"sync",typ:$funcType([],[AT],false)}];BB.methods=[{prop:"Lock",name:"Lock",pkg:"",typ:$funcType([],[],false)},{prop:"Unlock",name:"Unlock",pkg:"",typ:$funcType([],[],false)}];BD.methods=[{prop:"Do",name:"Do",pkg:"",typ:$funcType([BC],[],false)}];AY.methods=[{prop:"RLock",name:"RLock",pkg:"",typ:$funcType([],[],false)},{prop:"RUnlock",name:"RUnlock",pkg:"",typ:$funcType([],[],false)},{prop:"Lock",name:"Lock",pkg:"",typ:$funcType([],[],false)},{prop:"Unlock",name:"Unlock",pkg:"",typ:$funcType([],[],false)},{prop:"RLocker",name:"RLocker",pkg:"",typ:$funcType([],[M],false)}];AX.methods=[{prop:"Lock",name:"Lock",pkg:"",typ:$funcType([],[],false)},{prop:"Unlock",name:"Unlock",pkg:"",typ:$funcType([],[],false)}];C.init([{prop:"local",name:"local",pkg:"sync",typ:$UnsafePointer,tag:""},{prop:"localSize",name:"localSize",pkg:"sync",typ:$Uintptr,tag:""},{prop:"store",name:"store",pkg:"sync",typ:AW,tag:""},{prop:"New",name:"New",pkg:"",typ:AZ,tag:""}]);L.init([{prop:"state",name:"state",pkg:"sync",typ:$Int32,tag:""},{prop:"sema",name:"sema",pkg:"sync",typ:$Uint32,tag:""}]);M.init([{prop:"Lock",name:"Lock",pkg:"",typ:$funcType([],[],false)},{prop:"Unlock",name:"Unlock",pkg:"",typ:$funcType([],[],false)}]);N.init([{prop:"m",name:"m",pkg:"sync",typ:L,tag:""},{prop:"done",name:"done",pkg:"sync",typ:$Uint32,tag:""}]);O.init([{prop:"private$0",name:"private",pkg:"sync",typ:$emptyInterface,tag:""},{prop:"shared",name:"shared",pkg:"sync",typ:AW,tag:""},{prop:"Mutex",name:"",pkg:"",typ:L,tag:""},{prop:"pad",name:"pad",pkg:"sync",typ:BE,tag:""}]);AD.init([{prop:"lock",name:"lock",pkg:"sync",typ:$Uintptr,tag:""},{prop:"head",name:"head",pkg:"sync",typ:$UnsafePointer,tag:""},{prop:"tail",name:"tail",pkg:"sync",typ:$UnsafePointer,tag:""}]);AH.init([{prop:"w",name:"w",pkg:"sync",typ:L,tag:""},{prop:"writerSem",name:"writerSem",pkg:"sync",typ:$Uint32,tag:""},{prop:"readerSem",name:"readerSem",pkg:"sync",typ:$Uint32,tag:""},{prop:"readerCount",name:"readerCount",pkg:"sync",typ:$Int32,tag:""},{prop:"readerWait",name:"readerWait",pkg:"sync",typ:$Int32,tag:""}]);AI.init([{prop:"w",name:"w",pkg:"sync",typ:L,tag:""},{prop:"writerSem",name:"writerSem",pkg:"sync",typ:$Uint32,tag:""},{prop:"readerSem",name:"readerSem",pkg:"sync",typ:$Uint32,tag:""},{prop:"readerCount",name:"readerCount",pkg:"sync",typ:$Int32,tag:""},{prop:"readerWait",name:"readerWait",pkg:"sync",typ:$Int32,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_sync=function(){while(true){switch($s){case 0:$r=B.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}R=AL.nil;E=new $Map();S();AG();}return;}};$init_sync.$blocking=true;return $init_sync;};return $pkg;})(); +$packages["io"]=(function(){var $pkg={},B,A,C,W,AI,AJ;B=$packages["errors"];A=$packages["runtime"];C=$packages["sync"];W=$pkg.RuneReader=$newType(8,$kindInterface,"io.RuneReader","RuneReader","io",null);W.init([{prop:"ReadRune",name:"ReadRune",pkg:"",typ:$funcType([],[$Int32,$Int,$error],false)}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_io=function(){while(true){switch($s){case 0:$r=B.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$pkg.ErrShortWrite=B.New("short write");$pkg.ErrShortBuffer=B.New("short buffer");$pkg.EOF=B.New("EOF");$pkg.ErrUnexpectedEOF=B.New("unexpected EOF");$pkg.ErrNoProgress=B.New("multiple Read calls return no data or error");AI=B.New("Seek: invalid whence");AJ=B.New("Seek: invalid offset");$pkg.ErrClosedPipe=B.New("io: read/write on closed pipe");}return;}};$init_io.$blocking=true;return $init_io;};return $pkg;})(); +$packages["math"]=(function(){var $pkg={},A,FG,B,C,D,E,F,EN,G,X,Z,AR,AS,AT,EP;A=$packages["github.com/gopherjs/gopherjs/js"];FG=$arrayType($Float64,70);G=function(){AR(0);AS(0);};X=$pkg.IsInf=function(ao,ap){var ao,ap;if(ao===D){return ap>=0;}if(ao===E){return ap<=0;}return false;};Z=$pkg.Ldexp=function(ao,ap){var ao,ap;if(ao===0){return ao;}if(ap>=1024){return ao*$parseFloat(B.pow(2,1023))*$parseFloat(B.pow(2,ap-1023>>0));}if(ap<=-1024){return ao*$parseFloat(B.pow(2,-1023))*$parseFloat(B.pow(2,ap+1023>>0));}return ao*$parseFloat(B.pow(2,ap));};AR=$pkg.Float32bits=function(ao){var ao,ap,aq,ar;if(ao===0){if(1/ao===E){return 2147483648;}return 0;}if(!(ao===ao)){return 2143289344;}ap=0;if(ao<0){ap=2147483648;ao=-ao;}aq=150;while(true){if(!(ao>=1.6777216e+07)){break;}ao=ao/(2);aq=aq+(1)>>>0;if(aq===255){if(ao>=8.388608e+06){ao=D;}break;}}while(true){if(!(ao<8.388608e+06)){break;}aq=aq-(1)>>>0;if(aq===0){break;}ao=ao*(2);}ar=$parseFloat($mod(ao,2));if((ar>0.5&&ar<1)||ar>=1.5){ao=ao+(1);}return(((ap|(aq<<23>>>0))>>>0)|(((ao>>0)&~8388608)))>>>0;};AS=$pkg.Float32frombits=function(ao){var ao,ap,aq,ar;ap=1;if(!((((ao&2147483648)>>>0)===0))){ap=-1;}aq=(((ao>>>23>>>0))&255)>>>0;ar=(ao&8388607)>>>0;if(aq===255){if(ar===0){return ap/0;}return F;}if(!((aq===0))){ar=ar+(8388608)>>>0;}if(aq===0){aq=1;}return Z(ar,((aq>>0)-127>>0)-23>>0)*ap;};AT=$pkg.Float64bits=function(ao){var ao,ap,aq,ar,as,at,au;if(ao===0){if(1/ao===E){return new $Uint64(2147483648,0);}return new $Uint64(0,0);}if(!((ao===ao))){return new $Uint64(2146959360,1);}ap=new $Uint64(0,0);if(ao<0){ap=new $Uint64(2147483648,0);ao=-ao;}aq=1075;while(true){if(!(ao>=9.007199254740992e+15)){break;}ao=ao/(2);aq=aq+(1)>>>0;if(aq===2047){break;}}while(true){if(!(ao<4.503599627370496e+15)){break;}aq=aq-(1)>>>0;if(aq===0){break;}ao=ao*(2);}return(ar=(as=$shiftLeft64(new $Uint64(0,aq),52),new $Uint64(ap.$high|as.$high,(ap.$low|as.$low)>>>0)),at=(au=new $Uint64(0,ao),new $Uint64(au.$high&~1048576,(au.$low&~0)>>>0)),new $Uint64(ar.$high|at.$high,(ar.$low|at.$low)>>>0));};EP=function(){var ao,ap,aq,ar;EN[0]=1;EN[1]=10;ao=2;while(true){if(!(ao<70)){break;}aq=(ap=ao/2,(ap===ap&&ap!==1/0&&ap!==-1/0)?ap>>0:$throwRuntimeError("integer divide by zero"));(ao<0||ao>=EN.length)?$throwRuntimeError("index out of range"):EN[ao]=((aq<0||aq>=EN.length)?$throwRuntimeError("index out of range"):EN[aq])*(ar=ao-aq>>0,((ar<0||ar>=EN.length)?$throwRuntimeError("index out of range"):EN[ar]));ao=ao+(1)>>0;}};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_math=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}EN=FG.zero();B=$global.Math;C=0;D=1/C;E=-1/C;F=0/C;G();EP();}return;}};$init_math.$blocking=true;return $init_math;};return $pkg;})(); +$packages["unicode"]=(function(){var $pkg={};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_unicode=function(){while(true){switch($s){case 0:}return;}};$init_unicode.$blocking=true;return $init_unicode;};return $pkg;})(); +$packages["unicode/utf8"]=(function(){var $pkg={},A,B,E,F,I,J,K,L;A=function(a){var a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b=0,ba,bb,bc,bd,be,bf,bg,bh,c=0,d=false,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;e=a.$length;if(e<1){f=65533;g=0;h=true;b=f;c=g;d=h;return[b,c,d];}i=((0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]);if(i<128){j=(i>>0);k=1;l=false;b=j;c=k;d=l;return[b,c,d];}if(i<192){m=65533;n=1;o=false;b=m;c=n;d=o;return[b,c,d];}if(e<2){p=65533;q=1;r=true;b=p;c=q;d=r;return[b,c,d];}s=((1<0||1>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+1]);if(s<128||192<=s){t=65533;u=1;v=false;b=t;c=u;d=v;return[b,c,d];}if(i<224){b=((((i&31)>>>0)>>0)<<6>>0)|(((s&63)>>>0)>>0);if(b<=127){w=65533;x=1;y=false;b=w;c=x;d=y;return[b,c,d];}z=b;aa=2;ab=false;b=z;c=aa;d=ab;return[b,c,d];}if(e<3){ac=65533;ad=1;ae=true;b=ac;c=ad;d=ae;return[b,c,d];}af=((2<0||2>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+2]);if(af<128||192<=af){ag=65533;ah=1;ai=false;b=ag;c=ah;d=ai;return[b,c,d];}if(i<240){b=(((((i&15)>>>0)>>0)<<12>>0)|((((s&63)>>>0)>>0)<<6>>0))|(((af&63)>>>0)>>0);if(b<=2047){aj=65533;ak=1;al=false;b=aj;c=ak;d=al;return[b,c,d];}if(55296<=b&&b<=57343){am=65533;an=1;ao=false;b=am;c=an;d=ao;return[b,c,d];}ap=b;aq=3;ar=false;b=ap;c=aq;d=ar;return[b,c,d];}if(e<4){as=65533;at=1;au=true;b=as;c=at;d=au;return[b,c,d];}av=((3<0||3>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+3]);if(av<128||192<=av){aw=65533;ax=1;ay=false;b=aw;c=ax;d=ay;return[b,c,d];}if(i<248){b=((((((i&7)>>>0)>>0)<<18>>0)|((((s&63)>>>0)>>0)<<12>>0))|((((af&63)>>>0)>>0)<<6>>0))|(((av&63)>>>0)>>0);if(b<=65535||1114111>0);k=1;l=false;b=j;c=k;d=l;return[b,c,d];}if(i<192){m=65533;n=1;o=false;b=m;c=n;d=o;return[b,c,d];}if(e<2){p=65533;q=1;r=true;b=p;c=q;d=r;return[b,c,d];}s=a.charCodeAt(1);if(s<128||192<=s){t=65533;u=1;v=false;b=t;c=u;d=v;return[b,c,d];}if(i<224){b=((((i&31)>>>0)>>0)<<6>>0)|(((s&63)>>>0)>>0);if(b<=127){w=65533;x=1;y=false;b=w;c=x;d=y;return[b,c,d];}z=b;aa=2;ab=false;b=z;c=aa;d=ab;return[b,c,d];}if(e<3){ac=65533;ad=1;ae=true;b=ac;c=ad;d=ae;return[b,c,d];}af=a.charCodeAt(2);if(af<128||192<=af){ag=65533;ah=1;ai=false;b=ag;c=ah;d=ai;return[b,c,d];}if(i<240){b=(((((i&15)>>>0)>>0)<<12>>0)|((((s&63)>>>0)>>0)<<6>>0))|(((af&63)>>>0)>>0);if(b<=2047){aj=65533;ak=1;al=false;b=aj;c=ak;d=al;return[b,c,d];}if(55296<=b&&b<=57343){am=65533;an=1;ao=false;b=am;c=an;d=ao;return[b,c,d];}ap=b;aq=3;ar=false;b=ap;c=aq;d=ar;return[b,c,d];}if(e<4){as=65533;at=1;au=true;b=as;c=at;d=au;return[b,c,d];}av=a.charCodeAt(3);if(av<128||192<=av){aw=65533;ax=1;ay=false;b=aw;c=ax;d=ay;return[b,c,d];}if(i<248){b=((((((i&7)>>>0)>>0)<<18>>0)|((((s&63)>>>0)>>0)<<12>>0))|((((af&63)>>>0)>>0)<<6>>0))|(((av&63)>>>0)>>0);if(b<=65535||1114111>>0);if(c<=127){(0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]=(b<<24>>>24);return 1;}else if(c<=2047){(0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]=(192|((b>>6>>0)<<24>>>24))>>>0;(1<0||1>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+1]=(128|(((b<<24>>>24)&63)>>>0))>>>0;return 2;}else if(c>1114111||55296<=c&&c<=57343){b=65533;(0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]=(224|((b>>12>>0)<<24>>>24))>>>0;(1<0||1>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+1]=(128|((((b>>6>>0)<<24>>>24)&63)>>>0))>>>0;(2<0||2>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+2]=(128|(((b<<24>>>24)&63)>>>0))>>>0;return 3;}else if(c<=65535){(0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]=(224|((b>>12>>0)<<24>>>24))>>>0;(1<0||1>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+1]=(128|((((b>>6>>0)<<24>>>24)&63)>>>0))>>>0;(2<0||2>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+2]=(128|(((b<<24>>>24)&63)>>>0))>>>0;return 3;}else{(0<0||0>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]=(240|((b>>18>>0)<<24>>>24))>>>0;(1<0||1>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+1]=(128|((((b>>12>>0)<<24>>>24)&63)>>>0))>>>0;(2<0||2>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+2]=(128|((((b>>6>>0)<<24>>>24)&63)>>>0))>>>0;(3<0||3>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+3]=(128|(((b<<24>>>24)&63)>>>0))>>>0;return 4;}};K=$pkg.RuneCount=function(a){var a,b,c,d,e;b=0;c=0;c=0;while(true){if(!(b=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+b])<128){b=b+(1)>>0;}else{d=E($subslice(a,b));e=d[1];b=b+(e)>>0;}c=c+(1)>>0;}return c;};L=$pkg.RuneCountInString=function(a){var a,b=0,c,d,e;c=a;d=0;while(true){if(!(d>0;d+=e[1];}return b;};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_utf8=function(){while(true){switch($s){case 0:}return;}};$init_utf8.$blocking=true;return $init_utf8;};return $pkg;})(); +$packages["bytes"]=(function(){var $pkg={},A,B,D,C,E;A=$packages["errors"];B=$packages["io"];D=$packages["unicode"];C=$packages["unicode/utf8"];E=$pkg.IndexByte=function(d,e){var d,e,f,g,h,i;f=d;g=0;while(true){if(!(g=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]);if(i===e){return h;}g++;}return-1;};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_bytes=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$pkg.ErrTooLarge=A.New("bytes.Buffer: too large");}return;}};$init_bytes.$blocking=true;return $init_bytes;};return $pkg;})(); +$packages["syscall"]=(function(){var $pkg={},A,E,B,D,C,EQ,ER,KF,KI,KO,KW,MD,ME,MF,MS,MT,MZ,NE,NG,NH,NK,NX,NY,NZ,OA,OE,OF,OH,OJ,F,G,N,O,P,AP,AQ,AR,AS,DT,FS,H,I,J,K,L,Q,R,S,V,AU,AW,CQ,CR,CT,CY,DO,DY,DZ,ET,EU,GM,HA,HF,HH,HI,HL,HN,HO,HP,II,IT,IU,IV,JA,JY,JZ,KA;A=$packages["bytes"];E=$packages["errors"];B=$packages["github.com/gopherjs/gopherjs/js"];D=$packages["runtime"];C=$packages["sync"];EQ=$pkg.mmapper=$newType(0,$kindStruct,"syscall.mmapper","mmapper","syscall",function(Mutex_,active_,mmap_,munmap_){this.$val=this;this.Mutex=Mutex_!==undefined?Mutex_:new C.Mutex.ptr();this.active=active_!==undefined?active_:false;this.mmap=mmap_!==undefined?mmap_:$throwNilPointerError;this.munmap=munmap_!==undefined?munmap_:$throwNilPointerError;});ER=$pkg.Errno=$newType(4,$kindUintptr,"syscall.Errno","Errno","syscall",null);KF=$pkg._C_int=$newType(4,$kindInt32,"syscall._C_int","_C_int","syscall",null);KI=$pkg.Timespec=$newType(0,$kindStruct,"syscall.Timespec","Timespec","syscall",function(Sec_,Nsec_){this.$val=this;this.Sec=Sec_!==undefined?Sec_:new $Int64(0,0);this.Nsec=Nsec_!==undefined?Nsec_:new $Int64(0,0);});KO=$pkg.Stat_t=$newType(0,$kindStruct,"syscall.Stat_t","Stat_t","syscall",function(Dev_,Mode_,Nlink_,Ino_,Uid_,Gid_,Rdev_,Pad_cgo_0_,Atimespec_,Mtimespec_,Ctimespec_,Birthtimespec_,Size_,Blocks_,Blksize_,Flags_,Gen_,Lspare_,Qspare_){this.$val=this;this.Dev=Dev_!==undefined?Dev_:0;this.Mode=Mode_!==undefined?Mode_:0;this.Nlink=Nlink_!==undefined?Nlink_:0;this.Ino=Ino_!==undefined?Ino_:new $Uint64(0,0);this.Uid=Uid_!==undefined?Uid_:0;this.Gid=Gid_!==undefined?Gid_:0;this.Rdev=Rdev_!==undefined?Rdev_:0;this.Pad_cgo_0=Pad_cgo_0_!==undefined?Pad_cgo_0_:NG.zero();this.Atimespec=Atimespec_!==undefined?Atimespec_:new KI.ptr();this.Mtimespec=Mtimespec_!==undefined?Mtimespec_:new KI.ptr();this.Ctimespec=Ctimespec_!==undefined?Ctimespec_:new KI.ptr();this.Birthtimespec=Birthtimespec_!==undefined?Birthtimespec_:new KI.ptr();this.Size=Size_!==undefined?Size_:new $Int64(0,0);this.Blocks=Blocks_!==undefined?Blocks_:new $Int64(0,0);this.Blksize=Blksize_!==undefined?Blksize_:0;this.Flags=Flags_!==undefined?Flags_:0;this.Gen=Gen_!==undefined?Gen_:0;this.Lspare=Lspare_!==undefined?Lspare_:0;this.Qspare=Qspare_!==undefined?Qspare_:OF.zero();});KW=$pkg.Dirent=$newType(0,$kindStruct,"syscall.Dirent","Dirent","syscall",function(Ino_,Seekoff_,Reclen_,Namlen_,Type_,Name_,Pad_cgo_0_){this.$val=this;this.Ino=Ino_!==undefined?Ino_:new $Uint64(0,0);this.Seekoff=Seekoff_!==undefined?Seekoff_:new $Uint64(0,0);this.Reclen=Reclen_!==undefined?Reclen_:0;this.Namlen=Namlen_!==undefined?Namlen_:0;this.Type=Type_!==undefined?Type_:0;this.Name=Name_!==undefined?Name_:OH.zero();this.Pad_cgo_0=Pad_cgo_0_!==undefined?Pad_cgo_0_:OJ.zero();});MD=$sliceType($Uint8);ME=$sliceType($String);MF=$ptrType($Uint8);MS=$sliceType(KF);MT=$ptrType($Uintptr);MZ=$arrayType($Uint8,32);NE=$sliceType($Uint8);NG=$arrayType($Uint8,4);NH=$arrayType(KF,14);NK=$structType([{prop:"addr",name:"addr",pkg:"syscall",typ:$Uintptr,tag:""},{prop:"len",name:"len",pkg:"syscall",typ:$Int,tag:""},{prop:"cap",name:"cap",pkg:"syscall",typ:$Int,tag:""}]);NX=$ptrType(EQ);NY=$mapType(MF,MD);NZ=$funcType([$Uintptr,$Uintptr,$Int,$Int,$Int,$Int64],[$Uintptr,$error],false);OA=$funcType([$Uintptr,$Uintptr],[$error],false);OE=$ptrType(KI);OF=$arrayType($Int64,2);OH=$arrayType($Int8,1024);OJ=$arrayType($Uint8,3);H=function(){$flushConsole=(function(){if(!((G.$length===0))){$global.console.log($externalize($bytesToString(G),$String));G=MD.nil;}});};I=function(){if(!F){console.log("warning: system calls not available, see https://github.com/gopherjs/gopherjs/blob/master/doc/syscalls.md");}F=true;};J=function(i){var i,j,k;j=$global.goPrintToConsole;if(!(j===undefined)){j(i);return;}G=$appendSlice(G,i);while(true){if(!(true)){break;}k=A.IndexByte(G,10);if(k===-1){break;}$global.console.log($externalize($bytesToString($subslice(G,0,k)),$String));G=$subslice(G,(k+1>>0));}};K=function(i){var i;};L=function(){var i,j,k,l,m,n;i=$global.process;if(i===undefined){return ME.nil;}j=i.env;k=$global.Object.keys(j);l=$makeSlice(ME,$parseInt(k.length));m=0;while(true){if(!(m<$parseInt(k.length))){break;}n=$internalize(k[m],$String);(m<0||m>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+m]=n+"="+$internalize(j[$externalize(n,$String)],$String);m=m+(1)>>0;}return l;};Q=function(i){var $deferred=[],$err=null,i,j;try{$deferFrames.push($deferred);$deferred.push([(function(){$recover();}),[]]);if(N===null){if(O){return null;}O=true;j=$global.require;if(j===undefined){$panic(new $String(""));}N=j($externalize("syscall",$String));}return N[$externalize(i,$String)];}catch(err){$err=err;return null;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};R=$pkg.Syscall=function(i,j,k,l){var aa,ab,i,j,k,l,m=0,n=0,o=0,p,q,r,s,t,u,v,w,x,y,z;p=Q("Syscall");if(!(p===null)){q=p(i,j,k,l);r=(($parseInt(q[0])>>0)>>>0);s=(($parseInt(q[1])>>0)>>>0);t=(($parseInt(q[2])>>0)>>>0);m=r;n=s;o=t;return[m,n,o];}if((i===4)&&((j===1)||(j===2))){u=k;v=$makeSlice(MD,$parseInt(u.length));v.$array=u;J(v);w=($parseInt(u.length)>>>0);x=0;y=0;m=w;n=x;o=y;return[m,n,o];}I();z=(P>>>0);aa=0;ab=13;m=z;n=aa;o=ab;return[m,n,o];};S=$pkg.Syscall6=function(i,j,k,l,m,n,o){var i,j,k,l,m,n,o,p=0,q=0,r=0,s,t,u,v,w,x,y,z;s=Q("Syscall6");if(!(s===null)){t=s(i,j,k,l,m,n,o);u=(($parseInt(t[0])>>0)>>>0);v=(($parseInt(t[1])>>0)>>>0);w=(($parseInt(t[2])>>0)>>>0);p=u;q=v;r=w;return[p,q,r];}if(!((i===202))){I();}x=(P>>>0);y=0;z=13;p=x;q=y;r=z;return[p,q,r];};V=$pkg.BytePtrFromString=function(i){var i,j,k,l,m,n;j=new($global.Uint8Array)(i.length+1>>0);k=new MD($stringToBytes(i));l=0;while(true){if(!(l=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+l]);if(n===0){return[MF.nil,new ER(22)];}j[m]=n;l++;}j[i.length]=0;return[j,$ifaceNil];};AU=function(){var i,j,k,l,m,n,o,p,q,r;AR=new $Map();i=AS;j=0;while(true){if(!(j=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]);m=0;while(true){if(!(m=AS.$length)?$throwRuntimeError("index out of range"):AS.$array[AS.$offset+k]="";}break;}m=m+(1)>>0;}j++;}};AW=$pkg.Getenv=function(i,$b){var $args=arguments,$deferred=[],$err=null,$r,$s=0,$this=this,j="",k=false,l,m,n,o,p,q,r,s,t,u,v,w,x,y;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){try{$deferFrames.push($deferred);s:while(true){switch($s){case 0:$r=AP.Do(AU,$BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}if(i.length===0){l="";m=false;j=l;k=m;return[j,k];}$r=AQ.RLock($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$deferred.push([$methodVal(AQ,"RUnlock"),[$BLOCKING]]);n=(o=AR[i],o!==undefined?[o.v,true]:[0,false]);p=n[0];q=n[1];if(!q){r="";s=false;j=r;k=s;return[j,k];}t=((p<0||p>=AS.$length)?$throwRuntimeError("index out of range"):AS.$array[AS.$offset+p]);u=0;while(true){if(!(u>0));w=true;j=v;k=w;return[j,k];}u=u+(1)>>0;}x="";y=false;j=x;k=y;return[j,k];case-1:}return;}}catch(err){$err=err;}finally{$deferFrames.pop();if($curGoroutine.asleep&&!$jumpToDefer){throw null;}$s=-1;$callDeferred($deferred,$err);return[j,k];}};$f.$blocking=true;return $f;};CQ=function(i){var i;if(i<0){return"-"+CR((-i>>>0));}return CR((i>>>0));};CR=function(i){var i,j,k,l,m;j=$clone(MZ.zero(),MZ);k=31;while(true){if(!(i>=10)){break;}(k<0||k>=j.length)?$throwRuntimeError("index out of range"):j[k]=(((l=i%10,l===l?l:$throwRuntimeError("integer divide by zero"))+48>>>0)<<24>>>24);k=k-(1)>>0;i=(m=i/(10),(m===m&&m!==1/0&&m!==-1/0)?m>>>0:$throwRuntimeError("integer divide by zero"));}(k<0||k>=j.length)?$throwRuntimeError("index out of range"):j[k]=((i+48>>>0)<<24>>>24);return $bytesToString($subslice(new MD(j),k));};CT=$pkg.ByteSliceFromString=function(i){var i,j,k;j=0;while(true){if(!(j>0;}k=$makeSlice(MD,(i.length+1>>0));$copyString(k,i);return[k,$ifaceNil];};KI.ptr.prototype.Unix=function(){var i=new $Int64(0,0),j=new $Int64(0,0),k,l,m;k=this;l=k.Sec;m=k.Nsec;i=l;j=m;return[i,j];};KI.prototype.Unix=function(){return this.$val.Unix();};KI.ptr.prototype.Nano=function(){var i,j,k;i=this;return(j=$mul64(i.Sec,new $Int64(0,1000000000)),k=i.Nsec,new $Int64(j.$high+k.$high,j.$low+k.$low));};KI.prototype.Nano=function(){return this.$val.Nano();};CY=$pkg.ReadDirent=function(i,j){var i,j,k=0,l=$ifaceNil,m,n;m=new Uint8Array(8);n=HP(i,j,m);k=n[0];l=n[1];if(true&&($interfaceIsEqual(l,new ER(22))||$interfaceIsEqual(l,new ER(2)))){l=$ifaceNil;}return[k,l];};DO=$pkg.Sysctl=function(i){var i,j="",k=$ifaceNil,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;l=DY(i);m=l[0];k=l[1];if(!($interfaceIsEqual(k,$ifaceNil))){n="";o=k;j=n;k=o;return[j,k];}p=0;k=GM(m,MF.nil,new MT(function(){return p;},function($v){p=$v;}),MF.nil,0);if(!($interfaceIsEqual(k,$ifaceNil))){q="";r=k;j=q;k=r;return[j,k];}if(p===0){s="";t=$ifaceNil;j=s;k=t;return[j,k];}u=$makeSlice(MD,p);k=GM(m,new MF(function(){return((0<0||0>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+0]);},function($v){(0<0||0>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+0]=$v;},u),new MT(function(){return p;},function($v){p=$v;}),MF.nil,0);if(!($interfaceIsEqual(k,$ifaceNil))){v="";w=k;j=v;k=w;return[j,k];}if(p>0&&((x=p-1>>>0,((x<0||x>=u.$length)?$throwRuntimeError("index out of range"):u.$array[u.$offset+x]))===0)){p=p-(1)>>>0;}y=$bytesToString($subslice(u,0,p));z=$ifaceNil;j=y;k=z;return[j,k];};DY=function(i){var i,j=MS.nil,k=$ifaceNil,l,m,n,o,p,q,r,s,t,u,v,w;l=$clone(NH.zero(),NH);m=48;n=$sliceToArray(new NE(l));o=CT(i);p=o[0];k=o[1];if(!($interfaceIsEqual(k,$ifaceNil))){q=MS.nil;r=k;j=q;k=r;return[j,k];}k=GM(new MS([0,3]),n,new MT(function(){return m;},function($v){m=$v;}),new MF(function(){return((0<0||0>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+0]);},function($v){(0<0||0>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+0]=$v;},p),(i.length>>>0));if(!($interfaceIsEqual(k,$ifaceNil))){s=MS.nil;t=k;j=s;k=t;return[j,k];}u=$subslice(new MS(l),0,(v=m/4,(v===v&&v!==1/0&&v!==-1/0)?v>>>0:$throwRuntimeError("integer divide by zero")));w=$ifaceNil;j=u;k=w;return[j,k];};DZ=$pkg.ParseDirent=function(i,j,k){var i,j,k,l=0,m=0,n=ME.nil,o,p,q,r,s,t,u,v,w,x,y;o=i.$length;while(true){if(!(!((j===0))&&i.$length>0)){break;}p=[undefined];p[0]=(q=$sliceToArray(i),r=new KW.ptr(),s=new DataView(q.buffer,q.byteOffset),r.Ino=new $Uint64(s.getUint32(4,true),s.getUint32(0,true)),r.Seekoff=new $Uint64(s.getUint32(12,true),s.getUint32(8,true)),r.Reclen=s.getUint16(16,true),r.Namlen=s.getUint16(18,true),r.Type=s.getUint8(20,true),r.Name=new($nativeArray($kindInt8))(q.buffer,$min(q.byteOffset+21,q.buffer.byteLength)),r.Pad_cgo_0=new($nativeArray($kindUint8))(q.buffer,$min(q.byteOffset+1045,q.buffer.byteLength)),r);if(p[0].Reclen===0){i=MD.nil;break;}i=$subslice(i,p[0].Reclen);if((t=p[0].Ino,(t.$high===0&&t.$low===0))){continue;}u=$sliceToArray(new NE(p[0].Name));v=$bytesToString($subslice(new MD(u),0,p[0].Namlen));if(v==="."||v===".."){continue;}j=j-(1)>>0;m=m+(1)>>0;k=$append(k,v);}w=o-i.$length>>0;x=m;y=k;l=w;m=x;n=y;return[l,m,n];};EQ.ptr.prototype.Mmap=function(i,j,k,l,m,$b){var $args=arguments,$deferred=[],$err=null,$r,$s=0,$this=this,aa,ab,ac,ad,ae,n=MD.nil,o=$ifaceNil,p,q,r,s,t,u,v,w,x,y,z;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){try{$deferFrames.push($deferred);s:while(true){switch($s){case 0:p=$this;if(k<=0){q=MD.nil;r=new ER(22);n=q;o=r;return[n,o];}s=p.mmap(0,(k>>>0),l,m,i,j);t=s[0];u=s[1];if(!($interfaceIsEqual(u,$ifaceNil))){v=MD.nil;w=u;n=v;o=w;return[n,o];}x=new NK.ptr(t,k,k);y=x;ab=new MF(function(){return(aa=y.$capacity-1>>0,((aa<0||aa>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+aa]));},function($v){(z=y.$capacity-1>>0,(z<0||z>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+z]=$v);},y);$r=p.Mutex.Lock($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$deferred.push([$methodVal(p.Mutex,"Unlock"),[$BLOCKING]]);ac=ab;(p.active||$throwRuntimeError("assignment to entry in nil map"))[ac.$key()]={k:ac,v:y};ad=y;ae=$ifaceNil;n=ad;o=ae;return[n,o];case-1:}return;}}catch(err){$err=err;}finally{$deferFrames.pop();if($curGoroutine.asleep&&!$jumpToDefer){throw null;}$s=-1;$callDeferred($deferred,$err);return[n,o];}};$f.$blocking=true;return $f;};EQ.prototype.Mmap=function(i,j,k,l,m,$b){return this.$val.Mmap(i,j,k,l,m,$b);};EQ.ptr.prototype.Munmap=function(i,$b){var $args=arguments,$deferred=[],$err=null,$r,$s=0,$this=this,j=$ifaceNil,k,l,m,n,o,p,q;if($b!==$BLOCKING){$nonblockingCall();};var $f=function(){try{$deferFrames.push($deferred);s:while(true){switch($s){case 0:k=$this;if((i.$length===0)||!((i.$length===i.$capacity))){j=new ER(22);return j;}n=new MF(function(){return(m=i.$capacity-1>>0,((m<0||m>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+m]));},function($v){(l=i.$capacity-1>>0,(l<0||l>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+l]=$v);},i);$r=k.Mutex.Lock($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$deferred.push([$methodVal(k.Mutex,"Unlock"),[$BLOCKING]]);p=(o=k.active[n.$key()],o!==undefined?o.v:MD.nil);if(p===MD.nil||!($pointerIsEqual(new MF(function(){return((0<0||0>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+0]);},function($v){(0<0||0>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+0]=$v;},p),new MF(function(){return((0<0||0>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+0]);},function($v){(0<0||0>=this.$target.$length)?$throwRuntimeError("index out of range"):this.$target.$array[this.$target.$offset+0]=$v;},i)))){j=new ER(22);return j;}q=k.munmap($sliceToArray(p),(p.$length>>>0));if(!($interfaceIsEqual(q,$ifaceNil))){j=q;return j;}delete k.active[n.$key()];j=$ifaceNil;return j;case-1:}return;}}catch(err){$err=err;}finally{$deferFrames.pop();if($curGoroutine.asleep&&!$jumpToDefer){throw null;}$s=-1;$callDeferred($deferred,$err);return j;}};$f.$blocking=true;return $f;};EQ.prototype.Munmap=function(i,$b){return this.$val.Munmap(i,$b);};ER.prototype.Error=function(){var i,j;i=this.$val;if(0<=(i>>0)&&(i>>0)<106){j=((i<0||i>=FS.length)?$throwRuntimeError("index out of range"):FS[i]);if(!(j==="")){return j;}}return"errno "+CQ((i>>0));};$ptrType(ER).prototype.Error=function(){return new ER(this.$get()).Error();};ER.prototype.Temporary=function(){var i;i=this.$val;return(i===4)||(i===24)||(i===54)||(i===53)||new ER(i).Timeout();};$ptrType(ER).prototype.Temporary=function(){return new ER(this.$get()).Temporary();};ER.prototype.Timeout=function(){var i;i=this.$val;return(i===35)||(i===35)||(i===60);};$ptrType(ER).prototype.Timeout=function(){return new ER(this.$get()).Timeout();};ET=$pkg.Read=function(i,j){var i,j,k=0,l=$ifaceNil,m;m=IV(i,j);k=m[0];l=m[1];return[k,l];};EU=$pkg.Write=function(i,j){var i,j,k=0,l=$ifaceNil,m;m=JY(i,j);k=m[0];l=m[1];return[k,l];};GM=function(i,j,k,l,m){var i,j,k,l,m,n=$ifaceNil,o,p,q;o=0;if(i.$length>0){o=$sliceToArray(i);}else{o=new Uint8Array(0);}p=S(202,o,(i.$length>>>0),j,k,l,m);q=p[2];if(!((q===0))){n=new ER(q);}return n;};HA=$pkg.Close=function(i){var i,j=$ifaceNil,k,l;k=R(6,(i>>>0),0,0);l=k[2];if(!((l===0))){j=new ER(l);}return j;};HF=$pkg.Fchdir=function(i){var i,j=$ifaceNil,k,l;k=R(13,(i>>>0),0,0);l=k[2];if(!((l===0))){j=new ER(l);}return j;};HH=$pkg.Fchmod=function(i,j){var i,j,k=$ifaceNil,l,m;l=R(124,(i>>>0),(j>>>0),0);m=l[2];if(!((m===0))){k=new ER(m);}return k;};HI=$pkg.Fchown=function(i,j,k){var i,j,k,l=$ifaceNil,m,n;m=R(123,(i>>>0),(j>>>0),(k>>>0));n=m[2];if(!((n===0))){l=new ER(n);}return l;};HL=$pkg.Fstat=function(i,j){var i,j,k=$ifaceNil,l,m,n,o,p;m=new Uint8Array(144);l=R(339,(i>>>0),m,0);p=l[2];n=j,o=new DataView(m.buffer,m.byteOffset),n.Dev=o.getInt32(0,true),n.Mode=o.getUint16(4,true),n.Nlink=o.getUint16(6,true),n.Ino=new $Uint64(o.getUint32(12,true),o.getUint32(8,true)),n.Uid=o.getUint32(16,true),n.Gid=o.getUint32(20,true),n.Rdev=o.getInt32(24,true),n.Pad_cgo_0=new($nativeArray($kindUint8))(m.buffer,$min(m.byteOffset+28,m.buffer.byteLength)),n.Atimespec.Sec=new $Int64(o.getUint32(36,true),o.getUint32(32,true)),n.Atimespec.Nsec=new $Int64(o.getUint32(44,true),o.getUint32(40,true)),n.Mtimespec.Sec=new $Int64(o.getUint32(52,true),o.getUint32(48,true)),n.Mtimespec.Nsec=new $Int64(o.getUint32(60,true),o.getUint32(56,true)),n.Ctimespec.Sec=new $Int64(o.getUint32(68,true),o.getUint32(64,true)),n.Ctimespec.Nsec=new $Int64(o.getUint32(76,true),o.getUint32(72,true)),n.Birthtimespec.Sec=new $Int64(o.getUint32(84,true),o.getUint32(80,true)),n.Birthtimespec.Nsec=new $Int64(o.getUint32(92,true),o.getUint32(88,true)),n.Size=new $Int64(o.getUint32(100,true),o.getUint32(96,true)),n.Blocks=new $Int64(o.getUint32(108,true),o.getUint32(104,true)),n.Blksize=o.getInt32(112,true),n.Flags=o.getUint32(116,true),n.Gen=o.getUint32(120,true),n.Lspare=o.getInt32(124,true),n.Qspare=new($nativeArray($kindInt64))(m.buffer,$min(m.byteOffset+128,m.buffer.byteLength));if(!((p===0))){k=new ER(p);}return k;};HN=$pkg.Fsync=function(i){var i,j=$ifaceNil,k,l;k=R(95,(i>>>0),0,0);l=k[2];if(!((l===0))){j=new ER(l);}return j;};HO=$pkg.Ftruncate=function(i,j){var i,j,k=$ifaceNil,l,m;l=R(201,(i>>>0),(j.$low>>>0),0);m=l[2];if(!((m===0))){k=new ER(m);}return k;};HP=$pkg.Getdirentries=function(i,j,k){var i,j,k,l=0,m=$ifaceNil,n,o,p,q;n=0;if(j.$length>0){n=$sliceToArray(j);}else{n=new Uint8Array(0);}o=S(344,(i>>>0),n,(j.$length>>>0),k,0,0);p=o[0];q=o[2];l=(p>>0);if(!((q===0))){m=new ER(q);}return[l,m];};II=$pkg.Lstat=function(i,j){var i,j,k=$ifaceNil,l,m,n,o,p,q,r;l=MF.nil;m=V(i);l=m[0];k=m[1];if(!($interfaceIsEqual(k,$ifaceNil))){return k;}o=new Uint8Array(144);n=R(340,l,o,0);r=n[2];p=j,q=new DataView(o.buffer,o.byteOffset),p.Dev=q.getInt32(0,true),p.Mode=q.getUint16(4,true),p.Nlink=q.getUint16(6,true),p.Ino=new $Uint64(q.getUint32(12,true),q.getUint32(8,true)),p.Uid=q.getUint32(16,true),p.Gid=q.getUint32(20,true),p.Rdev=q.getInt32(24,true),p.Pad_cgo_0=new($nativeArray($kindUint8))(o.buffer,$min(o.byteOffset+28,o.buffer.byteLength)),p.Atimespec.Sec=new $Int64(q.getUint32(36,true),q.getUint32(32,true)),p.Atimespec.Nsec=new $Int64(q.getUint32(44,true),q.getUint32(40,true)),p.Mtimespec.Sec=new $Int64(q.getUint32(52,true),q.getUint32(48,true)),p.Mtimespec.Nsec=new $Int64(q.getUint32(60,true),q.getUint32(56,true)),p.Ctimespec.Sec=new $Int64(q.getUint32(68,true),q.getUint32(64,true)),p.Ctimespec.Nsec=new $Int64(q.getUint32(76,true),q.getUint32(72,true)),p.Birthtimespec.Sec=new $Int64(q.getUint32(84,true),q.getUint32(80,true)),p.Birthtimespec.Nsec=new $Int64(q.getUint32(92,true),q.getUint32(88,true)),p.Size=new $Int64(q.getUint32(100,true),q.getUint32(96,true)),p.Blocks=new $Int64(q.getUint32(108,true),q.getUint32(104,true)),p.Blksize=q.getInt32(112,true),p.Flags=q.getUint32(116,true),p.Gen=q.getUint32(120,true),p.Lspare=q.getInt32(124,true),p.Qspare=new($nativeArray($kindInt64))(o.buffer,$min(o.byteOffset+128,o.buffer.byteLength));K(l);if(!((r===0))){k=new ER(r);}return k;};IT=$pkg.Pread=function(i,j,k){var i,j,k,l=0,m=$ifaceNil,n,o,p,q;n=0;if(j.$length>0){n=$sliceToArray(j);}else{n=new Uint8Array(0);}o=S(153,(i>>>0),n,(j.$length>>>0),(k.$low>>>0),0,0);p=o[0];q=o[2];l=(p>>0);if(!((q===0))){m=new ER(q);}return[l,m];};IU=$pkg.Pwrite=function(i,j,k){var i,j,k,l=0,m=$ifaceNil,n,o,p,q;n=0;if(j.$length>0){n=$sliceToArray(j);}else{n=new Uint8Array(0);}o=S(154,(i>>>0),n,(j.$length>>>0),(k.$low>>>0),0,0);p=o[0];q=o[2];l=(p>>0);if(!((q===0))){m=new ER(q);}return[l,m];};IV=function(i,j){var i,j,k=0,l=$ifaceNil,m,n,o,p;m=0;if(j.$length>0){m=$sliceToArray(j);}else{m=new Uint8Array(0);}n=R(3,(i>>>0),m,(j.$length>>>0));o=n[0];p=n[2];k=(o>>0);if(!((p===0))){l=new ER(p);}return[k,l];};JA=$pkg.Seek=function(i,j,k){var i,j,k,l=new $Int64(0,0),m=$ifaceNil,n,o,p;n=R(199,(i>>>0),(j.$low>>>0),(k>>>0));o=n[0];p=n[2];l=new $Int64(0,o.constructor===Number?o:1);if(!((p===0))){m=new ER(p);}return[l,m];};JY=function(i,j){var i,j,k=0,l=$ifaceNil,m,n,o,p;m=0;if(j.$length>0){m=$sliceToArray(j);}else{m=new Uint8Array(0);}n=R(4,(i>>>0),m,(j.$length>>>0));o=n[0];p=n[2];k=(o>>0);if(!((p===0))){l=new ER(p);}return[k,l];};JZ=function(i,j,k,l,m,n){var i,j,k,l,m,n,o=0,p=$ifaceNil,q,r,s;q=S(197,i,j,(k>>>0),(l>>>0),(m>>>0),(n.$low>>>0));r=q[0];s=q[2];o=r;if(!((s===0))){p=new ER(s);}return[o,p];};KA=function(i,j){var i,j,k=$ifaceNil,l,m;l=R(73,i,j,0);m=l[2];if(!((m===0))){k=new ER(m);}return k;};NX.methods=[{prop:"Mmap",name:"Mmap",pkg:"",typ:$funcType([$Int,$Int64,$Int,$Int,$Int],[MD,$error],false)},{prop:"Munmap",name:"Munmap",pkg:"",typ:$funcType([MD],[$error],false)}];ER.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)},{prop:"Temporary",name:"Temporary",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Timeout",name:"Timeout",pkg:"",typ:$funcType([],[$Bool],false)}];OE.methods=[{prop:"Unix",name:"Unix",pkg:"",typ:$funcType([],[$Int64,$Int64],false)},{prop:"Nano",name:"Nano",pkg:"",typ:$funcType([],[$Int64],false)}];EQ.init([{prop:"Mutex",name:"",pkg:"",typ:C.Mutex,tag:""},{prop:"active",name:"active",pkg:"syscall",typ:NY,tag:""},{prop:"mmap",name:"mmap",pkg:"syscall",typ:NZ,tag:""},{prop:"munmap",name:"munmap",pkg:"syscall",typ:OA,tag:""}]);KI.init([{prop:"Sec",name:"Sec",pkg:"",typ:$Int64,tag:""},{prop:"Nsec",name:"Nsec",pkg:"",typ:$Int64,tag:""}]);KO.init([{prop:"Dev",name:"Dev",pkg:"",typ:$Int32,tag:""},{prop:"Mode",name:"Mode",pkg:"",typ:$Uint16,tag:""},{prop:"Nlink",name:"Nlink",pkg:"",typ:$Uint16,tag:""},{prop:"Ino",name:"Ino",pkg:"",typ:$Uint64,tag:""},{prop:"Uid",name:"Uid",pkg:"",typ:$Uint32,tag:""},{prop:"Gid",name:"Gid",pkg:"",typ:$Uint32,tag:""},{prop:"Rdev",name:"Rdev",pkg:"",typ:$Int32,tag:""},{prop:"Pad_cgo_0",name:"Pad_cgo_0",pkg:"",typ:NG,tag:""},{prop:"Atimespec",name:"Atimespec",pkg:"",typ:KI,tag:""},{prop:"Mtimespec",name:"Mtimespec",pkg:"",typ:KI,tag:""},{prop:"Ctimespec",name:"Ctimespec",pkg:"",typ:KI,tag:""},{prop:"Birthtimespec",name:"Birthtimespec",pkg:"",typ:KI,tag:""},{prop:"Size",name:"Size",pkg:"",typ:$Int64,tag:""},{prop:"Blocks",name:"Blocks",pkg:"",typ:$Int64,tag:""},{prop:"Blksize",name:"Blksize",pkg:"",typ:$Int32,tag:""},{prop:"Flags",name:"Flags",pkg:"",typ:$Uint32,tag:""},{prop:"Gen",name:"Gen",pkg:"",typ:$Uint32,tag:""},{prop:"Lspare",name:"Lspare",pkg:"",typ:$Int32,tag:""},{prop:"Qspare",name:"Qspare",pkg:"",typ:OF,tag:""}]);KW.init([{prop:"Ino",name:"Ino",pkg:"",typ:$Uint64,tag:""},{prop:"Seekoff",name:"Seekoff",pkg:"",typ:$Uint64,tag:""},{prop:"Reclen",name:"Reclen",pkg:"",typ:$Uint16,tag:""},{prop:"Namlen",name:"Namlen",pkg:"",typ:$Uint16,tag:""},{prop:"Type",name:"Type",pkg:"",typ:$Uint8,tag:""},{prop:"Name",name:"Name",pkg:"",typ:OH,tag:""},{prop:"Pad_cgo_0",name:"Pad_cgo_0",pkg:"",typ:OJ,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_syscall=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}G=MD.nil;AP=new C.Once.ptr();AQ=new C.RWMutex.ptr();AR=false;F=false;N=null;O=false;P=-1;AS=L();$pkg.Stdin=0;$pkg.Stdout=1;$pkg.Stderr=2;FS=$toNativeArray($kindString,["","operation not permitted","no such file or directory","no such process","interrupted system call","input/output error","device not configured","argument list too long","exec format error","bad file descriptor","no child processes","resource deadlock avoided","cannot allocate memory","permission denied","bad address","block device required","resource busy","file exists","cross-device link","operation not supported by device","not a directory","is a directory","invalid argument","too many open files in system","too many open files","inappropriate ioctl for device","text file busy","file too large","no space left on device","illegal seek","read-only file system","too many links","broken pipe","numerical argument out of domain","result too large","resource temporarily unavailable","operation now in progress","operation already in progress","socket operation on non-socket","destination address required","message too long","protocol wrong type for socket","protocol not available","protocol not supported","socket type not supported","operation not supported","protocol family not supported","address family not supported by protocol family","address already in use","can't assign requested address","network is down","network is unreachable","network dropped connection on reset","software caused connection abort","connection reset by peer","no buffer space available","socket is already connected","socket is not connected","can't send after socket shutdown","too many references: can't splice","operation timed out","connection refused","too many levels of symbolic links","file name too long","host is down","no route to host","directory not empty","too many processes","too many users","disc quota exceeded","stale NFS file handle","too many levels of remote in path","RPC struct is bad","RPC version wrong","RPC prog. not avail","program version wrong","bad procedure for program","no locks available","function not implemented","inappropriate file type or format","authentication error","need authenticator","device power is off","device error","value too large to be stored in data type","bad executable (or shared library)","bad CPU type in executable","shared library version mismatch","malformed Mach-o file","operation canceled","identifier removed","no message of desired type","illegal byte sequence","attribute not found","bad message","EMULTIHOP (Reserved)","no message available on STREAM","ENOLINK (Reserved)","no STREAM resources","not a STREAM","protocol error","STREAM ioctl timeout","operation not supported on socket","policy not found","state not recoverable","previous owner died"]);DT=new EQ.ptr(new C.Mutex.ptr(),new $Map(),JZ,KA);H();}return;}};$init_syscall.$blocking=true;return $init_syscall;};return $pkg;})(); +$packages["github.com/gopherjs/gopherjs/nosync"]=(function(){var $pkg={},D,I,J;D=$pkg.Once=$newType(0,$kindStruct,"nosync.Once","Once","github.com/gopherjs/gopherjs/nosync",function(doing_,done_){this.$val=this;this.doing=doing_!==undefined?doing_:false;this.done=done_!==undefined?done_:false;});I=$funcType([],[],false);J=$ptrType(D);D.ptr.prototype.Do=function(a){var $deferred=[],$err=null,a,b;try{$deferFrames.push($deferred);b=this;if(b.done){return;}if(b.doing){$panic(new $String("nosync: Do called within f"));}b.doing=true;$deferred.push([(function(){b.doing=false;b.done=true;}),[]]);a();}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};D.prototype.Do=function(a){return this.$val.Do(a);};J.methods=[{prop:"Do",name:"Do",pkg:"",typ:$funcType([I],[],false)}];D.init([{prop:"doing",name:"doing",pkg:"github.com/gopherjs/gopherjs/nosync",typ:$Bool,tag:""},{prop:"done",name:"done",pkg:"github.com/gopherjs/gopherjs/nosync",typ:$Bool,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_nosync=function(){while(true){switch($s){case 0:}return;}};$init_nosync.$blocking=true;return $init_nosync;};return $pkg;})(); +$packages["strings"]=(function(){var $pkg={},B,A,C,E,D,F;B=$packages["errors"];A=$packages["github.com/gopherjs/gopherjs/js"];C=$packages["io"];E=$packages["unicode"];D=$packages["unicode/utf8"];F=$pkg.IndexByte=function(b,c){var b,c;return $parseInt(b.indexOf($global.String.fromCharCode(c)))>>0;};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_strings=function(){while(true){switch($s){case 0:$r=B.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}}return;}};$init_strings.$blocking=true;return $init_strings;};return $pkg;})(); +$packages["time"]=(function(){var $pkg={},C,B,E,F,A,D,AB,BG,BH,BJ,BN,CA,CB,CC,CW,CX,CY,CZ,DD,DE,DF,DG,DH,DN,DQ,N,Q,R,S,T,X,AA,AN,BI,BK,BS,CD,CE,CF,CH,CL,CS,j,k,H,O,P,U,V,W,Y,Z,AC,AD,AE,AF,AG,AH,AJ,AK,AL,AM,AO,BL,BM,BO,BP,BR,BV,BW,BX,BY,BZ,CG;C=$packages["errors"];B=$packages["github.com/gopherjs/gopherjs/js"];E=$packages["github.com/gopherjs/gopherjs/nosync"];F=$packages["runtime"];A=$packages["strings"];D=$packages["syscall"];AB=$pkg.ParseError=$newType(0,$kindStruct,"time.ParseError","ParseError","time",function(Layout_,Value_,LayoutElem_,ValueElem_,Message_){this.$val=this;this.Layout=Layout_!==undefined?Layout_:"";this.Value=Value_!==undefined?Value_:"";this.LayoutElem=LayoutElem_!==undefined?LayoutElem_:"";this.ValueElem=ValueElem_!==undefined?ValueElem_:"";this.Message=Message_!==undefined?Message_:"";});BG=$pkg.Time=$newType(0,$kindStruct,"time.Time","Time","time",function(sec_,nsec_,loc_){this.$val=this;this.sec=sec_!==undefined?sec_:new $Int64(0,0);this.nsec=nsec_!==undefined?nsec_:0;this.loc=loc_!==undefined?loc_:DH.nil;});BH=$pkg.Month=$newType(4,$kindInt,"time.Month","Month","time",null);BJ=$pkg.Weekday=$newType(4,$kindInt,"time.Weekday","Weekday","time",null);BN=$pkg.Duration=$newType(8,$kindInt64,"time.Duration","Duration","time",null);CA=$pkg.Location=$newType(0,$kindStruct,"time.Location","Location","time",function(name_,zone_,tx_,cacheStart_,cacheEnd_,cacheZone_){this.$val=this;this.name=name_!==undefined?name_:"";this.zone=zone_!==undefined?zone_:CX.nil;this.tx=tx_!==undefined?tx_:CY.nil;this.cacheStart=cacheStart_!==undefined?cacheStart_:new $Int64(0,0);this.cacheEnd=cacheEnd_!==undefined?cacheEnd_:new $Int64(0,0);this.cacheZone=cacheZone_!==undefined?cacheZone_:CZ.nil;});CB=$pkg.zone=$newType(0,$kindStruct,"time.zone","zone","time",function(name_,offset_,isDST_){this.$val=this;this.name=name_!==undefined?name_:"";this.offset=offset_!==undefined?offset_:0;this.isDST=isDST_!==undefined?isDST_:false;});CC=$pkg.zoneTrans=$newType(0,$kindStruct,"time.zoneTrans","zoneTrans","time",function(when_,index_,isstd_,isutc_){this.$val=this;this.when=when_!==undefined?when_:new $Int64(0,0);this.index=index_!==undefined?index_:0;this.isstd=isstd_!==undefined?isstd_:false;this.isutc=isutc_!==undefined?isutc_:false;});CW=$sliceType($String);CX=$sliceType(CB);CY=$sliceType(CC);CZ=$ptrType(CB);DD=$arrayType($Uint8,32);DE=$sliceType($Uint8);DF=$arrayType($Uint8,9);DG=$arrayType($Uint8,64);DH=$ptrType(CA);DN=$ptrType(AB);DQ=$ptrType(BG);H=function(){var l,m,n,o;l=new($global.Date)();m=$internalize(l,$String);n=A.IndexByte(m,40);o=A.IndexByte(m,41);if((n===-1)||(o===-1)){CE.name="UTC";return;}CE.name=m.substring((n+1>>0),o);CE.zone=new CX([new CB.ptr(CE.name,($parseInt(l.getTimezoneOffset())>>0)*-60>>0,false)]);};O=function(l){var l,m;if(l.length===0){return false;}m=l.charCodeAt(0);return 97<=m&&m<=122;};P=function(l){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,cw,cx,cy,l,m="",n=0,o="",p,q,r,s,t,u,v,w,x,y,z;p=0;while(true){if(!(p>0);r=q;if(r===74){if(l.length>=(p+3>>0)&&l.substring(p,(p+3>>0))==="Jan"){if(l.length>=(p+7>>0)&&l.substring(p,(p+7>>0))==="January"){s=l.substring(0,p);t=257;u=l.substring((p+7>>0));m=s;n=t;o=u;return[m,n,o];}if(!O(l.substring((p+3>>0)))){v=l.substring(0,p);w=258;x=l.substring((p+3>>0));m=v;n=w;o=x;return[m,n,o];}}}else if(r===77){if(l.length>=(p+3>>0)){if(l.substring(p,(p+3>>0))==="Mon"){if(l.length>=(p+6>>0)&&l.substring(p,(p+6>>0))==="Monday"){y=l.substring(0,p);z=261;aa=l.substring((p+6>>0));m=y;n=z;o=aa;return[m,n,o];}if(!O(l.substring((p+3>>0)))){ab=l.substring(0,p);ac=262;ad=l.substring((p+3>>0));m=ab;n=ac;o=ad;return[m,n,o];}}if(l.substring(p,(p+3>>0))==="MST"){ae=l.substring(0,p);af=21;ag=l.substring((p+3>>0));m=ae;n=af;o=ag;return[m,n,o];}}}else if(r===48){if(l.length>=(p+2>>0)&&49<=l.charCodeAt((p+1>>0))&&l.charCodeAt((p+1>>0))<=54){ah=l.substring(0,p);ai=(aj=l.charCodeAt((p+1>>0))-49<<24>>>24,((aj<0||aj>=N.length)?$throwRuntimeError("index out of range"):N[aj]));ak=l.substring((p+2>>0));m=ah;n=ai;o=ak;return[m,n,o];}}else if(r===49){if(l.length>=(p+2>>0)&&(l.charCodeAt((p+1>>0))===53)){al=l.substring(0,p);am=522;an=l.substring((p+2>>0));m=al;n=am;o=an;return[m,n,o];}ao=l.substring(0,p);ap=259;aq=l.substring((p+1>>0));m=ao;n=ap;o=aq;return[m,n,o];}else if(r===50){if(l.length>=(p+4>>0)&&l.substring(p,(p+4>>0))==="2006"){ar=l.substring(0,p);as=273;at=l.substring((p+4>>0));m=ar;n=as;o=at;return[m,n,o];}au=l.substring(0,p);av=263;aw=l.substring((p+1>>0));m=au;n=av;o=aw;return[m,n,o];}else if(r===95){if(l.length>=(p+2>>0)&&(l.charCodeAt((p+1>>0))===50)){ax=l.substring(0,p);ay=264;az=l.substring((p+2>>0));m=ax;n=ay;o=az;return[m,n,o];}}else if(r===51){ba=l.substring(0,p);bb=523;bc=l.substring((p+1>>0));m=ba;n=bb;o=bc;return[m,n,o];}else if(r===52){bd=l.substring(0,p);be=525;bf=l.substring((p+1>>0));m=bd;n=be;o=bf;return[m,n,o];}else if(r===53){bg=l.substring(0,p);bh=527;bi=l.substring((p+1>>0));m=bg;n=bh;o=bi;return[m,n,o];}else if(r===80){if(l.length>=(p+2>>0)&&(l.charCodeAt((p+1>>0))===77)){bj=l.substring(0,p);bk=531;bl=l.substring((p+2>>0));m=bj;n=bk;o=bl;return[m,n,o];}}else if(r===112){if(l.length>=(p+2>>0)&&(l.charCodeAt((p+1>>0))===109)){bm=l.substring(0,p);bn=532;bo=l.substring((p+2>>0));m=bm;n=bn;o=bo;return[m,n,o];}}else if(r===45){if(l.length>=(p+7>>0)&&l.substring(p,(p+7>>0))==="-070000"){bp=l.substring(0,p);bq=27;br=l.substring((p+7>>0));m=bp;n=bq;o=br;return[m,n,o];}if(l.length>=(p+9>>0)&&l.substring(p,(p+9>>0))==="-07:00:00"){bs=l.substring(0,p);bt=30;bu=l.substring((p+9>>0));m=bs;n=bt;o=bu;return[m,n,o];}if(l.length>=(p+5>>0)&&l.substring(p,(p+5>>0))==="-0700"){bv=l.substring(0,p);bw=26;bx=l.substring((p+5>>0));m=bv;n=bw;o=bx;return[m,n,o];}if(l.length>=(p+6>>0)&&l.substring(p,(p+6>>0))==="-07:00"){by=l.substring(0,p);bz=29;ca=l.substring((p+6>>0));m=by;n=bz;o=ca;return[m,n,o];}if(l.length>=(p+3>>0)&&l.substring(p,(p+3>>0))==="-07"){cb=l.substring(0,p);cc=28;cd=l.substring((p+3>>0));m=cb;n=cc;o=cd;return[m,n,o];}}else if(r===90){if(l.length>=(p+7>>0)&&l.substring(p,(p+7>>0))==="Z070000"){ce=l.substring(0,p);cf=23;cg=l.substring((p+7>>0));m=ce;n=cf;o=cg;return[m,n,o];}if(l.length>=(p+9>>0)&&l.substring(p,(p+9>>0))==="Z07:00:00"){ch=l.substring(0,p);ci=25;cj=l.substring((p+9>>0));m=ch;n=ci;o=cj;return[m,n,o];}if(l.length>=(p+5>>0)&&l.substring(p,(p+5>>0))==="Z0700"){ck=l.substring(0,p);cl=22;cm=l.substring((p+5>>0));m=ck;n=cl;o=cm;return[m,n,o];}if(l.length>=(p+6>>0)&&l.substring(p,(p+6>>0))==="Z07:00"){cn=l.substring(0,p);co=24;cp=l.substring((p+6>>0));m=cn;n=co;o=cp;return[m,n,o];}}else if(r===46){if((p+1>>0)>0))===48)||(l.charCodeAt((p+1>>0))===57))){cq=l.charCodeAt((p+1>>0));cr=p+1>>0;while(true){if(!(cr>0;}if(!AD(l,cr)){cs=31;if(l.charCodeAt((p+1>>0))===57){cs=32;}cs=cs|((((cr-((p+1>>0))>>0))<<16>>0));ct=l.substring(0,p);cu=cs;cv=l.substring(cr);m=ct;n=cu;o=cv;return[m,n,o];}}}p=p+(1)>>0;}cw=l;cx=0;cy="";m=cw;n=cx;o=cy;return[m,n,o];};U=function(l,m){var l,m,n,o,p;n=0;while(true){if(!(n>>0;p=(p|(32))>>>0;if(!((o===p))||o<97||o>122){return false;}}n=n+(1)>>0;}return true;};V=function(l,m){var l,m,n,o,p,q;n=l;o=0;while(true){if(!(o=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+o]);if(m.length>=q.length&&U(m.substring(0,q.length),q)){return[p,m.substring(q.length),$ifaceNil];}o++;}return[-1,m,AA];};W=function(l,m,n){var l,m,n,o,p,q,r,s,t;if(m<10){if(!((n===0))){l=$append(l,n);}return $append(l,((48+m>>>0)<<24>>>24));}if(m<100){l=$append(l,((48+(o=m/10,(o===o&&o!==1/0&&o!==-1/0)?o>>>0:$throwRuntimeError("integer divide by zero"))>>>0)<<24>>>24));l=$append(l,((48+(p=m%10,p===p?p:$throwRuntimeError("integer divide by zero"))>>>0)<<24>>>24));return l;}q=$clone(DD.zero(),DD);r=32;if(m===0){return $append(l,48);}while(true){if(!(m>=10)){break;}r=r-(1)>>0;(r<0||r>=q.length)?$throwRuntimeError("index out of range"):q[r]=(((s=m%10,s===s?s:$throwRuntimeError("integer divide by zero"))+48>>>0)<<24>>>24);m=(t=m/(10),(t===t&&t!==1/0&&t!==-1/0)?t>>>0:$throwRuntimeError("integer divide by zero"));}r=r-(1)>>0;(r<0||r>=q.length)?$throwRuntimeError("index out of range"):q[r]=((m+48>>>0)<<24>>>24);return $appendSlice(l,$subslice(new DE(q),r));};Y=function(l){var l,m=0,n=$ifaceNil,o,p,q,r,s,t,u,v;o=false;if(!(l==="")&&((l.charCodeAt(0)===45)||(l.charCodeAt(0)===43))){o=l.charCodeAt(0)===45;l=l.substring(1);}p=AO(l);q=p[0];r=p[1];n=p[2];m=((q.$low+((q.$high>>31)*4294967296))>>0);if(!($interfaceIsEqual(n,$ifaceNil))||!(r==="")){s=0;t=X;m=s;n=t;return[m,n];}if(o){m=-m;}u=m;v=$ifaceNil;m=u;n=v;return[m,n];};Z=function(l,m,n,o){var l,m,n,o,p,q,r,s,t,u;p=m;q=$clone(DF.zero(),DF);r=9;while(true){if(!(r>0)){break;}r=r-(1)>>0;(r<0||r>=q.length)?$throwRuntimeError("index out of range"):q[r]=(((s=p%10,s===s?s:$throwRuntimeError("integer divide by zero"))+48>>>0)<<24>>>24);p=(t=p/(10),(t===t&&t!==1/0&&t!==-1/0)?t>>>0:$throwRuntimeError("integer divide by zero"));}if(n>9){n=9;}if(o){while(true){if(!(n>0&&((u=n-1>>0,((u<0||u>=q.length)?$throwRuntimeError("index out of range"):q[u]))===48))){break;}n=n-(1)>>0;}if(n===0){return l;}}l=$append(l,46);return $appendSlice(l,$subslice(new DE(q),0,n));};BG.ptr.prototype.String=function(){var l;l=$clone(this,BG);return l.Format("2006-01-02 15:04:05.999999999 -0700 MST");};BG.prototype.String=function(){return this.$val.String();};BG.ptr.prototype.Format=function(l){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;m=$clone(this,BG);n=m.locabs();o=n[0];p=n[1];q=n[2];r=-1;s=0;t=0;u=-1;v=0;w=0;x=DE.nil;y=$clone(DG.zero(),DG);z=l.length+10>>0;if(z<=64){x=$subslice(new DE(y),0,0);}else{x=$makeSlice(DE,0,z);}while(true){if(!(!(l===""))){break;}aa=P(l);ab=aa[0];ac=aa[1];ad=aa[2];if(!(ab==="")){x=$appendSlice(x,new DE($stringToBytes(ab)));}if(ac===0){break;}l=ad;if(r<0&&!(((ac&256)===0))){ae=BR(q,true);r=ae[0];s=ae[1];t=ae[2];}if(u<0&&!(((ac&512)===0))){af=BM(q);u=af[0];v=af[1];w=af[2];}ag=ac&65535;switch(0){default:if(ag===274){ah=r;if(ah<0){ah=-ah;}x=W(x,((ai=ah%100,ai===ai?ai:$throwRuntimeError("integer divide by zero"))>>>0),48);}else if(ag===273){aj=r;if(r<=-1000){x=$append(x,45);aj=-aj;}else if(r<=-100){x=$appendSlice(x,new DE($stringToBytes("-0")));aj=-aj;}else if(r<=-10){x=$appendSlice(x,new DE($stringToBytes("-00")));aj=-aj;}else if(r<0){x=$appendSlice(x,new DE($stringToBytes("-000")));aj=-aj;}else if(r<10){x=$appendSlice(x,new DE($stringToBytes("000")));}else if(r<100){x=$appendSlice(x,new DE($stringToBytes("00")));}else if(r<1000){x=$append(x,48);}x=W(x,(aj>>>0),0);}else if(ag===258){x=$appendSlice(x,new DE($stringToBytes(new BH(s).String().substring(0,3))));}else if(ag===257){ak=new BH(s).String();x=$appendSlice(x,new DE($stringToBytes(ak)));}else if(ag===259){x=W(x,(s>>>0),0);}else if(ag===260){x=W(x,(s>>>0),48);}else if(ag===262){x=$appendSlice(x,new DE($stringToBytes(new BJ(BL(q)).String().substring(0,3))));}else if(ag===261){al=new BJ(BL(q)).String();x=$appendSlice(x,new DE($stringToBytes(al)));}else if(ag===263){x=W(x,(t>>>0),0);}else if(ag===264){x=W(x,(t>>>0),32);}else if(ag===265){x=W(x,(t>>>0),48);}else if(ag===522){x=W(x,(u>>>0),48);}else if(ag===523){an=(am=u%12,am===am?am:$throwRuntimeError("integer divide by zero"));if(an===0){an=12;}x=W(x,(an>>>0),0);}else if(ag===524){ap=(ao=u%12,ao===ao?ao:$throwRuntimeError("integer divide by zero"));if(ap===0){ap=12;}x=W(x,(ap>>>0),48);}else if(ag===525){x=W(x,(v>>>0),0);}else if(ag===526){x=W(x,(v>>>0),48);}else if(ag===527){x=W(x,(w>>>0),0);}else if(ag===528){x=W(x,(w>>>0),48);}else if(ag===531){if(u>=12){x=$appendSlice(x,new DE($stringToBytes("PM")));}else{x=$appendSlice(x,new DE($stringToBytes("AM")));}}else if(ag===532){if(u>=12){x=$appendSlice(x,new DE($stringToBytes("pm")));}else{x=$appendSlice(x,new DE($stringToBytes("am")));}}else if(ag===22||ag===24||ag===23||ag===25||ag===26||ag===29||ag===27||ag===30){if((p===0)&&((ac===22)||(ac===24)||(ac===23)||(ac===25))){x=$append(x,90);break;}ar=(aq=p/60,(aq===aq&&aq!==1/0&&aq!==-1/0)?aq>>0:$throwRuntimeError("integer divide by zero"));as=p;if(ar<0){x=$append(x,45);ar=-ar;as=-as;}else{x=$append(x,43);}x=W(x,((at=ar/60,(at===at&&at!==1/0&&at!==-1/0)?at>>0:$throwRuntimeError("integer divide by zero"))>>>0),48);if((ac===24)||(ac===29)||(ac===25)||(ac===30)){x=$append(x,58);}x=W(x,((au=ar%60,au===au?au:$throwRuntimeError("integer divide by zero"))>>>0),48);if((ac===23)||(ac===27)||(ac===30)||(ac===25)){if((ac===30)||(ac===25)){x=$append(x,58);}x=W(x,((av=as%60,av===av?av:$throwRuntimeError("integer divide by zero"))>>>0),48);}}else if(ag===21){if(!(o==="")){x=$appendSlice(x,new DE($stringToBytes(o)));break;}ax=(aw=p/60,(aw===aw&&aw!==1/0&&aw!==-1/0)?aw>>0:$throwRuntimeError("integer divide by zero"));if(ax<0){x=$append(x,45);ax=-ax;}else{x=$append(x,43);}x=W(x,((ay=ax/60,(ay===ay&&ay!==1/0&&ay!==-1/0)?ay>>0:$throwRuntimeError("integer divide by zero"))>>>0),48);x=W(x,((az=ax%60,az===az?az:$throwRuntimeError("integer divide by zero"))>>>0),48);}else if(ag===31||ag===32){x=Z(x,(m.Nanosecond()>>>0),ac>>16>>0,(ac&65535)===32);}}}return $bytesToString(x);};BG.prototype.Format=function(l){return this.$val.Format(l);};AC=function(l){var l;return"\""+l+"\"";};AB.ptr.prototype.Error=function(){var l;l=this;if(l.Message===""){return"parsing time "+AC(l.Value)+" as "+AC(l.Layout)+": cannot parse "+AC(l.ValueElem)+" as "+AC(l.LayoutElem);}return"parsing time "+AC(l.Value)+l.Message;};AB.prototype.Error=function(){return this.$val.Error();};AD=function(l,m){var l,m,n;if(l.length<=m){return false;}n=l.charCodeAt(m);return 48<=n&&n<=57;};AE=function(l,m){var l,m;if(!AD(l,0)){return[0,l,AA];}if(!AD(l,1)){if(m){return[0,l,AA];}return[((l.charCodeAt(0)-48<<24>>>24)>>0),l.substring(1),$ifaceNil];}return[(((l.charCodeAt(0)-48<<24>>>24)>>0)*10>>0)+((l.charCodeAt(1)-48<<24>>>24)>>0)>>0,l.substring(2),$ifaceNil];};AF=function(l){var l;while(true){if(!(l.length>0&&(l.charCodeAt(0)===32))){break;}l=l.substring(1);}return l;};AG=function(l,m){var l,m;while(true){if(!(m.length>0)){break;}if(m.charCodeAt(0)===32){if(l.length>0&&!((l.charCodeAt(0)===32))){return[l,AA];}m=AF(m);l=AF(l);continue;}if((l.length===0)||!((l.charCodeAt(0)===m.charCodeAt(0)))){return[l,AA];}m=m.substring(1);l=l.substring(1);}return[l,$ifaceNil];};AH=$pkg.Parse=function(l,m){var l,m;return AJ(l,m,$pkg.UTC,$pkg.Local);};AJ=function(l,m,n,o){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,cw,cx,cy,cz,da,db,dc,dd,de,df,dg,dh,di,dj,dk,dl,dm,dn,dp,dq,dr,ds,dt,du,dv,dw,dx,dy,dz,ea,eb,ec,ed,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;p=l;q=m;r=p;s=q;t="";u=false;v=false;w=0;x=1;y=1;z=0;aa=0;ab=0;ac=0;ad=DH.nil;ae=-1;af="";while(true){if(!(true)){break;}ag=$ifaceNil;ah=P(l);ai=ah[0];aj=ah[1];ak=ah[2];al=l.substring(ai.length,(l.length-ak.length>>0));am=AG(m,ai);m=am[0];ag=am[1];if(!($interfaceIsEqual(ag,$ifaceNil))){return[new BG.ptr(new $Int64(0,0),0,DH.nil),new AB.ptr(r,s,ai,m,"")];}if(aj===0){if(!((m.length===0))){return[new BG.ptr(new $Int64(0,0),0,DH.nil),new AB.ptr(r,s,"",m,": extra text: "+m)];}break;}l=ak;an="";ao=aj&65535;switch(0){default:if(ao===274){if(m.length<2){ag=AA;break;}ap=m.substring(0,2);aq=m.substring(2);an=ap;m=aq;ar=Y(an);w=ar[0];ag=ar[1];if(w>=69){w=w+(1900)>>0;}else{w=w+(2000)>>0;}}else if(ao===273){if(m.length<4||!AD(m,0)){ag=AA;break;}as=m.substring(0,4);at=m.substring(4);an=as;m=at;au=Y(an);w=au[0];ag=au[1];}else if(ao===258){av=V(S,m);x=av[0];m=av[1];ag=av[2];}else if(ao===257){aw=V(T,m);x=aw[0];m=aw[1];ag=aw[2];}else if(ao===259||ao===260){ax=AE(m,aj===260);x=ax[0];m=ax[1];ag=ax[2];if(x<=0||120&&(m.charCodeAt(0)===32)){m=m.substring(1);}ba=AE(m,aj===265);y=ba[0];m=ba[1];ag=ba[2];if(y<0||31=2&&(m.charCodeAt(0)===46)&&AD(m,1)){bf=P(l);aj=bf[1];aj=aj&(65535);if((aj===31)||(aj===32)){break;}bg=2;while(true){if(!(bg>0;}bh=AM(m,bg);ac=bh[0];t=bh[1];ag=bh[2];m=m.substring(bg);}}else if(ao===531){if(m.length<2){ag=AA;break;}bi=m.substring(0,2);bj=m.substring(2);an=bi;m=bj;bk=an;if(bk==="PM"){v=true;}else if(bk==="AM"){u=true;}else{ag=AA;}}else if(ao===532){if(m.length<2){ag=AA;break;}bl=m.substring(0,2);bm=m.substring(2);an=bl;m=bm;bn=an;if(bn==="pm"){v=true;}else if(bn==="am"){u=true;}else{ag=AA;}}else if(ao===22||ao===24||ao===23||ao===25||ao===26||ao===28||ao===29||ao===27||ao===30){if(((aj===22)||(aj===24))&&m.length>=1&&(m.charCodeAt(0)===90)){m=m.substring(1);ad=$pkg.UTC;break;}bo="";bp="";bq="";br="";bs=bo;bt=bp;bu=bq;bv=br;if((aj===24)||(aj===29)){if(m.length<6){ag=AA;break;}if(!((m.charCodeAt(3)===58))){ag=AA;break;}bw=m.substring(0,1);bx=m.substring(1,3);by=m.substring(4,6);bz="00";ca=m.substring(6);bs=bw;bt=bx;bu=by;bv=bz;m=ca;}else if(aj===28){if(m.length<3){ag=AA;break;}cb=m.substring(0,1);cc=m.substring(1,3);cd="00";ce="00";cf=m.substring(3);bs=cb;bt=cc;bu=cd;bv=ce;m=cf;}else if((aj===25)||(aj===30)){if(m.length<9){ag=AA;break;}if(!((m.charCodeAt(3)===58))||!((m.charCodeAt(6)===58))){ag=AA;break;}cg=m.substring(0,1);ch=m.substring(1,3);ci=m.substring(4,6);cj=m.substring(7,9);ck=m.substring(9);bs=cg;bt=ch;bu=ci;bv=cj;m=ck;}else if((aj===23)||(aj===27)){if(m.length<7){ag=AA;break;}cl=m.substring(0,1);cm=m.substring(1,3);cn=m.substring(3,5);co=m.substring(5,7);cp=m.substring(7);bs=cl;bt=cm;bu=cn;bv=co;m=cp;}else{if(m.length<5){ag=AA;break;}cq=m.substring(0,1);cr=m.substring(1,3);cs=m.substring(3,5);ct="00";cu=m.substring(5);bs=cq;bt=cr;bu=cs;bv=ct;m=cu;}cv=0;cw=0;cx=0;cy=cv;cz=cw;da=cx;db=Y(bt);cy=db[0];ag=db[1];if($interfaceIsEqual(ag,$ifaceNil)){dc=Y(bu);cz=dc[0];ag=dc[1];}if($interfaceIsEqual(ag,$ifaceNil)){dd=Y(bv);da=dd[0];ag=dd[1];}ae=((((cy*60>>0)+cz>>0))*60>>0)+da>>0;de=bs.charCodeAt(0);if(de===43){}else if(de===45){ae=-ae;}else{ag=AA;}}else if(ao===21){if(m.length>=3&&m.substring(0,3)==="UTC"){ad=$pkg.UTC;m=m.substring(3);break;}df=AK(m);dg=df[0];dh=df[1];if(!dh){ag=AA;break;}di=m.substring(0,dg);dj=m.substring(dg);af=di;m=dj;}else if(ao===31){dk=1+((aj>>16>>0))>>0;if(m.length>0)>0))&&m.charCodeAt((dm+1>>0))<=57)){break;}dm=dm+(1)>>0;}dn=AM(m,1+dm>>0);ac=dn[0];t=dn[1];ag=dn[2];m=m.substring((1+dm>>0));}}if(!(t==="")){return[new BG.ptr(new $Int64(0,0),0,DH.nil),new AB.ptr(r,s,al,m,": "+t+" out of range")];}if(!($interfaceIsEqual(ag,$ifaceNil))){return[new BG.ptr(new $Int64(0,0),0,DH.nil),new AB.ptr(r,s,al,m,"")];}}if(v&&z<12){z=z+(12)>>0;}else if(u&&(z===12)){z=0;}if(!(ad===DH.nil)){return[BY(w,(x>>0),y,z,aa,ab,ac,ad),$ifaceNil];}if(!((ae===-1))){dp=$clone(BY(w,(x>>0),y,z,aa,ab,ac,$pkg.UTC),BG);dp.sec=(dq=dp.sec,dr=new $Int64(0,ae),new $Int64(dq.$high-dr.$high,dq.$low-dr.$low));ds=o.lookup((dt=dp.sec,new $Int64(dt.$high+-15,dt.$low+2288912640)));du=ds[0];dv=ds[1];if((dv===ae)&&(af===""||du===af)){dp.loc=o;return[dp,$ifaceNil];}dp.loc=CG(af,ae);return[dp,$ifaceNil];}if(!(af==="")){dw=$clone(BY(w,(x>>0),y,z,aa,ab,ac,$pkg.UTC),BG);dx=o.lookupName(af,(dy=dw.sec,new $Int64(dy.$high+-15,dy.$low+2288912640)));dz=dx[0];ea=dx[2];if(ea){dw.sec=(eb=dw.sec,ec=new $Int64(0,dz),new $Int64(eb.$high-ec.$high,eb.$low-ec.$low));dw.loc=o;return[dw,$ifaceNil];}if(af.length>3&&af.substring(0,3)==="GMT"){ed=Y(af.substring(3));dz=ed[0];dz=dz*(3600)>>0;}dw.loc=CG(af,dz);return[dw,$ifaceNil];}return[BY(w,(x>>0),y,z,aa,ab,ac,n),$ifaceNil];};AK=function(l){var aa,ab,ac,ad,ae,af,ag,l,m=0,n=false,o,p,q,r,s,t,u,v,w,x,y,z;if(l.length<3){o=0;p=false;m=o;n=p;return[m,n];}if(l.length>=4&&(l.substring(0,4)==="ChST"||l.substring(0,4)==="MeST")){q=4;r=true;m=q;n=r;return[m,n];}if(l.substring(0,3)==="GMT"){m=AL(l);s=m;t=true;m=s;n=t;return[m,n];}u=0;u=0;while(true){if(!(u<6)){break;}if(u>=l.length){break;}v=l.charCodeAt(u);if(v<65||90>0;}w=u;if(w===0||w===1||w===2||w===6){x=0;y=false;m=x;n=y;return[m,n];}else if(w===5){if(l.charCodeAt(4)===84){z=5;aa=true;m=z;n=aa;return[m,n];}}else if(w===4){if(l.charCodeAt(3)===84){ab=4;ac=true;m=ab;n=ac;return[m,n];}}else if(w===3){ad=3;ae=true;m=ad;n=ae;return[m,n];}af=0;ag=false;m=af;n=ag;return[m,n];};AL=function(l){var l,m,n,o,p,q;l=l.substring(3);if(l.length===0){return 3;}m=l.charCodeAt(0);if(!((m===45))&&!((m===43))){return 3;}n=AO(l.substring(1));o=n[0];p=n[1];q=n[2];if(!($interfaceIsEqual(q,$ifaceNil))){return 3;}if(m===45){o=new $Int64(-o.$high,-o.$low);}if((o.$high===0&&o.$low===0)||(o.$high<-1||(o.$high===-1&&o.$low<4294967282))||(0>0)-p.length>>0;};AM=function(l,m){var l,m,n=0,o="",p=$ifaceNil,q,r,s;if(!((l.charCodeAt(0)===46))){p=AA;return[n,o,p];}q=Y(l.substring(1,m));n=q[0];p=q[1];if(!($interfaceIsEqual(p,$ifaceNil))){return[n,o,p];}if(n<0||1000000000<=n){o="fractional second";return[n,o,p];}r=10-m>>0;s=0;while(true){if(!(s>0;s=s+(1)>>0;}return[n,o,p];};AO=function(l){var l,m=new $Int64(0,0),n="",o=$ifaceNil,p,q,r,s,t,u,v,w,x,y,z;p=0;while(true){if(!(p57){break;}if((m.$high>214748364||(m.$high===214748364&&m.$low>=3435973835))){r=new $Int64(0,0);s="";t=AN;m=r;n=s;o=t;return[m,n,o];}m=(u=(v=$mul64(m,new $Int64(0,10)),w=new $Int64(0,q),new $Int64(v.$high+w.$high,v.$low+w.$low)),new $Int64(u.$high-0,u.$low-48));p=p+(1)>>0;}x=m;y=l.substring(p);z=$ifaceNil;m=x;n=y;o=z;return[m,n,o];};BG.ptr.prototype.After=function(l){var l,m,n,o,p,q;m=$clone(this,BG);l=$clone(l,BG);return(n=m.sec,o=l.sec,(n.$high>o.$high||(n.$high===o.$high&&n.$low>o.$low)))||(p=m.sec,q=l.sec,(p.$high===q.$high&&p.$low===q.$low))&&m.nsec>l.nsec;};BG.prototype.After=function(l){return this.$val.After(l);};BG.ptr.prototype.Before=function(l){var l,m,n,o,p,q;m=$clone(this,BG);l=$clone(l,BG);return(n=m.sec,o=l.sec,(n.$high>0,((m<0||m>=BI.length)?$throwRuntimeError("index out of range"):BI[m]));};$ptrType(BH).prototype.String=function(){return new BH(this.$get()).String();};BJ.prototype.String=function(){var l;l=this.$val;return((l<0||l>=BK.length)?$throwRuntimeError("index out of range"):BK[l]);};$ptrType(BJ).prototype.String=function(){return new BJ(this.$get()).String();};BG.ptr.prototype.IsZero=function(){var l,m;l=$clone(this,BG);return(m=l.sec,(m.$high===0&&m.$low===0))&&(l.nsec===0);};BG.prototype.IsZero=function(){return this.$val.IsZero();};BG.ptr.prototype.abs=function(){var l,m,n,o,p,q,r,s,t,u,v;l=$clone(this,BG);m=l.loc;if(m===DH.nil||m===CE){m=m.get();}o=(n=l.sec,new $Int64(n.$high+-15,n.$low+2288912640));if(!(m===CD)){if(!(m.cacheZone===CZ.nil)&&(p=m.cacheStart,(p.$high>0)/86400,(n===n&&n!==1/0&&n!==-1/0)?n>>0:$throwRuntimeError("integer divide by zero"))>>0);};BG.ptr.prototype.ISOWeek=function(){var l=0,m=0,n,o,p,q,r,s,t,u,v,w,x,y;n=$clone(this,BG);o=n.date(true);l=o[0];p=o[1];q=o[2];r=o[3];t=(s=((n.Weekday()+6>>0)>>0)%7,s===s?s:$throwRuntimeError("integer divide by zero"));m=(u=(((r-t>>0)+7>>0))/7,(u===u&&u!==1/0&&u!==-1/0)?u>>0:$throwRuntimeError("integer divide by zero"));w=(v=(((t-r>>0)+371>>0))%7,v===v?v:$throwRuntimeError("integer divide by zero"));if(1<=w&&w<=3){m=m+(1)>>0;}if(m===0){l=l-(1)>>0;m=52;if((w===4)||((w===5)&&BW(l))){m=m+(1)>>0;}}if((p===12)&&q>=29&&t<3){y=(x=(((t+31>>0)-q>>0))%7,x===x?x:$throwRuntimeError("integer divide by zero"));if(0<=y&&y<=2){l=l+(1)>>0;m=1;}}return[l,m];};BG.prototype.ISOWeek=function(){return this.$val.ISOWeek();};BG.ptr.prototype.Clock=function(){var l=0,m=0,n=0,o,p;o=$clone(this,BG);p=BM(o.abs());l=p[0];m=p[1];n=p[2];return[l,m,n];};BG.prototype.Clock=function(){return this.$val.Clock();};BM=function(l){var l,m=0,n=0,o=0,p,q;o=($div64(l,new $Uint64(0,86400),true).$low>>0);m=(p=o/3600,(p===p&&p!==1/0&&p!==-1/0)?p>>0:$throwRuntimeError("integer divide by zero"));o=o-((m*3600>>0))>>0;n=(q=o/60,(q===q&&q!==1/0&&q!==-1/0)?q>>0:$throwRuntimeError("integer divide by zero"));o=o-((n*60>>0))>>0;return[m,n,o];};BG.ptr.prototype.Hour=function(){var l,m;l=$clone(this,BG);return(m=($div64(l.abs(),new $Uint64(0,86400),true).$low>>0)/3600,(m===m&&m!==1/0&&m!==-1/0)?m>>0:$throwRuntimeError("integer divide by zero"));};BG.prototype.Hour=function(){return this.$val.Hour();};BG.ptr.prototype.Minute=function(){var l,m;l=$clone(this,BG);return(m=($div64(l.abs(),new $Uint64(0,3600),true).$low>>0)/60,(m===m&&m!==1/0&&m!==-1/0)?m>>0:$throwRuntimeError("integer divide by zero"));};BG.prototype.Minute=function(){return this.$val.Minute();};BG.ptr.prototype.Second=function(){var l;l=$clone(this,BG);return($div64(l.abs(),new $Uint64(0,60),true).$low>>0);};BG.prototype.Second=function(){return this.$val.Second();};BG.ptr.prototype.Nanosecond=function(){var l;l=$clone(this,BG);return(l.nsec>>0);};BG.prototype.Nanosecond=function(){return this.$val.Nanosecond();};BG.ptr.prototype.YearDay=function(){var l,m,n;l=$clone(this,BG);m=l.date(false);n=m[3];return n+1>>0;};BG.prototype.YearDay=function(){return this.$val.YearDay();};BN.prototype.String=function(){var l,m,n,o,p,q,r,s;l=this;m=$clone(DD.zero(),DD);n=32;o=new $Uint64(l.$high,l.$low);p=(l.$high<0||(l.$high===0&&l.$low<0));if(p){o=new $Uint64(-o.$high,-o.$low);}if((o.$high<0||(o.$high===0&&o.$low<1000000000))){q=0;n=n-(1)>>0;(n<0||n>=m.length)?$throwRuntimeError("index out of range"):m[n]=115;n=n-(1)>>0;if((o.$high===0&&o.$low===0)){return"0";}else if((o.$high<0||(o.$high===0&&o.$low<1000))){q=0;(n<0||n>=m.length)?$throwRuntimeError("index out of range"):m[n]=110;}else if((o.$high<0||(o.$high===0&&o.$low<1000000))){q=3;n=n-(1)>>0;$copyString($subslice(new DE(m),n),"\xC2\xB5");}else{q=6;(n<0||n>=m.length)?$throwRuntimeError("index out of range"):m[n]=109;}r=BO($subslice(new DE(m),0,n),o,q);n=r[0];o=r[1];n=BP($subslice(new DE(m),0,n),o);}else{n=n-(1)>>0;(n<0||n>=m.length)?$throwRuntimeError("index out of range"):m[n]=115;s=BO($subslice(new DE(m),0,n),o,9);n=s[0];o=s[1];n=BP($subslice(new DE(m),0,n),$div64(o,new $Uint64(0,60),true));o=$div64(o,(new $Uint64(0,60)),false);if((o.$high>0||(o.$high===0&&o.$low>0))){n=n-(1)>>0;(n<0||n>=m.length)?$throwRuntimeError("index out of range"):m[n]=109;n=BP($subslice(new DE(m),0,n),$div64(o,new $Uint64(0,60),true));o=$div64(o,(new $Uint64(0,60)),false);if((o.$high>0||(o.$high===0&&o.$low>0))){n=n-(1)>>0;(n<0||n>=m.length)?$throwRuntimeError("index out of range"):m[n]=104;n=BP($subslice(new DE(m),0,n),o);}}}if(p){n=n-(1)>>0;(n<0||n>=m.length)?$throwRuntimeError("index out of range"):m[n]=45;}return $bytesToString($subslice(new DE(m),n));};$ptrType(BN).prototype.String=function(){return this.$get().String();};BO=function(l,m,n){var l,m,n,o=0,p=new $Uint64(0,0),q,r,s,t,u,v;q=l.$length;r=false;s=0;while(true){if(!(s>0;(q<0||q>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+q]=(t.$low<<24>>>24)+48<<24>>>24;}m=$div64(m,(new $Uint64(0,10)),false);s=s+(1)>>0;}if(r){q=q-(1)>>0;(q<0||q>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+q]=46;}u=q;v=m;o=u;p=v;return[o,p];};BP=function(l,m){var l,m,n;n=l.$length;if((m.$high===0&&m.$low===0)){n=n-(1)>>0;(n<0||n>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+n]=48;}else{while(true){if(!((m.$high>0||(m.$high===0&&m.$low>0)))){break;}n=n-(1)>>0;(n<0||n>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+n]=($div64(m,new $Uint64(0,10),true).$low<<24>>>24)+48<<24>>>24;m=$div64(m,(new $Uint64(0,10)),false);}}return n;};BN.prototype.Nanoseconds=function(){var l;l=this;return new $Int64(l.$high,l.$low);};$ptrType(BN).prototype.Nanoseconds=function(){return this.$get().Nanoseconds();};BN.prototype.Seconds=function(){var l,m,n;l=this;m=$div64(l,new BN(0,1000000000),false);n=$div64(l,new BN(0,1000000000),true);return $flatten64(m)+$flatten64(n)*1e-09;};$ptrType(BN).prototype.Seconds=function(){return this.$get().Seconds();};BN.prototype.Minutes=function(){var l,m,n;l=this;m=$div64(l,new BN(13,4165425152),false);n=$div64(l,new BN(13,4165425152),true);return $flatten64(m)+$flatten64(n)*1.6666666666666667e-11;};$ptrType(BN).prototype.Minutes=function(){return this.$get().Minutes();};BN.prototype.Hours=function(){var l,m,n;l=this;m=$div64(l,new BN(838,817405952),false);n=$div64(l,new BN(838,817405952),true);return $flatten64(m)+$flatten64(n)*2.777777777777778e-13;};$ptrType(BN).prototype.Hours=function(){return this.$get().Hours();};BG.ptr.prototype.Add=function(l){var l,m,n,o,p,q,r,s,t,u,v;m=$clone(this,BG);m.sec=(n=m.sec,o=(p=$div64(l,new BN(0,1000000000),false),new $Int64(p.$high,p.$low)),new $Int64(n.$high+o.$high,n.$low+o.$low));r=m.nsec+((q=$div64(l,new BN(0,1000000000),true),q.$low+((q.$high>>31)*4294967296))>>0)>>0;if(r>=1000000000){m.sec=(s=m.sec,t=new $Int64(0,1),new $Int64(s.$high+t.$high,s.$low+t.$low));r=r-(1000000000)>>0;}else if(r<0){m.sec=(u=m.sec,v=new $Int64(0,1),new $Int64(u.$high-v.$high,u.$low-v.$low));r=r+(1000000000)>>0;}m.nsec=r;return m;};BG.prototype.Add=function(l){return this.$val.Add(l);};BG.ptr.prototype.Sub=function(l){var l,m,n,o,p,q,r,s;m=$clone(this,BG);l=$clone(l,BG);s=(n=$mul64((o=(p=m.sec,q=l.sec,new $Int64(p.$high-q.$high,p.$low-q.$low)),new BN(o.$high,o.$low)),new BN(0,1000000000)),r=new BN(0,(m.nsec-l.nsec>>0)),new BN(n.$high+r.$high,n.$low+r.$low));if(l.Add(s).Equal(m)){return s;}else if(m.Before(l)){return new BN(-2147483648,0);}else{return new BN(2147483647,4294967295);}};BG.prototype.Sub=function(l){return this.$val.Sub(l);};BG.ptr.prototype.AddDate=function(l,m,n){var l,m,n,o,p,q,r,s,t,u,v,w;o=$clone(this,BG);p=o.Date();q=p[0];r=p[1];s=p[2];t=o.Clock();u=t[0];v=t[1];w=t[2];return BY(q+l>>0,r+(m>>0)>>0,s+n>>0,u,v,w,(o.nsec>>0),o.loc);};BG.prototype.AddDate=function(l,m,n){return this.$val.AddDate(l,m,n);};BG.ptr.prototype.date=function(l){var l,m=0,n=0,o=0,p=0,q,r;q=$clone(this,BG);r=BR(q.abs(),l);m=r[0];n=r[1];o=r[2];p=r[3];return[m,n,o,p];};BG.prototype.date=function(l){return this.$val.date(l);};BR=function(l,m){var aa,ab,ac,ad,ae,af,ag,ah,ai,l,m,n=0,o=0,p=0,q=0,r,s,t,u,v,w,x,y,z;r=$div64(l,new $Uint64(0,86400),false);s=$div64(r,new $Uint64(0,146097),false);t=$mul64(new $Uint64(0,400),s);r=(u=$mul64(new $Uint64(0,146097),s),new $Uint64(r.$high-u.$high,r.$low-u.$low));s=$div64(r,new $Uint64(0,36524),false);s=(v=$shiftRightUint64(s,2),new $Uint64(s.$high-v.$high,s.$low-v.$low));t=(w=$mul64(new $Uint64(0,100),s),new $Uint64(t.$high+w.$high,t.$low+w.$low));r=(x=$mul64(new $Uint64(0,36524),s),new $Uint64(r.$high-x.$high,r.$low-x.$low));s=$div64(r,new $Uint64(0,1461),false);t=(y=$mul64(new $Uint64(0,4),s),new $Uint64(t.$high+y.$high,t.$low+y.$low));r=(z=$mul64(new $Uint64(0,1461),s),new $Uint64(r.$high-z.$high,r.$low-z.$low));s=$div64(r,new $Uint64(0,365),false);s=(aa=$shiftRightUint64(s,2),new $Uint64(s.$high-aa.$high,s.$low-aa.$low));t=(ab=s,new $Uint64(t.$high+ab.$high,t.$low+ab.$low));r=(ac=$mul64(new $Uint64(0,365),s),new $Uint64(r.$high-ac.$high,r.$low-ac.$low));n=((ad=(ae=new $Int64(t.$high,t.$low),new $Int64(ae.$high+-69,ae.$low+4075721025)),ad.$low+((ad.$high>>31)*4294967296))>>0);q=(r.$low>>0);if(!m){return[n,o,p,q];}p=q;if(BW(n)){if(p>59){p=p-(1)>>0;}else if(p===59){o=2;p=29;return[n,o,p,q];}}o=((af=p/31,(af===af&&af!==1/0&&af!==-1/0)?af>>0:$throwRuntimeError("integer divide by zero"))>>0);ah=((ag=o+1>>0,((ag<0||ag>=BS.length)?$throwRuntimeError("index out of range"):BS[ag]))>>0);ai=0;if(p>=ah){o=o+(1)>>0;ai=ah;}else{ai=(((o<0||o>=BS.length)?$throwRuntimeError("index out of range"):BS[o])>>0);}o=o+(1)>>0;p=(p-ai>>0)+1>>0;return[n,o,p,q];};BG.ptr.prototype.UTC=function(){var l;l=$clone(this,BG);l.loc=$pkg.UTC;return l;};BG.prototype.UTC=function(){return this.$val.UTC();};BG.ptr.prototype.Local=function(){var l;l=$clone(this,BG);l.loc=$pkg.Local;return l;};BG.prototype.Local=function(){return this.$val.Local();};BG.ptr.prototype.In=function(l){var l,m;m=$clone(this,BG);if(l===DH.nil){$panic(new $String("time: missing Location in call to Time.In"));}m.loc=l;return m;};BG.prototype.In=function(l){return this.$val.In(l);};BG.ptr.prototype.Location=function(){var l,m;l=$clone(this,BG);m=l.loc;if(m===DH.nil){m=$pkg.UTC;}return m;};BG.prototype.Location=function(){return this.$val.Location();};BG.ptr.prototype.Zone=function(){var l="",m=0,n,o,p;n=$clone(this,BG);o=n.loc.lookup((p=n.sec,new $Int64(p.$high+-15,p.$low+2288912640)));l=o[0];m=o[1];return[l,m];};BG.prototype.Zone=function(){return this.$val.Zone();};BG.ptr.prototype.Unix=function(){var l,m;l=$clone(this,BG);return(m=l.sec,new $Int64(m.$high+-15,m.$low+2288912640));};BG.prototype.Unix=function(){return this.$val.Unix();};BG.ptr.prototype.UnixNano=function(){var l,m,n,o;l=$clone(this,BG);return(m=$mul64(((n=l.sec,new $Int64(n.$high+-15,n.$low+2288912640))),new $Int64(0,1000000000)),o=new $Int64(0,l.nsec),new $Int64(m.$high+o.$high,m.$low+o.$low));};BG.prototype.UnixNano=function(){return this.$val.UnixNano();};BG.ptr.prototype.MarshalBinary=function(){var l,m,n,o,p,q,r;l=$clone(this,BG);m=0;if(l.Location()===CD){m=-1;}else{n=l.Zone();o=n[1];if(!(((p=o%60,p===p?p:$throwRuntimeError("integer divide by zero"))===0))){return[DE.nil,C.New("Time.MarshalBinary: zone offset has fractional minute")];}o=(q=o/(60),(q===q&&q!==1/0&&q!==-1/0)?q>>0:$throwRuntimeError("integer divide by zero"));if(o<-32768||(o===-1)||o>32767){return[DE.nil,C.New("Time.MarshalBinary: unexpected zone offset")];}m=(o<<16>>16);}r=new DE([1,($shiftRightInt64(l.sec,56).$low<<24>>>24),($shiftRightInt64(l.sec,48).$low<<24>>>24),($shiftRightInt64(l.sec,40).$low<<24>>>24),($shiftRightInt64(l.sec,32).$low<<24>>>24),($shiftRightInt64(l.sec,24).$low<<24>>>24),($shiftRightInt64(l.sec,16).$low<<24>>>24),($shiftRightInt64(l.sec,8).$low<<24>>>24),(l.sec.$low<<24>>>24),((l.nsec>>24>>0)<<24>>>24),((l.nsec>>16>>0)<<24>>>24),((l.nsec>>8>>0)<<24>>>24),(l.nsec<<24>>>24),((m>>8<<16>>16)<<24>>>24),(m<<24>>>24)]);return[r,$ifaceNil];};BG.prototype.MarshalBinary=function(){return this.$val.MarshalBinary();};BG.ptr.prototype.UnmarshalBinary=function(l){var aa,ab,ac,ad,ae,af,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;m=this;n=l;if(n.$length===0){return C.New("Time.UnmarshalBinary: no data");}if(!((((0<0||0>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+0])===1))){return C.New("Time.UnmarshalBinary: unsupported version");}if(!((n.$length===15))){return C.New("Time.UnmarshalBinary: invalid length");}n=$subslice(n,1);m.sec=(o=(p=(q=(r=(s=(t=(u=new $Int64(0,((7<0||7>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+7])),v=$shiftLeft64(new $Int64(0,((6<0||6>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+6])),8),new $Int64(u.$high|v.$high,(u.$low|v.$low)>>>0)),w=$shiftLeft64(new $Int64(0,((5<0||5>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+5])),16),new $Int64(t.$high|w.$high,(t.$low|w.$low)>>>0)),x=$shiftLeft64(new $Int64(0,((4<0||4>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+4])),24),new $Int64(s.$high|x.$high,(s.$low|x.$low)>>>0)),y=$shiftLeft64(new $Int64(0,((3<0||3>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+3])),32),new $Int64(r.$high|y.$high,(r.$low|y.$low)>>>0)),z=$shiftLeft64(new $Int64(0,((2<0||2>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+2])),40),new $Int64(q.$high|z.$high,(q.$low|z.$low)>>>0)),aa=$shiftLeft64(new $Int64(0,((1<0||1>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+1])),48),new $Int64(p.$high|aa.$high,(p.$low|aa.$low)>>>0)),ab=$shiftLeft64(new $Int64(0,((0<0||0>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+0])),56),new $Int64(o.$high|ab.$high,(o.$low|ab.$low)>>>0));n=$subslice(n,8);m.nsec=(((((3<0||3>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+3])>>0)|((((2<0||2>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+2])>>0)<<8>>0))|((((1<0||1>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+1])>>0)<<16>>0))|((((0<0||0>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+0])>>0)<<24>>0);n=$subslice(n,4);ac=(((((1<0||1>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+1])<<16>>16)|((((0<0||0>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+0])<<16>>16)<<8<<16>>16))>>0)*60>>0;if(ac===-60){m.loc=CD;}else{ad=$pkg.Local.lookup((ae=m.sec,new $Int64(ae.$high+-15,ae.$low+2288912640)));af=ad[1];if(ac===af){m.loc=$pkg.Local;}else{m.loc=CG("",ac);}}return $ifaceNil;};BG.prototype.UnmarshalBinary=function(l){return this.$val.UnmarshalBinary(l);};BG.ptr.prototype.GobEncode=function(){var l;l=$clone(this,BG);return l.MarshalBinary();};BG.prototype.GobEncode=function(){return this.$val.GobEncode();};BG.ptr.prototype.GobDecode=function(l){var l,m;m=this;return m.UnmarshalBinary(l);};BG.prototype.GobDecode=function(l){return this.$val.GobDecode(l);};BG.ptr.prototype.MarshalJSON=function(){var l,m;l=$clone(this,BG);m=l.Year();if(m<0||m>=10000){return[DE.nil,C.New("Time.MarshalJSON: year outside of range [0,9999]")];}return[new DE($stringToBytes(l.Format("\"2006-01-02T15:04:05.999999999Z07:00\""))),$ifaceNil];};BG.prototype.MarshalJSON=function(){return this.$val.MarshalJSON();};BG.ptr.prototype.UnmarshalJSON=function(l){var l,m=$ifaceNil,n,o;n=this;o=AH("\"2006-01-02T15:04:05Z07:00\"",$bytesToString(l));$copy(n,o[0],BG);m=o[1];return m;};BG.prototype.UnmarshalJSON=function(l){return this.$val.UnmarshalJSON(l);};BG.ptr.prototype.MarshalText=function(){var l,m;l=$clone(this,BG);m=l.Year();if(m<0||m>=10000){return[DE.nil,C.New("Time.MarshalText: year outside of range [0,9999]")];}return[new DE($stringToBytes(l.Format("2006-01-02T15:04:05.999999999Z07:00"))),$ifaceNil];};BG.prototype.MarshalText=function(){return this.$val.MarshalText();};BG.ptr.prototype.UnmarshalText=function(l){var l,m=$ifaceNil,n,o;n=this;o=AH("2006-01-02T15:04:05Z07:00",$bytesToString(l));$copy(n,o[0],BG);m=o[1];return m;};BG.prototype.UnmarshalText=function(l){return this.$val.UnmarshalText(l);};BV=$pkg.Unix=function(l,m){var l,m,n,o,p,q,r;if((m.$high<0||(m.$high===0&&m.$low<0))||(m.$high>0||(m.$high===0&&m.$low>=1000000000))){n=$div64(m,new $Int64(0,1000000000),false);l=(o=n,new $Int64(l.$high+o.$high,l.$low+o.$low));m=(p=$mul64(n,new $Int64(0,1000000000)),new $Int64(m.$high-p.$high,m.$low-p.$low));if((m.$high<0||(m.$high===0&&m.$low<0))){m=(q=new $Int64(0,1000000000),new $Int64(m.$high+q.$high,m.$low+q.$low));l=(r=new $Int64(0,1),new $Int64(l.$high-r.$high,l.$low-r.$low));}}return new BG.ptr(new $Int64(l.$high+14,l.$low+2006054656),((m.$low+((m.$high>>31)*4294967296))>>0),$pkg.Local);};BW=function(l){var l,m,n,o;return((m=l%4,m===m?m:$throwRuntimeError("integer divide by zero"))===0)&&(!(((n=l%100,n===n?n:$throwRuntimeError("integer divide by zero"))===0))||((o=l%400,o===o?o:$throwRuntimeError("integer divide by zero"))===0));};BX=function(l,m,n){var l,m,n,o=0,p=0,q,r,s,t,u,v;if(m<0){r=(q=((-m-1>>0))/n,(q===q&&q!==1/0&&q!==-1/0)?q>>0:$throwRuntimeError("integer divide by zero"))+1>>0;l=l-(r)>>0;m=m+((r*n>>0))>>0;}if(m>=n){t=(s=m/n,(s===s&&s!==1/0&&s!==-1/0)?s>>0:$throwRuntimeError("integer divide by zero"));l=l+(t)>>0;m=m-((t*n>>0))>>0;}u=l;v=m;o=u;p=v;return[o,p];};BY=$pkg.Date=function(l,m,n,o,p,q,r,s){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;if(s===DH.nil){$panic(new $String("time: missing Location in call to Date"));}t=(m>>0)-1>>0;u=BX(l,t,12);l=u[0];t=u[1];m=(t>>0)+1>>0;v=BX(q,r,1000000000);q=v[0];r=v[1];w=BX(p,q,60);p=w[0];q=w[1];x=BX(o,p,60);o=x[0];p=x[1];y=BX(n,o,24);n=y[0];o=y[1];ab=(z=(aa=new $Int64(0,l),new $Int64(aa.$high- -69,aa.$low-4075721025)),new $Uint64(z.$high,z.$low));ac=$div64(ab,new $Uint64(0,400),false);ab=(ad=$mul64(new $Uint64(0,400),ac),new $Uint64(ab.$high-ad.$high,ab.$low-ad.$low));ae=$mul64(new $Uint64(0,146097),ac);ac=$div64(ab,new $Uint64(0,100),false);ab=(af=$mul64(new $Uint64(0,100),ac),new $Uint64(ab.$high-af.$high,ab.$low-af.$low));ae=(ag=$mul64(new $Uint64(0,36524),ac),new $Uint64(ae.$high+ag.$high,ae.$low+ag.$low));ac=$div64(ab,new $Uint64(0,4),false);ab=(ah=$mul64(new $Uint64(0,4),ac),new $Uint64(ab.$high-ah.$high,ab.$low-ah.$low));ae=(ai=$mul64(new $Uint64(0,1461),ac),new $Uint64(ae.$high+ai.$high,ae.$low+ai.$low));ac=ab;ae=(aj=$mul64(new $Uint64(0,365),ac),new $Uint64(ae.$high+aj.$high,ae.$low+aj.$low));ae=(ak=new $Uint64(0,(al=m-1>>0,((al<0||al>=BS.length)?$throwRuntimeError("index out of range"):BS[al]))),new $Uint64(ae.$high+ak.$high,ae.$low+ak.$low));if(BW(l)&&m>=3){ae=(am=new $Uint64(0,1),new $Uint64(ae.$high+am.$high,ae.$low+am.$low));}ae=(an=new $Uint64(0,(n-1>>0)),new $Uint64(ae.$high+an.$high,ae.$low+an.$low));ao=$mul64(ae,new $Uint64(0,86400));ao=(ap=new $Uint64(0,(((o*3600>>0)+(p*60>>0)>>0)+q>>0)),new $Uint64(ao.$high+ap.$high,ao.$low+ap.$low));ar=(aq=new $Int64(ao.$high,ao.$low),new $Int64(aq.$high+-2147483647,aq.$low+3844486912));as=s.lookup(ar);at=as[1];au=as[3];av=as[4];if(!((at===0))){ax=(aw=new $Int64(0,at),new $Int64(ar.$high-aw.$high,ar.$low-aw.$low));if((ax.$highav.$high||(ax.$high===av.$high&&ax.$low>=av.$low))){az=s.lookup(av);at=az[1];}ar=(ba=new $Int64(0,at),new $Int64(ar.$high-ba.$high,ar.$low-ba.$low));}return new BG.ptr(new $Int64(ar.$high+14,ar.$low+2006054656),(r>>0),s);};BG.ptr.prototype.Truncate=function(l){var l,m,n,o;m=$clone(this,BG);if((l.$high<0||(l.$high===0&&l.$low<=0))){return m;}n=BZ(m,l);o=n[1];return m.Add(new BN(-o.$high,-o.$low));};BG.prototype.Truncate=function(l){return this.$val.Truncate(l);};BG.ptr.prototype.Round=function(l){var l,m,n,o,p;m=$clone(this,BG);if((l.$high<0||(l.$high===0&&l.$low<=0))){return m;}n=BZ(m,l);o=n[1];if((p=new BN(o.$high+o.$high,o.$low+o.$low),(p.$high>0;l.sec=(t=l.sec,u=new $Int64(0,1),new $Int64(t.$high-u.$high,t.$low-u.$low));}}if((m.$high<0||(m.$high===0&&m.$low<1000000000))&&(v=$div64(new BN(0,1000000000),(new BN(m.$high+m.$high,m.$low+m.$low)),true),(v.$high===0&&v.$low===0))){n=((x=q/((m.$low+((m.$high>>31)*4294967296))>>0),(x===x&&x!==1/0&&x!==-1/0)?x>>0:$throwRuntimeError("integer divide by zero"))>>0)&1;o=new BN(0,(y=q%((m.$low+((m.$high>>31)*4294967296))>>0),y===y?y:$throwRuntimeError("integer divide by zero")));}else if((w=$div64(m,new BN(0,1000000000),true),(w.$high===0&&w.$low===0))){aa=(z=$div64(m,new BN(0,1000000000),false),new $Int64(z.$high,z.$low));n=((ab=$div64(l.sec,aa,false),ab.$low+((ab.$high>>31)*4294967296))>>0)&1;o=(ac=$mul64((ad=$div64(l.sec,aa,true),new BN(ad.$high,ad.$low)),new BN(0,1000000000)),ae=new BN(0,q),new BN(ac.$high+ae.$high,ac.$low+ae.$low));}else{ag=(af=l.sec,new $Uint64(af.$high,af.$low));ah=$mul64(($shiftRightUint64(ag,32)),new $Uint64(0,1000000000));ai=$shiftRightUint64(ah,32);aj=$shiftLeft64(ah,32);ah=$mul64(new $Uint64(ag.$high&0,(ag.$low&4294967295)>>>0),new $Uint64(0,1000000000));ak=aj;al=new $Uint64(aj.$high+ah.$high,aj.$low+ah.$low);am=ak;aj=al;if((aj.$highas.$high||(ai.$high===as.$high&&ai.$low>as.$low))||(ai.$high===as.$high&&ai.$low===as.$low)&&(aj.$high>au.$high||(aj.$high===au.$high&&aj.$low>=au.$low))){n=1;av=aj;aw=new $Uint64(aj.$high-au.$high,aj.$low-au.$low);am=av;aj=aw;if((aj.$high>am.$high||(aj.$high===am.$high&&aj.$low>am.$low))){ai=(ax=new $Uint64(0,1),new $Uint64(ai.$high-ax.$high,ai.$low-ax.$low));}ai=(ay=as,new $Uint64(ai.$high-ay.$high,ai.$low-ay.$low));}if((as.$high===0&&as.$low===0)&&(az=new $Uint64(m.$high,m.$low),(au.$high===az.$high&&au.$low===az.$low))){break;}au=$shiftRightUint64(au,(1));au=(ba=$shiftLeft64((new $Uint64(as.$high&0,(as.$low&1)>>>0)),63),new $Uint64(au.$high|ba.$high,(au.$low|ba.$low)>>>0));as=$shiftRightUint64(as,(1));}o=new BN(aj.$high,aj.$low);}if(p&&!((o.$high===0&&o.$low===0))){n=(n^(1))>>0;o=new BN(m.$high-o.$high,m.$low-o.$low);}return[n,o];};CA.ptr.prototype.get=function(){var l;l=this;if(l===DH.nil){return CD;}if(l===CE){CF.Do(H);}return l;};CA.prototype.get=function(){return this.$val.get();};CA.ptr.prototype.String=function(){var l;l=this;return l.get().name;};CA.prototype.String=function(){return this.$val.String();};CG=$pkg.FixedZone=function(l,m){var l,m,n,o;n=new CA.ptr(l,new CX([new CB.ptr(l,m,false)]),new CY([new CC.ptr(new $Int64(-2147483648,0),0,false,false)]),new $Int64(-2147483648,0),new $Int64(2147483647,4294967295),CZ.nil);n.cacheZone=(o=n.zone,((0<0||0>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+0]));return n;};CA.ptr.prototype.lookup=function(l){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,l,m="",n=0,o=false,p=new $Int64(0,0),q=new $Int64(0,0),r,s,t,u,v,w,x,y,z;r=this;r=r.get();if(r.zone.$length===0){m="UTC";n=0;o=false;p=new $Int64(-2147483648,0);q=new $Int64(2147483647,4294967295);return[m,n,o,p,q];}s=r.cacheZone;if(!(s===CZ.nil)&&(t=r.cacheStart,(t.$high=w.$length)?$throwRuntimeError("index out of range"):w.$array[w.$offset+0])).when,(l.$high=x.$length)?$throwRuntimeError("index out of range"):x.$array[x.$offset+y]));m=z.name;n=z.offset;o=z.isDST;p=new $Int64(-2147483648,0);if(r.tx.$length>0){q=(aa=r.tx,((0<0||0>=aa.$length)?$throwRuntimeError("index out of range"):aa.$array[aa.$offset+0])).when;}else{q=new $Int64(2147483647,4294967295);}return[m,n,o,p,q];}ab=r.tx;q=new $Int64(2147483647,4294967295);ac=0;ad=ab.$length;while(true){if(!((ad-ac>>0)>1)){break;}af=ac+(ae=((ad-ac>>0))/2,(ae===ae&&ae!==1/0&&ae!==-1/0)?ae>>0:$throwRuntimeError("integer divide by zero"))>>0;ag=((af<0||af>=ab.$length)?$throwRuntimeError("index out of range"):ab.$array[ab.$offset+af]).when;if((l.$high=ab.$length)?$throwRuntimeError("index out of range"):ab.$array[ab.$offset+ac]).index,((ai<0||ai>=ah.$length)?$throwRuntimeError("index out of range"):ah.$array[ah.$offset+ai]));m=aj.name;n=aj.offset;o=aj.isDST;p=((ac<0||ac>=ab.$length)?$throwRuntimeError("index out of range"):ab.$array[ab.$offset+ac]).when;return[m,n,o,p,q];};CA.prototype.lookup=function(l){return this.$val.lookup(l);};CA.ptr.prototype.lookupFirstZone=function(){var l,m,n,o,p,q,r,s,t,u,v;l=this;if(!l.firstZoneUsed()){return 0;}if(l.tx.$length>0&&(m=l.zone,n=(o=l.tx,((0<0||0>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+0])).index,((n<0||n>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+n])).isDST){q=((p=l.tx,((0<0||0>=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+0])).index>>0)-1>>0;while(true){if(!(q>=0)){break;}if(!(r=l.zone,((q<0||q>=r.$length)?$throwRuntimeError("index out of range"):r.$array[r.$offset+q])).isDST){return q;}q=q-(1)>>0;}}s=l.zone;t=0;while(true){if(!(t=v.$length)?$throwRuntimeError("index out of range"):v.$array[v.$offset+u])).isDST){return u;}t++;}return 0;};CA.prototype.lookupFirstZone=function(){return this.$val.lookupFirstZone();};CA.ptr.prototype.firstZoneUsed=function(){var l,m,n,o;l=this;m=l.tx;n=0;while(true){if(!(n=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+n]),CC);if(o.index===0){return true;}n++;}return false;};CA.prototype.firstZoneUsed=function(){return this.$val.firstZoneUsed();};CA.ptr.prototype.lookupName=function(l,m){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,l,m,n=0,o=false,p=false,q,r,s,t,u,v,w,x,y,z;q=this;q=q.get();r=q.zone;s=0;while(true){if(!(s=u.$length)?$throwRuntimeError("index out of range"):u.$array[u.$offset+t]));if(v.name===l){w=q.lookup((x=new $Int64(0,v.offset),new $Int64(m.$high-x.$high,m.$low-x.$low)));y=w[0];z=w[1];aa=w[2];if(y===v.name){ab=z;ac=aa;ad=true;n=ab;o=ac;p=ad;return[n,o,p];}}s++;}ae=q.zone;af=0;while(true){if(!(af=ah.$length)?$throwRuntimeError("index out of range"):ah.$array[ah.$offset+ag]));if(ai.name===l){aj=ai.offset;ak=ai.isDST;al=true;n=aj;o=ak;p=al;return[n,o,p];}af++;}return[n,o,p];};CA.prototype.lookupName=function(l,m){return this.$val.lookupName(l,m);};DN.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];BG.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Format",name:"Format",pkg:"",typ:$funcType([$String],[$String],false)},{prop:"After",name:"After",pkg:"",typ:$funcType([BG],[$Bool],false)},{prop:"Before",name:"Before",pkg:"",typ:$funcType([BG],[$Bool],false)},{prop:"Equal",name:"Equal",pkg:"",typ:$funcType([BG],[$Bool],false)},{prop:"IsZero",name:"IsZero",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"abs",name:"abs",pkg:"time",typ:$funcType([],[$Uint64],false)},{prop:"locabs",name:"locabs",pkg:"time",typ:$funcType([],[$String,$Int,$Uint64],false)},{prop:"Date",name:"Date",pkg:"",typ:$funcType([],[$Int,BH,$Int],false)},{prop:"Year",name:"Year",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Month",name:"Month",pkg:"",typ:$funcType([],[BH],false)},{prop:"Day",name:"Day",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Weekday",name:"Weekday",pkg:"",typ:$funcType([],[BJ],false)},{prop:"ISOWeek",name:"ISOWeek",pkg:"",typ:$funcType([],[$Int,$Int],false)},{prop:"Clock",name:"Clock",pkg:"",typ:$funcType([],[$Int,$Int,$Int],false)},{prop:"Hour",name:"Hour",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Minute",name:"Minute",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Second",name:"Second",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Nanosecond",name:"Nanosecond",pkg:"",typ:$funcType([],[$Int],false)},{prop:"YearDay",name:"YearDay",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Add",name:"Add",pkg:"",typ:$funcType([BN],[BG],false)},{prop:"Sub",name:"Sub",pkg:"",typ:$funcType([BG],[BN],false)},{prop:"AddDate",name:"AddDate",pkg:"",typ:$funcType([$Int,$Int,$Int],[BG],false)},{prop:"date",name:"date",pkg:"time",typ:$funcType([$Bool],[$Int,BH,$Int,$Int],false)},{prop:"UTC",name:"UTC",pkg:"",typ:$funcType([],[BG],false)},{prop:"Local",name:"Local",pkg:"",typ:$funcType([],[BG],false)},{prop:"In",name:"In",pkg:"",typ:$funcType([DH],[BG],false)},{prop:"Location",name:"Location",pkg:"",typ:$funcType([],[DH],false)},{prop:"Zone",name:"Zone",pkg:"",typ:$funcType([],[$String,$Int],false)},{prop:"Unix",name:"Unix",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"UnixNano",name:"UnixNano",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"MarshalBinary",name:"MarshalBinary",pkg:"",typ:$funcType([],[DE,$error],false)},{prop:"GobEncode",name:"GobEncode",pkg:"",typ:$funcType([],[DE,$error],false)},{prop:"MarshalJSON",name:"MarshalJSON",pkg:"",typ:$funcType([],[DE,$error],false)},{prop:"MarshalText",name:"MarshalText",pkg:"",typ:$funcType([],[DE,$error],false)},{prop:"Truncate",name:"Truncate",pkg:"",typ:$funcType([BN],[BG],false)},{prop:"Round",name:"Round",pkg:"",typ:$funcType([BN],[BG],false)}];DQ.methods=[{prop:"UnmarshalBinary",name:"UnmarshalBinary",pkg:"",typ:$funcType([DE],[$error],false)},{prop:"GobDecode",name:"GobDecode",pkg:"",typ:$funcType([DE],[$error],false)},{prop:"UnmarshalJSON",name:"UnmarshalJSON",pkg:"",typ:$funcType([DE],[$error],false)},{prop:"UnmarshalText",name:"UnmarshalText",pkg:"",typ:$funcType([DE],[$error],false)}];BH.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];BJ.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];BN.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Nanoseconds",name:"Nanoseconds",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Seconds",name:"Seconds",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Minutes",name:"Minutes",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Hours",name:"Hours",pkg:"",typ:$funcType([],[$Float64],false)}];DH.methods=[{prop:"get",name:"get",pkg:"time",typ:$funcType([],[DH],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"lookup",name:"lookup",pkg:"time",typ:$funcType([$Int64],[$String,$Int,$Bool,$Int64,$Int64],false)},{prop:"lookupFirstZone",name:"lookupFirstZone",pkg:"time",typ:$funcType([],[$Int],false)},{prop:"firstZoneUsed",name:"firstZoneUsed",pkg:"time",typ:$funcType([],[$Bool],false)},{prop:"lookupName",name:"lookupName",pkg:"time",typ:$funcType([$String,$Int64],[$Int,$Bool,$Bool],false)}];AB.init([{prop:"Layout",name:"Layout",pkg:"",typ:$String,tag:""},{prop:"Value",name:"Value",pkg:"",typ:$String,tag:""},{prop:"LayoutElem",name:"LayoutElem",pkg:"",typ:$String,tag:""},{prop:"ValueElem",name:"ValueElem",pkg:"",typ:$String,tag:""},{prop:"Message",name:"Message",pkg:"",typ:$String,tag:""}]);BG.init([{prop:"sec",name:"sec",pkg:"time",typ:$Int64,tag:""},{prop:"nsec",name:"nsec",pkg:"time",typ:$Int32,tag:""},{prop:"loc",name:"loc",pkg:"time",typ:DH,tag:""}]);CA.init([{prop:"name",name:"name",pkg:"time",typ:$String,tag:""},{prop:"zone",name:"zone",pkg:"time",typ:CX,tag:""},{prop:"tx",name:"tx",pkg:"time",typ:CY,tag:""},{prop:"cacheStart",name:"cacheStart",pkg:"time",typ:$Int64,tag:""},{prop:"cacheEnd",name:"cacheEnd",pkg:"time",typ:$Int64,tag:""},{prop:"cacheZone",name:"cacheZone",pkg:"time",typ:CZ,tag:""}]);CB.init([{prop:"name",name:"name",pkg:"time",typ:$String,tag:""},{prop:"offset",name:"offset",pkg:"time",typ:$Int,tag:""},{prop:"isDST",name:"isDST",pkg:"time",typ:$Bool,tag:""}]);CC.init([{prop:"when",name:"when",pkg:"time",typ:$Int64,tag:""},{prop:"index",name:"index",pkg:"time",typ:$Uint8,tag:""},{prop:"isstd",name:"isstd",pkg:"time",typ:$Bool,tag:""},{prop:"isutc",name:"isutc",pkg:"time",typ:$Bool,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_time=function(){while(true){switch($s){case 0:$r=C.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=F.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=6;case 6:if($r&&$r.$blocking){$r=$r();}CE=new CA.ptr();CF=new E.Once.ptr();N=$toNativeArray($kindInt,[260,265,524,526,528,274]);Q=new CW(["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]);R=new CW(["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]);S=new CW(["---","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]);T=new CW(["---","January","February","March","April","May","June","July","August","September","October","November","December"]);X=C.New("time: invalid number");AA=C.New("bad value for field");AN=C.New("time: bad [0-9]*");BI=$toNativeArray($kindString,["January","February","March","April","May","June","July","August","September","October","November","December"]);BK=$toNativeArray($kindString,["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]);BS=$toNativeArray($kindInt32,[0,31,59,90,120,151,181,212,243,273,304,334,365]);CD=new CA.ptr("UTC",CX.nil,CY.nil,new $Int64(0,0),new $Int64(0,0),CZ.nil);$pkg.UTC=CD;$pkg.Local=CE;k=D.Getenv("ZONEINFO",$BLOCKING);$s=7;case 7:if(k&&k.$blocking){k=k();}j=k;CH=j[0];CL=C.New("malformed time zone information");CS=new CW(["/usr/share/zoneinfo/","/usr/share/lib/zoneinfo/","/usr/lib/locale/TZ/",F.GOROOT()+"/lib/time/zoneinfo.zip"]);}return;}};$init_time.$blocking=true;return $init_time;};return $pkg;})(); +$packages["os"]=(function(){var $pkg={},E,A,B,F,H,G,C,D,X,Y,AR,BH,BI,BK,CT,CU,CW,CY,CZ,DA,DC,DD,DE,DF,DL,DR,DS,DT,DX,DY,AP,AW,BW,CQ,I,J,Z,AB,AE,AY,AZ,BC,BJ,BL,BO,BR,BY,BZ,CE,CM,CN,CR;E=$packages["errors"];A=$packages["github.com/gopherjs/gopherjs/js"];B=$packages["io"];F=$packages["runtime"];H=$packages["sync"];G=$packages["sync/atomic"];C=$packages["syscall"];D=$packages["time"];X=$pkg.PathError=$newType(0,$kindStruct,"os.PathError","PathError","os",function(Op_,Path_,Err_){this.$val=this;this.Op=Op_!==undefined?Op_:"";this.Path=Path_!==undefined?Path_:"";this.Err=Err_!==undefined?Err_:$ifaceNil;});Y=$pkg.SyscallError=$newType(0,$kindStruct,"os.SyscallError","SyscallError","os",function(Syscall_,Err_){this.$val=this;this.Syscall=Syscall_!==undefined?Syscall_:"";this.Err=Err_!==undefined?Err_:$ifaceNil;});AR=$pkg.LinkError=$newType(0,$kindStruct,"os.LinkError","LinkError","os",function(Op_,Old_,New_,Err_){this.$val=this;this.Op=Op_!==undefined?Op_:"";this.Old=Old_!==undefined?Old_:"";this.New=New_!==undefined?New_:"";this.Err=Err_!==undefined?Err_:$ifaceNil;});BH=$pkg.File=$newType(0,$kindStruct,"os.File","File","os",function(file_){this.$val=this;this.file=file_!==undefined?file_:DR.nil;});BI=$pkg.file=$newType(0,$kindStruct,"os.file","file","os",function(fd_,name_,dirinfo_,nepipe_){this.$val=this;this.fd=fd_!==undefined?fd_:0;this.name=name_!==undefined?name_:"";this.dirinfo=dirinfo_!==undefined?dirinfo_:CZ.nil;this.nepipe=nepipe_!==undefined?nepipe_:0;});BK=$pkg.dirInfo=$newType(0,$kindStruct,"os.dirInfo","dirInfo","os",function(buf_,nbuf_,bufp_){this.$val=this;this.buf=buf_!==undefined?buf_:DA.nil;this.nbuf=nbuf_!==undefined?nbuf_:0;this.bufp=bufp_!==undefined?bufp_:0;});CT=$pkg.FileInfo=$newType(8,$kindInterface,"os.FileInfo","FileInfo","os",null);CU=$pkg.FileMode=$newType(4,$kindUint32,"os.FileMode","FileMode","os",null);CW=$pkg.fileStat=$newType(0,$kindStruct,"os.fileStat","fileStat","os",function(name_,size_,mode_,modTime_,sys_){this.$val=this;this.name=name_!==undefined?name_:"";this.size=size_!==undefined?size_:new $Int64(0,0);this.mode=mode_!==undefined?mode_:0;this.modTime=modTime_!==undefined?modTime_:new D.Time.ptr();this.sys=sys_!==undefined?sys_:$ifaceNil;});CY=$sliceType($String);CZ=$ptrType(BK);DA=$sliceType($Uint8);DC=$sliceType(CT);DD=$ptrType(BH);DE=$ptrType(X);DF=$ptrType(AR);DL=$arrayType($Uint8,32);DR=$ptrType(BI);DS=$funcType([DR],[$error],false);DT=$ptrType($Int32);DX=$ptrType(CW);DY=$ptrType(Y);I=function(){return $pkg.Args;};J=function(){var b,c,d;b=$global.process;if(!(b===undefined)){c=b.argv;$pkg.Args=$makeSlice(CY,($parseInt(c.length)-1>>0));d=0;while(true){if(!(d<($parseInt(c.length)-1>>0))){break;}(d<0||d>=$pkg.Args.$length)?$throwRuntimeError("index out of range"):$pkg.Args.$array[$pkg.Args.$offset+d]=$internalize(c[(d+1>>0)],$String);d=d+(1)>>0;}}if($pkg.Args.$length===0){$pkg.Args=new CY(["?"]);}};BH.ptr.prototype.readdirnames=function(b){var b,c=CY.nil,d=$ifaceNil,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;e=this;if(e.file.dirinfo===CZ.nil){e.file.dirinfo=new BK.ptr();e.file.dirinfo.buf=$makeSlice(DA,4096);}f=e.file.dirinfo;g=b;if(g<=0){g=100;b=-1;}c=$makeSlice(CY,0,g);while(true){if(!(!((b===0)))){break;}if(f.bufp>=f.nbuf){f.bufp=0;h=$ifaceNil;j=C.ReadDirent(e.file.fd,f.buf);i=AY(j[0],j[1]);f.nbuf=i[0];h=i[1];if(!($interfaceIsEqual(h,$ifaceNil))){k=c;l=Z("readdirent",h);c=k;d=l;return[c,d];}if(f.nbuf<=0){break;}}m=0;n=0;o=m;p=n;q=C.ParseDirent($subslice(f.buf,f.bufp,f.nbuf),b,c);o=q[0];p=q[1];c=q[2];f.bufp=f.bufp+(o)>>0;b=b-(p)>>0;}if(b>=0&&(c.$length===0)){r=c;s=B.EOF;c=r;d=s;return[c,d];}t=c;u=$ifaceNil;c=t;d=u;return[c,d];};BH.prototype.readdirnames=function(b){return this.$val.readdirnames(b);};BH.ptr.prototype.Readdir=function(b){var b,c=DC.nil,d=$ifaceNil,e,f,g,h;e=this;if(e===DD.nil){f=DC.nil;g=$pkg.ErrInvalid;c=f;d=g;return[c,d];}h=e.readdir(b);c=h[0];d=h[1];return[c,d];};BH.prototype.Readdir=function(b){return this.$val.Readdir(b);};BH.ptr.prototype.Readdirnames=function(b){var b,c=CY.nil,d=$ifaceNil,e,f,g,h;e=this;if(e===DD.nil){f=CY.nil;g=$pkg.ErrInvalid;c=f;d=g;return[c,d];}h=e.readdirnames(b);c=h[0];d=h[1];return[c,d];};BH.prototype.Readdirnames=function(b){return this.$val.Readdirnames(b);};X.ptr.prototype.Error=function(){var b;b=this;return b.Op+" "+b.Path+": "+b.Err.Error();};X.prototype.Error=function(){return this.$val.Error();};Y.ptr.prototype.Error=function(){var b;b=this;return b.Syscall+": "+b.Err.Error();};Y.prototype.Error=function(){return this.$val.Error();};Z=$pkg.NewSyscallError=function(b,c){var b,c;if($interfaceIsEqual(c,$ifaceNil)){return $ifaceNil;}return new Y.ptr(b,c);};AB=$pkg.IsNotExist=function(b){var b;return AE(b);};AE=function(b){var b,c,d;d=b;if(d===$ifaceNil){c=d;return false;}else if($assertType(d,DE,true)[1]){c=d.$val;b=c.Err;}else if($assertType(d,DF,true)[1]){c=d.$val;b=c.Err;}return $interfaceIsEqual(b,new C.Errno(2))||$interfaceIsEqual(b,$pkg.ErrNotExist);};BH.ptr.prototype.Name=function(){var b;b=this;return b.file.name;};BH.prototype.Name=function(){return this.$val.Name();};AR.ptr.prototype.Error=function(){var b;b=this;return b.Op+" "+b.Old+" "+b.New+": "+b.Err.Error();};AR.prototype.Error=function(){return this.$val.Error();};BH.ptr.prototype.Read=function(b){var b,c=0,d=$ifaceNil,e,f,g,h,i,j,k,l,m;e=this;if(e===DD.nil){f=0;g=$pkg.ErrInvalid;c=f;d=g;return[c,d];}h=e.read(b);c=h[0];i=h[1];if(c<0){c=0;}if((c===0)&&b.$length>0&&$interfaceIsEqual(i,$ifaceNil)){j=0;k=B.EOF;c=j;d=k;return[c,d];}if(!($interfaceIsEqual(i,$ifaceNil))){d=new X.ptr("read",e.file.name,i);}l=c;m=d;c=l;d=m;return[c,d];};BH.prototype.Read=function(b){return this.$val.Read(b);};BH.ptr.prototype.ReadAt=function(b,c){var b,c,d=0,e=$ifaceNil,f,g,h,i,j,k,l,m,n;f=this;if(f===DD.nil){g=0;h=$pkg.ErrInvalid;d=g;e=h;return[d,e];}while(true){if(!(b.$length>0)){break;}i=f.pread(b,c);j=i[0];k=i[1];if((j===0)&&$interfaceIsEqual(k,$ifaceNil)){l=d;m=B.EOF;d=l;e=m;return[d,e];}if(!($interfaceIsEqual(k,$ifaceNil))){e=new X.ptr("read",f.file.name,k);break;}d=d+(j)>>0;b=$subslice(b,j);c=(n=new $Int64(0,j),new $Int64(c.$high+n.$high,c.$low+n.$low));}return[d,e];};BH.prototype.ReadAt=function(b,c){return this.$val.ReadAt(b,c);};BH.ptr.prototype.Write=function(b){var b,c=0,d=$ifaceNil,e,f,g,h,i,j,k;e=this;if(e===DD.nil){f=0;g=$pkg.ErrInvalid;c=f;d=g;return[c,d];}h=e.write(b);c=h[0];i=h[1];if(c<0){c=0;}if(!((c===b.$length))){d=B.ErrShortWrite;}BL(e,i);if(!($interfaceIsEqual(i,$ifaceNil))){d=new X.ptr("write",e.file.name,i);}j=c;k=d;c=j;d=k;return[c,d];};BH.prototype.Write=function(b){return this.$val.Write(b);};BH.ptr.prototype.WriteAt=function(b,c){var b,c,d=0,e=$ifaceNil,f,g,h,i,j,k,l;f=this;if(f===DD.nil){g=0;h=$pkg.ErrInvalid;d=g;e=h;return[d,e];}while(true){if(!(b.$length>0)){break;}i=f.pwrite(b,c);j=i[0];k=i[1];if(!($interfaceIsEqual(k,$ifaceNil))){e=new X.ptr("write",f.file.name,k);break;}d=d+(j)>>0;b=$subslice(b,j);c=(l=new $Int64(0,j),new $Int64(c.$high+l.$high,c.$low+l.$low));}return[d,e];};BH.prototype.WriteAt=function(b,c){return this.$val.WriteAt(b,c);};BH.ptr.prototype.Seek=function(b,c){var b,c,d=new $Int64(0,0),e=$ifaceNil,f,g,h,i,j,k,l,m,n,o;f=this;if(f===DD.nil){g=new $Int64(0,0);h=$pkg.ErrInvalid;d=g;e=h;return[d,e];}i=f.seek(b,c);j=i[0];k=i[1];if($interfaceIsEqual(k,$ifaceNil)&&!(f.file.dirinfo===CZ.nil)&&!((j.$high===0&&j.$low===0))){k=new C.Errno(21);}if(!($interfaceIsEqual(k,$ifaceNil))){l=new $Int64(0,0);m=new X.ptr("seek",f.file.name,k);d=l;e=m;return[d,e];}n=j;o=$ifaceNil;d=n;e=o;return[d,e];};BH.prototype.Seek=function(b,c){return this.$val.Seek(b,c);};BH.ptr.prototype.WriteString=function(b){var b,c=0,d=$ifaceNil,e,f,g,h;e=this;if(e===DD.nil){f=0;g=$pkg.ErrInvalid;c=f;d=g;return[c,d];}h=e.Write(new DA($stringToBytes(b)));c=h[0];d=h[1];return[c,d];};BH.prototype.WriteString=function(b){return this.$val.WriteString(b);};BH.ptr.prototype.Chdir=function(){var b,c;b=this;if(b===DD.nil){return $pkg.ErrInvalid;}c=C.Fchdir(b.file.fd);if(!($interfaceIsEqual(c,$ifaceNil))){return new X.ptr("chdir",b.file.name,c);}return $ifaceNil;};BH.prototype.Chdir=function(){return this.$val.Chdir();};AY=function(b,c){var b,c;if(b<0){b=0;}return[b,c];};AZ=function(){$panic("Native function not implemented: os.sigpipe");};BC=function(b){var b,c=0;c=(c|((new CU(b).Perm()>>>0)))>>>0;if(!((((b&8388608)>>>0)===0))){c=(c|(2048))>>>0;}if(!((((b&4194304)>>>0)===0))){c=(c|(1024))>>>0;}if(!((((b&1048576)>>>0)===0))){c=(c|(512))>>>0;}return c;};BH.ptr.prototype.Chmod=function(b){var b,c,d;c=this;if(c===DD.nil){return $pkg.ErrInvalid;}d=C.Fchmod(c.file.fd,BC(b));if(!($interfaceIsEqual(d,$ifaceNil))){return new X.ptr("chmod",c.file.name,d);}return $ifaceNil;};BH.prototype.Chmod=function(b){return this.$val.Chmod(b);};BH.ptr.prototype.Chown=function(b,c){var b,c,d,e;d=this;if(d===DD.nil){return $pkg.ErrInvalid;}e=C.Fchown(d.file.fd,b,c);if(!($interfaceIsEqual(e,$ifaceNil))){return new X.ptr("chown",d.file.name,e);}return $ifaceNil;};BH.prototype.Chown=function(b,c){return this.$val.Chown(b,c);};BH.ptr.prototype.Truncate=function(b){var b,c,d;c=this;if(c===DD.nil){return $pkg.ErrInvalid;}d=C.Ftruncate(c.file.fd,b);if(!($interfaceIsEqual(d,$ifaceNil))){return new X.ptr("truncate",c.file.name,d);}return $ifaceNil;};BH.prototype.Truncate=function(b){return this.$val.Truncate(b);};BH.ptr.prototype.Sync=function(){var b=$ifaceNil,c,d;c=this;if(c===DD.nil){b=$pkg.ErrInvalid;return b;}d=C.Fsync(c.file.fd);if(!($interfaceIsEqual(d,$ifaceNil))){b=Z("fsync",d);return b;}b=$ifaceNil;return b;};BH.prototype.Sync=function(){return this.$val.Sync();};BH.ptr.prototype.Fd=function(){var b;b=this;if(b===DD.nil){return 4294967295;}return(b.file.fd>>>0);};BH.prototype.Fd=function(){return this.$val.Fd();};BJ=$pkg.NewFile=function(b,c){var b,c,d,e;d=(b>>0);if(d<0){return DD.nil;}e=new BH.ptr(new BI.ptr(d,c,CZ.nil,0));F.SetFinalizer(e.file,new DS($methodExpr(DR.prototype.close)));return e;};BL=function(b,c){var b,c;if($interfaceIsEqual(c,new C.Errno(32))){if(G.AddInt32(new DT(function(){return this.$target.file.nepipe;},function($v){this.$target.file.nepipe=$v;},b),1)>=10){AZ();}}else{G.StoreInt32(new DT(function(){return this.$target.file.nepipe;},function($v){this.$target.file.nepipe=$v;},b),0);}};BH.ptr.prototype.Close=function(){var b;b=this;if(b===DD.nil){return $pkg.ErrInvalid;}return b.file.close();};BH.prototype.Close=function(){return this.$val.Close();};BI.ptr.prototype.close=function(){var b,c,d;b=this;if(b===DR.nil||b.fd<0){return new C.Errno(22);}c=$ifaceNil;d=C.Close(b.fd);if(!($interfaceIsEqual(d,$ifaceNil))){c=new X.ptr("close",b.name,d);}b.fd=-1;F.SetFinalizer(b,$ifaceNil);return c;};BI.prototype.close=function(){return this.$val.close();};BH.ptr.prototype.Stat=function(){var b=$ifaceNil,c=$ifaceNil,d,e,f,g,h,i,j,k;d=this;if(d===DD.nil){e=$ifaceNil;f=$pkg.ErrInvalid;b=e;c=f;return[b,c];}g=$clone(new C.Stat_t.ptr(),C.Stat_t);c=C.Fstat(d.file.fd,g);if(!($interfaceIsEqual(c,$ifaceNil))){h=$ifaceNil;i=new X.ptr("stat",d.file.name,c);b=h;c=i;return[b,c];}j=CM(g,d.file.name);k=$ifaceNil;b=j;c=k;return[b,c];};BH.prototype.Stat=function(){return this.$val.Stat();};BO=$pkg.Lstat=function(b){var b,c=$ifaceNil,d=$ifaceNil,e,f,g,h,i;e=$clone(new C.Stat_t.ptr(),C.Stat_t);d=C.Lstat(b,e);if(!($interfaceIsEqual(d,$ifaceNil))){f=$ifaceNil;g=new X.ptr("lstat",b,d);c=f;d=g;return[c,d];}h=CM(e,b);i=$ifaceNil;c=h;d=i;return[c,d];};BH.ptr.prototype.readdir=function(b){var b,c=DC.nil,d=$ifaceNil,e,f,g,h,i,j,k,l,m,n,o,p,q,r;e=this;f=e.file.name;if(f===""){f=".";}g=e.Readdirnames(b);h=g[0];d=g[1];c=$makeSlice(DC,0,h.$length);i=h;j=0;while(true){if(!(j=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]);l=AW(f+"/"+k);m=l[0];n=l[1];if(AB(n)){j++;continue;}if(!($interfaceIsEqual(n,$ifaceNil))){o=c;p=n;c=o;d=p;return[c,d];}c=$append(c,m);j++;}q=c;r=d;c=q;d=r;return[c,d];};BH.prototype.readdir=function(b){return this.$val.readdir(b);};BH.ptr.prototype.read=function(b){var b,c=0,d=$ifaceNil,e,f,g;e=this;if(true&&b.$length>1073741824){b=$subslice(b,0,1073741824);}g=C.Read(e.file.fd,b);f=AY(g[0],g[1]);c=f[0];d=f[1];return[c,d];};BH.prototype.read=function(b){return this.$val.read(b);};BH.ptr.prototype.pread=function(b,c){var b,c,d=0,e=$ifaceNil,f,g,h;f=this;if(true&&b.$length>1073741824){b=$subslice(b,0,1073741824);}h=C.Pread(f.file.fd,b,c);g=AY(h[0],h[1]);d=g[0];e=g[1];return[d,e];};BH.prototype.pread=function(b,c){return this.$val.pread(b,c);};BH.ptr.prototype.write=function(b){var b,c=0,d=$ifaceNil,e,f,g,h,i,j,k,l;e=this;while(true){if(!(true)){break;}f=b;if(true&&f.$length>1073741824){f=$subslice(f,0,1073741824);}h=C.Write(e.file.fd,f);g=AY(h[0],h[1]);i=g[0];j=g[1];c=c+(i)>>0;if(01073741824){b=$subslice(b,0,1073741824);}h=C.Pwrite(f.file.fd,b,c);g=AY(h[0],h[1]);d=g[0];e=g[1];return[d,e];};BH.prototype.pwrite=function(b,c){return this.$val.pwrite(b,c);};BH.ptr.prototype.seek=function(b,c){var b,c,d=new $Int64(0,0),e=$ifaceNil,f,g;f=this;g=C.Seek(f.file.fd,b,c);d=g[0];e=g[1];return[d,e];};BH.prototype.seek=function(b,c){return this.$val.seek(b,c);};BR=function(b){var b,c;c=b.length-1>>0;while(true){if(!(c>0&&(b.charCodeAt(c)===47))){break;}b=b.substring(0,c);c=c-(1)>>0;}c=c-(1)>>0;while(true){if(!(c>=0)){break;}if(b.charCodeAt(c)===47){b=b.substring((c+1>>0));break;}c=c-(1)>>0;}return b;};BY=function(){BW=BZ;};BZ=function(b){var b;return!($interfaceIsEqual(b,new C.Errno(45)));};CE=function(){$pkg.Args=I();};CM=function(b,c){var b,c,d,e;d=new CW.ptr(BR(c),b.Size,0,$clone(CN(b.Mtimespec),D.Time),b);d.mode=(((b.Mode&511)>>>0)>>>0);e=(b.Mode&61440)>>>0;if(e===24576||e===57344){d.mode=(d.mode|(67108864))>>>0;}else if(e===8192){d.mode=(d.mode|(69206016))>>>0;}else if(e===16384){d.mode=(d.mode|(2147483648))>>>0;}else if(e===4096){d.mode=(d.mode|(33554432))>>>0;}else if(e===40960){d.mode=(d.mode|(134217728))>>>0;}else if(e===32768){}else if(e===49152){d.mode=(d.mode|(16777216))>>>0;}if(!((((b.Mode&1024)>>>0)===0))){d.mode=(d.mode|(4194304))>>>0;}if(!((((b.Mode&2048)>>>0)===0))){d.mode=(d.mode|(8388608))>>>0;}if(!((((b.Mode&512)>>>0)===0))){d.mode=(d.mode|(1048576))>>>0;}return d;};CN=function(b){var b;b=$clone(b,C.Timespec);return D.Unix(b.Sec,b.Nsec);};CR=function(){var b,c,d,e,f,g,h;b=C.Sysctl("kern.osrelease");c=b[0];d=b[1];if(!($interfaceIsEqual(d,$ifaceNil))){return;}e=0;f=c;g=0;while(true){if(!(g2||(e===2)&&c.charCodeAt(0)>=49&&c.charCodeAt(1)>=49){CQ=true;}};CU.prototype.String=function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;b=this.$val;c=$clone(DL.zero(),DL);d=0;e="dalTLDpSugct";f=0;while(true){if(!(f>0)>>>0),j<32?(1<>>0)))>>>0)===0))){(d<0||d>=c.length)?$throwRuntimeError("index out of range"):c[d]=(i<<24>>>24);d=d+(1)>>0;}f+=g[1];}if(d===0){(d<0||d>=c.length)?$throwRuntimeError("index out of range"):c[d]=45;d=d+(1)>>0;}k="rwxrwxrwx";l=0;while(true){if(!(l>0)>>>0),p<32?(1<>>0)))>>>0)===0))){(d<0||d>=c.length)?$throwRuntimeError("index out of range"):c[d]=(o<<24>>>24);}else{(d<0||d>=c.length)?$throwRuntimeError("index out of range"):c[d]=45;}d=d+(1)>>0;l+=m[1];}return $bytesToString($subslice(new DA(c),0,d));};$ptrType(CU).prototype.String=function(){return new CU(this.$get()).String();};CU.prototype.IsDir=function(){var b;b=this.$val;return!((((b&2147483648)>>>0)===0));};$ptrType(CU).prototype.IsDir=function(){return new CU(this.$get()).IsDir();};CU.prototype.IsRegular=function(){var b;b=this.$val;return((b&2399141888)>>>0)===0;};$ptrType(CU).prototype.IsRegular=function(){return new CU(this.$get()).IsRegular();};CU.prototype.Perm=function(){var b;b=this.$val;return(b&511)>>>0;};$ptrType(CU).prototype.Perm=function(){return new CU(this.$get()).Perm();};CW.ptr.prototype.Name=function(){var b;b=this;return b.name;};CW.prototype.Name=function(){return this.$val.Name();};CW.ptr.prototype.IsDir=function(){var b;b=this;return new CU(b.Mode()).IsDir();};CW.prototype.IsDir=function(){return this.$val.IsDir();};CW.ptr.prototype.Size=function(){var b;b=this;return b.size;};CW.prototype.Size=function(){return this.$val.Size();};CW.ptr.prototype.Mode=function(){var b;b=this;return b.mode;};CW.prototype.Mode=function(){return this.$val.Mode();};CW.ptr.prototype.ModTime=function(){var b;b=this;return b.modTime;};CW.prototype.ModTime=function(){return this.$val.ModTime();};CW.ptr.prototype.Sys=function(){var b;b=this;return b.sys;};CW.prototype.Sys=function(){return this.$val.Sys();};DE.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];DY.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];DF.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];DD.methods=[{prop:"readdirnames",name:"readdirnames",pkg:"os",typ:$funcType([$Int],[CY,$error],false)},{prop:"Readdir",name:"Readdir",pkg:"",typ:$funcType([$Int],[DC,$error],false)},{prop:"Readdirnames",name:"Readdirnames",pkg:"",typ:$funcType([$Int],[CY,$error],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"Read",name:"Read",pkg:"",typ:$funcType([DA],[$Int,$error],false)},{prop:"ReadAt",name:"ReadAt",pkg:"",typ:$funcType([DA,$Int64],[$Int,$error],false)},{prop:"Write",name:"Write",pkg:"",typ:$funcType([DA],[$Int,$error],false)},{prop:"WriteAt",name:"WriteAt",pkg:"",typ:$funcType([DA,$Int64],[$Int,$error],false)},{prop:"Seek",name:"Seek",pkg:"",typ:$funcType([$Int64,$Int],[$Int64,$error],false)},{prop:"WriteString",name:"WriteString",pkg:"",typ:$funcType([$String],[$Int,$error],false)},{prop:"Chdir",name:"Chdir",pkg:"",typ:$funcType([],[$error],false)},{prop:"Chmod",name:"Chmod",pkg:"",typ:$funcType([CU],[$error],false)},{prop:"Chown",name:"Chown",pkg:"",typ:$funcType([$Int,$Int],[$error],false)},{prop:"Truncate",name:"Truncate",pkg:"",typ:$funcType([$Int64],[$error],false)},{prop:"Sync",name:"Sync",pkg:"",typ:$funcType([],[$error],false)},{prop:"Fd",name:"Fd",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"Close",name:"Close",pkg:"",typ:$funcType([],[$error],false)},{prop:"Stat",name:"Stat",pkg:"",typ:$funcType([],[CT,$error],false)},{prop:"readdir",name:"readdir",pkg:"os",typ:$funcType([$Int],[DC,$error],false)},{prop:"read",name:"read",pkg:"os",typ:$funcType([DA],[$Int,$error],false)},{prop:"pread",name:"pread",pkg:"os",typ:$funcType([DA,$Int64],[$Int,$error],false)},{prop:"write",name:"write",pkg:"os",typ:$funcType([DA],[$Int,$error],false)},{prop:"pwrite",name:"pwrite",pkg:"os",typ:$funcType([DA,$Int64],[$Int,$error],false)},{prop:"seek",name:"seek",pkg:"os",typ:$funcType([$Int64,$Int],[$Int64,$error],false)}];DR.methods=[{prop:"close",name:"close",pkg:"os",typ:$funcType([],[$error],false)}];CU.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"IsDir",name:"IsDir",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"IsRegular",name:"IsRegular",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Perm",name:"Perm",pkg:"",typ:$funcType([],[CU],false)}];DX.methods=[{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"IsDir",name:"IsDir",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Size",name:"Size",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Mode",name:"Mode",pkg:"",typ:$funcType([],[CU],false)},{prop:"ModTime",name:"ModTime",pkg:"",typ:$funcType([],[D.Time],false)},{prop:"Sys",name:"Sys",pkg:"",typ:$funcType([],[$emptyInterface],false)}];X.init([{prop:"Op",name:"Op",pkg:"",typ:$String,tag:""},{prop:"Path",name:"Path",pkg:"",typ:$String,tag:""},{prop:"Err",name:"Err",pkg:"",typ:$error,tag:""}]);Y.init([{prop:"Syscall",name:"Syscall",pkg:"",typ:$String,tag:""},{prop:"Err",name:"Err",pkg:"",typ:$error,tag:""}]);AR.init([{prop:"Op",name:"Op",pkg:"",typ:$String,tag:""},{prop:"Old",name:"Old",pkg:"",typ:$String,tag:""},{prop:"New",name:"New",pkg:"",typ:$String,tag:""},{prop:"Err",name:"Err",pkg:"",typ:$error,tag:""}]);BH.init([{prop:"file",name:"",pkg:"os",typ:DR,tag:""}]);BI.init([{prop:"fd",name:"fd",pkg:"os",typ:$Int,tag:""},{prop:"name",name:"name",pkg:"os",typ:$String,tag:""},{prop:"dirinfo",name:"dirinfo",pkg:"os",typ:CZ,tag:""},{prop:"nepipe",name:"nepipe",pkg:"os",typ:$Int32,tag:""}]);BK.init([{prop:"buf",name:"buf",pkg:"os",typ:DA,tag:""},{prop:"nbuf",name:"nbuf",pkg:"os",typ:$Int,tag:""},{prop:"bufp",name:"bufp",pkg:"os",typ:$Int,tag:""}]);CT.init([{prop:"IsDir",name:"IsDir",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"ModTime",name:"ModTime",pkg:"",typ:$funcType([],[D.Time],false)},{prop:"Mode",name:"Mode",pkg:"",typ:$funcType([],[CU],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"Size",name:"Size",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Sys",name:"Sys",pkg:"",typ:$funcType([],[$emptyInterface],false)}]);CW.init([{prop:"name",name:"name",pkg:"os",typ:$String,tag:""},{prop:"size",name:"size",pkg:"os",typ:$Int64,tag:""},{prop:"mode",name:"mode",pkg:"os",typ:CU,tag:""},{prop:"modTime",name:"modTime",pkg:"os",typ:D.Time,tag:""},{prop:"sys",name:"sys",pkg:"os",typ:$emptyInterface,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_os=function(){while(true){switch($s){case 0:$r=E.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=F.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=H.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}$r=G.$init($BLOCKING);$s=6;case 6:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=7;case 7:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=8;case 8:if($r&&$r.$blocking){$r=$r();}$pkg.Args=CY.nil;CQ=false;$pkg.ErrInvalid=E.New("invalid argument");$pkg.ErrPermission=E.New("permission denied");$pkg.ErrExist=E.New("file already exists");$pkg.ErrNotExist=E.New("file does not exist");AP=E.New("os: process already finished");$pkg.Stdin=BJ((C.Stdin>>>0),"/dev/stdin");$pkg.Stdout=BJ((C.Stdout>>>0),"/dev/stdout");$pkg.Stderr=BJ((C.Stderr>>>0),"/dev/stderr");BW=(function(b){var b;return true;});AW=BO;J();BY();CE();CR();}return;}};$init_os.$blocking=true;return $init_os;};return $pkg;})(); +$packages["strconv"]=(function(){var $pkg={},B,A,C,Z,AD,AI,AP,AY,CI,CJ,CK,CL,CN,CO,CP,CQ,CR,CS,CT,CU,CV,CW,CX,G,AE,AJ,AK,AL,AQ,AR,BD,BE,BF,BG,BM,AA,AB,AC,AF,AG,AH,AM,AN,AO,AT,AU,AV,AW,AX,AZ,BA,BB,BC,BI,BJ,BN,BO,BP,BR,BT,BU,BV,BW,BX,BY,BZ,CA,CB,CC,CD,CE;B=$packages["errors"];A=$packages["math"];C=$packages["unicode/utf8"];Z=$pkg.decimal=$newType(0,$kindStruct,"strconv.decimal","decimal","strconv",function(d_,nd_,dp_,neg_,trunc_){this.$val=this;this.d=d_!==undefined?d_:CU.zero();this.nd=nd_!==undefined?nd_:0;this.dp=dp_!==undefined?dp_:0;this.neg=neg_!==undefined?neg_:false;this.trunc=trunc_!==undefined?trunc_:false;});AD=$pkg.leftCheat=$newType(0,$kindStruct,"strconv.leftCheat","leftCheat","strconv",function(delta_,cutoff_){this.$val=this;this.delta=delta_!==undefined?delta_:0;this.cutoff=cutoff_!==undefined?cutoff_:"";});AI=$pkg.extFloat=$newType(0,$kindStruct,"strconv.extFloat","extFloat","strconv",function(mant_,exp_,neg_){this.$val=this;this.mant=mant_!==undefined?mant_:new $Uint64(0,0);this.exp=exp_!==undefined?exp_:0;this.neg=neg_!==undefined?neg_:false;});AP=$pkg.floatInfo=$newType(0,$kindStruct,"strconv.floatInfo","floatInfo","strconv",function(mantbits_,expbits_,bias_){this.$val=this;this.mantbits=mantbits_!==undefined?mantbits_:0;this.expbits=expbits_!==undefined?expbits_:0;this.bias=bias_!==undefined?bias_:0;});AY=$pkg.decimalSlice=$newType(0,$kindStruct,"strconv.decimalSlice","decimalSlice","strconv",function(d_,nd_,dp_,neg_){this.$val=this;this.d=d_!==undefined?d_:CL.nil;this.nd=nd_!==undefined?nd_:0;this.dp=dp_!==undefined?dp_:0;this.neg=neg_!==undefined?neg_:false;});CI=$sliceType(AD);CJ=$sliceType($Uint16);CK=$sliceType($Uint32);CL=$sliceType($Uint8);CN=$arrayType($Uint8,24);CO=$arrayType($Uint8,32);CP=$ptrType(AP);CQ=$arrayType($Uint8,3);CR=$arrayType($Uint8,50);CS=$arrayType($Uint8,65);CT=$arrayType($Uint8,4);CU=$arrayType($Uint8,800);CV=$ptrType(Z);CW=$ptrType(AY);CX=$ptrType(AI);Z.ptr.prototype.String=function(){var a,b,c,d;a=this;b=10+a.nd>>0;if(a.dp>0){b=b+(a.dp)>>0;}if(a.dp<0){b=b+(-a.dp)>>0;}c=$makeSlice(CL,b);d=0;if(a.nd===0){return"0";}else if(a.dp<=0){(d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]=48;d=d+(1)>>0;(d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]=46;d=d+(1)>>0;d=d+(AA($subslice(c,d,(d+-a.dp>>0))))>>0;d=d+($copySlice($subslice(c,d),$subslice(new CL(a.d),0,a.nd)))>>0;}else if(a.dp>0;(d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]=46;d=d+(1)>>0;d=d+($copySlice($subslice(c,d),$subslice(new CL(a.d),a.dp,a.nd)))>>0;}else{d=d+($copySlice($subslice(c,d),$subslice(new CL(a.d),0,a.nd)))>>0;d=d+(AA($subslice(c,d,((d+a.dp>>0)-a.nd>>0))))>>0;}return $bytesToString($subslice(c,0,d));};Z.prototype.String=function(){return this.$val.String();};AA=function(a){var a,b,c,d;b=a;c=0;while(true){if(!(c=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+d]=48;c++;}return a.$length;};AB=function(a){var a,b,c;while(true){if(!(a.nd>0&&((b=a.d,c=a.nd-1>>0,((c<0||c>=b.length)?$throwRuntimeError("index out of range"):b[c]))===48))){break;}a.nd=a.nd-(1)>>0;}if(a.nd===0){a.dp=0;}};Z.ptr.prototype.Assign=function(a){var a,b,c,d,e,f,g,h;b=this;c=$clone(CN.zero(),CN);d=0;while(true){if(!((a.$high>0||(a.$high===0&&a.$low>0)))){break;}e=$div64(a,new $Uint64(0,10),false);a=(f=$mul64(new $Uint64(0,10),e),new $Uint64(a.$high-f.$high,a.$low-f.$low));(d<0||d>=c.length)?$throwRuntimeError("index out of range"):c[d]=(new $Uint64(a.$high+0,a.$low+48).$low<<24>>>24);d=d+(1)>>0;a=e;}b.nd=0;d=d-(1)>>0;while(true){if(!(d>=0)){break;}(g=b.d,h=b.nd,(h<0||h>=g.length)?$throwRuntimeError("index out of range"):g[h]=((d<0||d>=c.length)?$throwRuntimeError("index out of range"):c[d]));b.nd=b.nd+(1)>>0;d=d-(1)>>0;}b.dp=b.nd;AB(b);};Z.prototype.Assign=function(a){return this.$val.Assign(a);};AC=function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o;c=0;d=0;e=0;while(true){if(!(((e>>$min(b,31))>>0)===0)){break;}if(c>=a.nd){if(e===0){a.nd=0;return;}while(true){if(!(((e>>$min(b,31))>>0)===0)){break;}e=e*10>>0;c=c+(1)>>0;}break;}g=((f=a.d,((c<0||c>=f.length)?$throwRuntimeError("index out of range"):f[c]))>>0);e=((e*10>>0)+g>>0)-48>>0;c=c+(1)>>0;}a.dp=a.dp-((c-1>>0))>>0;while(true){if(!(c=h.length)?$throwRuntimeError("index out of range"):h[c]))>>0);j=(e>>$min(b,31))>>0;e=e-(((k=b,k<32?(j<>0))>>0;(l=a.d,(d<0||d>=l.length)?$throwRuntimeError("index out of range"):l[d]=((j+48>>0)<<24>>>24));d=d+(1)>>0;e=((e*10>>0)+i>>0)-48>>0;c=c+(1)>>0;}while(true){if(!(e>0)){break;}m=(e>>$min(b,31))>>0;e=e-(((n=b,n<32?(m<>0))>>0;if(d<800){(o=a.d,(d<0||d>=o.length)?$throwRuntimeError("index out of range"):o[d]=((m+48>>0)<<24>>>24));d=d+(1)>>0;}else if(m>0){a.trunc=true;}e=e*10>>0;}a.nd=d;AB(a);};AF=function(a,b){var a,b,c;c=0;while(true){if(!(c=a.$length){return true;}if(!((((c<0||c>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+c])===b.charCodeAt(c)))){return((c<0||c>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+c])>0;}return false;};AG=function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;c=((b<0||b>=AE.$length)?$throwRuntimeError("index out of range"):AE.$array[AE.$offset+b]).delta;if(AF($subslice(new CL(a.d),0,a.nd),((b<0||b>=AE.$length)?$throwRuntimeError("index out of range"):AE.$array[AE.$offset+b]).cutoff)){c=c-(1)>>0;}d=a.nd;e=a.nd+c>>0;f=0;d=d-(1)>>0;while(true){if(!(d>=0)){break;}f=f+(((g=b,g<32?(((((h=a.d,((d<0||d>=h.length)?$throwRuntimeError("index out of range"):h[d]))>>0)-48>>0))<>0))>>0;j=(i=f/10,(i===i&&i!==1/0&&i!==-1/0)?i>>0:$throwRuntimeError("integer divide by zero"));k=f-(10*j>>0)>>0;e=e-(1)>>0;if(e<800){(l=a.d,(e<0||e>=l.length)?$throwRuntimeError("index out of range"):l[e]=((k+48>>0)<<24>>>24));}else if(!((k===0))){a.trunc=true;}f=j;d=d-(1)>>0;}while(true){if(!(f>0)){break;}n=(m=f/10,(m===m&&m!==1/0&&m!==-1/0)?m>>0:$throwRuntimeError("integer divide by zero"));o=f-(10*n>>0)>>0;e=e-(1)>>0;if(e<800){(p=a.d,(e<0||e>=p.length)?$throwRuntimeError("index out of range"):p[e]=((o+48>>0)<<24>>>24));}else if(!((o===0))){a.trunc=true;}f=n;}a.nd=a.nd+(c)>>0;if(a.nd>=800){a.nd=800;}a.dp=a.dp+(c)>>0;AB(a);};Z.ptr.prototype.Shift=function(a){var a,b;b=this;if(b.nd===0){}else if(a>0){while(true){if(!(a>27)){break;}AG(b,27);a=a-(27)>>0;}AG(b,(a>>>0));}else if(a<0){while(true){if(!(a<-27)){break;}AC(b,27);a=a+(27)>>0;}AC(b,(-a>>>0));}};Z.prototype.Shift=function(a){return this.$val.Shift(a);};AH=function(a,b){var a,b,c,d,e,f,g;if(b<0||b>=a.nd){return false;}if(((c=a.d,((b<0||b>=c.length)?$throwRuntimeError("index out of range"):c[b]))===53)&&((b+1>>0)===a.nd)){if(a.trunc){return true;}return b>0&&!(((d=(((e=a.d,f=b-1>>0,((f<0||f>=e.length)?$throwRuntimeError("index out of range"):e[f]))-48<<24>>>24))%2,d===d?d:$throwRuntimeError("integer divide by zero"))===0));}return(g=a.d,((b<0||b>=g.length)?$throwRuntimeError("index out of range"):g[b]))>=53;};Z.ptr.prototype.Round=function(a){var a,b;b=this;if(a<0||a>=b.nd){return;}if(AH(b,a)){b.RoundUp(a);}else{b.RoundDown(a);}};Z.prototype.Round=function(a){return this.$val.Round(a);};Z.ptr.prototype.RoundDown=function(a){var a,b;b=this;if(a<0||a>=b.nd){return;}b.nd=a;AB(b);};Z.prototype.RoundDown=function(a){return this.$val.RoundDown(a);};Z.ptr.prototype.RoundUp=function(a){var a,b,c,d,e,f,g;b=this;if(a<0||a>=b.nd){return;}c=a-1>>0;while(true){if(!(c>=0)){break;}e=(d=b.d,((c<0||c>=d.length)?$throwRuntimeError("index out of range"):d[c]));if(e<57){(g=b.d,(c<0||c>=g.length)?$throwRuntimeError("index out of range"):g[c]=(f=b.d,((c<0||c>=f.length)?$throwRuntimeError("index out of range"):f[c]))+(1)<<24>>>24);b.nd=c+1>>0;return;}c=c-(1)>>0;}b.d[0]=49;b.nd=1;b.dp=b.dp+(1)>>0;};Z.prototype.RoundUp=function(a){return this.$val.RoundUp(a);};Z.ptr.prototype.RoundedInteger=function(){var a,b,c,d,e,f,g;a=this;if(a.dp>20){return new $Uint64(4294967295,4294967295);}b=0;c=new $Uint64(0,0);b=0;while(true){if(!(b=f.length)?$throwRuntimeError("index out of range"):f[b]))-48<<24>>>24)),new $Uint64(d.$high+e.$high,d.$low+e.$low));b=b+(1)>>0;}while(true){if(!(b>0;}if(AH(a,a.dp)){c=(g=new $Uint64(0,1),new $Uint64(c.$high+g.$high,c.$low+g.$low));}return c;};Z.prototype.RoundedInteger=function(){return this.$val.RoundedInteger();};AI.ptr.prototype.AssignComputeBounds=function(a,b,c,d){var a,b,c,d,e=new AI.ptr(),f=new AI.ptr(),g,h,i,j,k,l,m,n,o;g=this;g.mant=a;g.exp=b-(d.mantbits>>0)>>0;g.neg=c;if(g.exp<=0&&(h=$shiftLeft64(($shiftRightUint64(a,(-g.exp>>>0))),(-g.exp>>>0)),(a.$high===h.$high&&a.$low===h.$low))){g.mant=$shiftRightUint64(g.mant,((-g.exp>>>0)));g.exp=0;i=$clone(g,AI);j=$clone(g,AI);$copy(e,i,AI);$copy(f,j,AI);return[e,f];}k=b-d.bias>>0;$copy(f,new AI.ptr((l=$mul64(new $Uint64(0,2),g.mant),new $Uint64(l.$high+0,l.$low+1)),g.exp-1>>0,g.neg),AI);if(!((m=$shiftLeft64(new $Uint64(0,1),d.mantbits),(a.$high===m.$high&&a.$low===m.$low)))||(k===1)){$copy(e,new AI.ptr((n=$mul64(new $Uint64(0,2),g.mant),new $Uint64(n.$high-0,n.$low-1)),g.exp-1>>0,g.neg),AI);}else{$copy(e,new AI.ptr((o=$mul64(new $Uint64(0,4),g.mant),new $Uint64(o.$high-0,o.$low-1)),g.exp-2>>0,g.neg),AI);}return[e,f];};AI.prototype.AssignComputeBounds=function(a,b,c,d){return this.$val.AssignComputeBounds(a,b,c,d);};AI.ptr.prototype.Normalize=function(){var a=0,b,c,d,e,f,g,h,i,j,k,l,m,n;b=this;c=b.mant;d=b.exp;e=c;f=d;if((e.$high===0&&e.$low===0)){a=0;return a;}if((g=$shiftRightUint64(e,32),(g.$high===0&&g.$low===0))){e=$shiftLeft64(e,(32));f=f-(32)>>0;}if((h=$shiftRightUint64(e,48),(h.$high===0&&h.$low===0))){e=$shiftLeft64(e,(16));f=f-(16)>>0;}if((i=$shiftRightUint64(e,56),(i.$high===0&&i.$low===0))){e=$shiftLeft64(e,(8));f=f-(8)>>0;}if((j=$shiftRightUint64(e,60),(j.$high===0&&j.$low===0))){e=$shiftLeft64(e,(4));f=f-(4)>>0;}if((k=$shiftRightUint64(e,62),(k.$high===0&&k.$low===0))){e=$shiftLeft64(e,(2));f=f-(2)>>0;}if((l=$shiftRightUint64(e,63),(l.$high===0&&l.$low===0))){e=$shiftLeft64(e,(1));f=f-(1)>>0;}a=((b.exp-f>>0)>>>0);m=e;n=f;b.mant=m;b.exp=n;return a;};AI.prototype.Normalize=function(){return this.$val.Normalize();};AI.ptr.prototype.Multiply=function(a){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x;b=this;a=$clone(a,AI);c=$shiftRightUint64(b.mant,32);d=new $Uint64(0,(b.mant.$low>>>0));e=c;f=d;g=$shiftRightUint64(a.mant,32);h=new $Uint64(0,(a.mant.$low>>>0));i=g;j=h;k=$mul64(e,j);l=$mul64(f,i);b.mant=(m=(n=$mul64(e,i),o=$shiftRightUint64(k,32),new $Uint64(n.$high+o.$high,n.$low+o.$low)),p=$shiftRightUint64(l,32),new $Uint64(m.$high+p.$high,m.$low+p.$low));u=(q=(r=new $Uint64(0,(k.$low>>>0)),s=new $Uint64(0,(l.$low>>>0)),new $Uint64(r.$high+s.$high,r.$low+s.$low)),t=$shiftRightUint64(($mul64(f,j)),32),new $Uint64(q.$high+t.$high,q.$low+t.$low));u=(v=new $Uint64(0,2147483648),new $Uint64(u.$high+v.$high,u.$low+v.$low));b.mant=(w=b.mant,x=($shiftRightUint64(u,32)),new $Uint64(w.$high+x.$high,w.$low+x.$low));b.exp=(b.exp+a.exp>>0)+64>>0;};AI.prototype.Multiply=function(a){return this.$val.Multiply(a);};AI.ptr.prototype.AssignDecimal=function(a,b,c,d,e){var a,aa,ab,ac,ad,ae,b,c,d,e,f=false,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;g=this;h=0;if(d){h=h+(4)>>0;}g.mant=a;g.exp=0;g.neg=c;j=(i=((b- -348>>0))/8,(i===i&&i!==1/0&&i!==-1/0)?i>>0:$throwRuntimeError("integer divide by zero"));if(b<-348||j>=87){f=false;return f;}l=(k=((b- -348>>0))%8,k===k?k:$throwRuntimeError("integer divide by zero"));if(l<19&&(m=(n=19-l>>0,((n<0||n>=AL.length)?$throwRuntimeError("index out of range"):AL[n])),(a.$high=AL.length)?$throwRuntimeError("index out of range"):AL[l])));g.Normalize();}else{g.Normalize();g.Multiply(((l<0||l>=AJ.length)?$throwRuntimeError("index out of range"):AJ[l]));h=h+(4)>>0;}g.Multiply(((j<0||j>=AK.length)?$throwRuntimeError("index out of range"):AK[j]));if(h>0){h=h+(1)>>0;}h=h+(4)>>0;o=g.Normalize();h=(p=(o),p<32?(h<>0;q=e.bias-63>>0;r=0;if(g.exp<=q){r=(((63-e.mantbits>>>0)+1>>>0)+((q-g.exp>>0)>>>0)>>>0);}else{r=(63-e.mantbits>>>0);}s=$shiftLeft64(new $Uint64(0,1),((r-1>>>0)));w=(t=g.mant,u=(v=$shiftLeft64(new $Uint64(0,1),r),new $Uint64(v.$high-0,v.$low-1)),new $Uint64(t.$high&u.$high,(t.$low&u.$low)>>>0));if((x=(y=new $Int64(s.$high,s.$low),z=new $Int64(0,h),new $Int64(y.$high-z.$high,y.$low-z.$low)),aa=new $Int64(w.$high,w.$low),(x.$high>0))*28>>0)/93,(d===d&&d!==1/0&&d!==-1/0)?d>>0:$throwRuntimeError("integer divide by zero"));g=(f=((e- -348>>0))/8,(f===f&&f!==1/0&&f!==-1/0)?f>>0:$throwRuntimeError("integer divide by zero"));Loop:while(true){if(!(true)){break;}h=(c.exp+((g<0||g>=AK.length)?$throwRuntimeError("index out of range"):AK[g]).exp>>0)+64>>0;if(h<-60){g=g+(1)>>0;}else if(h>-32){g=g-(1)>>0;}else{break Loop;}}c.Multiply(((g<0||g>=AK.length)?$throwRuntimeError("index out of range"):AK[g]));i=-((-348+(g*8>>0)>>0));j=g;a=i;b=j;return[a,b];};AI.prototype.frexp10=function(){return this.$val.frexp10();};AM=function(a,b,c){var a,b,c,d=0,e,f;e=c.frexp10();d=e[0];f=e[1];a.Multiply(((f<0||f>=AK.length)?$throwRuntimeError("index out of range"):AK[f]));b.Multiply(((f<0||f>=AK.length)?$throwRuntimeError("index out of range"):AK[f]));return d;};AI.ptr.prototype.FixedDecimal=function(a,b){var a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;c=this;if((d=c.mant,(d.$high===0&&d.$low===0))){a.nd=0;a.dp=0;a.neg=c.neg;return true;}if(b===0){$panic(new $String("strconv: internal error: extFloat.FixedDecimal called with n == 0"));}c.Normalize();e=c.frexp10();f=e[0];g=(-c.exp>>>0);h=($shiftRightUint64(c.mant,g).$low>>>0);k=(i=c.mant,j=$shiftLeft64(new $Uint64(0,h),g),new $Uint64(i.$high-j.$high,i.$low-j.$low));l=new $Uint64(0,1);m=b;n=0;o=new $Uint64(0,1);p=0;q=new $Uint64(0,1);r=p;s=q;while(true){if(!(r<20)){break;}if((t=new $Uint64(0,h),(s.$high>t.$high||(s.$high===t.$high&&s.$low>t.$low)))){n=r;break;}s=$mul64(s,(new $Uint64(0,10)));r=r+(1)>>0;}u=h;if(n>m){o=(v=n-m>>0,((v<0||v>=AL.length)?$throwRuntimeError("index out of range"):AL[v]));h=(w=h/((o.$low>>>0)),(w===w&&w!==1/0&&w!==-1/0)?w>>>0:$throwRuntimeError("integer divide by zero"));u=u-((x=(o.$low>>>0),(((h>>>16<<16)*x>>>0)+(h<<16>>>16)*x)>>>0))>>>0;}else{u=0;}y=$clone(CO.zero(),CO);z=32;aa=h;while(true){if(!(aa>0)){break;}ac=(ab=aa/10,(ab===ab&&ab!==1/0&&ab!==-1/0)?ab>>>0:$throwRuntimeError("integer divide by zero"));aa=aa-(((((10>>>16<<16)*ac>>>0)+(10<<16>>>16)*ac)>>>0))>>>0;z=z-(1)>>0;(z<0||z>=y.length)?$throwRuntimeError("index out of range"):y[z]=((aa+48>>>0)<<24>>>24);aa=ac;}ad=z;while(true){if(!(ad<32)){break;}(ae=a.d,af=ad-z>>0,(af<0||af>=ae.$length)?$throwRuntimeError("index out of range"):ae.$array[ae.$offset+af]=((ad<0||ad>=y.length)?$throwRuntimeError("index out of range"):y[ad]));ad=ad+(1)>>0;}ag=32-z>>0;a.nd=ag;a.dp=n+f>>0;m=m-(ag)>>0;if(m>0){if(!((u===0))||!((o.$high===0&&o.$low===1))){$panic(new $String("strconv: internal error, rest != 0 but needed > 0"));}while(true){if(!(m>0)){break;}k=$mul64(k,(new $Uint64(0,10)));l=$mul64(l,(new $Uint64(0,10)));if((ah=$mul64(new $Uint64(0,2),l),ai=$shiftLeft64(new $Uint64(0,1),g),(ah.$high>ai.$high||(ah.$high===ai.$high&&ah.$low>ai.$low)))){return false;}aj=$shiftRightUint64(k,g);(ak=a.d,(ag<0||ag>=ak.$length)?$throwRuntimeError("index out of range"):ak.$array[ak.$offset+ag]=(new $Uint64(aj.$high+0,aj.$low+48).$low<<24>>>24));k=(al=$shiftLeft64(aj,g),new $Uint64(k.$high-al.$high,k.$low-al.$low));ag=ag+(1)>>0;m=m-(1)>>0;}a.nd=ag;}an=AN(a,(am=$shiftLeft64(new $Uint64(0,u),g),new $Uint64(am.$high|k.$high,(am.$low|k.$low)>>>0)),o,g,l);if(!an){return false;}ao=a.nd-1>>0;while(true){if(!(ao>=0)){break;}if(!(((ap=a.d,((ao<0||ao>=ap.$length)?$throwRuntimeError("index out of range"):ap.$array[ap.$offset+ao]))===48))){a.nd=ao+1>>0;break;}ao=ao-(1)>>0;}return true;};AI.prototype.FixedDecimal=function(a,b){return this.$val.FixedDecimal(a,b);};AN=function(a,b,c,d,e){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;if((f=$shiftLeft64(c,d),(b.$high>f.$high||(b.$high===f.$high&&b.$low>f.$low)))){$panic(new $String("strconv: num > den<h.$high||(g.$high===h.$high&&g.$low>h.$low)))){$panic(new $String("strconv: \xCE\xB5 > (den<l.$high||(k.$high===l.$high&&k.$low>l.$low)))){m=a.nd-1>>0;while(true){if(!(m>=0)){break;}if((n=a.d,((m<0||m>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+m]))===57){a.nd=a.nd-(1)>>0;}else{break;}m=m-(1)>>0;}if(m<0){(o=a.d,(0<0||0>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+0]=49);a.nd=1;a.dp=a.dp+(1)>>0;}else{(q=a.d,(m<0||m>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+m]=(p=a.d,((m<0||m>=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+m]))+(1)<<24>>>24);}return true;}return false;};AI.ptr.prototype.ShortestDecimal=function(a,b,c){var a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b,ba,bb,bc,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;d=this;if((e=d.mant,(e.$high===0&&e.$low===0))){a.nd=0;a.dp=0;a.neg=d.neg;return true;}if((d.exp===0)&&$equal(b,d,AI)&&$equal(b,c,AI)){f=$clone(CN.zero(),CN);g=23;h=d.mant;while(true){if(!((h.$high>0||(h.$high===0&&h.$low>0)))){break;}i=$div64(h,new $Uint64(0,10),false);h=(j=$mul64(new $Uint64(0,10),i),new $Uint64(h.$high-j.$high,h.$low-j.$low));(g<0||g>=f.length)?$throwRuntimeError("index out of range"):f[g]=(new $Uint64(h.$high+0,h.$low+48).$low<<24>>>24);g=g-(1)>>0;h=i;}k=(24-g>>0)-1>>0;l=0;while(true){if(!(l=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+l]=(m=(g+1>>0)+l>>0,((m<0||m>=f.length)?$throwRuntimeError("index out of range"):f[m])));l=l+(1)>>0;}o=k;p=k;a.nd=o;a.dp=p;while(true){if(!(a.nd>0&&((q=a.d,r=a.nd-1>>0,((r<0||r>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+r]))===48))){break;}a.nd=a.nd-(1)>>0;}if(a.nd===0){a.dp=0;}a.neg=d.neg;return true;}c.Normalize();if(d.exp>c.exp){d.mant=$shiftLeft64(d.mant,(((d.exp-c.exp>>0)>>>0)));d.exp=c.exp;}if(b.exp>c.exp){b.mant=$shiftLeft64(b.mant,(((b.exp-c.exp>>0)>>>0)));b.exp=c.exp;}s=AM(b,d,c);c.mant=(t=c.mant,u=new $Uint64(0,1),new $Uint64(t.$high+u.$high,t.$low+u.$low));b.mant=(v=b.mant,w=new $Uint64(0,1),new $Uint64(v.$high-w.$high,v.$low-w.$low));x=(-c.exp>>>0);y=($shiftRightUint64(c.mant,x).$low>>>0);ab=(z=c.mant,aa=$shiftLeft64(new $Uint64(0,y),x),new $Uint64(z.$high-aa.$high,z.$low-aa.$low));ae=(ac=c.mant,ad=b.mant,new $Uint64(ac.$high-ad.$high,ac.$low-ad.$low));ah=(af=c.mant,ag=d.mant,new $Uint64(af.$high-ag.$high,af.$low-ag.$low));ai=0;aj=0;ak=new $Uint64(0,1);al=aj;am=ak;while(true){if(!(al<20)){break;}if((an=new $Uint64(0,y),(am.$high>an.$high||(am.$high===an.$high&&am.$low>an.$low)))){ai=al;break;}am=$mul64(am,(new $Uint64(0,10)));al=al+(1)>>0;}ao=0;while(true){if(!(ao>0)-1>>0,((ap<0||ap>=AL.length)?$throwRuntimeError("index out of range"):AL[ap]));as=(ar=y/(aq.$low>>>0),(ar===ar&&ar!==1/0&&ar!==-1/0)?ar>>>0:$throwRuntimeError("integer divide by zero"));(at=a.d,(ao<0||ao>=at.$length)?$throwRuntimeError("index out of range"):at.$array[at.$offset+ao]=((as+48>>>0)<<24>>>24));y=y-((au=(aq.$low>>>0),(((as>>>16<<16)*au>>>0)+(as<<16>>>16)*au)>>>0))>>>0;aw=(av=$shiftLeft64(new $Uint64(0,y),x),new $Uint64(av.$high+ab.$high,av.$low+ab.$low));if((aw.$high>0;a.dp=ai+s>>0;a.neg=d.neg;return AO(a,aw,ah,ae,$shiftLeft64(aq,x),new $Uint64(0,2));}ao=ao+(1)>>0;}a.nd=ai;a.dp=a.nd+s>>0;a.neg=d.neg;ax=0;ay=new $Uint64(0,1);while(true){if(!(true)){break;}ab=$mul64(ab,(new $Uint64(0,10)));ay=$mul64(ay,(new $Uint64(0,10)));ax=($shiftRightUint64(ab,x).$low>>0);(az=a.d,ba=a.nd,(ba<0||ba>=az.$length)?$throwRuntimeError("index out of range"):az.$array[az.$offset+ba]=((ax+48>>0)<<24>>>24));a.nd=a.nd+(1)>>0;ab=(bb=$shiftLeft64(new $Uint64(0,ax),x),new $Uint64(ab.$high-bb.$high,ab.$low-bb.$low));if((bc=$mul64(ae,ay),(ab.$high>0;(m=a.d,(k<0||k>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+k]=(l=a.d,((k<0||k>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+k]))-(1)<<24>>>24);b=(n=e,new $Uint64(b.$high+n.$high,b.$low+n.$low));}if((o=new $Uint64(b.$high+e.$high,b.$low+e.$low),p=(q=(r=$div64(e,new $Uint64(0,2),false),new $Uint64(c.$high+r.$high,c.$low+r.$low)),new $Uint64(q.$high+f.$high,q.$low+f.$low)),(o.$highs.$high||(b.$high===s.$high&&b.$low>s.$low)))){return false;}if((a.nd===1)&&((t=a.d,((0<0||0>=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+0]))===48)){a.nd=0;a.dp=0;}return true;};AT=$pkg.AppendFloat=function(a,b,c,d,e){var a,b,c,d,e;return AU(a,b,c,d,e);};AU=function(a,b,c,d,e){var a,aa,ab,ac,ad,ae,af,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;f=new $Uint64(0,0);g=CP.nil;h=e;if(h===32){f=new $Uint64(0,A.Float32bits(b));g=AQ;}else if(h===64){f=A.Float64bits(b);g=AR;}else{$panic(new $String("strconv: illegal AppendFloat/FormatFloat bitSize"));}j=!((i=$shiftRightUint64(f,((g.expbits+g.mantbits>>>0))),(i.$high===0&&i.$low===0)));l=($shiftRightUint64(f,g.mantbits).$low>>0)&((((k=g.expbits,k<32?(1<>0)-1>>0));o=(m=(n=$shiftLeft64(new $Uint64(0,1),g.mantbits),new $Uint64(n.$high-0,n.$low-1)),new $Uint64(f.$high&m.$high,(f.$low&m.$low)>>>0));p=l;if(p===(((q=g.expbits,q<32?(1<>0)-1>>0)){r="";if(!((o.$high===0&&o.$low===0))){r="NaN";}else if(j){r="-Inf";}else{r="+Inf";}return $appendSlice(a,new CL($stringToBytes(r)));}else if(p===0){l=l+(1)>>0;}else{o=(s=$shiftLeft64(new $Uint64(0,1),g.mantbits),new $Uint64(o.$high|s.$high,(o.$low|s.$low)>>>0));}l=l+(g.bias)>>0;if(c===98){return BB(a,j,o,l,g);}if(!G){return AV(a,d,c,j,o,l,g);}t=$clone(new AY.ptr(),AY);u=false;v=d<0;if(v){w=new AI.ptr();x=w.AssignComputeBounds(o,l,j,g);y=$clone(x[0],AI);z=$clone(x[1],AI);aa=$clone(CO.zero(),CO);t.d=new CL(aa);u=w.ShortestDecimal(t,y,z);if(!u){return AV(a,d,c,j,o,l,g);}ab=c;if(ab===101||ab===69){d=t.nd-1>>0;}else if(ab===102){d=BC(t.nd-t.dp>>0,0);}else if(ab===103||ab===71){d=t.nd;}}else if(!((c===102))){ac=d;ad=c;if(ad===101||ad===69){ac=ac+(1)>>0;}else if(ad===103||ad===71){if(d===0){d=1;}ac=d;}if(ac<=15){ae=$clone(CN.zero(),CN);t.d=new CL(ae);af=new AI.ptr(o,l-(g.mantbits>>0)>>0,j);u=af.FixedDecimal(t,ac);}}if(!u){return AV(a,d,c,j,o,l,g);}return AW(a,v,j,t,d,c);};AV=function(a,b,c,d,e,f,g){var a,b,c,d,e,f,g,h,i,j,k,l;h=new Z.ptr();h.Assign(e);h.Shift(f-(g.mantbits>>0)>>0);i=$clone(new AY.ptr(),AY);j=b<0;if(j){AX(h,e,f,g);$copy(i,new AY.ptr(new CL(h.d),h.nd,h.dp,false),AY);k=c;if(k===101||k===69){b=i.nd-1>>0;}else if(k===102){b=BC(i.nd-i.dp>>0,0);}else if(k===103||k===71){b=i.nd;}}else{l=c;if(l===101||l===69){h.Round(b+1>>0);}else if(l===102){h.Round(h.dp+b>>0);}else if(l===103||l===71){if(b===0){b=1;}h.Round(b);}$copy(i,new AY.ptr(new CL(h.d),h.nd,h.dp,false),AY);}return AW(a,j,d,i,b,c);};AW=function(a,b,c,d,e,f){var a,b,c,d,e,f,g,h,i;d=$clone(d,AY);g=f;if(g===101||g===69){return AZ(a,c,d,e,f);}else if(g===102){return BA(a,c,d,e);}else if(g===103||g===71){h=e;if(h>d.nd&&d.nd>=d.dp){h=d.nd;}if(b){h=6;}i=d.dp-1>>0;if(i<-4||i>=h){if(e>d.nd){e=d.nd;}return AZ(a,c,d,e-1>>0,(f+101<<24>>>24)-103<<24>>>24);}if(e>d.dp){e=d.nd;}return BA(a,c,d,BC(e-d.dp>>0,0));}return $append(a,37,f);};AX=function(a,b,c,d){var a,aa,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;if((b.$high===0&&b.$low===0)){a.nd=0;return;}e=d.bias+1>>0;if(c>e&&(332*((a.dp-a.nd>>0))>>0)>=(100*((c-(d.mantbits>>0)>>0))>>0)){return;}f=new Z.ptr();f.Assign((g=$mul64(b,new $Uint64(0,2)),new $Uint64(g.$high+0,g.$low+1)));f.Shift((c-(d.mantbits>>0)>>0)-1>>0);h=new $Uint64(0,0);i=0;if((j=$shiftLeft64(new $Uint64(0,1),d.mantbits),(b.$high>j.$high||(b.$high===j.$high&&b.$low>j.$low)))||(c===e)){h=new $Uint64(b.$high-0,b.$low-1);i=c;}else{h=(k=$mul64(b,new $Uint64(0,2)),new $Uint64(k.$high-0,k.$low-1));i=c-1>>0;}l=new Z.ptr();l.Assign((m=$mul64(h,new $Uint64(0,2)),new $Uint64(m.$high+0,m.$low+1)));l.Shift((i-(d.mantbits>>0)>>0)-1>>0);o=(n=$div64(b,new $Uint64(0,2),true),(n.$high===0&&n.$low===0));p=0;while(true){if(!(p=w.length)?$throwRuntimeError("index out of range"):w[p]));}else{t=48;}u=(x=a.d,((p<0||p>=x.length)?$throwRuntimeError("index out of range"):x[p]));if(p=y.length)?$throwRuntimeError("index out of range"):y[p]));}else{v=48;}z=!((t===u))||(o&&(t===u)&&((p+1>>0)===l.nd));aa=!((u===v))&&(o||(u+1<<24>>>24)>0)>0);return;}else if(z){a.RoundDown(p+1>>0);return;}else if(aa){a.RoundUp(p+1>>0);return;}p=p+(1)>>0;}};AZ=function(a,b,c,d,e){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;c=$clone(c,AY);if(b){a=$append(a,45);}f=48;if(!((c.nd===0))){f=(g=c.d,((0<0||0>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+0]));}a=$append(a,f);if(d>0){a=$append(a,46);h=1;i=((c.nd+d>>0)+1>>0)-BC(c.nd,d+1>>0)>>0;while(true){if(!(h=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+h])));h=h+(1)>>0;}while(true){if(!(h<=d)){break;}a=$append(a,48);h=h+(1)>>0;}}a=$append(a,e);k=c.dp-1>>0;if(c.nd===0){k=0;}if(k<0){f=45;k=-k;}else{f=43;}a=$append(a,f);l=$clone(CQ.zero(),CQ);m=3;while(true){if(!(k>=10)){break;}m=m-(1)>>0;(m<0||m>=l.length)?$throwRuntimeError("index out of range"):l[m]=(((n=k%10,n===n?n:$throwRuntimeError("integer divide by zero"))+48>>0)<<24>>>24);k=(o=k/(10),(o===o&&o!==1/0&&o!==-1/0)?o>>0:$throwRuntimeError("integer divide by zero"));}m=m-(1)>>0;(m<0||m>=l.length)?$throwRuntimeError("index out of range"):l[m]=((k+48>>0)<<24>>>24);p=m;if(p===0){a=$append(a,l[0],l[1],l[2]);}else if(p===1){a=$append(a,l[1],l[2]);}else if(p===2){a=$append(a,48,l[2]);}return a;};BA=function(a,b,c,d){var a,b,c,d,e,f,g,h,i,j;c=$clone(c,AY);if(b){a=$append(a,45);}if(c.dp>0){e=0;e=0;while(true){if(!(e=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+e])));e=e+(1)>>0;}while(true){if(!(e>0;}}else{a=$append(a,48);}if(d>0){a=$append(a,46);g=0;while(true){if(!(g>0;if(0<=i&&i=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+i]));}a=$append(a,h);g=g+(1)>>0;}}return a;};BB=function(a,b,c,d,e){var a,b,c,d,e,f,g,h,i,j,k,l;f=$clone(CR.zero(),CR);g=50;d=d-((e.mantbits>>0))>>0;h=43;if(d<0){h=45;d=-d;}i=0;while(true){if(!(d>0||i<1)){break;}i=i+(1)>>0;g=g-(1)>>0;(g<0||g>=f.length)?$throwRuntimeError("index out of range"):f[g]=(((j=d%10,j===j?j:$throwRuntimeError("integer divide by zero"))+48>>0)<<24>>>24);d=(k=d/(10),(k===k&&k!==1/0&&k!==-1/0)?k>>0:$throwRuntimeError("integer divide by zero"));}g=g-(1)>>0;(g<0||g>=f.length)?$throwRuntimeError("index out of range"):f[g]=h;g=g-(1)>>0;(g<0||g>=f.length)?$throwRuntimeError("index out of range"):f[g]=112;i=0;while(true){if(!((c.$high>0||(c.$high===0&&c.$low>0))||i<1)){break;}i=i+(1)>>0;g=g-(1)>>0;(g<0||g>=f.length)?$throwRuntimeError("index out of range"):f[g]=((l=$div64(c,new $Uint64(0,10),true),new $Uint64(l.$high+0,l.$low+48)).$low<<24>>>24);c=$div64(c,(new $Uint64(0,10)),false);}if(b){g=g-(1)>>0;(g<0||g>=f.length)?$throwRuntimeError("index out of range"):f[g]=45;}return $appendSlice(a,$subslice(new CL(f),g));};BC=function(a,b){var a,b;if(a>b){return a;}return b;};BI=$pkg.FormatInt=function(a,b){var a,b,c,d;c=BN(CL.nil,new $Uint64(a.$high,a.$low),b,(a.$high<0||(a.$high===0&&a.$low<0)),false);d=c[1];return d;};BJ=$pkg.Itoa=function(a){var a;return BI(new $Int64(0,a),10);};BN=function(a,b,c,d,e){var a,b,c,d,e,f=CL.nil,g="",h,i,j,k,l,m,n,o,p,q,r,s,t;if(c<2||c>36){$panic(new $String("strconv: illegal AppendInt/FormatInt base"));}h=$clone(CS.zero(),CS);i=65;if(d){b=new $Uint64(-b.$high,-b.$low);}if(c===10){while(true){if(!((b.$high>0||(b.$high===0&&b.$low>=100)))){break;}i=i-(2)>>0;j=$div64(b,new $Uint64(0,100),false);l=((k=$mul64(j,new $Uint64(0,100)),new $Uint64(b.$high-k.$high,b.$low-k.$low)).$low>>>0);(m=i+1>>0,(m<0||m>=h.length)?$throwRuntimeError("index out of range"):h[m]="0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789".charCodeAt(l));(n=i+0>>0,(n<0||n>=h.length)?$throwRuntimeError("index out of range"):h[n]="0000000000111111111122222222223333333333444444444455555555556666666666777777777788888888889999999999".charCodeAt(l));b=j;}if((b.$high>0||(b.$high===0&&b.$low>=10))){i=i-(1)>>0;o=$div64(b,new $Uint64(0,10),false);(i<0||i>=h.length)?$throwRuntimeError("index out of range"):h[i]="0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt(((p=$mul64(o,new $Uint64(0,10)),new $Uint64(b.$high-p.$high,b.$low-p.$low)).$low>>>0));b=o;}}else{q=((c<0||c>=BM.length)?$throwRuntimeError("index out of range"):BM[c]);if(q>0){r=new $Uint64(0,c);s=(r.$low>>>0)-1>>>0;while(true){if(!((b.$high>r.$high||(b.$high===r.$high&&b.$low>=r.$low)))){break;}i=i-(1)>>0;(i<0||i>=h.length)?$throwRuntimeError("index out of range"):h[i]="0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt((((b.$low>>>0)&s)>>>0));b=$shiftRightUint64(b,(q));}}else{t=new $Uint64(0,c);while(true){if(!((b.$high>t.$high||(b.$high===t.$high&&b.$low>=t.$low)))){break;}i=i-(1)>>0;(i<0||i>=h.length)?$throwRuntimeError("index out of range"):h[i]="0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt(($div64(b,t,true).$low>>>0));b=$div64(b,(t),false);}}}i=i-(1)>>0;(i<0||i>=h.length)?$throwRuntimeError("index out of range"):h[i]="0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt((b.$low>>>0));if(d){i=i-(1)>>0;(i<0||i>=h.length)?$throwRuntimeError("index out of range"):h[i]=45;}if(e){f=$appendSlice(a,$subslice(new CL(h),i));return[f,g];}g=$bytesToString($subslice(new CL(h),i));return[f,g];};BO=function(a,b,c){var a,b,c,d,e,f,g,h,i,j,k,l,m;d=$clone(CT.zero(),CT);f=$makeSlice(CL,0,(e=(3*a.length>>0)/2,(e===e&&e!==1/0&&e!==-1/0)?e>>0:$throwRuntimeError("integer divide by zero")));f=$append(f,b);g=0;while(true){if(!(a.length>0)){break;}h=(a.charCodeAt(0)>>0);g=1;if(h>=128){i=C.DecodeRuneInString(a);h=i[0];g=i[1];}if((g===1)&&(h===65533)){f=$appendSlice(f,new CL($stringToBytes("\\x")));f=$append(f,"0123456789abcdef".charCodeAt((a.charCodeAt(0)>>>4<<24>>>24)));f=$append(f,"0123456789abcdef".charCodeAt(((a.charCodeAt(0)&15)>>>0)));a=a.substring(g);continue;}if((h===(b>>0))||(h===92)){f=$append(f,92);f=$append(f,(h<<24>>>24));a=a.substring(g);continue;}if(c){if(h<128&&CE(h)){f=$append(f,(h<<24>>>24));a=a.substring(g);continue;}}else if(CE(h)){j=C.EncodeRune(new CL(d),h);f=$appendSlice(f,$subslice(new CL(d),0,j));a=a.substring(g);continue;}k=h;if(k===7){f=$appendSlice(f,new CL($stringToBytes("\\a")));}else if(k===8){f=$appendSlice(f,new CL($stringToBytes("\\b")));}else if(k===12){f=$appendSlice(f,new CL($stringToBytes("\\f")));}else if(k===10){f=$appendSlice(f,new CL($stringToBytes("\\n")));}else if(k===13){f=$appendSlice(f,new CL($stringToBytes("\\r")));}else if(k===9){f=$appendSlice(f,new CL($stringToBytes("\\t")));}else if(k===11){f=$appendSlice(f,new CL($stringToBytes("\\v")));}else{if(h<32){f=$appendSlice(f,new CL($stringToBytes("\\x")));f=$append(f,"0123456789abcdef".charCodeAt((a.charCodeAt(0)>>>4<<24>>>24)));f=$append(f,"0123456789abcdef".charCodeAt(((a.charCodeAt(0)&15)>>>0)));}else if(h>1114111){h=65533;f=$appendSlice(f,new CL($stringToBytes("\\u")));l=12;while(true){if(!(l>=0)){break;}f=$append(f,"0123456789abcdef".charCodeAt((((h>>$min((l>>>0),31))>>0)&15)));l=l-(4)>>0;}}else if(h<65536){f=$appendSlice(f,new CL($stringToBytes("\\u")));l=12;while(true){if(!(l>=0)){break;}f=$append(f,"0123456789abcdef".charCodeAt((((h>>$min((l>>>0),31))>>0)&15)));l=l-(4)>>0;}}else{f=$appendSlice(f,new CL($stringToBytes("\\U")));m=28;while(true){if(!(m>=0)){break;}f=$append(f,"0123456789abcdef".charCodeAt((((h>>$min((m>>>0),31))>>0)&15)));m=m-(4)>>0;}}}a=a.substring(g);}f=$append(f,b);return $bytesToString(f);};BP=$pkg.Quote=function(a){var a;return BO(a,34,false);};BR=$pkg.QuoteToASCII=function(a){var a;return BO(a,34,true);};BT=$pkg.QuoteRune=function(a){var a;return BO($encodeRune(a),39,false);};BU=$pkg.AppendQuoteRune=function(a,b){var a,b;return $appendSlice(a,new CL($stringToBytes(BT(b))));};BV=$pkg.QuoteRuneToASCII=function(a){var a;return BO($encodeRune(a),39,true);};BW=$pkg.AppendQuoteRuneToASCII=function(a,b){var a,b;return $appendSlice(a,new CL($stringToBytes(BV(b))));};BX=$pkg.CanBackquote=function(a){var a,b,c,d;while(true){if(!(a.length>0)){break;}b=C.DecodeRuneInString(a);c=b[0];d=b[1];a=a.substring(d);if(d>1){if(c===65279){return false;}continue;}if(c===65533){return false;}if((c<32&&!((c===9)))||(c===96)||(c===127)){return false;}}return true;};BY=function(a){var a,b=0,c=false,d,e,f,g,h,i,j;d=(a>>0);if(48<=d&&d<=57){e=d-48>>0;f=true;b=e;c=f;return[b,c];}else if(97<=d&&d<=102){g=(d-97>>0)+10>>0;h=true;b=g;c=h;return[b,c];}else if(65<=d&&d<=70){i=(d-65>>0)+10>>0;j=true;b=i;c=j;return[b,c];}return[b,c];};BZ=$pkg.UnquoteChar=function(a,b){var a,aa,ab,ac,ad,b,c=0,d=false,e="",f=$ifaceNil,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;g=a.charCodeAt(0);if((g===b)&&((b===39)||(b===34))){f=$pkg.ErrSyntax;return[c,d,e,f];}else if(g>=128){h=C.DecodeRuneInString(a);i=h[0];j=h[1];k=i;l=true;m=a.substring(j);n=$ifaceNil;c=k;d=l;e=m;f=n;return[c,d,e,f];}else if(!((g===92))){o=(a.charCodeAt(0)>>0);p=false;q=a.substring(1);r=$ifaceNil;c=o;d=p;e=q;f=r;return[c,d,e,f];}if(a.length<=1){f=$pkg.ErrSyntax;return[c,d,e,f];}s=a.charCodeAt(1);a=a.substring(2);t=s;switch(0){default:if(t===97){c=7;}else if(t===98){c=8;}else if(t===102){c=12;}else if(t===110){c=10;}else if(t===114){c=13;}else if(t===116){c=9;}else if(t===118){c=11;}else if(t===120||t===117||t===85){u=0;v=s;if(v===120){u=2;}else if(v===117){u=4;}else if(v===85){u=8;}w=0;if(a.length>0)|z;x=x+(1)>>0;}a=a.substring(u);if(s===120){c=w;break;}if(w>1114111){f=$pkg.ErrSyntax;return[c,d,e,f];}c=w;d=true;}else if(t===48||t===49||t===50||t===51||t===52||t===53||t===54||t===55){ab=(s>>0)-48>>0;if(a.length<2){f=$pkg.ErrSyntax;return[c,d,e,f];}ac=0;while(true){if(!(ac<2)){break;}ad=(a.charCodeAt(ac)>>0)-48>>0;if(ad<0||ad>7){f=$pkg.ErrSyntax;return[c,d,e,f];}ab=((ab<<3>>0))|ad;ac=ac+(1)>>0;}a=a.substring(2);if(ab>255){f=$pkg.ErrSyntax;return[c,d,e,f];}c=ab;}else if(t===92){c=92;}else if(t===39||t===34){if(!((s===b))){f=$pkg.ErrSyntax;return[c,d,e,f];}c=(s>>0);}else{f=$pkg.ErrSyntax;return[c,d,e,f];}}e=a;return[c,d,e,f];};CA=$pkg.Unquote=function(a){var a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,b="",c=$ifaceNil,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;d=a.length;if(d<2){e="";f=$pkg.ErrSyntax;b=e;c=f;return[b,c];}g=a.charCodeAt(0);if(!((g===a.charCodeAt((d-1>>0))))){h="";i=$pkg.ErrSyntax;b=h;c=i;return[b,c];}a=a.substring(1,(d-1>>0));if(g===96){if(CB(a,96)){j="";k=$pkg.ErrSyntax;b=j;c=k;return[b,c];}l=a;m=$ifaceNil;b=l;c=m;return[b,c];}if(!((g===34))&&!((g===39))){n="";o=$pkg.ErrSyntax;b=n;c=o;return[b,c];}if(CB(a,10)){p="";q=$pkg.ErrSyntax;b=p;c=q;return[b,c];}if(!CB(a,92)&&!CB(a,g)){r=g;if(r===34){s=a;t=$ifaceNil;b=s;c=t;return[b,c];}else if(r===39){u=C.DecodeRuneInString(a);v=u[0];w=u[1];if((w===a.length)&&(!((v===65533))||!((w===1)))){x=a;y=$ifaceNil;b=x;c=y;return[b,c];}}}z=$clone(CT.zero(),CT);ab=$makeSlice(CL,0,(aa=(3*a.length>>0)/2,(aa===aa&&aa!==1/0&&aa!==-1/0)?aa>>0:$throwRuntimeError("integer divide by zero")));while(true){if(!(a.length>0)){break;}ac=BZ(a,g);ad=ac[0];ae=ac[1];af=ac[2];ag=ac[3];if(!($interfaceIsEqual(ag,$ifaceNil))){ah="";ai=ag;b=ah;c=ai;return[b,c];}a=af;if(ad<128||!ae){ab=$append(ab,(ad<<24>>>24));}else{aj=C.EncodeRune(new CL(z),ad);ab=$appendSlice(ab,$subslice(new CL(z),0,aj));}if((g===39)&&!((a.length===0))){ak="";al=$pkg.ErrSyntax;b=ak;c=al;return[b,c];}}am=$bytesToString(ab);an=$ifaceNil;b=am;c=an;return[b,c];};CB=function(a,b){var a,b,c;c=0;while(true){if(!(c>0;}return false;};CC=function(a,b){var a,b,c,d,e,f,g,h;c=0;d=a.$length;e=c;f=d;while(true){if(!(e>0))/2,(g===g&&g!==1/0&&g!==-1/0)?g>>0:$throwRuntimeError("integer divide by zero"))>>0;if(((h<0||h>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+h])>0;}else{f=h;}}return e;};CD=function(a,b){var a,b,c,d,e,f,g,h;c=0;d=a.$length;e=c;f=d;while(true){if(!(e>0))/2,(g===g&&g!==1/0&&g!==-1/0)?g>>0:$throwRuntimeError("integer divide by zero"))>>0;if(((h<0||h>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+h])>0;}else{f=h;}}return e;};CE=$pkg.IsPrint=function(a){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;if(a<=255){if(32<=a&&a<=126){return true;}if(161<=a&&a<=255){return!((a===173));}return false;}if(0<=a&&a<65536){b=(a<<16>>>16);c=BD;d=BE;e=b;f=c;g=d;h=CC(f,e);if(h>=f.$length||e<(i=h&~1,((i<0||i>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+i]))||(j=h|1,((j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]))=g.$length||!((((k<0||k>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+k])===e));}l=(a>>>0);m=BF;n=BG;o=l;p=m;q=n;r=CD(p,o);if(r>=p.$length||o<(s=r&~1,((s<0||s>=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+s]))||(t=r|1,((t<0||t>=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+t]))=131072){return true;}a=a-(65536)>>0;u=CC(q,(a<<16>>>16));return u>=q.$length||!((((u<0||u>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+u])===(a<<16>>>16)));};CV.methods=[{prop:"set",name:"set",pkg:"strconv",typ:$funcType([$String],[$Bool],false)},{prop:"floatBits",name:"floatBits",pkg:"strconv",typ:$funcType([CP],[$Uint64,$Bool],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Assign",name:"Assign",pkg:"",typ:$funcType([$Uint64],[],false)},{prop:"Shift",name:"Shift",pkg:"",typ:$funcType([$Int],[],false)},{prop:"Round",name:"Round",pkg:"",typ:$funcType([$Int],[],false)},{prop:"RoundDown",name:"RoundDown",pkg:"",typ:$funcType([$Int],[],false)},{prop:"RoundUp",name:"RoundUp",pkg:"",typ:$funcType([$Int],[],false)},{prop:"RoundedInteger",name:"RoundedInteger",pkg:"",typ:$funcType([],[$Uint64],false)}];CX.methods=[{prop:"floatBits",name:"floatBits",pkg:"strconv",typ:$funcType([CP],[$Uint64,$Bool],false)},{prop:"AssignComputeBounds",name:"AssignComputeBounds",pkg:"",typ:$funcType([$Uint64,$Int,$Bool,CP],[AI,AI],false)},{prop:"Normalize",name:"Normalize",pkg:"",typ:$funcType([],[$Uint],false)},{prop:"Multiply",name:"Multiply",pkg:"",typ:$funcType([AI],[],false)},{prop:"AssignDecimal",name:"AssignDecimal",pkg:"",typ:$funcType([$Uint64,$Int,$Bool,$Bool,CP],[$Bool],false)},{prop:"frexp10",name:"frexp10",pkg:"strconv",typ:$funcType([],[$Int,$Int],false)},{prop:"FixedDecimal",name:"FixedDecimal",pkg:"",typ:$funcType([CW,$Int],[$Bool],false)},{prop:"ShortestDecimal",name:"ShortestDecimal",pkg:"",typ:$funcType([CW,CX,CX],[$Bool],false)}];Z.init([{prop:"d",name:"d",pkg:"strconv",typ:CU,tag:""},{prop:"nd",name:"nd",pkg:"strconv",typ:$Int,tag:""},{prop:"dp",name:"dp",pkg:"strconv",typ:$Int,tag:""},{prop:"neg",name:"neg",pkg:"strconv",typ:$Bool,tag:""},{prop:"trunc",name:"trunc",pkg:"strconv",typ:$Bool,tag:""}]);AD.init([{prop:"delta",name:"delta",pkg:"strconv",typ:$Int,tag:""},{prop:"cutoff",name:"cutoff",pkg:"strconv",typ:$String,tag:""}]);AI.init([{prop:"mant",name:"mant",pkg:"strconv",typ:$Uint64,tag:""},{prop:"exp",name:"exp",pkg:"strconv",typ:$Int,tag:""},{prop:"neg",name:"neg",pkg:"strconv",typ:$Bool,tag:""}]);AP.init([{prop:"mantbits",name:"mantbits",pkg:"strconv",typ:$Uint,tag:""},{prop:"expbits",name:"expbits",pkg:"strconv",typ:$Uint,tag:""},{prop:"bias",name:"bias",pkg:"strconv",typ:$Int,tag:""}]);AY.init([{prop:"d",name:"d",pkg:"strconv",typ:CL,tag:""},{prop:"nd",name:"nd",pkg:"strconv",typ:$Int,tag:""},{prop:"dp",name:"dp",pkg:"strconv",typ:$Int,tag:""},{prop:"neg",name:"neg",pkg:"strconv",typ:$Bool,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_strconv=function(){while(true){switch($s){case 0:$r=B.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}G=true;$pkg.ErrRange=B.New("value out of range");$pkg.ErrSyntax=B.New("invalid syntax");AE=new CI([new AD.ptr(0,""),new AD.ptr(1,"5"),new AD.ptr(1,"25"),new AD.ptr(1,"125"),new AD.ptr(2,"625"),new AD.ptr(2,"3125"),new AD.ptr(2,"15625"),new AD.ptr(3,"78125"),new AD.ptr(3,"390625"),new AD.ptr(3,"1953125"),new AD.ptr(4,"9765625"),new AD.ptr(4,"48828125"),new AD.ptr(4,"244140625"),new AD.ptr(4,"1220703125"),new AD.ptr(5,"6103515625"),new AD.ptr(5,"30517578125"),new AD.ptr(5,"152587890625"),new AD.ptr(6,"762939453125"),new AD.ptr(6,"3814697265625"),new AD.ptr(6,"19073486328125"),new AD.ptr(7,"95367431640625"),new AD.ptr(7,"476837158203125"),new AD.ptr(7,"2384185791015625"),new AD.ptr(7,"11920928955078125"),new AD.ptr(8,"59604644775390625"),new AD.ptr(8,"298023223876953125"),new AD.ptr(8,"1490116119384765625"),new AD.ptr(9,"7450580596923828125")]);AJ=$toNativeArray($kindStruct,[new AI.ptr(new $Uint64(2147483648,0),-63,false),new AI.ptr(new $Uint64(2684354560,0),-60,false),new AI.ptr(new $Uint64(3355443200,0),-57,false),new AI.ptr(new $Uint64(4194304000,0),-54,false),new AI.ptr(new $Uint64(2621440000,0),-50,false),new AI.ptr(new $Uint64(3276800000,0),-47,false),new AI.ptr(new $Uint64(4096000000,0),-44,false),new AI.ptr(new $Uint64(2560000000,0),-40,false)]);AK=$toNativeArray($kindStruct,[new AI.ptr(new $Uint64(4203730336,136053384),-1220,false),new AI.ptr(new $Uint64(3132023167,2722021238),-1193,false),new AI.ptr(new $Uint64(2333539104,810921078),-1166,false),new AI.ptr(new $Uint64(3477244234,1573795306),-1140,false),new AI.ptr(new $Uint64(2590748842,1432697645),-1113,false),new AI.ptr(new $Uint64(3860516611,1025131999),-1087,false),new AI.ptr(new $Uint64(2876309015,3348809418),-1060,false),new AI.ptr(new $Uint64(4286034428,3200048207),-1034,false),new AI.ptr(new $Uint64(3193344495,1097586188),-1007,false),new AI.ptr(new $Uint64(2379227053,2424306748),-980,false),new AI.ptr(new $Uint64(3545324584,827693699),-954,false),new AI.ptr(new $Uint64(2641472655,2913388981),-927,false),new AI.ptr(new $Uint64(3936100983,602835915),-901,false),new AI.ptr(new $Uint64(2932623761,1081627501),-874,false),new AI.ptr(new $Uint64(2184974969,1572261463),-847,false),new AI.ptr(new $Uint64(3255866422,1308317239),-821,false),new AI.ptr(new $Uint64(2425809519,944281679),-794,false),new AI.ptr(new $Uint64(3614737867,629291719),-768,false),new AI.ptr(new $Uint64(2693189581,2545915892),-741,false),new AI.ptr(new $Uint64(4013165208,388672741),-715,false),new AI.ptr(new $Uint64(2990041083,708162190),-688,false),new AI.ptr(new $Uint64(2227754207,3536207675),-661,false),new AI.ptr(new $Uint64(3319612455,450088378),-635,false),new AI.ptr(new $Uint64(2473304014,3139815830),-608,false),new AI.ptr(new $Uint64(3685510180,2103616900),-582,false),new AI.ptr(new $Uint64(2745919064,224385782),-555,false),new AI.ptr(new $Uint64(4091738259,3737383206),-529,false),new AI.ptr(new $Uint64(3048582568,2868871352),-502,false),new AI.ptr(new $Uint64(2271371013,1820084875),-475,false),new AI.ptr(new $Uint64(3384606560,885076051),-449,false),new AI.ptr(new $Uint64(2521728396,2444895829),-422,false),new AI.ptr(new $Uint64(3757668132,1881767613),-396,false),new AI.ptr(new $Uint64(2799680927,3102062735),-369,false),new AI.ptr(new $Uint64(4171849679,2289335700),-343,false),new AI.ptr(new $Uint64(3108270227,2410191823),-316,false),new AI.ptr(new $Uint64(2315841784,3205436779),-289,false),new AI.ptr(new $Uint64(3450873173,1697722806),-263,false),new AI.ptr(new $Uint64(2571100870,3497754540),-236,false),new AI.ptr(new $Uint64(3831238852,707476230),-210,false),new AI.ptr(new $Uint64(2854495385,1769181907),-183,false),new AI.ptr(new $Uint64(4253529586,2197867022),-157,false),new AI.ptr(new $Uint64(3169126500,2450594539),-130,false),new AI.ptr(new $Uint64(2361183241,1867548876),-103,false),new AI.ptr(new $Uint64(3518437208,3793315116),-77,false),new AI.ptr(new $Uint64(2621440000,0),-50,false),new AI.ptr(new $Uint64(3906250000,0),-24,false),new AI.ptr(new $Uint64(2910383045,2892103680),3,false),new AI.ptr(new $Uint64(2168404344,4170451332),30,false),new AI.ptr(new $Uint64(3231174267,3372684723),56,false),new AI.ptr(new $Uint64(2407412430,2078956656),83,false),new AI.ptr(new $Uint64(3587324068,2884206696),109,false),new AI.ptr(new $Uint64(2672764710,395977285),136,false),new AI.ptr(new $Uint64(3982729777,3569679143),162,false),new AI.ptr(new $Uint64(2967364920,2361961896),189,false),new AI.ptr(new $Uint64(2210859150,447440347),216,false),new AI.ptr(new $Uint64(3294436857,1114709402),242,false),new AI.ptr(new $Uint64(2454546732,2786846552),269,false),new AI.ptr(new $Uint64(3657559652,443583978),295,false),new AI.ptr(new $Uint64(2725094297,2599384906),322,false),new AI.ptr(new $Uint64(4060706939,3028118405),348,false),new AI.ptr(new $Uint64(3025462433,2044532855),375,false),new AI.ptr(new $Uint64(2254145170,1536935362),402,false),new AI.ptr(new $Uint64(3358938053,3365297469),428,false),new AI.ptr(new $Uint64(2502603868,4204241075),455,false),new AI.ptr(new $Uint64(3729170365,2577424355),481,false),new AI.ptr(new $Uint64(2778448436,3677981733),508,false),new AI.ptr(new $Uint64(4140210802,2744688476),534,false),new AI.ptr(new $Uint64(3084697427,1424604878),561,false),new AI.ptr(new $Uint64(2298278679,4062331362),588,false),new AI.ptr(new $Uint64(3424702107,3546052773),614,false),new AI.ptr(new $Uint64(2551601907,2065781727),641,false),new AI.ptr(new $Uint64(3802183132,2535403578),667,false),new AI.ptr(new $Uint64(2832847187,1558426518),694,false),new AI.ptr(new $Uint64(4221271257,2762425404),720,false),new AI.ptr(new $Uint64(3145092172,2812560400),747,false),new AI.ptr(new $Uint64(2343276271,3057687578),774,false),new AI.ptr(new $Uint64(3491753744,2790753324),800,false),new AI.ptr(new $Uint64(2601559269,3918606633),827,false),new AI.ptr(new $Uint64(3876625403,2711358621),853,false),new AI.ptr(new $Uint64(2888311001,1648096297),880,false),new AI.ptr(new $Uint64(2151959390,2057817989),907,false),new AI.ptr(new $Uint64(3206669376,61660461),933,false),new AI.ptr(new $Uint64(2389154863,1581580175),960,false),new AI.ptr(new $Uint64(3560118173,2626467905),986,false),new AI.ptr(new $Uint64(2652494738,3034782633),1013,false),new AI.ptr(new $Uint64(3952525166,3135207385),1039,false),new AI.ptr(new $Uint64(2944860731,2616258155),1066,false)]);AL=$toNativeArray($kindUint64,[new $Uint64(0,1),new $Uint64(0,10),new $Uint64(0,100),new $Uint64(0,1000),new $Uint64(0,10000),new $Uint64(0,100000),new $Uint64(0,1000000),new $Uint64(0,10000000),new $Uint64(0,100000000),new $Uint64(0,1000000000),new $Uint64(2,1410065408),new $Uint64(23,1215752192),new $Uint64(232,3567587328),new $Uint64(2328,1316134912),new $Uint64(23283,276447232),new $Uint64(232830,2764472320),new $Uint64(2328306,1874919424),new $Uint64(23283064,1569325056),new $Uint64(232830643,2808348672),new $Uint64(2328306436,2313682944)]);AQ=new AP.ptr(23,8,-127);AR=new AP.ptr(52,11,-1023);BD=new CJ([32,126,161,887,890,895,900,1366,1369,1418,1421,1479,1488,1514,1520,1524,1542,1563,1566,1805,1808,1866,1869,1969,1984,2042,2048,2093,2096,2139,2142,2142,2208,2226,2276,2444,2447,2448,2451,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2531,2534,2555,2561,2570,2575,2576,2579,2617,2620,2626,2631,2632,2635,2637,2641,2641,2649,2654,2662,2677,2689,2745,2748,2765,2768,2768,2784,2787,2790,2801,2817,2828,2831,2832,2835,2873,2876,2884,2887,2888,2891,2893,2902,2903,2908,2915,2918,2935,2946,2954,2958,2965,2969,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3021,3024,3024,3031,3031,3046,3066,3072,3129,3133,3149,3157,3161,3168,3171,3174,3183,3192,3257,3260,3277,3285,3286,3294,3299,3302,3314,3329,3386,3389,3406,3415,3415,3424,3427,3430,3445,3449,3455,3458,3478,3482,3517,3520,3526,3530,3530,3535,3551,3558,3567,3570,3572,3585,3642,3647,3675,3713,3716,3719,3722,3725,3725,3732,3751,3754,3773,3776,3789,3792,3801,3804,3807,3840,3948,3953,4058,4096,4295,4301,4301,4304,4685,4688,4701,4704,4749,4752,4789,4792,4805,4808,4885,4888,4954,4957,4988,4992,5017,5024,5108,5120,5788,5792,5880,5888,5908,5920,5942,5952,5971,5984,6003,6016,6109,6112,6121,6128,6137,6144,6157,6160,6169,6176,6263,6272,6314,6320,6389,6400,6443,6448,6459,6464,6464,6468,6509,6512,6516,6528,6571,6576,6601,6608,6618,6622,6683,6686,6780,6783,6793,6800,6809,6816,6829,6832,6846,6912,6987,6992,7036,7040,7155,7164,7223,7227,7241,7245,7295,7360,7367,7376,7417,7424,7669,7676,7957,7960,7965,7968,8005,8008,8013,8016,8061,8064,8147,8150,8175,8178,8190,8208,8231,8240,8286,8304,8305,8308,8348,8352,8381,8400,8432,8448,8585,8592,9210,9216,9254,9280,9290,9312,11123,11126,11157,11160,11193,11197,11217,11264,11507,11513,11559,11565,11565,11568,11623,11631,11632,11647,11670,11680,11842,11904,12019,12032,12245,12272,12283,12289,12438,12441,12543,12549,12589,12593,12730,12736,12771,12784,19893,19904,40908,40960,42124,42128,42182,42192,42539,42560,42743,42752,42925,42928,42929,42999,43051,43056,43065,43072,43127,43136,43204,43214,43225,43232,43259,43264,43347,43359,43388,43392,43481,43486,43574,43584,43597,43600,43609,43612,43714,43739,43766,43777,43782,43785,43790,43793,43798,43808,43871,43876,43877,43968,44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64449,64467,64831,64848,64911,64914,64967,65008,65021,65024,65049,65056,65069,65072,65131,65136,65276,65281,65470,65474,65479,65482,65487,65490,65495,65498,65500,65504,65518,65532,65533]);BE=new CJ([173,907,909,930,1328,1376,1416,1424,1757,2111,2436,2473,2481,2526,2564,2601,2609,2612,2615,2621,2653,2692,2702,2706,2729,2737,2740,2758,2762,2820,2857,2865,2868,2910,2948,2961,2971,2973,3017,3076,3085,3089,3113,3141,3145,3159,3200,3204,3213,3217,3241,3252,3269,3273,3295,3312,3332,3341,3345,3397,3401,3460,3506,3516,3541,3543,3715,3721,3736,3744,3748,3750,3756,3770,3781,3783,3912,3992,4029,4045,4294,4681,4695,4697,4745,4785,4799,4801,4823,4881,5760,5901,5997,6001,6431,6751,7415,8024,8026,8028,8030,8117,8133,8156,8181,8335,11209,11311,11359,11558,11687,11695,11703,11711,11719,11727,11735,11743,11930,12352,12687,12831,13055,42654,42895,43470,43519,43815,43823,64311,64317,64319,64322,64325,65107,65127,65141,65511]);BF=new CK([65536,65613,65616,65629,65664,65786,65792,65794,65799,65843,65847,65932,65936,65947,65952,65952,66000,66045,66176,66204,66208,66256,66272,66299,66304,66339,66352,66378,66384,66426,66432,66499,66504,66517,66560,66717,66720,66729,66816,66855,66864,66915,66927,66927,67072,67382,67392,67413,67424,67431,67584,67589,67592,67640,67644,67644,67647,67742,67751,67759,67840,67867,67871,67897,67903,67903,67968,68023,68030,68031,68096,68102,68108,68147,68152,68154,68159,68167,68176,68184,68192,68255,68288,68326,68331,68342,68352,68405,68409,68437,68440,68466,68472,68497,68505,68508,68521,68527,68608,68680,69216,69246,69632,69709,69714,69743,69759,69825,69840,69864,69872,69881,69888,69955,69968,70006,70016,70088,70093,70093,70096,70106,70113,70132,70144,70205,70320,70378,70384,70393,70401,70412,70415,70416,70419,70457,70460,70468,70471,70472,70475,70477,70487,70487,70493,70499,70502,70508,70512,70516,70784,70855,70864,70873,71040,71093,71096,71113,71168,71236,71248,71257,71296,71351,71360,71369,71840,71922,71935,71935,72384,72440,73728,74648,74752,74868,77824,78894,92160,92728,92736,92777,92782,92783,92880,92909,92912,92917,92928,92997,93008,93047,93053,93071,93952,94020,94032,94078,94095,94111,110592,110593,113664,113770,113776,113788,113792,113800,113808,113817,113820,113823,118784,119029,119040,119078,119081,119154,119163,119261,119296,119365,119552,119638,119648,119665,119808,119967,119970,119970,119973,119974,119977,120074,120077,120134,120138,120485,120488,120779,120782,120831,124928,125124,125127,125142,126464,126500,126503,126523,126530,126530,126535,126548,126551,126564,126567,126619,126625,126651,126704,126705,126976,127019,127024,127123,127136,127150,127153,127221,127232,127244,127248,127339,127344,127386,127462,127490,127504,127546,127552,127560,127568,127569,127744,127788,127792,127869,127872,127950,127956,127991,128000,128330,128336,128578,128581,128719,128736,128748,128752,128755,128768,128883,128896,128980,129024,129035,129040,129095,129104,129113,129120,129159,129168,129197,131072,173782,173824,177972,177984,178205,194560,195101,917760,917999]);BG=new CJ([12,39,59,62,926,2057,2102,2134,2564,2580,2584,4285,4405,4626,4868,4905,4913,4916,9327,27231,27482,27490,54357,54429,54445,54458,54460,54468,54534,54549,54557,54586,54591,54597,54609,60932,60960,60963,60968,60979,60984,60986,61000,61002,61004,61008,61011,61016,61018,61020,61022,61024,61027,61035,61043,61048,61053,61055,61066,61092,61098,61632,61648,61743,62719,62842,62884]);BM=$toNativeArray($kindUint,[0,0,1,0,2,0,0,0,3,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0]);}return;}};$init_strconv.$blocking=true;return $init_strconv;};return $pkg;})(); +$packages["reflect"]=(function(){var $pkg={},B,E,A,C,D,AH,BF,BG,BH,BI,BJ,BK,BL,BM,BN,BO,BP,BQ,BR,BS,BT,BU,BV,BW,BY,BZ,CA,CZ,DA,DD,DF,FL,FU,FV,FW,FX,FY,FZ,GA,GB,GC,GD,GE,GF,GG,GH,GI,GJ,GK,GM,GN,GO,GP,GQ,GR,GW,GY,GZ,HC,HD,HE,HG,HH,F,K,AT,AU,BX,DM,G,H,I,J,L,M,N,O,P,Q,R,V,W,X,Y,AA,AE,AF,AG,AI,AJ,AK,AL,AM,AO,AP,AQ,AR,AS,AV,AW,CC,CE,CF,CG,CR,CW,DN,EF,EH,EI,EJ,EK,EL,EM,EN,EO,EP,EQ,ER,ES,ET,EU,EV,EW,EX,EY,EZ,FA,FB,FC;B=$packages["github.com/gopherjs/gopherjs/js"];E=$packages["math"];A=$packages["runtime"];C=$packages["strconv"];D=$packages["sync"];AH=$pkg.mapIter=$newType(0,$kindStruct,"reflect.mapIter","mapIter","reflect",function(t_,m_,keys_,i_){this.$val=this;this.t=t_!==undefined?t_:$ifaceNil;this.m=m_!==undefined?m_:null;this.keys=keys_!==undefined?keys_:null;this.i=i_!==undefined?i_:0;});BF=$pkg.Type=$newType(8,$kindInterface,"reflect.Type","Type","reflect",null);BG=$pkg.Kind=$newType(4,$kindUint,"reflect.Kind","Kind","reflect",null);BH=$pkg.rtype=$newType(0,$kindStruct,"reflect.rtype","rtype","reflect",function(size_,hash_,_$2_,align_,fieldAlign_,kind_,alg_,gc_,string_,uncommonType_,ptrToThis_,zero_){this.$val=this;this.size=size_!==undefined?size_:0;this.hash=hash_!==undefined?hash_:0;this._$2=_$2_!==undefined?_$2_:0;this.align=align_!==undefined?align_:0;this.fieldAlign=fieldAlign_!==undefined?fieldAlign_:0;this.kind=kind_!==undefined?kind_:0;this.alg=alg_!==undefined?alg_:FV.nil;this.gc=gc_!==undefined?gc_:FW.zero();this.string=string_!==undefined?string_:FX.nil;this.uncommonType=uncommonType_!==undefined?uncommonType_:FY.nil;this.ptrToThis=ptrToThis_!==undefined?ptrToThis_:FL.nil;this.zero=zero_!==undefined?zero_:0;});BI=$pkg.typeAlg=$newType(0,$kindStruct,"reflect.typeAlg","typeAlg","reflect",function(hash_,equal_){this.$val=this;this.hash=hash_!==undefined?hash_:$throwNilPointerError;this.equal=equal_!==undefined?equal_:$throwNilPointerError;});BJ=$pkg.method=$newType(0,$kindStruct,"reflect.method","method","reflect",function(name_,pkgPath_,mtyp_,typ_,ifn_,tfn_){this.$val=this;this.name=name_!==undefined?name_:FX.nil;this.pkgPath=pkgPath_!==undefined?pkgPath_:FX.nil;this.mtyp=mtyp_!==undefined?mtyp_:FL.nil;this.typ=typ_!==undefined?typ_:FL.nil;this.ifn=ifn_!==undefined?ifn_:0;this.tfn=tfn_!==undefined?tfn_:0;});BK=$pkg.uncommonType=$newType(0,$kindStruct,"reflect.uncommonType","uncommonType","reflect",function(name_,pkgPath_,methods_){this.$val=this;this.name=name_!==undefined?name_:FX.nil;this.pkgPath=pkgPath_!==undefined?pkgPath_:FX.nil;this.methods=methods_!==undefined?methods_:FZ.nil;});BL=$pkg.ChanDir=$newType(4,$kindInt,"reflect.ChanDir","ChanDir","reflect",null);BM=$pkg.arrayType=$newType(0,$kindStruct,"reflect.arrayType","arrayType","reflect",function(rtype_,elem_,slice_,len_){this.$val=this;this.rtype=rtype_!==undefined?rtype_:new BH.ptr();this.elem=elem_!==undefined?elem_:FL.nil;this.slice=slice_!==undefined?slice_:FL.nil;this.len=len_!==undefined?len_:0;});BN=$pkg.chanType=$newType(0,$kindStruct,"reflect.chanType","chanType","reflect",function(rtype_,elem_,dir_){this.$val=this;this.rtype=rtype_!==undefined?rtype_:new BH.ptr();this.elem=elem_!==undefined?elem_:FL.nil;this.dir=dir_!==undefined?dir_:0;});BO=$pkg.funcType=$newType(0,$kindStruct,"reflect.funcType","funcType","reflect",function(rtype_,dotdotdot_,in$2_,out_){this.$val=this;this.rtype=rtype_!==undefined?rtype_:new BH.ptr();this.dotdotdot=dotdotdot_!==undefined?dotdotdot_:false;this.in$2=in$2_!==undefined?in$2_:GA.nil;this.out=out_!==undefined?out_:GA.nil;});BP=$pkg.imethod=$newType(0,$kindStruct,"reflect.imethod","imethod","reflect",function(name_,pkgPath_,typ_){this.$val=this;this.name=name_!==undefined?name_:FX.nil;this.pkgPath=pkgPath_!==undefined?pkgPath_:FX.nil;this.typ=typ_!==undefined?typ_:FL.nil;});BQ=$pkg.interfaceType=$newType(0,$kindStruct,"reflect.interfaceType","interfaceType","reflect",function(rtype_,methods_){this.$val=this;this.rtype=rtype_!==undefined?rtype_:new BH.ptr();this.methods=methods_!==undefined?methods_:GB.nil;});BR=$pkg.mapType=$newType(0,$kindStruct,"reflect.mapType","mapType","reflect",function(rtype_,key_,elem_,bucket_,hmap_,keysize_,indirectkey_,valuesize_,indirectvalue_,bucketsize_){this.$val=this;this.rtype=rtype_!==undefined?rtype_:new BH.ptr();this.key=key_!==undefined?key_:FL.nil;this.elem=elem_!==undefined?elem_:FL.nil;this.bucket=bucket_!==undefined?bucket_:FL.nil;this.hmap=hmap_!==undefined?hmap_:FL.nil;this.keysize=keysize_!==undefined?keysize_:0;this.indirectkey=indirectkey_!==undefined?indirectkey_:0;this.valuesize=valuesize_!==undefined?valuesize_:0;this.indirectvalue=indirectvalue_!==undefined?indirectvalue_:0;this.bucketsize=bucketsize_!==undefined?bucketsize_:0;});BS=$pkg.ptrType=$newType(0,$kindStruct,"reflect.ptrType","ptrType","reflect",function(rtype_,elem_){this.$val=this;this.rtype=rtype_!==undefined?rtype_:new BH.ptr();this.elem=elem_!==undefined?elem_:FL.nil;});BT=$pkg.sliceType=$newType(0,$kindStruct,"reflect.sliceType","sliceType","reflect",function(rtype_,elem_){this.$val=this;this.rtype=rtype_!==undefined?rtype_:new BH.ptr();this.elem=elem_!==undefined?elem_:FL.nil;});BU=$pkg.structField=$newType(0,$kindStruct,"reflect.structField","structField","reflect",function(name_,pkgPath_,typ_,tag_,offset_){this.$val=this;this.name=name_!==undefined?name_:FX.nil;this.pkgPath=pkgPath_!==undefined?pkgPath_:FX.nil;this.typ=typ_!==undefined?typ_:FL.nil;this.tag=tag_!==undefined?tag_:FX.nil;this.offset=offset_!==undefined?offset_:0;});BV=$pkg.structType=$newType(0,$kindStruct,"reflect.structType","structType","reflect",function(rtype_,fields_){this.$val=this;this.rtype=rtype_!==undefined?rtype_:new BH.ptr();this.fields=fields_!==undefined?fields_:GC.nil;});BW=$pkg.Method=$newType(0,$kindStruct,"reflect.Method","Method","reflect",function(Name_,PkgPath_,Type_,Func_,Index_){this.$val=this;this.Name=Name_!==undefined?Name_:"";this.PkgPath=PkgPath_!==undefined?PkgPath_:"";this.Type=Type_!==undefined?Type_:$ifaceNil;this.Func=Func_!==undefined?Func_:new CZ.ptr();this.Index=Index_!==undefined?Index_:0;});BY=$pkg.StructField=$newType(0,$kindStruct,"reflect.StructField","StructField","reflect",function(Name_,PkgPath_,Type_,Tag_,Offset_,Index_,Anonymous_){this.$val=this;this.Name=Name_!==undefined?Name_:"";this.PkgPath=PkgPath_!==undefined?PkgPath_:"";this.Type=Type_!==undefined?Type_:$ifaceNil;this.Tag=Tag_!==undefined?Tag_:"";this.Offset=Offset_!==undefined?Offset_:0;this.Index=Index_!==undefined?Index_:GP.nil;this.Anonymous=Anonymous_!==undefined?Anonymous_:false;});BZ=$pkg.StructTag=$newType(8,$kindString,"reflect.StructTag","StructTag","reflect",null);CA=$pkg.fieldScan=$newType(0,$kindStruct,"reflect.fieldScan","fieldScan","reflect",function(typ_,index_){this.$val=this;this.typ=typ_!==undefined?typ_:GR.nil;this.index=index_!==undefined?index_:GP.nil;});CZ=$pkg.Value=$newType(0,$kindStruct,"reflect.Value","Value","reflect",function(typ_,ptr_,flag_){this.$val=this;this.typ=typ_!==undefined?typ_:FL.nil;this.ptr=ptr_!==undefined?ptr_:0;this.flag=flag_!==undefined?flag_:0;});DA=$pkg.flag=$newType(4,$kindUintptr,"reflect.flag","flag","reflect",null);DD=$pkg.ValueError=$newType(0,$kindStruct,"reflect.ValueError","ValueError","reflect",function(Method_,Kind_){this.$val=this;this.Method=Method_!==undefined?Method_:"";this.Kind=Kind_!==undefined?Kind_:0;});DF=$pkg.nonEmptyInterface=$newType(0,$kindStruct,"reflect.nonEmptyInterface","nonEmptyInterface","reflect",function(itab_,word_){this.$val=this;this.itab=itab_!==undefined?itab_:GI.nil;this.word=word_!==undefined?word_:0;});FL=$ptrType(BH);FU=$sliceType($String);FV=$ptrType(BI);FW=$arrayType($UnsafePointer,2);FX=$ptrType($String);FY=$ptrType(BK);FZ=$sliceType(BJ);GA=$sliceType(FL);GB=$sliceType(BP);GC=$sliceType(BU);GD=$structType([{prop:"str",name:"str",pkg:"reflect",typ:$String,tag:""}]);GE=$sliceType(CZ);GF=$ptrType(DF);GG=$arrayType($UnsafePointer,100000);GH=$structType([{prop:"ityp",name:"ityp",pkg:"reflect",typ:FL,tag:""},{prop:"typ",name:"typ",pkg:"reflect",typ:FL,tag:""},{prop:"link",name:"link",pkg:"reflect",typ:$UnsafePointer,tag:""},{prop:"bad",name:"bad",pkg:"reflect",typ:$Int32,tag:""},{prop:"unused",name:"unused",pkg:"reflect",typ:$Int32,tag:""},{prop:"fun",name:"fun",pkg:"reflect",typ:GG,tag:""}]);GI=$ptrType(GH);GJ=$sliceType(B.Object);GK=$ptrType($Uint8);GM=$ptrType(BJ);GN=$ptrType(BQ);GO=$ptrType(BP);GP=$sliceType($Int);GQ=$sliceType(CA);GR=$ptrType(BV);GW=$ptrType($UnsafePointer);GY=$sliceType($Uint8);GZ=$sliceType($Int32);HC=$funcType([$String],[$Bool],false);HD=$funcType([$UnsafePointer,$Uintptr,$Uintptr],[$Uintptr],false);HE=$funcType([$UnsafePointer,$UnsafePointer,$Uintptr],[$Bool],false);HG=$arrayType($Uintptr,2);HH=$ptrType(DD);G=function(){var ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq;ad=(function(ad){var ad;});ad((ae=new BH.ptr(0,0,0,0,0,0,FV.nil,FW.zero(),FX.nil,FY.nil,FL.nil,0),new ae.constructor.elem(ae)));ad((af=new BK.ptr(FX.nil,FX.nil,FZ.nil),new af.constructor.elem(af)));ad((ag=new BJ.ptr(FX.nil,FX.nil,FL.nil,FL.nil,0,0),new ag.constructor.elem(ag)));ad((ah=new BM.ptr(new BH.ptr(),FL.nil,FL.nil,0),new ah.constructor.elem(ah)));ad((ai=new BN.ptr(new BH.ptr(),FL.nil,0),new ai.constructor.elem(ai)));ad((aj=new BO.ptr(new BH.ptr(),false,GA.nil,GA.nil),new aj.constructor.elem(aj)));ad((ak=new BQ.ptr(new BH.ptr(),GB.nil),new ak.constructor.elem(ak)));ad((al=new BR.ptr(new BH.ptr(),FL.nil,FL.nil,FL.nil,FL.nil,0,0,0,0,0),new al.constructor.elem(al)));ad((am=new BS.ptr(new BH.ptr(),FL.nil),new am.constructor.elem(am)));ad((an=new BT.ptr(new BH.ptr(),FL.nil),new an.constructor.elem(an)));ad((ao=new BV.ptr(new BH.ptr(),GC.nil),new ao.constructor.elem(ao)));ad((ap=new BP.ptr(FX.nil,FX.nil,FL.nil),new ap.constructor.elem(ap)));ad((aq=new BU.ptr(FX.nil,FX.nil,FL.nil,FX.nil,0),new aq.constructor.elem(aq)));F=true;DM=$assertType(Q(new $Uint8(0)),FL);};H=function(ad){var ad;return ad.jsType;};I=function(ad){var ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj;if(ad.reflectType===undefined){ae=new BH.ptr((($parseInt(ad.size)>>0)>>>0),0,0,0,0,(($parseInt(ad.kind)>>0)<<24>>>24),FV.nil,FW.zero(),L(ad.string),FY.nil,FL.nil,0);ae.jsType=ad;ad.reflectType=ae;af=$methodSet(ad);if(!($internalize(ad.typeName,$String)==="")||!(($parseInt(af.length)===0))){ag=$makeSlice(FZ,$parseInt(af.length));ah=ag;ai=0;while(true){if(!(ai=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+aj]),new BJ.ptr(L(ak.name),L(ak.pkg),I(al),I($funcType(new($global.Array)(ad).concat(al.params),al.results,al.variadic)),0,0),BJ);ai++;}ae.uncommonType=new BK.ptr(L(ad.typeName),L(ad.pkg),ag);ae.uncommonType.jsType=ad;}am=ae.Kind();if(am===17){J(ae,new BM.ptr(new BH.ptr(),I(ad.elem),FL.nil,(($parseInt(ad.len)>>0)>>>0)));}else if(am===18){an=3;if(!!(ad.sendOnly)){an=2;}if(!!(ad.recvOnly)){an=1;}J(ae,new BN.ptr(new BH.ptr(),I(ad.elem),(an>>>0)));}else if(am===19){ao=ad.params;ap=$makeSlice(GA,$parseInt(ao.length));aq=ap;ar=0;while(true){if(!(ar=ap.$length)?$throwRuntimeError("index out of range"):ap.$array[ap.$offset+as]=I(ao[as]);ar++;}at=ad.results;au=$makeSlice(GA,$parseInt(at.length));av=au;aw=0;while(true){if(!(aw=au.$length)?$throwRuntimeError("index out of range"):au.$array[au.$offset+ax]=I(at[ax]);aw++;}J(ae,new BO.ptr($clone(ae,BH),!!(ad.variadic),ap,au));}else if(am===20){ay=ad.methods;az=$makeSlice(GB,$parseInt(ay.length));ba=az;bb=0;while(true){if(!(bb=az.$length)?$throwRuntimeError("index out of range"):az.$array[az.$offset+bc]),new BP.ptr(L(bd.name),L(bd.pkg),I(bd.typ)),BP);bb++;}J(ae,new BQ.ptr($clone(ae,BH),az));}else if(am===21){J(ae,new BR.ptr(new BH.ptr(),I(ad.key),I(ad.elem),FL.nil,FL.nil,0,0,0,0,0));}else if(am===22){J(ae,new BS.ptr(new BH.ptr(),I(ad.elem)));}else if(am===23){J(ae,new BT.ptr(new BH.ptr(),I(ad.elem)));}else if(am===25){be=ad.fields;bf=$makeSlice(GC,$parseInt(be.length));bg=bf;bh=0;while(true){if(!(bh=bf.$length)?$throwRuntimeError("index out of range"):bf.$array[bf.$offset+bi]),new BU.ptr(L(bj.name),L(bj.pkg),I(bj.typ),L(bj.tag),(bi>>>0)),BU);bh++;}J(ae,new BV.ptr($clone(ae,BH),bf));}}return ad.reflectType;};J=function(ad,ae){var ad,ae;ad.kindType=ae;ae.rtype=ad;};L=function(ad){var ad,ae,af,ag,ah,ai,aj,ak;ae=$clone(new GD.ptr(),GD);ae.str=ad;af=ae.str;if(af===""){return FX.nil;}ag=(ah=K[af],ah!==undefined?[ah.v,true]:[FX.nil,false]);ai=ag[0];aj=ag[1];if(!aj){ai=new FX(function(){return af;},function($v){af=$v;});ak=af;(K||$throwRuntimeError("assignment to entry in nil map"))[ak]={k:ak,v:ai};}return ai;};M=function(ad){var ad,ae;ae=ad.Kind();if(ae===1||ae===2||ae===3||ae===4||ae===5||ae===7||ae===8||ae===9||ae===10||ae===12||ae===13||ae===14||ae===17||ae===21||ae===19||ae===24||ae===25){return true;}else if(ae===22){return ad.Elem().Kind()===17;}return false;};N=function(ad,ae,af){var ad,ae,af,ag,ah,ai;ag=H(af).fields;ah=0;while(true){if(!(ah<$parseInt(ag.length))){break;}ai=$internalize(ag[ah].prop,$String);ad[$externalize(ai,$String)]=ae[$externalize(ai,$String)];ah=ah+(1)>>0;}};O=function(ad,ae,af){var ad,ae,af,ag;ag=ad.common();if((ad.Kind()===17)||(ad.Kind()===25)||(ad.Kind()===22)){return new CZ.ptr(ag,ae,(af|(ad.Kind()>>>0))>>>0);}return new CZ.ptr(ag,$newDataPointer(ae,H(ag.ptrTo())),(((af|(ad.Kind()>>>0))>>>0)|64)>>>0);};P=$pkg.MakeSlice=function(ad,ae,af){var ad,ae,af;if(!((ad.Kind()===23))){$panic(new $String("reflect.MakeSlice of non-slice type"));}if(ae<0){$panic(new $String("reflect.MakeSlice: negative len"));}if(af<0){$panic(new $String("reflect.MakeSlice: negative cap"));}if(ae>af){$panic(new $String("reflect.MakeSlice: len > cap"));}return O(ad,$makeSlice(H(ad),ae,af,(function(){return H(ad.Elem()).zero();})),0);};Q=$pkg.TypeOf=function(ad){var ad;if(!F){return new BH.ptr(0,0,0,0,0,0,FV.nil,FW.zero(),FX.nil,FY.nil,FL.nil,0);}if($interfaceIsEqual(ad,$ifaceNil)){return $ifaceNil;}return I(ad.constructor);};R=$pkg.ValueOf=function(ad){var ad;if($interfaceIsEqual(ad,$ifaceNil)){return new CZ.ptr(FL.nil,0,0);}return O(I(ad.constructor),ad.$val,0);};BH.ptr.prototype.ptrTo=function(){var ad;ad=this;return I($ptrType(H(ad)));};BH.prototype.ptrTo=function(){return this.$val.ptrTo();};V=$pkg.SliceOf=function(ad){var ad;return I($sliceType(H(ad)));};W=$pkg.Zero=function(ad){var ad;return O(ad,H(ad).zero(),0);};X=function(ad){var ad,ae;ae=ad.Kind();if(ae===25){return new(H(ad).ptr)();}else if(ae===17){return H(ad).zero();}else{return $newDataPointer(H(ad).zero(),H(ad.ptrTo()));}};Y=function(ad,ae,af){var ad,ae,af,ag,ah,ai;ag=af.common();ah=X(ag);ai=ag.Kind();if(ai===3){ah.$set((ae.$low<<24>>24));}else if(ai===4){ah.$set((ae.$low<<16>>16));}else if(ai===2||ai===5){ah.$set((ae.$low>>0));}else if(ai===6){ah.$set(new $Int64(ae.$high,ae.$low));}else if(ai===8){ah.$set((ae.$low<<24>>>24));}else if(ai===9){ah.$set((ae.$low<<16>>>16));}else if(ai===7||ai===10||ai===12){ah.$set((ae.$low>>>0));}else if(ai===11){ah.$set(ae);}return new CZ.ptr(ag,ah,(((ad|64)>>>0)|(ag.Kind()>>>0))>>>0);};AA=function(ad,ae,af){var ad,ae,af;ad.$set(ae.$get());};AE=function(ad,ae,af){var ad,ae,af,ag,ah;ag=af.$get();if(!(ag.$key===undefined)){ag=ag.$key();}ah=ae[$externalize($internalize(ag,$String),$String)];if(ah===undefined){return 0;}return $newDataPointer(ah.v,H(CC(ad.Elem())));};AF=function(ad,ae,af,ag){var ad,ae,af,ag,ah,ai,aj,ak,al,am;ah=af.$get();ai=ah;if(!(ai.$key===undefined)){ai=ai.$key();}aj=ag.$get();ak=ad.Elem();if(ak.Kind()===25){al=H(ak).zero();N(al,aj,ak);aj=al;}am=new($global.Object)();am.k=ah;am.v=aj;ae[$externalize($internalize(ai,$String),$String)]=am;};AG=function(ad,ae,af){var ad,ae,af,ag;ag=af.$get();if(!(ag.$key===undefined)){ag=ag.$key();}delete ae[$externalize($internalize(ag,$String),$String)];};AI=function(ad,ae){var ad,ae;return new AH.ptr(ad,ae,$keys(ae),0);};AJ=function(ad){var ad,ae,af;ae=ad;af=ae.keys[ae.i];return $newDataPointer(ae.m[$externalize($internalize(af,$String),$String)].k,H(CC(ae.t.Key())));};AK=function(ad){var ad,ae;ae=ad;ae.i=ae.i+(1)>>0;};AL=function(ad){var ad;return $parseInt($keys(ad).length);};AM=function(ad,ae){var ad,ae,af,ag,ah,ai,aj;ad=ad;af=ad.object();if(af===H(ad.typ).nil){return O(ae,H(ae).nil,ad.flag);}ag=null;ah=ae.Kind();ai=ah;switch(0){default:if(ai===18){ag=new(H(ae))();}else if(ai===23){aj=new(H(ae))(af.$array);aj.$offset=af.$offset;aj.$length=af.$length;aj.$capacity=af.$capacity;ag=$newDataPointer(aj,H(CC(ae)));}else if(ai===22){if(ae.Elem().Kind()===25){if($interfaceIsEqual(ae.Elem(),ad.typ.Elem())){ag=af;break;}ag=new(H(ae))();N(ag,af,ae.Elem());break;}ag=new(H(ae))(af.$get,af.$set);}else if(ai===25){ag=new(H(ae).ptr)();N(ag,af,ae);}else if(ai===17||ai===19||ai===20||ai===21||ai===24){ag=ad.ptr;}else{$panic(new DD.ptr("reflect.Convert",ah));}}return new CZ.ptr(ae.common(),ag,(((ad.flag&96)>>>0)|(ae.Kind()>>>0))>>>0);};AO=function(ad,ae,af){var ad,ae,af,ag=FL.nil,ah=FL.nil,ai=0,aj,ak,al,am,an,ao,ap,aq,ar;ae=ae;aj="";if(ae.typ.Kind()===20){ak=ae.typ.kindType;if(af<0||af>=ak.methods.$length){$panic(new $String("reflect: internal error: invalid method index"));}am=(al=ak.methods,((af<0||af>=al.$length)?$throwRuntimeError("index out of range"):al.$array[al.$offset+af]));if(!($pointerIsEqual(am.pkgPath,FX.nil))){$panic(new $String("reflect: "+ad+" of unexported method"));}an=$pointerOfStructConversion(ae.ptr,GF);if(an.itab===GI.nil){$panic(new $String("reflect: "+ad+" of method on nil interface value"));}ah=am.typ;aj=am.name.$get();}else{ao=ae.typ.uncommonType.uncommon();if(ao===FY.nil||af<0||af>=ao.methods.$length){$panic(new $String("reflect: internal error: invalid method index"));}aq=(ap=ao.methods,((af<0||af>=ap.$length)?$throwRuntimeError("index out of range"):ap.$array[ap.$offset+af]));if(!($pointerIsEqual(aq.pkgPath,FX.nil))){$panic(new $String("reflect: "+ad+" of unexported method"));}ah=aq.mtyp;aj=$internalize($methodSet(H(ae.typ))[af].prop,$String);}ar=ae.object();if(M(ae.typ)){ar=new(H(ae.typ))(ar);}ai=ar[$externalize(aj,$String)];return[ag,ah,ai];};AP=function(ad,ae){var ad,ae;ad=ad;if(ad.flag===0){$panic(new DD.ptr("reflect.Value.Interface",0));}if(ae&&!((((ad.flag&32)>>>0)===0))){$panic(new $String("reflect.Value.Interface: cannot return value obtained from unexported field or method"));}if(!((((ad.flag&256)>>>0)===0))){ad=AS("Interface",ad);}if(M(ad.typ)){return new(H(ad.typ))(ad.object());}return ad.object();};AQ=function(ad,ae,af){var ad,ae,af;af.$set(ae);};AR=function(){return"?FIXME?";};AS=function(ad,ae){var ad,ae,af,ag,ah,ai;ae=ae;if(((ae.flag&256)>>>0)===0){$panic(new $String("reflect: internal error: invalid use of makePartialFunc"));}af=AO(ad,ae,(ae.flag>>0)>>9>>0);ag=af[2];ah=ae.object();if(M(ae.typ)){ah=new(H(ae.typ))(ah);}ai=(function(){return ag.apply(ah,$externalize(new($sliceType(B.Object))($global.Array.prototype.slice.call(arguments,[])),GJ));});return new CZ.ptr(ae.Type().common(),ai,(((ae.flag&32)>>>0)|19)>>>0);};BH.ptr.prototype.pointers=function(){var ad,ae;ad=this;ae=ad.Kind();if(ae===22||ae===21||ae===18||ae===19||ae===25||ae===17){return true;}else{return false;}};BH.prototype.pointers=function(){return this.$val.pointers();};BH.ptr.prototype.Comparable=function(){var ad,ae,af;ad=this;ae=ad.Kind();if(ae===19||ae===23||ae===21){return false;}else if(ae===17){return ad.Elem().Comparable();}else if(ae===25){af=0;while(true){if(!(af>0;}}return true;};BH.prototype.Comparable=function(){return this.$val.Comparable();};BK.ptr.prototype.Method=function(ad){var ad,ae=new BW.ptr(),af,ag,ah,ai,aj,ak,al;af=this;if(af===FY.nil||ad<0||ad>=af.methods.$length){$panic(new $String("reflect: Method index out of range"));}ah=(ag=af.methods,((ad<0||ad>=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+ad]));if(!($pointerIsEqual(ah.name,FX.nil))){ae.Name=ah.name.$get();}ai=19;if(!($pointerIsEqual(ah.pkgPath,FX.nil))){ae.PkgPath=ah.pkgPath.$get();ai=(ai|(32))>>>0;}aj=ah.typ;ae.Type=aj;ak=$internalize($methodSet(af.jsType)[ad].prop,$String);al=(function(al){var al;return al[$externalize(ak,$String)].apply(al,$externalize($subslice(new($sliceType(B.Object))($global.Array.prototype.slice.call(arguments,[])),1),GJ));});ae.Func=new CZ.ptr(aj,al,ai);ae.Index=ad;return ae;};BK.prototype.Method=function(ad){return this.$val.Method(ad);};CZ.ptr.prototype.object=function(){var ad,ae,af,ag;ad=this;if((ad.typ.Kind()===17)||(ad.typ.Kind()===25)){return ad.ptr;}if(!((((ad.flag&64)>>>0)===0))){ae=ad.ptr.$get();if(!(ae===$ifaceNil)&&!(ae.constructor===H(ad.typ))){af=ad.typ.Kind();switch(0){default:if(af===11||af===6){ae=new(H(ad.typ))(ae.$high,ae.$low);}else if(af===15||af===16){ae=new(H(ad.typ))(ae.$real,ae.$imag);}else if(af===23){if(ae===ae.constructor.nil){ae=H(ad.typ).nil;break;}ag=new(H(ad.typ))(ae.$array);ag.$offset=ae.$offset;ag.$length=ae.$length;ag.$capacity=ae.$capacity;ae=ag;}}}return ae;}return ad.ptr;};CZ.prototype.object=function(){return this.$val.object();};CZ.ptr.prototype.call=function(ad,ae){var ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo;af=this;ag=af.typ;ah=0;ai=null;if(!((((af.flag&256)>>>0)===0))){aj=AO(ad,af,(af.flag>>0)>>9>>0);ag=aj[1];ah=aj[2];ai=af.object();if(M(af.typ)){ai=new(H(af.typ))(ai);}}else{ah=af.object();}if(ah===0){$panic(new $String("reflect.Value.Call: call of nil function"));}ak=ad==="CallSlice";al=ag.NumIn();if(ak){if(!ag.IsVariadic()){$panic(new $String("reflect: CallSlice of non-variadic function"));}if(ae.$lengthal){$panic(new $String("reflect: CallSlice with too many input arguments"));}}else{if(ag.IsVariadic()){al=al-(1)>>0;}if(ae.$lengthal){$panic(new $String("reflect: Call with too many input arguments"));}}am=ae;an=0;while(true){if(!(an=am.$length)?$throwRuntimeError("index out of range"):am.$array[am.$offset+an]);if(ao.Kind()===0){$panic(new $String("reflect: "+ad+" using zero Value argument"));}an++;}ap=0;while(true){if(!(ap=ae.$length)?$throwRuntimeError("index out of range"):ae.$array[ae.$offset+ap]).Type();ar=ag.In(ap);as=aq;at=ar;if(!as.AssignableTo(at)){$panic(new $String("reflect: "+ad+" using "+as.String()+" as type "+at.String()));}ap=ap+(1)>>0;}if(!ak&&ag.IsVariadic()){au=ae.$length-al>>0;av=P(ag.In(al),au,au);aw=ag.In(al).Elem();ax=0;while(true){if(!(ax>0,((ay<0||ay>=ae.$length)?$throwRuntimeError("index out of range"):ae.$array[ae.$offset+ay]));ba=az.Type();if(!ba.AssignableTo(aw)){$panic(new $String("reflect: cannot use "+ba.String()+" as type "+aw.String()+" in "+ad));}av.Index(ax).Set(az);ax=ax+(1)>>0;}bb=ae;ae=$makeSlice(GE,(al+1>>0));$copySlice($subslice(ae,0,al),bb);(al<0||al>=ae.$length)?$throwRuntimeError("index out of range"):ae.$array[ae.$offset+al]=av;}bc=ae.$length;if(!((bc===ag.NumIn()))){$panic(new $String("reflect.Value.Call: wrong argument count"));}bd=ag.NumOut();be=new($global.Array)(ag.NumIn());bf=ae;bg=0;while(true){if(!(bg=bf.$length)?$throwRuntimeError("index out of range"):bf.$array[bf.$offset+bg]);be[bh]=AW(ag.In(bh),bi.assignTo("reflect.Value.Call",ag.In(bh).common(),0).object());bg++;}bj=ah.apply(ai,be);bk=bd;if(bk===0){return GE.nil;}else if(bk===1){return new GE([$clone(O(ag.Out(0),AV(ag.Out(0),bj),0),CZ)]);}else{bl=$makeSlice(GE,bd);bm=bl;bn=0;while(true){if(!(bn=bl.$length)?$throwRuntimeError("index out of range"):bl.$array[bl.$offset+bo]=O(ag.Out(bo),AV(ag.Out(bo),bj[bo]),0);bn++;}return bl;}};CZ.prototype.call=function(ad,ae){return this.$val.call(ad,ae);};CZ.ptr.prototype.Cap=function(){var ad,ae,af;ad=this;ae=new DA(ad.flag).kind();af=ae;if(af===17){return ad.typ.Len();}else if(af===18||af===23){return $parseInt(ad.object().$capacity)>>0;}$panic(new DD.ptr("reflect.Value.Cap",ae));};CZ.prototype.Cap=function(){return this.$val.Cap();};AV=function(ad,ae){var ad,ae;if($interfaceIsEqual(ad,I(AT))){return new(AU)(ae);}return ae;};AW=function(ad,ae){var ad,ae;if($interfaceIsEqual(ad,I(AT))){return ae.Object;}return ae;};CZ.ptr.prototype.Elem=function(){var ad,ae,af,ag,ah,ai,aj,ak;ad=this;ae=new DA(ad.flag).kind();af=ae;if(af===20){ag=ad.object();if(ag===$ifaceNil){return new CZ.ptr(FL.nil,0,0);}ah=I(ag.constructor);return O(ah,ag.$val,(ad.flag&32)>>>0);}else if(af===22){if(ad.IsNil()){return new CZ.ptr(FL.nil,0,0);}ai=ad.object();aj=ad.typ.kindType;ak=(((((ad.flag&32)>>>0)|64)>>>0)|128)>>>0;ak=(ak|((aj.elem.Kind()>>>0)))>>>0;return new CZ.ptr(aj.elem,AV(aj.elem,ai),ak);}else{$panic(new DD.ptr("reflect.Value.Elem",ae));}};CZ.prototype.Elem=function(){return this.$val.Elem();};CZ.ptr.prototype.Field=function(ad){var ad,ae,af,ag,ah,ai,aj,ak,al;ae=this;new DA(ae.flag).mustBe(25);af=ae.typ.kindType;if(ad<0||ad>=af.fields.$length){$panic(new $String("reflect: Field index out of range"));}ah=(ag=af.fields,((ad<0||ad>=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+ad]));ai=$internalize(H(ae.typ).fields[ad].prop,$String);aj=ah.typ;ak=(ae.flag&224)>>>0;if(!($pointerIsEqual(ah.pkgPath,FX.nil))){ak=(ak|(32))>>>0;}ak=(ak|((aj.Kind()>>>0)))>>>0;al=ae.ptr;if(!((((ak&64)>>>0)===0))&&!((aj.Kind()===17))&&!((aj.Kind()===25))){return new CZ.ptr(aj,new(H(CC(aj)))((function(){return AV(aj,al[$externalize(ai,$String)]);}),(function(am){var am;al[$externalize(ai,$String)]=AW(aj,am);})),ak);}return O(aj,AV(aj,al[$externalize(ai,$String)]),ak);};CZ.prototype.Field=function(ad){return this.$val.Field(ad);};CZ.ptr.prototype.Index=function(ad){var ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as;ae=this;af=new DA(ae.flag).kind();ag=af;if(ag===17){ah=ae.typ.kindType;if(ad<0||ad>(ah.len>>0)){$panic(new $String("reflect: array index out of range"));}ai=ah.elem;aj=(ae.flag&224)>>>0;aj=(aj|((ai.Kind()>>>0)))>>>0;ak=ae.ptr;if(!((((aj&64)>>>0)===0))&&!((ai.Kind()===17))&&!((ai.Kind()===25))){return new CZ.ptr(ai,new(H(CC(ai)))((function(){return AV(ai,ak[ad]);}),(function(al){var al;ak[ad]=AW(ai,al);})),aj);}return O(ai,AV(ai,ak[ad]),aj);}else if(ag===23){al=ae.object();if(ad<0||ad>=($parseInt(al.$length)>>0)){$panic(new $String("reflect: slice index out of range"));}am=ae.typ.kindType;an=am.elem;ao=(192|((ae.flag&32)>>>0))>>>0;ao=(ao|((an.Kind()>>>0)))>>>0;ad=ad+(($parseInt(al.$offset)>>0))>>0;ap=al.$array;if(!((((ao&64)>>>0)===0))&&!((an.Kind()===17))&&!((an.Kind()===25))){return new CZ.ptr(an,new(H(CC(an)))((function(){return AV(an,ap[ad]);}),(function(aq){var aq;ap[ad]=AW(an,aq);})),ao);}return O(an,AV(an,ap[ad]),ao);}else if(ag===24){aq=ae.ptr.$get();if(ad<0||ad>=aq.length){$panic(new $String("reflect: string index out of range"));}ar=(((ae.flag&32)>>>0)|8)>>>0;as=aq.charCodeAt(ad);return new CZ.ptr(DM,new GK(function(){return as;},function($v){as=$v;}),(ar|64)>>>0);}else{$panic(new DD.ptr("reflect.Value.Index",af));}};CZ.prototype.Index=function(ad){return this.$val.Index(ad);};CZ.ptr.prototype.IsNil=function(){var ad,ae,af;ad=this;ae=new DA(ad.flag).kind();af=ae;if(af===18||af===22||af===23){return ad.object()===H(ad.typ).nil;}else if(af===19){return ad.object()===$throwNilPointerError;}else if(af===21){return ad.object()===false;}else if(af===20){return ad.object()===$ifaceNil;}else{$panic(new DD.ptr("reflect.Value.IsNil",ae));}};CZ.prototype.IsNil=function(){return this.$val.IsNil();};CZ.ptr.prototype.Len=function(){var ad,ae,af;ad=this;ae=new DA(ad.flag).kind();af=ae;if(af===17||af===24){return $parseInt(ad.object().length);}else if(af===23){return $parseInt(ad.object().$length)>>0;}else if(af===18){return $parseInt(ad.object().$buffer.length)>>0;}else if(af===21){return $parseInt($keys(ad.object()).length);}else{$panic(new DD.ptr("reflect.Value.Len",ae));}};CZ.prototype.Len=function(){return this.$val.Len();};CZ.ptr.prototype.Pointer=function(){var ad,ae,af;ad=this;ae=new DA(ad.flag).kind();af=ae;if(af===18||af===21||af===22||af===26){if(ad.IsNil()){return 0;}return ad.object();}else if(af===19){if(ad.IsNil()){return 0;}return 1;}else if(af===23){if(ad.IsNil()){return 0;}return ad.object().$array;}else{$panic(new DD.ptr("reflect.Value.Pointer",ae));}};CZ.prototype.Pointer=function(){return this.$val.Pointer();};CZ.ptr.prototype.Set=function(ad){var ad,ae,af;ae=this;ad=ad;new DA(ae.flag).mustBeAssignable();new DA(ad.flag).mustBeExported();ad=ad.assignTo("reflect.Set",ae.typ,0);if(!((((ae.flag&64)>>>0)===0))){af=ae.typ.Kind();if(af===17){$copy(ae.ptr,ad.ptr,H(ae.typ));}else if(af===20){ae.ptr.$set(AP(ad,false));}else if(af===25){N(ae.ptr,ad.ptr,ae.typ);}else{ae.ptr.$set(ad.object());}return;}ae.ptr=ad.ptr;};CZ.prototype.Set=function(ad){return this.$val.Set(ad);};CZ.ptr.prototype.SetCap=function(ad){var ad,ae,af,ag;ae=this;new DA(ae.flag).mustBeAssignable();new DA(ae.flag).mustBe(23);af=ae.ptr.$get();if(ad<($parseInt(af.$length)>>0)||ad>($parseInt(af.$capacity)>>0)){$panic(new $String("reflect: slice capacity out of range in SetCap"));}ag=new(H(ae.typ))(af.$array);ag.$offset=af.$offset;ag.$length=af.$length;ag.$capacity=ad;ae.ptr.$set(ag);};CZ.prototype.SetCap=function(ad){return this.$val.SetCap(ad);};CZ.ptr.prototype.SetLen=function(ad){var ad,ae,af,ag;ae=this;new DA(ae.flag).mustBeAssignable();new DA(ae.flag).mustBe(23);af=ae.ptr.$get();if(ad<0||ad>($parseInt(af.$capacity)>>0)){$panic(new $String("reflect: slice length out of range in SetLen"));}ag=new(H(ae.typ))(af.$array);ag.$offset=af.$offset;ag.$length=ad;ag.$capacity=af.$capacity;ae.ptr.$set(ag);};CZ.prototype.SetLen=function(ad){return this.$val.SetLen(ad);};CZ.ptr.prototype.Slice=function(ad,ae){var ad,ae,af,ag,ah,ai,aj,ak,al,am;af=this;ag=0;ah=$ifaceNil;ai=null;aj=new DA(af.flag).kind();ak=aj;if(ak===17){if(((af.flag&128)>>>0)===0){$panic(new $String("reflect.Value.Slice: slice of unaddressable array"));}al=af.typ.kindType;ag=(al.len>>0);ah=V(al.elem);ai=new(H(ah))(af.object());}else if(ak===23){ah=af.typ;ai=af.object();ag=$parseInt(ai.$capacity)>>0;}else if(ak===24){am=af.ptr.$get();if(ad<0||aeam.length){$panic(new $String("reflect.Value.Slice: string slice index out of bounds"));}return R(new $String(am.substring(ad,ae)));}else{$panic(new DD.ptr("reflect.Value.Slice",aj));}if(ad<0||aeag){$panic(new $String("reflect.Value.Slice: slice index out of bounds"));}return O(ah,$subslice(ai,ad,ae),(af.flag&32)>>>0);};CZ.prototype.Slice=function(ad,ae){return this.$val.Slice(ad,ae);};CZ.ptr.prototype.Slice3=function(ad,ae,af){var ad,ae,af,ag,ah,ai,aj,ak,al,am;ag=this;ah=0;ai=$ifaceNil;aj=null;ak=new DA(ag.flag).kind();al=ak;if(al===17){if(((ag.flag&128)>>>0)===0){$panic(new $String("reflect.Value.Slice: slice of unaddressable array"));}am=ag.typ.kindType;ah=(am.len>>0);ai=V(am.elem);aj=new(H(ai))(ag.object());}else if(al===23){ai=ag.typ;aj=ag.object();ah=$parseInt(aj.$capacity)>>0;}else{$panic(new DD.ptr("reflect.Value.Slice3",ak));}if(ad<0||aeah){$panic(new $String("reflect.Value.Slice3: slice index out of bounds"));}return O(ai,$subslice(aj,ad,ae,af),(ag.flag&32)>>>0);};CZ.prototype.Slice3=function(ad,ae,af){return this.$val.Slice3(ad,ae,af);};CZ.ptr.prototype.Close=function(){var ad;ad=this;new DA(ad.flag).mustBe(18);new DA(ad.flag).mustBeExported();$close(ad.object());};CZ.prototype.Close=function(){return this.$val.Close();};CZ.ptr.prototype.TrySend=function(ad){var ad,ae,af,ag;ae=this;ad=ad;new DA(ae.flag).mustBe(18);new DA(ae.flag).mustBeExported();af=ae.typ.kindType;if(((af.dir>>0)&2)===0){$panic(new $String("reflect: send on recv-only channel"));}new DA(ad.flag).mustBeExported();ag=ae.object();if(!!!(ag.$closed)&&($parseInt(ag.$recvQueue.length)===0)&&($parseInt(ag.$buffer.length)===($parseInt(ag.$capacity)>>0))){return false;}ad=ad.assignTo("reflect.Value.Send",af.elem,0);$send(ag,ad.object());return true;};CZ.prototype.TrySend=function(ad){return this.$val.TrySend(ad);};CZ.ptr.prototype.Send=function(ad){var ad,ae;ae=this;ad=ad;$panic(new A.NotSupportedError.ptr("reflect.Value.Send, use reflect.Value.TrySend if possible"));};CZ.prototype.Send=function(ad){return this.$val.Send(ad);};CZ.ptr.prototype.TryRecv=function(){var ad=new CZ.ptr(),ae=false,af,ag,ah,ai,aj,ak,al;af=this;new DA(af.flag).mustBe(18);new DA(af.flag).mustBeExported();ag=af.typ.kindType;if(((ag.dir>>0)&1)===0){$panic(new $String("reflect: recv on send-only channel"));}ah=$recv(af.object());if(ah.constructor===$global.Function){ai=new CZ.ptr(FL.nil,0,0);aj=false;ad=ai;ae=aj;return[ad,ae];}ak=O(ag.elem,ah[0],0);al=!!(ah[1]);ad=ak;ae=al;return[ad,ae];};CZ.prototype.TryRecv=function(){return this.$val.TryRecv();};CZ.ptr.prototype.Recv=function(){var ad=new CZ.ptr(),ae=false,af;af=this;$panic(new A.NotSupportedError.ptr("reflect.Value.Recv, use reflect.Value.TryRecv if possible"));};CZ.prototype.Recv=function(){return this.$val.Recv();};BG.prototype.String=function(){var ad;ad=this.$val;if((ad>>0)=BX.$length)?$throwRuntimeError("index out of range"):BX.$array[BX.$offset+ad]);}return"kind"+C.Itoa((ad>>0));};$ptrType(BG).prototype.String=function(){return new BG(this.$get()).String();};BK.ptr.prototype.uncommon=function(){var ad;ad=this;return ad;};BK.prototype.uncommon=function(){return this.$val.uncommon();};BK.ptr.prototype.PkgPath=function(){var ad;ad=this;if(ad===FY.nil||$pointerIsEqual(ad.pkgPath,FX.nil)){return"";}return ad.pkgPath.$get();};BK.prototype.PkgPath=function(){return this.$val.PkgPath();};BK.ptr.prototype.Name=function(){var ad;ad=this;if(ad===FY.nil||$pointerIsEqual(ad.name,FX.nil)){return"";}return ad.name.$get();};BK.prototype.Name=function(){return this.$val.Name();};BH.ptr.prototype.String=function(){var ad;ad=this;return ad.string.$get();};BH.prototype.String=function(){return this.$val.String();};BH.ptr.prototype.Size=function(){var ad;ad=this;return ad.size;};BH.prototype.Size=function(){return this.$val.Size();};BH.ptr.prototype.Bits=function(){var ad,ae;ad=this;if(ad===FL.nil){$panic(new $String("reflect: Bits of nil Type"));}ae=ad.Kind();if(ae<2||ae>16){$panic(new $String("reflect: Bits of non-arithmetic Type "+ad.String()));}return(ad.size>>0)*8>>0;};BH.prototype.Bits=function(){return this.$val.Bits();};BH.ptr.prototype.Align=function(){var ad;ad=this;return(ad.align>>0);};BH.prototype.Align=function(){return this.$val.Align();};BH.ptr.prototype.FieldAlign=function(){var ad;ad=this;return(ad.fieldAlign>>0);};BH.prototype.FieldAlign=function(){return this.$val.FieldAlign();};BH.ptr.prototype.Kind=function(){var ad;ad=this;return(((ad.kind&31)>>>0)>>>0);};BH.prototype.Kind=function(){return this.$val.Kind();};BH.ptr.prototype.common=function(){var ad;ad=this;return ad;};BH.prototype.common=function(){return this.$val.common();};BK.ptr.prototype.NumMethod=function(){var ad;ad=this;if(ad===FY.nil){return 0;}return ad.methods.$length;};BK.prototype.NumMethod=function(){return this.$val.NumMethod();};BK.ptr.prototype.MethodByName=function(ad){var ad,ae=new BW.ptr(),af=false,ag,ah,ai,aj,ak,al,am,an;ag=this;if(ag===FY.nil){return[ae,af];}ah=GM.nil;ai=ag.methods;aj=0;while(true){if(!(aj=al.$length)?$throwRuntimeError("index out of range"):al.$array[al.$offset+ak]));if(!($pointerIsEqual(ah.name,FX.nil))&&ah.name.$get()===ad){am=$clone(ag.Method(ak),BW);an=true;$copy(ae,am,BW);af=an;return[ae,af];}aj++;}return[ae,af];};BK.prototype.MethodByName=function(ad){return this.$val.MethodByName(ad);};BH.ptr.prototype.NumMethod=function(){var ad,ae;ad=this;if(ad.Kind()===20){ae=ad.kindType;return ae.NumMethod();}return ad.uncommonType.NumMethod();};BH.prototype.NumMethod=function(){return this.$val.NumMethod();};BH.ptr.prototype.Method=function(ad){var ad,ae=new BW.ptr(),af,ag;af=this;if(af.Kind()===20){ag=af.kindType;$copy(ae,ag.Method(ad),BW);return ae;}$copy(ae,af.uncommonType.Method(ad),BW);return ae;};BH.prototype.Method=function(ad){return this.$val.Method(ad);};BH.ptr.prototype.MethodByName=function(ad){var ad,ae=new BW.ptr(),af=false,ag,ah,ai,aj;ag=this;if(ag.Kind()===20){ah=ag.kindType;ai=ah.MethodByName(ad);$copy(ae,ai[0],BW);af=ai[1];return[ae,af];}aj=ag.uncommonType.MethodByName(ad);$copy(ae,aj[0],BW);af=aj[1];return[ae,af];};BH.prototype.MethodByName=function(ad){return this.$val.MethodByName(ad);};BH.ptr.prototype.PkgPath=function(){var ad;ad=this;return ad.uncommonType.PkgPath();};BH.prototype.PkgPath=function(){return this.$val.PkgPath();};BH.ptr.prototype.Name=function(){var ad;ad=this;return ad.uncommonType.Name();};BH.prototype.Name=function(){return this.$val.Name();};BH.ptr.prototype.ChanDir=function(){var ad,ae;ad=this;if(!((ad.Kind()===18))){$panic(new $String("reflect: ChanDir of non-chan type"));}ae=ad.kindType;return(ae.dir>>0);};BH.prototype.ChanDir=function(){return this.$val.ChanDir();};BH.ptr.prototype.IsVariadic=function(){var ad,ae;ad=this;if(!((ad.Kind()===19))){$panic(new $String("reflect: IsVariadic of non-func type"));}ae=ad.kindType;return ae.dotdotdot;};BH.prototype.IsVariadic=function(){return this.$val.IsVariadic();};BH.ptr.prototype.Elem=function(){var ad,ae,af,ag,ah,ai,aj;ad=this;ae=ad.Kind();if(ae===17){af=ad.kindType;return CR(af.elem);}else if(ae===18){ag=ad.kindType;return CR(ag.elem);}else if(ae===21){ah=ad.kindType;return CR(ah.elem);}else if(ae===22){ai=ad.kindType;return CR(ai.elem);}else if(ae===23){aj=ad.kindType;return CR(aj.elem);}$panic(new $String("reflect: Elem of invalid type"));};BH.prototype.Elem=function(){return this.$val.Elem();};BH.ptr.prototype.Field=function(ad){var ad,ae,af;ae=this;if(!((ae.Kind()===25))){$panic(new $String("reflect: Field of non-struct type"));}af=ae.kindType;return af.Field(ad);};BH.prototype.Field=function(ad){return this.$val.Field(ad);};BH.ptr.prototype.FieldByIndex=function(ad){var ad,ae,af;ae=this;if(!((ae.Kind()===25))){$panic(new $String("reflect: FieldByIndex of non-struct type"));}af=ae.kindType;return af.FieldByIndex(ad);};BH.prototype.FieldByIndex=function(ad){return this.$val.FieldByIndex(ad);};BH.ptr.prototype.FieldByName=function(ad){var ad,ae,af;ae=this;if(!((ae.Kind()===25))){$panic(new $String("reflect: FieldByName of non-struct type"));}af=ae.kindType;return af.FieldByName(ad);};BH.prototype.FieldByName=function(ad){return this.$val.FieldByName(ad);};BH.ptr.prototype.FieldByNameFunc=function(ad){var ad,ae,af;ae=this;if(!((ae.Kind()===25))){$panic(new $String("reflect: FieldByNameFunc of non-struct type"));}af=ae.kindType;return af.FieldByNameFunc(ad);};BH.prototype.FieldByNameFunc=function(ad){return this.$val.FieldByNameFunc(ad);};BH.ptr.prototype.In=function(ad){var ad,ae,af,ag;ae=this;if(!((ae.Kind()===19))){$panic(new $String("reflect: In of non-func type"));}af=ae.kindType;return CR((ag=af.in$2,((ad<0||ad>=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+ad])));};BH.prototype.In=function(ad){return this.$val.In(ad);};BH.ptr.prototype.Key=function(){var ad,ae;ad=this;if(!((ad.Kind()===21))){$panic(new $String("reflect: Key of non-map type"));}ae=ad.kindType;return CR(ae.key);};BH.prototype.Key=function(){return this.$val.Key();};BH.ptr.prototype.Len=function(){var ad,ae;ad=this;if(!((ad.Kind()===17))){$panic(new $String("reflect: Len of non-array type"));}ae=ad.kindType;return(ae.len>>0);};BH.prototype.Len=function(){return this.$val.Len();};BH.ptr.prototype.NumField=function(){var ad,ae;ad=this;if(!((ad.Kind()===25))){$panic(new $String("reflect: NumField of non-struct type"));}ae=ad.kindType;return ae.fields.$length;};BH.prototype.NumField=function(){return this.$val.NumField();};BH.ptr.prototype.NumIn=function(){var ad,ae;ad=this;if(!((ad.Kind()===19))){$panic(new $String("reflect: NumIn of non-func type"));}ae=ad.kindType;return ae.in$2.$length;};BH.prototype.NumIn=function(){return this.$val.NumIn();};BH.ptr.prototype.NumOut=function(){var ad,ae;ad=this;if(!((ad.Kind()===19))){$panic(new $String("reflect: NumOut of non-func type"));}ae=ad.kindType;return ae.out.$length;};BH.prototype.NumOut=function(){return this.$val.NumOut();};BH.ptr.prototype.Out=function(ad){var ad,ae,af,ag;ae=this;if(!((ae.Kind()===19))){$panic(new $String("reflect: Out of non-func type"));}af=ae.kindType;return CR((ag=af.out,((ad<0||ad>=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+ad])));};BH.prototype.Out=function(ad){return this.$val.Out(ad);};BL.prototype.String=function(){var ad,ae;ad=this.$val;ae=ad;if(ae===2){return"chan<-";}else if(ae===1){return"<-chan";}else if(ae===3){return"chan";}return"ChanDir"+C.Itoa((ad>>0));};$ptrType(BL).prototype.String=function(){return new BL(this.$get()).String();};BQ.ptr.prototype.Method=function(ad){var ad,ae=new BW.ptr(),af,ag,ah;af=this;if(ad<0||ad>=af.methods.$length){return ae;}ah=(ag=af.methods,((ad<0||ad>=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+ad]));ae.Name=ah.name.$get();if(!($pointerIsEqual(ah.pkgPath,FX.nil))){ae.PkgPath=ah.pkgPath.$get();}ae.Type=CR(ah.typ);ae.Index=ad;return ae;};BQ.prototype.Method=function(ad){return this.$val.Method(ad);};BQ.ptr.prototype.NumMethod=function(){var ad;ad=this;return ad.methods.$length;};BQ.prototype.NumMethod=function(){return this.$val.NumMethod();};BQ.ptr.prototype.MethodByName=function(ad){var ad,ae=new BW.ptr(),af=false,ag,ah,ai,aj,ak,al,am,an;ag=this;if(ag===GN.nil){return[ae,af];}ah=GO.nil;ai=ag.methods;aj=0;while(true){if(!(aj=al.$length)?$throwRuntimeError("index out of range"):al.$array[al.$offset+ak]));if(ah.name.$get()===ad){am=$clone(ag.Method(ak),BW);an=true;$copy(ae,am,BW);af=an;return[ae,af];}aj++;}return[ae,af];};BQ.prototype.MethodByName=function(ad){return this.$val.MethodByName(ad);};BZ.prototype.Get=function(ad){var ad,ae,af,ag,ah,ai,aj;ae=this.$val;while(true){if(!(!(ae===""))){break;}af=0;while(true){if(!(af>0;}ae=ae.substring(af);if(ae===""){break;}af=0;while(true){if(!(af>0;}if((af+1>>0)>=ae.length||!((ae.charCodeAt(af)===58))||!((ae.charCodeAt((af+1>>0))===34))){break;}ag=ae.substring(0,af);ae=ae.substring((af+1>>0));af=1;while(true){if(!(af>0;}af=af+(1)>>0;}if(af>=ae.length){break;}ah=ae.substring(0,(af+1>>0));ae=ae.substring((af+1>>0));if(ad===ag){ai=C.Unquote(ah);aj=ai[0];return aj;}}return"";};$ptrType(BZ).prototype.Get=function(ad){return new BZ(this.$get()).Get(ad);};BV.ptr.prototype.Field=function(ad){var ad,ae=new BY.ptr(),af,ag,ah,ai;af=this;if(ad<0||ad>=af.fields.$length){return ae;}ah=(ag=af.fields,((ad<0||ad>=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+ad]));ae.Type=CR(ah.typ);if(!($pointerIsEqual(ah.name,FX.nil))){ae.Name=ah.name.$get();}else{ai=ae.Type;if(ai.Kind()===22){ai=ai.Elem();}ae.Name=ai.Name();ae.Anonymous=true;}if(!($pointerIsEqual(ah.pkgPath,FX.nil))){ae.PkgPath=ah.pkgPath.$get();}if(!($pointerIsEqual(ah.tag,FX.nil))){ae.Tag=ah.tag.$get();}ae.Offset=ah.offset;ae.Index=new GP([ad]);return ae;};BV.prototype.Field=function(ad){return this.$val.Field(ad);};BV.ptr.prototype.FieldByIndex=function(ad){var ad,ae=new BY.ptr(),af,ag,ah,ai,aj,ak;af=this;ae.Type=CR(af.rtype);ag=ad;ah=0;while(true){if(!(ah=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+ah]);if(ai>0){ak=ae.Type;if((ak.Kind()===22)&&(ak.Elem().Kind()===25)){ak=ak.Elem();}ae.Type=ak;}$copy(ae,ae.Type.Field(aj),BY);ah++;}return ae;};BV.prototype.FieldByIndex=function(ad){return this.$val.FieldByIndex(ad);};BV.ptr.prototype.FieldByNameFunc=function(ad){var ad,ae=new BY.ptr(),af=false,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo;ag=this;ah=new GQ([]);ai=new GQ([new CA.ptr(ag,GP.nil)]);aj=false;ak=(al=new $Map(),al);while(true){if(!(ai.$length>0)){break;}an=ai;ao=$subslice(ah,0,0);ah=an;ai=ao;ap=aj;aj=false;aq=ah;ar=0;while(true){if(!(ar=aq.$length)?$throwRuntimeError("index out of range"):aq.$array[aq.$offset+ar]),CA);at=as.typ;if((au=ak[at.$key()],au!==undefined?au.v:false)){ar++;continue;}av=at;(ak||$throwRuntimeError("assignment to entry in nil map"))[av.$key()]={k:av,v:true};aw=at.fields;ax=0;while(true){if(!(ax=az.$length)?$throwRuntimeError("index out of range"):az.$array[az.$offset+ay]));bb="";bc=FL.nil;if(!($pointerIsEqual(ba.name,FX.nil))){bb=ba.name.$get();}else{bc=ba.typ;if(bc.Kind()===22){bc=bc.Elem().common();}bb=bc.Name();}if(ad(bb)){if((bd=ap[at.$key()],bd!==undefined?bd.v:0)>1||af){be=new BY.ptr("","",$ifaceNil,"",0,GP.nil,false);bf=false;$copy(ae,be,BY);af=bf;return[ae,af];}$copy(ae,at.Field(ay),BY);ae.Index=GP.nil;ae.Index=$appendSlice(ae.Index,as.index);ae.Index=$append(ae.Index,ay);af=true;ax++;continue;}if(af||bc===FL.nil||!((bc.Kind()===25))){ax++;continue;}bg=bc.kindType;if((bh=aj[bg.$key()],bh!==undefined?bh.v:0)>0){bi=bg;(aj||$throwRuntimeError("assignment to entry in nil map"))[bi.$key()]={k:bi,v:2};ax++;continue;}if(aj===false){aj=(bj=new $Map(),bj);}bl=bg;(aj||$throwRuntimeError("assignment to entry in nil map"))[bl.$key()]={k:bl,v:1};if((bm=ap[at.$key()],bm!==undefined?bm.v:0)>1){bn=bg;(aj||$throwRuntimeError("assignment to entry in nil map"))[bn.$key()]={k:bn,v:2};}bo=GP.nil;bo=$appendSlice(bo,as.index);bo=$append(bo,ay);ai=$append(ai,new CA.ptr(bg,bo));ax++;}ar++;}if(af){break;}}return[ae,af];};BV.prototype.FieldByNameFunc=function(ad){return this.$val.FieldByNameFunc(ad);};BV.ptr.prototype.FieldByName=function(ad){var ad,ae=new BY.ptr(),af=false,ag,ah,ai,aj,ak,al,am,an,ao,ap;ag=this;ah=false;if(!(ad==="")){ai=ag.fields;aj=0;while(true){if(!(aj=al.$length)?$throwRuntimeError("index out of range"):al.$array[al.$offset+ak]));if($pointerIsEqual(am.name,FX.nil)){ah=true;aj++;continue;}if(am.name.$get()===ad){an=$clone(ag.Field(ak),BY);ao=true;$copy(ae,an,BY);af=ao;return[ae,af];}aj++;}}if(!ah){return[ae,af];}ap=ag.FieldByNameFunc((function(aq){var aq;return aq===ad;}));$copy(ae,ap[0],BY);af=ap[1];return[ae,af];};BV.prototype.FieldByName=function(ad){return this.$val.FieldByName(ad);};CC=$pkg.PtrTo=function(ad){var ad;return $assertType(ad,FL).ptrTo();};BH.ptr.prototype.Implements=function(ad){var ad,ae;ae=this;if($interfaceIsEqual(ad,$ifaceNil)){$panic(new $String("reflect: nil type passed to Type.Implements"));}if(!((ad.Kind()===20))){$panic(new $String("reflect: non-interface type passed to Type.Implements"));}return CE($assertType(ad,FL),ae);};BH.prototype.Implements=function(ad){return this.$val.Implements(ad);};BH.ptr.prototype.AssignableTo=function(ad){var ad,ae,af;ae=this;if($interfaceIsEqual(ad,$ifaceNil)){$panic(new $String("reflect: nil type passed to Type.AssignableTo"));}af=$assertType(ad,FL);return CF(af,ae)||CE(af,ae);};BH.prototype.AssignableTo=function(ad){return this.$val.AssignableTo(ad);};BH.ptr.prototype.ConvertibleTo=function(ad){var ad,ae,af;ae=this;if($interfaceIsEqual(ad,$ifaceNil)){$panic(new $String("reflect: nil type passed to Type.ConvertibleTo"));}af=$assertType(ad,FL);return!(EH(af,ae)===$throwNilPointerError);};BH.prototype.ConvertibleTo=function(ad){return this.$val.ConvertibleTo(ad);};CE=function(ad,ae){var ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at;if(!((ad.Kind()===20))){return false;}af=ad.kindType;if(af.methods.$length===0){return true;}if(ae.Kind()===20){ag=ae.kindType;ah=0;ai=0;while(true){if(!(ai=aj.$length)?$throwRuntimeError("index out of range"):aj.$array[aj.$offset+ah]));am=(al=ag.methods,((ai<0||ai>=al.$length)?$throwRuntimeError("index out of range"):al.$array[al.$offset+ai]));if($pointerIsEqual(am.name,ak.name)&&$pointerIsEqual(am.pkgPath,ak.pkgPath)&&am.typ===ak.typ){ah=ah+(1)>>0;if(ah>=af.methods.$length){return true;}}ai=ai+(1)>>0;}return false;}an=ae.uncommonType.uncommon();if(an===FY.nil){return false;}ao=0;ap=0;while(true){if(!(ap=aq.$length)?$throwRuntimeError("index out of range"):aq.$array[aq.$offset+ao]));at=(as=an.methods,((ap<0||ap>=as.$length)?$throwRuntimeError("index out of range"):as.$array[as.$offset+ap]));if($pointerIsEqual(at.name,ar.name)&&$pointerIsEqual(at.pkgPath,ar.pkgPath)&&at.mtyp===ar.typ){ao=ao+(1)>>0;if(ao>=af.methods.$length){return true;}}ap=ap+(1)>>0;}return false;};CF=function(ad,ae){var ad,ae;if(ad===ae){return true;}if(!(ad.Name()==="")&&!(ae.Name()==="")||!((ad.Kind()===ae.Kind()))){return false;}return CG(ad,ae);};CG=function(ad,ae){var ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd;if(ad===ae){return true;}af=ad.Kind();if(!((af===ae.Kind()))){return false;}if(1<=af&&af<=16||(af===24)||(af===26)){return true;}ag=af;if(ag===17){return $interfaceIsEqual(ad.Elem(),ae.Elem())&&(ad.Len()===ae.Len());}else if(ag===18){if((ae.ChanDir()===3)&&$interfaceIsEqual(ad.Elem(),ae.Elem())){return true;}return(ae.ChanDir()===ad.ChanDir())&&$interfaceIsEqual(ad.Elem(),ae.Elem());}else if(ag===19){ah=ad.kindType;ai=ae.kindType;if(!(ah.dotdotdot===ai.dotdotdot)||!((ah.in$2.$length===ai.in$2.$length))||!((ah.out.$length===ai.out.$length))){return false;}aj=ah.in$2;ak=0;while(true){if(!(ak=aj.$length)?$throwRuntimeError("index out of range"):aj.$array[aj.$offset+ak]);if(!(am===(an=ai.in$2,((al<0||al>=an.$length)?$throwRuntimeError("index out of range"):an.$array[an.$offset+al])))){return false;}ak++;}ao=ah.out;ap=0;while(true){if(!(ap=ao.$length)?$throwRuntimeError("index out of range"):ao.$array[ao.$offset+ap]);if(!(ar===(as=ai.out,((aq<0||aq>=as.$length)?$throwRuntimeError("index out of range"):as.$array[as.$offset+aq])))){return false;}ap++;}return true;}else if(ag===20){at=ad.kindType;au=ae.kindType;if((at.methods.$length===0)&&(au.methods.$length===0)){return true;}return false;}else if(ag===21){return $interfaceIsEqual(ad.Key(),ae.Key())&&$interfaceIsEqual(ad.Elem(),ae.Elem());}else if(ag===22||ag===23){return $interfaceIsEqual(ad.Elem(),ae.Elem());}else if(ag===25){av=ad.kindType;aw=ae.kindType;if(!((av.fields.$length===aw.fields.$length))){return false;}ax=av.fields;ay=0;while(true){if(!(ay=ba.$length)?$throwRuntimeError("index out of range"):ba.$array[ba.$offset+az]));bd=(bc=aw.fields,((az<0||az>=bc.$length)?$throwRuntimeError("index out of range"):bc.$array[bc.$offset+az]));if(!($pointerIsEqual(bb.name,bd.name))&&($pointerIsEqual(bb.name,FX.nil)||$pointerIsEqual(bd.name,FX.nil)||!(bb.name.$get()===bd.name.$get()))){return false;}if(!($pointerIsEqual(bb.pkgPath,bd.pkgPath))&&($pointerIsEqual(bb.pkgPath,FX.nil)||$pointerIsEqual(bd.pkgPath,FX.nil)||!(bb.pkgPath.$get()===bd.pkgPath.$get()))){return false;}if(!(bb.typ===bd.typ)){return false;}if(!($pointerIsEqual(bb.tag,bd.tag))&&($pointerIsEqual(bb.tag,FX.nil)||$pointerIsEqual(bd.tag,FX.nil)||!(bb.tag.$get()===bd.tag.$get()))){return false;}if(!((bb.offset===bd.offset))){return false;}ay++;}return true;}return false;};CR=function(ad){var ad;if(ad===FL.nil){return $ifaceNil;}return ad;};CW=function(ad){var ad;return((ad.kind&32)>>>0)===0;};DA.prototype.kind=function(){var ad;ad=this.$val;return(((ad&31)>>>0)>>>0);};$ptrType(DA).prototype.kind=function(){return new DA(this.$get()).kind();};CZ.ptr.prototype.pointer=function(){var ad;ad=this;if(!((ad.typ.size===4))||!ad.typ.pointers()){$panic(new $String("can't call pointer on a non-pointer Value"));}if(!((((ad.flag&64)>>>0)===0))){return ad.ptr.$get();}return ad.ptr;};CZ.prototype.pointer=function(){return this.$val.pointer();};DD.ptr.prototype.Error=function(){var ad;ad=this;if(ad.Kind===0){return"reflect: call of "+ad.Method+" on zero Value";}return"reflect: call of "+ad.Method+" on "+new BG(ad.Kind).String()+" Value";};DD.prototype.Error=function(){return this.$val.Error();};DA.prototype.mustBe=function(ad){var ad,ae;ae=this.$val;if(!((new DA(ae).kind()===ad))){$panic(new DD.ptr(AR(),new DA(ae).kind()));}};$ptrType(DA).prototype.mustBe=function(ad){return new DA(this.$get()).mustBe(ad);};DA.prototype.mustBeExported=function(){var ad;ad=this.$val;if(ad===0){$panic(new DD.ptr(AR(),0));}if(!((((ad&32)>>>0)===0))){$panic(new $String("reflect: "+AR()+" using value obtained using unexported field"));}};$ptrType(DA).prototype.mustBeExported=function(){return new DA(this.$get()).mustBeExported();};DA.prototype.mustBeAssignable=function(){var ad;ad=this.$val;if(ad===0){$panic(new DD.ptr(AR(),0));}if(!((((ad&32)>>>0)===0))){$panic(new $String("reflect: "+AR()+" using value obtained using unexported field"));}if(((ad&128)>>>0)===0){$panic(new $String("reflect: "+AR()+" using unaddressable value"));}};$ptrType(DA).prototype.mustBeAssignable=function(){return new DA(this.$get()).mustBeAssignable();};CZ.ptr.prototype.Addr=function(){var ad;ad=this;if(((ad.flag&128)>>>0)===0){$panic(new $String("reflect.Value.Addr of unaddressable value"));}return new CZ.ptr(ad.typ.ptrTo(),ad.ptr,((((ad.flag&32)>>>0))|22)>>>0);};CZ.prototype.Addr=function(){return this.$val.Addr();};CZ.ptr.prototype.Bool=function(){var ad;ad=this;new DA(ad.flag).mustBe(1);return ad.ptr.$get();};CZ.prototype.Bool=function(){return this.$val.Bool();};CZ.ptr.prototype.Bytes=function(){var ad;ad=this;new DA(ad.flag).mustBe(23);if(!((ad.typ.Elem().Kind()===8))){$panic(new $String("reflect.Value.Bytes of non-byte slice"));}return ad.ptr.$get();};CZ.prototype.Bytes=function(){return this.$val.Bytes();};CZ.ptr.prototype.runes=function(){var ad;ad=this;new DA(ad.flag).mustBe(23);if(!((ad.typ.Elem().Kind()===5))){$panic(new $String("reflect.Value.Bytes of non-rune slice"));}return ad.ptr.$get();};CZ.prototype.runes=function(){return this.$val.runes();};CZ.ptr.prototype.CanAddr=function(){var ad;ad=this;return!((((ad.flag&128)>>>0)===0));};CZ.prototype.CanAddr=function(){return this.$val.CanAddr();};CZ.ptr.prototype.CanSet=function(){var ad;ad=this;return((ad.flag&160)>>>0)===128;};CZ.prototype.CanSet=function(){return this.$val.CanSet();};CZ.ptr.prototype.Call=function(ad){var ad,ae;ae=this;new DA(ae.flag).mustBe(19);new DA(ae.flag).mustBeExported();return ae.call("Call",ad);};CZ.prototype.Call=function(ad){return this.$val.Call(ad);};CZ.ptr.prototype.CallSlice=function(ad){var ad,ae;ae=this;new DA(ae.flag).mustBe(19);new DA(ae.flag).mustBeExported();return ae.call("CallSlice",ad);};CZ.prototype.CallSlice=function(ad){return this.$val.CallSlice(ad);};CZ.ptr.prototype.Complex=function(){var ad,ae,af,ag;ad=this;ae=new DA(ad.flag).kind();af=ae;if(af===15){return(ag=ad.ptr.$get(),new $Complex128(ag.$real,ag.$imag));}else if(af===16){return ad.ptr.$get();}$panic(new DD.ptr("reflect.Value.Complex",new DA(ad.flag).kind()));};CZ.prototype.Complex=function(){return this.$val.Complex();};CZ.ptr.prototype.FieldByIndex=function(ad){var ad,ae,af,ag,ah,ai;ae=this;if(ad.$length===1){return ae.Field(((0<0||0>=ad.$length)?$throwRuntimeError("index out of range"):ad.$array[ad.$offset+0]));}new DA(ae.flag).mustBe(25);af=ad;ag=0;while(true){if(!(ag=af.$length)?$throwRuntimeError("index out of range"):af.$array[af.$offset+ag]);if(ah>0){if((ae.Kind()===22)&&(ae.typ.Elem().Kind()===25)){if(ae.IsNil()){$panic(new $String("reflect: indirection through nil pointer to embedded struct"));}ae=ae.Elem();}}ae=ae.Field(ai);ag++;}return ae;};CZ.prototype.FieldByIndex=function(ad){return this.$val.FieldByIndex(ad);};CZ.ptr.prototype.FieldByName=function(ad){var ad,ae,af,ag,ah;ae=this;new DA(ae.flag).mustBe(25);af=ae.typ.FieldByName(ad);ag=$clone(af[0],BY);ah=af[1];if(ah){return ae.FieldByIndex(ag.Index);}return new CZ.ptr(FL.nil,0,0);};CZ.prototype.FieldByName=function(ad){return this.$val.FieldByName(ad);};CZ.ptr.prototype.FieldByNameFunc=function(ad){var ad,ae,af,ag,ah;ae=this;af=ae.typ.FieldByNameFunc(ad);ag=$clone(af[0],BY);ah=af[1];if(ah){return ae.FieldByIndex(ag.Index);}return new CZ.ptr(FL.nil,0,0);};CZ.prototype.FieldByNameFunc=function(ad){return this.$val.FieldByNameFunc(ad);};CZ.ptr.prototype.Float=function(){var ad,ae,af;ad=this;ae=new DA(ad.flag).kind();af=ae;if(af===13){return $coerceFloat32(ad.ptr.$get());}else if(af===14){return ad.ptr.$get();}$panic(new DD.ptr("reflect.Value.Float",new DA(ad.flag).kind()));};CZ.prototype.Float=function(){return this.$val.Float();};CZ.ptr.prototype.Int=function(){var ad,ae,af,ag;ad=this;ae=new DA(ad.flag).kind();af=ad.ptr;ag=ae;if(ag===2){return new $Int64(0,af.$get());}else if(ag===3){return new $Int64(0,af.$get());}else if(ag===4){return new $Int64(0,af.$get());}else if(ag===5){return new $Int64(0,af.$get());}else if(ag===6){return af.$get();}$panic(new DD.ptr("reflect.Value.Int",new DA(ad.flag).kind()));};CZ.prototype.Int=function(){return this.$val.Int();};CZ.ptr.prototype.CanInterface=function(){var ad;ad=this;if(ad.flag===0){$panic(new DD.ptr("reflect.Value.CanInterface",0));}return((ad.flag&32)>>>0)===0;};CZ.prototype.CanInterface=function(){return this.$val.CanInterface();};CZ.ptr.prototype.Interface=function(){var ad=$ifaceNil,ae;ae=this;ad=AP(ae,true);return ad;};CZ.prototype.Interface=function(){return this.$val.Interface();};CZ.ptr.prototype.InterfaceData=function(){var ad;ad=this;new DA(ad.flag).mustBe(20);return ad.ptr;};CZ.prototype.InterfaceData=function(){return this.$val.InterfaceData();};CZ.ptr.prototype.IsValid=function(){var ad;ad=this;return!((ad.flag===0));};CZ.prototype.IsValid=function(){return this.$val.IsValid();};CZ.ptr.prototype.Kind=function(){var ad;ad=this;return new DA(ad.flag).kind();};CZ.prototype.Kind=function(){return this.$val.Kind();};CZ.ptr.prototype.MapIndex=function(ad){var ad,ae,af,ag,ah,ai,aj,ak;ae=this;ad=ad;new DA(ae.flag).mustBe(21);af=ae.typ.kindType;ad=ad.assignTo("reflect.Value.MapIndex",af.key,0);ag=0;if(!((((ad.flag&64)>>>0)===0))){ag=ad.ptr;}else{ag=new GW(function(){return this.$target.ptr;},function($v){this.$target.ptr=$v;},ad);}ah=AE(ae.typ,ae.pointer(),ag);if(ah===0){return new CZ.ptr(FL.nil,0,0);}ai=af.elem;aj=((((ae.flag|ad.flag)>>>0))&32)>>>0;aj=(aj|((ai.Kind()>>>0)))>>>0;if(CW(ai)){ak=X(ai);AA(ak,ah,ai.size);return new CZ.ptr(ai,ak,(aj|64)>>>0);}else{return new CZ.ptr(ai,ah.$get(),aj);}};CZ.prototype.MapIndex=function(ad){return this.$val.MapIndex(ad);};CZ.ptr.prototype.MapKeys=function(){var ad,ae,af,ag,ah,ai,aj,ak,al,am,an;ad=this;new DA(ad.flag).mustBe(21);ae=ad.typ.kindType;af=ae.key;ag=(((ad.flag&32)>>>0)|(af.Kind()>>>0))>>>0;ah=ad.pointer();ai=0;if(!(ah===0)){ai=AL(ah);}aj=AI(ad.typ,ah);ak=$makeSlice(GE,ai);al=0;al=0;while(true){if(!(al=ak.$length)?$throwRuntimeError("index out of range"):ak.$array[ak.$offset+al]=new CZ.ptr(af,an,(ag|64)>>>0);}else{(al<0||al>=ak.$length)?$throwRuntimeError("index out of range"):ak.$array[ak.$offset+al]=new CZ.ptr(af,am.$get(),ag);}AK(aj);al=al+(1)>>0;}return $subslice(ak,0,al);};CZ.prototype.MapKeys=function(){return this.$val.MapKeys();};CZ.ptr.prototype.Method=function(ad){var ad,ae,af;ae=this;if(ae.typ===FL.nil){$panic(new DD.ptr("reflect.Value.Method",0));}if(!((((ae.flag&256)>>>0)===0))||(ad>>>0)>=(ae.typ.NumMethod()>>>0)){$panic(new $String("reflect: Method index out of range"));}if((ae.typ.Kind()===20)&&ae.IsNil()){$panic(new $String("reflect: Method on nil interface value"));}af=(ae.flag&96)>>>0;af=(af|(19))>>>0;af=(af|(((((ad>>>0)<<9>>>0)|256)>>>0)))>>>0;return new CZ.ptr(ae.typ,ae.ptr,af);};CZ.prototype.Method=function(ad){return this.$val.Method(ad);};CZ.ptr.prototype.NumMethod=function(){var ad;ad=this;if(ad.typ===FL.nil){$panic(new DD.ptr("reflect.Value.NumMethod",0));}if(!((((ad.flag&256)>>>0)===0))){return 0;}return ad.typ.NumMethod();};CZ.prototype.NumMethod=function(){return this.$val.NumMethod();};CZ.ptr.prototype.MethodByName=function(ad){var ad,ae,af,ag,ah;ae=this;if(ae.typ===FL.nil){$panic(new DD.ptr("reflect.Value.MethodByName",0));}if(!((((ae.flag&256)>>>0)===0))){return new CZ.ptr(FL.nil,0,0);}af=ae.typ.MethodByName(ad);ag=$clone(af[0],BW);ah=af[1];if(!ah){return new CZ.ptr(FL.nil,0,0);}return ae.Method(ag.Index);};CZ.prototype.MethodByName=function(ad){return this.$val.MethodByName(ad);};CZ.ptr.prototype.NumField=function(){var ad,ae;ad=this;new DA(ad.flag).mustBe(25);ae=ad.typ.kindType;return ae.fields.$length;};CZ.prototype.NumField=function(){return this.$val.NumField();};CZ.ptr.prototype.OverflowComplex=function(ad){var ad,ae,af,ag;ae=this;af=new DA(ae.flag).kind();ag=af;if(ag===15){return DN(ad.$real)||DN(ad.$imag);}else if(ag===16){return false;}$panic(new DD.ptr("reflect.Value.OverflowComplex",new DA(ae.flag).kind()));};CZ.prototype.OverflowComplex=function(ad){return this.$val.OverflowComplex(ad);};CZ.ptr.prototype.OverflowFloat=function(ad){var ad,ae,af,ag;ae=this;af=new DA(ae.flag).kind();ag=af;if(ag===13){return DN(ad);}else if(ag===14){return false;}$panic(new DD.ptr("reflect.Value.OverflowFloat",new DA(ae.flag).kind()));};CZ.prototype.OverflowFloat=function(ad){return this.$val.OverflowFloat(ad);};DN=function(ad){var ad;if(ad<0){ad=-ad;}return 3.4028234663852886e+38>>16<<16)*8>>>0)+(ah<<16>>>16)*8)>>>0);aj=$shiftRightInt64(($shiftLeft64(ad,((64-ai>>>0)))),((64-ai>>>0)));return!((ad.$high===aj.$high&&ad.$low===aj.$low));}$panic(new DD.ptr("reflect.Value.OverflowInt",new DA(ae.flag).kind()));};CZ.prototype.OverflowInt=function(ad){return this.$val.OverflowInt(ad);};CZ.ptr.prototype.OverflowUint=function(ad){var ad,ae,af,ag,ah,ai,aj;ae=this;af=new DA(ae.flag).kind();ag=af;if(ag===7||ag===12||ag===8||ag===9||ag===10||ag===11){ai=(ah=ae.typ.size,(((ah>>>16<<16)*8>>>0)+(ah<<16>>>16)*8)>>>0);aj=$shiftRightUint64(($shiftLeft64(ad,((64-ai>>>0)))),((64-ai>>>0)));return!((ad.$high===aj.$high&&ad.$low===aj.$low));}$panic(new DD.ptr("reflect.Value.OverflowUint",new DA(ae.flag).kind()));};CZ.prototype.OverflowUint=function(ad){return this.$val.OverflowUint(ad);};CZ.ptr.prototype.SetBool=function(ad){var ad,ae;ae=this;new DA(ae.flag).mustBeAssignable();new DA(ae.flag).mustBe(1);ae.ptr.$set(ad);};CZ.prototype.SetBool=function(ad){return this.$val.SetBool(ad);};CZ.ptr.prototype.SetBytes=function(ad){var ad,ae;ae=this;new DA(ae.flag).mustBeAssignable();new DA(ae.flag).mustBe(23);if(!((ae.typ.Elem().Kind()===8))){$panic(new $String("reflect.Value.SetBytes of non-byte slice"));}ae.ptr.$set(ad);};CZ.prototype.SetBytes=function(ad){return this.$val.SetBytes(ad);};CZ.ptr.prototype.setRunes=function(ad){var ad,ae;ae=this;new DA(ae.flag).mustBeAssignable();new DA(ae.flag).mustBe(23);if(!((ae.typ.Elem().Kind()===5))){$panic(new $String("reflect.Value.setRunes of non-rune slice"));}ae.ptr.$set(ad);};CZ.prototype.setRunes=function(ad){return this.$val.setRunes(ad);};CZ.ptr.prototype.SetComplex=function(ad){var ad,ae,af,ag;ae=this;new DA(ae.flag).mustBeAssignable();af=new DA(ae.flag).kind();ag=af;if(ag===15){ae.ptr.$set(new $Complex64(ad.$real,ad.$imag));}else if(ag===16){ae.ptr.$set(ad);}else{$panic(new DD.ptr("reflect.Value.SetComplex",new DA(ae.flag).kind()));}};CZ.prototype.SetComplex=function(ad){return this.$val.SetComplex(ad);};CZ.ptr.prototype.SetFloat=function(ad){var ad,ae,af,ag;ae=this;new DA(ae.flag).mustBeAssignable();af=new DA(ae.flag).kind();ag=af;if(ag===13){ae.ptr.$set(ad);}else if(ag===14){ae.ptr.$set(ad);}else{$panic(new DD.ptr("reflect.Value.SetFloat",new DA(ae.flag).kind()));}};CZ.prototype.SetFloat=function(ad){return this.$val.SetFloat(ad);};CZ.ptr.prototype.SetInt=function(ad){var ad,ae,af,ag;ae=this;new DA(ae.flag).mustBeAssignable();af=new DA(ae.flag).kind();ag=af;if(ag===2){ae.ptr.$set(((ad.$low+((ad.$high>>31)*4294967296))>>0));}else if(ag===3){ae.ptr.$set(((ad.$low+((ad.$high>>31)*4294967296))<<24>>24));}else if(ag===4){ae.ptr.$set(((ad.$low+((ad.$high>>31)*4294967296))<<16>>16));}else if(ag===5){ae.ptr.$set(((ad.$low+((ad.$high>>31)*4294967296))>>0));}else if(ag===6){ae.ptr.$set(ad);}else{$panic(new DD.ptr("reflect.Value.SetInt",new DA(ae.flag).kind()));}};CZ.prototype.SetInt=function(ad){return this.$val.SetInt(ad);};CZ.ptr.prototype.SetMapIndex=function(ad,ae){var ad,ae,af,ag,ah,ai;af=this;ae=ae;ad=ad;new DA(af.flag).mustBe(21);new DA(af.flag).mustBeExported();new DA(ad.flag).mustBeExported();ag=af.typ.kindType;ad=ad.assignTo("reflect.Value.SetMapIndex",ag.key,0);ah=0;if(!((((ad.flag&64)>>>0)===0))){ah=ad.ptr;}else{ah=new GW(function(){return this.$target.ptr;},function($v){this.$target.ptr=$v;},ad);}if(ae.typ===FL.nil){AG(af.typ,af.pointer(),ah);return;}new DA(ae.flag).mustBeExported();ae=ae.assignTo("reflect.Value.SetMapIndex",ag.elem,0);ai=0;if(!((((ae.flag&64)>>>0)===0))){ai=ae.ptr;}else{ai=new GW(function(){return this.$target.ptr;},function($v){this.$target.ptr=$v;},ae);}AF(af.typ,af.pointer(),ah,ai);};CZ.prototype.SetMapIndex=function(ad,ae){return this.$val.SetMapIndex(ad,ae);};CZ.ptr.prototype.SetUint=function(ad){var ad,ae,af,ag;ae=this;new DA(ae.flag).mustBeAssignable();af=new DA(ae.flag).kind();ag=af;if(ag===7){ae.ptr.$set((ad.$low>>>0));}else if(ag===8){ae.ptr.$set((ad.$low<<24>>>24));}else if(ag===9){ae.ptr.$set((ad.$low<<16>>>16));}else if(ag===10){ae.ptr.$set((ad.$low>>>0));}else if(ag===11){ae.ptr.$set(ad);}else if(ag===12){ae.ptr.$set((ad.$low>>>0));}else{$panic(new DD.ptr("reflect.Value.SetUint",new DA(ae.flag).kind()));}};CZ.prototype.SetUint=function(ad){return this.$val.SetUint(ad);};CZ.ptr.prototype.SetPointer=function(ad){var ad,ae;ae=this;new DA(ae.flag).mustBeAssignable();new DA(ae.flag).mustBe(26);ae.ptr.$set(ad);};CZ.prototype.SetPointer=function(ad){return this.$val.SetPointer(ad);};CZ.ptr.prototype.SetString=function(ad){var ad,ae;ae=this;new DA(ae.flag).mustBeAssignable();new DA(ae.flag).mustBe(24);ae.ptr.$set(ad);};CZ.prototype.SetString=function(ad){return this.$val.SetString(ad);};CZ.ptr.prototype.String=function(){var ad,ae,af;ad=this;ae=new DA(ad.flag).kind();af=ae;if(af===0){return"";}else if(af===24){return ad.ptr.$get();}return"<"+ad.Type().String()+" Value>";};CZ.prototype.String=function(){return this.$val.String();};CZ.ptr.prototype.Type=function(){var ad,ae,af,ag,ah,ai,aj,ak,al;ad=this;ae=ad.flag;if(ae===0){$panic(new DD.ptr("reflect.Value.Type",0));}if(((ae&256)>>>0)===0){return ad.typ;}af=(ad.flag>>0)>>9>>0;if(ad.typ.Kind()===20){ag=ad.typ.kindType;if((af>>>0)>=(ag.methods.$length>>>0)){$panic(new $String("reflect: internal error: invalid method index"));}ai=(ah=ag.methods,((af<0||af>=ah.$length)?$throwRuntimeError("index out of range"):ah.$array[ah.$offset+af]));return ai.typ;}aj=ad.typ.uncommonType.uncommon();if(aj===FY.nil||(af>>>0)>=(aj.methods.$length>>>0)){$panic(new $String("reflect: internal error: invalid method index"));}al=(ak=aj.methods,((af<0||af>=ak.$length)?$throwRuntimeError("index out of range"):ak.$array[ak.$offset+af]));return al.mtyp;};CZ.prototype.Type=function(){return this.$val.Type();};CZ.ptr.prototype.Uint=function(){var ad,ae,af,ag,ah;ad=this;ae=new DA(ad.flag).kind();af=ad.ptr;ag=ae;if(ag===7){return new $Uint64(0,af.$get());}else if(ag===8){return new $Uint64(0,af.$get());}else if(ag===9){return new $Uint64(0,af.$get());}else if(ag===10){return new $Uint64(0,af.$get());}else if(ag===11){return af.$get();}else if(ag===12){return(ah=af.$get(),new $Uint64(0,ah.constructor===Number?ah:1));}$panic(new DD.ptr("reflect.Value.Uint",new DA(ad.flag).kind()));};CZ.prototype.Uint=function(){return this.$val.Uint();};CZ.ptr.prototype.UnsafeAddr=function(){var ad;ad=this;if(ad.typ===FL.nil){$panic(new DD.ptr("reflect.Value.UnsafeAddr",0));}if(((ad.flag&128)>>>0)===0){$panic(new $String("reflect.Value.UnsafeAddr of unaddressable value"));}return ad.ptr;};CZ.prototype.UnsafeAddr=function(){return this.$val.UnsafeAddr();};EF=$pkg.New=function(ad){var ad,ae,af;if($interfaceIsEqual(ad,$ifaceNil)){$panic(new $String("reflect: New(nil)"));}ae=X($assertType(ad,FL));af=22;return new CZ.ptr(ad.common().ptrTo(),ae,af);};CZ.ptr.prototype.assignTo=function(ad,ae,af){var ad,ae,af,ag,ah,ai;ag=this;if(!((((ag.flag&256)>>>0)===0))){ag=AS(ad,ag);}if(CF(ae,ag.typ)){ag.typ=ae;ah=(ag.flag&224)>>>0;ah=(ah|((ae.Kind()>>>0)))>>>0;return new CZ.ptr(ae,ag.ptr,ah);}else if(CE(ae,ag.typ)){if(af===0){af=X(ae);}ai=AP(ag,false);if(ae.NumMethod()===0){af.$set(ai);}else{AQ(ae,ai,af);}return new CZ.ptr(ae,af,84);}$panic(new $String(ad+": value of type "+ag.typ.String()+" is not assignable to type "+ae.String()));};CZ.prototype.assignTo=function(ad,ae,af){return this.$val.assignTo(ad,ae,af);};CZ.ptr.prototype.Convert=function(ad){var ad,ae,af;ae=this;if(!((((ae.flag&256)>>>0)===0))){ae=AS("Convert",ae);}af=EH(ad.common(),ae.typ);if(af===$throwNilPointerError){$panic(new $String("reflect.Value.Convert: value of type "+ae.typ.String()+" cannot be converted to type "+ad.String()));}return af(ae,ad);};CZ.prototype.Convert=function(ad){return this.$val.Convert(ad);};EH=function(ad,ae){var ad,ae,af,ag,ah,ai,aj,ak,al;af=ae.Kind();if(af===2||af===3||af===4||af===5||af===6){ag=ad.Kind();if(ag===2||ag===3||ag===4||ag===5||ag===6||ag===7||ag===8||ag===9||ag===10||ag===11||ag===12){return EN;}else if(ag===13||ag===14){return ER;}else if(ag===24){return EV;}}else if(af===7||af===8||af===9||af===10||af===11||af===12){ah=ad.Kind();if(ah===2||ah===3||ah===4||ah===5||ah===6||ah===7||ah===8||ah===9||ah===10||ah===11||ah===12){return EO;}else if(ah===13||ah===14){return ES;}else if(ah===24){return EW;}}else if(af===13||af===14){ai=ad.Kind();if(ai===2||ai===3||ai===4||ai===5||ai===6){return EP;}else if(ai===7||ai===8||ai===9||ai===10||ai===11||ai===12){return EQ;}else if(ai===13||ai===14){return ET;}}else if(af===15||af===16){aj=ad.Kind();if(aj===15||aj===16){return EU;}}else if(af===24){if((ad.Kind()===23)&&ad.Elem().PkgPath()===""){ak=ad.Elem().Kind();if(ak===8){return EY;}else if(ak===5){return FA;}}}else if(af===23){if((ad.Kind()===24)&&ae.Elem().PkgPath()===""){al=ae.Elem().Kind();if(al===8){return EX;}else if(al===5){return EZ;}}}if(CG(ad,ae)){return AM;}if((ad.Kind()===22)&&ad.Name()===""&&(ae.Kind()===22)&&ae.Name()===""&&CG(ad.Elem().common(),ae.Elem().common())){return AM;}if(CE(ad,ae)){if(ae.Kind()===20){return FC;}return FB;}return $throwNilPointerError;};EI=function(ad,ae,af){var ad,ae,af,ag,ah,ai;ag=af.common();ah=X(ag);ai=ag.size;if(ai===4){ah.$set(ae);}else if(ai===8){ah.$set(ae);}return new CZ.ptr(ag,ah,(((ad|64)>>>0)|(ag.Kind()>>>0))>>>0);};EJ=function(ad,ae,af){var ad,ae,af,ag,ah,ai;ag=af.common();ah=X(ag);ai=ag.size;if(ai===8){ah.$set(new $Complex64(ae.$real,ae.$imag));}else if(ai===16){ah.$set(ae);}return new CZ.ptr(ag,ah,(((ad|64)>>>0)|(ag.Kind()>>>0))>>>0);};EK=function(ad,ae,af){var ad,ae,af,ag;ag=EF(af).Elem();ag.SetString(ae);ag.flag=((ag.flag&~128)|ad)>>>0;return ag;};EL=function(ad,ae,af){var ad,ae,af,ag;ag=EF(af).Elem();ag.SetBytes(ae);ag.flag=((ag.flag&~128)|ad)>>>0;return ag;};EM=function(ad,ae,af){var ad,ae,af,ag;ag=EF(af).Elem();ag.setRunes(ae);ag.flag=((ag.flag&~128)|ad)>>>0;return ag;};EN=function(ad,ae){var ad,ae,af;ad=ad;return Y((ad.flag&32)>>>0,(af=ad.Int(),new $Uint64(af.$high,af.$low)),ae);};EO=function(ad,ae){var ad,ae;ad=ad;return Y((ad.flag&32)>>>0,ad.Uint(),ae);};EP=function(ad,ae){var ad,ae,af;ad=ad;return Y((ad.flag&32)>>>0,(af=new $Int64(0,ad.Float()),new $Uint64(af.$high,af.$low)),ae);};EQ=function(ad,ae){var ad,ae;ad=ad;return Y((ad.flag&32)>>>0,new $Uint64(0,ad.Float()),ae);};ER=function(ad,ae){var ad,ae;ad=ad;return EI((ad.flag&32)>>>0,$flatten64(ad.Int()),ae);};ES=function(ad,ae){var ad,ae;ad=ad;return EI((ad.flag&32)>>>0,$flatten64(ad.Uint()),ae);};ET=function(ad,ae){var ad,ae;ad=ad;return EI((ad.flag&32)>>>0,ad.Float(),ae);};EU=function(ad,ae){var ad,ae;ad=ad;return EJ((ad.flag&32)>>>0,ad.Complex(),ae);};EV=function(ad,ae){var ad,ae;ad=ad;return EK((ad.flag&32)>>>0,$encodeRune(ad.Int().$low),ae);};EW=function(ad,ae){var ad,ae;ad=ad;return EK((ad.flag&32)>>>0,$encodeRune(ad.Uint().$low),ae);};EX=function(ad,ae){var ad,ae;ad=ad;return EK((ad.flag&32)>>>0,$bytesToString(ad.Bytes()),ae);};EY=function(ad,ae){var ad,ae;ad=ad;return EL((ad.flag&32)>>>0,new GY($stringToBytes(ad.String())),ae);};EZ=function(ad,ae){var ad,ae;ad=ad;return EK((ad.flag&32)>>>0,$runesToString(ad.runes()),ae);};FA=function(ad,ae){var ad,ae;ad=ad;return EM((ad.flag&32)>>>0,new GZ($stringToRunes(ad.String())),ae);};FB=function(ad,ae){var ad,ae,af,ag;ad=ad;af=X(ae.common());ag=AP(ad,false);if(ae.NumMethod()===0){af.$set(ag);}else{AQ($assertType(ae,FL),ag,af);}return new CZ.ptr(ae.common(),af,(((((ad.flag&32)>>>0)|64)>>>0)|20)>>>0);};FC=function(ad,ae){var ad,ae,af;ad=ad;if(ad.IsNil()){af=W(ae);af.flag=(af.flag|(((ad.flag&32)>>>0)))>>>0;return af;}return FB(ad.Elem(),ae);};BG.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];FL.methods=[{prop:"ptrTo",name:"ptrTo",pkg:"reflect",typ:$funcType([],[FL],false)},{prop:"pointers",name:"pointers",pkg:"reflect",typ:$funcType([],[$Bool],false)},{prop:"Comparable",name:"Comparable",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Size",name:"Size",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"Bits",name:"Bits",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Align",name:"Align",pkg:"",typ:$funcType([],[$Int],false)},{prop:"FieldAlign",name:"FieldAlign",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Kind",name:"Kind",pkg:"",typ:$funcType([],[BG],false)},{prop:"common",name:"common",pkg:"reflect",typ:$funcType([],[FL],false)},{prop:"NumMethod",name:"NumMethod",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Method",name:"Method",pkg:"",typ:$funcType([$Int],[BW],false)},{prop:"MethodByName",name:"MethodByName",pkg:"",typ:$funcType([$String],[BW,$Bool],false)},{prop:"PkgPath",name:"PkgPath",pkg:"",typ:$funcType([],[$String],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"ChanDir",name:"ChanDir",pkg:"",typ:$funcType([],[BL],false)},{prop:"IsVariadic",name:"IsVariadic",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Elem",name:"Elem",pkg:"",typ:$funcType([],[BF],false)},{prop:"Field",name:"Field",pkg:"",typ:$funcType([$Int],[BY],false)},{prop:"FieldByIndex",name:"FieldByIndex",pkg:"",typ:$funcType([GP],[BY],false)},{prop:"FieldByName",name:"FieldByName",pkg:"",typ:$funcType([$String],[BY,$Bool],false)},{prop:"FieldByNameFunc",name:"FieldByNameFunc",pkg:"",typ:$funcType([HC],[BY,$Bool],false)},{prop:"In",name:"In",pkg:"",typ:$funcType([$Int],[BF],false)},{prop:"Key",name:"Key",pkg:"",typ:$funcType([],[BF],false)},{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumField",name:"NumField",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumIn",name:"NumIn",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumOut",name:"NumOut",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Out",name:"Out",pkg:"",typ:$funcType([$Int],[BF],false)},{prop:"Implements",name:"Implements",pkg:"",typ:$funcType([BF],[$Bool],false)},{prop:"AssignableTo",name:"AssignableTo",pkg:"",typ:$funcType([BF],[$Bool],false)},{prop:"ConvertibleTo",name:"ConvertibleTo",pkg:"",typ:$funcType([BF],[$Bool],false)}];FY.methods=[{prop:"Method",name:"Method",pkg:"",typ:$funcType([$Int],[BW],false)},{prop:"uncommon",name:"uncommon",pkg:"reflect",typ:$funcType([],[FY],false)},{prop:"PkgPath",name:"PkgPath",pkg:"",typ:$funcType([],[$String],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"NumMethod",name:"NumMethod",pkg:"",typ:$funcType([],[$Int],false)},{prop:"MethodByName",name:"MethodByName",pkg:"",typ:$funcType([$String],[BW,$Bool],false)}];BL.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];GN.methods=[{prop:"Method",name:"Method",pkg:"",typ:$funcType([$Int],[BW],false)},{prop:"NumMethod",name:"NumMethod",pkg:"",typ:$funcType([],[$Int],false)},{prop:"MethodByName",name:"MethodByName",pkg:"",typ:$funcType([$String],[BW,$Bool],false)}];GR.methods=[{prop:"Field",name:"Field",pkg:"",typ:$funcType([$Int],[BY],false)},{prop:"FieldByIndex",name:"FieldByIndex",pkg:"",typ:$funcType([GP],[BY],false)},{prop:"FieldByNameFunc",name:"FieldByNameFunc",pkg:"",typ:$funcType([HC],[BY,$Bool],false)},{prop:"FieldByName",name:"FieldByName",pkg:"",typ:$funcType([$String],[BY,$Bool],false)}];BZ.methods=[{prop:"Get",name:"Get",pkg:"",typ:$funcType([$String],[$String],false)}];CZ.methods=[{prop:"object",name:"object",pkg:"reflect",typ:$funcType([],[B.Object],false)},{prop:"call",name:"call",pkg:"reflect",typ:$funcType([$String,GE],[GE],false)},{prop:"Cap",name:"Cap",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Elem",name:"Elem",pkg:"",typ:$funcType([],[CZ],false)},{prop:"Field",name:"Field",pkg:"",typ:$funcType([$Int],[CZ],false)},{prop:"Index",name:"Index",pkg:"",typ:$funcType([$Int],[CZ],false)},{prop:"IsNil",name:"IsNil",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Pointer",name:"Pointer",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"Set",name:"Set",pkg:"",typ:$funcType([CZ],[],false)},{prop:"SetCap",name:"SetCap",pkg:"",typ:$funcType([$Int],[],false)},{prop:"SetLen",name:"SetLen",pkg:"",typ:$funcType([$Int],[],false)},{prop:"Slice",name:"Slice",pkg:"",typ:$funcType([$Int,$Int],[CZ],false)},{prop:"Slice3",name:"Slice3",pkg:"",typ:$funcType([$Int,$Int,$Int],[CZ],false)},{prop:"Close",name:"Close",pkg:"",typ:$funcType([],[],false)},{prop:"TrySend",name:"TrySend",pkg:"",typ:$funcType([CZ],[$Bool],false)},{prop:"Send",name:"Send",pkg:"",typ:$funcType([CZ],[],false)},{prop:"TryRecv",name:"TryRecv",pkg:"",typ:$funcType([],[CZ,$Bool],false)},{prop:"Recv",name:"Recv",pkg:"",typ:$funcType([],[CZ,$Bool],false)},{prop:"pointer",name:"pointer",pkg:"reflect",typ:$funcType([],[$UnsafePointer],false)},{prop:"Addr",name:"Addr",pkg:"",typ:$funcType([],[CZ],false)},{prop:"Bool",name:"Bool",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Bytes",name:"Bytes",pkg:"",typ:$funcType([],[GY],false)},{prop:"runes",name:"runes",pkg:"reflect",typ:$funcType([],[GZ],false)},{prop:"CanAddr",name:"CanAddr",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"CanSet",name:"CanSet",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Call",name:"Call",pkg:"",typ:$funcType([GE],[GE],false)},{prop:"CallSlice",name:"CallSlice",pkg:"",typ:$funcType([GE],[GE],false)},{prop:"Complex",name:"Complex",pkg:"",typ:$funcType([],[$Complex128],false)},{prop:"FieldByIndex",name:"FieldByIndex",pkg:"",typ:$funcType([GP],[CZ],false)},{prop:"FieldByName",name:"FieldByName",pkg:"",typ:$funcType([$String],[CZ],false)},{prop:"FieldByNameFunc",name:"FieldByNameFunc",pkg:"",typ:$funcType([HC],[CZ],false)},{prop:"Float",name:"Float",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Int",name:"Int",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"CanInterface",name:"CanInterface",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Interface",name:"Interface",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"InterfaceData",name:"InterfaceData",pkg:"",typ:$funcType([],[HG],false)},{prop:"IsValid",name:"IsValid",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Kind",name:"Kind",pkg:"",typ:$funcType([],[BG],false)},{prop:"MapIndex",name:"MapIndex",pkg:"",typ:$funcType([CZ],[CZ],false)},{prop:"MapKeys",name:"MapKeys",pkg:"",typ:$funcType([],[GE],false)},{prop:"Method",name:"Method",pkg:"",typ:$funcType([$Int],[CZ],false)},{prop:"NumMethod",name:"NumMethod",pkg:"",typ:$funcType([],[$Int],false)},{prop:"MethodByName",name:"MethodByName",pkg:"",typ:$funcType([$String],[CZ],false)},{prop:"NumField",name:"NumField",pkg:"",typ:$funcType([],[$Int],false)},{prop:"OverflowComplex",name:"OverflowComplex",pkg:"",typ:$funcType([$Complex128],[$Bool],false)},{prop:"OverflowFloat",name:"OverflowFloat",pkg:"",typ:$funcType([$Float64],[$Bool],false)},{prop:"OverflowInt",name:"OverflowInt",pkg:"",typ:$funcType([$Int64],[$Bool],false)},{prop:"OverflowUint",name:"OverflowUint",pkg:"",typ:$funcType([$Uint64],[$Bool],false)},{prop:"recv",name:"recv",pkg:"reflect",typ:$funcType([$Bool],[CZ,$Bool],false)},{prop:"send",name:"send",pkg:"reflect",typ:$funcType([CZ,$Bool],[$Bool],false)},{prop:"SetBool",name:"SetBool",pkg:"",typ:$funcType([$Bool],[],false)},{prop:"SetBytes",name:"SetBytes",pkg:"",typ:$funcType([GY],[],false)},{prop:"setRunes",name:"setRunes",pkg:"reflect",typ:$funcType([GZ],[],false)},{prop:"SetComplex",name:"SetComplex",pkg:"",typ:$funcType([$Complex128],[],false)},{prop:"SetFloat",name:"SetFloat",pkg:"",typ:$funcType([$Float64],[],false)},{prop:"SetInt",name:"SetInt",pkg:"",typ:$funcType([$Int64],[],false)},{prop:"SetMapIndex",name:"SetMapIndex",pkg:"",typ:$funcType([CZ,CZ],[],false)},{prop:"SetUint",name:"SetUint",pkg:"",typ:$funcType([$Uint64],[],false)},{prop:"SetPointer",name:"SetPointer",pkg:"",typ:$funcType([$UnsafePointer],[],false)},{prop:"SetString",name:"SetString",pkg:"",typ:$funcType([$String],[],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Type",name:"Type",pkg:"",typ:$funcType([],[BF],false)},{prop:"Uint",name:"Uint",pkg:"",typ:$funcType([],[$Uint64],false)},{prop:"UnsafeAddr",name:"UnsafeAddr",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"assignTo",name:"assignTo",pkg:"reflect",typ:$funcType([$String,FL,$UnsafePointer],[CZ],false)},{prop:"Convert",name:"Convert",pkg:"",typ:$funcType([BF],[CZ],false)}];DA.methods=[{prop:"kind",name:"kind",pkg:"reflect",typ:$funcType([],[BG],false)},{prop:"mustBe",name:"mustBe",pkg:"reflect",typ:$funcType([BG],[],false)},{prop:"mustBeExported",name:"mustBeExported",pkg:"reflect",typ:$funcType([],[],false)},{prop:"mustBeAssignable",name:"mustBeAssignable",pkg:"reflect",typ:$funcType([],[],false)}];HH.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];AH.init([{prop:"t",name:"t",pkg:"reflect",typ:BF,tag:""},{prop:"m",name:"m",pkg:"reflect",typ:B.Object,tag:""},{prop:"keys",name:"keys",pkg:"reflect",typ:B.Object,tag:""},{prop:"i",name:"i",pkg:"reflect",typ:$Int,tag:""}]);BF.init([{prop:"Align",name:"Align",pkg:"",typ:$funcType([],[$Int],false)},{prop:"AssignableTo",name:"AssignableTo",pkg:"",typ:$funcType([BF],[$Bool],false)},{prop:"Bits",name:"Bits",pkg:"",typ:$funcType([],[$Int],false)},{prop:"ChanDir",name:"ChanDir",pkg:"",typ:$funcType([],[BL],false)},{prop:"Comparable",name:"Comparable",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"ConvertibleTo",name:"ConvertibleTo",pkg:"",typ:$funcType([BF],[$Bool],false)},{prop:"Elem",name:"Elem",pkg:"",typ:$funcType([],[BF],false)},{prop:"Field",name:"Field",pkg:"",typ:$funcType([$Int],[BY],false)},{prop:"FieldAlign",name:"FieldAlign",pkg:"",typ:$funcType([],[$Int],false)},{prop:"FieldByIndex",name:"FieldByIndex",pkg:"",typ:$funcType([GP],[BY],false)},{prop:"FieldByName",name:"FieldByName",pkg:"",typ:$funcType([$String],[BY,$Bool],false)},{prop:"FieldByNameFunc",name:"FieldByNameFunc",pkg:"",typ:$funcType([HC],[BY,$Bool],false)},{prop:"Implements",name:"Implements",pkg:"",typ:$funcType([BF],[$Bool],false)},{prop:"In",name:"In",pkg:"",typ:$funcType([$Int],[BF],false)},{prop:"IsVariadic",name:"IsVariadic",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Key",name:"Key",pkg:"",typ:$funcType([],[BF],false)},{prop:"Kind",name:"Kind",pkg:"",typ:$funcType([],[BG],false)},{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Method",name:"Method",pkg:"",typ:$funcType([$Int],[BW],false)},{prop:"MethodByName",name:"MethodByName",pkg:"",typ:$funcType([$String],[BW,$Bool],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"NumField",name:"NumField",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumIn",name:"NumIn",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumMethod",name:"NumMethod",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumOut",name:"NumOut",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Out",name:"Out",pkg:"",typ:$funcType([$Int],[BF],false)},{prop:"PkgPath",name:"PkgPath",pkg:"",typ:$funcType([],[$String],false)},{prop:"Size",name:"Size",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"common",name:"common",pkg:"reflect",typ:$funcType([],[FL],false)},{prop:"uncommon",name:"uncommon",pkg:"reflect",typ:$funcType([],[FY],false)}]);BH.init([{prop:"size",name:"size",pkg:"reflect",typ:$Uintptr,tag:""},{prop:"hash",name:"hash",pkg:"reflect",typ:$Uint32,tag:""},{prop:"_$2",name:"_",pkg:"reflect",typ:$Uint8,tag:""},{prop:"align",name:"align",pkg:"reflect",typ:$Uint8,tag:""},{prop:"fieldAlign",name:"fieldAlign",pkg:"reflect",typ:$Uint8,tag:""},{prop:"kind",name:"kind",pkg:"reflect",typ:$Uint8,tag:""},{prop:"alg",name:"alg",pkg:"reflect",typ:FV,tag:""},{prop:"gc",name:"gc",pkg:"reflect",typ:FW,tag:""},{prop:"string",name:"string",pkg:"reflect",typ:FX,tag:""},{prop:"uncommonType",name:"",pkg:"reflect",typ:FY,tag:""},{prop:"ptrToThis",name:"ptrToThis",pkg:"reflect",typ:FL,tag:""},{prop:"zero",name:"zero",pkg:"reflect",typ:$UnsafePointer,tag:""}]);BI.init([{prop:"hash",name:"hash",pkg:"reflect",typ:HD,tag:""},{prop:"equal",name:"equal",pkg:"reflect",typ:HE,tag:""}]);BJ.init([{prop:"name",name:"name",pkg:"reflect",typ:FX,tag:""},{prop:"pkgPath",name:"pkgPath",pkg:"reflect",typ:FX,tag:""},{prop:"mtyp",name:"mtyp",pkg:"reflect",typ:FL,tag:""},{prop:"typ",name:"typ",pkg:"reflect",typ:FL,tag:""},{prop:"ifn",name:"ifn",pkg:"reflect",typ:$UnsafePointer,tag:""},{prop:"tfn",name:"tfn",pkg:"reflect",typ:$UnsafePointer,tag:""}]);BK.init([{prop:"name",name:"name",pkg:"reflect",typ:FX,tag:""},{prop:"pkgPath",name:"pkgPath",pkg:"reflect",typ:FX,tag:""},{prop:"methods",name:"methods",pkg:"reflect",typ:FZ,tag:""}]);BM.init([{prop:"rtype",name:"",pkg:"reflect",typ:BH,tag:"reflect:\"array\""},{prop:"elem",name:"elem",pkg:"reflect",typ:FL,tag:""},{prop:"slice",name:"slice",pkg:"reflect",typ:FL,tag:""},{prop:"len",name:"len",pkg:"reflect",typ:$Uintptr,tag:""}]);BN.init([{prop:"rtype",name:"",pkg:"reflect",typ:BH,tag:"reflect:\"chan\""},{prop:"elem",name:"elem",pkg:"reflect",typ:FL,tag:""},{prop:"dir",name:"dir",pkg:"reflect",typ:$Uintptr,tag:""}]);BO.init([{prop:"rtype",name:"",pkg:"reflect",typ:BH,tag:"reflect:\"func\""},{prop:"dotdotdot",name:"dotdotdot",pkg:"reflect",typ:$Bool,tag:""},{prop:"in$2",name:"in",pkg:"reflect",typ:GA,tag:""},{prop:"out",name:"out",pkg:"reflect",typ:GA,tag:""}]);BP.init([{prop:"name",name:"name",pkg:"reflect",typ:FX,tag:""},{prop:"pkgPath",name:"pkgPath",pkg:"reflect",typ:FX,tag:""},{prop:"typ",name:"typ",pkg:"reflect",typ:FL,tag:""}]);BQ.init([{prop:"rtype",name:"",pkg:"reflect",typ:BH,tag:"reflect:\"interface\""},{prop:"methods",name:"methods",pkg:"reflect",typ:GB,tag:""}]);BR.init([{prop:"rtype",name:"",pkg:"reflect",typ:BH,tag:"reflect:\"map\""},{prop:"key",name:"key",pkg:"reflect",typ:FL,tag:""},{prop:"elem",name:"elem",pkg:"reflect",typ:FL,tag:""},{prop:"bucket",name:"bucket",pkg:"reflect",typ:FL,tag:""},{prop:"hmap",name:"hmap",pkg:"reflect",typ:FL,tag:""},{prop:"keysize",name:"keysize",pkg:"reflect",typ:$Uint8,tag:""},{prop:"indirectkey",name:"indirectkey",pkg:"reflect",typ:$Uint8,tag:""},{prop:"valuesize",name:"valuesize",pkg:"reflect",typ:$Uint8,tag:""},{prop:"indirectvalue",name:"indirectvalue",pkg:"reflect",typ:$Uint8,tag:""},{prop:"bucketsize",name:"bucketsize",pkg:"reflect",typ:$Uint16,tag:""}]);BS.init([{prop:"rtype",name:"",pkg:"reflect",typ:BH,tag:"reflect:\"ptr\""},{prop:"elem",name:"elem",pkg:"reflect",typ:FL,tag:""}]);BT.init([{prop:"rtype",name:"",pkg:"reflect",typ:BH,tag:"reflect:\"slice\""},{prop:"elem",name:"elem",pkg:"reflect",typ:FL,tag:""}]);BU.init([{prop:"name",name:"name",pkg:"reflect",typ:FX,tag:""},{prop:"pkgPath",name:"pkgPath",pkg:"reflect",typ:FX,tag:""},{prop:"typ",name:"typ",pkg:"reflect",typ:FL,tag:""},{prop:"tag",name:"tag",pkg:"reflect",typ:FX,tag:""},{prop:"offset",name:"offset",pkg:"reflect",typ:$Uintptr,tag:""}]);BV.init([{prop:"rtype",name:"",pkg:"reflect",typ:BH,tag:"reflect:\"struct\""},{prop:"fields",name:"fields",pkg:"reflect",typ:GC,tag:""}]);BW.init([{prop:"Name",name:"Name",pkg:"",typ:$String,tag:""},{prop:"PkgPath",name:"PkgPath",pkg:"",typ:$String,tag:""},{prop:"Type",name:"Type",pkg:"",typ:BF,tag:""},{prop:"Func",name:"Func",pkg:"",typ:CZ,tag:""},{prop:"Index",name:"Index",pkg:"",typ:$Int,tag:""}]);BY.init([{prop:"Name",name:"Name",pkg:"",typ:$String,tag:""},{prop:"PkgPath",name:"PkgPath",pkg:"",typ:$String,tag:""},{prop:"Type",name:"Type",pkg:"",typ:BF,tag:""},{prop:"Tag",name:"Tag",pkg:"",typ:BZ,tag:""},{prop:"Offset",name:"Offset",pkg:"",typ:$Uintptr,tag:""},{prop:"Index",name:"Index",pkg:"",typ:GP,tag:""},{prop:"Anonymous",name:"Anonymous",pkg:"",typ:$Bool,tag:""}]);CA.init([{prop:"typ",name:"typ",pkg:"reflect",typ:GR,tag:""},{prop:"index",name:"index",pkg:"reflect",typ:GP,tag:""}]);CZ.init([{prop:"typ",name:"typ",pkg:"reflect",typ:FL,tag:""},{prop:"ptr",name:"ptr",pkg:"reflect",typ:$UnsafePointer,tag:""},{prop:"flag",name:"",pkg:"reflect",typ:DA,tag:""}]);DD.init([{prop:"Method",name:"Method",pkg:"",typ:$String,tag:""},{prop:"Kind",name:"Kind",pkg:"",typ:BG,tag:""}]);DF.init([{prop:"itab",name:"itab",pkg:"reflect",typ:GI,tag:""},{prop:"word",name:"word",pkg:"reflect",typ:$UnsafePointer,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_reflect=function(){while(true){switch($s){case 0:$r=B.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=D.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}F=false;K=new $Map();AT=$js.Object;AU=$js.container.ptr;BX=new FU(["invalid","bool","int","int8","int16","int32","int64","uint","uint8","uint16","uint32","uint64","uintptr","float32","float64","complex64","complex128","array","chan","func","interface","map","ptr","slice","string","struct","unsafe.Pointer"]);DM=$assertType(Q(new $Uint8(0)),FL);G();}return;}};$init_reflect.$blocking=true;return $init_reflect;};return $pkg;})(); +$packages["fmt"]=(function(){var $pkg={},D,E,A,F,G,B,H,C,L,M,AF,AG,AH,AI,AJ,AK,BE,BR,BS,BT,CE,CF,CG,CH,CI,CJ,CK,CN,CO,DI,DJ,DK,I,J,N,O,Q,R,S,T,U,V,Y,AA,AB,AL,AZ,BA,BB,BU,BY,CA,CB,K,P,AM,AU,AV,AX,BV,BW,CC;D=$packages["errors"];E=$packages["io"];A=$packages["math"];F=$packages["os"];G=$packages["reflect"];B=$packages["strconv"];H=$packages["sync"];C=$packages["unicode/utf8"];L=$pkg.fmtFlags=$newType(0,$kindStruct,"fmt.fmtFlags","fmtFlags","fmt",function(widPresent_,precPresent_,minus_,plus_,sharp_,space_,unicode_,uniQuote_,zero_,plusV_,sharpV_){this.$val=this;this.widPresent=widPresent_!==undefined?widPresent_:false;this.precPresent=precPresent_!==undefined?precPresent_:false;this.minus=minus_!==undefined?minus_:false;this.plus=plus_!==undefined?plus_:false;this.sharp=sharp_!==undefined?sharp_:false;this.space=space_!==undefined?space_:false;this.unicode=unicode_!==undefined?unicode_:false;this.uniQuote=uniQuote_!==undefined?uniQuote_:false;this.zero=zero_!==undefined?zero_:false;this.plusV=plusV_!==undefined?plusV_:false;this.sharpV=sharpV_!==undefined?sharpV_:false;});M=$pkg.fmt=$newType(0,$kindStruct,"fmt.fmt","fmt","fmt",function(intbuf_,buf_,wid_,prec_,fmtFlags_){this.$val=this;this.intbuf=intbuf_!==undefined?intbuf_:DI.zero();this.buf=buf_!==undefined?buf_:CJ.nil;this.wid=wid_!==undefined?wid_:0;this.prec=prec_!==undefined?prec_:0;this.fmtFlags=fmtFlags_!==undefined?fmtFlags_:new L.ptr();});AF=$pkg.State=$newType(8,$kindInterface,"fmt.State","State","fmt",null);AG=$pkg.Formatter=$newType(8,$kindInterface,"fmt.Formatter","Formatter","fmt",null);AH=$pkg.Stringer=$newType(8,$kindInterface,"fmt.Stringer","Stringer","fmt",null);AI=$pkg.GoStringer=$newType(8,$kindInterface,"fmt.GoStringer","GoStringer","fmt",null);AJ=$pkg.buffer=$newType(12,$kindSlice,"fmt.buffer","buffer","fmt",null);AK=$pkg.pp=$newType(0,$kindStruct,"fmt.pp","pp","fmt",function(n_,panicking_,erroring_,buf_,arg_,value_,reordered_,goodArgNum_,runeBuf_,fmt_){this.$val=this;this.n=n_!==undefined?n_:0;this.panicking=panicking_!==undefined?panicking_:false;this.erroring=erroring_!==undefined?erroring_:false;this.buf=buf_!==undefined?buf_:AJ.nil;this.arg=arg_!==undefined?arg_:$ifaceNil;this.value=value_!==undefined?value_:new G.Value.ptr();this.reordered=reordered_!==undefined?reordered_:false;this.goodArgNum=goodArgNum_!==undefined?goodArgNum_:false;this.runeBuf=runeBuf_!==undefined?runeBuf_:CO.zero();this.fmt=fmt_!==undefined?fmt_:new M.ptr();});BE=$pkg.runeUnreader=$newType(8,$kindInterface,"fmt.runeUnreader","runeUnreader","fmt",null);BR=$pkg.scanError=$newType(0,$kindStruct,"fmt.scanError","scanError","fmt",function(err_){this.$val=this;this.err=err_!==undefined?err_:$ifaceNil;});BS=$pkg.ss=$newType(0,$kindStruct,"fmt.ss","ss","fmt",function(rr_,buf_,peekRune_,prevRune_,count_,atEOF_,ssave_){this.$val=this;this.rr=rr_!==undefined?rr_:$ifaceNil;this.buf=buf_!==undefined?buf_:AJ.nil;this.peekRune=peekRune_!==undefined?peekRune_:0;this.prevRune=prevRune_!==undefined?prevRune_:0;this.count=count_!==undefined?count_:0;this.atEOF=atEOF_!==undefined?atEOF_:false;this.ssave=ssave_!==undefined?ssave_:new BT.ptr();});BT=$pkg.ssave=$newType(0,$kindStruct,"fmt.ssave","ssave","fmt",function(validSave_,nlIsEnd_,nlIsSpace_,argLimit_,limit_,maxWid_){this.$val=this;this.validSave=validSave_!==undefined?validSave_:false;this.nlIsEnd=nlIsEnd_!==undefined?nlIsEnd_:false;this.nlIsSpace=nlIsSpace_!==undefined?nlIsSpace_:false;this.argLimit=argLimit_!==undefined?argLimit_:0;this.limit=limit_!==undefined?limit_:0;this.maxWid=maxWid_!==undefined?maxWid_:0;});CE=$sliceType($Uint8);CF=$sliceType($emptyInterface);CG=$arrayType($Uint16,2);CH=$sliceType(CG);CI=$ptrType(AK);CJ=$ptrType(AJ);CK=$ptrType(G.rtype);CN=$ptrType(BS);CO=$arrayType($Uint8,4);DI=$arrayType($Uint8,65);DJ=$ptrType(M);DK=$funcType([$Int32],[$Bool],false);K=function(){var a;a=0;while(true){if(!(a<65)){break;}(a<0||a>=I.$length)?$throwRuntimeError("index out of range"):I.$array[I.$offset+a]=48;(a<0||a>=J.$length)?$throwRuntimeError("index out of range"):J.$array[J.$offset+a]=32;a=a+(1)>>0;}};M.ptr.prototype.clearflags=function(){var a;a=this;$copy(a.fmtFlags,new L.ptr(false,false,false,false,false,false,false,false,false,false,false),L);};M.prototype.clearflags=function(){return this.$val.clearflags();};M.ptr.prototype.init=function(a){var a,b;b=this;b.buf=a;b.clearflags();};M.prototype.init=function(a){return this.$val.init(a);};M.ptr.prototype.computePadding=function(a){var a,b=CE.nil,c=0,d=0,e,f,g,h,i,j,k,l,m,n,o,p;e=this;f=!e.fmtFlags.minus;g=e.wid;if(g<0){f=false;g=-g;}g=g-(a)>>0;if(g>0){if(f&&e.fmtFlags.zero){h=I;i=g;j=0;b=h;c=i;d=j;return[b,c,d];}if(f){k=J;l=g;m=0;b=k;c=l;d=m;return[b,c,d];}else{n=J;o=0;p=g;b=n;c=o;d=p;return[b,c,d];}}return[b,c,d];};M.prototype.computePadding=function(a){return this.$val.computePadding(a);};M.ptr.prototype.writePadding=function(a,b){var a,b,c,d;c=this;while(true){if(!(a>0)){break;}d=a;if(d>65){d=65;}c.buf.Write($subslice(b,0,d));a=a-(d)>>0;}};M.prototype.writePadding=function(a,b){return this.$val.writePadding(a,b);};M.ptr.prototype.pad=function(a){var a,b,c,d,e,f;b=this;if(!b.fmtFlags.widPresent||(b.wid===0)){b.buf.Write(a);return;}c=b.computePadding(C.RuneCount(a));d=c[0];e=c[1];f=c[2];if(e>0){b.writePadding(e,d);}b.buf.Write(a);if(f>0){b.writePadding(f,d);}};M.prototype.pad=function(a){return this.$val.pad(a);};M.ptr.prototype.padString=function(a){var a,b,c,d,e,f;b=this;if(!b.fmtFlags.widPresent||(b.wid===0)){b.buf.WriteString(a);return;}c=b.computePadding(C.RuneCountInString(a));d=c[0];e=c[1];f=c[2];if(e>0){b.writePadding(e,d);}b.buf.WriteString(a);if(f>0){b.writePadding(f,d);}};M.prototype.padString=function(a){return this.$val.padString(a);};M.ptr.prototype.fmt_boolean=function(a){var a,b;b=this;if(a){b.pad(N);}else{b.pad(O);}};M.prototype.fmt_boolean=function(a){return this.$val.fmt_boolean(a);};M.ptr.prototype.integer=function(a,b,c,d){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;e=this;if(e.fmtFlags.precPresent&&(e.prec===0)&&(a.$high===0&&a.$low===0)){return;}f=$subslice(new CE(e.intbuf),0);if(e.fmtFlags.widPresent){g=e.wid;if((b.$high===0&&b.$low===16)&&e.fmtFlags.sharp){g=g+(2)>>0;}if(g>65){f=$makeSlice(CE,g);}}h=c===true&&(a.$high<0||(a.$high===0&&a.$low<0));if(h){a=new $Int64(-a.$high,-a.$low);}i=0;if(e.fmtFlags.precPresent){i=e.prec;e.fmtFlags.zero=false;}else if(e.fmtFlags.zero&&e.fmtFlags.widPresent&&!e.fmtFlags.minus&&e.wid>0){i=e.wid;if(h||e.fmtFlags.plus||e.fmtFlags.space){i=i-(1)>>0;}}j=f.$length;k=new $Uint64(a.$high,a.$low);l=b;if((l.$high===0&&l.$low===10)){while(true){if(!((k.$high>0||(k.$high===0&&k.$low>=10)))){break;}j=j-(1)>>0;m=$div64(k,new $Uint64(0,10),false);(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=((n=new $Uint64(0+k.$high,48+k.$low),o=$mul64(m,new $Uint64(0,10)),new $Uint64(n.$high-o.$high,n.$low-o.$low)).$low<<24>>>24);k=m;}}else if((l.$high===0&&l.$low===16)){while(true){if(!((k.$high>0||(k.$high===0&&k.$low>=16)))){break;}j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=d.charCodeAt($flatten64(new $Uint64(k.$high&0,(k.$low&15)>>>0)));k=$shiftRightUint64(k,(4));}}else if((l.$high===0&&l.$low===8)){while(true){if(!((k.$high>0||(k.$high===0&&k.$low>=8)))){break;}j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=((p=new $Uint64(k.$high&0,(k.$low&7)>>>0),new $Uint64(0+p.$high,48+p.$low)).$low<<24>>>24);k=$shiftRightUint64(k,(3));}}else if((l.$high===0&&l.$low===2)){while(true){if(!((k.$high>0||(k.$high===0&&k.$low>=2)))){break;}j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=((q=new $Uint64(k.$high&0,(k.$low&1)>>>0),new $Uint64(0+q.$high,48+q.$low)).$low<<24>>>24);k=$shiftRightUint64(k,(1));}}else{$panic(new $String("fmt: unknown base; can't happen"));}j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=d.charCodeAt($flatten64(k));while(true){if(!(j>0&&i>(f.$length-j>>0))){break;}j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=48;}if(e.fmtFlags.sharp){r=b;if((r.$high===0&&r.$low===8)){if(!((((j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j])===48))){j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=48;}}else if((r.$high===0&&r.$low===16)){j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=(120+d.charCodeAt(10)<<24>>>24)-97<<24>>>24;j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=48;}}if(e.fmtFlags.unicode){j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=43;j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=85;}if(h){j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=45;}else if(e.fmtFlags.plus){j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=43;}else if(e.fmtFlags.space){j=j-(1)>>0;(j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]=32;}if(e.fmtFlags.unicode&&e.fmtFlags.uniQuote&&(a.$high>0||(a.$high===0&&a.$low>=0))&&(a.$high<0||(a.$high===0&&a.$low<=1114111))&&B.IsPrint(((a.$low+((a.$high>>31)*4294967296))>>0))){s=C.RuneLen(((a.$low+((a.$high>>31)*4294967296))>>0));t=(2+s>>0)+1>>0;$copySlice($subslice(f,(j-t>>0)),$subslice(f,j));j=j-(t)>>0;u=f.$length-t>>0;(u<0||u>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+u]=32;u=u+(1)>>0;(u<0||u>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+u]=39;u=u+(1)>>0;C.EncodeRune($subslice(f,u),((a.$low+((a.$high>>31)*4294967296))>>0));u=u+(s)>>0;(u<0||u>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+u]=39;}e.pad($subslice(f,j));};M.prototype.integer=function(a,b,c,d){return this.$val.integer(a,b,c,d);};M.ptr.prototype.truncate=function(a){var a,b,c,d,e,f,g;b=this;if(b.fmtFlags.precPresent&&b.prec>0;e+=f[1];}}return a;};M.prototype.truncate=function(a){return this.$val.truncate(a);};M.ptr.prototype.fmt_s=function(a){var a,b;b=this;a=b.truncate(a);b.padString(a);};M.prototype.fmt_s=function(a){return this.$val.fmt_s(a);};M.ptr.prototype.fmt_sbx=function(a,b,c){var a,b,c,d,e,f,g,h,i;d=this;e=b.$length;if(b===CE.nil){e=a.length;}f=(c.charCodeAt(10)-97<<24>>>24)+120<<24>>>24;g=CE.nil;h=0;while(true){if(!(h0&&d.fmtFlags.space){g=$append(g,32);}if(d.fmtFlags.sharp&&(d.fmtFlags.space||(h===0))){g=$append(g,48,f);}i=0;if(b===CE.nil){i=a.charCodeAt(h);}else{i=((h<0||h>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+h]);}g=$append(g,c.charCodeAt((i>>>4<<24>>>24)),c.charCodeAt(((i&15)>>>0)));h=h+(1)>>0;}d.pad(g);};M.prototype.fmt_sbx=function(a,b,c){return this.$val.fmt_sbx(a,b,c);};M.ptr.prototype.fmt_sx=function(a,b){var a,b,c;c=this;if(c.fmtFlags.precPresent&&c.prec>31)*4294967296))>>0));}else{c=B.AppendQuoteRune($subslice(new CE(b.intbuf),0,0),((a.$low+((a.$high>>31)*4294967296))>>0));}b.pad(c);};M.prototype.fmt_qc=function(a){return this.$val.fmt_qc(a);};P=function(a,b){var a,b;if(a.fmtFlags.precPresent){return a.prec;}return b;};M.ptr.prototype.formatFloat=function(a,b,c,d){var $deferred=[],$err=null,a,b,c,d,e,f;try{$deferFrames.push($deferred);e=this;f=B.AppendFloat($subslice(new CE(e.intbuf),0,1),a,b,c,d);if((((1<0||1>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+1])===45)||(((1<0||1>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+1])===43)){f=$subslice(f,1);}else{(0<0||0>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+0]=43;}if(A.IsInf(a,0)){if(e.fmtFlags.zero){$deferred.push([(function(){e.fmtFlags.zero=true;}),[]]);e.fmtFlags.zero=false;}}if(e.fmtFlags.zero&&e.fmtFlags.widPresent&&e.wid>f.$length){if(e.fmtFlags.space&&a>=0){e.buf.WriteByte(32);e.wid=e.wid-(1)>>0;}else if(e.fmtFlags.plus||a<0){e.buf.WriteByte(((0<0||0>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+0]));e.wid=e.wid-(1)>>0;}e.pad($subslice(f,1));return;}if(e.fmtFlags.space&&(((0<0||0>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+0])===43)){(0<0||0>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+0]=32;e.pad(f);return;}if(e.fmtFlags.plus||(((0<0||0>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+0])===45)||A.IsInf(a,0)){e.pad(f);return;}e.pad($subslice(f,1));}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);}};M.prototype.formatFloat=function(a,b,c,d){return this.$val.formatFloat(a,b,c,d);};M.ptr.prototype.fmt_e64=function(a){var a,b;b=this;b.formatFloat(a,101,P(b,6),64);};M.prototype.fmt_e64=function(a){return this.$val.fmt_e64(a);};M.ptr.prototype.fmt_E64=function(a){var a,b;b=this;b.formatFloat(a,69,P(b,6),64);};M.prototype.fmt_E64=function(a){return this.$val.fmt_E64(a);};M.ptr.prototype.fmt_f64=function(a){var a,b;b=this;b.formatFloat(a,102,P(b,6),64);};M.prototype.fmt_f64=function(a){return this.$val.fmt_f64(a);};M.ptr.prototype.fmt_g64=function(a){var a,b;b=this;b.formatFloat(a,103,P(b,-1),64);};M.prototype.fmt_g64=function(a){return this.$val.fmt_g64(a);};M.ptr.prototype.fmt_G64=function(a){var a,b;b=this;b.formatFloat(a,71,P(b,-1),64);};M.prototype.fmt_G64=function(a){return this.$val.fmt_G64(a);};M.ptr.prototype.fmt_fb64=function(a){var a,b;b=this;b.formatFloat(a,98,0,64);};M.prototype.fmt_fb64=function(a){return this.$val.fmt_fb64(a);};M.ptr.prototype.fmt_e32=function(a){var a,b;b=this;b.formatFloat($coerceFloat32(a),101,P(b,6),32);};M.prototype.fmt_e32=function(a){return this.$val.fmt_e32(a);};M.ptr.prototype.fmt_E32=function(a){var a,b;b=this;b.formatFloat($coerceFloat32(a),69,P(b,6),32);};M.prototype.fmt_E32=function(a){return this.$val.fmt_E32(a);};M.ptr.prototype.fmt_f32=function(a){var a,b;b=this;b.formatFloat($coerceFloat32(a),102,P(b,6),32);};M.prototype.fmt_f32=function(a){return this.$val.fmt_f32(a);};M.ptr.prototype.fmt_g32=function(a){var a,b;b=this;b.formatFloat($coerceFloat32(a),103,P(b,-1),32);};M.prototype.fmt_g32=function(a){return this.$val.fmt_g32(a);};M.ptr.prototype.fmt_G32=function(a){var a,b;b=this;b.formatFloat($coerceFloat32(a),71,P(b,-1),32);};M.prototype.fmt_G32=function(a){return this.$val.fmt_G32(a);};M.ptr.prototype.fmt_fb32=function(a){var a,b;b=this;b.formatFloat($coerceFloat32(a),98,0,32);};M.prototype.fmt_fb32=function(a){return this.$val.fmt_fb32(a);};M.ptr.prototype.fmt_c64=function(a,b){var a,b,c;c=this;c.fmt_complex($coerceFloat32(a.$real),$coerceFloat32(a.$imag),32,b);};M.prototype.fmt_c64=function(a,b){return this.$val.fmt_c64(a,b);};M.ptr.prototype.fmt_c128=function(a,b){var a,b,c;c=this;c.fmt_complex(a.$real,a.$imag,64,b);};M.prototype.fmt_c128=function(a,b){return this.$val.fmt_c128(a,b);};M.ptr.prototype.fmt_complex=function(a,b,c,d){var a,b,c,d,e,f,g,h,i,j;e=this;e.buf.WriteByte(40);f=e.fmtFlags.plus;g=e.fmtFlags.space;h=e.wid;i=0;while(true){if(!(true)){break;}j=d;if(j===98){e.formatFloat(a,98,0,c);}else if(j===101){e.formatFloat(a,101,P(e,6),c);}else if(j===69){e.formatFloat(a,69,P(e,6),c);}else if(j===102||j===70){e.formatFloat(a,102,P(e,6),c);}else if(j===103){e.formatFloat(a,103,P(e,-1),c);}else if(j===71){e.formatFloat(a,71,P(e,-1),c);}if(!((i===0))){break;}e.fmtFlags.plus=true;e.fmtFlags.space=false;e.wid=h;a=b;i=i+(1)>>0;}e.fmtFlags.space=g;e.fmtFlags.plus=f;e.wid=h;e.buf.Write(AA);};M.prototype.fmt_complex=function(a,b,c,d){return this.$val.fmt_complex(a,b,c,d);};$ptrType(AJ).prototype.Write=function(a){var a,b=0,c=$ifaceNil,d,e,f;d=this;d.$set($appendSlice(d.$get(),a));e=a.$length;f=$ifaceNil;b=e;c=f;return[b,c];};$ptrType(AJ).prototype.WriteString=function(a){var a,b=0,c=$ifaceNil,d,e,f;d=this;d.$set($appendSlice(d.$get(),new AJ($stringToBytes(a))));e=a.length;f=$ifaceNil;b=e;c=f;return[b,c];};$ptrType(AJ).prototype.WriteByte=function(a){var a,b;b=this;b.$set($append(b.$get(),a));return $ifaceNil;};$ptrType(AJ).prototype.WriteRune=function(a){var a,b,c,d,e,f;b=this;if(a<128){b.$set($append(b.$get(),(a<<24>>>24)));return $ifaceNil;}c=b.$get();d=c.$length;while(true){if(!((d+4>>0)>c.$capacity)){break;}c=$append(c,0);}f=C.EncodeRune((e=$subslice(c,d,(d+4>>0)),$subslice(new CE(e.$array),e.$offset,e.$offset+e.$length)),a);b.$set($subslice(c,0,(d+f>>0)));return $ifaceNil;};AM=function(){var a;a=$assertType(AL.Get(),CI);a.panicking=false;a.erroring=false;a.fmt.init(new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},a));return a;};AK.ptr.prototype.free=function(){var a;a=this;if(a.buf.$capacity>1024){return;}a.buf=$subslice(a.buf,0,0);a.arg=$ifaceNil;a.value=new G.Value.ptr(CK.nil,0,0);AL.Put(a);};AK.prototype.free=function(){return this.$val.free();};AK.ptr.prototype.Width=function(){var a=0,b=false,c,d,e;c=this;d=c.fmt.wid;e=c.fmt.fmtFlags.widPresent;a=d;b=e;return[a,b];};AK.prototype.Width=function(){return this.$val.Width();};AK.ptr.prototype.Precision=function(){var a=0,b=false,c,d,e;c=this;d=c.fmt.prec;e=c.fmt.fmtFlags.precPresent;a=d;b=e;return[a,b];};AK.prototype.Precision=function(){return this.$val.Precision();};AK.ptr.prototype.Flag=function(a){var a,b,c;b=this;c=a;if(c===45){return b.fmt.fmtFlags.minus;}else if(c===43){return b.fmt.fmtFlags.plus;}else if(c===35){return b.fmt.fmtFlags.sharp;}else if(c===32){return b.fmt.fmtFlags.space;}else if(c===48){return b.fmt.fmtFlags.zero;}return false;};AK.prototype.Flag=function(a){return this.$val.Flag(a);};AK.ptr.prototype.add=function(a){var a,b;b=this;new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b).WriteRune(a);};AK.prototype.add=function(a){return this.$val.add(a);};AK.ptr.prototype.Write=function(a){var a,b=0,c=$ifaceNil,d,e;d=this;e=new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d).Write(a);b=e[0];c=e[1];return[b,c];};AK.prototype.Write=function(a){return this.$val.Write(a);};AU=$pkg.Fprintln=function(a,b){var a,b,c=0,d=$ifaceNil,e,f,g;e=AM();e.doPrint(b,true,true);f=a.Write((g=e.buf,$subslice(new CE(g.$array),g.$offset,g.$offset+g.$length)));c=f[0];d=f[1];e.free();return[c,d];};AV=$pkg.Println=function(a){var a,b=0,c=$ifaceNil,d;d=AU(F.Stdout,a);b=d[0];c=d[1];return[b,c];};AX=function(a,b){var a,b,c;a=a;c=a.Field(b);if((c.Kind()===20)&&!c.IsNil()){c=c.Elem();}return c;};AK.ptr.prototype.unknownType=function(a){var a,b;b=this;a=a;if(!a.IsValid()){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b).Write(R);return;}new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b).WriteByte(63);new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b).WriteString(a.Type().String());new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b).WriteByte(63);};AK.prototype.unknownType=function(a){return this.$val.unknownType(a);};AK.ptr.prototype.badVerb=function(a){var a,b;b=this;b.erroring=true;b.add(37);b.add(33);b.add(a);b.add(40);if(!($interfaceIsEqual(b.arg,$ifaceNil))){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b).WriteString(G.TypeOf(b.arg).String());b.add(61);b.printArg(b.arg,118,0);}else if(b.value.IsValid()){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b).WriteString(b.value.Type().String());b.add(61);b.printValue(b.value,118,0);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b).Write(R);}b.add(41);b.erroring=false;};AK.prototype.badVerb=function(a){return this.$val.badVerb(a);};AK.ptr.prototype.fmtBool=function(a,b){var a,b,c,d;c=this;d=b;if(d===116||d===118){c.fmt.fmt_boolean(a);}else{c.badVerb(b);}};AK.prototype.fmtBool=function(a,b){return this.$val.fmtBool(a,b);};AK.ptr.prototype.fmtC=function(a){var a,b,c,d,e;b=this;c=((a.$low+((a.$high>>31)*4294967296))>>0);if(!((d=new $Int64(0,c),(d.$high===a.$high&&d.$low===a.$low)))){c=65533;}e=C.EncodeRune($subslice(new CE(b.runeBuf),0,4),c);b.fmt.pad($subslice(new CE(b.runeBuf),0,e));};AK.prototype.fmtC=function(a){return this.$val.fmtC(a);};AK.ptr.prototype.fmtInt64=function(a,b){var a,b,c,d;c=this;d=b;if(d===98){c.fmt.integer(a,new $Uint64(0,2),true,"0123456789abcdef");}else if(d===99){c.fmtC(a);}else if(d===100||d===118){c.fmt.integer(a,new $Uint64(0,10),true,"0123456789abcdef");}else if(d===111){c.fmt.integer(a,new $Uint64(0,8),true,"0123456789abcdef");}else if(d===113){if((0=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]);if(h>0){if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).Write(Q);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(32);}}e.printArg(new $Uint8(i),118,d+1>>0);g++;}if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(125);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(93);}return;}j=b;if(j===115){e.fmt.fmt_s($bytesToString(a));}else if(j===120){e.fmt.fmt_bx(a,"0123456789abcdef");}else if(j===88){e.fmt.fmt_bx(a,"0123456789ABCDEF");}else if(j===113){e.fmt.fmt_q($bytesToString(a));}else{e.badVerb(b);}};AK.prototype.fmtBytes=function(a,b,c,d){return this.$val.fmtBytes(a,b,c,d);};AK.ptr.prototype.fmtPointer=function(a,b){var a,b,c,d,e,f,g;c=this;a=a;d=true;e=b;if(e===112||e===118){}else if(e===98||e===100||e===111||e===120||e===88){d=false;}else{c.badVerb(b);return;}f=0;g=a.Kind();if(g===18||g===19||g===21||g===22||g===23||g===26){f=a.Pointer();}else{c.badVerb(b);return;}if(c.fmt.fmtFlags.sharpV){c.add(40);new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).WriteString(a.Type().String());c.add(41);c.add(40);if(f===0){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).Write(T);}else{c.fmt0x64(new $Uint64(0,f.constructor===Number?f:1),true);}c.add(41);}else if((b===118)&&(f===0)){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).Write(R);}else{if(d){c.fmt0x64(new $Uint64(0,f.constructor===Number?f:1),!c.fmt.fmtFlags.sharp);}else{c.fmtUint64(new $Uint64(0,f.constructor===Number?f:1),b);}}};AK.prototype.fmtPointer=function(a,b){return this.$val.fmtPointer(a,b);};AK.ptr.prototype.catchPanic=function(a,b){var a,b,c,d,e;c=this;d=$recover();if(!($interfaceIsEqual(d,$ifaceNil))){e=G.ValueOf(a);if((e.Kind()===22)&&e.IsNil()){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).Write(R);return;}if(c.panicking){$panic(d);}c.fmt.clearflags();new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).Write(V);c.add(b);new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).Write(Y);c.panicking=true;c.printArg(d,118,0);c.panicking=false;new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).WriteByte(41);}};AK.prototype.catchPanic=function(a,b){return this.$val.catchPanic(a,b);};AK.ptr.prototype.clearSpecialFlags=function(){var a=false,b=false,c;c=this;a=c.fmt.fmtFlags.plusV;if(a){c.fmt.fmtFlags.plus=true;c.fmt.fmtFlags.plusV=false;}b=c.fmt.fmtFlags.sharpV;if(b){c.fmt.fmtFlags.sharp=true;c.fmt.fmtFlags.sharpV=false;}return[a,b];};AK.prototype.clearSpecialFlags=function(){return this.$val.clearSpecialFlags();};AK.ptr.prototype.restoreSpecialFlags=function(a,b){var a,b,c;c=this;if(a){c.fmt.fmtFlags.plus=false;c.fmt.fmtFlags.plusV=true;}if(b){c.fmt.fmtFlags.sharp=false;c.fmt.fmtFlags.sharpV=true;}};AK.prototype.restoreSpecialFlags=function(a,b){return this.$val.restoreSpecialFlags(a,b);};AK.ptr.prototype.handleMethods=function(a,b){var $deferred=[],$err=null,a,b,c=false,d,e,f,g,h,i,j,k,l,m,n;try{$deferFrames.push($deferred);d=this;if(d.erroring){return c;}e=$assertType(d.arg,AG,true);f=e[0];g=e[1];if(g){c=true;h=d.clearSpecialFlags();$deferred.push([$methodVal(d,"restoreSpecialFlags"),[h[0],h[1]]]);$deferred.push([$methodVal(d,"catchPanic"),[d.arg,a]]);f.Format(d,a);return c;}if(d.fmt.fmtFlags.sharpV){i=$assertType(d.arg,AI,true);j=i[0];k=i[1];if(k){c=true;$deferred.push([$methodVal(d,"catchPanic"),[d.arg,a]]);d.fmt.fmt_s(j.GoString());return c;}}else{l=a;if(l===118||l===115||l===120||l===88||l===113){n=d.arg;if($assertType(n,$error,true)[1]){m=n;c=true;$deferred.push([$methodVal(d,"catchPanic"),[d.arg,a]]);d.printArg(new $String(m.Error()),a,b);return c;}else if($assertType(n,AH,true)[1]){m=n;c=true;$deferred.push([$methodVal(d,"catchPanic"),[d.arg,a]]);d.printArg(new $String(m.String()),a,b);return c;}}}c=false;return c;}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);return c;}};AK.prototype.handleMethods=function(a,b){return this.$val.handleMethods(a,b);};AK.ptr.prototype.printArg=function(a,b,c){var a,b,c,d=false,e,f,g,h,i;e=this;e.arg=a;e.value=new G.Value.ptr(CK.nil,0,0);if($interfaceIsEqual(a,$ifaceNil)){if((b===84)||(b===118)){e.fmt.pad(R);}else{e.badVerb(b);}d=false;return d;}f=b;if(f===84){e.printArg(new $String(G.TypeOf(a).String()),115,0);d=false;return d;}else if(f===112){e.fmtPointer(G.ValueOf(a),b);d=false;return d;}h=a;if($assertType(h,$Bool,true)[1]){g=h.$val;e.fmtBool(g,b);}else if($assertType(h,$Float32,true)[1]){g=h.$val;e.fmtFloat32(g,b);}else if($assertType(h,$Float64,true)[1]){g=h.$val;e.fmtFloat64(g,b);}else if($assertType(h,$Complex64,true)[1]){g=h.$val;e.fmtComplex64(g,b);}else if($assertType(h,$Complex128,true)[1]){g=h.$val;e.fmtComplex128(g,b);}else if($assertType(h,$Int,true)[1]){g=h.$val;e.fmtInt64(new $Int64(0,g),b);}else if($assertType(h,$Int8,true)[1]){g=h.$val;e.fmtInt64(new $Int64(0,g),b);}else if($assertType(h,$Int16,true)[1]){g=h.$val;e.fmtInt64(new $Int64(0,g),b);}else if($assertType(h,$Int32,true)[1]){g=h.$val;e.fmtInt64(new $Int64(0,g),b);}else if($assertType(h,$Int64,true)[1]){g=h.$val;e.fmtInt64(g,b);}else if($assertType(h,$Uint,true)[1]){g=h.$val;e.fmtUint64(new $Uint64(0,g),b);}else if($assertType(h,$Uint8,true)[1]){g=h.$val;e.fmtUint64(new $Uint64(0,g),b);}else if($assertType(h,$Uint16,true)[1]){g=h.$val;e.fmtUint64(new $Uint64(0,g),b);}else if($assertType(h,$Uint32,true)[1]){g=h.$val;e.fmtUint64(new $Uint64(0,g),b);}else if($assertType(h,$Uint64,true)[1]){g=h.$val;e.fmtUint64(g,b);}else if($assertType(h,$Uintptr,true)[1]){g=h.$val;e.fmtUint64(new $Uint64(0,g.constructor===Number?g:1),b);}else if($assertType(h,$String,true)[1]){g=h.$val;e.fmtString(g,b);d=(b===115)||(b===118);}else if($assertType(h,CE,true)[1]){g=h.$val;e.fmtBytes(g,b,$ifaceNil,c);d=b===115;}else{g=h;i=e.handleMethods(b,c);if(i){d=false;return d;}d=e.printReflectValue(G.ValueOf(a),b,c);return d;}e.arg=$ifaceNil;return d;};AK.prototype.printArg=function(a,b,c){return this.$val.printArg(a,b,c);};AK.ptr.prototype.printValue=function(a,b,c){var a,b,c,d=false,e,f,g;e=this;a=a;if(!a.IsValid()){if((b===84)||(b===118)){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).Write(R);}else{e.badVerb(b);}d=false;return d;}f=b;if(f===84){e.printArg(new $String(a.Type().String()),115,0);d=false;return d;}else if(f===112){e.fmtPointer(a,b);d=false;return d;}e.arg=$ifaceNil;if(a.CanInterface()){e.arg=a.Interface();}g=e.handleMethods(b,c);if(g){d=false;return d;}d=e.printReflectValue(a,b,c);return d;};AK.prototype.printValue=function(a,b,c){return this.$val.printValue(a,b,c);};AK.ptr.prototype.printReflectValue=function(a,b,c){var a,aa,ab,b,c,d=false,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;e=this;a=a;f=e.value;e.value=a;g=a;h=g.Kind();BigSwitch:switch(0){default:if(h===1){e.fmtBool(g.Bool(),b);}else if(h===2||h===3||h===4||h===5||h===6){e.fmtInt64(g.Int(),b);}else if(h===7||h===8||h===9||h===10||h===11||h===12){e.fmtUint64(g.Uint(),b);}else if(h===13||h===14){if(g.Type().Size()===4){e.fmtFloat32(g.Float(),b);}else{e.fmtFloat64(g.Float(),b);}}else if(h===15||h===16){if(g.Type().Size()===8){e.fmtComplex64((i=g.Complex(),new $Complex64(i.$real,i.$imag)),b);}else{e.fmtComplex128(g.Complex(),b);}}else if(h===24){e.fmtString(g.String(),b);}else if(h===21){if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteString(g.Type().String());if(g.IsNil()){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteString("(nil)");break;}new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(123);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).Write(U);}j=g.MapKeys();k=j;l=0;while(true){if(!(l=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+l]);if(m>0){if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).Write(Q);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(32);}}e.printValue(n,b,c+1>>0);new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(58);e.printValue(g.MapIndex(n),b,c+1>>0);l++;}if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(125);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(93);}}else if(h===25){if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteString(a.Type().String());}e.add(123);o=g;p=o.Type();q=0;while(true){if(!(q0){if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).Write(Q);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(32);}}if(e.fmt.fmtFlags.plusV||e.fmt.fmtFlags.sharpV){r=$clone(p.Field(q),G.StructField);if(!(r.Name==="")){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteString(r.Name);new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(58);}}e.printValue(AX(o,q),b,c+1>>0);q=q+(1)>>0;}new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(125);}else if(h===20){s=g.Elem();if(!s.IsValid()){if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteString(g.Type().String());new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).Write(S);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).Write(R);}}else{d=e.printValue(s,b,c+1>>0);}}else if(h===17||h===23){t=g.Type();if((t.Elem().Kind()===8)&&($interfaceIsEqual(t.Elem(),BB)||(b===115)||(b===113)||(b===120))){u=CE.nil;if(g.Kind()===23){u=g.Bytes();}else if(g.CanAddr()){u=g.Slice(0,g.Len()).Bytes();}else{u=$makeSlice(CE,g.Len());v=u;w=0;while(true){if(!(w=u.$length)?$throwRuntimeError("index out of range"):u.$array[u.$offset+x]=(g.Index(x).Uint().$low<<24>>>24);w++;}}e.fmtBytes(u,b,t,c);d=b===115;break;}if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteString(a.Type().String());if((g.Kind()===23)&&g.IsNil()){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteString("(nil)");break;}new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(123);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(91);}y=0;while(true){if(!(y0){if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).Write(Q);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(32);}}e.printValue(g.Index(y),b,c+1>>0);y=y+(1)>>0;}if(e.fmt.fmtFlags.sharpV){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(125);}else{new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(93);}}else if(h===22){z=g.Pointer();if(!((z===0))&&(c===0)){aa=g.Elem();ab=aa.Kind();if(ab===17||ab===23){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(38);e.printValue(aa,b,c+1>>0);break BigSwitch;}else if(ab===25){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(38);e.printValue(aa,b,c+1>>0);break BigSwitch;}else if(ab===21){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e).WriteByte(38);e.printValue(aa,b,c+1>>0);break BigSwitch;}}e.fmtPointer(a,b);}else if(h===18||h===19||h===26){e.fmtPointer(a,b);}else{e.unknownType(g);}}e.value=f;d=d;return d;};AK.prototype.printReflectValue=function(a,b,c){return this.$val.printReflectValue(a,b,c);};AK.ptr.prototype.doPrint=function(a,b,c){var a,b,c,d,e,f,g,h;d=this;e=false;f=0;while(true){if(!(f=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+f]);if(f>0){h=!($interfaceIsEqual(g,$ifaceNil))&&(G.TypeOf(g).Kind()===24);if(b||!h&&!e){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d).WriteByte(32);}}e=d.printArg(g,118,0);f=f+(1)>>0;}if(c){new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d).WriteByte(10);}};AK.prototype.doPrint=function(a,b,c){return this.$val.doPrint(a,b,c);};BS.ptr.prototype.Read=function(a){var a,b=0,c=$ifaceNil,d,e,f;d=this;e=0;f=D.New("ScanState's Read should not be called. Use ReadRune");b=e;c=f;return[b,c];};BS.prototype.Read=function(a){return this.$val.Read(a);};BS.ptr.prototype.ReadRune=function(){var a=0,b=0,c=$ifaceNil,d,e;d=this;if(d.peekRune>=0){d.count=d.count+(1)>>0;a=d.peekRune;b=C.RuneLen(a);d.prevRune=a;d.peekRune=-1;return[a,b,c];}if(d.atEOF||d.ssave.nlIsEnd&&(d.prevRune===10)||d.count>=d.ssave.argLimit){c=E.EOF;return[a,b,c];}e=d.rr.ReadRune();a=e[0];b=e[1];c=e[2];if($interfaceIsEqual(c,$ifaceNil)){d.count=d.count+(1)>>0;d.prevRune=a;}else if($interfaceIsEqual(c,E.EOF)){d.atEOF=true;}return[a,b,c];};BS.prototype.ReadRune=function(){return this.$val.ReadRune();};BS.ptr.prototype.Width=function(){var a=0,b=false,c,d,e,f,g;c=this;if(c.ssave.maxWid===1073741824){d=0;e=false;a=d;b=e;return[a,b];}f=c.ssave.maxWid;g=true;a=f;b=g;return[a,b];};BS.prototype.Width=function(){return this.$val.Width();};BS.ptr.prototype.getRune=function(){var a=0,b,c,d;b=this;c=b.ReadRune();a=c[0];d=c[2];if(!($interfaceIsEqual(d,$ifaceNil))){if($interfaceIsEqual(d,E.EOF)){a=-1;return a;}b.error(d);}return a;};BS.prototype.getRune=function(){return this.$val.getRune();};BS.ptr.prototype.UnreadRune=function(){var a,b,c,d;a=this;b=$assertType(a.rr,BE,true);c=b[0];d=b[1];if(d){c.UnreadRune();}else{a.peekRune=a.prevRune;}a.prevRune=-1;a.count=a.count-(1)>>0;return $ifaceNil;};BS.prototype.UnreadRune=function(){return this.$val.UnreadRune();};BS.ptr.prototype.error=function(a){var a,b,c;b=this;$panic((c=new BR.ptr(a),new c.constructor.elem(c)));};BS.prototype.error=function(a){return this.$val.error(a);};BS.ptr.prototype.errorString=function(a){var a,b,c;b=this;$panic((c=new BR.ptr(D.New(a)),new c.constructor.elem(c)));};BS.prototype.errorString=function(a){return this.$val.errorString(a);};BS.ptr.prototype.Token=function(a,b){var $deferred=[],$err=null,a,b,c=CE.nil,d=$ifaceNil,e;try{$deferFrames.push($deferred);e=this;$deferred.push([(function(){var f,g,h,i;f=$recover();if(!($interfaceIsEqual(f,$ifaceNil))){g=$assertType(f,BR,true);h=$clone(g[0],BR);i=g[1];if(i){d=h.err;}else{$panic(f);}}}),[]]);if(b===$throwNilPointerError){b=BW;}e.buf=$subslice(e.buf,0,0);c=e.token(a,b);return[c,d];}catch(err){$err=err;}finally{$deferFrames.pop();$callDeferred($deferred,$err);return[c,d];}};BS.prototype.Token=function(a,b){return this.$val.Token(a,b);};BV=function(a){var a,b,c,d,e;if(a>=65536){return false;}b=(a<<16>>>16);c=BU;d=0;while(true){if(!(d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]),CG);if(b1024){return;}b.buf=$subslice(b.buf,0,0);b.rr=$ifaceNil;BY.Put(b);};BS.prototype.free=function(a){return this.$val.free(a);};BS.ptr.prototype.skipSpace=function(a){var a,b,c;b=this;while(true){if(!(true)){break;}c=b.getRune();if(c===-1){return;}if((c===13)&&b.peek("\n")){continue;}if(c===10){if(a){break;}if(b.ssave.nlIsSpace){continue;}b.errorString("unexpected newline");return;}if(!BV(c)){b.UnreadRune();break;}}};BS.prototype.skipSpace=function(a){return this.$val.skipSpace(a);};BS.ptr.prototype.token=function(a,b){var a,b,c,d,e;c=this;if(a){c.skipSpace(false);}while(true){if(!(true)){break;}d=c.getRune();if(d===-1){break;}if(!b(d)){c.UnreadRune();break;}new CJ(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c).WriteRune(d);}return(e=c.buf,$subslice(new CE(e.$array),e.$offset,e.$offset+e.$length));};BS.prototype.token=function(a,b){return this.$val.token(a,b);};CC=function(a,b){var a,b,c,d,e,f,g;c=a;d=0;while(true){if(!(d=0;};BS.prototype.peek=function(a){return this.$val.peek(a);};DJ.methods=[{prop:"clearflags",name:"clearflags",pkg:"fmt",typ:$funcType([],[],false)},{prop:"init",name:"init",pkg:"fmt",typ:$funcType([CJ],[],false)},{prop:"computePadding",name:"computePadding",pkg:"fmt",typ:$funcType([$Int],[CE,$Int,$Int],false)},{prop:"writePadding",name:"writePadding",pkg:"fmt",typ:$funcType([$Int,CE],[],false)},{prop:"pad",name:"pad",pkg:"fmt",typ:$funcType([CE],[],false)},{prop:"padString",name:"padString",pkg:"fmt",typ:$funcType([$String],[],false)},{prop:"fmt_boolean",name:"fmt_boolean",pkg:"fmt",typ:$funcType([$Bool],[],false)},{prop:"integer",name:"integer",pkg:"fmt",typ:$funcType([$Int64,$Uint64,$Bool,$String],[],false)},{prop:"truncate",name:"truncate",pkg:"fmt",typ:$funcType([$String],[$String],false)},{prop:"fmt_s",name:"fmt_s",pkg:"fmt",typ:$funcType([$String],[],false)},{prop:"fmt_sbx",name:"fmt_sbx",pkg:"fmt",typ:$funcType([$String,CE,$String],[],false)},{prop:"fmt_sx",name:"fmt_sx",pkg:"fmt",typ:$funcType([$String,$String],[],false)},{prop:"fmt_bx",name:"fmt_bx",pkg:"fmt",typ:$funcType([CE,$String],[],false)},{prop:"fmt_q",name:"fmt_q",pkg:"fmt",typ:$funcType([$String],[],false)},{prop:"fmt_qc",name:"fmt_qc",pkg:"fmt",typ:$funcType([$Int64],[],false)},{prop:"formatFloat",name:"formatFloat",pkg:"fmt",typ:$funcType([$Float64,$Uint8,$Int,$Int],[],false)},{prop:"fmt_e64",name:"fmt_e64",pkg:"fmt",typ:$funcType([$Float64],[],false)},{prop:"fmt_E64",name:"fmt_E64",pkg:"fmt",typ:$funcType([$Float64],[],false)},{prop:"fmt_f64",name:"fmt_f64",pkg:"fmt",typ:$funcType([$Float64],[],false)},{prop:"fmt_g64",name:"fmt_g64",pkg:"fmt",typ:$funcType([$Float64],[],false)},{prop:"fmt_G64",name:"fmt_G64",pkg:"fmt",typ:$funcType([$Float64],[],false)},{prop:"fmt_fb64",name:"fmt_fb64",pkg:"fmt",typ:$funcType([$Float64],[],false)},{prop:"fmt_e32",name:"fmt_e32",pkg:"fmt",typ:$funcType([$Float32],[],false)},{prop:"fmt_E32",name:"fmt_E32",pkg:"fmt",typ:$funcType([$Float32],[],false)},{prop:"fmt_f32",name:"fmt_f32",pkg:"fmt",typ:$funcType([$Float32],[],false)},{prop:"fmt_g32",name:"fmt_g32",pkg:"fmt",typ:$funcType([$Float32],[],false)},{prop:"fmt_G32",name:"fmt_G32",pkg:"fmt",typ:$funcType([$Float32],[],false)},{prop:"fmt_fb32",name:"fmt_fb32",pkg:"fmt",typ:$funcType([$Float32],[],false)},{prop:"fmt_c64",name:"fmt_c64",pkg:"fmt",typ:$funcType([$Complex64,$Int32],[],false)},{prop:"fmt_c128",name:"fmt_c128",pkg:"fmt",typ:$funcType([$Complex128,$Int32],[],false)},{prop:"fmt_complex",name:"fmt_complex",pkg:"fmt",typ:$funcType([$Float64,$Float64,$Int,$Int32],[],false)}];CJ.methods=[{prop:"Write",name:"Write",pkg:"",typ:$funcType([CE],[$Int,$error],false)},{prop:"WriteString",name:"WriteString",pkg:"",typ:$funcType([$String],[$Int,$error],false)},{prop:"WriteByte",name:"WriteByte",pkg:"",typ:$funcType([$Uint8],[$error],false)},{prop:"WriteRune",name:"WriteRune",pkg:"",typ:$funcType([$Int32],[$error],false)}];CI.methods=[{prop:"free",name:"free",pkg:"fmt",typ:$funcType([],[],false)},{prop:"Width",name:"Width",pkg:"",typ:$funcType([],[$Int,$Bool],false)},{prop:"Precision",name:"Precision",pkg:"",typ:$funcType([],[$Int,$Bool],false)},{prop:"Flag",name:"Flag",pkg:"",typ:$funcType([$Int],[$Bool],false)},{prop:"add",name:"add",pkg:"fmt",typ:$funcType([$Int32],[],false)},{prop:"Write",name:"Write",pkg:"",typ:$funcType([CE],[$Int,$error],false)},{prop:"unknownType",name:"unknownType",pkg:"fmt",typ:$funcType([G.Value],[],false)},{prop:"badVerb",name:"badVerb",pkg:"fmt",typ:$funcType([$Int32],[],false)},{prop:"fmtBool",name:"fmtBool",pkg:"fmt",typ:$funcType([$Bool,$Int32],[],false)},{prop:"fmtC",name:"fmtC",pkg:"fmt",typ:$funcType([$Int64],[],false)},{prop:"fmtInt64",name:"fmtInt64",pkg:"fmt",typ:$funcType([$Int64,$Int32],[],false)},{prop:"fmt0x64",name:"fmt0x64",pkg:"fmt",typ:$funcType([$Uint64,$Bool],[],false)},{prop:"fmtUnicode",name:"fmtUnicode",pkg:"fmt",typ:$funcType([$Int64],[],false)},{prop:"fmtUint64",name:"fmtUint64",pkg:"fmt",typ:$funcType([$Uint64,$Int32],[],false)},{prop:"fmtFloat32",name:"fmtFloat32",pkg:"fmt",typ:$funcType([$Float32,$Int32],[],false)},{prop:"fmtFloat64",name:"fmtFloat64",pkg:"fmt",typ:$funcType([$Float64,$Int32],[],false)},{prop:"fmtComplex64",name:"fmtComplex64",pkg:"fmt",typ:$funcType([$Complex64,$Int32],[],false)},{prop:"fmtComplex128",name:"fmtComplex128",pkg:"fmt",typ:$funcType([$Complex128,$Int32],[],false)},{prop:"fmtString",name:"fmtString",pkg:"fmt",typ:$funcType([$String,$Int32],[],false)},{prop:"fmtBytes",name:"fmtBytes",pkg:"fmt",typ:$funcType([CE,$Int32,G.Type,$Int],[],false)},{prop:"fmtPointer",name:"fmtPointer",pkg:"fmt",typ:$funcType([G.Value,$Int32],[],false)},{prop:"catchPanic",name:"catchPanic",pkg:"fmt",typ:$funcType([$emptyInterface,$Int32],[],false)},{prop:"clearSpecialFlags",name:"clearSpecialFlags",pkg:"fmt",typ:$funcType([],[$Bool,$Bool],false)},{prop:"restoreSpecialFlags",name:"restoreSpecialFlags",pkg:"fmt",typ:$funcType([$Bool,$Bool],[],false)},{prop:"handleMethods",name:"handleMethods",pkg:"fmt",typ:$funcType([$Int32,$Int],[$Bool],false)},{prop:"printArg",name:"printArg",pkg:"fmt",typ:$funcType([$emptyInterface,$Int32,$Int],[$Bool],false)},{prop:"printValue",name:"printValue",pkg:"fmt",typ:$funcType([G.Value,$Int32,$Int],[$Bool],false)},{prop:"printReflectValue",name:"printReflectValue",pkg:"fmt",typ:$funcType([G.Value,$Int32,$Int],[$Bool],false)},{prop:"argNumber",name:"argNumber",pkg:"fmt",typ:$funcType([$Int,$String,$Int,$Int],[$Int,$Int,$Bool],false)},{prop:"doPrintf",name:"doPrintf",pkg:"fmt",typ:$funcType([$String,CF],[],false)},{prop:"doPrint",name:"doPrint",pkg:"fmt",typ:$funcType([CF,$Bool,$Bool],[],false)}];CN.methods=[{prop:"Read",name:"Read",pkg:"",typ:$funcType([CE],[$Int,$error],false)},{prop:"ReadRune",name:"ReadRune",pkg:"",typ:$funcType([],[$Int32,$Int,$error],false)},{prop:"Width",name:"Width",pkg:"",typ:$funcType([],[$Int,$Bool],false)},{prop:"getRune",name:"getRune",pkg:"fmt",typ:$funcType([],[$Int32],false)},{prop:"mustReadRune",name:"mustReadRune",pkg:"fmt",typ:$funcType([],[$Int32],false)},{prop:"UnreadRune",name:"UnreadRune",pkg:"",typ:$funcType([],[$error],false)},{prop:"error",name:"error",pkg:"fmt",typ:$funcType([$error],[],false)},{prop:"errorString",name:"errorString",pkg:"fmt",typ:$funcType([$String],[],false)},{prop:"Token",name:"Token",pkg:"",typ:$funcType([$Bool,DK],[CE,$error],false)},{prop:"SkipSpace",name:"SkipSpace",pkg:"",typ:$funcType([],[],false)},{prop:"free",name:"free",pkg:"fmt",typ:$funcType([BT],[],false)},{prop:"skipSpace",name:"skipSpace",pkg:"fmt",typ:$funcType([$Bool],[],false)},{prop:"token",name:"token",pkg:"fmt",typ:$funcType([$Bool,DK],[CE],false)},{prop:"consume",name:"consume",pkg:"fmt",typ:$funcType([$String,$Bool],[$Bool],false)},{prop:"peek",name:"peek",pkg:"fmt",typ:$funcType([$String],[$Bool],false)},{prop:"notEOF",name:"notEOF",pkg:"fmt",typ:$funcType([],[],false)},{prop:"accept",name:"accept",pkg:"fmt",typ:$funcType([$String],[$Bool],false)},{prop:"okVerb",name:"okVerb",pkg:"fmt",typ:$funcType([$Int32,$String,$String],[$Bool],false)},{prop:"scanBool",name:"scanBool",pkg:"fmt",typ:$funcType([$Int32],[$Bool],false)},{prop:"getBase",name:"getBase",pkg:"fmt",typ:$funcType([$Int32],[$Int,$String],false)},{prop:"scanNumber",name:"scanNumber",pkg:"fmt",typ:$funcType([$String,$Bool],[$String],false)},{prop:"scanRune",name:"scanRune",pkg:"fmt",typ:$funcType([$Int],[$Int64],false)},{prop:"scanBasePrefix",name:"scanBasePrefix",pkg:"fmt",typ:$funcType([],[$Int,$String,$Bool],false)},{prop:"scanInt",name:"scanInt",pkg:"fmt",typ:$funcType([$Int32,$Int],[$Int64],false)},{prop:"scanUint",name:"scanUint",pkg:"fmt",typ:$funcType([$Int32,$Int],[$Uint64],false)},{prop:"floatToken",name:"floatToken",pkg:"fmt",typ:$funcType([],[$String],false)},{prop:"complexTokens",name:"complexTokens",pkg:"fmt",typ:$funcType([],[$String,$String],false)},{prop:"convertFloat",name:"convertFloat",pkg:"fmt",typ:$funcType([$String,$Int],[$Float64],false)},{prop:"scanComplex",name:"scanComplex",pkg:"fmt",typ:$funcType([$Int32,$Int],[$Complex128],false)},{prop:"convertString",name:"convertString",pkg:"fmt",typ:$funcType([$Int32],[$String],false)},{prop:"quotedString",name:"quotedString",pkg:"fmt",typ:$funcType([],[$String],false)},{prop:"hexDigit",name:"hexDigit",pkg:"fmt",typ:$funcType([$Int32],[$Int],false)},{prop:"hexByte",name:"hexByte",pkg:"fmt",typ:$funcType([],[$Uint8,$Bool],false)},{prop:"hexString",name:"hexString",pkg:"fmt",typ:$funcType([],[$String],false)},{prop:"scanOne",name:"scanOne",pkg:"fmt",typ:$funcType([$Int32,$emptyInterface],[],false)},{prop:"doScan",name:"doScan",pkg:"fmt",typ:$funcType([CF],[$Int,$error],false)},{prop:"advance",name:"advance",pkg:"fmt",typ:$funcType([$String],[$Int],false)},{prop:"doScanf",name:"doScanf",pkg:"fmt",typ:$funcType([$String,CF],[$Int,$error],false)}];L.init([{prop:"widPresent",name:"widPresent",pkg:"fmt",typ:$Bool,tag:""},{prop:"precPresent",name:"precPresent",pkg:"fmt",typ:$Bool,tag:""},{prop:"minus",name:"minus",pkg:"fmt",typ:$Bool,tag:""},{prop:"plus",name:"plus",pkg:"fmt",typ:$Bool,tag:""},{prop:"sharp",name:"sharp",pkg:"fmt",typ:$Bool,tag:""},{prop:"space",name:"space",pkg:"fmt",typ:$Bool,tag:""},{prop:"unicode",name:"unicode",pkg:"fmt",typ:$Bool,tag:""},{prop:"uniQuote",name:"uniQuote",pkg:"fmt",typ:$Bool,tag:""},{prop:"zero",name:"zero",pkg:"fmt",typ:$Bool,tag:""},{prop:"plusV",name:"plusV",pkg:"fmt",typ:$Bool,tag:""},{prop:"sharpV",name:"sharpV",pkg:"fmt",typ:$Bool,tag:""}]);M.init([{prop:"intbuf",name:"intbuf",pkg:"fmt",typ:DI,tag:""},{prop:"buf",name:"buf",pkg:"fmt",typ:CJ,tag:""},{prop:"wid",name:"wid",pkg:"fmt",typ:$Int,tag:""},{prop:"prec",name:"prec",pkg:"fmt",typ:$Int,tag:""},{prop:"fmtFlags",name:"",pkg:"fmt",typ:L,tag:""}]);AF.init([{prop:"Flag",name:"Flag",pkg:"",typ:$funcType([$Int],[$Bool],false)},{prop:"Precision",name:"Precision",pkg:"",typ:$funcType([],[$Int,$Bool],false)},{prop:"Width",name:"Width",pkg:"",typ:$funcType([],[$Int,$Bool],false)},{prop:"Write",name:"Write",pkg:"",typ:$funcType([CE],[$Int,$error],false)}]);AG.init([{prop:"Format",name:"Format",pkg:"",typ:$funcType([AF,$Int32],[],false)}]);AH.init([{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}]);AI.init([{prop:"GoString",name:"GoString",pkg:"",typ:$funcType([],[$String],false)}]);AJ.init($Uint8);AK.init([{prop:"n",name:"n",pkg:"fmt",typ:$Int,tag:""},{prop:"panicking",name:"panicking",pkg:"fmt",typ:$Bool,tag:""},{prop:"erroring",name:"erroring",pkg:"fmt",typ:$Bool,tag:""},{prop:"buf",name:"buf",pkg:"fmt",typ:AJ,tag:""},{prop:"arg",name:"arg",pkg:"fmt",typ:$emptyInterface,tag:""},{prop:"value",name:"value",pkg:"fmt",typ:G.Value,tag:""},{prop:"reordered",name:"reordered",pkg:"fmt",typ:$Bool,tag:""},{prop:"goodArgNum",name:"goodArgNum",pkg:"fmt",typ:$Bool,tag:""},{prop:"runeBuf",name:"runeBuf",pkg:"fmt",typ:CO,tag:""},{prop:"fmt",name:"fmt",pkg:"fmt",typ:M,tag:""}]);BE.init([{prop:"UnreadRune",name:"UnreadRune",pkg:"",typ:$funcType([],[$error],false)}]);BR.init([{prop:"err",name:"err",pkg:"fmt",typ:$error,tag:""}]);BS.init([{prop:"rr",name:"rr",pkg:"fmt",typ:E.RuneReader,tag:""},{prop:"buf",name:"buf",pkg:"fmt",typ:AJ,tag:""},{prop:"peekRune",name:"peekRune",pkg:"fmt",typ:$Int32,tag:""},{prop:"prevRune",name:"prevRune",pkg:"fmt",typ:$Int32,tag:""},{prop:"count",name:"count",pkg:"fmt",typ:$Int,tag:""},{prop:"atEOF",name:"atEOF",pkg:"fmt",typ:$Bool,tag:""},{prop:"ssave",name:"",pkg:"fmt",typ:BT,tag:""}]);BT.init([{prop:"validSave",name:"validSave",pkg:"fmt",typ:$Bool,tag:""},{prop:"nlIsEnd",name:"nlIsEnd",pkg:"fmt",typ:$Bool,tag:""},{prop:"nlIsSpace",name:"nlIsSpace",pkg:"fmt",typ:$Bool,tag:""},{prop:"argLimit",name:"argLimit",pkg:"fmt",typ:$Int,tag:""},{prop:"limit",name:"limit",pkg:"fmt",typ:$Int,tag:""},{prop:"maxWid",name:"maxWid",pkg:"fmt",typ:$Int,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_fmt=function(){while(true){switch($s){case 0:$r=D.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}$r=E.$init($BLOCKING);$s=2;case 2:if($r&&$r.$blocking){$r=$r();}$r=A.$init($BLOCKING);$s=3;case 3:if($r&&$r.$blocking){$r=$r();}$r=F.$init($BLOCKING);$s=4;case 4:if($r&&$r.$blocking){$r=$r();}$r=G.$init($BLOCKING);$s=5;case 5:if($r&&$r.$blocking){$r=$r();}$r=B.$init($BLOCKING);$s=6;case 6:if($r&&$r.$blocking){$r=$r();}$r=H.$init($BLOCKING);$s=7;case 7:if($r&&$r.$blocking){$r=$r();}$r=C.$init($BLOCKING);$s=8;case 8:if($r&&$r.$blocking){$r=$r();}I=$makeSlice(CE,65);J=$makeSlice(CE,65);N=new CE($stringToBytes("true"));O=new CE($stringToBytes("false"));Q=new CE($stringToBytes(", "));R=new CE($stringToBytes(""));S=new CE($stringToBytes("(nil)"));T=new CE($stringToBytes("nil"));U=new CE($stringToBytes("map["));V=new CE($stringToBytes("%!"));Y=new CE($stringToBytes("(PANIC="));AA=new CE($stringToBytes("i)"));AB=new CE($stringToBytes("[]byte{"));AL=new H.Pool.ptr(0,0,CF.nil,(function(){return new AK.ptr();}));AZ=G.TypeOf(new $Int(0)).Bits();BA=G.TypeOf(new $Uintptr(0)).Bits();BB=G.TypeOf(new $Uint8(0));BU=new CH([$toNativeArray($kindUint16,[9,13]),$toNativeArray($kindUint16,[32,32]),$toNativeArray($kindUint16,[133,133]),$toNativeArray($kindUint16,[160,160]),$toNativeArray($kindUint16,[5760,5760]),$toNativeArray($kindUint16,[8192,8202]),$toNativeArray($kindUint16,[8232,8233]),$toNativeArray($kindUint16,[8239,8239]),$toNativeArray($kindUint16,[8287,8287]),$toNativeArray($kindUint16,[12288,12288])]);BY=new H.Pool.ptr(0,0,CF.nil,(function(){return new BS.ptr();}));CA=D.New("syntax error scanning complex number");CB=D.New("syntax error scanning boolean");K();}return;}};$init_fmt.$blocking=true;return $init_fmt;};return $pkg;})(); +$packages["main"]=(function(){var $pkg={},A,J,K,B,C,E,D,F,G,H,I;A=$packages["fmt"];J=$sliceType($Int32);K=$sliceType($emptyInterface);D=function(){var a,b,c,d,e;a=0;b=B;c=0;while(true){if(!(c=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+c]);if(e===9675){C=d;a=a+(1)>>0;}c++;}if(!((a===1))){C=-1;}};F=function(a,b){var a,b,c,d,e,f;E=E+(1)>>0;if((((a<0||a>=B.$length)?$throwRuntimeError("index out of range"):B.$array[B.$offset+a])===9679)&&((c=a+b>>0,((c<0||c>=B.$length)?$throwRuntimeError("index out of range"):B.$array[B.$offset+c]))===9679)&&((d=a+(2*b>>0)>>0,((d<0||d>=B.$length)?$throwRuntimeError("index out of range"):B.$array[B.$offset+d]))===9675)){(a<0||a>=B.$length)?$throwRuntimeError("index out of range"):B.$array[B.$offset+a]=9675;(e=a+b>>0,(e<0||e>=B.$length)?$throwRuntimeError("index out of range"):B.$array[B.$offset+e]=9675);(f=a+(2*b>>0)>>0,(f<0||f>=B.$length)?$throwRuntimeError("index out of range"):B.$array[B.$offset+f]=9679);return true;}return false;};G=function(a,b){var a,b,c,d;(a<0||a>=B.$length)?$throwRuntimeError("index out of range"):B.$array[B.$offset+a]=9679;(c=a+b>>0,(c<0||c>=B.$length)?$throwRuntimeError("index out of range"):B.$array[B.$offset+c]=9679);(d=a+(2*b>>0)>>0,(d<0||d>=B.$length)?$throwRuntimeError("index out of range"):B.$array[B.$offset+d]=9675);};H=function(){var a,b,c,d,e,f,g,h,i,j,k;a=0;b=0;c=a;d=b;e=B;f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);if(h===9679){i=$toNativeArray($kindInt,[-1,-12,1,12]);j=0;while(true){if(!(j<4)){break;}k=((j<0||j>=i.length)?$throwRuntimeError("index out of range"):i[j]);if(F(g,k)){if(H()){G(g,k);A.Println(new K([new $String($runesToString(B))]));return true;}G(g,k);}j++;}c=g;d=d+(1)>>0;}f++;}if((d===1)&&(C<0||(c===C))){A.Println(new K([new $String($runesToString(B))]));return true;}return false;};I=function(){if(!H()){A.Println(new K([new $String("no solution found")]));}A.Println(new K([new $Int(E),new $String("moves tried")]));};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_main=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}C=0;E=0;B=new J($stringToRunes("...........\n...........\n....\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F....\n....\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F....\n..\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F..\n..\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8B\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F..\n..\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F..\n....\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F....\n....\xE2\x97\x8F\xE2\x97\x8F\xE2\x97\x8F....\n...........\n...........\n"));D();I();}return;}};$init_main.$blocking=true;return $init_main;};return $pkg;})(); +$synthesizeMethods(); +$packages["runtime"].$init()(); +$go($packages["main"].$init, [], true); +$flushConsole(); + +}).call(this); +//# sourceMappingURL=peg_solitaire_solver_min.js.map diff --git a/104/build/peg_solitaire_solver_min.js.gz b/104/build/peg_solitaire_solver_min.js.gz new file mode 100644 index 0000000..48958fb Binary files /dev/null and b/104/build/peg_solitaire_solver_min.js.gz differ diff --git a/104/build/simple b/104/build/simple new file mode 100755 index 0000000..058e751 Binary files /dev/null and b/104/build/simple differ diff --git a/104/build/simple.js b/104/build/simple.js new file mode 100644 index 0000000..e9464dc --- /dev/null +++ b/104/build/simple.js @@ -0,0 +1,2254 @@ +"use strict"; +(function() { + +Error.stackTraceLimit = Infinity; + +var $global, $module; +if (typeof window !== "undefined") { /* web page */ + $global = window; +} else if (typeof self !== "undefined") { /* web worker */ + $global = self; +} else if (typeof global !== "undefined") { /* Node.js */ + $global = global; + $global.require = require; +} else { /* others (e.g. Nashorn) */ + $global = this; +} + +if ($global === undefined || $global.Array === undefined) { + throw new Error("no global object found"); +} +if (typeof module !== "undefined") { + $module = module; +} + +var $packages = {}, $idCounter = 0; +var $keys = function(m) { return m ? Object.keys(m) : []; }; +var $min = Math.min; +var $mod = function(x, y) { return x % y; }; +var $parseInt = parseInt; +var $parseFloat = function(f) { + if (f !== undefined && f !== null && f.constructor === Number) { + return f; + } + return parseFloat(f); +}; +var $flushConsole = function() {}; +var $throwRuntimeError; /* set by package "runtime" */ +var $throwNilPointerError = function() { $throwRuntimeError("invalid memory address or nil pointer dereference"); }; + +var $mapArray = function(array, f) { + var newArray = new array.constructor(array.length); + for (var i = 0; i < array.length; i++) { + newArray[i] = f(array[i]); + } + return newArray; +}; + +var $methodVal = function(recv, name) { + var vals = recv.$methodVals || {}; + recv.$methodVals = vals; /* noop for primitives */ + var f = vals[name]; + if (f !== undefined) { + return f; + } + var method = recv[name]; + f = function() { + $stackDepthOffset--; + try { + return method.apply(recv, arguments); + } finally { + $stackDepthOffset++; + } + }; + vals[name] = f; + return f; +}; + +var $methodExpr = function(method) { + if (method.$expr === undefined) { + method.$expr = function() { + $stackDepthOffset--; + try { + return Function.call.apply(method, arguments); + } finally { + $stackDepthOffset++; + } + }; + } + return method.$expr; +}; + +var $subslice = function(slice, low, high, max) { + if (low < 0 || high < low || max < high || high > slice.$capacity || max > slice.$capacity) { + $throwRuntimeError("slice bounds out of range"); + } + var s = new slice.constructor(slice.$array); + s.$offset = slice.$offset + low; + s.$length = slice.$length - low; + s.$capacity = slice.$capacity - low; + if (high !== undefined) { + s.$length = high - low; + } + if (max !== undefined) { + s.$capacity = max - low; + } + return s; +}; + +var $sliceToArray = function(slice) { + if (slice.$length === 0) { + return []; + } + if (slice.$array.constructor !== Array) { + return slice.$array.subarray(slice.$offset, slice.$offset + slice.$length); + } + return slice.$array.slice(slice.$offset, slice.$offset + slice.$length); +}; + +var $decodeRune = function(str, pos) { + var c0 = str.charCodeAt(pos); + + if (c0 < 0x80) { + return [c0, 1]; + } + + if (c0 !== c0 || c0 < 0xC0) { + return [0xFFFD, 1]; + } + + var c1 = str.charCodeAt(pos + 1); + if (c1 !== c1 || c1 < 0x80 || 0xC0 <= c1) { + return [0xFFFD, 1]; + } + + if (c0 < 0xE0) { + var r = (c0 & 0x1F) << 6 | (c1 & 0x3F); + if (r <= 0x7F) { + return [0xFFFD, 1]; + } + return [r, 2]; + } + + var c2 = str.charCodeAt(pos + 2); + if (c2 !== c2 || c2 < 0x80 || 0xC0 <= c2) { + return [0xFFFD, 1]; + } + + if (c0 < 0xF0) { + var r = (c0 & 0x0F) << 12 | (c1 & 0x3F) << 6 | (c2 & 0x3F); + if (r <= 0x7FF) { + return [0xFFFD, 1]; + } + if (0xD800 <= r && r <= 0xDFFF) { + return [0xFFFD, 1]; + } + return [r, 3]; + } + + var c3 = str.charCodeAt(pos + 3); + if (c3 !== c3 || c3 < 0x80 || 0xC0 <= c3) { + return [0xFFFD, 1]; + } + + if (c0 < 0xF8) { + var r = (c0 & 0x07) << 18 | (c1 & 0x3F) << 12 | (c2 & 0x3F) << 6 | (c3 & 0x3F); + if (r <= 0xFFFF || 0x10FFFF < r) { + return [0xFFFD, 1]; + } + return [r, 4]; + } + + return [0xFFFD, 1]; +}; + +var $encodeRune = function(r) { + if (r < 0 || r > 0x10FFFF || (0xD800 <= r && r <= 0xDFFF)) { + r = 0xFFFD; + } + if (r <= 0x7F) { + return String.fromCharCode(r); + } + if (r <= 0x7FF) { + return String.fromCharCode(0xC0 | r >> 6, 0x80 | (r & 0x3F)); + } + if (r <= 0xFFFF) { + return String.fromCharCode(0xE0 | r >> 12, 0x80 | (r >> 6 & 0x3F), 0x80 | (r & 0x3F)); + } + return String.fromCharCode(0xF0 | r >> 18, 0x80 | (r >> 12 & 0x3F), 0x80 | (r >> 6 & 0x3F), 0x80 | (r & 0x3F)); +}; + +var $stringToBytes = function(str) { + var array = new Uint8Array(str.length); + for (var i = 0; i < str.length; i++) { + array[i] = str.charCodeAt(i); + } + return array; +}; + +var $bytesToString = function(slice) { + if (slice.$length === 0) { + return ""; + } + var str = ""; + for (var i = 0; i < slice.$length; i += 10000) { + str += String.fromCharCode.apply(null, slice.$array.subarray(slice.$offset + i, slice.$offset + Math.min(slice.$length, i + 10000))); + } + return str; +}; + +var $stringToRunes = function(str) { + var array = new Int32Array(str.length); + var rune, j = 0; + for (var i = 0; i < str.length; i += rune[1], j++) { + rune = $decodeRune(str, i); + array[j] = rune[0]; + } + return array.subarray(0, j); +}; + +var $runesToString = function(slice) { + if (slice.$length === 0) { + return ""; + } + var str = ""; + for (var i = 0; i < slice.$length; i++) { + str += $encodeRune(slice.$array[slice.$offset + i]); + } + return str; +}; + +var $copyString = function(dst, src) { + var n = Math.min(src.length, dst.$length); + for (var i = 0; i < n; i++) { + dst.$array[dst.$offset + i] = src.charCodeAt(i); + } + return n; +}; + +var $copySlice = function(dst, src) { + var n = Math.min(src.$length, dst.$length); + $internalCopy(dst.$array, src.$array, dst.$offset, src.$offset, n, dst.constructor.elem); + return n; +}; + +var $copy = function(dst, src, typ) { + switch (typ.kind) { + case $kindArray: + $internalCopy(dst, src, 0, 0, src.length, typ.elem); + break; + case $kindStruct: + for (var i = 0; i < typ.fields.length; i++) { + var f = typ.fields[i]; + switch (f.typ.kind) { + case $kindArray: + case $kindStruct: + $copy(dst[f.prop], src[f.prop], f.typ); + continue; + default: + dst[f.prop] = src[f.prop]; + continue; + } + } + break; + } +}; + +var $internalCopy = function(dst, src, dstOffset, srcOffset, n, elem) { + if (n === 0 || (dst === src && dstOffset === srcOffset)) { + return; + } + + if (src.subarray) { + dst.set(src.subarray(srcOffset, srcOffset + n), dstOffset); + return; + } + + switch (elem.kind) { + case $kindArray: + case $kindStruct: + if (dst === src && dstOffset > srcOffset) { + for (var i = n - 1; i >= 0; i--) { + $copy(dst[dstOffset + i], src[srcOffset + i], elem); + } + return; + } + for (var i = 0; i < n; i++) { + $copy(dst[dstOffset + i], src[srcOffset + i], elem); + } + return; + } + + if (dst === src && dstOffset > srcOffset) { + for (var i = n - 1; i >= 0; i--) { + dst[dstOffset + i] = src[srcOffset + i]; + } + return; + } + for (var i = 0; i < n; i++) { + dst[dstOffset + i] = src[srcOffset + i]; + } +}; + +var $clone = function(src, type) { + var clone = type.zero(); + $copy(clone, src, type); + return clone; +}; + +var $pointerOfStructConversion = function(obj, type) { + if(obj.$proxies === undefined) { + obj.$proxies = {}; + obj.$proxies[obj.constructor.string] = obj; + } + var proxy = obj.$proxies[type.string]; + if (proxy === undefined) { + var properties = {}; + for (var i = 0; i < type.elem.fields.length; i++) { + (function(fieldProp) { + properties[fieldProp] = { + get: function() { return obj[fieldProp]; }, + set: function(value) { obj[fieldProp] = value; }, + }; + })(type.elem.fields[i].prop); + } + proxy = Object.create(type.prototype, properties); + proxy.$val = proxy; + obj.$proxies[type.string] = proxy; + proxy.$proxies = obj.$proxies; + } + return proxy; +}; + +var $append = function(slice) { + return $internalAppend(slice, arguments, 1, arguments.length - 1); +}; + +var $appendSlice = function(slice, toAppend) { + return $internalAppend(slice, toAppend.$array, toAppend.$offset, toAppend.$length); +}; + +var $internalAppend = function(slice, array, offset, length) { + if (length === 0) { + return slice; + } + + var newArray = slice.$array; + var newOffset = slice.$offset; + var newLength = slice.$length + length; + var newCapacity = slice.$capacity; + + if (newLength > newCapacity) { + newOffset = 0; + newCapacity = Math.max(newLength, slice.$capacity < 1024 ? slice.$capacity * 2 : Math.floor(slice.$capacity * 5 / 4)); + + if (slice.$array.constructor === Array) { + newArray = slice.$array.slice(slice.$offset, slice.$offset + slice.$length); + newArray.length = newCapacity; + var zero = slice.constructor.elem.zero; + for (var i = slice.$length; i < newCapacity; i++) { + newArray[i] = zero(); + } + } else { + newArray = new slice.$array.constructor(newCapacity); + newArray.set(slice.$array.subarray(slice.$offset, slice.$offset + slice.$length)); + } + } + + $internalCopy(newArray, array, newOffset + slice.$length, offset, length, slice.constructor.elem); + + var newSlice = new slice.constructor(newArray); + newSlice.$offset = newOffset; + newSlice.$length = newLength; + newSlice.$capacity = newCapacity; + return newSlice; +}; + +var $equal = function(a, b, type) { + if (type === $js.Object) { + return a === b; + } + switch (type.kind) { + case $kindFloat32: + return $float32IsEqual(a, b); + case $kindComplex64: + return $float32IsEqual(a.$real, b.$real) && $float32IsEqual(a.$imag, b.$imag); + case $kindComplex128: + return a.$real === b.$real && a.$imag === b.$imag; + case $kindInt64: + case $kindUint64: + return a.$high === b.$high && a.$low === b.$low; + case $kindPtr: + if (a.constructor.elem) { + return a === b; + } + return $pointerIsEqual(a, b); + case $kindArray: + if (a.length != b.length) { + return false; + } + for (var i = 0; i < a.length; i++) { + if (!$equal(a[i], b[i], type.elem)) { + return false; + } + } + return true; + case $kindStruct: + for (var i = 0; i < type.fields.length; i++) { + var f = type.fields[i]; + if (!$equal(a[f.prop], b[f.prop], f.typ)) { + return false; + } + } + return true; + case $kindInterface: + return $interfaceIsEqual(a, b); + default: + return a === b; + } +}; + +var $interfaceIsEqual = function(a, b) { + if (a === $ifaceNil || b === $ifaceNil) { + return a === b; + } + if (a.constructor !== b.constructor) { + return false; + } + if (!a.constructor.comparable) { + $throwRuntimeError("comparing uncomparable type " + a.constructor.string); + } + return $equal(a.$val, b.$val, a.constructor); +}; + +var $float32IsEqual = function(a, b) { + if (a === b) { + return true; + } + if (a === 1/0 || b === 1/0 || a === -1/0 || b === -1/0 || a !== a || b !== b) { + return false; + } + var math = $packages["math"]; + return math !== undefined && math.Float32bits(a) === math.Float32bits(b); +}; + +var $pointerIsEqual = function(a, b) { + if (a === b) { + return true; + } + if (a.$get === $throwNilPointerError || b.$get === $throwNilPointerError) { + return a.$get === $throwNilPointerError && b.$get === $throwNilPointerError; + } + var va = a.$get(); + var vb = b.$get(); + if (va !== vb) { + return false; + } + var dummy = va + 1; + a.$set(dummy); + var equal = b.$get() === dummy; + a.$set(va); + return equal; +}; + +var $kindBool = 1; +var $kindInt = 2; +var $kindInt8 = 3; +var $kindInt16 = 4; +var $kindInt32 = 5; +var $kindInt64 = 6; +var $kindUint = 7; +var $kindUint8 = 8; +var $kindUint16 = 9; +var $kindUint32 = 10; +var $kindUint64 = 11; +var $kindUintptr = 12; +var $kindFloat32 = 13; +var $kindFloat64 = 14; +var $kindComplex64 = 15; +var $kindComplex128 = 16; +var $kindArray = 17; +var $kindChan = 18; +var $kindFunc = 19; +var $kindInterface = 20; +var $kindMap = 21; +var $kindPtr = 22; +var $kindSlice = 23; +var $kindString = 24; +var $kindStruct = 25; +var $kindUnsafePointer = 26; + +var $methodSynthesizers = []; +var $addMethodSynthesizer = function(f) { + if ($methodSynthesizers === null) { + f(); + return; + } + $methodSynthesizers.push(f); +}; +var $synthesizeMethods = function() { + $methodSynthesizers.forEach(function(f) { f(); }); + $methodSynthesizers = null; +}; + +var $newType = function(size, kind, string, name, pkg, constructor) { + var typ; + switch(kind) { + case $kindBool: + case $kindInt: + case $kindInt8: + case $kindInt16: + case $kindInt32: + case $kindUint: + case $kindUint8: + case $kindUint16: + case $kindUint32: + case $kindUintptr: + case $kindString: + case $kindUnsafePointer: + typ = function(v) { this.$val = v; }; + typ.prototype.$key = function() { return string + "$" + this.$val; }; + break; + + case $kindFloat32: + case $kindFloat64: + typ = function(v) { this.$val = v; }; + typ.prototype.$key = function() { return string + "$" + $floatKey(this.$val); }; + break; + + case $kindInt64: + typ = function(high, low) { + this.$high = (high + Math.floor(Math.ceil(low) / 4294967296)) >> 0; + this.$low = low >>> 0; + this.$val = this; + }; + typ.prototype.$key = function() { return string + "$" + this.$high + "$" + this.$low; }; + break; + + case $kindUint64: + typ = function(high, low) { + this.$high = (high + Math.floor(Math.ceil(low) / 4294967296)) >>> 0; + this.$low = low >>> 0; + this.$val = this; + }; + typ.prototype.$key = function() { return string + "$" + this.$high + "$" + this.$low; }; + break; + + case $kindComplex64: + case $kindComplex128: + typ = function(real, imag) { + this.$real = real; + this.$imag = imag; + this.$val = this; + }; + typ.prototype.$key = function() { return string + "$" + this.$real + "$" + this.$imag; }; + break; + + case $kindArray: + typ = function(v) { this.$val = v; }; + typ.ptr = $newType(4, $kindPtr, "*" + string, "", "", function(array) { + this.$get = function() { return array; }; + this.$set = function(v) { $copy(this, v, typ); }; + this.$val = array; + }); + typ.init = function(elem, len) { + typ.elem = elem; + typ.len = len; + typ.comparable = elem.comparable; + typ.prototype.$key = function() { + return string + "$" + Array.prototype.join.call($mapArray(this.$val, function(e) { + var key = e.$key ? e.$key() : String(e); + return key.replace(/\\/g, "\\\\").replace(/\$/g, "\\$"); + }), "$"); + }; + typ.ptr.init(typ); + Object.defineProperty(typ.ptr.nil, "nilCheck", { get: $throwNilPointerError }); + }; + break; + + case $kindChan: + typ = function(capacity) { + this.$val = this; + this.$capacity = capacity; + this.$buffer = []; + this.$sendQueue = []; + this.$recvQueue = []; + this.$closed = false; + }; + typ.prototype.$key = function() { + if (this.$id === undefined) { + $idCounter++; + this.$id = $idCounter; + } + return String(this.$id); + }; + typ.init = function(elem, sendOnly, recvOnly) { + typ.elem = elem; + typ.sendOnly = sendOnly; + typ.recvOnly = recvOnly; + typ.nil = new typ(0); + typ.nil.$sendQueue = typ.nil.$recvQueue = { length: 0, push: function() {}, shift: function() { return undefined; }, indexOf: function() { return -1; } }; + }; + break; + + case $kindFunc: + typ = function(v) { this.$val = v; }; + typ.init = function(params, results, variadic) { + typ.params = params; + typ.results = results; + typ.variadic = variadic; + typ.comparable = false; + }; + break; + + case $kindInterface: + typ = { implementedBy: {}, missingMethodFor: {} }; + typ.init = function(methods) { + typ.methods = methods; + methods.forEach(function(m) { + $ifaceNil[m.prop] = $throwNilPointerError; + }); + }; + break; + + case $kindMap: + typ = function(v) { this.$val = v; }; + typ.init = function(key, elem) { + typ.key = key; + typ.elem = elem; + typ.comparable = false; + }; + break; + + case $kindPtr: + typ = constructor || function(getter, setter, target) { + this.$get = getter; + this.$set = setter; + this.$target = target; + this.$val = this; + }; + typ.prototype.$key = function() { + if (this.$id === undefined) { + $idCounter++; + this.$id = $idCounter; + } + return String(this.$id); + }; + typ.init = function(elem) { + typ.elem = elem; + typ.nil = new typ($throwNilPointerError, $throwNilPointerError); + }; + break; + + case $kindSlice: + typ = function(array) { + if (array.constructor !== typ.nativeArray) { + array = new typ.nativeArray(array); + } + this.$array = array; + this.$offset = 0; + this.$length = array.length; + this.$capacity = array.length; + this.$val = this; + }; + typ.init = function(elem) { + typ.elem = elem; + typ.comparable = false; + typ.nativeArray = $nativeArray(elem.kind); + typ.nil = new typ([]); + }; + break; + + case $kindStruct: + typ = function(v) { this.$val = v; }; + typ.ptr = $newType(4, $kindPtr, "*" + string, "", "", constructor); + typ.ptr.elem = typ; + typ.ptr.prototype.$get = function() { return this; }; + typ.ptr.prototype.$set = function(v) { $copy(this, v, typ); }; + typ.init = function(fields) { + typ.fields = fields; + fields.forEach(function(f) { + if (!f.typ.comparable) { + typ.comparable = false; + } + }); + typ.prototype.$key = function() { + var val = this.$val; + return string + "$" + $mapArray(fields, function(f) { + var e = val[f.prop]; + var key = e.$key ? e.$key() : String(e); + return key.replace(/\\/g, "\\\\").replace(/\$/g, "\\$"); + }).join("$"); + }; + /* nil value */ + var properties = {}; + fields.forEach(function(f) { + properties[f.prop] = { get: $throwNilPointerError, set: $throwNilPointerError }; + }); + typ.ptr.nil = Object.create(constructor.prototype, properties); + typ.ptr.nil.$val = typ.ptr.nil; + /* methods for embedded fields */ + $addMethodSynthesizer(function() { + var synthesizeMethod = function(target, m, f) { + if (target.prototype[m.prop] !== undefined) { return; } + target.prototype[m.prop] = function() { + var v = this.$val[f.prop]; + if (f.typ === $js.Object) { + v = new $js.container.ptr(v); + } + if (v.$val === undefined) { + v = new f.typ(v); + } + return v[m.prop].apply(v, arguments); + }; + }; + fields.forEach(function(f) { + if (f.name === "") { + $methodSet(f.typ).forEach(function(m) { + synthesizeMethod(typ, m, f); + synthesizeMethod(typ.ptr, m, f); + }); + $methodSet($ptrType(f.typ)).forEach(function(m) { + synthesizeMethod(typ.ptr, m, f); + }); + } + }); + }); + }; + break; + + default: + $panic(new $String("invalid kind: " + kind)); + } + + switch (kind) { + case $kindBool: + case $kindMap: + typ.zero = function() { return false; }; + break; + + case $kindInt: + case $kindInt8: + case $kindInt16: + case $kindInt32: + case $kindUint: + case $kindUint8 : + case $kindUint16: + case $kindUint32: + case $kindUintptr: + case $kindUnsafePointer: + case $kindFloat32: + case $kindFloat64: + typ.zero = function() { return 0; }; + break; + + case $kindString: + typ.zero = function() { return ""; }; + break; + + case $kindInt64: + case $kindUint64: + case $kindComplex64: + case $kindComplex128: + var zero = new typ(0, 0); + typ.zero = function() { return zero; }; + break; + + case $kindChan: + case $kindPtr: + case $kindSlice: + typ.zero = function() { return typ.nil; }; + break; + + case $kindFunc: + typ.zero = function() { return $throwNilPointerError; }; + break; + + case $kindInterface: + typ.zero = function() { return $ifaceNil; }; + break; + + case $kindArray: + typ.zero = function() { + var arrayClass = $nativeArray(typ.elem.kind); + if (arrayClass !== Array) { + return new arrayClass(typ.len); + } + var array = new Array(typ.len); + for (var i = 0; i < typ.len; i++) { + array[i] = typ.elem.zero(); + } + return array; + }; + break; + + case $kindStruct: + typ.zero = function() { return new typ.ptr(); }; + break; + + default: + $panic(new $String("invalid kind: " + kind)); + } + + typ.size = size; + typ.kind = kind; + typ.string = string; + typ.typeName = name; + typ.pkg = pkg; + typ.methods = []; + typ.methodSetCache = null; + typ.comparable = true; + return typ; +}; + +var $methodSet = function(typ) { + if (typ.methodSetCache !== null) { + return typ.methodSetCache; + } + var base = {}; + + var isPtr = (typ.kind === $kindPtr); + if (isPtr && typ.elem.kind === $kindInterface) { + typ.methodSetCache = []; + return []; + } + + var current = [{typ: isPtr ? typ.elem : typ, indirect: isPtr}]; + + var seen = {}; + + while (current.length > 0) { + var next = []; + var mset = []; + + current.forEach(function(e) { + if (seen[e.typ.string]) { + return; + } + seen[e.typ.string] = true; + + if(e.typ.typeName !== "") { + mset = mset.concat(e.typ.methods); + if (e.indirect) { + mset = mset.concat($ptrType(e.typ).methods); + } + } + + switch (e.typ.kind) { + case $kindStruct: + e.typ.fields.forEach(function(f) { + if (f.name === "") { + var fTyp = f.typ; + var fIsPtr = (fTyp.kind === $kindPtr); + next.push({typ: fIsPtr ? fTyp.elem : fTyp, indirect: e.indirect || fIsPtr}); + } + }); + break; + + case $kindInterface: + mset = mset.concat(e.typ.methods); + break; + } + }); + + mset.forEach(function(m) { + if (base[m.name] === undefined) { + base[m.name] = m; + } + }); + + current = next; + } + + typ.methodSetCache = []; + Object.keys(base).sort().forEach(function(name) { + typ.methodSetCache.push(base[name]); + }); + return typ.methodSetCache; +}; + +var $Bool = $newType( 1, $kindBool, "bool", "bool", "", null); +var $Int = $newType( 4, $kindInt, "int", "int", "", null); +var $Int8 = $newType( 1, $kindInt8, "int8", "int8", "", null); +var $Int16 = $newType( 2, $kindInt16, "int16", "int16", "", null); +var $Int32 = $newType( 4, $kindInt32, "int32", "int32", "", null); +var $Int64 = $newType( 8, $kindInt64, "int64", "int64", "", null); +var $Uint = $newType( 4, $kindUint, "uint", "uint", "", null); +var $Uint8 = $newType( 1, $kindUint8, "uint8", "uint8", "", null); +var $Uint16 = $newType( 2, $kindUint16, "uint16", "uint16", "", null); +var $Uint32 = $newType( 4, $kindUint32, "uint32", "uint32", "", null); +var $Uint64 = $newType( 8, $kindUint64, "uint64", "uint64", "", null); +var $Uintptr = $newType( 4, $kindUintptr, "uintptr", "uintptr", "", null); +var $Float32 = $newType( 4, $kindFloat32, "float32", "float32", "", null); +var $Float64 = $newType( 8, $kindFloat64, "float64", "float64", "", null); +var $Complex64 = $newType( 8, $kindComplex64, "complex64", "complex64", "", null); +var $Complex128 = $newType(16, $kindComplex128, "complex128", "complex128", "", null); +var $String = $newType( 8, $kindString, "string", "string", "", null); +var $UnsafePointer = $newType( 4, $kindUnsafePointer, "unsafe.Pointer", "Pointer", "", null); + +var $nativeArray = function(elemKind) { + switch (elemKind) { + case $kindInt: + return Int32Array; + case $kindInt8: + return Int8Array; + case $kindInt16: + return Int16Array; + case $kindInt32: + return Int32Array; + case $kindUint: + return Uint32Array; + case $kindUint8: + return Uint8Array; + case $kindUint16: + return Uint16Array; + case $kindUint32: + return Uint32Array; + case $kindUintptr: + return Uint32Array; + case $kindFloat32: + return Float32Array; + case $kindFloat64: + return Float64Array; + default: + return Array; + } +}; +var $toNativeArray = function(elemKind, array) { + var nativeArray = $nativeArray(elemKind); + if (nativeArray === Array) { + return array; + } + return new nativeArray(array); +}; +var $arrayTypes = {}; +var $arrayType = function(elem, len) { + var string = "[" + len + "]" + elem.string; + var typ = $arrayTypes[string]; + if (typ === undefined) { + typ = $newType(12, $kindArray, string, "", "", null); + $arrayTypes[string] = typ; + typ.init(elem, len); + } + return typ; +}; + +var $chanType = function(elem, sendOnly, recvOnly) { + var string = (recvOnly ? "<-" : "") + "chan" + (sendOnly ? "<- " : " ") + elem.string; + var field = sendOnly ? "SendChan" : (recvOnly ? "RecvChan" : "Chan"); + var typ = elem[field]; + if (typ === undefined) { + typ = $newType(4, $kindChan, string, "", "", null); + elem[field] = typ; + typ.init(elem, sendOnly, recvOnly); + } + return typ; +}; + +var $funcTypes = {}; +var $funcType = function(params, results, variadic) { + var paramTypes = $mapArray(params, function(p) { return p.string; }); + if (variadic) { + paramTypes[paramTypes.length - 1] = "..." + paramTypes[paramTypes.length - 1].substr(2); + } + var string = "func(" + paramTypes.join(", ") + ")"; + if (results.length === 1) { + string += " " + results[0].string; + } else if (results.length > 1) { + string += " (" + $mapArray(results, function(r) { return r.string; }).join(", ") + ")"; + } + var typ = $funcTypes[string]; + if (typ === undefined) { + typ = $newType(4, $kindFunc, string, "", "", null); + $funcTypes[string] = typ; + typ.init(params, results, variadic); + } + return typ; +}; + +var $interfaceTypes = {}; +var $interfaceType = function(methods) { + var string = "interface {}"; + if (methods.length !== 0) { + string = "interface { " + $mapArray(methods, function(m) { + return (m.pkg !== "" ? m.pkg + "." : "") + m.name + m.typ.string.substr(4); + }).join("; ") + " }"; + } + var typ = $interfaceTypes[string]; + if (typ === undefined) { + typ = $newType(8, $kindInterface, string, "", "", null); + $interfaceTypes[string] = typ; + typ.init(methods); + } + return typ; +}; +var $emptyInterface = $interfaceType([]); +var $ifaceNil = { $key: function() { return "nil"; } }; +var $error = $newType(8, $kindInterface, "error", "error", "", null); +$error.init([{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]); + +var $Map = function() {}; +(function() { + var names = Object.getOwnPropertyNames(Object.prototype); + for (var i = 0; i < names.length; i++) { + $Map.prototype[names[i]] = undefined; + } +})(); +var $mapTypes = {}; +var $mapType = function(key, elem) { + var string = "map[" + key.string + "]" + elem.string; + var typ = $mapTypes[string]; + if (typ === undefined) { + typ = $newType(4, $kindMap, string, "", "", null); + $mapTypes[string] = typ; + typ.init(key, elem); + } + return typ; +}; + +var $ptrType = function(elem) { + var typ = elem.ptr; + if (typ === undefined) { + typ = $newType(4, $kindPtr, "*" + elem.string, "", "", null); + elem.ptr = typ; + typ.init(elem); + } + return typ; +}; + +var $newDataPointer = function(data, constructor) { + if (constructor.elem.kind === $kindStruct) { + return data; + } + return new constructor(function() { return data; }, function(v) { data = v; }); +}; + +var $sliceType = function(elem) { + var typ = elem.Slice; + if (typ === undefined) { + typ = $newType(12, $kindSlice, "[]" + elem.string, "", "", null); + elem.Slice = typ; + typ.init(elem); + } + return typ; +}; +var $makeSlice = function(typ, length, capacity) { + capacity = capacity || length; + var array = new typ.nativeArray(capacity); + if (typ.nativeArray === Array) { + for (var i = 0; i < capacity; i++) { + array[i] = typ.elem.zero(); + } + } + var slice = new typ(array); + slice.$length = length; + return slice; +}; + +var $structTypes = {}; +var $structType = function(fields) { + var string = "struct { " + $mapArray(fields, function(f) { + return f.name + " " + f.typ.string + (f.tag !== "" ? (" \"" + f.tag.replace(/\\/g, "\\\\").replace(/"/g, "\\\"") + "\"") : ""); + }).join("; ") + " }"; + if (fields.length === 0) { + string = "struct {}"; + } + var typ = $structTypes[string]; + if (typ === undefined) { + typ = $newType(0, $kindStruct, string, "", "", function() { + this.$val = this; + for (var i = 0; i < fields.length; i++) { + var f = fields[i]; + var arg = arguments[i]; + this[f.prop] = arg !== undefined ? arg : f.typ.zero(); + } + }); + $structTypes[string] = typ; + typ.init(fields); + } + return typ; +}; + +var $assertType = function(value, type, returnTuple) { + var isInterface = (type.kind === $kindInterface), ok, missingMethod = ""; + if (value === $ifaceNil) { + ok = false; + } else if (!isInterface) { + ok = value.constructor === type; + } else { + var valueTypeString = value.constructor.string; + ok = type.implementedBy[valueTypeString]; + if (ok === undefined) { + ok = true; + var valueMethodSet = $methodSet(value.constructor); + var interfaceMethods = type.methods; + for (var i = 0; i < interfaceMethods.length; i++) { + var tm = interfaceMethods[i]; + var found = false; + for (var j = 0; j < valueMethodSet.length; j++) { + var vm = valueMethodSet[j]; + if (vm.name === tm.name && vm.pkg === tm.pkg && vm.typ === tm.typ) { + found = true; + break; + } + } + if (!found) { + ok = false; + type.missingMethodFor[valueTypeString] = tm.name; + break; + } + } + type.implementedBy[valueTypeString] = ok; + } + if (!ok) { + missingMethod = type.missingMethodFor[valueTypeString]; + } + } + + if (!ok) { + if (returnTuple) { + return [type.zero(), false]; + } + $panic(new $packages["runtime"].TypeAssertionError.ptr("", (value === $ifaceNil ? "" : value.constructor.string), type.string, missingMethod)); + } + + if (!isInterface) { + value = value.$val; + } + if (type === $js.Object) { + value = value.Object; + } + return returnTuple ? [value, true] : value; +}; + +var $coerceFloat32 = function(f) { + var math = $packages["math"]; + if (math === undefined) { + return f; + } + return math.Float32frombits(math.Float32bits(f)); +}; + +var $floatKey = function(f) { + if (f !== f) { + $idCounter++; + return "NaN$" + $idCounter; + } + return String(f); +}; + +var $flatten64 = function(x) { + return x.$high * 4294967296 + x.$low; +}; + +var $shiftLeft64 = function(x, y) { + if (y === 0) { + return x; + } + if (y < 32) { + return new x.constructor(x.$high << y | x.$low >>> (32 - y), (x.$low << y) >>> 0); + } + if (y < 64) { + return new x.constructor(x.$low << (y - 32), 0); + } + return new x.constructor(0, 0); +}; + +var $shiftRightInt64 = function(x, y) { + if (y === 0) { + return x; + } + if (y < 32) { + return new x.constructor(x.$high >> y, (x.$low >>> y | x.$high << (32 - y)) >>> 0); + } + if (y < 64) { + return new x.constructor(x.$high >> 31, (x.$high >> (y - 32)) >>> 0); + } + if (x.$high < 0) { + return new x.constructor(-1, 4294967295); + } + return new x.constructor(0, 0); +}; + +var $shiftRightUint64 = function(x, y) { + if (y === 0) { + return x; + } + if (y < 32) { + return new x.constructor(x.$high >>> y, (x.$low >>> y | x.$high << (32 - y)) >>> 0); + } + if (y < 64) { + return new x.constructor(0, x.$high >>> (y - 32)); + } + return new x.constructor(0, 0); +}; + +var $mul64 = function(x, y) { + var high = 0, low = 0; + if ((y.$low & 1) !== 0) { + high = x.$high; + low = x.$low; + } + for (var i = 1; i < 32; i++) { + if ((y.$low & 1<>> (32 - i); + low += (x.$low << i) >>> 0; + } + } + for (var i = 0; i < 32; i++) { + if ((y.$high & 1< yHigh) || (xHigh === yHigh && xLow > yLow))) { + yHigh = (yHigh << 1 | yLow >>> 31) >>> 0; + yLow = (yLow << 1) >>> 0; + n++; + } + for (var i = 0; i <= n; i++) { + high = high << 1 | low >>> 31; + low = (low << 1) >>> 0; + if ((xHigh > yHigh) || (xHigh === yHigh && xLow >= yLow)) { + xHigh = xHigh - yHigh; + xLow = xLow - yLow; + if (xLow < 0) { + xHigh--; + xLow += 4294967296; + } + low++; + if (low === 4294967296) { + high++; + low = 0; + } + } + yLow = (yLow >>> 1 | yHigh << (32 - 1)) >>> 0; + yHigh = yHigh >>> 1; + } + + if (returnRemainder) { + return new x.constructor(xHigh * rs, xLow * rs); + } + return new x.constructor(high * s, low * s); +}; + +var $divComplex = function(n, d) { + var ninf = n.$real === 1/0 || n.$real === -1/0 || n.$imag === 1/0 || n.$imag === -1/0; + var dinf = d.$real === 1/0 || d.$real === -1/0 || d.$imag === 1/0 || d.$imag === -1/0; + var nnan = !ninf && (n.$real !== n.$real || n.$imag !== n.$imag); + var dnan = !dinf && (d.$real !== d.$real || d.$imag !== d.$imag); + if(nnan || dnan) { + return new n.constructor(0/0, 0/0); + } + if (ninf && !dinf) { + return new n.constructor(1/0, 1/0); + } + if (!ninf && dinf) { + return new n.constructor(0, 0); + } + if (d.$real === 0 && d.$imag === 0) { + if (n.$real === 0 && n.$imag === 0) { + return new n.constructor(0/0, 0/0); + } + return new n.constructor(1/0, 1/0); + } + var a = Math.abs(d.$real); + var b = Math.abs(d.$imag); + if (a <= b) { + var ratio = d.$real / d.$imag; + var denom = d.$real * ratio + d.$imag; + return new n.constructor((n.$real * ratio + n.$imag) / denom, (n.$imag * ratio - n.$real) / denom); + } + var ratio = d.$imag / d.$real; + var denom = d.$imag * ratio + d.$real; + return new n.constructor((n.$imag * ratio + n.$real) / denom, (n.$imag - n.$real * ratio) / denom); +}; + +var $stackDepthOffset = 0; +var $getStackDepth = function() { + var err = new Error(); + if (err.stack === undefined) { + return undefined; + } + return $stackDepthOffset + err.stack.split("\n").length; +}; + +var $deferFrames = [], $skippedDeferFrames = 0, $jumpToDefer = false, $panicStackDepth = null, $panicValue; +var $callDeferred = function(deferred, jsErr) { + if ($skippedDeferFrames !== 0) { + $skippedDeferFrames--; + throw jsErr; + } + if ($jumpToDefer) { + $jumpToDefer = false; + throw jsErr; + } + if (jsErr) { + var newErr = null; + try { + $deferFrames.push(deferred); + $panic(new $js.Error.ptr(jsErr)); + } catch (err) { + newErr = err; + } + $deferFrames.pop(); + $callDeferred(deferred, newErr); + return; + } + + $stackDepthOffset--; + var outerPanicStackDepth = $panicStackDepth; + var outerPanicValue = $panicValue; + + var localPanicValue = $curGoroutine.panicStack.pop(); + if (localPanicValue !== undefined) { + $panicStackDepth = $getStackDepth(); + $panicValue = localPanicValue; + } + + var call, localSkippedDeferFrames = 0; + try { + while (true) { + if (deferred === null) { + deferred = $deferFrames[$deferFrames.length - 1 - localSkippedDeferFrames]; + if (deferred === undefined) { + if (localPanicValue.Object instanceof Error) { + throw localPanicValue.Object; + } + var msg; + if (localPanicValue.constructor === $String) { + msg = localPanicValue.$val; + } else if (localPanicValue.Error !== undefined) { + msg = localPanicValue.Error(); + } else if (localPanicValue.String !== undefined) { + msg = localPanicValue.String(); + } else { + msg = localPanicValue; + } + throw new Error(msg); + } + } + var call = deferred.pop(); + if (call === undefined) { + if (localPanicValue !== undefined) { + localSkippedDeferFrames++; + deferred = null; + continue; + } + return; + } + var r = call[0].apply(undefined, call[1]); + if (r && r.$blocking) { + deferred.push([r, []]); + } + + if (localPanicValue !== undefined && $panicStackDepth === null) { + throw null; /* error was recovered */ + } + } + } finally { + $skippedDeferFrames += localSkippedDeferFrames; + if ($curGoroutine.asleep) { + deferred.push(call); + $jumpToDefer = true; + } + if (localPanicValue !== undefined) { + if ($panicStackDepth !== null) { + $curGoroutine.panicStack.push(localPanicValue); + } + $panicStackDepth = outerPanicStackDepth; + $panicValue = outerPanicValue; + } + $stackDepthOffset++; + } +}; + +var $panic = function(value) { + $curGoroutine.panicStack.push(value); + $callDeferred(null, null); +}; +var $recover = function() { + if ($panicStackDepth === null || ($panicStackDepth !== undefined && $panicStackDepth !== $getStackDepth() - 2)) { + return $ifaceNil; + } + $panicStackDepth = null; + return $panicValue; +}; +var $throw = function(err) { throw err; }; + +var $BLOCKING = new Object(); +var $nonblockingCall = function() { + $panic(new $packages["runtime"].NotSupportedError.ptr("non-blocking call to blocking function, see https://github.com/gopherjs/gopherjs#goroutines")); +}; + +var $dummyGoroutine = { asleep: false, exit: false, panicStack: [] }; +var $curGoroutine = $dummyGoroutine, $totalGoroutines = 0, $awakeGoroutines = 0, $checkForDeadlock = true; +var $go = function(fun, args, direct) { + $totalGoroutines++; + $awakeGoroutines++; + args.push($BLOCKING); + var goroutine = function() { + var rescheduled = false; + try { + $curGoroutine = goroutine; + $skippedDeferFrames = 0; + $jumpToDefer = false; + var r = fun.apply(undefined, args); + if (r && r.$blocking) { + fun = r; + args = []; + $schedule(goroutine, direct); + rescheduled = true; + return; + } + goroutine.exit = true; + } catch (err) { + if (!$curGoroutine.asleep) { + goroutine.exit = true; + throw err; + } + } finally { + $curGoroutine = $dummyGoroutine; + if (goroutine.exit && !rescheduled) { /* also set by runtime.Goexit() */ + $totalGoroutines--; + goroutine.asleep = true; + } + if (goroutine.asleep && !rescheduled) { + $awakeGoroutines--; + if ($awakeGoroutines === 0 && $totalGoroutines !== 0 && $checkForDeadlock) { + console.error("fatal error: all goroutines are asleep - deadlock!"); + } + } + } + }; + goroutine.asleep = false; + goroutine.exit = false; + goroutine.panicStack = []; + $schedule(goroutine, direct); +}; + +var $scheduled = [], $schedulerLoopActive = false; +var $schedule = function(goroutine, direct) { + if (goroutine.asleep) { + goroutine.asleep = false; + $awakeGoroutines++; + } + + if (direct) { + goroutine(); + return; + } + + $scheduled.push(goroutine); + if (!$schedulerLoopActive) { + $schedulerLoopActive = true; + setTimeout(function() { + while (true) { + var r = $scheduled.shift(); + if (r === undefined) { + $schedulerLoopActive = false; + break; + } + r(); + }; + }, 0); + } +}; + +var $send = function(chan, value) { + if (chan.$closed) { + $throwRuntimeError("send on closed channel"); + } + var queuedRecv = chan.$recvQueue.shift(); + if (queuedRecv !== undefined) { + queuedRecv([value, true]); + return; + } + if (chan.$buffer.length < chan.$capacity) { + chan.$buffer.push(value); + return; + } + + var thisGoroutine = $curGoroutine; + chan.$sendQueue.push(function() { + $schedule(thisGoroutine); + return value; + }); + var blocked = false; + var f = function() { + if (blocked) { + if (chan.$closed) { + $throwRuntimeError("send on closed channel"); + } + return; + }; + blocked = true; + $curGoroutine.asleep = true; + throw null; + }; + f.$blocking = true; + return f; +}; +var $recv = function(chan) { + var queuedSend = chan.$sendQueue.shift(); + if (queuedSend !== undefined) { + chan.$buffer.push(queuedSend()); + } + var bufferedValue = chan.$buffer.shift(); + if (bufferedValue !== undefined) { + return [bufferedValue, true]; + } + if (chan.$closed) { + return [chan.constructor.elem.zero(), false]; + } + + var thisGoroutine = $curGoroutine, value; + var queueEntry = function(v) { + value = v; + $schedule(thisGoroutine); + }; + chan.$recvQueue.push(queueEntry); + var blocked = false; + var f = function() { + if (blocked) { + return value; + }; + blocked = true; + $curGoroutine.asleep = true; + throw null; + }; + f.$blocking = true; + return f; +}; +var $close = function(chan) { + if (chan.$closed) { + $throwRuntimeError("close of closed channel"); + } + chan.$closed = true; + while (true) { + var queuedSend = chan.$sendQueue.shift(); + if (queuedSend === undefined) { + break; + } + queuedSend(); /* will panic because of closed channel */ + } + while (true) { + var queuedRecv = chan.$recvQueue.shift(); + if (queuedRecv === undefined) { + break; + } + queuedRecv([chan.constructor.elem.zero(), false]); + } +}; +var $select = function(comms) { + var ready = []; + var selection = -1; + for (var i = 0; i < comms.length; i++) { + var comm = comms[i]; + var chan = comm[0]; + switch (comm.length) { + case 0: /* default */ + selection = i; + break; + case 1: /* recv */ + if (chan.$sendQueue.length !== 0 || chan.$buffer.length !== 0 || chan.$closed) { + ready.push(i); + } + break; + case 2: /* send */ + if (chan.$closed) { + $throwRuntimeError("send on closed channel"); + } + if (chan.$recvQueue.length !== 0 || chan.$buffer.length < chan.$capacity) { + ready.push(i); + } + break; + } + } + + if (ready.length !== 0) { + selection = ready[Math.floor(Math.random() * ready.length)]; + } + if (selection !== -1) { + var comm = comms[selection]; + switch (comm.length) { + case 0: /* default */ + return [selection]; + case 1: /* recv */ + return [selection, $recv(comm[0])]; + case 2: /* send */ + $send(comm[0], comm[1]); + return [selection]; + } + } + + var entries = []; + var thisGoroutine = $curGoroutine; + var removeFromQueues = function() { + for (var i = 0; i < entries.length; i++) { + var entry = entries[i]; + var queue = entry[0]; + var index = queue.indexOf(entry[1]); + if (index !== -1) { + queue.splice(index, 1); + } + } + }; + for (var i = 0; i < comms.length; i++) { + (function(i) { + var comm = comms[i]; + switch (comm.length) { + case 1: /* recv */ + var queueEntry = function(value) { + selection = [i, value]; + removeFromQueues(); + $schedule(thisGoroutine); + }; + entries.push([comm[0].$recvQueue, queueEntry]); + comm[0].$recvQueue.push(queueEntry); + break; + case 2: /* send */ + var queueEntry = function() { + if (comm[0].$closed) { + $throwRuntimeError("send on closed channel"); + } + selection = [i]; + removeFromQueues(); + $schedule(thisGoroutine); + return comm[1]; + }; + entries.push([comm[0].$sendQueue, queueEntry]); + comm[0].$sendQueue.push(queueEntry); + break; + } + })(i); + } + var blocked = false; + var f = function() { + if (blocked) { + return selection; + }; + blocked = true; + $curGoroutine.asleep = true; + throw null; + }; + f.$blocking = true; + return f; +}; + +var $js; + +var $needsExternalization = function(t) { + switch (t.kind) { + case $kindBool: + case $kindInt: + case $kindInt8: + case $kindInt16: + case $kindInt32: + case $kindUint: + case $kindUint8: + case $kindUint16: + case $kindUint32: + case $kindUintptr: + case $kindFloat32: + case $kindFloat64: + return false; + case $kindInterface: + return t !== $js.Object; + default: + return true; + } +}; + +var $externalize = function(v, t) { + if ($js !== undefined && t === $js.Object) { + return v; + } + switch (t.kind) { + case $kindBool: + case $kindInt: + case $kindInt8: + case $kindInt16: + case $kindInt32: + case $kindUint: + case $kindUint8: + case $kindUint16: + case $kindUint32: + case $kindUintptr: + case $kindFloat32: + case $kindFloat64: + return v; + case $kindInt64: + case $kindUint64: + return $flatten64(v); + case $kindArray: + if ($needsExternalization(t.elem)) { + return $mapArray(v, function(e) { return $externalize(e, t.elem); }); + } + return v; + case $kindFunc: + if (v === $throwNilPointerError) { + return null; + } + if (v.$externalizeWrapper === undefined) { + $checkForDeadlock = false; + var convert = false; + for (var i = 0; i < t.params.length; i++) { + convert = convert || (t.params[i] !== $js.Object); + } + for (var i = 0; i < t.results.length; i++) { + convert = convert || $needsExternalization(t.results[i]); + } + v.$externalizeWrapper = v; + if (convert) { + v.$externalizeWrapper = function() { + var args = []; + for (var i = 0; i < t.params.length; i++) { + if (t.variadic && i === t.params.length - 1) { + var vt = t.params[i].elem, varargs = []; + for (var j = i; j < arguments.length; j++) { + varargs.push($internalize(arguments[j], vt)); + } + args.push(new (t.params[i])(varargs)); + break; + } + args.push($internalize(arguments[i], t.params[i])); + } + var result = v.apply(this, args); + switch (t.results.length) { + case 0: + return; + case 1: + return $externalize(result, t.results[0]); + default: + for (var i = 0; i < t.results.length; i++) { + result[i] = $externalize(result[i], t.results[i]); + } + return result; + } + }; + } + } + return v.$externalizeWrapper; + case $kindInterface: + if (v === $ifaceNil) { + return null; + } + return $externalize(v.$val, v.constructor); + case $kindMap: + var m = {}; + var keys = $keys(v); + for (var i = 0; i < keys.length; i++) { + var entry = v[keys[i]]; + m[$externalize(entry.k, t.key)] = $externalize(entry.v, t.elem); + } + return m; + case $kindPtr: + if (v === t.nil) { + return null; + } + return $externalize(v.$get(), t.elem); + case $kindSlice: + if ($needsExternalization(t.elem)) { + return $mapArray($sliceToArray(v), function(e) { return $externalize(e, t.elem); }); + } + return $sliceToArray(v); + case $kindString: + if (v.search(/^[\x00-\x7F]*$/) !== -1) { + return v; + } + var s = "", r; + for (var i = 0; i < v.length; i += r[1]) { + r = $decodeRune(v, i); + s += String.fromCharCode(r[0]); + } + return s; + case $kindStruct: + var timePkg = $packages["time"]; + if (timePkg && v.constructor === timePkg.Time.ptr) { + var milli = $div64(v.UnixNano(), new $Int64(0, 1000000)); + return new Date($flatten64(milli)); + } + + var searchJsObject = function(v, t) { + if (t === $js.Object) { + return v; + } + if (t.kind === $kindPtr && v !== t.nil) { + var o = searchJsObject(v.$get(), t.elem); + if (o !== undefined) { + return o; + } + } + if (t.kind === $kindStruct) { + for (var i = 0; i < t.fields.length; i++) { + var f = t.fields[i]; + var o = searchJsObject(v[f.prop], f.typ); + if (o !== undefined) { + return o; + } + } + } + return undefined; + }; + var o = searchJsObject(v, t); + if (o !== undefined) { + return o; + } + + o = {}; + for (var i = 0; i < t.fields.length; i++) { + var f = t.fields[i]; + if (f.pkg !== "") { /* not exported */ + continue; + } + o[f.name] = $externalize(v[f.prop], f.typ); + } + return o; + } + $panic(new $String("cannot externalize " + t.string)); +}; + +var $internalize = function(v, t, recv) { + if (t === $js.Object) { + return v; + } + switch (t.kind) { + case $kindBool: + return !!v; + case $kindInt: + return parseInt(v); + case $kindInt8: + return parseInt(v) << 24 >> 24; + case $kindInt16: + return parseInt(v) << 16 >> 16; + case $kindInt32: + return parseInt(v) >> 0; + case $kindUint: + return parseInt(v); + case $kindUint8: + return parseInt(v) << 24 >>> 24; + case $kindUint16: + return parseInt(v) << 16 >>> 16; + case $kindUint32: + case $kindUintptr: + return parseInt(v) >>> 0; + case $kindInt64: + case $kindUint64: + return new t(0, v); + case $kindFloat32: + case $kindFloat64: + return parseFloat(v); + case $kindArray: + if (v.length !== t.len) { + $throwRuntimeError("got array with wrong size from JavaScript native"); + } + return $mapArray(v, function(e) { return $internalize(e, t.elem); }); + case $kindFunc: + return function() { + var args = []; + for (var i = 0; i < t.params.length; i++) { + if (t.variadic && i === t.params.length - 1) { + var vt = t.params[i].elem, varargs = arguments[i]; + for (var j = 0; j < varargs.$length; j++) { + args.push($externalize(varargs.$array[varargs.$offset + j], vt)); + } + break; + } + args.push($externalize(arguments[i], t.params[i])); + } + var result = v.apply(recv, args); + switch (t.results.length) { + case 0: + return; + case 1: + return $internalize(result, t.results[0]); + default: + for (var i = 0; i < t.results.length; i++) { + result[i] = $internalize(result[i], t.results[i]); + } + return result; + } + }; + case $kindInterface: + if (t.methods.length !== 0) { + $panic(new $String("cannot internalize " + t.string)); + } + if (v === null) { + return $ifaceNil; + } + switch (v.constructor) { + case Int8Array: + return new ($sliceType($Int8))(v); + case Int16Array: + return new ($sliceType($Int16))(v); + case Int32Array: + return new ($sliceType($Int))(v); + case Uint8Array: + return new ($sliceType($Uint8))(v); + case Uint16Array: + return new ($sliceType($Uint16))(v); + case Uint32Array: + return new ($sliceType($Uint))(v); + case Float32Array: + return new ($sliceType($Float32))(v); + case Float64Array: + return new ($sliceType($Float64))(v); + case Array: + return $internalize(v, $sliceType($emptyInterface)); + case Boolean: + return new $Bool(!!v); + case Date: + var timePkg = $packages["time"]; + if (timePkg) { + return new timePkg.Time(timePkg.Unix(new $Int64(0, 0), new $Int64(0, v.getTime() * 1000000))); + } + case Function: + var funcType = $funcType([$sliceType($emptyInterface)], [$js.Object], true); + return new funcType($internalize(v, funcType)); + case Number: + return new $Float64(parseFloat(v)); + case String: + return new $String($internalize(v, $String)); + default: + if ($global.Node && v instanceof $global.Node) { + return new $js.container.ptr(v); + } + var mapType = $mapType($String, $emptyInterface); + return new mapType($internalize(v, mapType)); + } + case $kindMap: + var m = new $Map(); + var keys = $keys(v); + for (var i = 0; i < keys.length; i++) { + var key = $internalize(keys[i], t.key); + m[key.$key ? key.$key() : key] = { k: key, v: $internalize(v[keys[i]], t.elem) }; + } + return m; + case $kindPtr: + if (t.elem.kind === $kindStruct) { + return $internalize(v, t.elem); + } + case $kindSlice: + return new t($mapArray(v, function(e) { return $internalize(e, t.elem); })); + case $kindString: + v = String(v); + if (v.search(/^[\x00-\x7F]*$/) !== -1) { + return v; + } + var s = ""; + for (var i = 0; i < v.length; i++) { + s += $encodeRune(v.charCodeAt(i)); + } + return s; + case $kindStruct: + var searchJsObject = function(v, t) { + if (t === $js.Object) { + return v; + } + if (t.kind === $kindPtr && t.elem.kind === $kindStruct) { + var o = searchJsObject(v, t.elem); + if (o !== undefined) { + return o; + } + } + if (t.kind === $kindStruct) { + for (var i = 0; i < t.fields.length; i++) { + var f = t.fields[i]; + var o = searchJsObject(v, f.typ); + if (o !== undefined) { + var n = new t.ptr(); + n[f.prop] = o; + return n; + } + } + } + return undefined; + }; + var o = searchJsObject(v, t); + if (o !== undefined) { + return o; + } + } + $panic(new $String("cannot internalize " + t.string)); +}; + +$packages["github.com/gopherjs/gopherjs/js"] = (function() { + var $pkg = {}, Object, container, Error, sliceType$1, ptrType, ptrType$1, init; + Object = $pkg.Object = $newType(8, $kindInterface, "js.Object", "Object", "github.com/gopherjs/gopherjs/js", null); + container = $pkg.container = $newType(0, $kindStruct, "js.container", "container", "github.com/gopherjs/gopherjs/js", function(Object_) { + this.$val = this; + this.Object = Object_ !== undefined ? Object_ : null; + }); + Error = $pkg.Error = $newType(0, $kindStruct, "js.Error", "Error", "github.com/gopherjs/gopherjs/js", function(Object_) { + this.$val = this; + this.Object = Object_ !== undefined ? Object_ : null; + }); + sliceType$1 = $sliceType($emptyInterface); + ptrType = $ptrType(container); + ptrType$1 = $ptrType(Error); + container.ptr.prototype.Get = function(key) { + var c, key; + c = this; + return c.Object[$externalize(key, $String)]; + }; + container.prototype.Get = function(key) { return this.$val.Get(key); }; + container.ptr.prototype.Set = function(key, value) { + var c, key, value; + c = this; + c.Object[$externalize(key, $String)] = $externalize(value, $emptyInterface); + }; + container.prototype.Set = function(key, value) { return this.$val.Set(key, value); }; + container.ptr.prototype.Delete = function(key) { + var c, key; + c = this; + delete c.Object[$externalize(key, $String)]; + }; + container.prototype.Delete = function(key) { return this.$val.Delete(key); }; + container.ptr.prototype.Length = function() { + var c; + c = this; + return $parseInt(c.Object.length); + }; + container.prototype.Length = function() { return this.$val.Length(); }; + container.ptr.prototype.Index = function(i) { + var c, i; + c = this; + return c.Object[i]; + }; + container.prototype.Index = function(i) { return this.$val.Index(i); }; + container.ptr.prototype.SetIndex = function(i, value) { + var c, i, value; + c = this; + c.Object[i] = $externalize(value, $emptyInterface); + }; + container.prototype.SetIndex = function(i, value) { return this.$val.SetIndex(i, value); }; + container.ptr.prototype.Call = function(name, args) { + var args, c, name, obj; + c = this; + return (obj = c.Object, obj[$externalize(name, $String)].apply(obj, $externalize(args, sliceType$1))); + }; + container.prototype.Call = function(name, args) { return this.$val.Call(name, args); }; + container.ptr.prototype.Invoke = function(args) { + var args, c; + c = this; + return c.Object.apply(undefined, $externalize(args, sliceType$1)); + }; + container.prototype.Invoke = function(args) { return this.$val.Invoke(args); }; + container.ptr.prototype.New = function(args) { + var args, c; + c = this; + return new ($global.Function.prototype.bind.apply(c.Object, [undefined].concat($externalize(args, sliceType$1)))); + }; + container.prototype.New = function(args) { return this.$val.New(args); }; + container.ptr.prototype.Bool = function() { + var c; + c = this; + return !!(c.Object); + }; + container.prototype.Bool = function() { return this.$val.Bool(); }; + container.ptr.prototype.String = function() { + var c; + c = this; + return $internalize(c.Object, $String); + }; + container.prototype.String = function() { return this.$val.String(); }; + container.ptr.prototype.Int = function() { + var c; + c = this; + return $parseInt(c.Object) >> 0; + }; + container.prototype.Int = function() { return this.$val.Int(); }; + container.ptr.prototype.Int64 = function() { + var c; + c = this; + return $internalize(c.Object, $Int64); + }; + container.prototype.Int64 = function() { return this.$val.Int64(); }; + container.ptr.prototype.Uint64 = function() { + var c; + c = this; + return $internalize(c.Object, $Uint64); + }; + container.prototype.Uint64 = function() { return this.$val.Uint64(); }; + container.ptr.prototype.Float = function() { + var c; + c = this; + return $parseFloat(c.Object); + }; + container.prototype.Float = function() { return this.$val.Float(); }; + container.ptr.prototype.Interface = function() { + var c; + c = this; + return $internalize(c.Object, $emptyInterface); + }; + container.prototype.Interface = function() { return this.$val.Interface(); }; + container.ptr.prototype.Unsafe = function() { + var c; + c = this; + return c.Object; + }; + container.prototype.Unsafe = function() { return this.$val.Unsafe(); }; + Error.ptr.prototype.Error = function() { + var err; + err = this; + return "JavaScript error: " + $internalize(err.Object.message, $String); + }; + Error.prototype.Error = function() { return this.$val.Error(); }; + Error.ptr.prototype.Stack = function() { + var err; + err = this; + return $internalize(err.Object.stack, $String); + }; + Error.prototype.Stack = function() { return this.$val.Stack(); }; + init = function() { + var _tmp, _tmp$1, c, e; + c = new container.ptr(null); + e = new Error.ptr(null); + + }; + ptrType.methods = [{prop: "Get", name: "Get", pkg: "", typ: $funcType([$String], [Object], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$String, $emptyInterface], [], false)}, {prop: "Delete", name: "Delete", pkg: "", typ: $funcType([$String], [], false)}, {prop: "Length", name: "Length", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([$Int], [Object], false)}, {prop: "SetIndex", name: "SetIndex", pkg: "", typ: $funcType([$Int, $emptyInterface], [], false)}, {prop: "Call", name: "Call", pkg: "", typ: $funcType([$String, sliceType$1], [Object], true)}, {prop: "Invoke", name: "Invoke", pkg: "", typ: $funcType([sliceType$1], [Object], true)}, {prop: "New", name: "New", pkg: "", typ: $funcType([sliceType$1], [Object], true)}, {prop: "Bool", name: "Bool", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Int", name: "Int", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Int64", name: "Int64", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Uint64", name: "Uint64", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "Float", name: "Float", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Interface", name: "Interface", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Unsafe", name: "Unsafe", pkg: "", typ: $funcType([], [$Uintptr], false)}]; + ptrType$1.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Stack", name: "Stack", pkg: "", typ: $funcType([], [$String], false)}]; + Object.init([{prop: "Bool", name: "Bool", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Call", name: "Call", pkg: "", typ: $funcType([$String, sliceType$1], [Object], true)}, {prop: "Delete", name: "Delete", pkg: "", typ: $funcType([$String], [], false)}, {prop: "Float", name: "Float", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$String], [Object], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([$Int], [Object], false)}, {prop: "Int", name: "Int", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Int64", name: "Int64", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Interface", name: "Interface", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Invoke", name: "Invoke", pkg: "", typ: $funcType([sliceType$1], [Object], true)}, {prop: "Length", name: "Length", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([sliceType$1], [Object], true)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$String, $emptyInterface], [], false)}, {prop: "SetIndex", name: "SetIndex", pkg: "", typ: $funcType([$Int, $emptyInterface], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Uint64", name: "Uint64", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "Unsafe", name: "Unsafe", pkg: "", typ: $funcType([], [$Uintptr], false)}]); + container.init([{prop: "Object", name: "", pkg: "", typ: Object, tag: ""}]); + Error.init([{prop: "Object", name: "", pkg: "", typ: Object, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_js = function() { while (true) { switch ($s) { case 0: + init(); + /* */ } return; } }; $init_js.$blocking = true; return $init_js; + }; + return $pkg; +})(); +$packages["runtime"] = (function() { + var $pkg = {}, js, NotSupportedError, TypeAssertionError, errorString, ptrType$5, ptrType$6, init; + js = $packages["github.com/gopherjs/gopherjs/js"]; + NotSupportedError = $pkg.NotSupportedError = $newType(0, $kindStruct, "runtime.NotSupportedError", "NotSupportedError", "runtime", function(Feature_) { + this.$val = this; + this.Feature = Feature_ !== undefined ? Feature_ : ""; + }); + TypeAssertionError = $pkg.TypeAssertionError = $newType(0, $kindStruct, "runtime.TypeAssertionError", "TypeAssertionError", "runtime", function(interfaceString_, concreteString_, assertedString_, missingMethod_) { + this.$val = this; + this.interfaceString = interfaceString_ !== undefined ? interfaceString_ : ""; + this.concreteString = concreteString_ !== undefined ? concreteString_ : ""; + this.assertedString = assertedString_ !== undefined ? assertedString_ : ""; + this.missingMethod = missingMethod_ !== undefined ? missingMethod_ : ""; + }); + errorString = $pkg.errorString = $newType(8, $kindString, "runtime.errorString", "errorString", "runtime", null); + ptrType$5 = $ptrType(NotSupportedError); + ptrType$6 = $ptrType(TypeAssertionError); + NotSupportedError.ptr.prototype.Error = function() { + var err; + err = this; + return "not supported by GopherJS: " + err.Feature; + }; + NotSupportedError.prototype.Error = function() { return this.$val.Error(); }; + init = function() { + var e; + $js = $packages[$externalize("github.com/gopherjs/gopherjs/js", $String)]; + $throwRuntimeError = (function(msg) { + var msg; + $panic(new errorString(msg)); + }); + e = $ifaceNil; + e = new TypeAssertionError.ptr("", "", "", ""); + e = new NotSupportedError.ptr(""); + }; + TypeAssertionError.ptr.prototype.RuntimeError = function() { + }; + TypeAssertionError.prototype.RuntimeError = function() { return this.$val.RuntimeError(); }; + TypeAssertionError.ptr.prototype.Error = function() { + var e, inter; + e = this; + inter = e.interfaceString; + if (inter === "") { + inter = "interface"; + } + if (e.concreteString === "") { + return "interface conversion: " + inter + " is nil, not " + e.assertedString; + } + if (e.missingMethod === "") { + return "interface conversion: " + inter + " is " + e.concreteString + ", not " + e.assertedString; + } + return "interface conversion: " + e.concreteString + " is not " + e.assertedString + ": missing method " + e.missingMethod; + }; + TypeAssertionError.prototype.Error = function() { return this.$val.Error(); }; + errorString.prototype.RuntimeError = function() { + var e; + e = this.$val; + }; + $ptrType(errorString).prototype.RuntimeError = function() { return new errorString(this.$get()).RuntimeError(); }; + errorString.prototype.Error = function() { + var e; + e = this.$val; + return "runtime error: " + e; + }; + $ptrType(errorString).prototype.Error = function() { return new errorString(this.$get()).Error(); }; + ptrType$5.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + ptrType$6.methods = [{prop: "RuntimeError", name: "RuntimeError", pkg: "", typ: $funcType([], [], false)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + errorString.methods = [{prop: "RuntimeError", name: "RuntimeError", pkg: "", typ: $funcType([], [], false)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; + NotSupportedError.init([{prop: "Feature", name: "Feature", pkg: "", typ: $String, tag: ""}]); + TypeAssertionError.init([{prop: "interfaceString", name: "interfaceString", pkg: "runtime", typ: $String, tag: ""}, {prop: "concreteString", name: "concreteString", pkg: "runtime", typ: $String, tag: ""}, {prop: "assertedString", name: "assertedString", pkg: "runtime", typ: $String, tag: ""}, {prop: "missingMethod", name: "missingMethod", pkg: "runtime", typ: $String, tag: ""}]); + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_runtime = function() { while (true) { switch ($s) { case 0: + $r = js.$init($BLOCKING); /* */ $s = 1; case 1: if ($r && $r.$blocking) { $r = $r(); } + init(); + /* */ } return; } }; $init_runtime.$blocking = true; return $init_runtime; + }; + return $pkg; +})(); +$packages["main"] = (function() { + var $pkg = {}, main; + main = function() { + console.log("Hello."); + }; + $pkg.$init = function() { + $pkg.$init = function() {}; + /* */ var $r, $s = 0; var $init_main = function() { while (true) { switch ($s) { case 0: + main(); + /* */ } return; } }; $init_main.$blocking = true; return $init_main; + }; + return $pkg; +})(); +$synthesizeMethods(); +$packages["runtime"].$init()(); +$go($packages["main"].$init, [], true); +$flushConsole(); + +}).call(this); +//# sourceMappingURL=simple.js.map diff --git a/104/build/simple.js.gz b/104/build/simple.js.gz new file mode 100644 index 0000000..6b31cda Binary files /dev/null and b/104/build/simple.js.gz differ diff --git a/104/build/simple_min.js b/104/build/simple_min.js new file mode 100644 index 0000000..83ecfec --- /dev/null +++ b/104/build/simple_min.js @@ -0,0 +1,14 @@ +"use strict"; +(function() { + +Error.stackTraceLimit=Infinity;var $global,$module;if(typeof window!=="undefined"){$global=window;}else if(typeof self!=="undefined"){$global=self;}else if(typeof global!=="undefined"){$global=global;$global.require=require;}else{$global=this;}if($global===undefined||$global.Array===undefined){throw new Error("no global object found");}if(typeof module!=="undefined"){$module=module;}var $packages={},$idCounter=0;var $keys=function(m){return m?Object.keys(m):[];};var $min=Math.min;var $mod=function(x,y){return x%y;};var $parseInt=parseInt;var $parseFloat=function(f){if(f!==undefined&&f!==null&&f.constructor===Number){return f;}return parseFloat(f);};var $flushConsole=function(){};var $throwRuntimeError;var $throwNilPointerError=function(){$throwRuntimeError("invalid memory address or nil pointer dereference");};var $mapArray=function(array,f){var newArray=new array.constructor(array.length);for(var i=0;islice.$capacity||max>slice.$capacity){$throwRuntimeError("slice bounds out of range");}var s=new slice.constructor(slice.$array);s.$offset=slice.$offset+low;s.$length=slice.$length-low;s.$capacity=slice.$capacity-low;if(high!==undefined){s.$length=high-low;}if(max!==undefined){s.$capacity=max-low;}return s;};var $sliceToArray=function(slice){if(slice.$length===0){return[];}if(slice.$array.constructor!==Array){return slice.$array.subarray(slice.$offset,slice.$offset+slice.$length);}return slice.$array.slice(slice.$offset,slice.$offset+slice.$length);};var $decodeRune=function(str,pos){var c0=str.charCodeAt(pos);if(c0<0x80){return[c0,1];}if(c0!==c0||c0<0xC0){return[0xFFFD,1];}var c1=str.charCodeAt(pos+1);if(c1!==c1||c1<0x80||0xC0<=c1){return[0xFFFD,1];}if(c0<0xE0){var r=(c0&0x1F)<<6|(c1&0x3F);if(r<=0x7F){return[0xFFFD,1];}return[r,2];}var c2=str.charCodeAt(pos+2);if(c2!==c2||c2<0x80||0xC0<=c2){return[0xFFFD,1];}if(c0<0xF0){var r=(c0&0x0F)<<12|(c1&0x3F)<<6|(c2&0x3F);if(r<=0x7FF){return[0xFFFD,1];}if(0xD800<=r&&r<=0xDFFF){return[0xFFFD,1];}return[r,3];}var c3=str.charCodeAt(pos+3);if(c3!==c3||c3<0x80||0xC0<=c3){return[0xFFFD,1];}if(c0<0xF8){var r=(c0&0x07)<<18|(c1&0x3F)<<12|(c2&0x3F)<<6|(c3&0x3F);if(r<=0xFFFF||0x10FFFF0x10FFFF||(0xD800<=r&&r<=0xDFFF)){r=0xFFFD;}if(r<=0x7F){return String.fromCharCode(r);}if(r<=0x7FF){return String.fromCharCode(0xC0|r>>6,0x80|(r&0x3F));}if(r<=0xFFFF){return String.fromCharCode(0xE0|r>>12,0x80|(r>>6&0x3F),0x80|(r&0x3F));}return String.fromCharCode(0xF0|r>>18,0x80|(r>>12&0x3F),0x80|(r>>6&0x3F),0x80|(r&0x3F));};var $stringToBytes=function(str){var array=new Uint8Array(str.length);for(var i=0;isrcOffset){for(var i=n-1;i>=0;i--){$copy(dst[dstOffset+i],src[srcOffset+i],elem);}return;}for(var i=0;isrcOffset){for(var i=n-1;i>=0;i--){dst[dstOffset+i]=src[srcOffset+i];}return;}for(var i=0;inewCapacity){newOffset=0;newCapacity=Math.max(newLength,slice.$capacity<1024?slice.$capacity*2:Math.floor(slice.$capacity*5/4));if(slice.$array.constructor===Array){newArray=slice.$array.slice(slice.$offset,slice.$offset+slice.$length);newArray.length=newCapacity;var zero=slice.constructor.elem.zero;for(var i=slice.$length;i>0;this.$low=low>>>0;this.$val=this;};typ.prototype.$key=function(){return string+"$"+this.$high+"$"+this.$low;};break;case $kindUint64:typ=function(high,low){this.$high=(high+Math.floor(Math.ceil(low)/4294967296))>>>0;this.$low=low>>>0;this.$val=this;};typ.prototype.$key=function(){return string+"$"+this.$high+"$"+this.$low;};break;case $kindComplex64:case $kindComplex128:typ=function(real,imag){this.$real=real;this.$imag=imag;this.$val=this;};typ.prototype.$key=function(){return string+"$"+this.$real+"$"+this.$imag;};break;case $kindArray:typ=function(v){this.$val=v;};typ.ptr=$newType(4,$kindPtr,"*"+string,"","",function(array){this.$get=function(){return array;};this.$set=function(v){$copy(this,v,typ);};this.$val=array;});typ.init=function(elem,len){typ.elem=elem;typ.len=len;typ.comparable=elem.comparable;typ.prototype.$key=function(){return string+"$"+Array.prototype.join.call($mapArray(this.$val,function(e){var key=e.$key?e.$key():String(e);return key.replace(/\\/g,"\\\\").replace(/\$/g,"\\$");}),"$");};typ.ptr.init(typ);Object.defineProperty(typ.ptr.nil,"nilCheck",{get:$throwNilPointerError});};break;case $kindChan:typ=function(capacity){this.$val=this;this.$capacity=capacity;this.$buffer=[];this.$sendQueue=[];this.$recvQueue=[];this.$closed=false;};typ.prototype.$key=function(){if(this.$id===undefined){$idCounter++;this.$id=$idCounter;}return String(this.$id);};typ.init=function(elem,sendOnly,recvOnly){typ.elem=elem;typ.sendOnly=sendOnly;typ.recvOnly=recvOnly;typ.nil=new typ(0);typ.nil.$sendQueue=typ.nil.$recvQueue={length:0,push:function(){},shift:function(){return undefined;},indexOf:function(){return-1;}};};break;case $kindFunc:typ=function(v){this.$val=v;};typ.init=function(params,results,variadic){typ.params=params;typ.results=results;typ.variadic=variadic;typ.comparable=false;};break;case $kindInterface:typ={implementedBy:{},missingMethodFor:{}};typ.init=function(methods){typ.methods=methods;methods.forEach(function(m){$ifaceNil[m.prop]=$throwNilPointerError;});};break;case $kindMap:typ=function(v){this.$val=v;};typ.init=function(key,elem){typ.key=key;typ.elem=elem;typ.comparable=false;};break;case $kindPtr:typ=constructor||function(getter,setter,target){this.$get=getter;this.$set=setter;this.$target=target;this.$val=this;};typ.prototype.$key=function(){if(this.$id===undefined){$idCounter++;this.$id=$idCounter;}return String(this.$id);};typ.init=function(elem){typ.elem=elem;typ.nil=new typ($throwNilPointerError,$throwNilPointerError);};break;case $kindSlice:typ=function(array){if(array.constructor!==typ.nativeArray){array=new typ.nativeArray(array);}this.$array=array;this.$offset=0;this.$length=array.length;this.$capacity=array.length;this.$val=this;};typ.init=function(elem){typ.elem=elem;typ.comparable=false;typ.nativeArray=$nativeArray(elem.kind);typ.nil=new typ([]);};break;case $kindStruct:typ=function(v){this.$val=v;};typ.ptr=$newType(4,$kindPtr,"*"+string,"","",constructor);typ.ptr.elem=typ;typ.ptr.prototype.$get=function(){return this;};typ.ptr.prototype.$set=function(v){$copy(this,v,typ);};typ.init=function(fields){typ.fields=fields;fields.forEach(function(f){if(!f.typ.comparable){typ.comparable=false;}});typ.prototype.$key=function(){var val=this.$val;return string+"$"+$mapArray(fields,function(f){var e=val[f.prop];var key=e.$key?e.$key():String(e);return key.replace(/\\/g,"\\\\").replace(/\$/g,"\\$");}).join("$");};var properties={};fields.forEach(function(f){properties[f.prop]={get:$throwNilPointerError,set:$throwNilPointerError};});typ.ptr.nil=Object.create(constructor.prototype,properties);typ.ptr.nil.$val=typ.ptr.nil;$addMethodSynthesizer(function(){var synthesizeMethod=function(target,m,f){if(target.prototype[m.prop]!==undefined){return;}target.prototype[m.prop]=function(){var v=this.$val[f.prop];if(f.typ===$js.Object){v=new $js.container.ptr(v);}if(v.$val===undefined){v=new f.typ(v);}return v[m.prop].apply(v,arguments);};};fields.forEach(function(f){if(f.name===""){$methodSet(f.typ).forEach(function(m){synthesizeMethod(typ,m,f);synthesizeMethod(typ.ptr,m,f);});$methodSet($ptrType(f.typ)).forEach(function(m){synthesizeMethod(typ.ptr,m,f);});}});});};break;default:$panic(new $String("invalid kind: "+kind));}switch(kind){case $kindBool:case $kindMap:typ.zero=function(){return false;};break;case $kindInt:case $kindInt8:case $kindInt16:case $kindInt32:case $kindUint:case $kindUint8:case $kindUint16:case $kindUint32:case $kindUintptr:case $kindUnsafePointer:case $kindFloat32:case $kindFloat64:typ.zero=function(){return 0;};break;case $kindString:typ.zero=function(){return"";};break;case $kindInt64:case $kindUint64:case $kindComplex64:case $kindComplex128:var zero=new typ(0,0);typ.zero=function(){return zero;};break;case $kindChan:case $kindPtr:case $kindSlice:typ.zero=function(){return typ.nil;};break;case $kindFunc:typ.zero=function(){return $throwNilPointerError;};break;case $kindInterface:typ.zero=function(){return $ifaceNil;};break;case $kindArray:typ.zero=function(){var arrayClass=$nativeArray(typ.elem.kind);if(arrayClass!==Array){return new arrayClass(typ.len);}var array=new Array(typ.len);for(var i=0;i0){var next=[];var mset=[];current.forEach(function(e){if(seen[e.typ.string]){return;}seen[e.typ.string]=true;if(e.typ.typeName!==""){mset=mset.concat(e.typ.methods);if(e.indirect){mset=mset.concat($ptrType(e.typ).methods);}}switch(e.typ.kind){case $kindStruct:e.typ.fields.forEach(function(f){if(f.name===""){var fTyp=f.typ;var fIsPtr=(fTyp.kind===$kindPtr);next.push({typ:fIsPtr?fTyp.elem:fTyp,indirect:e.indirect||fIsPtr});}});break;case $kindInterface:mset=mset.concat(e.typ.methods);break;}});mset.forEach(function(m){if(base[m.name]===undefined){base[m.name]=m;}});current=next;}typ.methodSetCache=[];Object.keys(base).sort().forEach(function(name){typ.methodSetCache.push(base[name]);});return typ.methodSetCache;};var $Bool=$newType(1,$kindBool,"bool","bool","",null);var $Int=$newType(4,$kindInt,"int","int","",null);var $Int8=$newType(1,$kindInt8,"int8","int8","",null);var $Int16=$newType(2,$kindInt16,"int16","int16","",null);var $Int32=$newType(4,$kindInt32,"int32","int32","",null);var $Int64=$newType(8,$kindInt64,"int64","int64","",null);var $Uint=$newType(4,$kindUint,"uint","uint","",null);var $Uint8=$newType(1,$kindUint8,"uint8","uint8","",null);var $Uint16=$newType(2,$kindUint16,"uint16","uint16","",null);var $Uint32=$newType(4,$kindUint32,"uint32","uint32","",null);var $Uint64=$newType(8,$kindUint64,"uint64","uint64","",null);var $Uintptr=$newType(4,$kindUintptr,"uintptr","uintptr","",null);var $Float32=$newType(4,$kindFloat32,"float32","float32","",null);var $Float64=$newType(8,$kindFloat64,"float64","float64","",null);var $Complex64=$newType(8,$kindComplex64,"complex64","complex64","",null);var $Complex128=$newType(16,$kindComplex128,"complex128","complex128","",null);var $String=$newType(8,$kindString,"string","string","",null);var $UnsafePointer=$newType(4,$kindUnsafePointer,"unsafe.Pointer","Pointer","",null);var $nativeArray=function(elemKind){switch(elemKind){case $kindInt:return Int32Array;case $kindInt8:return Int8Array;case $kindInt16:return Int16Array;case $kindInt32:return Int32Array;case $kindUint:return Uint32Array;case $kindUint8:return Uint8Array;case $kindUint16:return Uint16Array;case $kindUint32:return Uint32Array;case $kindUintptr:return Uint32Array;case $kindFloat32:return Float32Array;case $kindFloat64:return Float64Array;default:return Array;}};var $toNativeArray=function(elemKind,array){var nativeArray=$nativeArray(elemKind);if(nativeArray===Array){return array;}return new nativeArray(array);};var $arrayTypes={};var $arrayType=function(elem,len){var string="["+len+"]"+elem.string;var typ=$arrayTypes[string];if(typ===undefined){typ=$newType(12,$kindArray,string,"","",null);$arrayTypes[string]=typ;typ.init(elem,len);}return typ;};var $chanType=function(elem,sendOnly,recvOnly){var string=(recvOnly?"<-":"")+"chan"+(sendOnly?"<- ":" ")+elem.string;var field=sendOnly?"SendChan":(recvOnly?"RecvChan":"Chan");var typ=elem[field];if(typ===undefined){typ=$newType(4,$kindChan,string,"","",null);elem[field]=typ;typ.init(elem,sendOnly,recvOnly);}return typ;};var $funcTypes={};var $funcType=function(params,results,variadic){var paramTypes=$mapArray(params,function(p){return p.string;});if(variadic){paramTypes[paramTypes.length-1]="..."+paramTypes[paramTypes.length-1].substr(2);}var string="func("+paramTypes.join(", ")+")";if(results.length===1){string+=" "+results[0].string;}else if(results.length>1){string+=" ("+$mapArray(results,function(r){return r.string;}).join(", ")+")";}var typ=$funcTypes[string];if(typ===undefined){typ=$newType(4,$kindFunc,string,"","",null);$funcTypes[string]=typ;typ.init(params,results,variadic);}return typ;};var $interfaceTypes={};var $interfaceType=function(methods){var string="interface {}";if(methods.length!==0){string="interface { "+$mapArray(methods,function(m){return(m.pkg!==""?m.pkg+".":"")+m.name+m.typ.string.substr(4);}).join("; ")+" }";}var typ=$interfaceTypes[string];if(typ===undefined){typ=$newType(8,$kindInterface,string,"","",null);$interfaceTypes[string]=typ;typ.init(methods);}return typ;};var $emptyInterface=$interfaceType([]);var $ifaceNil={$key:function(){return"nil";}};var $error=$newType(8,$kindInterface,"error","error","",null);$error.init([{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}]);var $Map=function(){};(function(){var names=Object.getOwnPropertyNames(Object.prototype);for(var i=0;i>>(32-y),(x.$low<>>0);}if(y<64){return new x.constructor(x.$low<<(y-32),0);}return new x.constructor(0,0);};var $shiftRightInt64=function(x,y){if(y===0){return x;}if(y<32){return new x.constructor(x.$high>>y,(x.$low>>>y|x.$high<<(32-y))>>>0);}if(y<64){return new x.constructor(x.$high>>31,(x.$high>>(y-32))>>>0);}if(x.$high<0){return new x.constructor(-1,4294967295);}return new x.constructor(0,0);};var $shiftRightUint64=function(x,y){if(y===0){return x;}if(y<32){return new x.constructor(x.$high>>>y,(x.$low>>>y|x.$high<<(32-y))>>>0);}if(y<64){return new x.constructor(0,x.$high>>>(y-32));}return new x.constructor(0,0);};var $mul64=function(x,y){var high=0,low=0;if((y.$low&1)!==0){high=x.$high;low=x.$low;}for(var i=1;i<32;i++){if((y.$low&1<>>(32-i);low+=(x.$low<>>0;}}for(var i=0;i<32;i++){if((y.$high&1<yHigh)||(xHigh===yHigh&&xLow>yLow))){yHigh=(yHigh<<1|yLow>>>31)>>>0;yLow=(yLow<<1)>>>0;n++;}for(var i=0;i<=n;i++){high=high<<1|low>>>31;low=(low<<1)>>>0;if((xHigh>yHigh)||(xHigh===yHigh&&xLow>=yLow)){xHigh=xHigh-yHigh;xLow=xLow-yLow;if(xLow<0){xHigh--;xLow+=4294967296;}low++;if(low===4294967296){high++;low=0;}}yLow=(yLow>>>1|yHigh<<(32-1))>>>0;yHigh=yHigh>>>1;}if(returnRemainder){return new x.constructor(xHigh*rs,xLow*rs);}return new x.constructor(high*s,low*s);};var $divComplex=function(n,d){var ninf=n.$real===1/0||n.$real===-1/0||n.$imag===1/0||n.$imag===-1/0;var dinf=d.$real===1/0||d.$real===-1/0||d.$imag===1/0||d.$imag===-1/0;var nnan=!ninf&&(n.$real!==n.$real||n.$imag!==n.$imag);var dnan=!dinf&&(d.$real!==d.$real||d.$imag!==d.$imag);if(nnan||dnan){return new n.constructor(0/0,0/0);}if(ninf&&!dinf){return new n.constructor(1/0,1/0);}if(!ninf&&dinf){return new n.constructor(0,0);}if(d.$real===0&&d.$imag===0){if(n.$real===0&&n.$imag===0){return new n.constructor(0/0,0/0);}return new n.constructor(1/0,1/0);}var a=Math.abs(d.$real);var b=Math.abs(d.$imag);if(a<=b){var ratio=d.$real/d.$imag;var denom=d.$real*ratio+d.$imag;return new n.constructor((n.$real*ratio+n.$imag)/denom,(n.$imag*ratio-n.$real)/denom);}var ratio=d.$imag/d.$real;var denom=d.$imag*ratio+d.$real;return new n.constructor((n.$imag*ratio+n.$real)/denom,(n.$imag-n.$real*ratio)/denom);};var $stackDepthOffset=0;var $getStackDepth=function(){var err=new Error();if(err.stack===undefined){return undefined;}return $stackDepthOffset+err.stack.split("\n").length;};var $deferFrames=[],$skippedDeferFrames=0,$jumpToDefer=false,$panicStackDepth=null,$panicValue;var $callDeferred=function(deferred,jsErr){if($skippedDeferFrames!==0){$skippedDeferFrames--;throw jsErr;}if($jumpToDefer){$jumpToDefer=false;throw jsErr;}if(jsErr){var newErr=null;try{$deferFrames.push(deferred);$panic(new $js.Error.ptr(jsErr));}catch(err){newErr=err;}$deferFrames.pop();$callDeferred(deferred,newErr);return;}$stackDepthOffset--;var outerPanicStackDepth=$panicStackDepth;var outerPanicValue=$panicValue;var localPanicValue=$curGoroutine.panicStack.pop();if(localPanicValue!==undefined){$panicStackDepth=$getStackDepth();$panicValue=localPanicValue;}var call,localSkippedDeferFrames=0;try{while(true){if(deferred===null){deferred=$deferFrames[$deferFrames.length-1-localSkippedDeferFrames];if(deferred===undefined){if(localPanicValue.Object instanceof Error){throw localPanicValue.Object;}var msg;if(localPanicValue.constructor===$String){msg=localPanicValue.$val;}else if(localPanicValue.Error!==undefined){msg=localPanicValue.Error();}else if(localPanicValue.String!==undefined){msg=localPanicValue.String();}else{msg=localPanicValue;}throw new Error(msg);}}var call=deferred.pop();if(call===undefined){if(localPanicValue!==undefined){localSkippedDeferFrames++;deferred=null;continue;}return;}var r=call[0].apply(undefined,call[1]);if(r&&r.$blocking){deferred.push([r,[]]);}if(localPanicValue!==undefined&&$panicStackDepth===null){throw null;}}}finally{$skippedDeferFrames+=localSkippedDeferFrames;if($curGoroutine.asleep){deferred.push(call);$jumpToDefer=true;}if(localPanicValue!==undefined){if($panicStackDepth!==null){$curGoroutine.panicStack.push(localPanicValue);}$panicStackDepth=outerPanicStackDepth;$panicValue=outerPanicValue;}$stackDepthOffset++;}};var $panic=function(value){$curGoroutine.panicStack.push(value);$callDeferred(null,null);};var $recover=function(){if($panicStackDepth===null||($panicStackDepth!==undefined&&$panicStackDepth!==$getStackDepth()-2)){return $ifaceNil;}$panicStackDepth=null;return $panicValue;};var $throw=function(err){throw err;};var $BLOCKING=new Object();var $nonblockingCall=function(){$panic(new $packages["runtime"].NotSupportedError.ptr("non-blocking call to blocking function, see https://github.com/gopherjs/gopherjs#goroutines"));};var $dummyGoroutine={asleep:false,exit:false,panicStack:[]};var $curGoroutine=$dummyGoroutine,$totalGoroutines=0,$awakeGoroutines=0,$checkForDeadlock=true;var $go=function(fun,args,direct){$totalGoroutines++;$awakeGoroutines++;args.push($BLOCKING);var goroutine=function(){var rescheduled=false;try{$curGoroutine=goroutine;$skippedDeferFrames=0;$jumpToDefer=false;var r=fun.apply(undefined,args);if(r&&r.$blocking){fun=r;args=[];$schedule(goroutine,direct);rescheduled=true;return;}goroutine.exit=true;}catch(err){if(!$curGoroutine.asleep){goroutine.exit=true;throw err;}}finally{$curGoroutine=$dummyGoroutine;if(goroutine.exit&&!rescheduled){$totalGoroutines--;goroutine.asleep=true;}if(goroutine.asleep&&!rescheduled){$awakeGoroutines--;if($awakeGoroutines===0&&$totalGoroutines!==0&&$checkForDeadlock){console.error("fatal error: all goroutines are asleep - deadlock!");}}}};goroutine.asleep=false;goroutine.exit=false;goroutine.panicStack=[];$schedule(goroutine,direct);};var $scheduled=[],$schedulerLoopActive=false;var $schedule=function(goroutine,direct){if(goroutine.asleep){goroutine.asleep=false;$awakeGoroutines++;}if(direct){goroutine();return;}$scheduled.push(goroutine);if(!$schedulerLoopActive){$schedulerLoopActive=true;setTimeout(function(){while(true){var r=$scheduled.shift();if(r===undefined){$schedulerLoopActive=false;break;}r();};},0);}};var $send=function(chan,value){if(chan.$closed){$throwRuntimeError("send on closed channel");}var queuedRecv=chan.$recvQueue.shift();if(queuedRecv!==undefined){queuedRecv([value,true]);return;}if(chan.$buffer.length>24;case $kindInt16:return parseInt(v)<<16>>16;case $kindInt32:return parseInt(v)>>0;case $kindUint:return parseInt(v);case $kindUint8:return parseInt(v)<<24>>>24;case $kindUint16:return parseInt(v)<<16>>>16;case $kindUint32:case $kindUintptr:return parseInt(v)>>>0;case $kindInt64:case $kindUint64:return new t(0,v);case $kindFloat32:case $kindFloat64:return parseFloat(v);case $kindArray:if(v.length!==t.len){$throwRuntimeError("got array with wrong size from JavaScript native");}return $mapArray(v,function(e){return $internalize(e,t.elem);});case $kindFunc:return function(){var args=[];for(var i=0;i>0;};B.prototype.Int=function(){return this.$val.Int();};B.ptr.prototype.Int64=function(){var a;a=this;return $internalize(a.Object,$Int64);};B.prototype.Int64=function(){return this.$val.Int64();};B.ptr.prototype.Uint64=function(){var a;a=this;return $internalize(a.Object,$Uint64);};B.prototype.Uint64=function(){return this.$val.Uint64();};B.ptr.prototype.Float=function(){var a;a=this;return $parseFloat(a.Object);};B.prototype.Float=function(){return this.$val.Float();};B.ptr.prototype.Interface=function(){var a;a=this;return $internalize(a.Object,$emptyInterface);};B.prototype.Interface=function(){return this.$val.Interface();};B.ptr.prototype.Unsafe=function(){var a;a=this;return a.Object;};B.prototype.Unsafe=function(){return this.$val.Unsafe();};C.ptr.prototype.Error=function(){var a;a=this;return"JavaScript error: "+$internalize(a.Object.message,$String);};C.prototype.Error=function(){return this.$val.Error();};C.ptr.prototype.Stack=function(){var a;a=this;return $internalize(a.Object.stack,$String);};C.prototype.Stack=function(){return this.$val.Stack();};K=function(){var a,b,c,d;a=new B.ptr(null);b=new C.ptr(null);};P.methods=[{prop:"Get",name:"Get",pkg:"",typ:$funcType([$String],[A],false)},{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String,$emptyInterface],[],false)},{prop:"Delete",name:"Delete",pkg:"",typ:$funcType([$String],[],false)},{prop:"Length",name:"Length",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Index",name:"Index",pkg:"",typ:$funcType([$Int],[A],false)},{prop:"SetIndex",name:"SetIndex",pkg:"",typ:$funcType([$Int,$emptyInterface],[],false)},{prop:"Call",name:"Call",pkg:"",typ:$funcType([$String,M],[A],true)},{prop:"Invoke",name:"Invoke",pkg:"",typ:$funcType([M],[A],true)},{prop:"New",name:"New",pkg:"",typ:$funcType([M],[A],true)},{prop:"Bool",name:"Bool",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Int",name:"Int",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Int64",name:"Int64",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Uint64",name:"Uint64",pkg:"",typ:$funcType([],[$Uint64],false)},{prop:"Float",name:"Float",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Interface",name:"Interface",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"Unsafe",name:"Unsafe",pkg:"",typ:$funcType([],[$Uintptr],false)}];Q.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)},{prop:"Stack",name:"Stack",pkg:"",typ:$funcType([],[$String],false)}];A.init([{prop:"Bool",name:"Bool",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Call",name:"Call",pkg:"",typ:$funcType([$String,M],[A],true)},{prop:"Delete",name:"Delete",pkg:"",typ:$funcType([$String],[],false)},{prop:"Float",name:"Float",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Get",name:"Get",pkg:"",typ:$funcType([$String],[A],false)},{prop:"Index",name:"Index",pkg:"",typ:$funcType([$Int],[A],false)},{prop:"Int",name:"Int",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Int64",name:"Int64",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Interface",name:"Interface",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"Invoke",name:"Invoke",pkg:"",typ:$funcType([M],[A],true)},{prop:"Length",name:"Length",pkg:"",typ:$funcType([],[$Int],false)},{prop:"New",name:"New",pkg:"",typ:$funcType([M],[A],true)},{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String,$emptyInterface],[],false)},{prop:"SetIndex",name:"SetIndex",pkg:"",typ:$funcType([$Int,$emptyInterface],[],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Uint64",name:"Uint64",pkg:"",typ:$funcType([],[$Uint64],false)},{prop:"Unsafe",name:"Unsafe",pkg:"",typ:$funcType([],[$Uintptr],false)}]);B.init([{prop:"Object",name:"",pkg:"",typ:A,tag:""}]);C.init([{prop:"Object",name:"",pkg:"",typ:A,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_js=function(){while(true){switch($s){case 0:K();}return;}};$init_js.$blocking=true;return $init_js;};return $pkg;})(); +$packages["runtime"]=(function(){var $pkg={},A,C,X,Z,AO,AS,D;A=$packages["github.com/gopherjs/gopherjs/js"];C=$pkg.NotSupportedError=$newType(0,$kindStruct,"runtime.NotSupportedError","NotSupportedError","runtime",function(Feature_){this.$val=this;this.Feature=Feature_!==undefined?Feature_:"";});X=$pkg.TypeAssertionError=$newType(0,$kindStruct,"runtime.TypeAssertionError","TypeAssertionError","runtime",function(interfaceString_,concreteString_,assertedString_,missingMethod_){this.$val=this;this.interfaceString=interfaceString_!==undefined?interfaceString_:"";this.concreteString=concreteString_!==undefined?concreteString_:"";this.assertedString=assertedString_!==undefined?assertedString_:"";this.missingMethod=missingMethod_!==undefined?missingMethod_:"";});Z=$pkg.errorString=$newType(8,$kindString,"runtime.errorString","errorString","runtime",null);AO=$ptrType(C);AS=$ptrType(X);C.ptr.prototype.Error=function(){var a;a=this;return"not supported by GopherJS: "+a.Feature;};C.prototype.Error=function(){return this.$val.Error();};D=function(){var a;$js=$packages[$externalize("github.com/gopherjs/gopherjs/js",$String)];$throwRuntimeError=(function(a){var a;$panic(new Z(a));});a=$ifaceNil;a=new X.ptr("","","","");a=new C.ptr("");};X.ptr.prototype.RuntimeError=function(){};X.prototype.RuntimeError=function(){return this.$val.RuntimeError();};X.ptr.prototype.Error=function(){var a,b;a=this;b=a.interfaceString;if(b===""){b="interface";}if(a.concreteString===""){return"interface conversion: "+b+" is nil, not "+a.assertedString;}if(a.missingMethod===""){return"interface conversion: "+b+" is "+a.concreteString+", not "+a.assertedString;}return"interface conversion: "+a.concreteString+" is not "+a.assertedString+": missing method "+a.missingMethod;};X.prototype.Error=function(){return this.$val.Error();};Z.prototype.RuntimeError=function(){var a;a=this.$val;};$ptrType(Z).prototype.RuntimeError=function(){return new Z(this.$get()).RuntimeError();};Z.prototype.Error=function(){var a;a=this.$val;return"runtime error: "+a;};$ptrType(Z).prototype.Error=function(){return new Z(this.$get()).Error();};AO.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];AS.methods=[{prop:"RuntimeError",name:"RuntimeError",pkg:"",typ:$funcType([],[],false)},{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];Z.methods=[{prop:"RuntimeError",name:"RuntimeError",pkg:"",typ:$funcType([],[],false)},{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];C.init([{prop:"Feature",name:"Feature",pkg:"",typ:$String,tag:""}]);X.init([{prop:"interfaceString",name:"interfaceString",pkg:"runtime",typ:$String,tag:""},{prop:"concreteString",name:"concreteString",pkg:"runtime",typ:$String,tag:""},{prop:"assertedString",name:"assertedString",pkg:"runtime",typ:$String,tag:""},{prop:"missingMethod",name:"missingMethod",pkg:"runtime",typ:$String,tag:""}]);$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_runtime=function(){while(true){switch($s){case 0:$r=A.$init($BLOCKING);$s=1;case 1:if($r&&$r.$blocking){$r=$r();}D();}return;}};$init_runtime.$blocking=true;return $init_runtime;};return $pkg;})(); +$packages["main"]=(function(){var $pkg={},A;A=function(){console.log("Hello.");};$pkg.$init=function(){$pkg.$init=function(){};var $r,$s=0;var $init_main=function(){while(true){switch($s){case 0:A();}return;}};$init_main.$blocking=true;return $init_main;};return $pkg;})(); +$synthesizeMethods(); +$packages["runtime"].$init()(); +$go($packages["main"].$init, [], true); +$flushConsole(); + +}).call(this); +//# sourceMappingURL=simple_min.js.map diff --git a/104/build/simple_min.js.gz b/104/build/simple_min.js.gz new file mode 100644 index 0000000..e8b0b0c Binary files /dev/null and b/104/build/simple_min.js.gz differ diff --git a/104/fmt_simple.go b/104/fmt_simple.go new file mode 100644 index 0000000..f19b418 --- /dev/null +++ b/104/fmt_simple.go @@ -0,0 +1,9 @@ +// +build ignore + +package main + +import "fmt" + +func main() { + fmt.Println("Hello.") +} diff --git a/104/make.sh b/104/make.sh new file mode 100755 index 0000000..e262a05 --- /dev/null +++ b/104/make.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +mkdir ./build + +go version > ./build/go_version.txt +gostatus -v -debug github.com/gopherjs/gopherjs | awk -F '"' '{ print $16 }' > ./build/gopherjs_version.txt + +# Go. +go build -o ./build/simple simple.go +go build -o ./build/fmt_simple fmt_simple.go +go build -o ./build/peg_solitaire_solver peg_solitaire_solver.go +go build -o ./build/markdownfmt markdownfmt.go + +# GopherJS. +gopherjs build -o ./build/simple.js simple.go +gopherjs build -o ./build/fmt_simple.js fmt_simple.go +gopherjs build -o ./build/peg_solitaire_solver.js peg_solitaire_solver.go +gopherjs build -o ./build/markdownfmt.js markdownfmt.go + +# GopherJS, minify. +gopherjs build -m -o ./build/simple_min.js simple.go +gopherjs build -m -o ./build/fmt_simple_min.js fmt_simple.go +gopherjs build -m -o ./build/peg_solitaire_solver_min.js peg_solitaire_solver.go +gopherjs build -m -o ./build/markdownfmt_min.js markdownfmt.go + +# GopherJS, gzip. +gzip -9 -k -f ./build/simple.js +gzip -9 -k -f ./build/fmt_simple.js +gzip -9 -k -f ./build/peg_solitaire_solver.js +gzip -9 -k -f ./build/markdownfmt.js + +# GopherJS, minify, gzip. +gzip -9 -k -f ./build/simple_min.js +gzip -9 -k -f ./build/fmt_simple_min.js +gzip -9 -k -f ./build/peg_solitaire_solver_min.js +gzip -9 -k -f ./build/markdownfmt_min.js + +rm ./build/*.map diff --git a/104/markdownfmt.go b/104/markdownfmt.go new file mode 100644 index 0000000..35f8b75 --- /dev/null +++ b/104/markdownfmt.go @@ -0,0 +1,48 @@ +// +build ignore + +package main + +import ( + "fmt" + + "github.com/shurcooL/markdownfmt/markdown" +) + +func main() { + input := []byte(`Title += + +This is a new paragraph. I wonder if I have too many spaces. +What about new paragraph. +But the next one... + + Is really new. + +1. Item one. +1. Item TWO. + + +Final paragraph. +`) + + output, err := markdown.Process("", input, nil) + if err != nil { + panic(err) + } + + fmt.Println(string(output)) + + // Output: + // Title + // ===== + // + // This is a new paragraph. I wonder if I have too many spaces. What about new paragraph. But the next one... + // + // Is really new. + // + // 1. Item one. + // 2. Item TWO. + // + // Final paragraph. + // +} diff --git a/104/peg_solitaire_solver.go b/104/peg_solitaire_solver.go new file mode 100644 index 0000000..5dfe3d1 --- /dev/null +++ b/104/peg_solitaire_solver.go @@ -0,0 +1,119 @@ +// +build ignore + +// This program solves the (English) peg +// solitaire board game. +// http://en.wikipedia.org/wiki/Peg_solitaire + +package main + +import "fmt" + +const N = 11 + 1 // length of a row (+1 for \n) + +// The board must be surrounded by 2 illegal +// fields in each direction so that move() +// doesn't need to check the board boundaries. +// Periods represent illegal fields, +// ● are pegs, and ○ are holes. + +var board = []rune( + `........... +........... +....●●●.... +....●●●.... +..●●●●●●●.. +..●●●○●●●.. +..●●●●●●●.. +....●●●.... +....●●●.... +........... +........... +`) + +// center is the position of the center hole if +// there is a single one; otherwise it is -1. +var center int + +func init() { + n := 0 + for pos, field := range board { + if field == '○' { + center = pos + n++ + } + } + if n != 1 { + center = -1 // no single hole + } +} + +var moves int // number of times move is called + +// move tests if there is a peg at position pos that +// can jump over another peg in direction dir. If the +// move is valid, it is executed and move returns true. +// Otherwise, move returns false. +func move(pos, dir int) bool { + moves++ + if board[pos] == '●' && board[pos+dir] == '●' && board[pos+2*dir] == '○' { + board[pos] = '○' + board[pos+dir] = '○' + board[pos+2*dir] = '●' + return true + } + return false +} + +// unmove reverts a previously executed valid move. +func unmove(pos, dir int) { + board[pos] = '●' + board[pos+dir] = '●' + board[pos+2*dir] = '○' +} + +// solve tries to find a sequence of moves such that +// there is only one peg left at the end; if center is +// >= 0, that last peg must be in the center position. +// If a solution is found, solve prints the board after +// each move in a backward fashion (i.e., the last +// board position is printed first, all the way back to +// the starting board position). +func solve() bool { + var last, n int + for pos, field := range board { + // try each board position + if field == '●' { + // found a peg + for _, dir := range [...]int{-1, -N, +1, +N} { + // try each direction + if move(pos, dir) { + // a valid move was found and executed, + // see if this new board has a solution + if solve() { + unmove(pos, dir) + fmt.Println(string(board)) + return true + } + unmove(pos, dir) + } + } + last = pos + n++ + } + } + // tried each possible move + if n == 1 && (center < 0 || last == center) { + // there's only one peg left + fmt.Println(string(board)) + return true + } + // no solution found for this board + return false +} + +func main() { + if !solve() { + fmt.Println("no solution found") + } + fmt.Println(moves, "moves tried") +} diff --git a/104/simple.go b/104/simple.go new file mode 100644 index 0000000..7f9823b --- /dev/null +++ b/104/simple.go @@ -0,0 +1,7 @@ +// +build ignore + +package main + +func main() { + println("Hello.") +}