Added stacktrace to asyncRunner errors

This commit is contained in:
benweet 2013-06-12 23:54:30 +01:00
parent ffdcf07c0f
commit 8e2b00bbf6
4 changed files with 694 additions and 81 deletions

View File

@ -6,7 +6,8 @@ define([
"underscore", "underscore",
"core", "core",
"utils", "utils",
"extensionMgr" "extensionMgr",
"libs/stacktrace",
], function(_, core, utils, extensionMgr) { ], function(_, core, utils, extensionMgr) {
var asyncRunner = {}; var asyncRunner = {};
@ -22,6 +23,7 @@ define([
task.finished = false; task.finished = false;
task.timeout = ASYNC_TASK_DEFAULT_TIMEOUT; task.timeout = ASYNC_TASK_DEFAULT_TIMEOUT;
task.retryCounter = 0; task.retryCounter = 0;
task.callPath = [];
/** /**
* onRun callbacks are called by chain(). These callbacks have to call * onRun callbacks are called by chain(). These callbacks have to call
* chain() themselves to chain with next onRun callback or error() to * chain() themselves to chain with next onRun callback or error() to
@ -54,6 +56,7 @@ define([
* onRun callback during execution. * onRun callback during execution.
*/ */
task.chain = function(callback) { task.chain = function(callback) {
task.callPath.unshift(printStackTrace()[5]);
if(task.finished === true) { if(task.finished === true) {
return; return;
} }
@ -82,10 +85,11 @@ define([
* ends the task by throwing an exception. * ends the task by throwing an exception.
*/ */
task.error = function(error) { task.error = function(error) {
task.callPath.unshift(printStackTrace()[5]);
if(task.finished === true) { if(task.finished === true) {
return; return;
} }
error = error || new Error("Unknown error"); error = error || new Error("Unknown error|\n" + task.callPath.join("\n"));
if(error.message) { if(error.message) {
extensionMgr.onError(error); extensionMgr.onError(error);
} }
@ -110,6 +114,7 @@ define([
var delay = Math.pow(2, task.retryCounter++) * 1000; var delay = Math.pow(2, task.retryCounter++) * 1000;
currentTaskStartTime = utils.currentTime + delay; currentTaskStartTime = utils.currentTime + delay;
currentTaskRunning = false; currentTaskRunning = false;
task.callPath = [];
asyncRunner.runTask(); asyncRunner.runTask();
}; };
return task; return task;
@ -124,7 +129,7 @@ define([
if(currentTaskRunning === true) { if(currentTaskRunning === true) {
// If the current task takes too long // If the current task takes too long
if(currentTaskStartTime + currentTask.timeout < utils.currentTime) { if(currentTaskStartTime + currentTask.timeout < utils.currentTime) {
currentTask.error(new Error("A timeout occurred.")); currentTask.error(new Error("A timeout occurred.|\n" + currentTask.callPath.join("\n")));
} }
return; return;
} }

View File

@ -26,6 +26,7 @@ define([
"Pagedown-extra": "https://github.com/jmcmanus/pagedown-extra/", "Pagedown-extra": "https://github.com/jmcmanus/pagedown-extra/",
"Prettify": "https://code.google.com/p/google-code-prettify/", "Prettify": "https://code.google.com/p/google-code-prettify/",
"RequireJS": "http://requirejs.org/", "RequireJS": "http://requirejs.org/",
"stacktrace.js": "http://stacktracejs.com/",
"UI Layout": "http://layout.jquery-dev.net/", "UI Layout": "http://layout.jquery-dev.net/",
"Underscore.js": "http://underscorejs.org/", "Underscore.js": "http://underscorejs.org/",
"waitForImages": "https://github.com/alexanderdickson/waitForImages" "waitForImages": "https://github.com/alexanderdickson/waitForImages"

446
js/libs/stacktrace.js Normal file
View File

@ -0,0 +1,446 @@
// Domain Public by Eric Wendelin http://eriwen.com/ (2008)
// Luke Smith http://lucassmith.name/ (2008)
// Loic Dachary <loic@dachary.org> (2008)
// Johan Euphrosine <proppy@aminche.com> (2008)
// Oyvind Sean Kinsey http://kinsey.no/blog (2010)
// Victor Homyakov <victor-homyakov@users.sourceforge.net> (2010)
/**
* Main function giving a function stack trace with a forced or passed in Error
*
* @cfg {Error} e The error to create a stacktrace from (optional)
* @cfg {Boolean} guess If we should try to resolve the names of anonymous functions
* @return {Array} of Strings with functions, lines, files, and arguments where possible
*/
function printStackTrace(options) {
options = options || {guess: true};
var ex = options.e || null, guess = !!options.guess;
var p = new printStackTrace.implementation(), result = p.run(ex);
return (guess) ? p.guessAnonymousFunctions(result) : result;
}
if (typeof module !== "undefined" && module.exports) {
module.exports = printStackTrace;
}
printStackTrace.implementation = function() {
};
printStackTrace.implementation.prototype = {
/**
* @param {Error} ex The error to create a stacktrace from (optional)
* @param {String} mode Forced mode (optional, mostly for unit tests)
*/
run: function(ex, mode) {
ex = ex || this.createException();
// examine exception properties w/o debugger
//for (var prop in ex) {alert("Ex['" + prop + "']=" + ex[prop]);}
mode = mode || this.mode(ex);
if (mode === 'other') {
return this.other(arguments.callee);
} else {
return this[mode](ex);
}
},
createException: function() {
try {
this.undef();
} catch (e) {
return e;
}
},
/**
* Mode could differ for different exception, e.g.
* exceptions in Chrome may or may not have arguments or stack.
*
* @return {String} mode of operation for the exception
*/
mode: function(e) {
if (e['arguments'] && e.stack) {
return 'chrome';
} else if (e.stack && e.sourceURL) {
return 'safari';
} else if (e.stack && e.number) {
return 'ie';
} else if (typeof e.message === 'string' && typeof window !== 'undefined' && window.opera) {
// e.message.indexOf("Backtrace:") > -1 -> opera
// !e.stacktrace -> opera
if (!e.stacktrace) {
return 'opera9'; // use e.message
}
// 'opera#sourceloc' in e -> opera9, opera10a
if (e.message.indexOf('\n') > -1 && e.message.split('\n').length > e.stacktrace.split('\n').length) {
return 'opera9'; // use e.message
}
// e.stacktrace && !e.stack -> opera10a
if (!e.stack) {
return 'opera10a'; // use e.stacktrace
}
// e.stacktrace && e.stack -> opera10b
if (e.stacktrace.indexOf("called from line") < 0) {
return 'opera10b'; // use e.stacktrace, format differs from 'opera10a'
}
// e.stacktrace && e.stack -> opera11
return 'opera11'; // use e.stacktrace, format differs from 'opera10a', 'opera10b'
} else if (e.stack) {
return 'firefox';
}
return 'other';
},
/**
* Given a context, function name, and callback function, overwrite it so that it calls
* printStackTrace() first with a callback and then runs the rest of the body.
*
* @param {Object} context of execution (e.g. window)
* @param {String} functionName to instrument
* @param {Function} function to call with a stack trace on invocation
*/
instrumentFunction: function(context, functionName, callback) {
context = context || window;
var original = context[functionName];
context[functionName] = function instrumented() {
callback.call(this, printStackTrace().slice(4));
return context[functionName]._instrumented.apply(this, arguments);
};
context[functionName]._instrumented = original;
},
/**
* Given a context and function name of a function that has been
* instrumented, revert the function to it's original (non-instrumented)
* state.
*
* @param {Object} context of execution (e.g. window)
* @param {String} functionName to de-instrument
*/
deinstrumentFunction: function(context, functionName) {
if (context[functionName].constructor === Function &&
context[functionName]._instrumented &&
context[functionName]._instrumented.constructor === Function) {
context[functionName] = context[functionName]._instrumented;
}
},
/**
* Given an Error object, return a formatted Array based on Chrome's stack string.
*
* @param e - Error object to inspect
* @return Array<String> of function calls, files and line numbers
*/
chrome: function(e) {
var stack = (e.stack + '\n').replace(/^\S[^\(]+?[\n$]/gm, '').
replace(/^\s+(at eval )?at\s+/gm, '').
replace(/^([^\(]+?)([\n$])/gm, '{anonymous}()@$1$2').
replace(/^Object.<anonymous>\s*\(([^\)]+)\)/gm, '{anonymous}()@$1').split('\n');
stack.pop();
return stack;
},
/**
* Given an Error object, return a formatted Array based on Safari's stack string.
*
* @param e - Error object to inspect
* @return Array<String> of function calls, files and line numbers
*/
safari: function(e) {
return e.stack.replace(/\[native code\]\n/m, '')
.replace(/^(?=\w+Error\:).*$\n/m, '')
.replace(/^@/gm, '{anonymous}()@')
.split('\n');
},
/**
* Given an Error object, return a formatted Array based on IE's stack string.
*
* @param e - Error object to inspect
* @return Array<String> of function calls, files and line numbers
*/
ie: function(e) {
var lineRE = /^.*at (\w+) \(([^\)]+)\)$/gm;
return e.stack.replace(/at Anonymous function /gm, '{anonymous}()@')
.replace(/^(?=\w+Error\:).*$\n/m, '')
.replace(lineRE, '$1@$2')
.split('\n');
},
/**
* Given an Error object, return a formatted Array based on Firefox's stack string.
*
* @param e - Error object to inspect
* @return Array<String> of function calls, files and line numbers
*/
firefox: function(e) {
return e.stack.replace(/(?:\n@:0)?\s+$/m, '').replace(/^[\(@]/gm, '{anonymous}()@').split('\n');
},
opera11: function(e) {
var ANON = '{anonymous}', lineRE = /^.*line (\d+), column (\d+)(?: in (.+))? in (\S+):$/;
var lines = e.stacktrace.split('\n'), result = [];
for (var i = 0, len = lines.length; i < len; i += 2) {
var match = lineRE.exec(lines[i]);
if (match) {
var location = match[4] + ':' + match[1] + ':' + match[2];
var fnName = match[3] || "global code";
fnName = fnName.replace(/<anonymous function: (\S+)>/, "$1").replace(/<anonymous function>/, ANON);
result.push(fnName + '@' + location + ' -- ' + lines[i + 1].replace(/^\s+/, ''));
}
}
return result;
},
opera10b: function(e) {
// "<anonymous function: run>([arguments not available])@file://localhost/G:/js/stacktrace.js:27\n" +
// "printStackTrace([arguments not available])@file://localhost/G:/js/stacktrace.js:18\n" +
// "@file://localhost/G:/js/test/functional/testcase1.html:15"
var lineRE = /^(.*)@(.+):(\d+)$/;
var lines = e.stacktrace.split('\n'), result = [];
for (var i = 0, len = lines.length; i < len; i++) {
var match = lineRE.exec(lines[i]);
if (match) {
var fnName = match[1]? (match[1] + '()') : "global code";
result.push(fnName + '@' + match[2] + ':' + match[3]);
}
}
return result;
},
/**
* Given an Error object, return a formatted Array based on Opera 10's stacktrace string.
*
* @param e - Error object to inspect
* @return Array<String> of function calls, files and line numbers
*/
opera10a: function(e) {
// " Line 27 of linked script file://localhost/G:/js/stacktrace.js\n"
// " Line 11 of inline#1 script in file://localhost/G:/js/test/functional/testcase1.html: In function foo\n"
var ANON = '{anonymous}', lineRE = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i;
var lines = e.stacktrace.split('\n'), result = [];
for (var i = 0, len = lines.length; i < len; i += 2) {
var match = lineRE.exec(lines[i]);
if (match) {
var fnName = match[3] || ANON;
result.push(fnName + '()@' + match[2] + ':' + match[1] + ' -- ' + lines[i + 1].replace(/^\s+/, ''));
}
}
return result;
},
// Opera 7.x-9.2x only!
opera9: function(e) {
// " Line 43 of linked script file://localhost/G:/js/stacktrace.js\n"
// " Line 7 of inline#1 script in file://localhost/G:/js/test/functional/testcase1.html\n"
var ANON = '{anonymous}', lineRE = /Line (\d+).*script (?:in )?(\S+)/i;
var lines = e.message.split('\n'), result = [];
for (var i = 2, len = lines.length; i < len; i += 2) {
var match = lineRE.exec(lines[i]);
if (match) {
result.push(ANON + '()@' + match[2] + ':' + match[1] + ' -- ' + lines[i + 1].replace(/^\s+/, ''));
}
}
return result;
},
// Safari 5-, IE 9-, and others
other: function(curr) {
var ANON = '{anonymous}', fnRE = /function\s*([\w\-$]+)?\s*\(/i, stack = [], fn, args, maxStackSize = 10;
while (curr && curr['arguments'] && stack.length < maxStackSize) {
fn = fnRE.test(curr.toString()) ? RegExp.$1 || ANON : ANON;
args = Array.prototype.slice.call(curr['arguments'] || []);
stack[stack.length] = fn + '(' + this.stringifyArguments(args) + ')';
curr = curr.caller;
}
return stack;
},
/**
* Given arguments array as a String, subsituting type names for non-string types.
*
* @param {Arguments} args
* @return {Array} of Strings with stringified arguments
*/
stringifyArguments: function(args) {
var result = [];
var slice = Array.prototype.slice;
for (var i = 0; i < args.length; ++i) {
var arg = args[i];
if (arg === undefined) {
result[i] = 'undefined';
} else if (arg === null) {
result[i] = 'null';
} else if (arg.constructor) {
if (arg.constructor === Array) {
if (arg.length < 3) {
result[i] = '[' + this.stringifyArguments(arg) + ']';
} else {
result[i] = '[' + this.stringifyArguments(slice.call(arg, 0, 1)) + '...' + this.stringifyArguments(slice.call(arg, -1)) + ']';
}
} else if (arg.constructor === Object) {
result[i] = '#object';
} else if (arg.constructor === Function) {
result[i] = '#function';
} else if (arg.constructor === String) {
result[i] = '"' + arg + '"';
} else if (arg.constructor === Number) {
result[i] = arg;
}
}
}
return result.join(',');
},
sourceCache: {},
/**
* @return the text from a given URL
*/
ajax: function(url) {
var req = this.createXMLHTTPObject();
if (req) {
try {
req.open('GET', url, false);
//req.overrideMimeType('text/plain');
//req.overrideMimeType('text/javascript');
req.send(null);
//return req.status == 200 ? req.responseText : '';
return req.responseText;
} catch (e) {
}
}
return '';
},
/**
* Try XHR methods in order and store XHR factory.
*
* @return <Function> XHR function or equivalent
*/
createXMLHTTPObject: function() {
var xmlhttp, XMLHttpFactories = [
function() {
return new XMLHttpRequest();
}, function() {
return new ActiveXObject('Msxml2.XMLHTTP');
}, function() {
return new ActiveXObject('Msxml3.XMLHTTP');
}, function() {
return new ActiveXObject('Microsoft.XMLHTTP');
}
];
for (var i = 0; i < XMLHttpFactories.length; i++) {
try {
xmlhttp = XMLHttpFactories[i]();
// Use memoization to cache the factory
this.createXMLHTTPObject = XMLHttpFactories[i];
return xmlhttp;
} catch (e) {
}
}
},
/**
* Given a URL, check if it is in the same domain (so we can get the source
* via Ajax).
*
* @param url <String> source url
* @return False if we need a cross-domain request
*/
isSameDomain: function(url) {
return typeof location !== "undefined" && url.indexOf(location.hostname) !== -1; // location may not be defined, e.g. when running from nodejs.
},
/**
* Get source code from given URL if in the same domain.
*
* @param url <String> JS source URL
* @return <Array> Array of source code lines
*/
getSource: function(url) {
// TODO reuse source from script tags?
if (!(url in this.sourceCache)) {
this.sourceCache[url] = this.ajax(url).split('\n');
}
return this.sourceCache[url];
},
guessAnonymousFunctions: function(stack) {
for (var i = 0; i < stack.length; ++i) {
var reStack = /\{anonymous\}\(.*\)@(.*)/,
reRef = /^(.*?)(?::(\d+))(?::(\d+))?(?: -- .+)?$/,
frame = stack[i], ref = reStack.exec(frame);
if (ref) {
var m = reRef.exec(ref[1]);
if (m) { // If falsey, we did not get any file/line information
var file = m[1], lineno = m[2], charno = m[3] || 0;
if (file && this.isSameDomain(file) && lineno) {
var functionName = this.guessAnonymousFunction(file, lineno, charno);
stack[i] = frame.replace('{anonymous}', functionName);
}
}
}
}
return stack;
},
guessAnonymousFunction: function(url, lineNo, charNo) {
var ret;
try {
ret = this.findFunctionName(this.getSource(url), lineNo);
} catch (e) {
ret = 'getSource failed with url: ' + url + ', exception: ' + e.toString();
}
return ret;
},
findFunctionName: function(source, lineNo) {
// FIXME findFunctionName fails for compressed source
// (more than one function on the same line)
// function {name}({args}) m[1]=name m[2]=args
var reFunctionDeclaration = /function\s+([^(]*?)\s*\(([^)]*)\)/;
// {name} = function ({args}) TODO args capture
// /['"]?([0-9A-Za-z_]+)['"]?\s*[:=]\s*function(?:[^(]*)/
var reFunctionExpression = /['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*function\b/;
// {name} = eval()
var reFunctionEvaluation = /['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*(?:eval|new Function)\b/;
// Walk backwards in the source lines until we find
// the line which matches one of the patterns above
var code = "", line, maxLines = Math.min(lineNo, 20), m, commentPos;
for (var i = 0; i < maxLines; ++i) {
// lineNo is 1-based, source[] is 0-based
line = source[lineNo - i - 1];
commentPos = line.indexOf('//');
if (commentPos >= 0) {
line = line.substr(0, commentPos);
}
// TODO check other types of comments? Commented code may lead to false positive
if (line) {
code = line + code;
m = reFunctionExpression.exec(code);
if (m && m[1]) {
return m[1];
}
m = reFunctionDeclaration.exec(code);
if (m && m[1]) {
//return m[1] + "(" + (m[2] || "") + ")";
return m[1];
}
m = reFunctionEvaluation.exec(code);
if (m && m[1]) {
return m[1];
}
}
}
return '(?)';
}
};

317
js/main-min.js vendored
View File

@ -582,6 +582,14 @@ function css_browser_selector(e) {
x; x;
} }
function printStackTrace(e) {
e = e || {
guess: !0
};
var t = e.e || null, n = !!e.guess, i = new printStackTrace.implementation(), o = i.run(t);
return n ? i.guessAnonymousFunctions(o) : o;
}
(function(e, t) { (function(e, t) {
function n(e) { function n(e) {
var t = e.length, n = lt.type(e); var t = e.length, n = lt.type(e);
@ -705,7 +713,7 @@ function css_browser_selector(e) {
} }
} }
function b(e, n) { function b(e, n) {
var i, o, r = 0, s = typeof e.getElementsByTagName !== V ? e.getElementsByTagName(n || "*") : typeof e.querySelectorAll !== V ? e.querySelectorAll(n || "*") : t; var i, o, r = 0, s = typeof e.getElementsByTagName !== X ? e.getElementsByTagName(n || "*") : typeof e.querySelectorAll !== X ? e.querySelectorAll(n || "*") : t;
if (!s) for (s = [], i = e.childNodes || e; null != (o = i[r]); r++) !n || lt.nodeName(o, n) ? s.push(o) : lt.merge(s, b(o, n)); if (!s) for (s = [], i = e.childNodes || e; null != (o = i[r]); r++) !n || lt.nodeName(o, n) ? s.push(o) : lt.merge(s, b(o, n));
return n === t || n && lt.nodeName(e, n) ? lt.merge([ e ], s) : s; return n === t || n && lt.nodeName(e, n) ? lt.merge([ e ], s) : s;
} }
@ -747,7 +755,7 @@ function css_browser_selector(e) {
return o + T(e, t, n || (s ? "border" : "content"), i, r) + "px"; return o + T(e, t, n || (s ? "border" : "content"), i, r) + "px";
} }
function E(e) { function E(e) {
var t = X, n = xn[e]; var t = V, n = xn[e];
return n || (n = P(e, t), "none" !== n && n || (un = (un || lt("<iframe frameborder='0' width='0' height='0'/>").css("cssText", "display:block !important")).appendTo(t.documentElement), return n || (n = P(e, t), "none" !== n && n || (un = (un || lt("<iframe frameborder='0' width='0' height='0'/>").css("cssText", "display:block !important")).appendTo(t.documentElement),
t = (un[0].contentWindow || un[0].contentDocument).document, t.write("<!doctype html><html><body>"), t = (un[0].contentWindow || un[0].contentDocument).document, t.write("<!doctype html><html><body>"),
t.close(), n = P(e, t), un.detach()), xn[e] = n), n; t.close(), n = P(e, t), un.detach()), xn[e] = n), n;
@ -941,15 +949,15 @@ function css_browser_selector(e) {
function q(e) { function q(e) {
return lt.isWindow(e) ? e : 9 === e.nodeType ? e.defaultView || e.parentWindow : !1; return lt.isWindow(e) ? e : 9 === e.nodeType ? e.defaultView || e.parentWindow : !1;
} }
var G, U, V = typeof t, X = e.document, Y = e.location, K = e.jQuery, J = e.$, Q = {}, Z = [], et = "1.9.1", tt = Z.concat, nt = Z.push, it = Z.slice, ot = Z.indexOf, rt = Q.toString, st = Q.hasOwnProperty, at = et.trim, lt = function(e, t) { var G, U, X = typeof t, V = e.document, Y = e.location, K = e.jQuery, J = e.$, Q = {}, Z = [], et = "1.9.1", tt = Z.concat, nt = Z.push, it = Z.slice, ot = Z.indexOf, rt = Q.toString, st = Q.hasOwnProperty, at = et.trim, lt = function(e, t) {
return new lt.fn.init(e, t, U); return new lt.fn.init(e, t, U);
}, ct = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, ut = /\S+/g, dt = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, pt = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/, ft = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, ht = /^[\],:{}\s]*$/, gt = /(?:^|:|,)(?:\s*\[)+/g, mt = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, vt = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, yt = /^-ms-/, bt = /-([\da-z])/gi, wt = function(e, t) { }, ct = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, ut = /\S+/g, dt = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, pt = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/, ft = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, ht = /^[\],:{}\s]*$/, gt = /(?:^|:|,)(?:\s*\[)+/g, mt = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, vt = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, yt = /^-ms-/, bt = /-([\da-z])/gi, wt = function(e, t) {
return t.toUpperCase(); return t.toUpperCase();
}, xt = function(e) { }, xt = function(e) {
(X.addEventListener || "load" === e.type || "complete" === X.readyState) && (Ct(), (V.addEventListener || "load" === e.type || "complete" === V.readyState) && (Ct(),
lt.ready()); lt.ready());
}, Ct = function() { }, Ct = function() {
X.addEventListener ? (X.removeEventListener("DOMContentLoaded", xt, !1), e.removeEventListener("load", xt, !1)) : (X.detachEvent("onreadystatechange", xt), V.addEventListener ? (V.removeEventListener("DOMContentLoaded", xt, !1), e.removeEventListener("load", xt, !1)) : (V.detachEvent("onreadystatechange", xt),
e.detachEvent("onload", xt)); e.detachEvent("onload", xt));
}; };
lt.fn = lt.prototype = { lt.fn = lt.prototype = {
@ -962,15 +970,15 @@ function css_browser_selector(e) {
if (o = "<" === e.charAt(0) && ">" === e.charAt(e.length - 1) && e.length >= 3 ? [ null, e, null ] : pt.exec(e), if (o = "<" === e.charAt(0) && ">" === e.charAt(e.length - 1) && e.length >= 3 ? [ null, e, null ] : pt.exec(e),
!o || !o[1] && n) return !n || n.jquery ? (n || i).find(e) : this.constructor(n).find(e); !o || !o[1] && n) return !n || n.jquery ? (n || i).find(e) : this.constructor(n).find(e);
if (o[1]) { if (o[1]) {
if (n = n instanceof lt ? n[0] : n, lt.merge(this, lt.parseHTML(o[1], n && n.nodeType ? n.ownerDocument || n : X, !0)), if (n = n instanceof lt ? n[0] : n, lt.merge(this, lt.parseHTML(o[1], n && n.nodeType ? n.ownerDocument || n : V, !0)),
ft.test(o[1]) && lt.isPlainObject(n)) for (o in n) lt.isFunction(this[o]) ? this[o](n[o]) : this.attr(o, n[o]); ft.test(o[1]) && lt.isPlainObject(n)) for (o in n) lt.isFunction(this[o]) ? this[o](n[o]) : this.attr(o, n[o]);
return this; return this;
} }
if (r = X.getElementById(o[2]), r && r.parentNode) { if (r = V.getElementById(o[2]), r && r.parentNode) {
if (r.id !== o[2]) return i.find(e); if (r.id !== o[2]) return i.find(e);
this.length = 1, this[0] = r; this.length = 1, this[0] = r;
} }
return this.context = X, this.selector = e, this; return this.context = V, this.selector = e, this;
} }
return e.nodeType ? (this.context = this[0] = e, this.length = 1, this) : lt.isFunction(e) ? i.ready(e) : (e.selector !== t && (this.selector = e.selector, return e.nodeType ? (this.context = this[0] = e, this.length = 1, this) : lt.isFunction(e) ? i.ready(e) : (e.selector !== t && (this.selector = e.selector,
this.context = e.context), lt.makeArray(e, this)); this.context = e.context), lt.makeArray(e, this));
@ -1038,8 +1046,8 @@ function css_browser_selector(e) {
}, },
ready: function(e) { ready: function(e) {
if (e === !0 ? !--lt.readyWait : !lt.isReady) { if (e === !0 ? !--lt.readyWait : !lt.isReady) {
if (!X.body) return setTimeout(lt.ready); if (!V.body) return setTimeout(lt.ready);
lt.isReady = !0, e !== !0 && --lt.readyWait > 0 || (G.resolveWith(X, [ lt ]), lt.fn.trigger && lt(X).trigger("ready").off("ready")); lt.isReady = !0, e !== !0 && --lt.readyWait > 0 || (G.resolveWith(V, [ lt ]), lt.fn.trigger && lt(V).trigger("ready").off("ready"));
} }
}, },
isFunction: function(e) { isFunction: function(e) {
@ -1078,7 +1086,7 @@ function css_browser_selector(e) {
}, },
parseHTML: function(e, t, n) { parseHTML: function(e, t, n) {
if (!e || "string" != typeof e) return null; if (!e || "string" != typeof e) return null;
"boolean" == typeof t && (n = t, t = !1), t = t || X; "boolean" == typeof t && (n = t, t = !1), t = t || V;
var i = ft.exec(e), o = !n && []; var i = ft.exec(e), o = !n && [];
return i ? [ t.createElement(i[1]) ] : (i = lt.buildFragment([ e ], t, o), o && lt(o).remove(), return i ? [ t.createElement(i[1]) ] : (i = lt.buildFragment([ e ], t, o), o && lt(o).remove(),
lt.merge([], i.childNodes)); lt.merge([], i.childNodes));
@ -1178,12 +1186,12 @@ function css_browser_selector(e) {
return new Date().getTime(); return new Date().getTime();
} }
}), lt.ready.promise = function(t) { }), lt.ready.promise = function(t) {
if (!G) if (G = lt.Deferred(), "complete" === X.readyState) setTimeout(lt.ready); else if (X.addEventListener) X.addEventListener("DOMContentLoaded", xt, !1), if (!G) if (G = lt.Deferred(), "complete" === V.readyState) setTimeout(lt.ready); else if (V.addEventListener) V.addEventListener("DOMContentLoaded", xt, !1),
e.addEventListener("load", xt, !1); else { e.addEventListener("load", xt, !1); else {
X.attachEvent("onreadystatechange", xt), e.attachEvent("onload", xt); V.attachEvent("onreadystatechange", xt), e.attachEvent("onload", xt);
var n = !1; var n = !1;
try { try {
n = null == e.frameElement && X.documentElement; n = null == e.frameElement && V.documentElement;
} catch (i) {} } catch (i) {}
n && n.doScroll && function o() { n && n.doScroll && function o() {
if (!lt.isReady) { if (!lt.isReady) {
@ -1199,7 +1207,7 @@ function css_browser_selector(e) {
return G.promise(t); return G.promise(t);
}, lt.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(e, t) { }, lt.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(e, t) {
Q["[object " + t + "]"] = t.toLowerCase(); Q["[object " + t + "]"] = t.toLowerCase();
}), U = lt(X); }), U = lt(V);
var kt = {}; var kt = {};
lt.Callbacks = function(e) { lt.Callbacks = function(e) {
e = "string" == typeof e ? kt[e] || i(e) : lt.extend({}, e); e = "string" == typeof e ? kt[e] || i(e) : lt.extend({}, e);
@ -1302,10 +1310,10 @@ function css_browser_selector(e) {
return a || l.resolveWith(i, r), l.promise(); return a || l.resolveWith(i, r), l.promise();
} }
}), lt.support = function() { }), lt.support = function() {
var t, n, i, o, r, s, a, l, c, u, d = X.createElement("div"); var t, n, i, o, r, s, a, l, c, u, d = V.createElement("div");
if (d.setAttribute("className", "t"), d.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>", if (d.setAttribute("className", "t"), d.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",
n = d.getElementsByTagName("*"), i = d.getElementsByTagName("a")[0], !n || !i || !n.length) return {}; n = d.getElementsByTagName("*"), i = d.getElementsByTagName("a")[0], !n || !i || !n.length) return {};
r = X.createElement("select"), a = r.appendChild(X.createElement("option")), o = d.getElementsByTagName("input")[0], r = V.createElement("select"), a = r.appendChild(V.createElement("option")), o = d.getElementsByTagName("input")[0],
i.style.cssText = "top:1px;float:left;opacity:.5", t = { i.style.cssText = "top:1px;float:left;opacity:.5", t = {
getSetAttribute: "t" !== d.className, getSetAttribute: "t" !== d.className,
leadingWhitespace: 3 === d.firstChild.nodeType, leadingWhitespace: 3 === d.firstChild.nodeType,
@ -1317,9 +1325,9 @@ function css_browser_selector(e) {
cssFloat: !!i.style.cssFloat, cssFloat: !!i.style.cssFloat,
checkOn: !!o.value, checkOn: !!o.value,
optSelected: a.selected, optSelected: a.selected,
enctype: !!X.createElement("form").enctype, enctype: !!V.createElement("form").enctype,
html5Clone: "<:nav></:nav>" !== X.createElement("nav").cloneNode(!0).outerHTML, html5Clone: "<:nav></:nav>" !== V.createElement("nav").cloneNode(!0).outerHTML,
boxModel: "CSS1Compat" === X.compatMode, boxModel: "CSS1Compat" === V.compatMode,
deleteExpando: !0, deleteExpando: !0,
noCloneEvent: !0, noCloneEvent: !0,
inlineBlockNeedsLayout: !1, inlineBlockNeedsLayout: !1,
@ -1334,9 +1342,9 @@ function css_browser_selector(e) {
} catch (p) { } catch (p) {
t.deleteExpando = !1; t.deleteExpando = !1;
} }
o = X.createElement("input"), o.setAttribute("value", ""), t.input = "" === o.getAttribute("value"), o = V.createElement("input"), o.setAttribute("value", ""), t.input = "" === o.getAttribute("value"),
o.value = "t", o.setAttribute("type", "radio"), t.radioValue = "t" === o.value, o.value = "t", o.setAttribute("type", "radio"), t.radioValue = "t" === o.value,
o.setAttribute("checked", "t"), o.setAttribute("name", "t"), s = X.createDocumentFragment(), o.setAttribute("checked", "t"), o.setAttribute("name", "t"), s = V.createDocumentFragment(),
s.appendChild(o), t.appendChecked = o.checked, t.checkClone = s.cloneNode(!0).cloneNode(!0).lastChild.checked, s.appendChild(o), t.appendChecked = o.checked, t.checkClone = s.cloneNode(!0).cloneNode(!0).lastChild.checked,
d.attachEvent && (d.attachEvent("onclick", function() { d.attachEvent && (d.attachEvent("onclick", function() {
t.noCloneEvent = !1; t.noCloneEvent = !1;
@ -1348,8 +1356,8 @@ function css_browser_selector(e) {
}) d.setAttribute(l = "on" + u, "t"), t[u + "Bubbles"] = l in e || d.attributes[l].expando === !1; }) d.setAttribute(l = "on" + u, "t"), t[u + "Bubbles"] = l in e || d.attributes[l].expando === !1;
return d.style.backgroundClip = "content-box", d.cloneNode(!0).style.backgroundClip = "", return d.style.backgroundClip = "content-box", d.cloneNode(!0).style.backgroundClip = "",
t.clearCloneStyle = "content-box" === d.style.backgroundClip, lt(function() { t.clearCloneStyle = "content-box" === d.style.backgroundClip, lt(function() {
var n, i, o, r = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", s = X.getElementsByTagName("body")[0]; var n, i, o, r = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", s = V.getElementsByTagName("body")[0];
s && (n = X.createElement("div"), n.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px", s && (n = V.createElement("div"), n.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",
s.appendChild(n).appendChild(d), d.innerHTML = "<table><tr><td></td><td>t</td></tr></table>", s.appendChild(n).appendChild(d), d.innerHTML = "<table><tr><td></td><td>t</td></tr></table>",
o = d.getElementsByTagName("td"), o[0].style.cssText = "padding:0;margin:0;border:0;display:none", o = d.getElementsByTagName("td"), o[0].style.cssText = "padding:0;margin:0;border:0;display:none",
c = 0 === o[0].offsetHeight, o[0].style.display = "", o[1].style.display = "none", c = 0 === o[0].offsetHeight, o[0].style.display = "", o[1].style.display = "none",
@ -1358,9 +1366,9 @@ function css_browser_selector(e) {
e.getComputedStyle && (t.pixelPosition = "1%" !== (e.getComputedStyle(d, null) || {}).top, e.getComputedStyle && (t.pixelPosition = "1%" !== (e.getComputedStyle(d, null) || {}).top,
t.boxSizingReliable = "4px" === (e.getComputedStyle(d, null) || { t.boxSizingReliable = "4px" === (e.getComputedStyle(d, null) || {
width: "4px" width: "4px"
}).width, i = d.appendChild(X.createElement("div")), i.style.cssText = d.style.cssText = r, }).width, i = d.appendChild(V.createElement("div")), i.style.cssText = d.style.cssText = r,
i.style.marginRight = i.style.width = "0", d.style.width = "1px", t.reliableMarginRight = !parseFloat((e.getComputedStyle(i, null) || {}).marginRight)), i.style.marginRight = i.style.width = "0", d.style.width = "1px", t.reliableMarginRight = !parseFloat((e.getComputedStyle(i, null) || {}).marginRight)),
typeof d.style.zoom !== V && (d.innerHTML = "", d.style.cssText = r + "width:1px;padding:1px;display:inline;zoom:1", typeof d.style.zoom !== X && (d.innerHTML = "", d.style.cssText = r + "width:1px;padding:1px;display:inline;zoom:1",
t.inlineBlockNeedsLayout = 3 === d.offsetWidth, d.style.display = "block", d.innerHTML = "<div></div>", t.inlineBlockNeedsLayout = 3 === d.offsetWidth, d.style.display = "block", d.innerHTML = "<div></div>",
d.firstChild.style.width = "5px", t.shrinkWrapBlocks = 3 !== d.offsetWidth, t.inlineBlockNeedsLayout && (s.style.zoom = 1)), d.firstChild.style.width = "5px", t.shrinkWrapBlocks = 3 !== d.offsetWidth, t.inlineBlockNeedsLayout && (s.style.zoom = 1)),
s.removeChild(n), n = d = o = i = null); s.removeChild(n), n = d = o = i = null);
@ -1522,7 +1530,7 @@ function css_browser_selector(e) {
lt(this).toggleClass(e.call(this, n, this.className, t), t); lt(this).toggleClass(e.call(this, n, this.className, t), t);
}) : this.each(function() { }) : this.each(function() {
if ("string" === n) for (var o, r = 0, s = lt(this), a = t, l = e.match(ut) || []; o = l[r++]; ) a = i ? a : !s.hasClass(o), if ("string" === n) for (var o, r = 0, s = lt(this), a = t, l = e.match(ut) || []; o = l[r++]; ) a = i ? a : !s.hasClass(o),
s[a ? "addClass" : "removeClass"](o); else (n === V || "boolean" === n) && (this.className && lt._data(this, "__className__", this.className), s[a ? "addClass" : "removeClass"](o); else (n === X || "boolean" === n) && (this.className && lt._data(this, "__className__", this.className),
this.className = this.className || e === !1 ? "" : lt._data(this, "__className__") || ""); this.className = this.className || e === !1 ? "" : lt._data(this, "__className__") || "");
}); });
}, },
@ -1570,8 +1578,8 @@ function css_browser_selector(e) {
}, },
attr: function(e, n, i) { attr: function(e, n, i) {
var o, r, s, a = e.nodeType; var o, r, s, a = e.nodeType;
if (e && 3 !== a && 8 !== a && 2 !== a) return typeof e.getAttribute === V ? lt.prop(e, n, i) : (r = 1 !== a || !lt.isXMLDoc(e), if (e && 3 !== a && 8 !== a && 2 !== a) return typeof e.getAttribute === X ? lt.prop(e, n, i) : (r = 1 !== a || !lt.isXMLDoc(e),
r && (n = n.toLowerCase(), o = lt.attrHooks[n] || (Nt.test(n) ? Et : _t)), i === t ? o && r && "get" in o && null !== (s = o.get(e, n)) ? s : (typeof e.getAttribute !== V && (s = e.getAttribute(n)), r && (n = n.toLowerCase(), o = lt.attrHooks[n] || (Nt.test(n) ? Et : _t)), i === t ? o && r && "get" in o && null !== (s = o.get(e, n)) ? s : (typeof e.getAttribute !== X && (s = e.getAttribute(n)),
null == s ? t : s) : null !== i ? o && r && "set" in o && (s = o.set(e, i, n)) !== t ? s : (e.setAttribute(n, i + ""), null == s ? t : s) : null !== i ? o && r && "set" in o && (s = o.set(e, i, n)) !== t ? s : (e.setAttribute(n, i + ""),
i) : (lt.removeAttr(e, n), t)); i) : (lt.removeAttr(e, n), t));
}, },
@ -1701,7 +1709,7 @@ function css_browser_selector(e) {
if (v) { if (v) {
for (i.handler && (c = i, i = c.handler, r = c.selector), i.guid || (i.guid = lt.guid++), for (i.handler && (c = i, i = c.handler, r = c.selector), i.guid || (i.guid = lt.guid++),
(a = v.events) || (a = v.events = {}), (d = v.handle) || (d = v.handle = function(e) { (a = v.events) || (a = v.events = {}), (d = v.handle) || (d = v.handle = function(e) {
return typeof lt === V || e && lt.event.triggered === e.type ? t : lt.event.dispatch.apply(d.elem, arguments); return typeof lt === X || e && lt.event.triggered === e.type ? t : lt.event.dispatch.apply(d.elem, arguments);
}, d.elem = e), n = (n || "").match(ut) || [ "" ], l = n.length; l--; ) s = Ht.exec(n[l]) || [], }, d.elem = e), n = (n || "").match(ut) || [ "" ], l = n.length; l--; ) s = Ht.exec(n[l]) || [],
h = m = s[1], g = (s[2] || "").split(".").sort(), u = lt.event.special[h] || {}, h = m = s[1], g = (s[2] || "").split(".").sort(), u = lt.event.special[h] || {},
h = (r ? u.delegateType : u.bindType) || h, u = lt.event.special[h] || {}, p = lt.extend({ h = (r ? u.delegateType : u.bindType) || h, u = lt.event.special[h] || {}, p = lt.extend({
@ -1735,8 +1743,8 @@ function css_browser_selector(e) {
} }
}, },
trigger: function(n, i, o, r) { trigger: function(n, i, o, r) {
var s, a, l, c, u, d, p, f = [ o || X ], h = st.call(n, "type") ? n.type : n, g = st.call(n, "namespace") ? n.namespace.split(".") : []; var s, a, l, c, u, d, p, f = [ o || V ], h = st.call(n, "type") ? n.type : n, g = st.call(n, "namespace") ? n.namespace.split(".") : [];
if (l = d = o = o || X, 3 !== o.nodeType && 8 !== o.nodeType && !jt.test(h + lt.event.triggered) && (h.indexOf(".") >= 0 && (g = h.split("."), if (l = d = o = o || V, 3 !== o.nodeType && 8 !== o.nodeType && !jt.test(h + lt.event.triggered) && (h.indexOf(".") >= 0 && (g = h.split("."),
h = g.shift(), g.sort()), a = 0 > h.indexOf(":") && "on" + h, n = n[lt.expando] ? n : new lt.Event(h, "object" == typeof n && n), h = g.shift(), g.sort()), a = 0 > h.indexOf(":") && "on" + h, n = n[lt.expando] ? n : new lt.Event(h, "object" == typeof n && n),
n.isTrigger = !0, n.namespace = g.join("."), n.namespace_re = n.namespace ? RegExp("(^|\\.)" + g.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, n.isTrigger = !0, n.namespace = g.join("."), n.namespace_re = n.namespace ? RegExp("(^|\\.)" + g.join("\\.(?:.*\\.|)") + "(\\.|$)") : null,
n.result = t, n.target || (n.target = o), i = null == i ? [ n ] : lt.makeArray(i, [ n ]), n.result = t, n.target || (n.target = o), i = null == i ? [ n ] : lt.makeArray(i, [ n ]),
@ -1744,7 +1752,7 @@ function css_browser_selector(e) {
if (!r && !u.noBubble && !lt.isWindow(o)) { if (!r && !u.noBubble && !lt.isWindow(o)) {
for (c = u.delegateType || h, jt.test(c + h) || (l = l.parentNode); l; l = l.parentNode) f.push(l), for (c = u.delegateType || h, jt.test(c + h) || (l = l.parentNode); l; l = l.parentNode) f.push(l),
d = l; d = l;
d === (o.ownerDocument || X) && f.push(d.defaultView || d.parentWindow || e); d === (o.ownerDocument || V) && f.push(d.defaultView || d.parentWindow || e);
} }
for (p = 0; (l = f[p++]) && !n.isPropagationStopped(); ) n.type = p > 1 ? c : u.bindType || h, for (p = 0; (l = f[p++]) && !n.isPropagationStopped(); ) n.type = p > 1 ? c : u.bindType || h,
s = (lt._data(l, "events") || {})[n.type] && lt._data(l, "handle"), s && s.apply(l, i), s = (lt._data(l, "events") || {})[n.type] && lt._data(l, "handle"), s && s.apply(l, i),
@ -1791,7 +1799,7 @@ function css_browser_selector(e) {
for (s || (this.fixHooks[o] = s = Dt.test(o) ? this.mouseHooks : Mt.test(o) ? this.keyHooks : {}), for (s || (this.fixHooks[o] = s = Dt.test(o) ? this.mouseHooks : Mt.test(o) ? this.keyHooks : {}),
i = s.props ? this.props.concat(s.props) : this.props, e = new lt.Event(r), t = i.length; t--; ) n = i[t], i = s.props ? this.props.concat(s.props) : this.props, e = new lt.Event(r), t = i.length; t--; ) n = i[t],
e[n] = r[n]; e[n] = r[n];
return e.target || (e.target = r.srcElement || X), 3 === e.target.nodeType && (e.target = e.target.parentNode), return e.target || (e.target = r.srcElement || V), 3 === e.target.nodeType && (e.target = e.target.parentNode),
e.metaKey = !!e.metaKey, s.filter ? s.filter(e, r) : e; e.metaKey = !!e.metaKey, s.filter ? s.filter(e, r) : e;
}, },
props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
@ -1807,7 +1815,7 @@ function css_browser_selector(e) {
props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
filter: function(e, n) { filter: function(e, n) {
var i, o, r, s = n.button, a = n.fromElement; var i, o, r, s = n.button, a = n.fromElement;
return null == e.pageX && null != n.clientX && (o = e.target.ownerDocument || X, return null == e.pageX && null != n.clientX && (o = e.target.ownerDocument || V,
r = o.documentElement, i = o.body, e.pageX = n.clientX + (r && r.scrollLeft || i && i.scrollLeft || 0) - (r && r.clientLeft || i && i.clientLeft || 0), r = o.documentElement, i = o.body, e.pageX = n.clientX + (r && r.scrollLeft || i && i.scrollLeft || 0) - (r && r.clientLeft || i && i.clientLeft || 0),
e.pageY = n.clientY + (r && r.scrollTop || i && i.scrollTop || 0) - (r && r.clientTop || i && i.clientTop || 0)), e.pageY = n.clientY + (r && r.scrollTop || i && i.scrollTop || 0) - (r && r.clientTop || i && i.clientTop || 0)),
!e.relatedTarget && a && (e.relatedTarget = a === e.target ? n.toElement : a), e.which || s === t || (e.which = 1 & s ? 1 : 2 & s ? 3 : 4 & s ? 2 : 0), !e.relatedTarget && a && (e.relatedTarget = a === e.target ? n.toElement : a), e.which || s === t || (e.which = 1 & s ? 1 : 2 & s ? 3 : 4 & s ? 2 : 0),
@ -1826,7 +1834,7 @@ function css_browser_selector(e) {
}, },
focus: { focus: {
trigger: function() { trigger: function() {
if (this !== X.activeElement && this.focus) try { if (this !== V.activeElement && this.focus) try {
return this.focus(), !1; return this.focus(), !1;
} catch (e) {} } catch (e) {}
}, },
@ -1834,7 +1842,7 @@ function css_browser_selector(e) {
}, },
blur: { blur: {
trigger: function() { trigger: function() {
return this === X.activeElement && this.blur ? (this.blur(), !1) : t; return this === V.activeElement && this.blur ? (this.blur(), !1) : t;
}, },
delegateType: "focusout" delegateType: "focusout"
}, },
@ -1852,11 +1860,11 @@ function css_browser_selector(e) {
}); });
i ? lt.event.trigger(o, null, t) : lt.event.dispatch.call(t, o), o.isDefaultPrevented() && n.preventDefault(); i ? lt.event.trigger(o, null, t) : lt.event.dispatch.call(t, o), o.isDefaultPrevented() && n.preventDefault();
} }
}, lt.removeEvent = X.removeEventListener ? function(e, t, n) { }, lt.removeEvent = V.removeEventListener ? function(e, t, n) {
e.removeEventListener && e.removeEventListener(t, n, !1); e.removeEventListener && e.removeEventListener(t, n, !1);
} : function(e, t, n) { } : function(e, t, n) {
var i = "on" + t; var i = "on" + t;
e.detachEvent && (typeof e[i] === V && (e[i] = null), e.detachEvent(i, n)); e.detachEvent && (typeof e[i] === X && (e[i] = null), e.detachEvent(i, n));
}, lt.Event = function(e, n) { }, lt.Event = function(e, n) {
return this instanceof lt.Event ? (e && e.type ? (this.originalEvent = e, this.type = e.type, return this instanceof lt.Event ? (e && e.type ? (this.originalEvent = e, this.type = e.type,
this.isDefaultPrevented = e.defaultPrevented || e.returnValue === !1 || e.getPreventDefault && e.getPreventDefault() ? l : c) : this.type = e, this.isDefaultPrevented = e.defaultPrevented || e.returnValue === !1 || e.getPreventDefault && e.getPreventDefault() ? l : c) : this.type = e,
@ -1934,10 +1942,10 @@ function css_browser_selector(e) {
}; };
lt.event.special[t] = { lt.event.special[t] = {
setup: function() { setup: function() {
0 === n++ && X.addEventListener(e, i, !0); 0 === n++ && V.addEventListener(e, i, !0);
}, },
teardown: function() { teardown: function() {
0 === --n && X.removeEventListener(e, i, !0); 0 === --n && V.removeEventListener(e, i, !0);
} }
}; };
}), lt.fn.extend({ }), lt.fn.extend({
@ -2048,7 +2056,7 @@ function css_browser_selector(e) {
return w(e.replace(st, "$1"), t, n, i); return w(e.replace(st, "$1"), t, n, i);
} }
function a(e, t) { function a(e, t) {
var n = t && e, i = n && (~t.sourceIndex || X) - (~e.sourceIndex || X); var n = t && e, i = n && (~t.sourceIndex || V) - (~e.sourceIndex || V);
if (i) return i; if (i) return i;
if (n) for (;n = n.nextSibling; ) if (n === t) return -1; if (n) for (;n = n.nextSibling; ) if (n === t) return -1;
return e ? 1 : -1; return e ? 1 : -1;
@ -2195,7 +2203,7 @@ function css_browser_selector(e) {
return E(e, c)(i, t, R, n, ft.test(e)), n; return E(e, c)(i, t, R, n, ft.test(e)), n;
} }
function x() {} function x() {}
var C, k, S, T, _, E, P, I, $, z, N, R, L, A, O, M, D, j = "sizzle" + -new Date(), H = e.document, F = {}, B = 0, W = 0, q = i(), G = i(), U = i(), V = typeof t, X = 1 << 31, Y = [], K = Y.pop, J = Y.push, Q = Y.slice, Z = Y.indexOf || function(e) { var C, k, S, T, _, E, P, I, $, z, N, R, L, A, O, M, D, j = "sizzle" + -new Date(), H = e.document, F = {}, B = 0, W = 0, q = i(), G = i(), U = i(), X = typeof t, V = 1 << 31, Y = [], K = Y.pop, J = Y.push, Q = Y.slice, Z = Y.indexOf || function(e) {
for (var t = 0, n = this.length; n > t; t++) if (this[t] === e) return t; for (var t = 0, n = this.length; n > t; t++) if (this[t] === e) return t;
return -1; return -1;
}, et = "[\\x20\\t\\r\\n\\f]", tt = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", nt = tt.replace("w", "w#"), it = "([*^$|!~]?=)", ot = "\\[" + et + "*(" + tt + ")" + et + "*(?:" + it + et + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + nt + ")|)|)" + et + "*\\]", rt = ":(" + tt + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + ot.replace(3, 8) + ")*)|.*)\\)|)", st = RegExp("^" + et + "+|((?:^|[^\\\\])(?:\\\\.)*)" + et + "+$", "g"), at = RegExp("^" + et + "*," + et + "*"), ct = RegExp("^" + et + "*([\\x20\\t\\r\\n\\f>+~])" + et + "*"), ut = RegExp(rt), dt = RegExp("^" + nt + "$"), pt = { }, et = "[\\x20\\t\\r\\n\\f]", tt = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", nt = tt.replace("w", "w#"), it = "([*^$|!~]?=)", ot = "\\[" + et + "*(" + tt + ")" + et + "*(?:" + it + et + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + nt + ")|)|)" + et + "*\\]", rt = ":(" + tt + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + ot.replace(3, 8) + ")*)|.*)\\)|)", st = RegExp("^" + et + "+|((?:^|[^\\\\])(?:\\\\.)*)" + et + "+$", "g"), at = RegExp("^" + et + "*," + et + "*"), ct = RegExp("^" + et + "*([\\x20\\t\\r\\n\\f>+~])" + et + "*"), ut = RegExp(rt), dt = RegExp("^" + nt + "$"), pt = {
@ -2240,7 +2248,7 @@ function css_browser_selector(e) {
var t = i.getElementsByName && i.getElementsByName(j).length === 2 + i.getElementsByName(j + 0).length; var t = i.getElementsByName && i.getElementsByName(j).length === 2 + i.getElementsByName(j + 0).length;
return F.getIdNotName = !i.getElementById(j), N.removeChild(e), t; return F.getIdNotName = !i.getElementById(j), N.removeChild(e), t;
}), S.attrHandle = r(function(e) { }), S.attrHandle = r(function(e) {
return e.innerHTML = "<a href='#'></a>", e.firstChild && typeof e.firstChild.getAttribute !== V && "#" === e.firstChild.getAttribute("href"); return e.innerHTML = "<a href='#'></a>", e.firstChild && typeof e.firstChild.getAttribute !== X && "#" === e.firstChild.getAttribute("href");
}) ? {} : { }) ? {} : {
href: function(e) { href: function(e) {
return e.getAttribute("href", 2); return e.getAttribute("href", 2);
@ -2249,7 +2257,7 @@ function css_browser_selector(e) {
return e.getAttribute("type"); return e.getAttribute("type");
} }
}, F.getIdNotName ? (S.find.ID = function(e, t) { }, F.getIdNotName ? (S.find.ID = function(e, t) {
if (typeof t.getElementById !== V && !R) { if (typeof t.getElementById !== X && !R) {
var n = t.getElementById(e); var n = t.getElementById(e);
return n && n.parentNode ? [ n ] : []; return n && n.parentNode ? [ n ] : [];
} }
@ -2259,18 +2267,18 @@ function css_browser_selector(e) {
return e.getAttribute("id") === t; return e.getAttribute("id") === t;
}; };
}) : (S.find.ID = function(e, n) { }) : (S.find.ID = function(e, n) {
if (typeof n.getElementById !== V && !R) { if (typeof n.getElementById !== X && !R) {
var i = n.getElementById(e); var i = n.getElementById(e);
return i ? i.id === e || typeof i.getAttributeNode !== V && i.getAttributeNode("id").value === e ? [ i ] : t : []; return i ? i.id === e || typeof i.getAttributeNode !== X && i.getAttributeNode("id").value === e ? [ i ] : t : [];
} }
}, S.filter.ID = function(e) { }, S.filter.ID = function(e) {
var t = e.replace(wt, xt); var t = e.replace(wt, xt);
return function(e) { return function(e) {
var n = typeof e.getAttributeNode !== V && e.getAttributeNode("id"); var n = typeof e.getAttributeNode !== X && e.getAttributeNode("id");
return n && n.value === t; return n && n.value === t;
}; };
}), S.find.TAG = F.tagNameNoComments ? function(e, n) { }), S.find.TAG = F.tagNameNoComments ? function(e, n) {
return typeof n.getElementsByTagName !== V ? n.getElementsByTagName(e) : t; return typeof n.getElementsByTagName !== X ? n.getElementsByTagName(e) : t;
} : function(e, t) { } : function(e, t) {
var n, i = [], o = 0, r = t.getElementsByTagName(e); var n, i = [], o = 0, r = t.getElementsByTagName(e);
if ("*" === e) { if ("*" === e) {
@ -2279,9 +2287,9 @@ function css_browser_selector(e) {
} }
return r; return r;
}, S.find.NAME = F.getByName && function(e, n) { }, S.find.NAME = F.getByName && function(e, n) {
return typeof n.getElementsByName !== V ? n.getElementsByName(name) : t; return typeof n.getElementsByName !== X ? n.getElementsByName(name) : t;
}, S.find.CLASS = F.getByClassName && function(e, n) { }, S.find.CLASS = F.getByClassName && function(e, n) {
return typeof n.getElementsByClassName === V || R ? t : n.getElementsByClassName(e); return typeof n.getElementsByClassName === X || R ? t : n.getElementsByClassName(e);
}, A = [], L = [ ":focus" ], (F.qsa = n(i.querySelectorAll)) && (r(function(e) { }, A = [], L = [ ":focus" ], (F.qsa = n(i.querySelectorAll)) && (r(function(e) {
e.innerHTML = "<select><option selected=''></option></select>", e.querySelectorAll("[selected]").length || L.push("\\[" + et + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)"), e.innerHTML = "<select><option selected=''></option></select>", e.querySelectorAll("[selected]").length || L.push("\\[" + et + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),
e.querySelectorAll(":checked").length || L.push(":checked"); e.querySelectorAll(":checked").length || L.push(":checked");
@ -2389,7 +2397,7 @@ function css_browser_selector(e) {
CLASS: function(e) { CLASS: function(e) {
var t = q[e + " "]; var t = q[e + " "];
return t || (t = RegExp("(^|" + et + ")" + e + "(" + et + "|$)")) && q(e, function(e) { return t || (t = RegExp("(^|" + et + ")" + e + "(" + et + "|$)")) && q(e, function(e) {
return t.test(e.className || typeof e.getAttribute !== V && e.getAttribute("class") || ""); return t.test(e.className || typeof e.getAttribute !== X && e.getAttribute("class") || "");
}); });
}, },
ATTR: function(e, t, n) { ATTR: function(e, t, n) {
@ -2664,7 +2672,7 @@ function css_browser_selector(e) {
return n; return n;
} }
}); });
var Ut = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", Vt = / jQuery\d+="(?:null|\d+)"/g, Xt = RegExp("<(?:" + Ut + ")[\\s/>]", "i"), Yt = /^\s+/, Kt = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, Jt = /<([\w:]+)/, Qt = /<tbody/i, Zt = /<|&#?\w+;/, en = /<(?:script|style|link)/i, tn = /^(?:checkbox|radio)$/i, nn = /checked\s*(?:[^=]|=\s*.checked.)/i, on = /^$|\/(?:java|ecma)script/i, rn = /^true\/(.*)/, sn = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g, an = { var Ut = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", Xt = / jQuery\d+="(?:null|\d+)"/g, Vt = RegExp("<(?:" + Ut + ")[\\s/>]", "i"), Yt = /^\s+/, Kt = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, Jt = /<([\w:]+)/, Qt = /<tbody/i, Zt = /<|&#?\w+;/, en = /<(?:script|style|link)/i, tn = /^(?:checkbox|radio)$/i, nn = /checked\s*(?:[^=]|=\s*.checked.)/i, on = /^$|\/(?:java|ecma)script/i, rn = /^true\/(.*)/, sn = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g, an = {
option: [ 1, "<select multiple='multiple'>", "</select>" ], option: [ 1, "<select multiple='multiple'>", "</select>" ],
legend: [ 1, "<fieldset>", "</fieldset>" ], legend: [ 1, "<fieldset>", "</fieldset>" ],
area: [ 1, "<map>", "</map>" ], area: [ 1, "<map>", "</map>" ],
@ -2674,12 +2682,12 @@ function css_browser_selector(e) {
col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ], col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
_default: lt.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ] _default: lt.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ]
}, ln = p(X), cn = ln.appendChild(X.createElement("div")); }, ln = p(V), cn = ln.appendChild(V.createElement("div"));
an.optgroup = an.option, an.tbody = an.tfoot = an.colgroup = an.caption = an.thead, an.optgroup = an.option, an.tbody = an.tfoot = an.colgroup = an.caption = an.thead,
an.th = an.td, lt.fn.extend({ an.th = an.td, lt.fn.extend({
text: function(e) { text: function(e) {
return lt.access(this, function(e) { return lt.access(this, function(e) {
return e === t ? lt.text(this) : this.empty().append((this[0] && this[0].ownerDocument || X).createTextNode(e)); return e === t ? lt.text(this) : this.empty().append((this[0] && this[0].ownerDocument || V).createTextNode(e));
}, null, e, arguments.length); }, null, e, arguments.length);
}, },
wrapAll: function(e) { wrapAll: function(e) {
@ -2754,8 +2762,8 @@ function css_browser_selector(e) {
html: function(e) { html: function(e) {
return lt.access(this, function(e) { return lt.access(this, function(e) {
var n = this[0] || {}, i = 0, o = this.length; var n = this[0] || {}, i = 0, o = this.length;
if (e === t) return 1 === n.nodeType ? n.innerHTML.replace(Vt, "") : t; if (e === t) return 1 === n.nodeType ? n.innerHTML.replace(Xt, "") : t;
if (!("string" != typeof e || en.test(e) || !lt.support.htmlSerialize && Xt.test(e) || !lt.support.leadingWhitespace && Yt.test(e) || an[(Jt.exec(e) || [ "", "" ])[1].toLowerCase()])) { if (!("string" != typeof e || en.test(e) || !lt.support.htmlSerialize && Vt.test(e) || !lt.support.leadingWhitespace && Yt.test(e) || an[(Jt.exec(e) || [ "", "" ])[1].toLowerCase()])) {
e = e.replace(Kt, "<$1></$2>"); e = e.replace(Kt, "<$1></$2>");
try { try {
for (;o > i; i++) n = this[i] || {}, 1 === n.nodeType && (lt.cleanData(b(n, !1)), for (;o > i; i++) n = this[i] || {}, 1 === n.nodeType && (lt.cleanData(b(n, !1)),
@ -2815,7 +2823,7 @@ function css_browser_selector(e) {
}), lt.extend({ }), lt.extend({
clone: function(e, t, n) { clone: function(e, t, n) {
var i, o, r, s, a, l = lt.contains(e.ownerDocument, e); var i, o, r, s, a, l = lt.contains(e.ownerDocument, e);
if (lt.support.html5Clone || lt.isXMLDoc(e) || !Xt.test("<" + e.nodeName + ">") ? r = e.cloneNode(!0) : (cn.innerHTML = e.outerHTML, if (lt.support.html5Clone || lt.isXMLDoc(e) || !Vt.test("<" + e.nodeName + ">") ? r = e.cloneNode(!0) : (cn.innerHTML = e.outerHTML,
cn.removeChild(r = cn.firstChild)), !(lt.support.noCloneEvent && lt.support.noCloneChecked || 1 !== e.nodeType && 11 !== e.nodeType || lt.isXMLDoc(e))) for (i = b(r), cn.removeChild(r = cn.firstChild)), !(lt.support.noCloneEvent && lt.support.noCloneChecked || 1 !== e.nodeType && 11 !== e.nodeType || lt.isXMLDoc(e))) for (i = b(r),
a = b(e), s = 0; null != (o = a[s]); ++s) i[s] && y(o, i[s]); a = b(e), s = 0; null != (o = a[s]); ++s) i[s] && y(o, i[s]);
if (t) if (n) for (a = a || b(e), i = i || b(r), s = 0; null != (o = a[s]); s++) v(o, i[s]); else v(e, r); if (t) if (n) for (a = a || b(e), i = i || b(r), s = 0; null != (o = a[s]); s++) v(o, i[s]); else v(e, r);
@ -2843,7 +2851,7 @@ function css_browser_selector(e) {
for (var n, i, o, r, s = 0, a = lt.expando, l = lt.cache, c = lt.support.deleteExpando, u = lt.event.special; null != (n = e[s]); s++) if ((t || lt.acceptData(n)) && (o = n[a], for (var n, i, o, r, s = 0, a = lt.expando, l = lt.cache, c = lt.support.deleteExpando, u = lt.event.special; null != (n = e[s]); s++) if ((t || lt.acceptData(n)) && (o = n[a],
r = o && l[o])) { r = o && l[o])) {
if (r.events) for (i in r.events) u[i] ? lt.event.remove(n, i) : lt.removeEvent(n, i, r.handle); if (r.events) for (i in r.events) u[i] ? lt.event.remove(n, i) : lt.removeEvent(n, i, r.handle);
l[o] && (delete l[o], c ? delete n[a] : typeof n.removeAttribute !== V ? n.removeAttribute(a) : n[a] = null, l[o] && (delete l[o], c ? delete n[a] : typeof n.removeAttribute !== X ? n.removeAttribute(a) : n[a] = null,
Z.push(o)); Z.push(o));
} }
} }
@ -2939,7 +2947,7 @@ function css_browser_selector(e) {
return a && ("" !== l || lt.contains(e.ownerDocument, e) || (l = lt.style(e, n)), return a && ("" !== l || lt.contains(e.ownerDocument, e) || (l = lt.style(e, n)),
bn.test(l) && vn.test(n) && (o = c.width, r = c.minWidth, s = c.maxWidth, c.minWidth = c.maxWidth = c.width = l, bn.test(l) && vn.test(n) && (o = c.width, r = c.minWidth, s = c.maxWidth, c.minWidth = c.maxWidth = c.width = l,
l = a.width, c.width = o, c.minWidth = r, c.maxWidth = s)), l; l = a.width, c.width = o, c.minWidth = r, c.maxWidth = s)), l;
}) : X.documentElement.currentStyle && (dn = function(e) { }) : V.documentElement.currentStyle && (dn = function(e) {
return e.currentStyle; return e.currentStyle;
}, pn = function(e, n, i) { }, pn = function(e, n, i) {
var o, r, s, a = i || dn(e), l = a ? a[n] : t, c = e.style; var o, r, s, a = i || dn(e), l = a ? a[n] : t, c = e.style;
@ -3041,7 +3049,7 @@ function css_browser_selector(e) {
try { try {
Nn = Y.href; Nn = Y.href;
} catch (Un) { } catch (Un) {
Nn = X.createElement("a"), Nn.href = "", Nn = Nn.href; Nn = V.createElement("a"), Nn.href = "", Nn = Nn.href;
} }
zn = Fn.exec(Nn.toLowerCase()) || [], lt.fn.load = function(e, n, i) { zn = Fn.exec(Nn.toLowerCase()) || [], lt.fn.load = function(e, n, i) {
if ("string" != typeof e && Bn) return Bn.apply(this, arguments); if ("string" != typeof e && Bn) return Bn.apply(this, arguments);
@ -3212,10 +3220,10 @@ function css_browser_selector(e) {
e.cache === t && (e.cache = !1), e.crossDomain && (e.type = "GET", e.global = !1); e.cache === t && (e.cache = !1), e.crossDomain && (e.type = "GET", e.global = !1);
}), lt.ajaxTransport("script", function(e) { }), lt.ajaxTransport("script", function(e) {
if (e.crossDomain) { if (e.crossDomain) {
var n, i = X.head || lt("head")[0] || X.documentElement; var n, i = V.head || lt("head")[0] || V.documentElement;
return { return {
send: function(t, o) { send: function(t, o) {
n = X.createElement("script"), n.async = !0, e.scriptCharset && (n.charset = e.scriptCharset), n = V.createElement("script"), n.async = !0, e.scriptCharset && (n.charset = e.scriptCharset),
n.src = e.url, n.onload = n.onreadystatechange = function(e, t) { n.src = e.url, n.onload = n.onreadystatechange = function(e, t) {
(t || !n.readyState || /loaded|complete/.test(n.readyState)) && (n.onload = n.onreadystatechange = null, (t || !n.readyState || /loaded|complete/.test(n.readyState)) && (n.onload = n.onreadystatechange = null,
n.parentNode && n.parentNode.removeChild(n), n = null, t || o(200, "success")); n.parentNode && n.parentNode.removeChild(n), n = null, t || o(200, "success"));
@ -3227,23 +3235,23 @@ function css_browser_selector(e) {
}; };
} }
}); });
var Vn = [], Xn = /(=)\?(?=&|$)|\?\?/; var Xn = [], Vn = /(=)\?(?=&|$)|\?\?/;
lt.ajaxSetup({ lt.ajaxSetup({
jsonp: "callback", jsonp: "callback",
jsonpCallback: function() { jsonpCallback: function() {
var e = Vn.pop() || lt.expando + "_" + Rn++; var e = Xn.pop() || lt.expando + "_" + Rn++;
return this[e] = !0, e; return this[e] = !0, e;
} }
}), lt.ajaxPrefilter("json jsonp", function(n, i, o) { }), lt.ajaxPrefilter("json jsonp", function(n, i, o) {
var r, s, a, l = n.jsonp !== !1 && (Xn.test(n.url) ? "url" : "string" == typeof n.data && !(n.contentType || "").indexOf("application/x-www-form-urlencoded") && Xn.test(n.data) && "data"); var r, s, a, l = n.jsonp !== !1 && (Vn.test(n.url) ? "url" : "string" == typeof n.data && !(n.contentType || "").indexOf("application/x-www-form-urlencoded") && Vn.test(n.data) && "data");
return l || "jsonp" === n.dataTypes[0] ? (r = n.jsonpCallback = lt.isFunction(n.jsonpCallback) ? n.jsonpCallback() : n.jsonpCallback, return l || "jsonp" === n.dataTypes[0] ? (r = n.jsonpCallback = lt.isFunction(n.jsonpCallback) ? n.jsonpCallback() : n.jsonpCallback,
l ? n[l] = n[l].replace(Xn, "$1" + r) : n.jsonp !== !1 && (n.url += (Ln.test(n.url) ? "&" : "?") + n.jsonp + "=" + r), l ? n[l] = n[l].replace(Vn, "$1" + r) : n.jsonp !== !1 && (n.url += (Ln.test(n.url) ? "&" : "?") + n.jsonp + "=" + r),
n.converters["script json"] = function() { n.converters["script json"] = function() {
return a || lt.error(r + " was not called"), a[0]; return a || lt.error(r + " was not called"), a[0];
}, n.dataTypes[0] = "json", s = e[r], e[r] = function() { }, n.dataTypes[0] = "json", s = e[r], e[r] = function() {
a = arguments; a = arguments;
}, o.always(function() { }, o.always(function() {
e[r] = s, n[r] && (n.jsonpCallback = i.jsonpCallback, Vn.push(r)), a && lt.isFunction(s) && s(a[0]), e[r] = s, n[r] && (n.jsonpCallback = i.jsonpCallback, Xn.push(r)), a && lt.isFunction(s) && s(a[0]),
a = s = t; a = s = t;
}), "script") : t; }), "script") : t;
}); });
@ -3448,7 +3456,7 @@ function css_browser_selector(e) {
top: 0, top: 0,
left: 0 left: 0
}, r = this[0], s = r && r.ownerDocument; }, r = this[0], s = r && r.ownerDocument;
if (s) return n = s.documentElement, lt.contains(n, r) ? (typeof r.getBoundingClientRect !== V && (o = r.getBoundingClientRect()), if (s) return n = s.documentElement, lt.contains(n, r) ? (typeof r.getBoundingClientRect !== X && (o = r.getBoundingClientRect()),
i = q(s), { i = q(s), {
top: o.top + (i.pageYOffset || n.scrollTop) - (n.clientTop || 0), top: o.top + (i.pageYOffset || n.scrollTop) - (n.clientTop || 0),
left: o.left + (i.pageXOffset || n.scrollLeft) - (n.clientLeft || 0) left: o.left + (i.pageXOffset || n.scrollLeft) - (n.clientLeft || 0)
@ -3479,8 +3487,8 @@ function css_browser_selector(e) {
}, },
offsetParent: function() { offsetParent: function() {
return this.map(function() { return this.map(function() {
for (var e = this.offsetParent || X.documentElement; e && !lt.nodeName(e, "html") && "static" === lt.css(e, "position"); ) e = e.offsetParent; for (var e = this.offsetParent || V.documentElement; e && !lt.nodeName(e, "html") && "static" === lt.css(e, "position"); ) e = e.offsetParent;
return e || X.documentElement; return e || V.documentElement;
}); });
} }
}), lt.each({ }), lt.each({
@ -4611,6 +4619,7 @@ define("config", function() {}), define("settings", [ "underscore", "config" ],
"Pagedown-extra": "https://github.com/jmcmanus/pagedown-extra/", "Pagedown-extra": "https://github.com/jmcmanus/pagedown-extra/",
Prettify: "https://code.google.com/p/google-code-prettify/", Prettify: "https://code.google.com/p/google-code-prettify/",
RequireJS: "http://requirejs.org/", RequireJS: "http://requirejs.org/",
"stacktrace.js": "http://stacktracejs.com/",
"UI Layout": "http://layout.jquery-dev.net/", "UI Layout": "http://layout.jquery-dev.net/",
"Underscore.js": "http://underscorejs.org/", "Underscore.js": "http://underscorejs.org/",
waitForImages: "https://github.com/alexanderdickson/waitForImages" waitForImages: "https://github.com/alexanderdickson/waitForImages"
@ -12040,7 +12049,159 @@ function(e) {
c.selectFile(e); c.selectFile(e);
}); });
}), r.onFileMgrCreated(c), c; }), r.onFileMgrCreated(c), c;
}), define("asyncRunner", [ "underscore", "core", "utils", "extensionMgr" ], function(e, t, n, i) { }), "undefined" != typeof module && module.exports && (module.exports = printStackTrace),
printStackTrace.implementation = function() {}, printStackTrace.implementation.prototype = {
run: function(e, t) {
return e = e || this.createException(), t = t || this.mode(e), "other" === t ? this.other(arguments.callee) : this[t](e);
},
createException: function() {
try {
this.undef();
} catch (e) {
return e;
}
},
mode: function(e) {
return e.arguments && e.stack ? "chrome" : e.stack && e.sourceURL ? "safari" : e.stack && e.number ? "ie" : "string" == typeof e.message && "undefined" != typeof window && window.opera ? e.stacktrace ? e.message.indexOf("\n") > -1 && e.message.split("\n").length > e.stacktrace.split("\n").length ? "opera9" : e.stack ? 0 > e.stacktrace.indexOf("called from line") ? "opera10b" : "opera11" : "opera10a" : "opera9" : e.stack ? "firefox" : "other";
},
instrumentFunction: function(e, t, n) {
e = e || window;
var i = e[t];
e[t] = function() {
return n.call(this, printStackTrace().slice(4)), e[t]._instrumented.apply(this, arguments);
}, e[t]._instrumented = i;
},
deinstrumentFunction: function(e, t) {
e[t].constructor === Function && e[t]._instrumented && e[t]._instrumented.constructor === Function && (e[t] = e[t]._instrumented);
},
chrome: function(e) {
var t = (e.stack + "\n").replace(/^\S[^\(]+?[\n$]/gm, "").replace(/^\s+(at eval )?at\s+/gm, "").replace(/^([^\(]+?)([\n$])/gm, "{anonymous}()@$1$2").replace(/^Object.<anonymous>\s*\(([^\)]+)\)/gm, "{anonymous}()@$1").split("\n");
return t.pop(), t;
},
safari: function(e) {
return e.stack.replace(/\[native code\]\n/m, "").replace(/^(?=\w+Error\:).*$\n/m, "").replace(/^@/gm, "{anonymous}()@").split("\n");
},
ie: function(e) {
var t = /^.*at (\w+) \(([^\)]+)\)$/gm;
return e.stack.replace(/at Anonymous function /gm, "{anonymous}()@").replace(/^(?=\w+Error\:).*$\n/m, "").replace(t, "$1@$2").split("\n");
},
firefox: function(e) {
return e.stack.replace(/(?:\n@:0)?\s+$/m, "").replace(/^[\(@]/gm, "{anonymous}()@").split("\n");
},
opera11: function(e) {
for (var t = "{anonymous}", n = /^.*line (\d+), column (\d+)(?: in (.+))? in (\S+):$/, i = e.stacktrace.split("\n"), o = [], r = 0, s = i.length; s > r; r += 2) {
var a = n.exec(i[r]);
if (a) {
var l = a[4] + ":" + a[1] + ":" + a[2], c = a[3] || "global code";
c = c.replace(/<anonymous function: (\S+)>/, "$1").replace(/<anonymous function>/, t),
o.push(c + "@" + l + " -- " + i[r + 1].replace(/^\s+/, ""));
}
}
return o;
},
opera10b: function(e) {
for (var t = /^(.*)@(.+):(\d+)$/, n = e.stacktrace.split("\n"), i = [], o = 0, r = n.length; r > o; o++) {
var s = t.exec(n[o]);
if (s) {
var a = s[1] ? s[1] + "()" : "global code";
i.push(a + "@" + s[2] + ":" + s[3]);
}
}
return i;
},
opera10a: function(e) {
for (var t = "{anonymous}", n = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i, i = e.stacktrace.split("\n"), o = [], r = 0, s = i.length; s > r; r += 2) {
var a = n.exec(i[r]);
if (a) {
var l = a[3] || t;
o.push(l + "()@" + a[2] + ":" + a[1] + " -- " + i[r + 1].replace(/^\s+/, ""));
}
}
return o;
},
opera9: function(e) {
for (var t = "{anonymous}", n = /Line (\d+).*script (?:in )?(\S+)/i, i = e.message.split("\n"), o = [], r = 2, s = i.length; s > r; r += 2) {
var a = n.exec(i[r]);
a && o.push(t + "()@" + a[2] + ":" + a[1] + " -- " + i[r + 1].replace(/^\s+/, ""));
}
return o;
},
other: function(e) {
for (var t, n, i = "{anonymous}", o = /function\s*([\w\-$]+)?\s*\(/i, r = [], s = 10; e && e.arguments && s > r.length; ) t = o.test("" + e) ? RegExp.$1 || i : i,
n = Array.prototype.slice.call(e.arguments || []), r[r.length] = t + "(" + this.stringifyArguments(n) + ")",
e = e.caller;
return r;
},
stringifyArguments: function(e) {
for (var t = [], n = Array.prototype.slice, i = 0; e.length > i; ++i) {
var o = e[i];
void 0 === o ? t[i] = "undefined" : null === o ? t[i] = "null" : o.constructor && (o.constructor === Array ? t[i] = 3 > o.length ? "[" + this.stringifyArguments(o) + "]" : "[" + this.stringifyArguments(n.call(o, 0, 1)) + "..." + this.stringifyArguments(n.call(o, -1)) + "]" : o.constructor === Object ? t[i] = "#object" : o.constructor === Function ? t[i] = "#function" : o.constructor === String ? t[i] = '"' + o + '"' : o.constructor === Number && (t[i] = o));
}
return t.join(",");
},
sourceCache: {},
ajax: function(e) {
var t = this.createXMLHTTPObject();
if (t) try {
return t.open("GET", e, !1), t.send(null), t.responseText;
} catch (n) {}
return "";
},
createXMLHTTPObject: function() {
for (var e, t = [ function() {
return new XMLHttpRequest();
}, function() {
return new ActiveXObject("Msxml2.XMLHTTP");
}, function() {
return new ActiveXObject("Msxml3.XMLHTTP");
}, function() {
return new ActiveXObject("Microsoft.XMLHTTP");
} ], n = 0; t.length > n; n++) try {
return e = t[n](), this.createXMLHTTPObject = t[n], e;
} catch (i) {}
},
isSameDomain: function(e) {
return "undefined" != typeof location && -1 !== e.indexOf(location.hostname);
},
getSource: function(e) {
return e in this.sourceCache || (this.sourceCache[e] = this.ajax(e).split("\n")),
this.sourceCache[e];
},
guessAnonymousFunctions: function(e) {
for (var t = 0; e.length > t; ++t) {
var n = /\{anonymous\}\(.*\)@(.*)/, i = /^(.*?)(?::(\d+))(?::(\d+))?(?: -- .+)?$/, o = e[t], r = n.exec(o);
if (r) {
var s = i.exec(r[1]);
if (s) {
var a = s[1], l = s[2], c = s[3] || 0;
if (a && this.isSameDomain(a) && l) {
var u = this.guessAnonymousFunction(a, l, c);
e[t] = o.replace("{anonymous}", u);
}
}
}
}
return e;
},
guessAnonymousFunction: function(e, t) {
var n;
try {
n = this.findFunctionName(this.getSource(e), t);
} catch (i) {
n = "getSource failed with url: " + e + ", exception: " + ("" + i);
}
return n;
},
findFunctionName: function(e, t) {
for (var n, i, o, r = /function\s+([^(]*?)\s*\(([^)]*)\)/, s = /['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*function\b/, a = /['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*(?:eval|new Function)\b/, l = "", c = Math.min(t, 20), u = 0; c > u; ++u) if (n = e[t - u - 1],
o = n.indexOf("//"), o >= 0 && (n = n.substr(0, o)), n) {
if (l = n + l, i = s.exec(l), i && i[1]) return i[1];
if (i = r.exec(l), i && i[1]) return i[1];
if (i = a.exec(l), i && i[1]) return i[1];
}
return "(?)";
}
}, define("libs/stacktrace", function() {}), define("asyncRunner", [ "underscore", "core", "utils", "extensionMgr", "libs/stacktrace" ], function(e, t, n, i) {
function o(t, n, o) { function o(t, n, o) {
try { try {
e.each(n, function(e) { e.each(n, function(e) {
@ -12054,14 +12215,14 @@ function(e) {
return r.createTask = function() { return r.createTask = function() {
var e = {}; var e = {};
return e.finished = !1, e.timeout = ASYNC_TASK_DEFAULT_TIMEOUT, e.retryCounter = 0, return e.finished = !1, e.timeout = ASYNC_TASK_DEFAULT_TIMEOUT, e.retryCounter = 0,
e.runCallbacks = [], e.onRun = function(t) { e.callPath = [], e.runCallbacks = [], e.onRun = function(t) {
e.runCallbacks.push(t); e.runCallbacks.push(t);
}, e.successCallbacks = [], e.onSuccess = function(t) { }, e.successCallbacks = [], e.onSuccess = function(t) {
e.successCallbacks.push(t); e.successCallbacks.push(t);
}, e.errorCallbacks = [], e.onError = function(t) { }, e.errorCallbacks = [], e.onError = function(t) {
e.errorCallbacks.push(t); e.errorCallbacks.push(t);
}, e.chain = function(t) { }, e.chain = function(t) {
if (e.finished !== !0) { if (e.callPath.push(printStackTrace()[5]), e.finished !== !0) {
if (void 0 === e.queue && (e.queue = e.runCallbacks.slice()), void 0 !== t) return t(), if (void 0 === e.queue && (e.queue = e.runCallbacks.slice()), void 0 !== t) return t(),
void 0; void 0;
if (0 === e.queue.length) return o(e, e.successCallbacks), void 0; if (0 === e.queue.length) return o(e, e.successCallbacks), void 0;
@ -12069,18 +12230,18 @@ function(e) {
n(); n();
} }
}, e.error = function(t) { }, e.error = function(t) {
if (e.finished !== !0) throw t = t || Error("Unknown error"), t.message && i.onError(t), if (e.callPath.push(printStackTrace()[5]), e.finished !== !0) throw t = t || Error("Unknown error|\n" + e.callPath.join("\n")),
o(e, e.errorCallbacks, t), t; t.message && i.onError(t), o(e, e.errorCallbacks, t), t;
}, e.retry = function(t, i) { }, e.retry = function(t, i) {
if (e.finished !== !0) { if (e.finished !== !0) {
if (i = i || 5, e.queue = void 0, e.retryCounter >= i) return e.error(t), void 0; if (i = i || 5, e.queue = void 0, e.retryCounter >= i) return e.error(t), void 0;
var o = 1e3 * Math.pow(2, e.retryCounter++); var o = 1e3 * Math.pow(2, e.retryCounter++);
u = n.currentTime + o, c = !1, r.runTask(); u = n.currentTime + o, c = !1, e.callPath = [], r.runTask();
} }
}, e; }, e;
}, r.runTask = function() { }, r.runTask = function() {
e.defer(function() { e.defer(function() {
if (c === !0) return u + l.timeout < n.currentTime && l.error(Error("A timeout occurred.")), if (c === !0) return u + l.timeout < n.currentTime && l.error(Error("A timeout occurred.|\n" + l.callPath.join("\n"))),
void 0; void 0;
if (void 0 === l) { if (void 0 === l) {
if (0 === s.length) return; if (0 === s.length) return;