if (!this.JSON) this.JSON = {}; (function() { var n = "number", m = "object", l = "string", k = "function"; "use strict"; function f(a) { return a < 10 ? "0" + a : a } if (typeof Date.prototype.toJSON !== k) { Date.prototype.toJSON = function() { var a = this; return isFinite(a.valueOf()) ? a.getUTCFullYear() + "-" + f(a.getUTCMonth() + 1) + "-" + f(a.getUTCDate()) + "T" + f(a.getUTCHours()) + ":" + f(a.getUTCMinutes()) + ":" + f(a.getUTCSeconds()) + "Z" : null }; String.prototype.toJSON = Number.prototype.toJSON = Boolean.prototype.toJSON = function() { return this.valueOf() } } var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, gap, indent, meta = { "\b": "\\b", "\t": "\\t", "\n": "\\n", "\f": "\\f", "\r": "\\r", '"': '\\"', "\\": "\\\\" }, rep; function quote(a) { escapable.lastIndex = 0; return escapable.test(a) ? '"' + a.replace(escapable, function(a) { var b = meta[a]; return typeof b === l ? b : "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4) }) + '"' : '"' + a + '"' } function str(i, j) { var e = "null", d, f, c, g, h = gap, b, a = j[i]; if (a && typeof a === m && typeof a.toJSON === k) a = a.toJSON(i); if (typeof rep === k) a = rep.call(j, i, a); switch (typeof a) { case l: return quote(a); case n: return isFinite(a) ? String(a) : e; case "boolean": case e: return String(a); case m: if (!a) return e; gap += indent; b = []; if (Object.prototype.toString.apply(a) === "[object Array]") { g = a.length; for (d = 0; d < g; d += 1) b[d] = str(d, a) || e; c = b.length === 0 ? "[]" : gap ? "[\n" + gap + b.join(",\n" + gap) + "\n" + h + "]" : "[" + b.join(",") + "]"; gap = h; return c } if (rep && typeof rep === m) { g = rep.length; for (d = 0; d < g; d += 1) { f = rep[d]; if (typeof f === l) { c = str(f, a); c && b.push(quote(f) + (gap ? ": " : ":") + c) } } } else for (f in a) if (Object.hasOwnProperty.call(a, f)) { c = str(f, a); c && b.push(quote(f) + (gap ? ": " : ":") + c) } c = b.length === 0 ? "{}" : gap ? "{\n" + gap + b.join(",\n" + gap) + "\n" + h + "}" : "{" + b.join(",") + "}"; gap = h; return c } } if (typeof JSON.stringify !== k) JSON.stringify = function(d, a, b) { var c; gap = ""; indent = ""; if (typeof b === n) for (c = 0; c < b; c += 1) indent += " "; else if (typeof b === l) indent = b; rep = a; if (a && typeof a !== k && (typeof a !== m || typeof a.length !== n)) throw new Error("JSON.stringify"); return str("", { "": d }) }; if (typeof JSON.parse !== k) JSON.parse = function(text, reviver) { var j; function walk(d, e) { var b, c, a = d[e]; if (a && typeof a === m) for (b in a) if (Object.hasOwnProperty.call(a, b)) { c = walk(a, b); if (c !== undefined) a[b] = c; else delete a[b] } return reviver.call(d, e, a) } text = String(text); cx.lastIndex = 0; if (cx.test(text)) text = text.replace(cx, function(a) { return "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4) }); if (/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) { j = eval("(" + text + ")"); return typeof reviver === k ? walk({ "": j }, "") : j } throw new SyntaxError("JSON.parse"); } })();
